[FFmpeg-devel] [PATCH] Update trellis option usage in FAQ

Michael Niedermayer michaelni
Sun Nov 16 16:36:03 CET 2008


On Sun, Nov 16, 2008 at 02:30:46PM +0100, Stefano Sabatini wrote:
> On date Saturday 2008-11-15 08:37:43 -0800, Jason Garrett-Glaser encoded:
> > On Sat, Nov 15, 2008 at 6:05 AM, Jethro Walters
> > <turkeyman121 at yahoo.co.uk> wrote:
> > > --- On Sat, 15/11/08, Michael Niedermayer <michaelni at gmx.at> wrote:
> > >
> > >> From: Michael Niedermayer <michaelni at gmx.at>
> > >> Subject: Re: [FFmpeg-devel] [PATCH] Update trellis option usage in FAQ
> > >> To: "FFmpeg development discussions and patches" <ffmpeg-devel at mplayerhq.hu>
> > >> Date: Saturday, 15 November, 2008, 12:05 PM
> > >> > > On Sat, Nov 15, 2008 at 12:43:59PM +0100, Stefano Sabatini wrote:
> > >> > Hi,
> > >> >
> > >> > since lavc 52 trell isn't anymore a valid flag, patch changes -flags
> > >> > +trell with -trellis 2.
> > >>
> > >> hmm, it seems we are missing a description of what 0/1/2 is
> > >> in avcodec.h and the AVOptions in utils.c
> > >
> > > Perhaps taking them from x264 CLI's long-help description would be appropriate. From memory it's something like the following (don't have x264 to hand at the moment, where's Dark Shikari when ya need him? ;-)):
> > >
> > > 0 - No trellis performed
> > > 1 - Perform trellis on final macroblock encode only
> > > 2 - Perform trellis on all encodes
> > >
> > > But that's just from memory, and is possibly a little inaccurate, and out-dated since x264 / Dark Shikari made changes to what trellis specifically did.
> > >
> > > Jethro Walters
> > 
> > Nope, trellis is the same as it always was.  "Psy trellis" was added
> > as an option, but like AQ and psy-RD, its not accessible through lavc
> > because nobody has added a commandline option for it in ffmpeg.
> 
> >From a quick grep (no I don't know what trellis algo really is) it
> looks like trellis has a different meaning according to the codec
> where it is used.
> 
> In mpegvideo_enc.c, lixbvidff.c and nellymoserenc.c it is used as a flag.
> 
> In adpcm.c its value ranges from 0 (disabled) to 16.
> 
> In libx264.c it is used to fill the libx264 context like this:
> x4->params.analyse.i_trellis = avctx->trellis
> 
> so in this case its meaning is the same as defined in libx264.
> 
> Patch for libavcodec/utils.c attached.
> 
> Regards.
> -- 
> FFmpeg = Funny Free Minimalistic Powered Ecumenical Game

> Index: libavcodec/utils.c
> ===================================================================
> --- libavcodec/utils.c	(revision 15844)
> +++ libavcodec/utils.c	(working copy)
> @@ -704,7 +704,10 @@
>  {"refs", "reference frames to consider for motion compensation (Snow)", OFFSET(refs), FF_OPT_TYPE_INT, 1, INT_MIN, INT_MAX, V|E},
>  {"chromaoffset", "chroma qp offset from luma", OFFSET(chromaoffset), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
>  {"bframebias", "influences how often B-frames are used", OFFSET(bframebias), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
> -{"trellis", "rate-distortion optimal quantization", OFFSET(trellis), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|A|E},
> +{"trellis", "rate-distortion optimal quantization", OFFSET(trellis), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|A|E, "trellis"},
> +{"none", "no trellis performed (libx264)", 0, FF_OPT_TYPE_CONST, 0, INT_MIN, INT_MAX, V|A|E, "trellis"},
> +{"finalmbonly", "perform trellis on final macroblock encode only (libx264)", 0, FF_OPT_TYPE_CONST, 1, INT_MIN, INT_MAX, V|A|E, "trellis"},
> +{"all", "perform trellis on all encodes (libx264)", 0, FF_OPT_TYPE_CONST, 2, INT_MIN, INT_MAX, V|A|E, "trellis"},

not ok, this is only documenting it for libx264

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- 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/20081116/241f5ef8/attachment.pgp>



More information about the ffmpeg-devel mailing list