Commit 32b895fb authored by michael's avatar michael

infiinit loop fix for CBR + adaptive quant


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7133 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 989564a7
......@@ -2552,6 +2552,11 @@ vbv_retry:
if(put_bits_count(&s->pb) > max_size && s->lambda < s->avctx->lmax){
s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale);
if(s->adaptive_quant){
int i;
for(i=0; i<s->mb_height*s->mb_width; i++)
s->lambda_table[i]= FFMAX(s->lambda_table[i]+1, s->lambda_table[i]*(s->qscale+1) / s->qscale);
}
s->mb_skipped = 0; //done in MPV_frame_start()
if(s->pict_type==P_TYPE){ //done in encode_picture() so we must undo it
if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)
......
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