513 |
DPRINTF(DPRINTF_HEADER, "vol id %i", start_code & VIDOBJLAY_START_CODE_MASK); |
DPRINTF(DPRINTF_HEADER, "vol id %i", start_code & VIDOBJLAY_START_CODE_MASK); |
514 |
|
|
515 |
BitstreamSkip(bs, 32); // video_object_layer_start_code |
BitstreamSkip(bs, 32); // video_object_layer_start_code |
|
|
|
516 |
BitstreamSkip(bs, 1); // random_accessible_vol |
BitstreamSkip(bs, 1); // random_accessible_vol |
517 |
|
|
518 |
// video_object_type_indication |
BitstreamSkip(bs, 8); // video_object_type_indication |
|
if (BitstreamShowBits(bs, 8) != VIDOBJLAY_TYPE_SIMPLE && |
|
|
BitstreamShowBits(bs, 8) != VIDOBJLAY_TYPE_CORE && |
|
|
BitstreamShowBits(bs, 8) != VIDOBJLAY_TYPE_MAIN && |
|
|
BitstreamShowBits(bs, 8) != VIDOBJLAY_TYPE_ACE && |
|
|
BitstreamShowBits(bs, 8) != VIDOBJLAY_TYPE_ART_SIMPLE && |
|
|
BitstreamShowBits(bs, 8) != VIDOBJLAY_TYPE_ASP && |
|
|
BitstreamShowBits(bs, 8) != 0) // BUGGY DIVX |
|
|
{ |
|
|
DPRINTF(DPRINTF_ERROR,"video_object_type_indication %i not supported ", |
|
|
BitstreamShowBits(bs, 8)); |
|
|
return -1; |
|
|
} |
|
|
BitstreamSkip(bs, 8); |
|
|
|
|
519 |
|
|
520 |
if (BitstreamGetBit(bs)) // is_object_layer_identifier |
if (BitstreamGetBit(bs)) // is_object_layer_identifier |
521 |
{ |
{ |
1114 |
static const unsigned int vo_id = 0; |
static const unsigned int vo_id = 0; |
1115 |
static const unsigned int vol_id = 0; |
static const unsigned int vol_id = 0; |
1116 |
int vol_ver_id=1; |
int vol_ver_id=1; |
|
int profile = 0x03; /* simple profile/level 3 */ |
|
1117 |
int vol_type_ind=VIDOBJLAY_TYPE_SIMPLE; |
int vol_type_ind=VIDOBJLAY_TYPE_SIMPLE; |
1118 |
|
|
1119 |
if ( (pParam->vol_flags & XVID_VOL_QUARTERPEL) || |
if ( (pParam->vol_flags & XVID_VOL_QUARTERPEL) || |
1122 |
vol_ver_id = 2; |
vol_ver_id = 2; |
1123 |
|
|
1124 |
if ((pParam->vol_flags & XVID_VOL_REDUCED_ENABLE)) { |
if ((pParam->vol_flags & XVID_VOL_REDUCED_ENABLE)) { |
|
profile = 0x93; /* advanced realtime simple profile/level 3 */ |
|
1125 |
vol_type_ind = VIDOBJLAY_TYPE_ART_SIMPLE; |
vol_type_ind = VIDOBJLAY_TYPE_ART_SIMPLE; |
1126 |
} |
} |
1127 |
|
|
1128 |
if ((pParam->vol_flags & XVID_VOL_QUARTERPEL) || |
if ((pParam->vol_flags & XVID_VOL_QUARTERPEL) || |
1129 |
(pParam->vol_flags & XVID_VOL_GMC)) { |
(pParam->vol_flags & XVID_VOL_GMC)) { |
|
profile = 0xf3; /* advanced simple profile/level 2 */ |
|
1130 |
vol_type_ind = VIDOBJLAY_TYPE_ASP; |
vol_type_ind = VIDOBJLAY_TYPE_ASP; |
1131 |
} |
} |
1132 |
|
|
1135 |
/* no padding here, anymore. You have to make sure that you are |
/* no padding here, anymore. You have to make sure that you are |
1136 |
byte aligned, and that always 1-8 padding bits have been written */ |
byte aligned, and that always 1-8 padding bits have been written */ |
1137 |
|
|
1138 |
|
if (pParam->profile) { |
1139 |
BitstreamPutBits(bs, VISOBJSEQ_START_CODE, 32); |
BitstreamPutBits(bs, VISOBJSEQ_START_CODE, 32); |
1140 |
BitstreamPutBits(bs, profile, 8); |
BitstreamPutBits(bs, pParam->profile, 8); |
1141 |
|
} |
1142 |
|
|
1143 |
// visual_object_start_code |
// visual_object_start_code |
1144 |
BitstreamPad(bs); |
BitstreamPad(bs); |
1155 |
BitstreamPutBits(bs, VIDOBJLAY_START_CODE|(vol_id&0x4), 32); |
BitstreamPutBits(bs, VIDOBJLAY_START_CODE|(vol_id&0x4), 32); |
1156 |
|
|
1157 |
BitstreamPutBit(bs, 0); // random_accessible_vol |
BitstreamPutBit(bs, 0); // random_accessible_vol |
1158 |
BitstreamPutBits(bs, 0, 8); // video_object_type_indication |
BitstreamPutBits(bs, vol_type_ind, 8); // video_object_type_indication |
1159 |
|
|
1160 |
if (vol_ver_id == 1) |
if (vol_ver_id == 1) |
1161 |
{ |
{ |