All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
RGBToYCbCr
Color Model Conversion

RGB to YCbCr color conversion. More...

## Functions

NppStatus | nppiRGBToYCbCr_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 unsigned 8-bit packed YCbCr color conversion. More...
NppStatus | nppiRGBToYCbCr_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
NppStatus | nppiRGBToYCbCr_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 unsigned 8-bit packed YCbCr with alpha color conversion, not affecting alpha. More...
NppStatus | nppiRGBToYCbCr_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI)
NppStatus | nppiRGBToYCbCr_8u_P3R_Ctx (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
| 3 channel planar 8-bit unsigned RGB to 3 channel planar 8-bit YCbCr color conversion. More...
NppStatus | nppiRGBToYCbCr_8u_P3R (const Npp8u *const pSrc[3], int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
NppStatus | nppiRGBToYCbCr_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 unsigned 8-bit planar YCbCr color conversion. More...
NppStatus | nppiRGBToYCbCr_8u_C3P3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)
NppStatus | nppiRGBToYCbCr_8u_AC4P3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
| 4 channel 8-bit unsigned packed RGB with alpha to 3 channel 8-bit unsigned planar YCbCr color conversion. More...
NppStatus | nppiRGBToYCbCr_8u_AC4P3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst[3], int nDstStep, NppiSize oSizeROI)

## Detailed Description

RGB to YCbCr color conversion.

Here is how NPP converts gamma corrected RGB or BGR to YCbCr. In the YCbCr model, Y is defined to have a nominal range [16..235], while Cb and Cr are defined to have a range [16..240], with the value of 128 as corresponding to zero.

* Npp32f nY = 0.257F * R + 0.504F * G + 0.098F * B + 16.0F;
* Npp32f nCb = -0.148F * R - 0.291F * G + 0.439F * B + 128.0F;
* Npp32f nCr = 0.439F * R - 0.368F * G - 0.071F * B + 128.0F;
*

## Function Documentation

NppStatus nppiRGBToYCbCr_8u_AC4P3R | ( | const Npp8u * | pSrc,
|  | int | nSrcStep,
|  | Npp8u * | pDst[3],
|  | int | nDstStep,
|  | NppiSize | oSizeROI
| ) |  |

NppStatus nppiRGBToYCbCr_8u_AC4P3R_Ctx | ( | const Npp8u * | pSrc,
|  | int | nSrcStep,
|  | Npp8u * | pDst[3],
|  | int | nDstStep,
|  | NppiSize | oSizeROI,
|  | NppStreamContext | nppStreamCtx
| ) |  |

4 channel 8-bit unsigned packed RGB with alpha to 3 channel 8-bit unsigned planar YCbCr 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 nppiRGBToYCbCr_8u_AC4R | ( | const Npp8u * | pSrc,
|  | int | nSrcStep,
|  | Npp8u * | pDst,
|  | int | nDstStep,
|  | NppiSize | oSizeROI
| ) |  |

NppStatus nppiRGBToYCbCr_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 unsigned 8-bit packed YCbCr with alpha color conversion, not affecting alpha.

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

NppStatus nppiRGBToYCbCr_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 unsigned 8-bit planar YCbCr color conversion.

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 nppiRGBToYCbCr_8u_C3R | ( | const Npp8u * | pSrc,
|  | int | nSrcStep,
|  | Npp8u * | pDst,
|  | int | nDstStep,
|  | NppiSize | oSizeROI
| ) |  |

NppStatus nppiRGBToYCbCr_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 unsigned 8-bit packed YCbCr 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 nppiRGBToYCbCr_8u_P3R | ( | const Npp8u *const | pSrc[3],
|  | int | nSrcStep,
|  | Npp8u * | pDst[3],
|  | int | nDstStep,
|  | NppiSize | oSizeROI
| ) |  |

NppStatus nppiRGBToYCbCr_8u_P3R_Ctx | ( | const Npp8u *const | pSrc[3],
|  | int | nSrcStep,
|  | Npp8u * | pDst[3],
|  | int | nDstStep,
|  | NppiSize | oSizeROI,
|  | NppStreamContext | nppStreamCtx
| ) |  |

3 channel planar 8-bit unsigned RGB to 3 channel planar 8-bit YCbCr 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

Copyright © 2009-2019 NVIDIA Corporation