[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec h261.c, 1.24, 1.25 h263.c, 1.275, 1.276 h263dec.c, 1.166, 1.167 msmpeg4.c, 1.86, 1.87 rv10.c, 1.71, 1.72 wmv2.c, 1.30, 1.31

Michael Niedermayer CVS michael
Mon Apr 25 02:57:50 CEST 2005


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

Modified Files:
	h261.c h263.c h263dec.c msmpeg4.c rv10.c wmv2.c 
Log Message:
avoid unneeded clear_blocks()


Index: h261.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h261.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- h261.c	24 Apr 2005 17:21:10 -0000	1.24
+++ h261.c	25 Apr 2005 00:57:48 -0000	1.25
@@ -531,7 +531,6 @@
         xy = s->mb_x + s->mb_y * s->mb_stride;
         ff_init_block_index(s);
         ff_update_block_index(s);
-        s->dsp.clear_blocks(s->block[0]);
 
         for(j=0;j<6;j++)
             s->block_last_index[j] = -1;
@@ -606,7 +605,6 @@
     xy = s->mb_x + s->mb_y * s->mb_stride;
     ff_init_block_index(s);
     ff_update_block_index(s);
-    s->dsp.clear_blocks(s->block[0]);
 
     // Read mtype
     h->mtype = get_vlc2(&s->gb, h261_mtype_vlc.table, H261_MTYPE_VLC_BITS, 2);
@@ -661,12 +659,16 @@
 intra:
     /* decode each block */
     if(s->mb_intra || HAS_CBP(h->mtype)){
+        s->dsp.clear_blocks(s->block[0]);
         for (i = 0; i < 6; i++) {
             if (h261_decode_block(h, s->block[i], i, cbp&32) < 0){
                 return SLICE_ERROR;
             }
             cbp+=cbp;
         }
+    }else{
+        for (i = 0; i < 6; i++)
+            s->block_last_index[i]= -1;
     }
 
     MPV_decode_mb(s, s->block);

Index: h263.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263.c,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -d -r1.275 -r1.276
--- h263.c	24 Apr 2005 17:21:08 -0000	1.275
+++ h263.c	25 Apr 2005 00:57:48 -0000	1.276
@@ -3753,6 +3753,7 @@
 
     if (!IS_SKIP(mb_type)) {
         int i;
+        s->dsp.clear_blocks(s->block[0]);
         /* decode each block */
         for (i = 0; i < 6; i++) {
             if(mpeg4_decode_block(s, block[i], i, cbp&32, s->mb_intra, s->rvlc) < 0){
@@ -3921,6 +3922,8 @@
             }
         }while(cbpc == 20);
         
+        s->dsp.clear_blocks(s->block[0]);
+        
         dquant = cbpc & 8;
         s->mb_intra = ((cbpc & 4) != 0);
         if (s->mb_intra) goto intra;
@@ -4024,6 +4027,7 @@
 
         s->mb_intra = IS_INTRA(mb_type);
         if(HAS_CBP(mb_type)){
+            s->dsp.clear_blocks(s->block[0]);
             cbpc = get_vlc2(&s->gb, cbpc_b_vlc.table, CBPC_B_VLC_BITS, 1);
             if(s->mb_intra){
                 dquant = IS_QUANT(mb_type);
@@ -4102,6 +4106,8 @@
             }
         }while(cbpc == 8);
 
+        s->dsp.clear_blocks(s->block[0]);
+
         dquant = cbpc & 4;
         s->mb_intra = 1;
 intra:
@@ -4193,6 +4199,7 @@
             }
         }while(cbpc == 20);
         
+        s->dsp.clear_blocks(s->block[0]);
         dquant = cbpc & 8;
         s->mb_intra = ((cbpc & 4) != 0);
         if (s->mb_intra) goto intra;
@@ -4324,7 +4331,10 @@
             }
             mb_type= mb_type_b_map[ mb_type ];
             if(modb2) cbp= 0;
-            else      cbp= get_bits(&s->gb, 6);
+            else{
+                s->dsp.clear_blocks(s->block[0]);
+                cbp= get_bits(&s->gb, 6);
+            }
 
             if ((!IS_DIRECT(mb_type)) && cbp) {
                 if(get_bits1(&s->gb)){
@@ -4442,6 +4452,7 @@
         if(!s->progressive_sequence)
             s->interlaced_dct= get_bits1(&s->gb);
 
+        s->dsp.clear_blocks(s->block[0]);
         /* decode each block */
         for (i = 0; i < 6; i++) {
             if (mpeg4_decode_block(s, block[i], i, cbp&32, 1, 0) < 0)

Index: h263dec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263dec.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- h263dec.c	24 Apr 2005 17:21:08 -0000	1.166
+++ h263dec.c	25 Apr 2005 00:57:48 -0000	1.167
@@ -195,8 +195,7 @@
             }
 
             /* DCT & quantize */
-	    s->dsp.clear_blocks(s->block[0]);
-            
+           
             s->mv_dir = MV_DIR_FORWARD;
             s->mv_type = MV_TYPE_16X16;
 //            s->mb_skipped = 0;

Index: msmpeg4.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/msmpeg4.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- msmpeg4.c	24 Apr 2005 17:21:10 -0000	1.86
+++ msmpeg4.c	25 Apr 2005 00:57:48 -0000	1.87
@@ -1552,6 +1552,7 @@
         }
     }
 
+    s->dsp.clear_blocks(s->block[0]);
     for (i = 0; i < 6; i++) {
         if (msmpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, NULL) < 0)
 	{
@@ -1644,6 +1645,7 @@
         }
     }
 
+    s->dsp.clear_blocks(s->block[0]);
     for (i = 0; i < 6; i++) {
         if (msmpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, NULL) < 0)
 	{

Index: rv10.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/rv10.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- rv10.c	25 Apr 2005 00:10:11 -0000	1.71
+++ rv10.c	25 Apr 2005 00:57:48 -0000	1.72
@@ -669,7 +669,6 @@
         printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y);
 #endif
 
-	s->dsp.clear_blocks(s->block[0]);
         s->mv_dir = MV_DIR_FORWARD;
         s->mv_type = MV_TYPE_16X16; 
         ret=ff_h263_decode_mb(s, s->block);

Index: wmv2.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/wmv2.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- wmv2.c	24 Apr 2005 17:21:09 -0000	1.30
+++ wmv2.c	25 Apr 2005 00:57:48 -0000	1.31
@@ -760,6 +760,7 @@
         wmv2_pred_motion(w, &mx, &my);
         
         if(cbp){
+            s->dsp.clear_blocks(s->block[0]);
             if(s->per_mb_rl_table){
                 s->rl_table_index = decode012(&s->gb);
                 s->rl_chroma_table_index = s->rl_table_index;
@@ -802,6 +803,7 @@
             s->rl_chroma_table_index = s->rl_table_index;
         }
     
+        s->dsp.clear_blocks(s->block[0]);
         for (i = 0; i < 6; i++) {
             if (msmpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, NULL) < 0)
 	    {





More information about the ffmpeg-cvslog mailing list