Mercurial > libavcodec.hg
comparison libvpxenc.c @ 12295:bb7b7602b40e libavcodec
Map rc_buffer_size to and c_initial_buffer_occupancy to their libvpx
counterparts.
Patch by James Zern, jzern at google
author | cehoyos |
---|---|
date | Wed, 28 Jul 2010 08:02:35 +0000 |
parents | 36940062c081 |
children | aa0714243f88 |
comparison
equal
deleted
inserted
replaced
12294:54583a14a995 | 12295:bb7b7602b40e |
---|---|
247 avctx->rc_min_rate * 100 / avctx->bit_rate; | 247 avctx->rc_min_rate * 100 / avctx->bit_rate; |
248 if (avctx->rc_max_rate) | 248 if (avctx->rc_max_rate) |
249 enccfg.rc_2pass_vbr_maxsection_pct = | 249 enccfg.rc_2pass_vbr_maxsection_pct = |
250 avctx->rc_max_rate * 100 / avctx->bit_rate; | 250 avctx->rc_max_rate * 100 / avctx->bit_rate; |
251 | 251 |
252 if (avctx->rc_buffer_size) | |
253 enccfg.rc_buf_sz = | |
254 avctx->rc_buffer_size * 1000 / avctx->bit_rate; | |
255 if (avctx->rc_initial_buffer_occupancy) | |
256 enccfg.rc_buf_initial_sz = | |
257 avctx->rc_initial_buffer_occupancy * 1000 / avctx->bit_rate; | |
258 enccfg.rc_buf_optimal_sz = enccfg.rc_buf_sz * 5 / 6; | |
259 | |
252 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO | 260 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO |
253 if (avctx->keyint_min == avctx->gop_size) | 261 if (avctx->keyint_min == avctx->gop_size) |
254 enccfg.kf_min_dist = avctx->keyint_min; | 262 enccfg.kf_min_dist = avctx->keyint_min; |
255 enccfg.kf_max_dist = avctx->gop_size; | 263 enccfg.kf_max_dist = avctx->gop_size; |
256 | 264 |