[FFmpeg-cvslog] r24447 - trunk/libavcodec/vp8.c

darkshikari subversion
Fri Jul 23 02:05:44 CEST 2010


Author: darkshikari
Date: Fri Jul 23 02:05:44 2010
New Revision: 24447

Log:
VP8: avoid a memset for non-i4x4 blocks with no coefficients

Modified:
   trunk/libavcodec/vp8.c

Modified: trunk/libavcodec/vp8.c
==============================================================================
--- trunk/libavcodec/vp8.c	Fri Jul 23 01:11:40 2010	(r24446)
+++ trunk/libavcodec/vp8.c	Fri Jul 23 02:05:44 2010	(r24447)
@@ -970,6 +970,9 @@ static void intra_predict(VP8Context *s,
             tr_right = (uint8_t *)&tr;
         }
 
+        if (mb->skip)
+            AV_ZERO128(s->non_zero_count_cache);
+
         for (y = 0; y < 4; y++) {
             uint8_t *topright = ptr + 4 - s->linesize;
             for (x = 0; x < 4; x++) {
@@ -1500,10 +1503,6 @@ static int vp8_decode_frame(AVCodecConte
 
             if (!mb->skip)
                 decode_mb_coeffs(s, c, mb, s->top_nnz[mb_x], s->left_nnz);
-            else {
-                AV_ZERO128(s->non_zero_count_cache);    // luma
-                AV_ZERO64(s->non_zero_count_cache[4]);  // chroma
-            }
 
             if (mb->mode <= MODE_I4x4)
                 intra_predict(s, dst, mb, intra4x4_mb, mb_x, mb_y);



More information about the ffmpeg-cvslog mailing list