public static extern nvjpegStatus nvjpegDecodeBatchedPreAllocate( nvjpegHandle handle, nvjpegJpegState jpeg_handle, int batch_size, int width, int height, nvjpegChromaSubsampling chroma_subsampling, nvjpegOutputFormat output_format);
public void EncodeYUV(EncoderParams encoderParams, nvjpegImage source, nvjpegChromaSubsampling chromaSubsampling, int image_width, int image_height, CudaStream stream) { res = NvJpegNativeMethods.nvjpegEncodeYUV(_nvJpeg.Handle, _state, encoderParams.Params, ref source, chromaSubsampling, image_width, image_height, stream.Stream); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegEncodeYUV", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
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 void DecodeBatchedPreAllocate(int batch_size, int width, int height, nvjpegChromaSubsampling chroma_subsampling, nvjpegOutputFormat output_format) { res = NvJpegNativeMethods.nvjpegDecodeBatchedPreAllocate(_nvJpeg.Handle, _state, batch_size, width, height, chroma_subsampling, output_format); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegDecodeBatchedPreAllocate", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
public void GetImageInfo(byte[] data, ref int nComponents, ref nvjpegChromaSubsampling subsampling, int[] widths, int[] heights) { res = NvJpegNativeMethods.nvjpegGetImageInfo(_handle, data, data.Length, ref nComponents, ref subsampling, widths, heights); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegGetImageInfo", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
public void SetSamplingFactors(nvjpegChromaSubsampling chroma_subsampling, CudaStream stream) { res = NvJpegNativeMethods.nvjpegEncoderParamsSetSamplingFactors(_params, chroma_subsampling, stream.Stream); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegEncoderParamsSetSamplingFactors", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }
public static extern nvjpegStatus nvjpegJpegStreamGetChromaSubsampling( nvjpegJpegStream jpeg_stream, ref nvjpegChromaSubsampling chroma_subsampling);
public static extern nvjpegStatus nvjpegEncoderParamsSetSamplingFactors( nvjpegEncoderParams encoder_params, nvjpegChromaSubsampling chroma_subsampling, CUstream stream);
public static extern nvjpegStatus nvjpegGetImageInfo(nvjpegHandle handle, byte[] data, SizeT length, ref int nComponents, ref nvjpegChromaSubsampling subsampling, int[] widths, int[] heights);