comparison mpegvideo.c @ 292:73a9ce3d9715 libavcodec

fcode_tables where too small, found by Klaas-Pieter Vlieg <vlieg@eurescom.de>
author michaelni
date Sun, 24 Mar 2002 23:45:13 +0000
parents f82cce6cb182
children 944632089814
comparison
equal deleted inserted replaced
291:ab46ebfd419f 292:73a9ce3d9715
65 65
66 static UINT8 h263_chroma_roundtab[16] = { 66 static UINT8 h263_chroma_roundtab[16] = {
67 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 67 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
68 }; 68 };
69 69
70 static UINT16 default_mv_penalty[MAX_FCODE][MAX_MV*2+1]; 70 static UINT16 default_mv_penalty[MAX_FCODE+1][MAX_MV*2+1];
71 static UINT8 default_fcode_tab[MAX_MV*2+1]; 71 static UINT8 default_fcode_tab[MAX_MV*2+1];
72 72
73 /* default motion estimation */ 73 /* default motion estimation */
74 int motion_estimation_method = ME_LOG; 74 int motion_estimation_method = ME_LOG;
75 75
364 { /* set up some save defaults, some codecs might override them later */ 364 { /* set up some save defaults, some codecs might override them later */
365 static int done=0; 365 static int done=0;
366 if(!done){ 366 if(!done){
367 int i; 367 int i;
368 done=1; 368 done=1;
369 memset(default_mv_penalty, 0, sizeof(UINT16)*MAX_FCODE*(2*MAX_MV+1)); 369 memset(default_mv_penalty, 0, sizeof(UINT16)*(MAX_FCODE+1)*(2*MAX_MV+1));
370 memset(default_fcode_tab , 0, sizeof(UINT8)*(2*MAX_MV+1)); 370 memset(default_fcode_tab , 0, sizeof(UINT8)*(2*MAX_MV+1));
371 371
372 for(i=-16; i<16; i++){ 372 for(i=-16; i<16; i++){
373 default_fcode_tab[i + MAX_MV]= 1; 373 default_fcode_tab[i + MAX_MV]= 1;
374 } 374 }