diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-10-27 13:51:16 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-10-18 05:26:29 +0200 |
commit | 66a68ddd1ac376b24db8695058bc8fc28f5bada6 (patch) | |
tree | 0c3c3f0f81f2a7be11f20c8cdb6fc0b5cfb4b77f /libavcodec/ratecontrol.c | |
parent | a75c2eb25a62105c09b48521aef429dc8a231637 (diff) | |
download | ffmpeg-66a68ddd1ac376b24db8695058bc8fc28f5bada6.tar.gz |
lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of mpegvideo encoders
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 3aa3e27602..d89d6e4e82 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -236,9 +236,9 @@ av_cold int ff_rate_control_init(MpegEncContext *s) return -1; } /* init stuff with the user specified complexity */ - if (s->avctx->rc_initial_cplx) { + if (s->rc_initial_cplx) { for (i = 0; i < 60 * 30; i++) { - double bits = s->avctx->rc_initial_cplx * (i / 10000.0 + 1.0) * s->mb_num; + double bits = s->rc_initial_cplx * (i / 10000.0 + 1.0) * s->mb_num; RateControlEntry rce; if (i % ((s->gop_size + 3) / 4) == 0) @@ -516,7 +516,7 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, d = 1.0; else if (d < 0.0001) d = 0.0001; - q *= pow(d, 1.0 / s->avctx->rc_buffer_aggressivity); + q *= pow(d, 1.0 / s->rc_buffer_aggressivity); q_limit = bits2qp(rce, FFMAX((min_rate - buffer_size + rcc->buffer_index) * @@ -536,7 +536,7 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, d = 1.0; else if (d < 0.0001) d = 0.0001; - q /= pow(d, 1.0 / s->avctx->rc_buffer_aggressivity); + q /= pow(d, 1.0 / s->rc_buffer_aggressivity); q_limit = bits2qp(rce, FFMAX(rcc->buffer_index * @@ -552,7 +552,7 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, } av_dlog(s, "q:%f max:%f min:%f size:%f index:%f agr:%f\n", q, max_rate, min_rate, buffer_size, rcc->buffer_index, - s->avctx->rc_buffer_aggressivity); + s->rc_buffer_aggressivity); if (s->rc_qsquish == 0.0 || qmin == qmax) { if (q < qmin) q = qmin; |