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

Rafaël Carré rafael.carre
Sun Jul 25 15:09:14 CEST 2010


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 [^.] ?

- [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' $*
 
 rm $TMP
 for i in `grep -H '^+.*@param' $*| sed
 's/^\([^:]*\):.*@param\(\[.*\]\|\) *\([a-zA-Z0-9_]*\) .*$/\1:\3/'` ; do

-- 
? Rafa?l Carr? ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100725/8411bbb1/attachment.pgp>



More information about the ffmpeg-devel mailing list