diff options
author | B. Stack <bgstack15@gmail.com> | 2022-09-07 18:49:36 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-09-07 18:49:36 +0000 |
commit | 62bcefb8b809a32c6d26ab04ca686578bba5567a (patch) | |
tree | fbc1dea58a6b28f1af4a9e9b2bc8e3e1d23b2103 /xBRZ/src/xbrz.cpp | |
parent | Merge branch 'b11.23' into 'master' (diff) | |
parent | add upstream 11.24 (diff) | |
download | FreeFileSync-11.24.tar.gz FreeFileSync-11.24.tar.bz2 FreeFileSync-11.24.zip |
Merge branch 'b11.24' into 'master'11.24
add upstream 11.24
See merge request opensource-tracking/FreeFileSync!47
Diffstat (limited to 'xBRZ/src/xbrz.cpp')
-rw-r--r-- | xBRZ/src/xbrz.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xBRZ/src/xbrz.cpp b/xBRZ/src/xbrz.cpp index 65dfc47e..448a4b74 100644 --- a/xBRZ/src/xbrz.cpp +++ b/xBRZ/src/xbrz.cpp @@ -283,20 +283,18 @@ template <class ColorDistance> FORCE_INLINE //detect blend direction BlendResult preProcessCorners(const Kernel_4x4& ker, const xbrz::ScalerCfg& cfg) //result: E, F, H, I corners of "GradientType" { - - BlendResult result = {}; - if ((ker.e == ker.f && ker.h == ker.i) || (ker.e == ker.h && ker.f == ker.i)) - return result; + return {}; auto dist = [&](uint32_t pix1, uint32_t pix2) { return ColorDistance::dist(pix1, pix2, cfg.testAttribute); }; const double hf = dist(ker.g, ker.e) + dist(ker.e, ker.c) + dist(ker.k, ker.i) + dist(ker.i, ker.o) + cfg.centerDirectionBias * dist(ker.h, ker.f); const double ei = dist(ker.d, ker.h) + dist(ker.h, ker.l) + dist(ker.b, ker.f) + dist(ker.f, ker.n) + cfg.centerDirectionBias * dist(ker.e, ker.i); + BlendResult result = {}; if (hf < ei) //test sample: 70% of values max(hf, ei) / min(hf, ei) are between 1.1 and 3.7 with median being 1.8 { const bool dominantGradient = cfg.dominantDirectionThreshold * hf < ei; |