Mercurial > libavcodec.hg
changeset 2606:2649aeaadc44 libavcodec
minor optimization
author | michael |
---|---|
date | Thu, 14 Apr 2005 20:30:08 +0000 |
parents | 39ef4c5454f0 |
children | fde7b6fe2aaf |
files | snow.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/snow.c Thu Apr 14 18:33:26 2005 +0000 +++ b/snow.c Thu Apr 14 20:30:08 2005 +0000 @@ -1833,17 +1833,16 @@ b->x_coeff[index].x=x; b->x_coeff[index++].coeff= v; }else{ + int max_run; run--; v=0; - if(y && parent){ - int max_run; - - max_run= FFMIN(run, b->x_coeff[prev_index].x - x - 2); + if(y) max_run= FFMIN(run, b->x_coeff[prev_index].x - x - 2); + else max_run= FFMIN(run, w-x-1); + if(parent) max_run= FFMIN(max_run, 2*parent->x_coeff[parent_index].x - x - 1); - x+= max_run; - run-= max_run; - } + x+= max_run; + run-= max_run; } } }