[FFmpeg-cvslog] r21062 - trunk/libavcodec/h263.c

michael subversion
Thu Jan 7 16:31:54 CET 2010


Author: michael
Date: Thu Jan  7 16:31:54 2010
New Revision: 21062

Log:
Move restore_ac_coeffs() call into decode_ac_pred(), this makes later behave
more understandable.

Modified:
   trunk/libavcodec/h263.c

Modified: trunk/libavcodec/h263.c
==============================================================================
--- trunk/libavcodec/h263.c	Thu Jan  7 16:24:50 2010	(r21061)
+++ trunk/libavcodec/h263.c	Thu Jan  7 16:31:54 2010	(r21062)
@@ -462,7 +462,12 @@ static inline int decide_ac_pred(MpegEnc
         score += get_block_rate(s, block[n], s->block_last_index[n], st[n]);
     }
 
-    return score < 0;
+    if(score < 0){
+        return 1;
+    }else{
+        restore_ac_coeffs(s, block, dir, st, zigzag_last_index);
+        return 0;
+    }
 }
 
 /**
@@ -1453,8 +1458,6 @@ void mpeg4_encode_mb(MpegEncContext * s,
 
         if(s->flags & CODEC_FLAG_AC_PRED){
             s->ac_pred= decide_ac_pred(s, block, dir, scan_table, zigzag_last_index);
-            if(!s->ac_pred)
-                restore_ac_coeffs(s, block, dir, scan_table, zigzag_last_index);
         }else{
             for(i=0; i<6; i++)
                 scan_table[i]= s->intra_scantable.permutated;



More information about the ffmpeg-cvslog mailing list