1
0
Fork 0

Detect index HDR10+ and Dolby Vision flags

This commit is contained in:
rapperskull 2020-04-26 23:23:27 +02:00 committed by hpi1
parent bfceb00170
commit 9795d2e10f
2 changed files with 13 additions and 8 deletions

View File

@ -198,7 +198,7 @@ static int _parse_header(BITSTREAM *bs,
static int _parse_indx_extension_hevc(BITSTREAM *bs, INDX_ROOT *index)
{
uint32_t len;
unsigned unk0, unk1, unk2, unk3, unk4;
unsigned unk0, unk1, unk2, unk3, unk4, unk5;
len = bs_read(bs, 32);
if (len < 8) {
@ -210,18 +210,21 @@ static int _parse_indx_extension_hevc(BITSTREAM *bs, INDX_ROOT *index)
unk0 = bs_read(bs, 3);
index->exist_4k_flag = bs_read(bs, 1);
unk1 = bs_read(bs, 8);
unk2 = bs_read(bs, 6);
unk2 = bs_read(bs, 3);
index->hdrplus_flag = bs_read(bs, 1);
unk3 = bs_read(bs, 1);
index->dv_flag = bs_read(bs, 1);
index->hdr_flags = bs_read(bs, 2);
unk3 = bs_read(bs, 8);
unk4 = bs_read(bs, 32);
unk4 = bs_read(bs, 8);
unk5 = bs_read(bs, 32);
BD_DEBUG(DBG_NAV, "UHD disc type: %d, 4k: %d, HDR: %d\n",
index->disc_type, index->exist_4k_flag, index->hdr_flags);
BD_DEBUG(DBG_NAV, "UHD disc type: %d, 4k: %d, HDR: %d, HDR10+: %d, Dolby Vision: %d\n",
index->disc_type, index->exist_4k_flag, index->hdr_flags, index->hdrplus_flag, index->dv_flag);
if (unk0 | unk1 | unk2 | unk3 | unk4) {
if (unk0 | unk1 | unk2 | unk3 | unk4 | unk5) {
BD_DEBUG(DBG_CRIT|DBG_NAV,
"index.bdmv: unknown data in extension 3.1: "
"0x%02x 0x%02x 0x%02x 0x%02x 0x%08x\n", unk0, unk1, unk2, unk3, unk4);
"0x%01x 0x%02x 0x%01x 0x%01x 0x%02x 0x%08x\n", unk0, unk1, unk2, unk3, unk4, unk5);
}
return 1;

View File

@ -118,6 +118,8 @@ typedef struct indx_root_s {
/* UHD extension */
uint8_t disc_type;
uint8_t exist_4k_flag;
uint8_t hdrplus_flag;
uint8_t dv_flag;
uint8_t hdr_flags;
} INDX_ROOT;