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

YUV to BGR color conversion. More...

Functions

NppStatus  nppiYUVToBGR_8u_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  3 channel 8-bit unsigned packed YUV to 3 channel 8-bit unsigned packed BGR color conversion. More...
 
NppStatus  nppiYUVToBGR_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiYUVToBGR_8u_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  4 channel 8-bit packed YUV with alpha to 4 channel 8-bit unsigned packed BGR color conversion with alpha, not affecting alpha. More...
 
NppStatus  nppiYUVToBGR_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiYUVToBGR_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 YUV to 3 channel 8-bit unsigned planar BGR color conversion. More...
 
NppStatus  nppiYUVToBGR_8u_P3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
 
NppStatus  nppiYUVToBGR_8u_P3C3R_Ctx (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
  3 channel 8-bit unsigned planar YUV to 3 channel 8-bit unsigned packed BGR color conversion. More...
 
NppStatus  nppiYUVToBGR_8u_P3C3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
 

Detailed Description

YUV to BGR color conversion.

Here is how NPP converts YUV to gamma corrected RGB or BGR.

* Npp32f nY = (Npp32f)Y;
* Npp32f nU = (Npp32f)U - 128.0F;
* Npp32f nV = (Npp32f)V - 128.0F;
* Npp32f nR = nY + 1.140F * nV;
* if (nR < 0.0F)
* nR = 0.0F;
* if (nR > 255.0F)
* nR = 255.0F;
* Npp32f nG = nY - 0.394F * nU - 0.581F * nV;
* if (nG < 0.0F)
* nG = 0.0F;
* if (nG > 255.0F)
* nG = 255.0F;
* Npp32f nB = nY + 2.032F * nU;
* if (nB < 0.0F)
* nB = 0.0F;
* if (nB > 255.0F)
* nB = 255.0F;
*

Function Documentation

NppStatus nppiYUVToBGR_8u_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiYUVToBGR_8u_AC4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

4 channel 8-bit packed YUV with alpha to 4 channel 8-bit unsigned packed BGR 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 nppiYUVToBGR_8u_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiYUVToBGR_8u_C3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

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

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

Parameters
pSrc Source-Planar-Image Pointer Array.
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 nppiYUVToBGR_8u_P3R ( const Npp8u *const  pSrc[3],
int  nSrcStep,
Npp8u pDst[3],
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiYUVToBGR_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 YUV to 3 channel 8-bit unsigned planar BGR 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