PhotoYCC to RGB color conversion.
More...
|
NppStatus |
nppiYCCToRGB_8u_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx) |
|
3 channel 8-bit unsigned packed YCC to 3 channel 8-bit unsigned packed RGB color conversion. More...
|
|
NppStatus |
nppiYCCToRGB_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI) |
|
NppStatus |
nppiYCCToRGB_8u_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx) |
|
4 channel 8-bit unsigned packed YCC with alpha to 4 channel 8-bit unsigned packed RGB with alpha color conversion. More...
|
|
NppStatus |
nppiYCCToRGB_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI) |
|
PhotoYCC to RGB color conversion.
This is how NPP converts PhotoYCC to gamma corrected RGB or BGR.
*
Npp32f nNormalizedY = ((
Npp32f)Y * 0.003921569F) * 1.3584F;
*
Npp32f nNormalizedC1 = (((
Npp32f)C1 * 0.003921569F) - 156.0F * 0.003921569F) * 2.2179F;
*
Npp32f nNormalizedC2 = (((
Npp32f)C2 * 0.003921569F) - 137.0F * 0.003921569F) * 1.8215F;
*
Npp32f nR = nNormalizedY + nNormalizedC2;
* if (nR > 1.0F)
* nR = 1.0F;
*
Npp32f nG = nNormalizedY - 0.194F * nNormalizedC1 - 0.509F * nNormalizedC2;
* if (nG > 1.0F)
* nG = 1.0F;
*
Npp32f nB = nNormalizedY + nNormalizedC1;
* if (nB > 1.0F)
* nB = 1.0F;
* R = (
Npp8u)(nR * 255.0F);
* G = (
Npp8u)(nG * 255.0F);
* B = (
Npp8u)(nB * 255.0F);
*