Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2428:548c87c06dbb libavcodec
assertion about bits statistic and minor bits stat fix
author | michael |
---|---|
date | Fri, 14 Jan 2005 23:48:12 +0000 |
parents | d1b1a6258930 |
children | ba01b8552bd4 |
comparison
equal
deleted
inserted
replaced
2427:d1b1a6258930 | 2428:548c87c06dbb |
---|---|
2310 | 2310 |
2311 for(i=0; i<4; i++){ | 2311 for(i=0; i<4; i++){ |
2312 avctx->error[i] += s->current_picture_ptr->error[i]; | 2312 avctx->error[i] += s->current_picture_ptr->error[i]; |
2313 } | 2313 } |
2314 | 2314 |
2315 if(s->flags&CODEC_FLAG_PASS1) | |
2316 assert(avctx->header_bits + avctx->mv_bits + avctx->misc_bits + avctx->i_tex_bits + avctx->p_tex_bits == put_bits_count(&s->pb)); | |
2315 flush_put_bits(&s->pb); | 2317 flush_put_bits(&s->pb); |
2316 s->frame_bits = put_bits_count(&s->pb); | 2318 s->frame_bits = put_bits_count(&s->pb); |
2317 | 2319 |
2318 stuffing_count= ff_vbv_update(s, s->frame_bits); | 2320 stuffing_count= ff_vbv_update(s, s->frame_bits); |
2319 if(stuffing_count){ | 2321 if(stuffing_count){ |
4554 ff_mjpeg_stuffing(&s->pb); | 4556 ff_mjpeg_stuffing(&s->pb); |
4555 } | 4557 } |
4556 | 4558 |
4557 align_put_bits(&s->pb); | 4559 align_put_bits(&s->pb); |
4558 flush_put_bits(&s->pb); | 4560 flush_put_bits(&s->pb); |
4561 | |
4562 if((s->flags&CODEC_FLAG_PASS1) && !s->partitioned_frame) | |
4563 s->misc_bits+= get_bits_diff(s); | |
4559 } | 4564 } |
4560 | 4565 |
4561 static int encode_thread(AVCodecContext *c, void *arg){ | 4566 static int encode_thread(AVCodecContext *c, void *arg){ |
4562 MpegEncContext *s= arg; | 4567 MpegEncContext *s= arg; |
4563 int mb_x, mb_y, pdif = 0; | 4568 int mb_x, mb_y, pdif = 0; |