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.60 2010-12-18 16:02:00 Isibaar Exp $ |
* $Id$ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
129 |
} |
} |
130 |
} |
} |
131 |
|
|
132 |
mbnum = BitstreamGetBits(bs, mbnum_bits); /* macroblock_number */ |
mbnum = (mbnum_bits == 0) ? 0 : BitstreamGetBits(bs, mbnum_bits); /* macroblock_number */ |
|
DPRINTF(XVID_DEBUG_HEADER, "mbnum %i\n", mbnum); |
|
133 |
|
|
134 |
if (dec->shape != VIDOBJLAY_SHAPE_BINARY_ONLY) |
if (dec->shape != VIDOBJLAY_SHAPE_BINARY_ONLY) |
135 |
{ |
{ |
1257 |
/* divx5 userdata string */ |
/* divx5 userdata string */ |
1258 |
#define DIVX5_ID ((char *)"DivX503b1393") |
#define DIVX5_ID ((char *)"DivX503b1393") |
1259 |
if ((pParam->global_flags & XVID_GLOBAL_DIVX5_USERDATA)) { |
if ((pParam->global_flags & XVID_GLOBAL_DIVX5_USERDATA)) { |
1260 |
BitstreamWriteUserData(bs, DIVX5_ID, strlen(DIVX5_ID)); |
BitstreamWriteUserData(bs, DIVX5_ID, (uint32_t)strlen(DIVX5_ID)); |
1261 |
if (pParam->max_bframes > 0 && (pParam->global_flags & XVID_GLOBAL_PACKED)) |
if (pParam->max_bframes > 0 && (pParam->global_flags & XVID_GLOBAL_PACKED)) |
1262 |
BitstreamPutBits(bs, 'p', 8); |
BitstreamPutBits(bs, 'p', 8); |
1263 |
} |
} |
1270 |
xvid_user_format, |
xvid_user_format, |
1271 |
XVID_BS_VERSION, |
XVID_BS_VERSION, |
1272 |
(frame->vop_flags & XVID_VOP_CARTOON)?'C':'\0'); |
(frame->vop_flags & XVID_VOP_CARTOON)?'C':'\0'); |
1273 |
BitstreamWriteUserData(bs, xvid_user_data, strlen(xvid_user_data)); |
BitstreamWriteUserData(bs, xvid_user_data, (uint32_t)strlen(xvid_user_data)); |
1274 |
} |
} |
1275 |
} |
} |
1276 |
|
|
1391 |
const char *data, |
const char *data, |
1392 |
const unsigned int length) |
const unsigned int length) |
1393 |
{ |
{ |
1394 |
int i; |
unsigned int i; |
1395 |
|
|
1396 |
BitstreamPad(bs); |
BitstreamPad(bs); |
1397 |
BitstreamPutBits(bs, USERDATA_START_CODE, 32); |
BitstreamPutBits(bs, USERDATA_START_CODE, 32); |