comparison mpegvideo.c @ 4111:bfc1532904eb libavcodec

fix 1/0 b frames + CBR bug
author michael
date Tue, 31 Oct 2006 22:22:11 +0000
parents de30c06dc299
children 8fe20344c9b5
comparison
equal deleted inserted replaced
4110:e7e72aad32e4 4111:bfc1532904eb
2539 s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale); 2539 s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale);
2540 s->mb_skipped = 0; //done in MPV_frame_start() 2540 s->mb_skipped = 0; //done in MPV_frame_start()
2541 if(s->pict_type==P_TYPE){ //done in encode_picture() so we must undo it 2541 if(s->pict_type==P_TYPE){ //done in encode_picture() so we must undo it
2542 if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4) 2542 if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)
2543 s->no_rounding ^= 1; 2543 s->no_rounding ^= 1;
2544 }
2545 if(s->pict_type!=B_TYPE){
2546 s->time_base= s->last_time_base;
2547 s->last_non_b_time= s->time - s->pp_time;
2544 } 2548 }
2545 // av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda); 2549 // av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda);
2546 for(i=0; i<avctx->thread_count; i++){ 2550 for(i=0; i<avctx->thread_count; i++){
2547 PutBitContext *pb= &s->thread_context[i]->pb; 2551 PutBitContext *pb= &s->thread_context[i]->pb;
2548 init_put_bits(pb, pb->buf, pb->buf_end - pb->buf); 2552 init_put_bits(pb, pb->buf, pb->buf_end - pb->buf);