summaryrefslogtreecommitdiff
path: root/libavcodec/imc.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-02-02 08:26:49 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-02-02 08:26:49 +0000
commit0fe04628b95aa7d5b2787908fde55549aadb7076 (patch)
treee644cc3fe1a58e095697df0582528361537eaf24 /libavcodec/imc.c
parent815f98cce428f3444d22f0147e6ce86d1f2dc65e (diff)
IMC decoder always operates on 64-byte blocks
Originally committed as revision 11804 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r--libavcodec/imc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 6d1ec098a0..ed2e20379b 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -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 @@ static int imc_decode_frame(AVCodecContext * avctx,
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 @@ static int imc_decode_frame(AVCodecContext * avctx,
*data_size = COEFFS * sizeof(int16_t);
- return avctx->block_align;
+ return IMC_BLOCK_SIZE;
}