[SCM] libav/experimental: Optimize state initialization in ffv1 clear_state().

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:18:10 UTC 2013


The following commit has been merged in the experimental branch:
commit 19721b23e3b6d91f01e032fbfdb3f6440043144b
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue Oct 26 23:01:04 2010 +0000

    Optimize state initialization in ffv1 clear_state().
    
    Originally committed as revision 25580 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 4e2dceb..b00e15f 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -964,15 +964,15 @@ static void clear_state(FFV1Context *f){
             p->interlace_bit_state[0]= 128;
             p->interlace_bit_state[1]= 128;
 
+            if(fs->ac){
+                memset(p->state, 128, CONTEXT_SIZE*p->context_count);
+            }else{
             for(j=0; j<p->context_count; j++){
-                if(fs->ac){
-                    memset(p->state[j], 128, sizeof(uint8_t)*CONTEXT_SIZE);
-                }else{
                     p->vlc_state[j].drift= 0;
                     p->vlc_state[j].error_sum= 4; //FFMAX((RANGE + 32)/64, 2);
                     p->vlc_state[j].bias= 0;
                     p->vlc_state[j].count= 1;
-                }
+            }
             }
         }
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list