Struct HevcFrameInfo
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
KindHevcPictureKindThe type of its NAL units.
IsIrapboolWhether it is an IRAP picture (IDR, CRA or BLA), where decoding can start.
PocintPicOrderCntVal: its place in output order within its coded video sequence.
WidthintThe width of its conformance window, the picture as shown.
HeightintThe height of its conformance window.
BitDepthintThe bit depth of its samples (the larger of luma's and chroma's).
ChromaChromaFormatIts chroma format.
TemporalIdintIts temporal sub-layer (TemporalId).
ColorColorCodePointsIts 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
Chroma
Its chroma format.
public ChromaFormat Chroma { get; init; }
Property Value
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
Height
The height of its conformance window.
public int Height { get; init; }
Property Value
IsIrap
Whether it is an IRAP picture (IDR, CRA or BLA), where decoding can start.
public bool IsIrap { get; init; }
Property Value
Kind
The type of its NAL units.
public HevcPictureKind Kind { get; init; }
Property Value
Poc
PicOrderCntVal: its place in output order within its coded video sequence.
public int Poc { get; init; }
Property Value
TemporalId
Its temporal sub-layer (TemporalId).
public int TemporalId { get; init; }
Property Value
Width
The width of its conformance window, the picture as shown.
public int Width { get; init; }