comparison mlp.c @ 7566:d112b4655bbd libavcodec

mlp: split simple inline function that xors 4 bytes into one.
author ramiro
date Thu, 14 Aug 2008 03:58:05 +0000
parents fd24c8628221
children 45cfe1d44e86
comparison
equal deleted inserted replaced
7565:474c7ae4b431 7566:d112b4655bbd
108 const uint8_t *buf_end = buf + buf_size; 108 const uint8_t *buf_end = buf + buf_size;
109 109
110 for (; buf < buf_end - 3; buf += 4) 110 for (; buf < buf_end - 3; buf += 4)
111 scratch ^= *((const uint32_t*)buf); 111 scratch ^= *((const uint32_t*)buf);
112 112
113 scratch ^= scratch >> 16; 113 scratch = xor_32_to_8(scratch);
114 scratch ^= scratch >> 8;
115 114
116 for (; buf < buf_end; buf++) 115 for (; buf < buf_end; buf++)
117 scratch ^= *buf; 116 scratch ^= *buf;
118 117
119 return scratch; 118 return scratch;