Commit ffa1de8a authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Use 32x32->64bit for 9/7i dequantization

Like the 5/3 case this is needed to avoid overflows and similarly for 16bpp
output pure 32bit operations are insufficient if high quality is wanted

Note, this code-path is only used in bitexact mode, so this should not
affect the speed of any real use-case
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 05ef6324
......@@ -1457,7 +1457,7 @@ static void dequantization_int_97(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 + (1<<14)) >> 15;
datap[i] = (src[i] * (int64_t)band->i_stepsize + (1<<14)) >> 15;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment