4

I'm looking for HEVC \ H.265 specs (especially for hvc1 and hvcC atoms) but I'm not able to find them on-line.

Is there a free spec for HEVC on-line?

Alex L
  • 1,069
  • 2
  • 18
  • 33
  • guys, anyone???? I've found this one: http://lists.matroska.org/pipermail/matroska-devel/2013-September/004567.html but since this isn't the official I don't know if I can count on it – Alex L Sep 22 '15 at 07:05
  • 1
    This link is referring to another container format. `hvc1` and `hvcC` atoms are used with all container formats derived from the ISO base media file format (e.g. mp4). The matroska container format is something different. – Bastian35022 Sep 22 '15 at 14:17

2 Answers2

11

The HEVC/H.265 spec is freely available here. However, it does not contain information about the hvc1 and the hvcC atoms. These are defined in MPEG-4 Part 15, which is basically an extension of the ISO base media file format (the basis of mp4) for carrying AVC and HEVC content. For HEVC, you need (at least) the version from 2014, as earlier versions only have information about AVC. Unfortunately, this spec is not available for free.

Some further guidance if this prevents you from getting the spec: the hvc1/hev1 box is parsed exactly the same way as the avc1/2/3/4 boxes. The hvcC box though is parsed slightly differently than the avcC box. For parsing that one, you could look at how this is parsed in some open source projects, such as ffmpeg or vlc.

rsc
  • 10,348
  • 5
  • 39
  • 36
Bastian35022
  • 1,092
  • 1
  • 10
  • 18
10

I've used this structure to parse it. I took it from 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;
        }
    }
}
t0k3n1z3r
  • 343
  • 3
  • 7