[FFmpeg-devel] [RFC] Weighted P-frame prediction in libx264...

Jason Garrett-Glaser darkshikari
Mon Nov 9 20:15:21 CET 2009

On Mon, Nov 9, 2009 at 6:11 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Nov 09, 2009 at 03:36:01AM -0800, Jason Garrett-Glaser wrote:
>> With weighted P-frame prediction now in x264 and on by default (and
>> not exposed in ffmpeg), it is impossible to encode Baseline Profile
>> H.264 with ffmpeg. ?This is somewhat of a problem.
>> Furthermore, the flag for weightb is CODEC_FLAG2_WPRED, which doesn't
>> contain a "B", and thus doesn't really distinguish between weightp or
>> weightb.
>> Should we change it to CODEC_FLAG2_WPREDB and add CODEC_FLAG2_WPREDP,
>> renaming the commandline options as well, or what?
> as x264 is our only h264 encoder, i guess ill leave it to you how you
> want to handle the h264 encoding options.
> just keep in mind
> * maintaining API/ABI compatibility is preferred
> * keeping options generic so other encoders could use them is also
> ?prefered
> also is a flag for each enough?
> i would suspect that a off/guess/full RD would at least be possible
> so 2 int variables might be more flexible and future proof

I agree; weightp *already* has three modes (off, blind, smart), and
will soon get a fourth (k-means), so it makes more sense to make it an

Weightb doesn't need that since it's binary off/on with no analysis involved.

Dark Shikari

More information about the ffmpeg-devel mailing list