HEVC/H.265 规范可在此处免费获得。但是,它不包含有关原子hvc1和hvcC原子的信息。这些在MPEG-4 Part 15中定义,它基本上是 ISO 基本媒体文件格式(mp4 的基础)的扩展,用于承载 AVC 和 HEVC 内容。对于 HEVC,您(至少)需要 2014 年的版本,因为早期版本仅包含有关 AVC 的信息。不幸的是,这个规范不是免费的。
如果这会阻止您获得规范,请提供一些进一步的指导:hvc1/hev1框的解析方式与avc1/ 2/ 3/4框完全相同。hvcC不过,盒子的解析方式与avcC盒子略有不同。为了解析那个,你可以看看它在一些开源项目中是如何解析的,比如 ffmpeg 或vlc。
我已经使用这个结构来解析它。我取自 ISO/IEC 14496-15:2014。
aligned(8) class HEVCDecoderConfigurationRecord
{
unsigned int(8) configurationVersion = 1;
unsigned int(2) general_profile_space;
unsigned int(1) general_tier_flag;
unsigned int(5) general_profile_idc;
unsigned int(32) general_profile_compatibility_flags;
unsigned int(48) general_constraint_indicator_flags;
unsigned int(8) general_level_idc;
bit(4) reserved = ‘1111’b;
unsigned int(12) min_spatial_segmentation_idc;
bit(6) reserved = ‘111111’b;
unsigned int(2) parallelismType;
bit(6) reserved = ‘111111’b;
unsigned int(2) chroma_format_idc;
bit(5) reserved = ‘11111’b;
unsigned int(3) bit_depth_luma_minus8;
bit(5) reserved = ‘11111’b;
unsigned int(3) bit_depth_chroma_minus8;
bit(16) avgFrameRate;
bit(2) constantFrameRate;
bit(3) numTemporalLayers;
bit(1) temporalIdNested;
unsigned int(2) lengthSizeMinusOne;
unsigned int(8) numOfArrays;
for (j=0; j < numOfArrays; j++)
{
bit(1) array_completeness;
unsigned int(1) reserved = 0;
unsigned int(6) NAL_unit_type;
unsigned int(16) numNalus;
for (i=0; i< numNalus; i++)
{
unsigned int(16) nalUnitLength;
bit(8*nalUnitLength) nalUnit;
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4739 次 |
| 最近记录: |