[SCM] libav/experimental: sync to x264 r537

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:49:14 UTC 2013


The following commit has been merged in the experimental branch:
commit 8b75e45d8c1a84b39f19877c9248a20f23a78d98
Author: Loren Merritt <lorenm at u.washington.edu>
Date:   Tue Jul 18 01:29:43 2006 +0000

    sync to x264 r537
    
    Originally committed as revision 5780 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/x264.c b/libavcodec/x264.c
index ddd29e7..9be6a3e 100644
--- a/libavcodec/x264.c
+++ b/libavcodec/x264.c
@@ -142,13 +142,18 @@ X264_init(AVCodecContext *avctx)
     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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list