Table of Contents

Struct HevcFrameInfo

Namespace
Egami.Heic
Assembly
Egami.Heic.dll

What an HEVC picture was, as TryReceiveFrame(YuvRaster, out HevcFrameInfo) gives it.

public readonly record struct HevcFrameInfo : IEquatable<HevcFrameInfo>
Implements
Inherited Members

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++;
}

Constructors

HevcFrameInfo(HevcPictureKind, bool, int, int, int, int, ChromaFormat, int, ColorCodePoints)

What an HEVC picture was, as TryReceiveFrame(YuvRaster, out HevcFrameInfo) gives it.

public HevcFrameInfo(HevcPictureKind Kind, bool IsIrap, int Poc, int Width, int Height, int BitDepth, ChromaFormat Chroma, int TemporalId, ColorCodePoints Color)

Parameters

Kind HevcPictureKind

The type of its NAL units.

IsIrap bool

Whether it is an IRAP picture (IDR, CRA or BLA), where decoding can start.

Poc int

PicOrderCntVal: its place in output order within its coded video sequence.

Width int

The width of its conformance window, the picture as shown.

Height int

The height of its conformance window.

BitDepth int

The bit depth of its samples (the larger of luma's and chroma's).

Chroma ChromaFormat

Its chroma format.

TemporalId int

Its temporal sub-layer (TemporalId).

Color ColorCodePoints

Its colour from the sequence's VUI, or the HD or SD default when the VUI leaves it unspecified.

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++;
}

Properties

BitDepth

The bit depth of its samples (the larger of luma's and chroma's).

public int BitDepth { get; init; }

Property Value

int

Chroma

Its chroma format.

public ChromaFormat Chroma { get; init; }

Property Value

ChromaFormat

Color

Its colour from the sequence's VUI, or the HD or SD default when the VUI leaves it unspecified.

public ColorCodePoints Color { get; init; }

Property Value

ColorCodePoints

Height

The height of its conformance window.

public int Height { get; init; }

Property Value

int

IsIrap

Whether it is an IRAP picture (IDR, CRA or BLA), where decoding can start.

public bool IsIrap { get; init; }

Property Value

bool

Kind

The type of its NAL units.

public HevcPictureKind Kind { get; init; }

Property Value

HevcPictureKind

Poc

PicOrderCntVal: its place in output order within its coded video sequence.

public int Poc { get; init; }

Property Value

int

TemporalId

Its temporal sub-layer (TemporalId).

public int TemporalId { get; init; }

Property Value

int

Width

The width of its conformance window, the picture as shown.

public int Width { get; init; }

Property Value

int