# HG changeset patch # User michael # Date 1093638796 0 # Node ID d29037435955ec2ed0acdd9b97a24bbe5cbdb800 # Parent ea7715935e55d4207307deb812cadfc0a58aeba0 11% faster decode_subband() diff -r ea7715935e55 -r d29037435955 snow.c --- a/snow.c Fri Aug 27 20:15:32 2004 +0000 +++ b/snow.c Fri Aug 27 20:33:16 2004 +0000 @@ -1921,8 +1921,8 @@ int v=0; int lt=0, t=0, rt=0; - if(y){ - rt= src[(y-1)*stride]; + if(y && b->x[prev_index] == 0){ + rt= b->coeff[prev_index]; } for(x=0; xx[prev_index] <= x) //FIXME if + prev_index++; + if(b->x[prev_index] == x + 1) + rt= b->coeff[prev_index]; + else + rt=0; + } if(parent){ - int px= x>>1; - int py= y>>1; - if(pxparent->width && pyparent->height) - p= parent[px + py*2*stride]; - if(x>>1 > b->parent->x[parent_index]){ parent_index++; } + if(x>>1 == b->parent->x[parent_index]){ + p= b->parent->coeff[parent_index]; + } } if(/*ll|*/l|lt|t|rt|p){ int context= av_log2(/*ABS(ll) + */3*ABS(l) + ABS(lt) + 2*ABS(t) + ABS(rt) + ABS(p)); @@ -1958,8 +1960,6 @@ if(y && parent){ int max_run; - while(b->x[prev_index] < x) - prev_index++; max_run= FFMIN(run, b->x[prev_index] - x - 2); max_run= FFMIN(max_run, 2*b->parent->x[parent_index] - x - 1); @@ -1974,8 +1974,8 @@ if(get_cabac(&s->c, &b->state[0][16 + 1 + 3 + quant3b[l&0xFF] + 3*quant3b[t&0xFF]])) v= -v; src[x + y*stride]= v; - b->x[index++]=x; //FIXME interleave x/coeff -// b->coeff[index++]= v; + b->x[index]=x; //FIXME interleave x/coeff + b->coeff[index++]= v; } } b->x[index++]= w+1; //end marker