1197 |
|
|
1198 |
if (pParam->fincr>0) { |
if (pParam->fincr>0) { |
1199 |
BitstreamPutBit(bs, 1); /* fixed_vop_rate = 1 */ |
BitstreamPutBit(bs, 1); /* fixed_vop_rate = 1 */ |
1200 |
BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase-1)); /* fixed_vop_time_increment */ |
BitstreamPutBits(bs, pParam->fincr, MAX(log2bin(pParam->fbase-1),1)); /* fixed_vop_time_increment */ |
1201 |
}else{ |
}else{ |
1202 |
BitstreamPutBit(bs, 0); /* fixed_vop_rate = 0 */ |
BitstreamPutBit(bs, 0); /* fixed_vop_rate = 0 */ |
1203 |
} |
} |
1272 |
} |
} |
1273 |
|
|
1274 |
/* xvid id */ |
/* xvid id */ |
|
#define XVID_ID "XviD" XVID_BS_VERSION |
|
1275 |
{ |
{ |
1276 |
char xvid_id_string[100]; |
const char xvid_user_format[] = "XviD%04d%c"; |
1277 |
|
char xvid_user_data[100]; |
1278 |
if (frame->vop_flags & XVID_VOP_CARTOON) |
sprintf(xvid_user_data, |
1279 |
sprintf(xvid_id_string, "%sC", XVID_ID); |
xvid_user_format, |
1280 |
else |
XVID_BS_VERSION, |
1281 |
sprintf(xvid_id_string, "%s", XVID_ID); |
(frame->vop_flags & XVID_VOP_CARTOON)?'C':'\0'); |
1282 |
|
BitstreamWriteUserData(bs, xvid_user_data, strlen(xvid_user_data)); |
|
BitstreamWriteUserData(bs, xvid_id_string, strlen(xvid_id_string)); |
|
1283 |
} |
} |
1284 |
} |
} |
1285 |
|
|
1321 |
WRITE_MARKER(); |
WRITE_MARKER(); |
1322 |
|
|
1323 |
/* time_increment: value=nth_of_sec, nbits = log2(resolution) */ |
/* time_increment: value=nth_of_sec, nbits = log2(resolution) */ |
1324 |
|
BitstreamPutBits(bs, frame->ticks, MAX(log2bin(pParam->fbase-1), 1)); |
|
BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase-1)); |
|
1325 |
#if 0 |
#if 0 |
1326 |
DPRINTF("[%i:%i] %c", |
DPRINTF("[%i:%i] %c", |
1327 |
frame->seconds, frame->ticks, |
frame->seconds, frame->ticks, |