Mercurial > libavcodec.hg
comparison libvpxenc.c @ 12152:d102b12f69dc libavcodec
Do not map video quantizer scale (from 1-51 to 0-63) for libvpx anymore.
Patch by James Zern, jzern google
author | cehoyos |
---|---|
date | Mon, 12 Jul 2010 21:23:03 +0000 |
parents | 3d186eff2224 |
children | 36940062c081 |
comparison
equal
deleted
inserted
replaced
12151:fb37ee915b73 | 12152:d102b12f69dc |
---|---|
235 avctx->rc_min_rate == avctx->bit_rate) | 235 avctx->rc_min_rate == avctx->bit_rate) |
236 enccfg.rc_end_usage = VPX_CBR; | 236 enccfg.rc_end_usage = VPX_CBR; |
237 enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000, | 237 enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000, |
238 AV_ROUND_NEAR_INF); | 238 AV_ROUND_NEAR_INF); |
239 | 239 |
240 //convert [1,51] -> [0,63] | 240 enccfg.rc_min_quantizer = avctx->qmin; |
241 enccfg.rc_min_quantizer = ((avctx->qmin * 5 + 1) >> 2) - 1; | 241 enccfg.rc_max_quantizer = avctx->qmax; |
242 enccfg.rc_max_quantizer = ((avctx->qmax * 5 + 1) >> 2) - 1; | |
243 enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold; | 242 enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold; |
244 | 243 |
245 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO | 244 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO |
246 if (avctx->keyint_min == avctx->gop_size) | 245 if (avctx->keyint_min == avctx->gop_size) |
247 enccfg.kf_min_dist = avctx->keyint_min; | 246 enccfg.kf_min_dist = avctx->keyint_min; |