--- mbcoding.c 2007/06/27 14:38:05 1.55 +++ mbcoding.c 2009/11/10 14:06:58 1.58 @@ -19,7 +19,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: mbcoding.c,v 1.55 2007/06/27 14:38:05 Isibaar Exp $ + * $Id: mbcoding.c,v 1.58 2009/11/10 14:06:58 Isibaar Exp $ * ****************************************************************************/ @@ -588,7 +588,7 @@ CodeVector(bs, pMB->pmvs[i].x, frame->fcode); CodeVector(bs, pMB->pmvs[i].y, frame->fcode); -#ifdef _DEBUG +#if 0 /* #ifdef _DEBUG */ if (i == 0) /* for simplicity */ { int coded_length = BitstreamPos(bs) - bits; int estimated_length = d_mv_bits(pMB->pmvs[i].x, pMB->pmvs[i].y, zeroMV, frame->fcode, 0); @@ -1075,7 +1075,7 @@ return (level << 20) >> 20; error: - *run = VLC_ERROR; + *run = 64; return 0; } @@ -1087,12 +1087,12 @@ { const uint16_t *scan = scan_tables[direction]; - int level, run, last; + int level, run, last = 0; do { level = get_coeff(bs, &run, &last, 1, 0); coeff += run; - if ((run|coeff)&~63) { + if (coeff & ~63) { DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run or index"); break; } @@ -1127,13 +1127,13 @@ int p; int level; int run; - int last; + int last = 0; p = 0; do { level = get_coeff(bs, &run, &last, 0, 0); p += run; - if ((p|run)&~63) { + if (p & ~63) { DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run or index"); break; } @@ -1162,13 +1162,13 @@ int p; int level; int run; - int last; + int last = 0; p = 0; do { level = get_coeff(bs, &run, &last, 0, 0); p += run; - if ((p|run)&~63) { + if (p & ~63) { DPRINTF(XVID_DEBUG_ERROR,"fatal: invalid run or index"); break; }