Commit 99cd59e5 authored by Michael Niedermayer's avatar Michael Niedermayer

minor optimization

Originally committed as revision 4128 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 3c096ac7
...@@ -1833,17 +1833,16 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i ...@@ -1833,17 +1833,16 @@ static inline void unpack_coeffs(SnowContext *s, SubBand *b, SubBand * parent, i
b->x_coeff[index].x=x; b->x_coeff[index].x=x;
b->x_coeff[index++].coeff= v; b->x_coeff[index++].coeff= v;
}else{ }else{
int max_run;
run--; run--;
v=0; v=0;
if(y && parent){ if(y) max_run= FFMIN(run, b->x_coeff[prev_index].x - x - 2);
int max_run; else max_run= FFMIN(run, w-x-1);
if(parent)
max_run= FFMIN(run, b->x_coeff[prev_index].x - x - 2);
max_run= FFMIN(max_run, 2*parent->x_coeff[parent_index].x - x - 1); max_run= FFMIN(max_run, 2*parent->x_coeff[parent_index].x - x - 1);
x+= max_run; x+= max_run;
run-= max_run; run-= max_run;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment