24 lines
468 B
Go
24 lines
468 B
Go
package frame
|
|
|
|
import "git.gammaspectra.live/S.O.N.G/Ignite/colorspace"
|
|
|
|
type AllowedFrameTypes interface {
|
|
uint8 | uint16
|
|
}
|
|
|
|
type Frame interface {
|
|
Width() int
|
|
Height() int
|
|
ColorSpace() colorspace.ColorSpace
|
|
Get16(x, y int) (Y uint16, Cb uint16, Cr uint16)
|
|
Get8(x, y int) (Y uint8, Cb uint8, Cr uint8)
|
|
}
|
|
|
|
type TypedFrame[T AllowedFrameTypes] interface {
|
|
Frame
|
|
GetNative(x, y int) (Y T, Cb T, Cr T)
|
|
GetNativeLuma() []T
|
|
GetNativeCb() []T
|
|
GetNativeCr() []T
|
|
}
|