[FFmpeg-devel] [PATCH] adler32: rewrite using integer SIMD.
Michael Niedermayer
michaelni at gmx.at
Sat Feb 4 20:29:39 CET 2012
On Sat, Feb 04, 2012 at 12:17:51PM +0100, Reimar Döffinger wrote:
>
>
> On 4 Feb 2012, at 07:55, Michael Niedermayer <michaelni at gmx.at> wrote:
> > +#if HAVE_BIGENDIAN
> > + s2 += ((((a2&0xFFFF0000FFFF)+(b2&0xFFFF0000FFFF)+((a2>>16)&0xFFFF0000FFFF)+((b2>>16)&0xFFFF0000FFFF))*0x800000008)>>32)
> > + - 2*((b1*0x3000200010000)>>48)
> > + - ((a1*0x1000100010001)>>48)
> > + - 2*((a1*0x3000200010000)>>48);
> > +#else
> > + s2 += ((((a2&0xFFFF0000FFFF)+(b2&0xFFFF0000FFFF)+((a2>>16)&0xFFFF0000FFFF)+((b2>>16)&0xFFFF0000FFFF))*0x800000008)>>32)
> > + - 2*((a1*0x0000100020003)>>48)
> > + - ((b1*0x1000100010001)>>48)
> > + - 2*((b1*0x0000100020003)>>48);
>
> The first line seems the same to me.
> Assume that's correct IMO it would be nicer to put it outside the ifdef.
> Also a few comments might be nice to make it more obvious how it works (maybe it is obvious, I didn't check the adler32 code, but the large constants etc. make it rather bad to read.
code improved, commented, pushed
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120204/eb9fcf11/attachment.asc>
More information about the ffmpeg-devel
mailing list