NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 11.0.1.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
YCCKToCMYK_JPEG

This function partially converts JPEG YCCK to CMYK. More...

Functions

NppStatus nppiYCCKToCMYK_JPEG_601_8u_P4R_Ctx (const Npp8u *pSrc[4], int nSrcStep, Npp8u *pDst[4], int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 4 channel 8-bit unsigned planar JPEG YCCK color format to 4 channel 8-bit unsigned planar CMYK color conversion using 601 RGB color coefficients and CMY inversion. More...
 
NppStatus nppiYCCKToCMYK_JPEG_601_8u_P4R (const Npp8u *pSrc[4], int nSrcStep, Npp8u *pDst[4], int nDstStep, NppiSize oSizeROI)
 

Detailed Description

This function partially converts JPEG YCCK to CMYK.

This is how NPP converts JPEG YCCK to CMYK. NPP only performs and initial YCC to RGB conversion using the 601 conversion coefficients and the RGB to CMY inversion leaving K unmodified. To complete this conversion to useful RGB values an additional RGB conversion needs to follow this function using the color profile contained in the YCCK JPEG file metadata section. NPP does not directly support this conversion but potentially nppiColorTwist can be used to perform it once the conversion coefficients are known.

* Npp32f nY = static_cast<Npp32f>(Y);
* Npp32f nC1 = static_cast<Npp32f>(Cb);
* Npp32f nC2 = static_cast<Npp32f>(Cr);
* Npp32f nR = nY + 1.402F * nC2 - 179.456F;
* Npp32f nG = nY - 0.34414F * nC1 - 0.71414F * nC2 + 135.45984F;
* Npp32f nB = nY + 1.772F * nC1 - 226.816F;
*
* Npp8u nC = static_cast<Npp8u>(255.0F - nR);
* Npp8u nM = static_cast<Npp8u>(255.0F - nG);
* Npp8u nM = static_cast<Npp8u>(255.0F - nB);
* Npp8u nK = K;
*

Function Documentation

NppStatus nppiYCCKToCMYK_JPEG_601_8u_P4R ( const Npp8u pSrc[4],
int  nSrcStep,
Npp8u pDst[4],
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiYCCKToCMYK_JPEG_601_8u_P4R_Ctx ( const Npp8u pSrc[4],
int  nSrcStep,
Npp8u pDst[4],
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

4 channel 8-bit unsigned planar JPEG YCCK color format to 4 channel 8-bit unsigned planar CMYK color conversion using 601 RGB color coefficients and CMY inversion.

Parameters
pSrcSource-Planar-Image Pointer Array.
nSrcStepSource-Image Line Step.
pDstDestination-Planar-Image Pointer Array.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
nppStreamCtxApplication Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes

Copyright © 2009-2020 NVIDIA Corporation