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

RGB to YUV color conversion. More...

Functions

NppStatus  nppiRGBToYUV_8u_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  3 channel 8-bit unsigned packed RGB to 3 channel 8-bit unsigned packed YUV color conversion. More...
 
NppStatus  nppiRGBToYUV_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiRGBToYUV_8u_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  4 channel 8-bit unsigned packed RGB with alpha to 4 channel 8-bit unsigned packed YUV color conversion with alpha, not affecting alpha. More...
 
NppStatus  nppiRGBToYUV_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiRGBToYUV_8u_P3R_Ctx (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  3 channel 8-bit unsigned planar RGB to 3 channel 8-bit unsigned planar YUV color conversion. More...
 
NppStatus  nppiRGBToYUV_8u_P3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiRGBToYUV_8u_C3P3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  3 channel 8-bit unsigned packed RGB to 3 channel 8-bit unsigned planar YUV color conversion. More...
 
NppStatus  nppiRGBToYUV_8u_C3P3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiRGBToYUV_8u_AC4P4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[4], int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  4 channel 8-bit unsigned packed RGB with alpha to 4 channel 8-bit unsigned planar YUV color conversion with alpha. More...
 
NppStatus  nppiRGBToYUV_8u_AC4P4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[4], int nDstStep, NppiSize oSizeROI)
 

Detailed Description

RGB to YUV color conversion.

Here is how NPP converts gamma corrected RGB or BGR to YUV. For digital RGB values in the range [0..255], Y has the range [0..255], U varies in the range [-112..+112], and V in the range [-157..+157]. To fit in the range of [0..255], a constant value of 128 is added to computed U and V values, and V is then saturated.

* Npp32f nY = 0.299F * R + 0.587F * G + 0.114F * B;
* Npp32f nU = (0.492F * ((Npp32f)nB - nY)) + 128.0F;
* Npp32f nV = (0.877F * ((Npp32f)nR - nY)) + 128.0F;
* if (nV > 255.0F)
* nV = 255.0F;
*

Function Documentation

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

4 channel 8-bit unsigned packed RGB with alpha to 4 channel 8-bit unsigned planar YUV color conversion with alpha.

images.

Parameters
pSrc Source-Image Pointer.
nSrcStep Source-Image Line Step.
pDst Destination-Planar-Image Pointer Array.
nDstStep Destination-Image Line Step.
oSizeROI Region-of-Interest (ROI).
nppStreamCtx Application Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiRGBToYUV_8u_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiRGBToYUV_8u_AC4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

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

images.

Parameters
pSrc Source-Image Pointer.
nSrcStep Source-Image Line Step.
pDst Destination-Image Pointer.
nDstStep Destination-Image Line Step.
oSizeROI Region-of-Interest (ROI).
nppStreamCtx Application Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiRGBToYUV_8u_C3P3R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiRGBToYUV_8u_C3P3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

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

Parameters
pSrc Source-Image Pointer.
nSrcStep Source-Image Line Step.
pDst Destination-Planar-Image Pointer Array.
nDstStep Destination-Image Line Step.
oSizeROI Region-of-Interest (ROI).
nppStreamCtx Application Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiRGBToYUV_8u_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiRGBToYUV_8u_C3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

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

Parameters
pSrc Source-Image Pointer.
nSrcStep Source-Image Line Step.
pDst Destination-Image Pointer.
nDstStep Destination-Image Line Step.
oSizeROI Region-of-Interest (ROI).
nppStreamCtx Application Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiRGBToYUV_8u_P3R ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiRGBToYUV_8u_P3R_Ctx ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

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

Parameters
pSrc Source-Planar-Image Pointer Array.
nSrcStep Source-Image Line Step.
pDst Destination-Planar-Image Pointer Array.
nDstStep Destination-Image Line Step.
oSizeROI Region-of-Interest (ROI).
nppStreamCtx Application Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes