688 |
BitstreamPutBit(bs, 1); // vol_control_parameters |
BitstreamPutBit(bs, 1); // vol_control_parameters |
689 |
BitstreamPutBits(bs, 1, 2); // chroma_format 1="4:2:0" |
BitstreamPutBits(bs, 1, 2); // chroma_format 1="4:2:0" |
690 |
|
|
|
#ifdef BFRAMES |
|
|
if (pParam->max_bframes > 0) { |
|
|
BitstreamPutBit(bs, 0); // low_delay |
|
|
} else |
|
|
#endif |
|
|
{ |
|
691 |
BitstreamPutBit(bs, 1); // low_delay |
BitstreamPutBit(bs, 1); // low_delay |
692 |
} |
|
693 |
BitstreamPutBit(bs, 0); // vbv_parameters (0=not given) |
BitstreamPutBit(bs, 0); // vbv_parameters (0=not given) |
694 |
|
|
695 |
BitstreamPutBits(bs, 0, 2); // video_object_layer_shape (0=rectangular) |
BitstreamPutBits(bs, 0, 2); // video_object_layer_shape (0=rectangular) |
696 |
|
|
697 |
WRITE_MARKER(); |
WRITE_MARKER(); |
698 |
|
|
699 |
/* time_increment_resolution; ignored by current decore versions |
/* |
700 |
eg. 2fps res=2 inc=1 |
* time_increment_resolution; ignored by current decore versions |
701 |
25fps res=25 inc=1 |
* eg. 2fps res=2 inc=1 |
702 |
29.97fps res=30000 inc=1001 |
* 25fps res=25 inc=1 |
703 |
|
* 29.97fps res=30000 inc=1001 |
704 |
*/ |
*/ |
|
#ifdef BFRAMES |
|
705 |
BitstreamPutBits(bs, pParam->fbase, 16); |
BitstreamPutBits(bs, pParam->fbase, 16); |
706 |
#else |
|
|
BitstreamPutBits(bs, pParam->fbase, 16); |
|
|
#endif |
|
707 |
|
|
708 |
WRITE_MARKER(); |
WRITE_MARKER(); |
709 |
|
|
|
#ifdef BFRAMES |
|
710 |
BitstreamPutBit(bs, 1); // fixed_vop_rate = 1 |
BitstreamPutBit(bs, 1); // fixed_vop_rate = 1 |
711 |
BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase)); // fixed_vop_time_increment |
BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase)); // fixed_vop_time_increment |
|
#else |
|
|
BitstreamPutBit(bs, 1); // fixed_vop_rate = 1 |
|
|
BitstreamPutBits(bs, pParam->fincr, log2bin(pParam->fbase)); // fixed_vop_time_increment |
|
|
#endif |
|
712 |
|
|
713 |
WRITE_MARKER(); |
WRITE_MARKER(); |
714 |
BitstreamPutBits(bs, pParam->width, 13); // width |
BitstreamPutBits(bs, pParam->width, 13); // width |
766 |
BitstreamPutBits(bs, frame->coding_type, 2); |
BitstreamPutBits(bs, frame->coding_type, 2); |
767 |
|
|
768 |
// time_base = 0 write n x PutBit(1), PutBit(0) |
// time_base = 0 write n x PutBit(1), PutBit(0) |
|
#ifdef BFRAMES |
|
|
for (i = 0; i < frame->seconds; i++) { |
|
|
BitstreamPutBit(bs, 1); |
|
|
} |
|
|
BitstreamPutBit(bs, 0); |
|
|
#else |
|
769 |
for (i = 0; i < frame->seconds; i++) { |
for (i = 0; i < frame->seconds; i++) { |
770 |
BitstreamPutBit(bs, 1); |
BitstreamPutBit(bs, 1); |
771 |
} |
} |
772 |
BitstreamPutBit(bs, 0); |
BitstreamPutBit(bs, 0); |
|
// BitstreamPutBits(bs, 0, 1); |
|
|
#endif |
|
773 |
|
|
774 |
WRITE_MARKER(); |
WRITE_MARKER(); |
775 |
|
|
776 |
// time_increment: value=nth_of_sec, nbits = log2(resolution) |
// time_increment: value=nth_of_sec, nbits = log2(resolution) |
|
#ifdef BFRAMES |
|
|
BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase)); |
|
|
/*DPRINTF("[%i:%i] %c\n", frame->seconds, frame->ticks, |
|
|
frame->coding_type == I_VOP ? 'I' : frame->coding_type == |
|
|
P_VOP ? 'P' : 'B');*/ |
|
|
#else |
|
777 |
BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase)); |
BitstreamPutBits(bs, frame->ticks, log2bin(pParam->fbase)); |
|
// BitstreamPutBits(bs, 1, 1); |
|
|
#endif |
|
778 |
|
|
779 |
WRITE_MARKER(); |
WRITE_MARKER(); |
780 |
|
|