[FFmpeg-cvslog] mpegvideo_enc: fix a signed overflow
Mans Rullgard
git at videolan.org
Fri Nov 4 13:22:18 CET 2011
ffmpeg | branch: release/0.8 | Mans Rullgard <mans at mansr.com> | Sun Oct 9 20:32:58 2011 +0100| [c41950099da00e1abd084a09de96793b3d863a97] | committer: Michael Niedermayer
mpegvideo_enc: fix a signed overflow
Signed-off-by: Mans Rullgard <mans at mansr.com>
(cherry picked from commit 05795f35be4b479bfa8d60ed3eb13e0f89e439c0)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c41950099da00e1abd084a09de96793b3d863a97
---
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 3c92aa9..b9e141d 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2007,7 +2007,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;
More information about the ffmpeg-cvslog
mailing list