public static extern nvjpegStatus nvjpegDecodeBatched( nvjpegHandle handle, nvjpegJpegState jpeg_handle, IntPtr[] data, SizeT[] lengths, nvjpegImage[] destinations, CUstream stream);
public static extern nvjpegStatus nvjpegJpegStreamParse( nvjpegHandle handle, byte[] data, SizeT length, int save_metadata, int save_stream, nvjpegJpegStream jpeg_stream);
public static extern nvjpegStatus nvjpegDecodeJpeg( nvjpegHandle handle, nvjpegJpegDecoder decoder, nvjpegJpegState decoder_state, nvjpegJpegStream jpeg_bitstream, ref nvjpegImage destination, nvjpegDecodeParams decode_params, CUstream stream);
public static extern nvjpegStatus nvjpegDecodeBatchedPreAllocate( nvjpegHandle handle, nvjpegJpegState jpeg_handle, int batch_size, int width, int height, nvjpegChromaSubsampling chroma_subsampling, nvjpegOutputFormat output_format);
public static extern nvjpegStatus nvjpegEncodeYUV( nvjpegHandle handle, nvjpegEncoderState encoder_state, nvjpegEncoderParams encoder_params, ref nvjpegImage source, nvjpegChromaSubsampling chroma_subsampling, int image_width, int image_height, CUstream stream);
public static extern nvjpegStatus nvjpegEncodeImage( nvjpegHandle handle, nvjpegEncoderState encoder_state, nvjpegEncoderParams encoder_params, ref nvjpegImage source, nvjpegInputFormat input_format, int image_width, int image_height, CUstream stream);
/// <summary> /// </summary> public NvJpeg() { _handle = new nvjpegHandle(); res = NvJpegNativeMethods.nvjpegCreateSimple(ref _handle); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegCreateSimple", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
/// <summary> /// </summary> public NvJpeg(nvjpegBackend backend, uint flags) { _handle = new nvjpegHandle(); res = NvJpegNativeMethods.nvjpegCreateEx(backend, IntPtr.Zero, IntPtr.Zero, flags, ref _handle); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegCreateEx", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
public static extern nvjpegStatus nvjpegDecodeBatchedSupported(nvjpegHandle handle, nvjpegJpegStream jpeg_stream, ref int is_supported);
public static extern nvjpegStatus nvjpegDecoderCreate(nvjpegHandle nvjpeg_handle, nvjpegBackend implementation, ref nvjpegJpegDecoder decoder_handle);
public static extern nvjpegStatus nvjpegDecodeParamsCreate( nvjpegHandle handle, ref nvjpegDecodeParams decode_params);
public static extern nvjpegStatus nvjpegJpegStreamParseHeader( nvjpegHandle handle, byte[] data, SizeT length, nvjpegJpegStream jpeg_stream);
public static extern nvjpegStatus nvjpegJpegStateCreate(nvjpegHandle handle, ref nvjpegJpegState jpeg_handle);
public static extern nvjpegStatus nvjpegJpegStreamCreate( nvjpegHandle handle, ref nvjpegJpegStream jpeg_stream);
public static extern nvjpegStatus nvjpegEncoderStateCreate( nvjpegHandle handle, ref nvjpegEncoderState encoder_state, CUstream stream);
public static extern nvjpegStatus nvjpegCreateSimple(ref nvjpegHandle handle);
public static extern nvjpegStatus nvjpegDecodeJpegTransferToDevice( nvjpegHandle handle, nvjpegJpegDecoder decoder, nvjpegJpegState decoder_state, nvjpegJpegStream jpeg_stream, CUstream stream);
public static extern nvjpegStatus nvjpegGetImageInfo(nvjpegHandle handle, byte[] data, SizeT length, ref int nComponents, ref nvjpegChromaSubsampling subsampling, int[] widths, int[] heights);
public static extern nvjpegStatus nvjpegDecode(nvjpegHandle handle, nvjpegJpegState jpeg_handle, IntPtr data, SizeT length, nvjpegOutputFormat output_format, ref nvjpegImage destination, CUstream stream);
public static extern nvjpegStatus nvjpegEncodeGetBufferSize( nvjpegHandle handle, nvjpegEncoderParams encoder_params, int image_width, int image_height, ref SizeT max_stream_length);
public static extern nvjpegStatus nvjpegEncoderParamsCreate( nvjpegHandle handle, ref nvjpegEncoderParams encoder_params, CUstream stream);
public static extern nvjpegStatus nvjpegDecodeBatchedSupportedEx(nvjpegHandle handle, nvjpegJpegStream jpeg_stream, nvjpegDecodeParams decode_params, ref int is_supported);
public static extern nvjpegStatus nvjpegDecoderStateCreate(nvjpegHandle nvjpeg_handle, nvjpegJpegDecoder decoder_handle, ref nvjpegJpegState decoder_state);
public static extern nvjpegStatus nvjpegDecodeBatchedInitialize( nvjpegHandle handle, nvjpegJpegState jpeg_handle, int batch_size, int max_cpuhreads, nvjpegOutputFormat output_format);
public static extern nvjpegStatus nvjpegDecodeJpegHost( nvjpegHandle handle, nvjpegJpegDecoder decoder, nvjpegJpegState decoder_state, nvjpegDecodeParams decode_params, nvjpegJpegStream jpeg_stream);
public static extern nvjpegStatus nvjpegEncodeRetrieveBitstream( nvjpegHandle handle, nvjpegEncoderState encoder_state, IntPtr data, ref SizeT length, CUstream stream);
public static extern nvjpegStatus nvjpegDecodeJpegDevice( nvjpegHandle handle, nvjpegJpegDecoder decoder, nvjpegJpegState decoder_state, ref nvjpegImage destination, CUstream stream);
public static extern nvjpegStatus nvjpegBufferPinnedCreate(nvjpegHandle handle, ref nvjpegPinnedAllocator pinned_allocator, ref nvjpegBufferPinned buffer);
public static extern nvjpegStatus nvjpegCreateEx(nvjpegBackend backend, ref nvjpegDevAllocator dev_allocator, ref nvjpegPinnedAllocator pinned_allocator, uint flags, ref nvjpegHandle handle);
public static extern nvjpegStatus nvjpegBufferDeviceCreate(nvjpegHandle handle, ref nvjpegDevAllocator device_allocator, ref nvjpegBufferDevice buffer);