diff options
Diffstat (limited to 'ppsspp-gcc5.1.patch')
-rw-r--r-- | ppsspp-gcc5.1.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ppsspp-gcc5.1.patch b/ppsspp-gcc5.1.patch new file mode 100644 index 000000000000..e046206b1963 --- /dev/null +++ b/ppsspp-gcc5.1.patch @@ -0,0 +1,40 @@ +diff -rupN ppsspp.orig/ext/xbrz/xbrz.cpp ppsspp/ext/xbrz/xbrz.cpp +--- ppsspp.orig/ext/xbrz/xbrz.cpp 2015-06-01 14:16:20.005738417 +0200 ++++ ppsspp/ext/xbrz/xbrz.cpp 2015-06-01 14:21:30.365765974 +0200 +@@ -648,23 +648,21 @@ void scalePixel(const Kernel_3x3& ker, + auto eq = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_) < cfg.equalColorTolerance_; }; + auto dist = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.luminanceWeight_); }; + +- const bool doLineBlend = [&]() -> bool +- { +- if (getBottomR(blend) >= BLEND_DOMINANT) +- return true; ++ bool doLineBlend; + +- //make sure there is no second blending in an adjacent rotation for this pixel: handles insular pixels, mario eyes +- if (getTopR(blend) != BLEND_NONE && !eq(e, g)) //but support double-blending for 90° corners +- return false; +- if (getBottomL(blend) != BLEND_NONE && !eq(e, c)) +- return false; ++ if (getBottomR(blend) >= BLEND_DOMINANT) ++ doLineBlend = true; + +- //no full blending for L-shapes; blend corner only (handles "mario mushroom eyes") +- if (!eq(e, i) && eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c)) +- return false; +- +- return true; +- }(); ++ //make sure there is no second blending in an adjacent rotation for this pixel: handles insular pixels, mario eyes ++ else if (getTopR(blend) != BLEND_NONE && !eq(e, g)) //but support double-blending for 90° corners ++ doLineBlend = false; ++ else if (getBottomL(blend) != BLEND_NONE && !eq(e, c)) ++ doLineBlend = false; ++ //no full blending for L-shapes; blend corner only (handles "mario mushroom eyes") ++ else if (!eq(e, i) && eq(g, h) && eq(h , i) && eq(i, f) && eq(f, c)) ++ doLineBlend = false; ++ else ++ doLineBlend = true; + + const uint32_t px = dist(e, f) <= dist(e, h) ? f : h; //choose most similar color + |