[FFmpeg-cvslog] r11804 - trunk/libavcodec/imc.c

Reimar Döffinger Reimar.Doeffinger
Sat Feb 2 09:35:56 CET 2008


Hello,
On Sat, Feb 02, 2008 at 09:26:49AM +0100, kostya wrote:
> Author: kostya
> Date: Sat Feb  2 09:26:49 2008
> New Revision: 11804
> 
> Log:
> IMC decoder always operates on 64-byte blocks
> 
> Modified:
>    trunk/libavcodec/imc.c
> 
> Modified: trunk/libavcodec/imc.c
> ==============================================================================
> --- trunk/libavcodec/imc.c	(original)
> +++ trunk/libavcodec/imc.c	Sat Feb  2 09:26:49 2008
> @@ -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(AVCodecConte
>      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]);

I guess this should then check for buf_size < IMC_BLOCK_SIZE ...




More information about the ffmpeg-cvslog mailing list