public bool Transcode(PixelFormat ptFormat, VariableType eChannelType, ColourSpace eColourspace, CompressorQuality eQuality = CompressorQuality.PVRTCNormal, bool bDoDither = false) { if (IsDisposed) { throw new ObjectDisposedException("_pPvrTexture"); } return(Transcode(_pPvrTexture, ptFormat, eChannelType, eColourspace, eQuality, bDoDither)); }
public byte[] GetRGBA(ColourSpace colour) { switch (colour) { case ColourSpace.BT709: return(BT709ColourSpaceConverter.ToRGBA8(_data)); default: throw new ArgumentOutOfRangeException("colour"); } }
private static Func <byte[], byte[]> GetRGBAToYcbCrConverter(ColourSpace colour) { switch (colour) { case ColourSpace.BT709: return(BT709ColourSpaceConverter.RGBAToYCbCrA10Bit422); default: throw new ArgumentOutOfRangeException("colour"); } }
public static PVRTexture CreateTexture <T>(T[] data, uint u32Width, uint u32Height, uint u32Depth, PixelFormat ptFormat, bool preMultiplied, VariableType eChannelType, ColourSpace eColourspace) where T : struct { var gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned); var pPvrTexture = CreateTexture(gcHandle.AddrOfPinnedObject(), u32Width, u32Height, u32Depth, ptFormat, preMultiplied, eChannelType, eColourspace); gcHandle.Free(); return(new PVRTexture(pPvrTexture)); }
public static extern bool Transcode(IntPtr pPvrTexture, PixelFormat ptFormat, VariableType eChannelType, ColourSpace eColourspace, CompressorQuality eQuality = CompressorQuality.PVRTCNormal, bool bDoDither = false);
public static extern IntPtr CreateTexture(IntPtr data, uint u32Width, uint u32Height, uint u32Depth, PixelFormat ptFormat, bool preMultiplied, VariableType eChannelType, ColourSpace eColourspace);
public static AtemFrame FromRGBA(string name, byte[] data, ColourSpace colour) { return(new AtemFrame(name, GetRGBAToYcbCrConverter(colour)(data))); }
public static void CreateTexture <T>(T[] data, uint u32Width, uint u32Height, uint u32Depth, PixelFormat ptFormat, bool preMultiplied, VariableType eChannelType, ColourSpace eColourspace) { var gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned); CreateTexture(gcHandle.AddrOfPinnedObject(), u32Width, u32Height, u32Depth, ptFormat, preMultiplied, eChannelType, eColourspace); gcHandle.Free(); }