[FFmpeg-devel] [PATCH] avcodec/wavpackenc: remove unneeded L suffixes

Michael Niedermayer michaelni at gmx.at
Mon Feb 2 14:52:33 CET 2015


On Mon, Feb 02, 2015 at 08:57:04AM +0000, Paul B Mahol wrote:
> On 2/1/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavcodec/wavpackenc.c |    8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
> > index 63971c6..c174950 100644
> > --- a/libavcodec/wavpackenc.c
> > +++ b/libavcodec/wavpackenc.c
> > @@ -640,9 +640,9 @@ static uint32_t log2sample(uint32_t v, int limit,
> > uint32_t *result)
> >          dbits = nbits_table[v];
> >          *result += (dbits << 8) + wp_log2_table[(v << (9 - dbits)) &
> > 0xff];
> >      } else {
> > -        if (v < (1L << 16))
> > +        if (v < (1 << 16))
> >              dbits = nbits_table[v >> 8] + 8;
> > -        else if (v < (1L << 24))
> > +        else if (v < (1 << 24))
> >              dbits = nbits_table[v >> 16] + 16;
> >          else
> >              dbits = nbits_table[v >> 24] + 24;
> > @@ -1967,8 +1967,8 @@ static int wv_stereo(WavPackEncodeContext *s,
> >  #define count_bits(av) ( \
> >   (av) < (1 << 8) ? nbits_table[av] : \
> >    ( \
> > -   (av) < (1L << 16) ? nbits_table[(av) >> 8] + 8 : \
> > -   ((av) < (1L << 24) ? nbits_table[(av) >> 16] + 16 : nbits_table[(av) >>
> > 24] + 24) \
> > +   (av) < (1 << 16) ? nbits_table[(av) >> 8] + 8 : \
> > +   ((av) < (1 << 24) ? nbits_table[(av) >> 16] + 16 : nbits_table[(av) >>
> > 24] + 24) \
> >    ) \
> >  )
> >
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> ok

applied

thx

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

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150202/e59303c7/attachment.asc>


More information about the ffmpeg-devel mailing list