--- trunk/xvidcore/src/bitstream/mbcoding.c 2003/02/04 22:00:44 815 +++ trunk/xvidcore/src/bitstream/mbcoding.c 2003/02/06 00:48:08 816 @@ -50,7 +50,7 @@ * exception also makes it possible to release a modified version which * carries forward this exception. * - * $Id: mbcoding.c,v 1.39 2003-01-26 01:44:07 suxen_drol Exp $ + * $Id: mbcoding.c,v 1.40 2003-02-06 00:48:08 edgomez Exp $ * ****************************************************************************/ @@ -94,7 +94,7 @@ void init_vlc_tables(void) { - ptr_t i, j, intra, last, run, run_esc, level, level_esc, escape, escape_len, offset; + uint32_t i, j, intra, last, run, run_esc, level, level_esc, escape, escape_len, offset; #ifdef BIGLUT intra_table = (VLC*)coeff_VLC[1]; @@ -129,7 +129,7 @@ #else offset = !intra * LEVELOFFSET; #endif - for (j = 0; j < 1 << (12 - coeff_tab[intra][i].vlc.len); j++) + for (j = 0; j < (uint32_t)(1 << (12 - coeff_tab[intra][i].vlc.len)); j++) { DCT3D[intra][(coeff_tab[intra][i].vlc.code << (12 - coeff_tab[intra][i].vlc.len)) | j].len = coeff_tab[intra][i].vlc.len; DCT3D[intra][(coeff_tab[intra][i].vlc.code << (12 - coeff_tab[intra][i].vlc.len)) | j].event = coeff_tab[intra][i].event; @@ -154,7 +154,7 @@ for (last = 0; last < 2; last++) for (run = 0; run < 63 + last; run++) { - for (level = 1; level < 32 << intra; level++) + for (level = 1; level < (uint32_t)(32 << intra); level++) { if (level <= max_level[intra][last][run] && run <= max_run[intra][last][level]) continue; @@ -166,10 +166,6 @@ #endif level_esc = level - max_level[intra][last][run]; run_esc = run - 1 - max_run[intra][last][level]; - /*use this test to use shorter esc2 codes when possible - if (level_esc <= max_level[intra][last][run] && run <= max_run[intra][last][level_esc] - && !(coeff_VLC[intra][last][level_esc + offset][run].len + 7 + 1 - > coeff_VLC[intra][last][level + offset][run_esc].code + 7 + 2))*/ if (level_esc <= max_level[intra][last][run] && run <= max_run[intra][last][level_esc]) { @@ -179,7 +175,7 @@ } else { - if (level <= max_level[intra][last][run_esc] && run_esc <= max_run[intra][last][level]) + if (run_esc <= max_run[intra][last][level] && level <= max_level[intra][last][run_esc]) { escape = ESCAPE2; escape_len = 7 + 2; @@ -220,7 +216,7 @@ } #ifdef BIGLUT - for (level = 32 << intra; level < 2048; level++) + for (level = (uint32_t)(32 << intra); level < 2048; level++) { coeff_VLC[intra][last][level + offset][run].code = (ESCAPE3 << 21) | (last << 20) | (run << 14) | (1 << 13) | ((level & 0xfff) << 1) | 1;