#include <stdint.h>#include "common.h"Go to the source code of this file.
Functions | |
| unsigned long | av_adler32_update (unsigned long adler, const uint8_t *buf, unsigned int len) av_pure |
| unsigned long av_adler32_update | ( | unsigned long | adler, | |
| const uint8_t * | buf, | |||
| unsigned int | len | |||
| ) |
Definition at line 32 of file adler32.c.
References av_adler32_update(), av_log(), AV_LOG_DEBUG, av_log_level, BASE, DO1, DO16, DO4, main(), NULL, s1, s2, START_TIMER, and STOP_TIMER.
Referenced by av_adler32_update(), crc_write_packet(), and framecrc_write_packet().
00033 { 00034 unsigned long s1 = adler & 0xffff; 00035 unsigned long s2 = adler >> 16; 00036 00037 while (len>0) { 00038 #ifdef CONFIG_SMALL 00039 while(len>4 && s2 < (1U<<31)){ 00040 DO4(buf); len-=4; 00041 #else 00042 while(len>16 && s2 < (1U<<31)){ 00043 DO16(buf); len-=16; 00044 #endif 00045 } 00046 DO1(buf); len--; 00047 s1 %= BASE; 00048 s2 %= BASE; 00049 } 00050 return (s2 << 16) | s1; 00051 }
1.5.1