changeset 2654:ec2b0cba6764 libavcodec

overflow fix
author michael
date Sun, 08 May 2005 09:58:41 +0000
parents 2515af7d3238
children ab7bd4722cef
files mpegvideo.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Sun May 08 00:44:06 2005 +0000
+++ b/mpegvideo.c	Sun May 08 09:58:41 2005 +0000
@@ -5378,7 +5378,7 @@
         for(i=1;i<64;i++){
             int j= s->dsp.idct_permutation[i];
 
-            s->intra_matrix[j] = clip_uint8((ff_mpeg1_default_intra_matrix[i] * s->qscale) >> 3);
+            s->intra_matrix[j] = clip_uint8((ff_mpeg1_default_intra_matrix[i] * s->qscale) >> 3) & 0xFF;
         }
         convert_matrix(&s->dsp, s->q_intra_matrix, s->q_intra_matrix16, 
                        s->intra_matrix, s->intra_quant_bias, 8, 8, 1);