diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-08-27 01:06:58 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-08-27 01:06:58 +0000 |
commit | 3c1adccd1ccd6956563b5db4b7b4234ad0610f72 (patch) | |
tree | 38f561c572dee1aff460bd7f0c592b6450e421e5 /libavcodec/snow.c | |
parent | 07140e398c9403187731eeae5fee0cb2e1fc70dd (diff) | |
download | ffmpeg-3c1adccd1ccd6956563b5db4b7b4234ad0610f72.tar.gz |
50% faster decode_subband()
Originally committed as revision 3418 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r-- | libavcodec/snow.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 4758698813..6309307f42 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -2033,8 +2033,16 @@ static inline void decode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTE //FIXME try to store a more naive run v=1; }else{ + int py= y>>1; run--; v=0; + + if(y && parent && py < b->parent->height){ + while(run && x+2<w && !src[x + 2 + (y-1)*stride] && !parent[((x+1)>>1) + py*2*stride]){ + x++; + run--; + } + } } } if(v){ @@ -2046,7 +2054,7 @@ static inline void decode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTE } } } - if(level+1 == s->spatial_decomposition_count){ + if(w > 200 /*level+1 == s->spatial_decomposition_count*/){ STOP_TIMER("decode_subband") } |