summaryrefslogtreecommitdiff
path: root/xBRZ/src/xbrz_tools.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-03-12 16:09:20 -0400
committerB Stack <bgstack15@gmail.com>2019-03-12 16:09:20 -0400
commit27177c9cbc47d4114ccee56015fb0407e7e258cc (patch)
treedc226d83311470a23cdf0c02064feb525fcc5096 /xBRZ/src/xbrz_tools.h
parentMerge branch '10.9' into 'master' (diff)
downloadFreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.tar.gz
FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.tar.bz2
FreeFileSync-27177c9cbc47d4114ccee56015fb0407e7e258cc.zip
10.10
Diffstat (limited to 'xBRZ/src/xbrz_tools.h')
-rw-r--r--xBRZ/src/xbrz_tools.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/xBRZ/src/xbrz_tools.h b/xBRZ/src/xbrz_tools.h
index aaa2b769..15bea025 100644
--- a/xBRZ/src/xbrz_tools.h
+++ b/xBRZ/src/xbrz_tools.h
@@ -184,7 +184,7 @@ void bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, int srcPitc
//perf notes:
// -> double-based calculation is (slightly) faster than float
- // -> precalculation gives significant boost; std::vector<> memory allocation is negligible!
+ // -> pre-calculation gives significant boost; std::vector<> memory allocation is negligible!
struct CoeffsX
{
int x1 = 0;
@@ -233,11 +233,9 @@ void bilinearScale(const uint32_t* src, int srcWidth, int srcHeight, int srcPitc
auto interpolate = [=](int offset)
{
- /*
- https://en.wikipedia.org/wiki/Bilinear_interpolation
- (c11(x2 - x) + c21(x - x1)) * (y2 - y ) +
- (c12(x2 - x) + c22(x - x1)) * (y - y1)
- */
+ /* https://en.wikipedia.org/wiki/Bilinear_interpolation
+ (c11(x2 - x) + c21(x - x1)) * (y2 - y ) +
+ (c12(x2 - x) + c22(x - x1)) * (y - y1) */
const auto c11 = (srcLine [x1] >> (8 * offset)) & 0xff;
const auto c21 = (srcLine [x2] >> (8 * offset)) & 0xff;
const auto c12 = (srcLineNext[x1] >> (8 * offset)) & 0xff;
bgstack15