[FFmpeg-cvslog] r21317 - in trunk: configure libavcodec/libx264.c

darkshikari subversion
Tue Jan 19 05:00:08 CET 2010


Author: darkshikari
Date: Tue Jan 19 05:00:08 2010
New Revision: 21317

Log:
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.

Modified:
   trunk/configure
   trunk/libavcodec/libx264.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Tue Jan 19 04:16:48 2010	(r21316)
+++ trunk/configure	Tue Jan 19 05:00:08 2010	(r21317)
@@ -2460,8 +2460,8 @@ enabled libspeex   && require  libspeex 
 enabled libtheora  && require  libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -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 >= 79" ||
-                        die "ERROR: libx264 version must be >= 0.79."; }
+                      { check_cpp_condition x264.h "X264_BUILD >= 83" ||
+                        die "ERROR: libx264 version must be >= 0.83."; }
 enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
 enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
 

Modified: trunk/libavcodec/libx264.c
==============================================================================
--- trunk/libavcodec/libx264.c	Tue Jan 19 04:16:48 2010	(r21316)
+++ trunk/libavcodec/libx264.c	Tue Jan 19 05:00:08 2010	(r21317)
@@ -109,7 +109,7 @@ static int X264_frame(AVCodecContext *ct
     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 *ct
         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(AVCodecCont
     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) {



More information about the ffmpeg-cvslog mailing list