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/j2kenc.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/j2kenc.c')
-rw-r--r-- | libavcodec/j2kenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index 906ef61449..4b7228c187 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -802,7 +802,7 @@ static void truncpasses(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile) Jpeg2000Cblk *cblk = prec->cblk + cblkno; cblk->ninclpasses = getcut(cblk, s->lambda, - (int64_t)dwt_norms[codsty->transform][bandpos][lev] * (int64_t)band->stepsize >> 16); + (int64_t)dwt_norms[codsty->transform][bandpos][lev] * (int64_t)band->i_stepsize >> 16); } } } @@ -863,7 +863,7 @@ static int encode_tile(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int tileno int *ptr = t1.data[y-yy0]; for (x = xx0; x < xx1; x++){ *ptr = (comp->data[(comp->coord[0][1] - comp->coord[0][0]) * y + x]); - *ptr = (int64_t)*ptr * (int64_t)(16384 * 65536 / band->stepsize) >> 14 - NMSEDEC_FRACBITS; + *ptr = (int64_t)*ptr * (int64_t)(16384 * 65536 / band->i_stepsize) >> 14 - NMSEDEC_FRACBITS; ptr++; } } |