Mercurial > libavcodec.hg
comparison dsicinav.c @ 4364:05e932ddaaa9 libavcodec
rename BE/LE_8/16/32 to AV_RL/B_8/16/32
author | alex |
---|---|
date | Fri, 19 Jan 2007 22:12:59 +0000 |
parents | 8fe20344c9b5 |
children | a96d905dcbaa |
comparison
equal
deleted
inserted
replaced
4363:9b7662fa4905 | 4364:05e932ddaaa9 |
---|---|
157 code = *src++; | 157 code = *src++; |
158 for (i = 0; i < 8 && src < src_end && dst < dst_end; ++i) { | 158 for (i = 0; i < 8 && src < src_end && dst < dst_end; ++i) { |
159 if (code & (1 << i)) { | 159 if (code & (1 << i)) { |
160 *dst++ = *src++; | 160 *dst++ = *src++; |
161 } else { | 161 } else { |
162 cmd = LE_16(src); src += 2; | 162 cmd = AV_RL16(src); src += 2; |
163 offset = cmd >> 4; | 163 offset = cmd >> 4; |
164 sz = (cmd & 0xF) + 2; | 164 sz = (cmd & 0xF) + 2; |
165 /* don't use memcpy/memmove here as the decoding routine (ab)uses */ | 165 /* don't use memcpy/memmove here as the decoding routine (ab)uses */ |
166 /* buffer overlappings to repeat bytes in the destination */ | 166 /* buffer overlappings to repeat bytes in the destination */ |
167 sz = FFMIN(sz, dst_end - dst); | 167 sz = FFMIN(sz, dst_end - dst); |
319 uint8_t *src = buf; | 319 uint8_t *src = buf; |
320 int16_t *samples = (int16_t *)data; | 320 int16_t *samples = (int16_t *)data; |
321 | 321 |
322 if (cin->initial_decode_frame) { | 322 if (cin->initial_decode_frame) { |
323 cin->initial_decode_frame = 0; | 323 cin->initial_decode_frame = 0; |
324 cin->delta = (int16_t)LE_16(src); src += 2; | 324 cin->delta = (int16_t)AV_RL16(src); src += 2; |
325 *samples++ = cin->delta; | 325 *samples++ = cin->delta; |
326 buf_size -= 2; | 326 buf_size -= 2; |
327 } | 327 } |
328 while (buf_size > 0) { | 328 while (buf_size > 0) { |
329 cin->delta += cinaudio_delta16_table[*src++]; | 329 cin->delta += cinaudio_delta16_table[*src++]; |