Commit 953c7550 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/snowenc: convert speed relevant asserts to av_assert2()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7b79c84b
...@@ -62,10 +62,10 @@ static void find_sse(SnowContext *s, Plane *p, int *score, int score_stride, IDW ...@@ -62,10 +62,10 @@ static void find_sse(SnowContext *s, Plane *p, int *score, int score_stride, IDW
int sx= (x-xo + step/2) / step / Q2_STEP; int sx= (x-xo + step/2) / step / Q2_STEP;
int sy= (y-yo + step/2) / step / Q2_STEP; int sy= (y-yo + step/2) / step / Q2_STEP;
int v= r0[x + y*p->width] - r1[x + y*p->width]; int v= r0[x + y*p->width] - r1[x + y*p->width];
assert(sx>=0 && sy>=0 && sx < score_stride); av_assert2(sx>=0 && sy>=0 && sx < score_stride);
v= ((v+8)>>4)<<4; v= ((v+8)>>4)<<4;
score[sx + sy*score_stride] += v*v; score[sx + sy*score_stride] += v*v;
assert(score[sx + sy*score_stride] >= 0); av_assert2(score[sx + sy*score_stride] >= 0);
} }
} }
} }
...@@ -963,10 +963,10 @@ static int encode_subband_c0run(SnowContext *s, SubBand *b, const IDWTELEM *src, ...@@ -963,10 +963,10 @@ static int encode_subband_c0run(SnowContext *s, SubBand *b, const IDWTELEM *src,
if(run_index <= max_index) if(run_index <= max_index)
put_symbol2(&s->c, b->state[1], run, 3); put_symbol2(&s->c, b->state[1], run, 3);
assert(v); av_assert2(v);
}else{ }else{
run--; run--;
assert(!v); av_assert2(!v);
} }
} }
if(v){ if(v){
......
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