Originally committed as revision 360 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
@@ -53,7 +53,7 @@ static void mpeg4_decode_sprite_trajectory(MpegEncContext * s); | |||||
extern UINT32 inverse[256]; | extern UINT32 inverse[256]; | ||||
static UINT16 mv_penalty[MAX_FCODE][MAX_MV*2+1]; | |||||
static UINT16 mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; | |||||
static UINT8 fcode_tab[MAX_MV*2+1]; | static UINT8 fcode_tab[MAX_MV*2+1]; | ||||
static UINT8 umv_fcode_tab[MAX_MV*2+1]; | static UINT8 umv_fcode_tab[MAX_MV*2+1]; | ||||
@@ -51,7 +51,7 @@ static int mpeg2_decode_block_intra(MpegEncContext *s, | |||||
int n); | int n); | ||||
static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred); | static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred); | ||||
static UINT16 mv_penalty[MAX_FCODE][MAX_MV*2+1]; | |||||
static UINT16 mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; | |||||
static UINT8 fcode_tab[MAX_MV*2+1]; | static UINT8 fcode_tab[MAX_MV*2+1]; | ||||
static void put_header(MpegEncContext *s, int header) | static void put_header(MpegEncContext *s, int header) | ||||
@@ -67,7 +67,7 @@ static UINT8 h263_chroma_roundtab[16] = { | |||||
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, | 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, | ||||
}; | }; | ||||
static UINT16 default_mv_penalty[MAX_FCODE][MAX_MV*2+1]; | |||||
static UINT16 default_mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; | |||||
static UINT8 default_fcode_tab[MAX_MV*2+1]; | static UINT8 default_fcode_tab[MAX_MV*2+1]; | ||||
/* default motion estimation */ | /* default motion estimation */ | ||||
@@ -366,7 +366,7 @@ int MPV_encode_init(AVCodecContext *avctx) | |||||
if(!done){ | if(!done){ | ||||
int i; | int i; | ||||
done=1; | done=1; | ||||
memset(default_mv_penalty, 0, sizeof(UINT16)*MAX_FCODE*(2*MAX_MV+1)); | |||||
memset(default_mv_penalty, 0, sizeof(UINT16)*(MAX_FCODE+1)*(2*MAX_MV+1)); | |||||
memset(default_fcode_tab , 0, sizeof(UINT8)*(2*MAX_MV+1)); | memset(default_fcode_tab , 0, sizeof(UINT8)*(2*MAX_MV+1)); | ||||
for(i=-16; i<16; i++){ | for(i=-16; i<16; i++){ | ||||