nvjpeg2kDecode()

Decodes a single image, and writes it to the output device buffers. The function is synchronous with respect to the host. All GPU tasks will be submitted to the provided stream. Prior to calling this function user must parse the bitstream using nvjpeg2kStreamParse() such that the bitstream information is stored in jpeg2k_stream.

Signature:

nvjpeg2kStatus_t nvjpeg2kDecode(nvjpeg2kHandle_t handle,
        nvjpeg2kDecodeState_t decode_state,
        nvjpeg2kStream_t jpeg2k_stream,
        nvjpeg2kImage_t* decode_output,
        cudaStream_t stream);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kHandle_t handle

Input

Host

library handle

nvjpeg2kDecodeState_t decode_state

Input

Host

decode state handle

nvjpeg2kStream_t jpeg2k_stream

Input

Host

nvjpeg2k bitstream handle

nvjpeg2kImage_t* decode_output

Input/Output

Host

pointer to an instance of component_info

cudaStream_t stream

Input

Host

Decode output struct. The struct should be on host memory. The image component pointers should point to device memory. See Image Data

Returns:

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