diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-02-26 15:24:42 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-02-26 15:24:42 +0000 |
commit | d676478c8d29a48f67526afef44c323b74946488 (patch) | |
tree | 3b4456ab35268a6129cde6a8ea7ae85e0ac373dd /libavcodec | |
parent | c16601bb8eacd26e1cc5b32ed751efce266ab335 (diff) | |
download | ffmpeg-streaming-d676478c8d29a48f67526afef44c323b74946488.zip ffmpeg-streaming-d676478c8d29a48f67526afef44c323b74946488.tar.gz |
replace for loop with 2 asserts()
Originally committed as revision 5066 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 9f2cdd8..2d5aa6c 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -746,6 +746,7 @@ static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos) b->bit_size[a] = 1; // 4 areas 4 bits for EOB :) b->area_q[a]++; prev= b->prev[a]; + assert(b->next[prev] >= mb_area_start[a+1] || b->mb[prev]); for (k= b->next[prev] ; k<mb_area_start[a+1]; k= b->next[k]) { b->mb[k] >>= 1; if (b->mb[k]) { @@ -759,8 +760,8 @@ static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos) assert(b->mb[b->next[k]]); b->bit_size[a2] += dv_rl2vlc_size(b->next[k] - prev - 1, b->mb[b->next[k]]) -dv_rl2vlc_size(b->next[k] - k - 1, b->mb[b->next[k]]); - for(; (b->prev[a2]==k) && (a2<4); a2++) - b->prev[a2] = prev; + assert(b->prev[a2]==k && (a2+1 >= 4 || b->prev[a2+1]!=k)); + b->prev[a2] = prev; } b->next[prev] = b->next[k]; } |