[FFmpeg-cvslog] snow: fix signed overflow in byte to 32-bit replication

Mans Rullgard git at videolan.org
Sun Nov 27 00:39:16 CET 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Nov 26 20:42:07 2011 +0000| [ff6d9cc558d5cc8a4647e123a714603ed5e82628] | committer: Mans Rullgard

snow: fix signed overflow in byte to 32-bit replication

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff6d9cc558d5cc8a4647e123a714603ed5e82628
---

 libavcodec/snow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index a290358..447289a 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -290,8 +290,8 @@ static void mc_block(Plane *p, uint8_t *dst, const uint8_t *src, int stride, int
 void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride, int sx, int sy, int b_w, int b_h, BlockNode *block, int plane_index, int w, int h){
     if(block->type & BLOCK_INTRA){
         int x, y;
-        const int color = block->color[plane_index];
-        const int color4= color*0x01010101;
+        const unsigned color  = block->color[plane_index];
+        const unsigned color4 = color*0x01010101;
         if(b_w==32){
             for(y=0; y < b_h; y++){
                 *(uint32_t*)&dst[0 + y*stride]= color4;



More information about the ffmpeg-cvslog mailing list