changeset 2191:44afbcec70b8 libavcodec

50% faster decode_subband()
author michael
date Fri, 27 Aug 2004 01:06:58 +0000
parents 303e09116fe7
children 77167ed8453f
files snow.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/snow.c	Thu Aug 26 22:46:15 2004 +0000
+++ b/snow.c	Fri Aug 27 01:06:58 2004 +0000
@@ -2033,8 +2033,16 @@
                         //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 @@
                 }
             }
         }
-        if(level+1 == s->spatial_decomposition_count){
+        if(w > 200 /*level+1 == s->spatial_decomposition_count*/){
             STOP_TIMER("decode_subband")
         }