[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mpeg12.c,1.232,1.233

Michael Niedermayer CVS michael
Thu Apr 21 23:23:26 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv31162

Modified Files:
	mpeg12.c 
Log Message:
avoid clearing block[] if its not used at all


Index: mpeg12.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -d -r1.232 -r1.233
--- mpeg12.c	20 Apr 2005 20:31:04 -0000	1.232
+++ mpeg12.c	21 Apr 2005 21:23:22 -0000	1.233
@@ -1140,6 +1140,12 @@
     dprintf("mb_type=%x\n", mb_type);
 //    motion_type = 0; /* avoid warning */
     if (IS_INTRA(mb_type)) {
+        s->dsp.clear_blocks(s->block[0]);
+    
+        if(!s->chroma_y_shift){
+            s->dsp.clear_blocks(s->block[6]);
+        }
+    
         /* compute dct type */
         if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var?
             !s->frame_pred_frame_dct) {
@@ -1357,8 +1363,13 @@
         }
         
         s->mb_intra = 0;
-
         if (HAS_CBP(mb_type)) {
+            s->dsp.clear_blocks(s->block[0]);
+        
+            if(!s->chroma_y_shift){
+                s->dsp.clear_blocks(s->block[6]);
+            }
+
             cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1);
             if (cbp < 0 || ((cbp == 0) && (s->chroma_format < 2)) ){
                 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y);
@@ -2578,10 +2589,6 @@
             XVMC_init_block(s);//set s->block
 #endif
 
-	s->dsp.clear_blocks(s->block[0]);
-        if(!s->chroma_y_shift){
-            s->dsp.clear_blocks(s->block[6]);
-        }
         ret = mpeg_decode_mb(s, s->block);
         s->chroma_qscale= s->qscale;
 





More information about the ffmpeg-cvslog mailing list