diff --git a/indra/llimagej2cnv/llimagej2cnv.cpp b/indra/llimagej2cnv/llimagej2cnv.cpp index be0f5f3fab..7d43876c79 100644 --- a/indra/llimagej2cnv/llimagej2cnv.cpp +++ b/indra/llimagej2cnv/llimagej2cnv.cpp @@ -15,6 +15,28 @@ LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl() { return new LLImageJ2CNV(); } +#pragma region HELPERS + +nvjpeg2kEncodeConfig_t makeEncodeConfig(NvImage& imageIn) { + nvjpeg2kEncodeConfig_t outCfg; + + outCfg.stream_type = NVJPEG2K_STREAM_J2K; + outCfg.color_space = imageIn.getColorSpace(); + outCfg.image_width = imageIn.getImageInfo().image_width; + outCfg.image_height = imageIn.getImageInfo().image_height; + outCfg.num_components = imageIn.getImageInfo().num_components; + outCfg.image_comp_info = imageIn.getComponentInfo(); + // codeblock size: see initEncode, llimagej2ckdu.cpp:428 + // also precinct size + + // irreversible + // mct mode + + outCfg.prog_order = NVJPEG2K_RLCP; +} + +#pragma endregion HELPERS + #pragma region NVIMAGE void NvImage::clear() {