Exemple #1
0
 public LinuxEngine(iSimdUtils simd, Rational?displayRefresh)
 {
     MiscUtils.simd      = simd;
     h264                = new H264(VideoDevice.open(h264DecoderDevice));
     this.displayRefresh = displayRefresh;
     // Logger.logVerbose( "Decoder: {0}", h264.ToString() );
     // PrintSizeofs.print();
 }
Exemple #2
0
 public static void applyPcmVolume(this iSimdUtils utils, Span <short> span, byte volume)
 {
     if (volume == 0xFF)
     {
         return;
     }
     unsafe
     {
         fixed(short *ptr = span)
         utils.applyPcmVolume(ptr, span.Length, volume);
     }
 }
Exemple #3
0
        public static void offsetGlyphs(this iSimdUtils utils, Span <sVertexWithId> dest, ReadOnlySpan <sGlyphVertex> source, CPoint offsetValue)
        {
            if (source.IsEmpty || dest.IsEmpty || dest.Length < source.Length || 0 != (source.Length % 4))
            {
                throw new ArgumentException();
            }

            int count = source.Length;

            unsafe
            {
                fixed(sGlyphVertex *ptr = source)
                {
                    IntPtr sourcePtr = (IntPtr)ptr;

                    utils.offsetGlyphs(ref dest.GetPinnableReference(), sourcePtr, count, offsetValue);
                }
            }
        }
Exemple #4
0
 /// <summary>Get a function pointer to compute interleaved 16-bit PCM samples from the output of Dolby AC3 decoder</summary>
 public static pfnInterleaveFunc interleaveDolby(this iSimdUtils utils, byte channelsCount)
 {
     utils.interleaveDolby(out var pfn, channelsCount);
     return(Marshal.GetDelegateForFunctionPointer <pfnInterleaveFunc>(pfn));
 }