diff options
author | B. Stack <bgstack15@gmail.com> | 2022-05-22 21:09:26 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-05-22 21:09:26 +0000 |
commit | 54c2e44d7b37b2c3efc449e054eef21fa414dfde (patch) | |
tree | 3894ba7e10c78750c195381a861da5e8166a6bfd /xBRZ | |
parent | Merge branch 'b11.20' into 'master' (diff) | |
parent | add upstream 11.21 (diff) | |
download | FreeFileSync-54c2e44d7b37b2c3efc449e054eef21fa414dfde.tar.gz FreeFileSync-54c2e44d7b37b2c3efc449e054eef21fa414dfde.tar.bz2 FreeFileSync-54c2e44d7b37b2c3efc449e054eef21fa414dfde.zip |
Merge branch 'b11.21' into 'master'11.21
add upstream 11.21
See merge request opensource-tracking/FreeFileSync!44
Diffstat (limited to 'xBRZ')
-rw-r--r-- | xBRZ/src/xbrz.cpp | 10 | ||||
-rw-r--r-- | xBRZ/src/xbrz_tools.h | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/xBRZ/src/xbrz.cpp b/xBRZ/src/xbrz.cpp index 9cf4b8e9..629a1ce5 100644 --- a/xBRZ/src/xbrz.cpp +++ b/xBRZ/src/xbrz.cpp @@ -1222,7 +1222,7 @@ bool xbrz::equalColorTest2(uint32_t col1, uint32_t col2, ColorFormat colFmt, dou void xbrz::bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, /**/ uint32_t* trg, int trgWidth, int trgHeight) { - const auto imgReader = [src, srcWidth](int x, int y, BytePixel& pix) + const auto pixReader = [src, srcWidth](int x, int y, BytePixel& pix) { static_assert(sizeof(pix) == sizeof(uint32_t)); const uint32_t pixSrc = src[y * srcWidth + x]; @@ -1234,17 +1234,17 @@ void xbrz::bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, pix[3] = xbrz::premultiply(getBlue (pixSrc), a); //b }; - const auto imgWriter = [trg](const xbrz::BytePixel& pix) mutable + const auto pixWriter = [trg](const xbrz::BytePixel& pix) mutable { const unsigned char a = pix[0]; - * trg++ = makePixel(a, + *trg++ = makePixel(a, xbrz::demultiply(pix[1], a), //r xbrz::demultiply(pix[2], a), //g xbrz::demultiply(pix[3], a)); //b }; - bilinearScaleSimple(imgReader, srcWidth, srcHeight, - imgWriter, trgWidth, trgHeight, 0, trgHeight); + bilinearScaleSimple(pixReader, srcWidth, srcHeight, + pixWriter, trgWidth, trgHeight, 0, trgHeight); } diff --git a/xBRZ/src/xbrz_tools.h b/xBRZ/src/xbrz_tools.h index d6e48c0c..32e2090f 100644 --- a/xBRZ/src/xbrz_tools.h +++ b/xBRZ/src/xbrz_tools.h @@ -19,6 +19,7 @@ #define XBRZ_TOOLS_H_825480175091875 #include <cassert> +#include <vector> #include <algorithm> #include <type_traits> |