diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-04 16:57:07 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-05 15:50:01 -0400 |
commit | 342bca7f02fc7c0e9c4adf43d0ab1fab31aac85b (patch) | |
tree | d2543ffe8378d5270cd91a1d9d4a087d05a90ea6 /libavcodec/vp9dsp_template.c | |
parent | 1f7871ec428fa0c8247a4d1b7242ddafa2c07205 (diff) | |
download | ffmpeg-342bca7f02fc7c0e9c4adf43d0ab1fab31aac85b.tar.gz |
vp9: fix integer overflow in 10/12bpp DC-only calculation.
Diffstat (limited to 'libavcodec/vp9dsp_template.c')
-rw-r--r-- | libavcodec/vp9dsp_template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp9dsp_template.c b/libavcodec/vp9dsp_template.c index 5a8578a898..9395a0c202 100644 --- a/libavcodec/vp9dsp_template.c +++ b/libavcodec/vp9dsp_template.c @@ -1131,8 +1131,8 @@ static void type_a##_##type_b##_##sz##x##sz##_add_c(uint8_t *_dst, \ \ stride /= sizeof(pixel); \ if (has_dconly && eob == 1) { \ - const int t = (((block[0] * 11585 + (1 << 13)) >> 14) \ - * 11585 + (1 << 13)) >> 14; \ + const int t = ((((dctint) block[0] * 11585 + (1 << 13)) >> 14) \ + * 11585 + (1 << 13)) >> 14; \ block[0] = 0; \ for (i = 0; i < sz; i++) { \ for (j = 0; j < sz; j++) \ |