NVIDIA Performance Primitives (NPP)  Version 9.1
Functions

BGR to YUV color conversion. More...

Functions

NppStatus nppiBGRToYUV_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 3 channel 8-bit unsigned packed BGR to 3 channel 8-bit unsigned packed YUV color conversion. More...
 
NppStatus nppiBGRToYUV_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 4 channel 8-bit unsigned packed BGR with alpha to 4 channel 8-bit unsigned packed YUV color conversion with alpha, not affecting alpha. More...
 
NppStatus nppiBGRToYUV_8u_P3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
 3 channel 8-bit unsigned planar BGR to 3 channel 8-bit unsigned planar YUV color conversion. More...
 
NppStatus nppiBGRToYUV_8u_C3P3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
 3 channel 8-bit unsigned packed BGR to 3 channel 8-bit unsigned planar YUV color conversion. More...
 
NppStatus nppiBGRToYUV_8u_AC4P4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[4], int nDstStep, NppiSize oSizeROI)
 4 channel 8-bit unsigned packed BGR with alpha to 4 channel 8-bit unsigned planar YUV color conversion with alpha. More...
 

Detailed Description

BGR 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 nppiBGRToYUV_8u_AC4P4R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst[4],
int  nDstStep,
NppiSize  oSizeROI 
)

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

images.

Parameters
pSrcSource-Image Pointer.
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
NppStatus nppiBGRToYUV_8u_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)

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

images.

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 nppiBGRToYUV_8u_C3P3R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI 
)

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

Parameters
pSrcSource-Image Pointer.
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
NppStatus nppiBGRToYUV_8u_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)

3 channel 8-bit unsigned packed BGR to 3 channel 8-bit unsigned packed YUV 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 nppiBGRToYUV_8u_P3R ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI 
)

3 channel 8-bit unsigned planar BGR to 3 channel 8-bit unsigned planar YUV 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