diff options
author | Mans Rullgard <mans@mansr.com> | 2011-10-09 23:32:58 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-10-10 02:03:46 +0400 |
commit | 05795f35be4b479bfa8d60ed3eb13e0f89e439c0 (patch) | |
tree | e4cae5ae5008439b70081da3252cf436d17a0497 /libavcodec/mpegvideo_enc.c | |
parent | 8b19ae07616bbd18969b94cbf5d74308a8f2bbdf (diff) |
mpegvideo_enc: fix a signed overflow
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index cad267b663..706a93b734 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2023,7 +2023,7 @@ static int mb_var_thread(AVCodecContext *c, void *arg){ int varc; int sum = s->dsp.pix_sum(pix, s->linesize); - varc = (s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)(sum*sum))>>8) + 500 + 128)>>8; + varc = (s->dsp.pix_norm1(pix, s->linesize) - (((unsigned)sum*sum)>>8) + 500 + 128)>>8; s->current_picture.mb_var [s->mb_stride * mb_y + mb_x] = varc; s->current_picture.mb_mean[s->mb_stride * mb_y + mb_x] = (sum+128)>>8; |