aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/imc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-28 18:16:31 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-02 17:02:22 -0400
commite9362aaedf81c723bd9167d3ec1e7eb457d1fbfb (patch)
tree198e8daf495cdc5e91fec8f19e357d142dc302b2 /libavcodec/imc.c
parentf011fcd67edf27d2b1f6fcdff0b4c19da36176e9 (diff)
downloadffmpeg-e9362aaedf81c723bd9167d3ec1e7eb457d1fbfb.tar.gz
imc: use DSPContext.bswap16_buf() to byte-swap packet data
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r--libavcodec/imc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 07d6cadcfd..1a3eeaa1ee 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -655,14 +655,14 @@ static int imc_decode_frame(AVCodecContext * avctx,
int flag;
int bits, summer;
int counter, bitscount;
- uint16_t buf16[IMC_BLOCK_SIZE / 2];
+ LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2]);
if (buf_size < IMC_BLOCK_SIZE) {
av_log(avctx, AV_LOG_ERROR, "imc frame too small!\n");
return -1;
}
- for(i = 0; i < IMC_BLOCK_SIZE / 2; i++)
- buf16[i] = av_bswap16(((const uint16_t*)buf)[i]);
+
+ q->dsp.bswap16_buf(buf16, (const uint16_t*)buf, IMC_BLOCK_SIZE / 2);
q->out_samples = data;
init_get_bits(&q->gb, (const uint8_t*)buf16, IMC_BLOCK_SIZE * 8);