summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-24 17:07:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-24 17:09:21 +0200
commitffa1de8a3b93139097214bc600d356ab62bfdf05 (patch)
tree0b65d12ed8552c69f71d306261e9adabe19f7421 /libavcodec
parent05ef6324d11017420a087150f2addbb18cdb9ad3 (diff)
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeg2000dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 11f4cd6ff6..43568ea0eb 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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;
}
}