[Ffmpeg-devel] move adler32 to libavutil?

Michael Niedermayer michaelni
Thu Jul 13 23:17:52 CEST 2006


Hi

On Wed, Jul 12, 2006 at 08:50:46PM +0100, M?ns Rullg?rd wrote:
[...]
> +unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, unsigned int len)
> +{
> +    unsigned long s1 = adler & 0xffff;
> +    unsigned long s2 = (adler >> 16) & 0xffff;
> +    int k;
> +
> +    if (buf == NULL) return 1L;
> +
> +    while (len > 0) {
> +        k = len < NMAX ? len : NMAX;

FFMIN(len, NMAX)


> +        len -= k;
> +        while (k >= 16) {
> +            DO16(buf);
> +            k -= 16;
> +        }

this could be put under #ifndef CONFIG_SMALL


> +        if (k != 0) do {
> +            DO1(buf);
> +        } while (--k);

hmmm, why not while(k--) { ...


and about the patch in general, yes iam fine with moving the adler32 code
to lavu

[...]
-- 
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