nvjpeg2kEncodeParamsSetEncodeConfig()

Sets the JPEG2000 header parameters that are defined in nvjpeg2kEncodeConfig_t. This API should always be called during the encode process.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncodeParamsSetEncodeConfig(
        nvjpeg2kEncodeParams_t encode_params,
        nvjpeg2kEncodeConfig_t* encode_config);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncodeParams_t encode_params

Input/Output

Host

encode parameters handle

nvjpeg2kEncodeConfig_t* encode_config

Input

Host

pointer to nvjpeg2kEncodeConfig_t

Returns:

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

nvjpeg2kEncodeParamsSetQuality()

This API allows the application to set the target PSNR value when lossy encode is required.

Signature:

nvjpeg2kStatus_t nvjpeg2kEncodeParamsSetQuality(
        nvjpeg2kEncodeParams_t encode_params,
        double target_psnr);

Parameters:

Parameter

Input/Output

Memory

Description

nvjpeg2kEncodeParams_t encode_params

Input/Output

Host

encode parameters handle

double target_psnr

Input

Host

target PSNR value in db

Returns:

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