diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-07-06 20:08:30 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-07-11 00:19:00 +0200 |
commit | 657ccb5ac75ce34e62bd67f228d9bd36db72189e (patch) | |
tree | e490b0d6b4ff93490f70d4f67a0551dd187147e3 /libavcodec/ratecontrol.c | |
parent | 142e76f1055de5dde44696e71a5f63f2cb11dedf (diff) | |
download | ffmpeg-657ccb5ac75ce34e62bd67f228d9bd36db72189e.tar.gz |
Eliminate FF_COMMON_FRAME macro.
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture. Replace by an embedded AVFrame structure in struct Picture.
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 0d7b995476..dc5c063f02 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -44,9 +44,9 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f void ff_write_pass1_stats(MpegEncContext *s){ snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%d var:%d icount:%d skipcount:%d hbits:%d;\n", - s->current_picture_ptr->display_picture_number, s->current_picture_ptr->coded_picture_number, s->pict_type, - s->current_picture.quality, s->i_tex_bits, s->p_tex_bits, s->mv_bits, s->misc_bits, - s->f_code, s->b_code, s->current_picture.mc_mb_var_sum, s->current_picture.mb_var_sum, s->i_count, s->skip_count, s->header_bits); + s->current_picture_ptr->f.display_picture_number, s->current_picture_ptr->f.coded_picture_number, s->pict_type, + s->current_picture.f.quality, s->i_tex_bits, s->p_tex_bits, s->mv_bits, s->misc_bits, + s->f_code, s->b_code, s->current_picture.mc_mb_var_sum, s->current_picture.mb_var_sum, s->i_count, s->skip_count, s->header_bits); } static inline double qp2bits(RateControlEntry *rce, double qp){ @@ -707,10 +707,10 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) //if(dts_pic) // av_log(NULL, AV_LOG_ERROR, "%Ld %Ld %Ld %d\n", s->current_picture_ptr->pts, s->user_specified_pts, dts_pic->pts, picture_number); - if(!dts_pic || dts_pic->pts == AV_NOPTS_VALUE) + if (!dts_pic || dts_pic->f.pts == AV_NOPTS_VALUE) wanted_bits= (uint64_t)(s->bit_rate*(double)picture_number/fps); else - wanted_bits= (uint64_t)(s->bit_rate*(double)dts_pic->pts/fps); + wanted_bits = (uint64_t)(s->bit_rate*(double)dts_pic->f.pts / fps); } diff= s->total_bits - wanted_bits; |