diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-28 22:12:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-28 22:16:14 +0200 |
commit | fe7136ef8202b19fda262ea91adc09b3367d37d7 (patch) | |
tree | a90e7814be95420970639e8204364bf96dc6e637 /libavcodec/jpeg2000dec.c | |
parent | aa0d11ed0bdfc38f800771b1d695469ff691dd96 (diff) | |
download | ffmpeg-fe7136ef8202b19fda262ea91adc09b3367d37d7.tar.gz |
j2k/jpeg2000: split stepsize in float & int variables
This is more clear and less prone to mistakes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index da446f158b..ccb35cc77a 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -930,7 +930,7 @@ static void dequantization_float(int x, int y, Jpeg2000Cblk *cblk, for (j = 0; j < (cblk->coord[1][1] - cblk->coord[1][0]); ++j) for (i = 0; i < (cblk->coord[0][1] - cblk->coord[0][0]); ++i) { idx = (comp->coord[0][1] - comp->coord[0][0]) * j + i; - datap[idx] = (float)(t1->data[j][i]) * ((float)band->stepsize); + datap[idx] = (float)(t1->data[j][i]) * band->f_stepsize; } } @@ -946,7 +946,7 @@ static void dequantization_int(int x, int y, Jpeg2000Cblk *cblk, for (i = 0; i < (cblk->coord[0][1] - cblk->coord[0][0]); ++i) { idx = (comp->coord[0][1] - comp->coord[0][0]) * j + i; datap[idx] = - ((int32_t)(t1->data[j][i]) * ((int32_t)band->stepsize) + (1 << 15)) >> 16; + ((int32_t)(t1->data[j][i]) * band->i_stepsize + (1 << 15)) >> 16; } } |