[Ffmpeg-devel] [PATCH] flacenc - md5
Michael Niedermayer
michaelni
Tue Jul 4 18:11:22 CEST 2006
Hi
On Tue, Jul 04, 2006 at 03:52:52PM +0200, Reimar Doeffinger wrote:
> Hello,
> On Tue, Jul 04, 2006 at 12:05:33AM -0400, Justin Ruggles wrote:
> > +#ifdef WORDS_BIGENDIAN
> > + int i;
> > + uint16_t *sig16 = av_malloc(data_bytes);
> > + memcpy(sig16, signal, data_bytes);
> > + for(i=0; i<nsamples*ch; i++) {
> > + sig16[i] = bswap_16(sig16[i]);
> > + }
> > + av_md5_update(md5, sig16, data_bytes);
> > + av_freep(&sig16);
> > +#else
> > + av_md5_update(md5, signal, data_bytes);
> > +#endif
>
> Maybe it would be acceptable to modify
> av_md5_update
> to use
> ctx->block[ ctx->b_used++ ] = src[i ^ swap];
> ?
> With swap = 1 you could do 16 bit le<->be, with swap=3 32 bit etc...
> I would hope the speed difference is not much, and I doubt this is the
> only place where this problem will appear?
if it appears somewhere else we can still add that mess to md5.c and crc.c,
...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list