From ed870dbcc90dcd8c0ec7b885bd4af8406ddbfbd0 Mon Sep 17 00:00:00 2001 From: Peter Thoman Date: Fri, 3 May 2013 02:44:27 +0200 Subject: [PATCH] Better alpha component fix for xbrz --- ext/xbrz/xbrz.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/xbrz/xbrz.cpp b/ext/xbrz/xbrz.cpp index ec1277879..48ea56112 100644 --- a/ext/xbrz/xbrz.cpp +++ b/ext/xbrz/xbrz.cpp @@ -419,7 +419,7 @@ double distYCbCrA(uint32_t pix1, uint32_t pix2, double lumaWeight) const double c_r = scale_r * (r_diff - y); //we skip division by 255 to have similar range like other distance functions - return (std::sqrt(square(lumaWeight * y) + square(c_b) + square(c_r)))*0.67 + square(static_cast(getAlpha(pix1)) - getAlpha(pix2))*0.33; + return std::sqrt(square(lumaWeight * y) + square(c_b) + square(c_r)+ square(static_cast(getAlpha(pix1)) - getAlpha(pix2))); }