19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: mbcoding.c,v 1.52 2005-09-13 12:12:15 suxen_drol Exp $ |
* $Id: mbcoding.c,v 1.53 2006-01-19 22:25:23 Isibaar Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
572 |
#endif |
#endif |
573 |
} |
} |
574 |
} |
} |
575 |
|
|
576 |
|
bits = BitstreamPos(bs); |
577 |
|
|
578 |
/* code motion vector(s) if motion is local */ |
/* code motion vector(s) if motion is local */ |
579 |
if (!pMB->mcsel) |
if (!pMB->mcsel) |
580 |
for (i = 0; i < (pMB->mode == MODE_INTER4V ? 4 : 1); i++) { |
for (i = 0; i < (pMB->mode == MODE_INTER4V ? 4 : 1); i++) { |
582 |
CodeVector(bs, pMB->pmvs[i].y, frame->fcode); |
CodeVector(bs, pMB->pmvs[i].y, frame->fcode); |
583 |
} |
} |
584 |
|
|
585 |
|
bits = BitstreamPos(bs) - bits; |
586 |
|
pStat->iMVBits += bits; |
587 |
|
|
588 |
bits = BitstreamPos(bs); |
bits = BitstreamPos(bs); |
589 |
|
|
590 |
/* code block coeffs */ |
/* code block coeffs */ |
752 |
} |
} |
753 |
} |
} |
754 |
|
|
755 |
|
bits = BitstreamPos(bs); |
756 |
|
|
757 |
switch (mb->mode) { |
switch (mb->mode) { |
758 |
case MODE_INTERPOLATE: |
case MODE_INTERPOLATE: |
769 |
CodeVector(bs, mb->pmvs[3].y, 1); /* prediction is always (0,0) */ |
CodeVector(bs, mb->pmvs[3].y, 1); /* prediction is always (0,0) */ |
770 |
default: break; |
default: break; |
771 |
} |
} |
772 |
|
pStat->iMVBits += BitstreamPos(bs) - bits; |
773 |
|
|
774 |
bits = BitstreamPos(bs); |
bits = BitstreamPos(bs); |
775 |
for (i = 0; i < 6; i++) { |
for (i = 0; i < 6; i++) { |