Example #1
0
 public static extern nvjpegStatus nvjpegDecodeJpeg(
     nvjpegHandle handle,
     nvjpegJpegDecoder decoder,
     nvjpegJpegState decoder_state,
     nvjpegJpegStream jpeg_bitstream,
     ref nvjpegImage destination,
     nvjpegDecodeParams decode_params,
     CUstream stream);
Example #2
0
 /// <summary>
 /// </summary>
 internal DecodeParams(NvJpeg nvJpeg)
 {
     _nvJpeg = nvJpeg;
     _params = new nvjpegDecodeParams();
     res     = NvJpegNativeMethods.nvjpegDecodeParamsCreate(nvJpeg.Handle, ref _params);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegDecodeParamsCreate", res));
     if (res != nvjpegStatus.Success)
     {
         throw new NvJpegException(res);
     }
 }
Example #3
0
        public bool DecodeBatchedSupportedEx(nvjpegDecodeParams decodeParams)
        {
            int batchSupported = 0;

            res = NvJpegNativeMethods.nvjpegDecodeBatchedSupportedEx(_nvJpeg.Handle, _stream, decodeParams, ref batchSupported);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegDecodeBatchedSupportedEx", res));
            if (res != nvjpegStatus.Success)
            {
                throw new NvJpegException(res);
            }
            return(batchSupported > 0);
        }
Example #4
0
 public static extern nvjpegStatus nvjpegDecodeJpegHost(
     nvjpegHandle handle,
     nvjpegJpegDecoder decoder,
     nvjpegJpegState decoder_state,
     nvjpegDecodeParams decode_params,
     nvjpegJpegStream jpeg_stream);
Example #5
0
 public static extern nvjpegStatus nvjpegDecodeBatchedSupportedEx(nvjpegHandle handle,
                                                                  nvjpegJpegStream jpeg_stream,
                                                                  nvjpegDecodeParams decode_params,
                                                                  ref int is_supported);
Example #6
0
 public static extern nvjpegStatus nvjpegDecoderJpegSupported(nvjpegJpegDecoder decoder_handle,
                                                              nvjpegJpegStream jpeg_stream,
                                                              nvjpegDecodeParams decode_params,
                                                              ref int is_supported);
Example #7
0
 public static extern nvjpegStatus nvjpegDecodeParamsSetScaleFactor(
     nvjpegDecodeParams decode_params,
     nvjpegScaleFactor scale_factor);
Example #8
0
 public static extern nvjpegStatus nvjpegDecodeParamsSetAllowCMYK(
     nvjpegDecodeParams decode_params,
     int allow_cmyk);
Example #9
0
 public static extern nvjpegStatus nvjpegDecodeParamsSetROI(
     nvjpegDecodeParams decode_params,
     int offset_x, int offset_y, int roi_width, int roi_height);
Example #10
0
 public static extern nvjpegStatus nvjpegDecodeParamsSetOutputFormat(
     nvjpegDecodeParams decode_params,
     nvjpegOutputFormat output_format);
Example #11
0
 public static extern nvjpegStatus nvjpegDecodeParamsDestroy(nvjpegDecodeParams decode_params);
Example #12
0
 public static extern nvjpegStatus nvjpegDecodeParamsCreate(
     nvjpegHandle handle,
     ref nvjpegDecodeParams decode_params);