[FFmpeg-devel] [PATCH] Use more appropriate types when decoding vorbisfloats

Michael Niedermayer michaelni
Sun Jul 25 16:02:31 CEST 2010


On Sun, Jul 25, 2010 at 03:09:14PM +0200, Rafa?l Carr? wrote:
> On Sun, 25 Jul 2010 02:32:42 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > On Sat, Jul 24, 2010 at 05:19:02AM +0200, Rafa?l Carr? wrote:
> > > On Sat, 24 Jul 2010 04:23:03 +0200
> > > Michael Niedermayer <michaelni at gmx.at> wrote:
> > > 
> > > > On Sat, Jul 24, 2010 at 04:15:18AM +0200, Rafa?l Carr? wrote:
> 
> > > diff --git a/tools/patcheck b/tools/patcheck
> > > index 521138a..62df31e 100755
> > > --- a/tools/patcheck
> > > +++ b/tools/patcheck
> > > @@ -89,6 +89,7 @@ hiegrep ':\+[^}#]*else' 'missing } prior to else'
> > > $* #FIXME this should print the previous statement maybe
> > >  hiegrep ':\+  *{ *$' '{ should be on the same line as the related
> > > previous statement' $* 
> > > +hiegrep
> > > 'int.*([[:space:]]|=|\*|^|\+|-|/|\||\()([0-9]+|0[xX][a-fA-F0-9]+)L'
> > > 'possibly mixing int variable and long constant' $* rm $TMP
> > >  for i in `grep -H '^+.*@param' $*| sed
> > >  's/^\([^:]*\):.*@param\(\[.*\]\|\)
> > > *\([a-zA-Z0-9_]*\) .*$/\1:\3/'` ; do
> > > 
> > > 
> > > Matching (, space and operators avoid matching defines like
> > > FF_QP"2L"AMBDA Also I assume 'long' will not be written 'long int'
> > > although there's at least 3 occurences already (for example lrint*
> > > prototypes)
> > > 
> > > 
> > > 
> > > Running grep -rIE regexp on ffmpeg/ it shows some int64_t = ...
> > > 1LL ... Is that ok or should it rather use less-readable
> > > (int64_t)constant ?
> > 
> > i was thinkng of a regexp like:
> > '[^0-9a-zA-Z._][0-9]*[0-9]L[^a-zA-Z0-9]'
> 
> It won't match hex constants but that should be ok, decimal ought to be
> enough for everyone
> 
> If the [^_] is to not match macros, why the [^.] ?

H.26L ;)


> 
> - [0-9]*[0-9] -> [0-9]+
> - L -> U?L?L + matches u and l
> 
> diff --git a/tools/patcheck b/tools/patcheck
> index de20500..cae25ab 100755
> --- a/tools/patcheck
> +++ b/tools/patcheck
> @@ -97,6 +97,7 @@ hiegrep ':\+[^}#]*else' 'missing } prior to else' $*
>  #FIXME this should print the previous statement maybe
>  hiegrep ':\+  *{ *$' '{ should be on the same line as the related previous statement' $*
>  
> +hiegrep 'int.*[^0-9a-zA-Z_][0-9]+[Uu]?[Ll]?[Ll][^0-9a-zA-Z_]' 'possibly mixing int variable and long constant' $*

why int?
and LL is not wrong, it can be needed in expressions

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100725/eaa2ba81/attachment.pgp>



More information about the ffmpeg-devel mailing list