📄 ippip.h
字号:
const Ipp8u *pSrc, int srcStep,
Ipp8u *pDst, int dstStep, IppiSize roiSize))
/* Gamma */
IPPAPI (IppStatus, ippiGammaFwd_8u_C3R, (
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI (IppStatus, ippiGammaInv_8u_C3R, (
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
/* Gray */
IPPAPI (IppStatus, ippiRGBToGray_8u_C3C1R, (
const Ipp8u* pSrc,int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI (IppStatus, ippiColorToGrayQ14_8u_C3C1R,(
const Ipp8u* pSrc,int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize,
const Ipp32s coef_Q14[3]))
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiRGBToYCbCr_8u_C3R, ippiYCbCrToRGB_8u_C3R.
// Purpose: Convert RGB Image to and from YCbCr Image.
// Arguments:
// pSrc - Pointer to the source image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// pDst - Pointer to the resultant image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// roiSize - region of interest in pixels.
// srcStep - step in bytes through source image to jump on the next line
// dstStep - step in bytes through destination image to jump on the next line
// Returns:
// ippStsNullPtrErr if src == NULL or dst == NULL
// ippStsStepErr, if srcStep or dstStep is less or equal zero
// ippStsSizeErr if roiSize.width <= 0 || roiSize.height <= 0
// ippStsNoErr else
// Reference:
// Jack Keith
// Video Demystified:a handbook for the digital engineer, 2nd ed.
// 1996.pp.(42-43)
//
// The YCbCr color space was developed as part of Recommendation ITU-R BT.601
// (formely CCI 601). Y is defined to have a nominal range of 16 to 235;
// Cb and Cr are defined to have a range of 16 to 240, with 128 equal to zero.
// If the gamma-corrected RGB(R'G'B') image has a range 0 .. 255, as is commonly
// found in computer system (and in our library), the following equations may be
// used:
//
// Y = 0.257*R' + 0.504*G' + 0.098*B' + 16
// Cb = -0.148*R' - 0.291*G' + 0.439*B' + 128
// Cr = 0.439*R' - 0.368*G' - 0.071*B' + 128
//
// R' = 1.164*(Y - 16) + 1.596*(Cr - 128 )
// G' = 1.164*(Y - 16) - 0.813*(Cr - 128 )- 0.392*( Cb - 128 )
// B' = 1.164*(Y - 16) + 2.017*(Cb - 128 )
//
// Note that for the YCbCr-to-RGB equations, the RGB values must be saturated
// at the 0 and 255 levels due to occasional excursions outside the nominal
// YCbCr ranges.
//
*/
IPPAPI(IppStatus, ippiRGBToYCbCr_8u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB_8u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB565_8u16u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB444_8u16u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB555_8u16u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToBGR565_8u16u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToBGR444_8u16u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToBGR555_8u16u_C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB565_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB444_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToRGB555_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToBGR565_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToBGR444_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCrToBGR555_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr420ToRGB565_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep[3],
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr420ToRGB444_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep[3],
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr420ToRGB555_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep[3],
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr420ToBGR565_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep[3],
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr420ToBGR444_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep[3],
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr420ToBGR555_8u16u_P3C3R,(
const Ipp8u* pSrc[3], int srcStep[3],
Ipp16u* pDst, int dstStep, IppiSize roiSize))
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiRGBToYCbCr422_8u_C3C2R,ippiYCbCr422ToRGB_8u_C2C3R.
// Purpose: Convert RGB Image to and from YCbCr Image.
// Arguments:
// pSrc - Pointer to the source image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// pDst - Pointer to the resultant image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// roiSize - region of interest in pixels.
// srcStep - step in bytes through source image to jump on the next line
// dstStep - step in bytes through destination image to jump on the next line
// Returns:
// ippStsNullPtrErr if src == NULL or dst == NULL
// ippStsStepErr, if srcStep or dstStep is less or equal zero
// ippStsSizeErr if roiSize.width <= 0 || roiSize.height <= 0
// ippStsNoErr else
// Reference:
// Jack Keith
// Video Demystified: a handbook for the digital engineer, 2nd ed.
// 1996.pp.(42-43)
//
// The YCbCr color space was developed as part of Recommendation ITU-R BT.601
// (formely CCI 601). Y is defined to have a nominal range of 16 to 235;
// Cb and Cr are defined to have a range of 16 to 240, with 128 equal to zero.
// The function ippiRGBToYCbCr422_8u_P3C2R uses 4:2:2 sampling format.For every
// two horisontal Y samples, there is one Cb and Cr sample.
// Each pixel in the input RGB image is of 24 bit depth. Each pixel in the
// output YCbCr image is of 16 bit depth. Sequence of bytes in the output
// image is
// Y0 Y1 Y2 Y3 .. Yw-1 <-8 bits \ one scan line.
// Cb Cr Cb Cr .. Cb <-8 bits /
//
// If the gamma-corrected RGB(R'G'B') image has a range 0 .. 255, as is commonly
// found in computer system (and in our library), the following equations may be
// used:
//
// Y = 0.257*R' + 0.504*G' + 0.098*B' + 16
// Cb = -0.148*R' - 0.291*G' + 0.439*B' + 128
// Cr = 0.439*R' - 0.368*G' - 0.071*B' + 128
//
// R' = 1.164*(Y - 16) + 1.596*(Cr - 128 )
// G' = 1.164*(Y - 16) - 0.813*(Cr - 128 )- 0.392*( Cb - 128 )
// B' = 1.164*(Y - 16) + 2.017*(Cb - 128 )
//
// Note that for the YCbCr-to-RGB equations, the RGB values must be saturated
// at the 0 and 255 levels due to occasional excursions outside the nominal
// YCbCr ranges.
//
*/
IPPAPI(IppStatus, ippiRGBToYCbCr422_8u_C3C2R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst, int dstStep,IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToRGB_8u_C2C3R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst, int dstStep,IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToRGB565_8u16u_C2C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToRGB444_8u16u_C2C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToRGB555_8u16u_C2C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToBGR565_8u16u_C2C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToBGR444_8u16u_C2C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYCbCr422ToBGR555_8u16u_C2C3R,(
const Ipp8u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize))
/*********/
/* YUV */
/*********/
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiRGBToYUV_8u_C3R, ippiYUVToRGB_8u_C3R.
// ippiRGBToYUV_8u_C3P3R,ippiYUVToRGB_8u_P3C3R.
// Purpose: Convert a RGB image to and from an YUV format image.
// Arguments:
// pSrc - Pointer to the source image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// pDst - Pointer to the resultant image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// roiSize - region of interest in pixels.
// srcStep - step in bytes through source image to jump on the next line
// dstStep - step in bytes through destination image to jump on the next line
// Returns:
// ippStsNullPtrErr if src == NULL or dst == NULL
// ippStsStepErr, if srcStep or dstStep is less or equal zero
// ippStsSizeErr if roiSize.width <= 0 || roiSize.height <= 0
// ippStsNoErr else
// Reference:
// Jack Keith
// Video Demystified: a handbook for the digital engineer, 2nd ed.
// 1996.pp.(40-41)
//
// The YUV color space is the basic color space used by the PAL , NTSC , and
// SECAM composite color video standarts.
//
// The basic equations to convert between gamma-corrected RGB(R'G'B')and YUV are:
//
// Y' = 0.299*R' + 0.587*G' + 0.114*B'
// U = -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B' - Y' )
// V = 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R' - Y' )
//
// R' = Y' + 1.140 * V
// G' = Y' - 0.394 * U - 0.581 * V
// B' = Y' + 2.032 * U
//
// For digital RGB values with the range [0 .. 255], Y has the range [0..255],
// U the range [-112 .. +112],V the range [-157..+157].
//
// These equations are usually scaled to simplify the implementation in an actual
// NTSC or PAL digital encoder or decoder.
//
*/
IPPAPI(IppStatus, ippiRGBToYUV_8u_C3R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUVToRGB_8u_C3R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiRGBToYUV_8u_C3P3R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUVToRGB_8u_P3C3R,(
const Ipp8u* const pSrc[3], int srcStep,
Ipp8u* pDst,int dstStep, IppiSize roiSize))
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiRGBToYUV422_8u_C3P3R, ippiYUV422ToRGB_8u_P3C3R.
// ippiRGBToYUV420_8u_C3P3R, ippiYUV420ToRGB_8u_P3C3R.
// ippiRGBToYUV422_8u_C3C2R, ippiYUV422ToRGB_8u_C2C3R.
// Purpose: Convert a RGB image to and from an YUV format image.
// Arguments:
// pSrc - Pointer to the source image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// pDst - Pointer to the resultant image (for pixel-order data).An array of pointers
// to separate source color planes (in case of plane-order data)
// roiSize - region of interest in pixels.
// srcStep - step in bytes through source image to jump on the next line(for pixel-order data).
// An array of step to separate source color planes (in case of plane-order data).
// dstStep - step in bytes through destination image to jump on the next line(for pixel-order data).
// An array of step to separate resultant color planes (in case of plane-order data).
// Returns:
// ippStsNullPtrErr if src == NULL or dst == NULL
// ippStsStepErr, if srcStep or dstStep is less or equal zero
// ippStsSizeErr if roiSize.width <= 0 || roiSize.height <= 0
// ippStsNoErr else
// Reference:
// Jack Keith
// Video Demystified: a handbook for the digital engineer, 2nd ed.
// 1996.pp.(40-41)
//
// The YUV color space is the basic color space used by the PAL , NTSC , and
// SECAM composite color video standarts.
//
// The function ippiRGBToYUV422_ uses 4:2:2 sampling format.For every
// two horisontal Y samples, there is one U and V sample.
//
// The function ippiRGBToYUV420_ uses 4:2:0 sampling format. 4:2:0 implements
// 2:1 reduction of U and V in both the vertical and horizontal directions.
//
// The basic equations to convert between gamma-corrected RGB(R'G'B')and YUV are:
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -