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 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 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

nvjpeg2kCreateV2()

Creates an instance of the library using extended allocators.

Signature:

nvjpeg2kStatus_t nvjpeg2kCreateV2(
        nvjpeg2kBackend_t backend,
        nvjpeg2kDeviceAllocatorV2_t*device_allocator,
        nvjpeg2kPinnedAllocatorV2_t*pinned_allocator,
        nvjpeg2kHandle_t *handle);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kBackend_t backend

Input

Host

Backend parameter

nvjpeg2kDeviceAllocatorV2_t *device_allocator

Input

Host

Extended Device allocator. Cannot be NULL. See Extended Device Allocator Interface

nvjpeg2kPinnedAllocatorV2_t *pinned_allocator

Input

Host

Extended Pinnned allocator. Cannot be NULL. See Extended 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

nvjpeg2kSetDeviceMemoryPadding()

Sets padding for device memory allocations. After success on this call any device memory allocation would be padded to the multiple of specified number of bytes. This helps minimize the no of device memory reallocations

Signature:

nvjpeg2kStatus_t nvjpeg2kSetDeviceMemoryPadding(size_t padding,
        nvjpeg2kHandle_t decode_handle);

Parameters:

Parameter

Input/Output

Memory

Description

size_t padding

Input

Host

Device memory padding to be used for all further device memory allocation

nvjpeg2kHandle_t *handle

Input/Output

Host

nvjpeg2k library handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kGetDeviceMemoryPadding()

Retrieves padding for device memory allocations

Signature:

nvjpeg2kStatus_t nvjpeg2kGetDeviceMemoryPadding(size_t *padding,
        nvjpeg2kHandle_t handle);

Parameters:

Parameter

Input/Output

Memory

Description

size_t *padding

Input

Host

Device memory padding currently in use

nvjpeg2kHandle_t *handle

Input/Output

Host

nvjpeg2k library handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kSetPinnedMemoryPadding()

Sets padding for pinned memory allocations. After success on this call any pinned memory allocation would be padded to the multiple of specified number of bytes. This helps minimize the no of pinned memory reallocations

Signature:

nvjpeg2kStatus_t nvjpeg2kSetPinnedMemoryPadding(size_t padding,
        nvjpeg2kHandle_t decode_handle);

Parameters:

Parameter

Input/Output

Memory

Description

size_t padding

Input

Host

Pinned memory padding to be used for all further device memory allocation

nvjpeg2kHandle_t *handle

Input/Output

Host

nvjpeg2k library handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kGetPinnedMemoryPadding()

Retrieves padding for pinned memory allocations

Signature:

nvjpeg2kStatus_t nvjpeg2kGetPinnedMemoryPadding(size_t *padding,
        nvjpeg2kHandle_t handle);

Parameters:

Parameter

Input/Output

Memory

Description

size_t *padding

Input

Host

Pinned memory padding currently in use

nvjpeg2kHandle_t *handle

Input/Output

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

nvjpeg2kEncoderCreateSimple()

Creates an instance of the nvJPEG2000 encoder handle.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncoderCreateSimple(nvjpeg2kEncoder_t *enc_handle);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncoder_t *enc_handle

Input/Output

Host

nvJPEG2000 encoder handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kEncoderDestroy()

Releases the nvJPEG2000 encoder handle.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncoderDestroy(nvjpeg2kEncoder_t enc_handle);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncoder_t enc_handle

Input

Host

nvJPEG2000 encoder handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kEncodeStateCreate()

Creates an instance of the encode state.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncodeStateCreate(
      nvjpeg2kEncoder_t enc_handle,
      nvjpeg2kEncodeState_t *encode_state);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncoder_t enc_handle

Input

Host

nvJPEG2000 encoder handle

nvjpeg2kEncodeState_t *encode_state

Input/Output

Host

nvJPEG2000 encode state

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kEncodeStateDestroy()

Releases the encode state handle.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncodeStateDestroy(nvjpeg2kEncodeState_t encode_state);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncodeState_t encode_state

Input

Host

nvJPEG2000 encode state

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kEncodeParamsCreate()

Creates an instance of the encode parameters handle.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncodeParamsCreate(nvjpeg2kEncodeParams_t *encode_params);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncodeParams_t *encode_params

Input

Host

encode params handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes

nvjpeg2kEncodeParamsDestroy()

Releases the encode parameters handle.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncodeParamsDestroy(nvjpeg2kEncodeParams_t encode_params);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncodeParams_t encode_params

Input

Host

encode params handle

Returns:

nvjpeg2kStatus_t - An error code as specified in API Return Status Codes