[FFmpeg-cvslog] r25567 - trunk/libavcodec/libx264.c

Ramiro Polla ramiro.polla
Tue Oct 26 16:24:33 CEST 2010


On Tue, Oct 26, 2010 at 12:16 PM, Reinhard Tartler <siretart at tauware.de> wrote:
> On Mo, Okt 25, 2010 at 16:40:01 (CEST), cehoyos wrote:
>
>> Author: cehoyos
>> Date: Mon Oct 25 16:40:00 2010
>> New Revision: 25567
>>
>> Log:
>> Make libx264 take the pict_type input parameter into account,
>> thus making forced key frames work.
>>
>> Patch by Nicolas George, nicolas d george a normalesup d org
>>
>> Modified:
>> ? ?trunk/libavcodec/libx264.c
>>
>> Modified: trunk/libavcodec/libx264.c
>> ==============================================================================
>> --- trunk/libavcodec/libx264.c ? ? ? ?Mon Oct 25 08:15:21 2010 ? ? ? ?(r25566)
>> +++ trunk/libavcodec/libx264.c ? ? ? ?Mon Oct 25 16:40:00 2010 ? ? ? ?(r25567)
>> @@ -100,7 +100,11 @@ static int X264_frame(AVCodecContext *ct
>> ? ? ? ? ?}
>>
>> ? ? ? ? ?x4->pic.i_pts ?= frame->pts;
>> - ? ? ? ?x4->pic.i_type = X264_TYPE_AUTO;
>> + ? ? ? ?x4->pic.i_type =
>> + ? ? ? ? ? ?frame->pict_type == FF_I_TYPE ? X264_TYPE_KEYFRAME :
>> + ? ? ? ? ? ?frame->pict_type == FF_P_TYPE ? X264_TYPE_P :
>> + ? ? ? ? ? ?frame->pict_type == FF_B_TYPE ? X264_TYPE_B :
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?X264_TYPE_AUTO;
>> ? ? ?}
>>
>> ? ? ?do {
>
> This breaks compilation with older x264:
>
> libx264.c: In function 'encode_nals':
> libx264.c:54:63: warning: unused parameter 'size'
> libx264.c: In function 'X264_frame':
> libx264.c:104:45: error: 'X264_TYPE_KEYFRAME' undeclared (first use in this function)
> libx264.c:104:45: note: each undeclared identifier is reported only once for each function it appears in
> make[3]: *** [libx264.o] Error 1
>
> X264_TYPE_KEYFRAME was introduced in this x264 commit:
>
> commit 40c8c4926a78a705c263e042a780d63ca24687f4
> Author: Lamont Alston <wewk584 at gmail.com>
> Date: ? Wed Jun 16 10:05:17 2010 -0700
>
> ? ?Open-GOP support
> ? ?Allows B-frames immediately prior to keyframes (in display order).
> ? ?This helps reduce keyframe popping and improve compression with short keyframe intervals.
> ? ?Due to a staggering display of braindamage in the Blu-ray spec, two open-GOP modes are available.
> ? ?The two modes calculate keyframe interval differently: one based on coded distance and one based on display distance.
> ? ?The latter is superior compression-wise, but for no comprehensible reason, Blu-ray requires the former if open-GOP is used.
>
> (this commit has bumped X264_BUILD from 98 -> 99)
>
> Nicolas, can you add some #ifdefs so that libx264.c can also be compiled
> with an older x264?

Why not bump the libx264 requirement in configure?



More information about the ffmpeg-cvslog mailing list