]> git.pld-linux.org Git - packages/ffmpeg.git/blob - ffmpeg-x264.patch
*** empty log message ***
[packages/ffmpeg.git] / ffmpeg-x264.patch
1 --- trunk/libavcodec/x264.c     2006/02/20 19:01:29     5040
2 +++ trunk/libavcodec/x264.c     2006/07/18 01:29:43     5780
3 @@ -142,13 +142,18 @@
4      x4->params.rc.b_stat_write = (avctx->flags & CODEC_FLAG_PASS1);
5      if(avctx->flags & CODEC_FLAG_PASS2) x4->params.rc.b_stat_read = 1;
6      else{
7 -        if(avctx->crf) x4->params.rc.i_rf_constant = avctx->crf;
8 -        else if(avctx->cqp > -1) x4->params.rc.i_qp_constant = avctx->cqp;
9 +        if(avctx->crf){
10 +            x4->params.rc.i_rc_method = X264_RC_CRF;
11 +            x4->params.rc.i_rf_constant = avctx->crf;
12 +        }else if(avctx->cqp > -1){
13 +            x4->params.rc.i_rc_method = X264_RC_CQP;
14 +            x4->params.rc.i_qp_constant = avctx->cqp;
15 +        }
16      }
17  
18      // if neither crf nor cqp modes are selected we have to enable the RC
19      // we do it this way because we cannot check if the bitrate has been set
20 -    if(!(avctx->crf || (avctx->cqp > -1))) x4->params.rc.b_cbr = 1;
21 +    if(!(avctx->crf || (avctx->cqp > -1))) x4->params.rc.i_rc_method = X264_RC_ABR;
22  
23      x4->params.i_bframe = avctx->max_b_frames;
24      x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
This page took 0.0684 seconds and 3 git commands to generate.