[FFmpeg-devel] [PATCH/RFC] Update libx264.c to use new libx264 features (b_keyframe, DTS support)

Jason Garrett-Glaser darkshikari
Fri Jan 15 00:14:19 CET 2010

This patch updates libx264.c to support a few new features:

1) Keyframes are now signalled by x264_picture_t->b_keyframe.  This
allows x264 to have non-IDR keyframes, such as in the new Periodic
Intra Refresh feature (see http://x264dev.multimedia.cx/?p=249).

2) DTS are now set correctly using x264's native VFR handling system.

3) Timebase is now set using x264's native VFR handling system.

Potential issues:

1) FPS is the same as timebase.  Is this necessarily correct?
Ideally, for ratecontrol purposes (x264 doesn't have VFR ratecontrol
yet, but it's getting it soon), the FPS should be the average input
fps, but that's probably not always possible.  Is there any value we
should use instead of timebase?

2) x264's DTS values start at a negative value in the case of
B-frames; x264 leaves it up to the muxer whether to pass through the
negative values, fix them with an initial delay, fix them with DTS
compression, or use an EDTS element or similar.  Will this work in
ffmpeg, or will libx264.c have to munge the dts values somehow?

Dark Shikari
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libx264_83.diff
Type: application/octet-stream
Size: 2121 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100114/3044be88/attachment.obj>

More information about the ffmpeg-devel mailing list