[FFmpeg-devel] [PATCH] Add RSHIFT_POS and ROUNDED_DIV_POS
Wed Jul 29 00:49:44 CEST 2009
On Tue, Jul 28, 2009 at 05:51:08PM -0300, Ramiro Polla wrote:
> On Tue, Jul 28, 2009 at 6:49 AM, Michael Niedermayer<michaelni at gmx.at> wrote:
> > On Tue, Jul 28, 2009 at 04:12:03AM -0300, Ramiro Polla wrote:
> >> Currently there is RSHIFT(a,b) and ROUNDED_DIV(a,b), which work for
> >> both negative and positive values of a. This patch adds variants that
> >> only work on positive values of a, so it may be used on variables
> >> known to be positive.
> >> And another patch uses it in swscale.
> > I honestly dont see the point,
> > the first part is just init where such minor speed change is irrelevant
> > and the rest is clearer and less code as pure C s it is
> Not such a strong opinion either but I prefer having macros with
> somewhat descriptive names for operations like these. swscale is
> peppered with a bunch of such operations and some other bit
> manipulation tricks...
for its the opposite
clear C code that anyone can understand on its own
a macro with not so clear name one has to look up
(you have an advantage, knowing what your own macro does ...)
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
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel