mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/jpeg2000dec: Use 32x32->64bit for 5/3 dequantization
This fixes overflows, using fewer bits would impact high bit depth quality Fixes Ticket4654 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5a1f785249
commit
8ff09e9098
@ -1437,7 +1437,7 @@ static void dequantization_int(int x, int y, Jpeg2000Cblk *cblk,
|
||||
int32_t *datap = &comp->i_data[(comp->coord[0][1] - comp->coord[0][0]) * (y + j) + x];
|
||||
int *src = t1->data[j];
|
||||
for (i = 0; i < w; ++i)
|
||||
datap[i] = (src[i] * band->i_stepsize) / 32768;
|
||||
datap[i] = (src[i] * (int64_t)band->i_stepsize) / 32768;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user