Mercurial > libavcodec.hg
comparison libvpxenc.c @ 11851:3e97c4c25ec3 libavcodec
libvpx: Don't use the VPX_KF_FIXED mode
This mode emits no keyframes at all, despite its name.
Patch by James Zern, jzern at google dot com
author | mstorsjo |
---|---|
date | Tue, 08 Jun 2010 08:47:50 +0000 |
parents | 44a08df9971c |
children | 24a6c651c3f3 |
comparison
equal
deleted
inserted
replaced
11850:954d05e65641 | 11851:3e97c4c25ec3 |
---|---|
239 | 239 |
240 //convert [1,51] -> [0,63] | 240 //convert [1,51] -> [0,63] |
241 enccfg.rc_min_quantizer = ((avctx->qmin * 5 + 1) >> 2) - 1; | 241 enccfg.rc_min_quantizer = ((avctx->qmin * 5 + 1) >> 2) - 1; |
242 enccfg.rc_max_quantizer = ((avctx->qmax * 5 + 1) >> 2) - 1; | 242 enccfg.rc_max_quantizer = ((avctx->qmax * 5 + 1) >> 2) - 1; |
243 | 243 |
244 //_enc_init() will balk if kf_min_dist differs from max w/VPX_KF_AUTO | |
244 if (avctx->keyint_min == avctx->gop_size) | 245 if (avctx->keyint_min == avctx->gop_size) |
245 enccfg.kf_mode = VPX_KF_FIXED; | |
246 //_enc_init() will balk if kf_min_dist is set in this case | |
247 if (enccfg.kf_mode != VPX_KF_AUTO) | |
248 enccfg.kf_min_dist = avctx->keyint_min; | 246 enccfg.kf_min_dist = avctx->keyint_min; |
249 enccfg.kf_max_dist = avctx->gop_size; | 247 enccfg.kf_max_dist = avctx->gop_size; |
250 | 248 |
251 if (enccfg.g_pass == VPX_RC_FIRST_PASS) | 249 if (enccfg.g_pass == VPX_RC_FIRST_PASS) |
252 enccfg.g_lag_in_frames = 0; | 250 enccfg.g_lag_in_frames = 0; |