[FFmpeg-devel] [PATCH] ff_shift (left shift with allowed negative offset) implementation
Sat May 10 17:09:02 CEST 2008
On Sat, May 10, 2008 at 08:42:09PM +0700, Vladimir Voroshilov wrote:
> 2008/5/10, Michael Niedermayer <michaelni at gmx.at>:
> > On Sat, May 10, 2008 at 01:48:28PM +0700, Vladimir Voroshilov wrote:
> > > Hi, All
> > >
> > > Code in attached patch is used in several places of G.729 code.
> > > Michael asked me to make implement it as separate routine.
> > > So here is it.
> > > Is patch (routine/file name) ok ?
> > [...]
> > > diff --git a/libavcodec/acelp_math.c b/libavcodec/acelp_math.c
> > > index 6c8a017..b992c11 100644
> > > --- a/libavcodec/acelp_math.c
> > > +++ b/libavcodec/acelp_math.c
> > > @@ -195,3 +195,11 @@ int ff_log2(uint32_t value)
> > >
> > > return (power_int << 15) + value;
> > > }
> > > +
> > > +int ff_shift(int value, int offset)
> > static inline would be better
> > and the name is not good, it should give some hint that offset is meant
> > leftward and that value is signed.
> the given name is the best a can invent for it.
> Please anybody suggest better.
ff_bidir_sal makes sense to me but iam not sure if it makes sense to anyone
else (ones not knowing x86 asm), sal being shift arithmetic (signed) left.
maybe someone else has a better suggestion
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel