Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
        public byte[] GetRGBA(ColourSpace colour)
        {
            switch (colour)
            {
            case ColourSpace.BT709:
                return(BT709ColourSpaceConverter.ToRGBA8(_data));

            default:
                throw new ArgumentOutOfRangeException("colour");
            }
        }
Exemplo n.º 3
0
        private static Func <byte[], byte[]> GetRGBAToYcbCrConverter(ColourSpace colour)
        {
            switch (colour)
            {
            case ColourSpace.BT709:
                return(BT709ColourSpaceConverter.RGBAToYCbCrA10Bit422);

            default:
                throw new ArgumentOutOfRangeException("colour");
            }
        }
Exemplo n.º 4
0
            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));
            }
Exemplo n.º 5
0
 public static extern bool Transcode(IntPtr pPvrTexture, PixelFormat ptFormat, VariableType eChannelType, ColourSpace eColourspace, CompressorQuality eQuality = CompressorQuality.PVRTCNormal, bool bDoDither = false);
Exemplo n.º 6
0
 public static extern IntPtr CreateTexture(IntPtr data, uint u32Width, uint u32Height, uint u32Depth, PixelFormat ptFormat, bool preMultiplied, VariableType eChannelType, ColourSpace eColourspace);
Exemplo n.º 7
0
 public static AtemFrame FromRGBA(string name, byte[] data, ColourSpace colour)
 {
     return(new AtemFrame(name, GetRGBAToYcbCrConverter(colour)(data)));
 }
Exemplo n.º 8
0
        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();
        }