Table of Contents

Enum HevcPictureKind

Namespace
Egami.Heic
Assembly
Egami.Heic.dll

What an HEVC picture's coded slice NAL units are (nal_unit_type, H.265 Table 7-1).

public enum HevcPictureKind

Fields

Bla = 2

A BLA picture: a CRA picture where a stream was spliced, whose skipped leading pictures are left out.

Cra = 1

A CRA picture: decodes on its own; its leading pictures may refer to pictures before it.

DecodableLeading = 4

A leading picture that decodes from the IRAP picture before it on (RADL).

Idr = 0

An IDR picture: decodes on its own and starts a coded video sequence.

SkippedLeading = 5

A leading picture that may refer to pictures before the IRAP picture (RASL).

Trailing = 3

A trailing picture (TRAIL, TSA or STSA): after the IRAP picture before it in both decoding and output order.

Examples

// An HEVC stream from any source: Annex B here, or SetConfiguration with an MP4 track's hvcC and its samples.
using HevcStreamDecoder decoder = new(context: heic);
decoder.Send(File.ReadAllBytes("clip.h265"));
decoder.Flush();                                    // the end of the stream: the last pictures come out
int shown = 0;
while (decoder.NextFrame is HevcFrameInfo next)
{
    using YuvRaster<byte> frame = YuvRaster.Create(next.Width, next.Height, next.Chroma, YuvColor.Bt709Limited);
    decoder.TryReceiveFrame(frame, out HevcFrameInfo info);     // info.Poc, info.Kind, info.Color
    shown++;
}