summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2010-05-06 22:38:18 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2010-05-06 22:38:18 +0000
commite8c7fca90c7474e2352efcbf4d71e19a85abc238 (patch)
tree4a5b1675f07340eb0f4d71a0353f86b5ee16e152 /libavcodec/libx264.c
parent46174079c9c1e83048b278b3790cccddcacb2325 (diff)
Add intra refresh and crf-max support to the libavcodec libx264 wrapper.
Minor version bump. Originally committed as revision 23038 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index df7b2e806b..ec6d5ea433 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -156,6 +156,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.p_log_private = avctx;
x4->params.i_keyint_max = avctx->gop_size;
+ x4->params.b_intra_refresh = avctx->flags2 & CODEC_FLAG2_INTRA_REFRESH;
x4->params.rc.i_bitrate = avctx->bit_rate / 1000;
x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000;
@@ -166,6 +167,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
if (avctx->crf) {
x4->params.rc.i_rc_method = X264_RC_CRF;
x4->params.rc.f_rf_constant = avctx->crf;
+ x4->params.rc.f_rf_constant_max = avctx->crf_max;
} else if (avctx->cqp > -1) {
x4->params.rc.i_rc_method = X264_RC_CQP;
x4->params.rc.i_qp_constant = avctx->cqp;