[FFmpeg-devel] [RFC] Fixing libx264.c

Michael Niedermayer michaelni
Fri May 22 05:54:56 CEST 2009

On Thu, May 21, 2009 at 08:02:32PM -0700, Jason Garrett-Glaser wrote:
> > AVCodecContext.scenechange_threshold == 0 means default, not disabled
> > disabled would be INT_MAX
> > Its a simple bug in libx264.c of not translating from lavc API to x264 API
> So if(!scenecut threshold) {leave it as x264's default} ?

yes, though the else case possibly shouldnt be = either, i would need to check
x264s source to see what it does (maybe tomorrow, i need some sleep ATM)

> >> 4. ?ffmpeg turns off chroma ME.
> >> Why it's broken currently: It's forced off below subme=5 anyways, and
> >> above it's practically always useful.
> >> Solution: Disconnect the option.
> >>
> >> 5. ?ffmpeg turns off fast pskip.
> >> Why it's broken currently: This should practically always be on; it
> >> costs a lot of speed to leave it off (for no real benefit).
> >> Solution: Disconnect the option, or if only x264 uses the option, set
> >> it on by default.
> >
> >> 8. ?ffmpeg turns off adaptive b-frame placement by default.
> >> Why it's broken: Non-adaptive B-frame placement seriously sucks. ?But
> >> this option is actually useful (0-off, 1-fast, 2-optimal), so I don't
> >> want to disconnect it.
> >> Solution: This is very important, but I can't come up with one.
> >>
> >> 9. ?Partitions are all off by default.
> >> Why it's broken: Turning off all partitions cripples compression.
> >> Partitions are actually useful to tweak, but the defaults should be
> >> "all on except p4x4," not all off.
> >> Solution: Adjust options.c to force the defaults correctly, since only
> >> x264 uses the partition options.
> >>
> >> 10. ?Loop filter is off by default.
> >> Why it's broken: Nobody should be turning it off except maybe to
> >> encode for some really slow CPU or something. ?Critical for
> >> compression quality, costs nearly no speed.
> >> Solution: Turn it on by default? ?Might affect other codecs. ?Or
> >> disconnect the option.
> >
> > The defaults in ffmpeg are generally all stuff disabled, changing that
> > requires per codec defaults as otherwise codecs would per default receive
> > settings they dont support (like a loop filter for mpeg1)
> But what about options that don't affect anything other than x264,
> e.g. partitions?

i dont really mind these be set as you see fit currently
though they should not be inconsistent with other things like CODEC_FLAG_4MV

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090522/6d185504/attachment.pgp>

More information about the ffmpeg-devel mailing list