--- trunk/xvidcore/src/bitstream/mbcoding.c 2002/06/28 15:14:40 248 +++ trunk/xvidcore/src/bitstream/mbcoding.c 2002/07/18 23:52:40 313 @@ -518,11 +518,11 @@ int i; /* ------------------------------------------------------------------ - when a block is skipped it is decoded DIRECT(0,) - hence are interpolated from forward & backward frames + when a block is skipped it is decoded DIRECT(0,0) + hence is interpolated from forward & backward frames ------------------------------------------------------------------ */ - if (mb->mode == 5) { + if (mb->mode == MODE_DIRECT_NONE_MV) { BitstreamPutBit(bs, 1); // skipped return; } @@ -556,7 +556,8 @@ } if (mb->mode == MODE_DIRECT) { - // TODO: direct + CodeVector(bs, mb->mvs[0].x, 1, pStat); /* fcode is always 1 for delta vector */ + CodeVector(bs, mb->mvs[0].y, 1, pStat); /* prediction is always (0,0) */ } for (i = 0; i < 6; i++) { @@ -573,15 +574,6 @@ ***************************************************************/ -void -skip_stuffing(Bitstream *bs) -{ - while (BitstreamShowBits(bs, 9) == 1) - BitstreamSkip(bs, 9); -} - - - // for IVOP addbits == 0 // for PVOP addbits == fcode - 1 // for BVOP addbits == max(fcode,bcode) - 1 @@ -782,6 +774,10 @@ } coeff += run; block[scan[coeff]] = level; + + DPRINTF(DPRINTF_COEFF,"block[%i] %i", scan[coeff], level); + //DPRINTF(DPRINTF_COEFF,"block[%i] %i %08x", scan[coeff], level, BitstreamShowBits(bs, 32)); + if (level < -127 || level > 127) { DEBUG1("warning: intra_overflow", level); } @@ -811,6 +807,10 @@ p += run; block[scan[p]] = level; + + DPRINTF(DPRINTF_COEFF,"block[%i] %i", scan[p], level); + // DPRINTF(DPRINTF_COEFF,"block[%i] %i %08x", scan[p], level, BitstreamShowBits(bs, 32)); + if (level < -127 || level > 127) { DEBUG1("warning: inter_overflow", level); }