Mercurial > libavcodec.hg
changeset 3493:7dc6dcbc6960 libavcodec
sync to x264 r537
author | lorenm |
---|---|
date | Tue, 18 Jul 2006 01:29:43 +0000 |
parents | fa3794c46f21 |
children | 05bb54c1d979 |
files | x264.c |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/x264.c Mon Jul 17 13:09:45 2006 +0000 +++ b/x264.c Tue Jul 18 01:29:43 2006 +0000 @@ -142,13 +142,18 @@ x4->params.rc.b_stat_write = (avctx->flags & CODEC_FLAG_PASS1); if(avctx->flags & CODEC_FLAG_PASS2) x4->params.rc.b_stat_read = 1; else{ - if(avctx->crf) x4->params.rc.i_rf_constant = avctx->crf; - else if(avctx->cqp > -1) x4->params.rc.i_qp_constant = avctx->cqp; + if(avctx->crf){ + x4->params.rc.i_rc_method = X264_RC_CRF; + x4->params.rc.i_rf_constant = avctx->crf; + }else if(avctx->cqp > -1){ + x4->params.rc.i_rc_method = X264_RC_CQP; + x4->params.rc.i_qp_constant = avctx->cqp; + } } // if neither crf nor cqp modes are selected we have to enable the RC // we do it this way because we cannot check if the bitrate has been set - if(!(avctx->crf || (avctx->cqp > -1))) x4->params.rc.b_cbr = 1; + if(!(avctx->crf || (avctx->cqp > -1))) x4->params.rc.i_rc_method = X264_RC_ABR; x4->params.i_bframe = avctx->max_b_frames; x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;