summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-10-26 23:01:04 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-10-26 23:01:04 +0000
commit19721b23e3b6d91f01e032fbfdb3f6440043144b (patch)
treefb47ed7e815dc85184be25fb1562ba83053da695 /libavcodec/ffv1.c
parentc42c1007c7b65c0b188467e2d349e3af543eb4c2 (diff)
Optimize state initialization in ffv1 clear_state().
Originally committed as revision 25580 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 4e2dceb026..b00e15fc51 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;
- }
+ }
}
}
}