[Ffmpeg-devel] move adler32 to libavutil?
Måns Rullgård
mru
Thu Jul 13 23:42:23 CEST 2006
Michael Niedermayer <michaelni at gmx.at> writes:
> 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--) { ...
I had the same thought myself.
> and about the patch in general, yes iam fine with moving the adler32 code
> to lavu
Applied, and changes made.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list