From 6661b2130d6c4e6fef9249d3414188f4384b0fc1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 23 Feb 2006 13:05:37 +0000 Subject: dont lowwer qnos of more blocks then needed Originally committed as revision 5055 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavcodec/dv.c') diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 4d79b2c..19be0d4 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -731,6 +731,7 @@ static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos) int i, j, k, a, prev, a2; EncBlockInfo* b; + size[4]= 1<<24; do { b = blks; for (i=0; i<5; i++) { @@ -766,9 +767,9 @@ static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos) size[i] += b->bit_size[a]; } } + if(vs_total_ac_bits >= size[0] + size[1] + size[2] + size[3] + size[4]) + return; } - if(vs_total_ac_bits >= size[0] + size[1] + size[2] + size[3] + size[4]) - return; } while (qnos[0]|qnos[1]|qnos[2]|qnos[3]|qnos[4]); -- cgit v1.1