Skip to content

Commit b6f9496

Browse files
committed
Unify HEVC & AV1 Dolby Vision RPU parsing codes
1 parent 98db6d5 commit b6f9496

File tree

7 files changed

+656
-1005
lines changed

7 files changed

+656
-1005
lines changed

Source/MediaInfo/File__Analyze.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,27 @@ public :
932932
#if defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_MPEG4_YES) || defined(MEDIAINFO_MK_YES)
933933
void dvcC(bool has_dependency_pid=false, std::map<std::string, Ztring>* Infos=NULL);
934934
#endif
935+
#if defined(MEDIAINFO_HEVC_YES) || defined(MEDIAINFO_AV1_YES)
936+
struct DV_RPU {
937+
int8u vdr_rpu_profile{};
938+
int32u bl_bit_depth{};
939+
int32u el_bit_depth{};
940+
int32u vdr_bit_depth{};
941+
bool BL_video_full_range_flag{};
942+
int8u isMEL{};
943+
int8u content_type{};
944+
int8u white_point{};
945+
int8u sharpness{};
946+
int8u noise_reduction{};
947+
int8u mpeg_noise_reduction{};
948+
int8u frame_rate_conversion{};
949+
int8u brightness{};
950+
int8u color{};
951+
int8u profile_deduced{};
952+
};
953+
// Must be in bitstream before calling this function.
954+
void Get_DolbyVision_ReferenceProcessingUnit(DV_RPU& data);
955+
#endif
935956

936957
//***************************************************************************
937958
// Unknown

Source/MediaInfo/File__Analyze_MinimizeSize.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,27 @@ public :
800800
#if defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_MPEG4_YES) || defined(MEDIAINFO_MK_YES)
801801
void dvcC(bool has_dependency_pid=false, std::map<std::string, Ztring>* Infos=NULL);
802802
#endif
803+
#if defined(MEDIAINFO_HEVC_YES) || defined(MEDIAINFO_AV1_YES)
804+
struct DV_RPU {
805+
int8u vdr_rpu_profile{};
806+
int32u bl_bit_depth{};
807+
int32u el_bit_depth{};
808+
int32u vdr_bit_depth{};
809+
bool BL_video_full_range_flag{};
810+
int8u isMEL{};
811+
int8u content_type{};
812+
int8u white_point{};
813+
int8u sharpness{};
814+
int8u noise_reduction{};
815+
int8u mpeg_noise_reduction{};
816+
int8u frame_rate_conversion{};
817+
int8u brightness{};
818+
int8u color{};
819+
int8u profile_deduced{};
820+
};
821+
// Must be in bitstream before calling this function.
822+
void Get_DolbyVision_ReferenceProcessingUnit(DV_RPU& data);
823+
#endif
803824

804825
//***************************************************************************
805826
// Unknown

Source/MediaInfo/File__Analyze_Streams.cpp

Lines changed: 606 additions & 0 deletions
Large diffs are not rendered by default.

Source/MediaInfo/Video/File_Av1.cpp

Lines changed: 4 additions & 496 deletions
Large diffs are not rendered by default.

Source/MediaInfo/Video/File_Av1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ private :
6060
void metadata_itu_t_t35_B5();
6161
void metadata_itu_t_t35_B5_003B();
6262
void metadata_itu_t_t35_B5_003B_00000800();
63-
void Dolby_Vision_reference_processing_unit();
6463
void metadata_itu_t_t35_B5_003C();
6564
void metadata_itu_t_t35_B5_003C_0001();
6665
void metadata_itu_t_t35_B5_003C_0001_04();
@@ -81,6 +80,7 @@ private :
8180
};
8281
typedef std::map<video, Ztring[HdrFormat_Max]> hdr;
8382
hdr HDR;
83+
DV_RPU DV_RPU_data;
8484

8585
//Helpers
8686
std::string GOP_Detect(std::string PictureTypes);

Source/MediaInfo/Video/File_Hevc.cpp

Lines changed: 2 additions & 504 deletions
Large diffs are not rendered by default.

Source/MediaInfo/Video/File_Hevc.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
//---------------------------------------------------------------------------
1313
#include "MediaInfo/File__Analyze.h"
1414
#include "MediaInfo/TimeCode.h"
15-
#include <memory>
1615
//---------------------------------------------------------------------------
1716

1817
namespace MediaInfoLib
@@ -518,6 +517,7 @@ private :
518517
};
519518
typedef std::map<video, Ztring[HdrFormat_Max]> hdr;
520519
hdr HDR;
520+
DV_RPU DV_RPU_data;
521521
Ztring EtsiTS103433;
522522
int32u chroma_format_idc{};
523523
int32u slice_pic_parameter_set_id{};
@@ -533,9 +533,6 @@ private :
533533
Ztring ambient_viewing_environment_chromaticity;
534534
bool RapPicFlag{};
535535
bool first_slice_segment_in_pic_flag{};
536-
537-
//CRC Tables
538-
std::unique_ptr<int32u[]> CRC_32_Table_IEEE;
539536
};
540537

541538
} //NameSpace

0 commit comments

Comments
 (0)