nvjpeg2kGetCudartProperty()¶
Gets the numeric value for the major version, minor version, or the patch level of the CUDA toolkit that was used to build nvJPEG2000 library
Signature:
nvjpeg2kStatus_t NVJPEG2KAPI nvjpeg2kGetCudartProperty(libraryPropertyType type, int *value);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
libraryPropertyType type |
Input |
Host |
One of the supported libraryPropertyType values, that is, MAJOR_VERSION, MINOR_VERSION or PATCH_LEVEL |
int *value |
Output |
Host |
The numeric value corresponding to the specific libraryPropertyType requested. |
nvjpeg2kGetProperty()¶
Gets the numeric value for the major or minor version, or the patch level, of the nvJPEG2000 library.
Signature:
nvjpeg2kStatus_t NVJPEG2KAPI nvjpeg2kGetProperty(libraryPropertyType type, int *value);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
libraryPropertyType type |
Input |
Host |
One of the supported libraryPropertyType values, that is, MAJOR_VERSION, MINOR_VERSION or PATCH_LEVEL |
int *value |
Output |
Host |
The numeric value corresponding to the specific libraryPropertyType requested. |
nvjpeg2kCreateSimple()¶
Creates an instance of the library handle with default backend and memory allocators.
Signature:
nvjpeg2kStatus_t nvjpeg2kCreateSimple(nvjpeg2kHandle_t *handle);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kHandle_t *handle |
Input/Output |
Host |
nvjpeg2k library handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kCreate()¶
Creates an instance of the library using the input arguments. User has flexibility to choose the backend implementation and provide allocators.
Signature:
nvjpeg2kStatus_t nvjpeg2kCreate(
nvjpeg2kBackend_t backend,
nvjpeg2kDeviceAllocator_t *device_allocator,
nvjpeg2kPinnedAllocator_t *pinned_allocator,
nvjpeg2kHandle_t *handle);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kBackend_t backend |
Input |
Host |
Backend parameter |
nvjpeg2kDeviceAllocator_t *device_allocator |
Input |
Host |
Device allocator. cudaMalloc and cudaFree are used if set to NULL. See Device Allocator Interface |
nvjpeg2kPinnedAllocator_t *pinned_allocator |
Input |
Host |
Pinnned allocator. cudaHostAlloc and cudaHost are used is set to NULL. See Pinned Allocator Interface |
nvjpeg2kHandle_t *handle |
Input/Output |
Host |
nvjpeg2k library handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kDestroy()¶
Releases the nvjpeg2k library handle.
Signature:
nvjpeg2kStatus_t nvjpeg2kDestroy(nvjpeg2kHandle_t handle);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kHandle_t handle |
Input |
Host |
nvjpeg2k library handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kDecodeStateCreate()¶
Creates an instance of the Decode State.
Signature:
nvjpeg2kStatus_t nvjpeg2kDecodeStateCreate(
nvjpeg2kHandle_t handle,
nvjpeg2kDecodeState_t *decode_state);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kHandle_t handle |
Input |
Host |
nvjpeg2k library handle |
nvjpeg2kDecodeState_t *decode_state |
Input/Output |
Host |
decode state handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kDecodeStateDestroy()¶
Releases the Decode State handle.
Signature:
nvjpeg2kStatus_t nvjpeg2kDecodeStateDestroy(nvjpeg2kDecodeState_t decode_state);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kDecodeState_t decode_state |
Input |
Host |
decode state handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kStreamCreate()¶
Creates an instance of the bitstream handle.
Signature:
nvjpeg2kStatus_t nvjpeg2kStreamCreate(nvjpeg2kStream_t *stream_handle);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kStream_t *stream_handle |
Input/Output |
Host |
nvjpeg2k bitstream handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kStreamDestroy()¶
Releases the bitstream handle.
Signature:
nvjpeg2kStatus_t nvjpeg2kStreamDestroy(nvjpeg2kStream_t stream_handle);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kStream_t stream_handle |
Input |
Host |
nvjpeg2k bitstream handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kDecodeParamsCreate()¶
Creates an instance of the decode output parameters handle.
Signature:
nvjpeg2kStatus_t nvjpeg2kDecodeParamsCreate(nvjpeg2kDecodeParams_t *decode_params);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kDecodeParams_t *decode_params |
Input/Output |
Host |
Decode output parameters handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes
nvjpeg2kDecodeParamsDestroy()¶
Releases the decode output parameters handle.
Signature:
nvjpeg2kStatus_t nvjpeg2kDecodeParamsDestroy(nvjpeg2kDecodeParams_t decode_params);
Parameters:
Parameter |
Input/Output |
Memory |
Description |
|---|---|---|---|
nvjpeg2kDecodeParams_t decode_params |
Input |
Host |
Decode output parameters handle |
Returns:
nvjpeg2kStatus_t - An error code as specified in API Return Status Codes