diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-04-28 18:32:47 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-04-28 18:32:47 +0000 |
commit | 0883a7c92553767b8803b1ad0d7b0177a10f289d (patch) | |
tree | e8e16b03eddbd0dbd7e366159ffbc0a61d502703 /editor/specialty | |
parent | b8fa80317aec76c25ce1dd1e591ffbde922f3e6c (diff) | |
download | netpbm-mirror-0883a7c92553767b8803b1ad0d7b0177a10f289d.tar.gz netpbm-mirror-0883a7c92553767b8803b1ad0d7b0177a10f289d.tar.xz netpbm-mirror-0883a7c92553767b8803b1ad0d7b0177a10f289d.zip |
Fix compiler warning about long passed to 'abs'
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3240 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/specialty')
-rw-r--r-- | editor/specialty/pammixinterlace.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/editor/specialty/pammixinterlace.c b/editor/specialty/pammixinterlace.c index 5d0356ef..28dace25 100644 --- a/editor/specialty/pammixinterlace.c +++ b/editor/specialty/pammixinterlace.c @@ -37,9 +37,9 @@ clamp(sample const val, static bool -distant(long const above, - long const mid, - long const below) { +distant(int const above, + int const mid, + int const below) { return abs(mid - (above + below) / 2) > abs(above - below); } @@ -60,9 +60,9 @@ filterLinearBlend(tuple * const outputrow, unsigned int plane; for (plane = 0; plane < depth; ++plane) { - long const above = tuplerowWindow[0][col][plane]; - long const mid = tuplerowWindow[1][col][plane]; - long const below = tuplerowWindow[2][col][plane]; + int const above = tuplerowWindow[0][col][plane]; + int const mid = tuplerowWindow[1][col][plane]; + int const below = tuplerowWindow[2][col][plane]; sample out; @@ -92,18 +92,18 @@ filterFfmpeg(tuple * const outputrow, unsigned int plane; for (plane = 0; plane < depth; ++plane) { - long const above = tuplerowWindow[1][col][plane]; - long const mid = tuplerowWindow[2][col][plane]; - long const below = tuplerowWindow[3][col][plane]; + int const above = tuplerowWindow[1][col][plane]; + int const mid = tuplerowWindow[2][col][plane]; + int const below = tuplerowWindow[3][col][plane]; sample out; if (!adaptive || distant(above, mid, below)) { - long const a = (- (long)tuplerowWindow[0][col][plane] + int const a = (- (int)tuplerowWindow[0][col][plane] + above * 4 + mid * 2 + below * 4 - - (long)tuplerowWindow[4][col][plane]) / 8; + - (int)tuplerowWindow[4][col][plane]) / 8; out = clamp(a, maxval); } else out = mid; @@ -130,18 +130,18 @@ filterFIR(tuple * const outputrow, for (plane = 0; plane < depth; ++plane) { - long const above = tuplerowWindow[1][col][plane]; - long const mid = tuplerowWindow[2][col][plane]; - long const below = tuplerowWindow[3][col][plane]; + int const above = tuplerowWindow[1][col][plane]; + int const mid = tuplerowWindow[2][col][plane]; + int const below = tuplerowWindow[3][col][plane]; sample out; if (!adaptive || distant(above, mid, below)) { - long const a = (- (long)tuplerowWindow[0][col][plane] + int const a = (- (int)tuplerowWindow[0][col][plane] + above * 2 + mid * 6 + below * 2 - - (long)tuplerowWindow[4][col][plane]) / 8; + - (int)tuplerowWindow[4][col][plane]) / 8; out = clamp(a, maxval); } else out = mid; |