[FFmpeg-devel] [PATCH] Add SHA-2

Kostya kostya.shishkov
Wed Jul 15 16:53:24 CEST 2009


On Wed, Jul 15, 2009 at 04:02:44PM +0200, Michael Niedermayer wrote:
> On Wed, Jul 15, 2009 at 12:04:50PM +0300, Kostya wrote:
> > On Tue, Jul 14, 2009 at 12:34:45PM +0200, Michael Niedermayer wrote:
> > > On Sun, Jul 12, 2009 at 08:23:29AM +0300, Kostya wrote:
> > > > On Sat, Jul 11, 2009 at 09:13:40PM +0200, Michael Niedermayer wrote:
> > [...] 
> > > > > > +#define Ch(x,y,z)   (((x) & (y)) ^ ((~(x)) & (z)))
> > > > > > +#define Maj(x,y,z)  (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
> > > > > 
> > > > > you duplicate optimized code with optimizations removed
> > > > 
> > > > huh?
> > > 
> > > (w&(x^y))^y
> > 
> > Oh, fixed.
> [...]
> 
> >  int av_sha_init(AVSHA* ctx, int bits)
> >  {
> > -    ctx->state[0] = 0x67452301;
> > -    ctx->state[1] = 0xEFCDAB89;
> > -    ctx->state[2] = 0x98BADCFE;
> > -    ctx->state[3] = 0x10325476;
> > -    ctx->state[4] = 0xC3D2E1F0;
> > -    ctx->transform = sha1_transform;
> > -    ctx->count    = 0;
> [...]
> > +        ctx->state[0] = 0x67452301;
> > +        ctx->state[1] = 0xEFCDAB89;
> > +        ctx->state[2] = 0x98BADCFE;
> > +        ctx->state[3] = 0x10325476;
> > +        ctx->state[4] = 0xC3D2E1F0;
> > +        ctx->transform = sha1_transform;
> 
> cosmetics

Here it is.
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha2.patch
Type: text/x-diff
Size: 7895 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090715/ca0a208d/attachment.patch>



More information about the ffmpeg-devel mailing list