Mercurial > libavcodec.hg
changeset 6307:e0601aa8ebef libavcodec
IMC decoder always operates on 64-byte blocks
author | kostya |
---|---|
date | Sat, 02 Feb 2008 08:26:49 +0000 |
parents | 23c0704067f6 |
children | 195356fc7230 |
files | imc.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/imc.c Fri Feb 01 23:49:56 2008 +0000 +++ b/imc.c Sat Feb 02 08:26:49 2008 +0000 @@ -41,6 +41,7 @@ #include "imcdata.h" +#define IMC_BLOCK_SIZE 64 #define IMC_FRAME_ID 0x21 #define BANDS 32 #define COEFFS 256 @@ -637,11 +638,10 @@ int counter, bitscount; uint16_t *buf16 = (uint16_t *) buf; - /* FIXME: input should not be modified */ - for(i = 0; i < FFMIN(buf_size, avctx->block_align) / 2; i++) + for(i = 0; i < IMC_BLOCK_SIZE / 2; i++) buf16[i] = bswap_16(buf16[i]); - init_get_bits(&q->gb, buf, 512); + init_get_bits(&q->gb, buf, IMC_BLOCK_SIZE * 8); /* Check the frame header */ imc_hdr = get_bits(&q->gb, 9); @@ -788,7 +788,7 @@ *data_size = COEFFS * sizeof(int16_t); - return avctx->block_align; + return IMC_BLOCK_SIZE; }