package frame import ( "git.gammaspectra.live/S.O.N.G/Ignite/color" "git.gammaspectra.live/S.O.N.G/Ignite/utilities" ) type AllowedFrameTypes interface { uint8 | uint16 } type Frame interface { Properties() Properties // PTS usually frame number, but can differ on VFR PTS() int64 // Get16 get a pixel sample in 16-bit depth Get16(x, y int) (Y uint16, Cb uint16, Cr uint16) // Get8 get a pixel sample in 8-bit depth Get8(x, y int) (Y uint8, Cb uint8, Cr uint8) } type TypedFrame[T AllowedFrameTypes] interface { Frame // GetNative get a pixel sample in native bit depth GetNative(x, y int) (Y T, Cb T, Cr T) // GetNativeLuma also known as Y. Do not keep references to this slice, copy instead. GetNativeLuma() []T // GetNativeCb also known as U. Do not keep references to this slice, copy instead. GetNativeCb() []T // GetNativeCr also known as V. Do not keep references to this slice, copy instead. GetNativeCr() []T } type Properties struct { //TODO: HDR Width int Height int PixelAspectRatio utilities.Ratio ColorSpace color.Space FullColorRange bool }