NVIDIA Performance Primitives (NPP)  Version 9.1
Functions

YCbCr to RGB color conversion. More...

Functions

NppStatus nppiYCbCrToRGB_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 3 channel 8-bit unsigned packed YCbCr to 3 channel 8-bit unsigned packed RGB color conversion. More...
 
NppStatus nppiYCbCrToRGB_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 4 channel 8-bit unsigned packed YCbCr with alpha to 4 channel 8-bit unsigned packed RGB with alpha color conversion, not affecting alpha. More...
 
NppStatus nppiYCbCrToRGB_8u_P3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
 3 channel 8-bit unsigned planar YCbCr to 3 channel 8-bit unsigned planar RGB color conversion. More...
 
NppStatus nppiYCbCrToRGB_8u_P3C3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 3 channel 8-bit unsigned planar YCbCr to 3 channel 8-bit unsigned packed RGB color conversion. More...
 
NppStatus nppiYCbCrToRGB_8u_P3C4R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, Npp8u nAval)
 3 channel 8-bit unsigned planar YCbCr to 4 channel 8-bit unsigned packed RGB color conversion with constant alpha. More...
 

Detailed Description

YCbCr to RGB color conversion.

Here is how NPP converts YCbCr to gamma corrected RGB or BGR. The output RGB values are saturated to the range [0..255].

* Npp32f nY = 1.164F * ((Npp32f)Y - 16.0F);
* Npp32f nR = ((Npp32f)Cr - 128.0F);
* Npp32f nB = ((Npp32f)Cb - 128.0F);
* Npp32f nG = nY - 0.813F * nR - 0.392F * nB;
* if (nG > 255.0F)
* nG = 255.0F;
* nR = nY + 1.596F * nR;
* if (nR > 255.0F)
* nR = 255.0F;
* nB = nY + 2.017F * nB;
* if (nB > 255.0F)
* nB = 255.0F;
*

Function Documentation

NppStatus nppiYCbCrToRGB_8u_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)

4 channel 8-bit unsigned packed YCbCr with alpha to 4 channel 8-bit unsigned packed RGB with alpha color conversion, not affecting alpha.

Alpha channel is the last channel and is not processed.

Parameters
pSrcSource-Image Pointer.
nSrcStepSource-Image Line Step.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiYCbCrToRGB_8u_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)

3 channel 8-bit unsigned packed YCbCr to 3 channel 8-bit unsigned packed RGB color conversion.

Parameters
pSrcSource-Image Pointer.
nSrcStepSource-Image Line Step.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiYCbCrToRGB_8u_P3C3R ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)

3 channel 8-bit unsigned planar YCbCr to 3 channel 8-bit unsigned packed RGB color conversion.

Parameters
pSrcSource-Planar-Image Pointer Array.
nSrcStepSource-Image Line Step.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiYCbCrToRGB_8u_P3C4R ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp8u  nAval 
)

3 channel 8-bit unsigned planar YCbCr to 4 channel 8-bit unsigned packed RGB color conversion with constant alpha.

Parameters
pSrcSource-Planar-Image Pointer Array.
nSrcStepSource-Image Line Step.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
nAval8-bit unsigned alpha constant.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiYCbCrToRGB_8u_P3R ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI 
)

3 channel 8-bit unsigned planar YCbCr to 3 channel 8-bit unsigned planar RGB color conversion.

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

Copyright © 2009-2017 NVIDIA Corporation