--- mbcoding.c 2002/07/18 23:52:40 1.21 +++ mbcoding.c 2002/07/28 13:06:46 1.24 @@ -412,24 +412,26 @@ Statistics * pStat) { - int intra = (pMB->mode == MODE_INTRA || pMB->mode == MODE_INTRA_Q); - if (frame->coding_type == P_VOP) { - if (pMB->cbp == 0 && pMB->mode == MODE_INTER && pMB->mvs[0].x == 0 && - pMB->mvs[0].y == 0) { - BitstreamPutBit(bs, 1); // not_coded - return; - } else BitstreamPutBit(bs, 0); // coded } - if (intra) + if (pMB->mode == MODE_INTRA || pMB->mode == MODE_INTRA_Q) CodeBlockIntra(frame, pMB, qcoeff, bs, pStat); else CodeBlockInter(frame, pMB, qcoeff, bs, pStat); } + +void +MBSkip(Bitstream * bs) +{ + BitstreamPutBit(bs, 1); // not coded + return; +} + + /*************************************************************** * bframe encoding start ***************************************************************/ @@ -556,8 +558,8 @@ } if (mb->mode == MODE_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) */ + CodeVector(bs, mb->deltamv.x, 1, pStat); /* fcode is always 1 for delta vector */ + CodeVector(bs, mb->deltamv.y, 1, pStat); /* prediction is always (0,0) */ } for (i = 0; i < 6; i++) {