Ejemplo n.º 1
0
        private void Execute(NvGpuVmm Vmm, int[] Arguments)
        {
            StructUnpacker Unpacker = new StructUnpacker(Vmm, ConfigStructAddress + 0x20);

            SurfacePixelFormat PixelFormat = (SurfacePixelFormat)Unpacker.Read(7);

            int ChromaLocHoriz = Unpacker.Read(2);
            int ChromaLocVert  = Unpacker.Read(2);

            int BlockLinearKind       = Unpacker.Read(4);
            int BlockLinearHeightLog2 = Unpacker.Read(4);

            int Reserved0 = Unpacker.Read(3);
            int Reserved1 = Unpacker.Read(10);

            int SurfaceWidthMinus1  = Unpacker.Read(14);
            int SurfaceHeightMinus1 = Unpacker.Read(14);

            int GobBlockHeight = 1 << BlockLinearHeightLog2;

            int SurfaceWidth  = SurfaceWidthMinus1 + 1;
            int SurfaceHeight = SurfaceHeightMinus1 + 1;

            SurfaceOutputConfig OutputConfig = new SurfaceOutputConfig(
                PixelFormat,
                SurfaceWidth,
                SurfaceHeight,
                GobBlockHeight,
                OutputSurfaceLumaAddress,
                OutputSurfaceChromaUAddress,
                OutputSurfaceChromaVAddress);

            Gpu.VideoDecoder.CopyPlanes(Vmm, OutputConfig);
        }
Ejemplo n.º 2
0
        private void Execute(NvGpuVmm vmm, int[] arguments)
        {
            StructUnpacker unpacker = new StructUnpacker(vmm, _configStructAddress + 0x20);

            SurfacePixelFormat pixelFormat = (SurfacePixelFormat)unpacker.Read(7);

            int chromaLocHoriz = unpacker.Read(2);
            int chromaLocVert  = unpacker.Read(2);

            int blockLinearKind       = unpacker.Read(4);
            int blockLinearHeightLog2 = unpacker.Read(4);

            int reserved0 = unpacker.Read(3);
            int reserved1 = unpacker.Read(10);

            int surfaceWidthMinus1  = unpacker.Read(14);
            int surfaceHeightMinus1 = unpacker.Read(14);

            int gobBlockHeight = 1 << blockLinearHeightLog2;

            int surfaceWidth  = surfaceWidthMinus1 + 1;
            int surfaceHeight = surfaceHeightMinus1 + 1;

            SurfaceOutputConfig outputConfig = new SurfaceOutputConfig(
                pixelFormat,
                surfaceWidth,
                surfaceHeight,
                gobBlockHeight,
                _outputSurfaceLumaAddress,
                _outputSurfaceChromaUAddress,
                _outputSurfaceChromaVAddress);

            _gpu.VideoDecoder.CopyPlanes(vmm, outputConfig);
        }
Ejemplo n.º 3
0
        private void Execute(GpuContext gpu)
        {
            StructUnpacker unpacker = new StructUnpacker(gpu.MemoryAccessor, _configStructAddress + 0x20);

            SurfacePixelFormat pixelFormat = (SurfacePixelFormat)unpacker.Read(7);

            int chromaLocHoriz = unpacker.Read(2);
            int chromaLocVert  = unpacker.Read(2);

            int blockLinearKind       = unpacker.Read(4);
            int blockLinearHeightLog2 = unpacker.Read(4);

            int reserved0 = unpacker.Read(3);
            int reserved1 = unpacker.Read(10);

            int surfaceWidthMinus1  = unpacker.Read(14);
            int surfaceHeightMinus1 = unpacker.Read(14);

            int gobBlockHeight = 1 << blockLinearHeightLog2;

            int surfaceWidth  = surfaceWidthMinus1 + 1;
            int surfaceHeight = surfaceHeightMinus1 + 1;

            SurfaceOutputConfig outputConfig = new SurfaceOutputConfig(
                pixelFormat,
                surfaceWidth,
                surfaceHeight,
                gobBlockHeight,
                _outputSurfaceLumaAddress,
                _outputSurfaceChromaUAddress,
                _outputSurfaceChromaVAddress);

            _vdec.CopyPlanes(gpu, outputConfig);
        }