[FFmpeg-devel] [PATCH] cmdutils: add -cpuflags.

Michael Niedermayer michaelni at gmx.at
Sun Feb 19 21:18:26 CET 2012


On Sun, Feb 19, 2012 at 09:08:07PM +0100, Alexander Strasser wrote:
> Hi Michael,
> 
>   overall it seems useful enough to me.
> 
> Michael Niedermayer wrote:
> > This allows globally forcing specific cpuflags (or lack thereof)
> > Useful for debugging and benchmarking
> > 
> 
>   On the one hand one might argue it makes it pretty easy to shoot
> yourself in the foot. But on the other hand I guess the option is
> not documented enough to make it an easy or a worthwhile target
> (which is of course good in this case). 
> 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  cmdutils.c             |   14 ++++++++++++++
> >  cmdutils.h             |    2 ++
> >  cmdutils_common_opts.h |    1 +
> >  3 files changed, 17 insertions(+), 0 deletions(-)
> > 
> > diff --git a/cmdutils.c b/cmdutils.c
> > index 218c9f0..ea136fc 100644
> > --- a/cmdutils.c
> > +++ b/cmdutils.c
> > @@ -535,6 +535,20 @@ int opt_max_alloc(const char *opt, const char *arg)
> >      return 0;
> >  }
> >  
> > +int opt_cpuflags(const char *opt, const char *arg)
> > +{
> > +    char *tail;
> > +    size_t max;
> 
>   Is this a copy&paste error, or does the name max qualify in any other
> way then rhyming on flags?
> 
>   Wouldn't it be more logical to use long? What is the rational on using
> size_t? Is it because with an unsigned type it is easier to set
> AV_CPU_FLAG_FORCE on some architectures?

changed to long flags
applied

thx

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

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120219/e78a21f6/attachment.asc>


More information about the ffmpeg-devel mailing list