FFmpeg
Macros | Functions
adler32.c File Reference
#include "config.h"
#include "adler32.h"
#include "common.h"
#include "intreadwrite.h"

Go to the source code of this file.

Macros

#define BASE   65521L /* largest prime smaller than 65536 */
 
#define DO1(buf)   { s1 += *buf++; s2 += s1; }
 
#define DO4(buf)   DO1(buf); DO1(buf); DO1(buf); DO1(buf);
 
#define DO16(buf)   DO4(buf); DO4(buf); DO4(buf); DO4(buf);
 

Functions

AVAdler av_adler32_update (AVAdler adler, const uint8_t *buf, size_t len)
 Calculate the Adler32 checksum of a buffer. More...
 

Detailed Description

Computes the Adler-32 checksum of a data stream

This is a modified version based on adler32.c from the zlib library.

Author
Mark Adler

Definition in file adler32.c.

Macro Definition Documentation

◆ BASE

#define BASE   65521L /* largest prime smaller than 65536 */

Definition at line 38 of file adler32.c.

◆ DO1

#define DO1 (   buf)    { s1 += *buf++; s2 += s1; }

Definition at line 40 of file adler32.c.

◆ DO4

#define DO4 (   buf)    DO1(buf); DO1(buf); DO1(buf); DO1(buf);

Definition at line 41 of file adler32.c.

◆ DO16

#define DO16 (   buf)    DO4(buf); DO4(buf); DO4(buf); DO4(buf);

Definition at line 42 of file adler32.c.