Mercurial > libavutil.hg
comparison crc.c @ 992:a13125b5be3a libavutil
bswap: change ME to NE in macro names
Other parts of FFmpeg use NE (native endian) rather than ME (machine).
This makes it consistent.
author | mru |
---|---|
date | Sat, 10 Jul 2010 22:09:01 +0000 |
parents | 18a757cdcba6 |
children | f8db9a2bae05 |
comparison
equal
deleted
inserted
replaced
991:ac42d0f16eae | 992:a13125b5be3a |
---|---|
119 if(!ctx[256]) { | 119 if(!ctx[256]) { |
120 while(((intptr_t) buffer & 3) && buffer < end) | 120 while(((intptr_t) buffer & 3) && buffer < end) |
121 crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8); | 121 crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8); |
122 | 122 |
123 while(buffer<end-3){ | 123 while(buffer<end-3){ |
124 crc ^= le2me_32(*(const uint32_t*)buffer); buffer+=4; | 124 crc ^= le2ne_32(*(const uint32_t*)buffer); buffer+=4; |
125 crc = ctx[3*256 + ( crc &0xFF)] | 125 crc = ctx[3*256 + ( crc &0xFF)] |
126 ^ctx[2*256 + ((crc>>8 )&0xFF)] | 126 ^ctx[2*256 + ((crc>>8 )&0xFF)] |
127 ^ctx[1*256 + ((crc>>16)&0xFF)] | 127 ^ctx[1*256 + ((crc>>16)&0xFF)] |
128 ^ctx[0*256 + ((crc>>24) )]; | 128 ^ctx[0*256 + ((crc>>24) )]; |
129 } | 129 } |