Mercurial > libavformat.hg
comparison crc.c @ 65:a58a8a53eb46 libavformat
* UINTX -> uintx_t INTX -> intx_t
author | kabi |
---|---|
date | Tue, 11 Feb 2003 16:35:48 +0000 |
parents | 05318cf2e886 |
children | 3d92f793fd67 |
comparison
equal
deleted
inserted
replaced
64:b0e0eb595e29 | 65:a58a8a53eb46 |
---|---|
31 #define DO2(buf) DO1(buf); DO1(buf); | 31 #define DO2(buf) DO1(buf); DO1(buf); |
32 #define DO4(buf) DO2(buf); DO2(buf); | 32 #define DO4(buf) DO2(buf); DO2(buf); |
33 #define DO8(buf) DO4(buf); DO4(buf); | 33 #define DO8(buf) DO4(buf); DO4(buf); |
34 #define DO16(buf) DO8(buf); DO8(buf); | 34 #define DO16(buf) DO8(buf); DO8(buf); |
35 | 35 |
36 static UINT32 adler32(UINT32 adler, UINT8 *buf, unsigned int len) | 36 static uint32_t adler32(uint32_t adler, uint8_t *buf, unsigned int len) |
37 { | 37 { |
38 unsigned long s1 = adler & 0xffff; | 38 unsigned long s1 = adler & 0xffff; |
39 unsigned long s2 = (adler >> 16) & 0xffff; | 39 unsigned long s2 = (adler >> 16) & 0xffff; |
40 int k; | 40 int k; |
41 | 41 |
56 } | 56 } |
57 return (s2 << 16) | s1; | 57 return (s2 << 16) | s1; |
58 } | 58 } |
59 | 59 |
60 typedef struct CRCState { | 60 typedef struct CRCState { |
61 UINT32 crcval; | 61 uint32_t crcval; |
62 } CRCState; | 62 } CRCState; |
63 | 63 |
64 static int crc_write_header(struct AVFormatContext *s) | 64 static int crc_write_header(struct AVFormatContext *s) |
65 { | 65 { |
66 CRCState *crc = s->priv_data; | 66 CRCState *crc = s->priv_data; |