summaryrefslogtreecommitdiff
path: root/xBRZ
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-09-07 18:49:36 +0000
committerB. Stack <bgstack15@gmail.com>2022-09-07 18:49:36 +0000
commit62bcefb8b809a32c6d26ab04ca686578bba5567a (patch)
treefbc1dea58a6b28f1af4a9e9b2bc8e3e1d23b2103 /xBRZ
parentMerge branch 'b11.23' into 'master' (diff)
parentadd upstream 11.24 (diff)
downloadFreeFileSync-62bcefb8b809a32c6d26ab04ca686578bba5567a.tar.gz
FreeFileSync-62bcefb8b809a32c6d26ab04ca686578bba5567a.tar.bz2
FreeFileSync-62bcefb8b809a32c6d26ab04ca686578bba5567a.zip
Merge branch 'b11.24' into 'master'11.24
add upstream 11.24 See merge request opensource-tracking/FreeFileSync!47
Diffstat (limited to 'xBRZ')
-rw-r--r--xBRZ/src/xbrz.cpp6
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;
bgstack15