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

Michael Niedermayer michaelni
Fri May 22 11:39:05 CEST 2009


On Thu, May 21, 2009 at 09:36:53PM -0700, Jason Garrett-Glaser wrote:
> On Thu, May 21, 2009 at 8:54 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > 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)
> 
> The current behavior is:
> 
> 0 --> No scenecut detection
> 1-100 -> Varying threshold
> 40 -> Default threshold

maybe:
x264_scenecut= av_clip(40 - lavc_scenechange, 0, 100);
is a reasonable choice?


> 
> > 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
> 
> What do you mean by inconsistent here?  P8x8 already has a separate
> option from 4mv, even though it means a relatively similar thing.

i just mean that the defaults should be consistent that is
!(flags & CODEC_FLAG_4MV) == !(partitions & X264_PART_P8X8)
maybe we should deprecate CODEC_FLAG_4MV and just keep it internally for
fast access and externally use partitions & X264_PART_P8X8 for all encoders
it wouldnt help you though

besides why X264_* ? that seems a poor choice as name for a constant of lavcs
public API

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- 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/d643fccf/attachment.pgp>



More information about the ffmpeg-devel mailing list