summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2009-10-19 09:35:19 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2009-10-19 09:35:19 +0000
commit1953898162849b95b18622f5804b615dc3c55bb9 (patch)
treeb08badfa115a6172e03d5fa8feb82772a7d0f86c
parentf2c061ec0fae5daeb5909ec7b0d0c2e1dd382e7c (diff)
Update libx264.c for x264 API change
Change behavior of b-pyramid option. Originally committed as revision 20308 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure4
-rw-r--r--libavcodec/libx264.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/configure b/configure
index 3d49398f9f..1e416c4c1a 100755
--- a/configure
+++ b/configure
@@ -2301,8 +2301,8 @@ enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm &&
- { check_cpp_condition x264.h "X264_BUILD >= 76" ||
- die "ERROR: libx264 version must be >= 0.76."; }
+ { check_cpp_condition x264.h "X264_BUILD >= 78" ||
+ die "ERROR: libx264 version must be >= 0.78."; }
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 5039b6db3f..3a3f1e5176 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -181,7 +181,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
x4->params.i_bframe_bias = avctx->bframebias;
- x4->params.b_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID;
+ x4->params.i_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? X264_B_PYRAMID_NORMAL : X264_B_PYRAMID_NONE;
avctx->has_b_frames = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? 2 : !!avctx->max_b_frames;
x4->params.i_keyint_min = avctx->keyint_min;