aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2010-01-19 04:00:08 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2010-01-19 04:00:08 +0000
commit76d81909ae65f5a771e3a58d6a5d6bb58bfed995 (patch)
treec865b80ee8f22bd1141e3644b495a5416feb3211 /libavcodec/libx264.c
parent51d83986b18a0f1ed736536c5ef60fa34bf1fd65 (diff)
downloadffmpeg-76d81909ae65f5a771e3a58d6a5d6bb58bfed995.tar.gz
Update libx264.c to use new libx264 features
With b_keyframe instead of IDR for detecting keyframes, ffmpeg should now support periodic encoding with periodic intra refresh (although there is no interface option for it yet). Set the new timebase values for full VFR input support. Bump configure to check for API version 83. Originally committed as revision 21317 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 1fec3eded1..9a4c9f4006 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -109,7 +109,7 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
if (bufsize < 0)
return -1;
- /* FIXME: dts */
+ /* FIXME: libx264 now provides DTS, but AVFrame doesn't have a field for it. */
x4->out_pic.pts = pic_out.i_pts;
switch (pic_out.i_type) {
@@ -126,7 +126,7 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
break;
}
- x4->out_pic.key_frame = pic_out.i_type == X264_TYPE_IDR;
+ x4->out_pic.key_frame = pic_out.b_keyframe;
x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
return bufsize;
@@ -208,8 +208,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.i_height = avctx->height;
x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num;
x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den;
- x4->params.i_fps_num = avctx->time_base.den;
- x4->params.i_fps_den = avctx->time_base.num;
+ x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den;
+ x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num;
x4->params.analyse.inter = 0;
if (avctx->partitions) {