Vixen
02b45cc4
csharp
public readonly record struct VideoFormat

What a decoder produces: a size, a layout, and how to read the samples.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The layout and the two colour fields travel together because a plane of bytes means nothing without them, and every place that has ever separated them has eventually shown somebody a green picture.

Fields and properties (9)

  • public int Width

    The picture's width in luma samples.

  • public int Height

    Its height in luma samples.

  • public VideoPixelLayout Layout

    How the planes are arranged.

  • public VideoRational FrameRate

    The nominal rate, or Unknown.

  • public VideoColourRange Range

    Whether the samples are full-range or limited-range.

  • public VideoColourMatrix Matrix

    Which coefficients convert them.

  • public bool IsValid

    Whether this describes something that could actually be decoded into.

  • public int PlaneCount

    How many planes a frame in this format has.

  • public int FrameSize

    How many bytes a frame in this format occupies, tightly packed.

Methods (4)

  • public VideoFormat(int Width, int Height, VideoPixelLayout Layout, VideoRational FrameRate = default(VideoRational), VideoColourRange Range = Limited, VideoColourMatrix Matrix = Bt709)

    What a decoder produces: a size, a layout, and how to read the samples.

  • public int PlaneWidth(int plane)

    How wide a plane is, in samples.

  • public int PlaneHeight(int plane)

    How tall a plane is, in rows.

  • public bool IsCompatibleWith(in VideoFormat other)

    Whether two formats describe the same bytes, ignoring the nominal frame rate.

Used by (23)

  • VideoGameVideoPlayback
  • ColourRoundTripTestsVixen.Video.Tests
  • CountingCodecVixen.Video.Tests
  • CountingFactoryVixen.Video.Tests
  • IVideoCodecVixen.Video
  • IVideoStreamDecoderVixen.Video
  • StarvedDecoderVixen.Video.Tests
  • StepDecoderVixen.Video.Tests
  • UncompressedVideoCodecVixen.Video
  • VideoColourConversionVixen.Video
  • VideoColourConversionTestsVixen.Video.Tests
  • VideoConstantsVixen.Video.Rendering
  • VideoConstantsTestsVixen.Video.Rendering.Tests
  • VideoFrameVixen.Video
  • VideoFramePoolVixen.Video
  • VideoFrameTestsVixen.Video.Tests
  • VideoPlaybackTestsVixen.Video.Tests
  • VideoPlayerVixen.Video
  • VideoRendererTestsVixen.Video.Rendering.Tests
  • VideoTextureVixen.Video
  • VideoTextureTestsVixen.Video.Tests
  • WebMVideoStreamDecoderVixen.Video
  • WebMVideoStreamDecoderTestsVixen.Video.Tests