comparison libvpxenc.c @ 12226:36940062c081 libavcodec

Map settings for 2-pass libvpx encoding. Patch by James Zern, jzern at google
author cehoyos
date Thu, 22 Jul 2010 12:35:32 +0000
parents d102b12f69dc
children bb7b7602b40e
comparison
equal deleted inserted replaced
12225:c3e11b3108d7 12226:36940062c081
239 239
240 enccfg.rc_min_quantizer = avctx->qmin; 240 enccfg.rc_min_quantizer = avctx->qmin;
241 enccfg.rc_max_quantizer = avctx->qmax; 241 enccfg.rc_max_quantizer = avctx->qmax;
242 enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold; 242 enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold;
243 243
244 //0-100 (0 => CBR, 100 => VBR)
245 enccfg.rc_2pass_vbr_bias_pct = round(avctx->qcompress * 100);
246 enccfg.rc_2pass_vbr_minsection_pct =
247 avctx->rc_min_rate * 100 / avctx->bit_rate;
248 if (avctx->rc_max_rate)
249 enccfg.rc_2pass_vbr_maxsection_pct =
250 avctx->rc_max_rate * 100 / avctx->bit_rate;
251
244 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO 252 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO
245 if (avctx->keyint_min == avctx->gop_size) 253 if (avctx->keyint_min == avctx->gop_size)
246 enccfg.kf_min_dist = avctx->keyint_min; 254 enccfg.kf_min_dist = avctx->keyint_min;
247 enccfg.kf_max_dist = avctx->gop_size; 255 enccfg.kf_max_dist = avctx->gop_size;
248 256