[Ffmpeg-devel] [PATCH] flacenc - md5
Reimar Doeffinger
Reimar.Doeffinger
Tue Jul 4 15:52:52 CEST 2006
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?
Greetings,
Reimar Doeffinger
More information about the ffmpeg-devel
mailing list