[FFmpeg-devel] [PATCH] Eliminate -dc option from ffmpeg.c options

Michael Niedermayer michaelni
Tue Aug 12 13:28:26 CEST 2008


On Tue, Aug 12, 2008 at 12:55:37AM +0200, Stefano Sabatini wrote:
> On date Sunday 2008-08-10 01:12:34 +0200, Michael Niedermayer encoded:
> > On Sat, Aug 09, 2008 at 07:58:09PM +0200, Stefano Sabatini wrote:
> > > On date Saturday 2008-08-09 19:18:21 +0200, Michael Niedermayer encoded:
> > > > On Sat, Aug 09, 2008 at 01:44:10PM +0200, Stefano Sabatini wrote:
> > > > > On date Saturday 2008-08-09 04:28:14 +0200, Michael Niedermayer encoded:
> > > > > > On Fri, Aug 08, 2008 at 02:48:57PM -0700, Baptiste Coudurier wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > Stefano Sabatini wrote:
> > > > > > > > Hi all,
> > > > > > > > 
> > > > > > > > this seems unnecessary since it may be set using AVOptions.
> > > > > > > > 
> > > > > > > > Also I honestly cannot understand the -8 logic, but it seems to me
> > > > > > > > plain wrong/misleading.
> > > > > > > > 
> > > > > > > 
> > > > > > > Not at all, everybody express MPEG-2 (at least) DC precision in bits, so
> > > > > > > you say 9/10/11 bits for dc 1/2/3.
> > > > > > > 
> > > > > > > This change command line usage and Im against it for now, some more
> > > > > > > advanced AVOption system like eval() possibility would be better I think.
> > > > > > 
> > > > > > hmm, i think having command line options and internal variables do very
> > > > > > different things could be confusing.
> > > > > > 
> > > > > > We could just make intra_dc_precision have 8,9,10,11 as value instead of
> > > > > > 1/2/3 this would IMHO be the cleanest solution but would have to be
> > > > > > done under #if VERSION with the next major version bump ...
> > > > > 
> > > > > Like this?
> > > > 
> > > > no
> > > > 
> > > > the parameter should take values in the range of 8..12 nor 0..4
> > > 
> > > libavcodec/utils.c currently takes the value using intra_dc_precision
> > > values (ranging from 0 to 4), 
> > 
> > and that should be changed under #if VERSION ...
> 
> Let me undestand, that means that we should make the parameter to take the
> range of values 8..12 at the next major bump? 
> 
> Something of the kind:
> 
> #ifdef LIBAVCODEC_MAJOR_INT < 52
>     /**
>      * precision of the intra DC coefficient - 8
>      * - encoding: Set by user.
>      * - decoding: unused
>      */
> #else
>     /**
>      * precision of the intra DC coefficient
>      * - encoding: Set by user.
>      * - decoding: unused
>      */
> #endif
>      int intra_dc_precision;
> ?

i see no need to put docs under #ifdef


> 
> That requires to change all the code which currently deals with
> intra_dc_precisione 0..4 values, and also to write a good amount of
> ifdeffery to avoid to break things at the next bump.

#ifdef LIBAVCODEC_MAJOR_INT < 52
    if(dc<5) dc+=8;
#endif


> 
> Is this right?

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

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080812/2fb0974f/attachment.pgp>



More information about the ffmpeg-devel mailing list