diff libx264.c @ 10936:b2ea6b0d17bf libavcodec

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.
author darkshikari
date Tue, 19 Jan 2010 04:00:08 +0000
parents 80161fd66fd1
children 9beb570426f4
line wrap: on
line diff
--- a/libx264.c	Tue Jan 19 03:16:48 2010 +0000
+++ b/libx264.c	Tue Jan 19 04:00:08 2010 +0000
@@ -109,7 +109,7 @@
     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 @@
         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 @@
     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) {