20 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
* |
* |
23 |
* $Id: bitstream.c,v 1.56 2006-03-27 11:21:48 Skal Exp $ |
* $Id: bitstream.c,v 1.57 2007-04-16 19:01:28 Skal Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
1443 |
else if (frame->coding_type == P_VOP) |
else if (frame->coding_type == P_VOP) |
1444 |
nbitsresyncmarker = NUMBITS_VP_RESYNC_MARKER-1 + frame->fcode; |
nbitsresyncmarker = NUMBITS_VP_RESYNC_MARKER-1 + frame->fcode; |
1445 |
else /* B_VOP */ |
else /* B_VOP */ |
1446 |
nbitsresyncmarker = MAX(NUMBITS_VP_RESYNC_MARKER, NUMBITS_VP_RESYNC_MARKER-1 + MAX(frame->fcode, frame->bcode)); |
nbitsresyncmarker = MAX(NUMBITS_VP_RESYNC_MARKER+1, NUMBITS_VP_RESYNC_MARKER-1 + MAX(frame->fcode, frame->bcode)); |
1447 |
|
|
1448 |
BitstreamPadAlways(bs); |
BitstreamPadAlways(bs); |
1449 |
BitstreamPutBits(bs, RESYNC_MARKER, nbitsresyncmarker); |
BitstreamPutBits(bs, RESYNC_MARKER, nbitsresyncmarker); |