📄 ippip.h
字号:
// 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, ippiRGBToYUV422_8u_C3C2R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiRGBToYUV422_8u_C3P3R,(
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize))
IPPAPI(IppStatus, ippiRGBToYUV420_8u_C3P3R,(
const Ipp8u* pSrc, int srcStep ,
Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV422ToRGB_8u_C2C3R,(
const Ipp8u* pSrc,int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3C3R,(
const Ipp8u* const pSrc[3],int srcStep[3],
Ipp8u* pDst,int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3C3R,(
const Ipp8u* const pSrc[3],int srcStep[3],
Ipp8u* pDst, int dstStep, IppiSize roiSize))
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiRGBToYUV422_8u_P3, ippiYUV422ToRGB_8u_P3.
// ippiRGBToYUV422_8u_C3P3, ippiYUV422ToRGB_8u_P3C3.
// ippiRGBToYUV420_8u_C3P3, ippiYUV420ToRGB_8u_P3C3.
// ippiRGBToYUV420_8u_P3, ippiYUV420ToRGB_8u_P3.
// 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 - the size of image.
// 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:
//
// 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, ippiRGBToYUV422_8u_C3P3,(const Ipp8u* pSrc, Ipp8u* pDst[3], IppiSize roiSize))
IPPAPI(IppStatus, ippiRGBToYUV420_8u_C3P3,(const Ipp8u* pSrc, Ipp8u* pDst[3], IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3C3,(const Ipp8u* const pSrc[3],Ipp8u* pDst, IppiSize roiSize ))
IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3C3,(const Ipp8u* const pSrc[3], Ipp8u* pDst, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToBGR565_8u16u_P3C3R,(const Ipp8u* const pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToBGR555_8u16u_P3C3R,(const Ipp8u* const pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToBGR444_8u16u_P3C3R,(const Ipp8u* const pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToRGB565_8u16u_P3C3R,(const Ipp8u* const pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToRGB555_8u16u_P3C3R,(const Ipp8u* const pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiYUV420ToRGB444_8u16u_P3C3R,(const Ipp8u* const pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
/* /////////////////////////////////////////////////////////////////////////////
// Geometric Transforms Functions
///////////////////////////////////////////////////////////////////////////// */
#if !defined( _OWN_BLDPCS )
typedef enum {
ippAxsHorizontal,
ippAxsVertical,
ippAxsBoth
} IppiAxis;
enum {
IPPI_INTER_NN = 1,
IPPI_INTER_LINEAR = 2,
IPPI_INTER_CUBIC = 4,
IPPI_INTER_SUPER = 8,
IPPI_SMOOTH_EDGE = (1 << 30)
};
typedef enum {
dirWarpRtoQ = 0,
dirWarpQtoR = 1
} IppiWarpDirection;
#endif /* _OWN_BLDPCS */
/* /////////////////////////////////////////////////////////////////////////////
// Name: ippiMirror
//
// Purpose: Mirrors the sourse image about a horizontal
// or vertical or both together axes into resultant image
//
//
// Arguments:
// pSrc pointer to the source image ROI
// srcStep scan line size (bytes) of the source image
// pDst pointer to the target image ROI
// dstStep scan line size (bytes) of the source image
// roiSize ROI size
// flip specifies the axes to mirror the image:
// ippAxsHorizontal for the horizontal axis,
// ippAxsVertical for a vertical axis,
// ippAxsBoth for both horizontal and vertical axes
//
// Returns: Reason:
// ippStsNoErr no problems
// ippStsNullPtrErr NULL pointer
// ippStsStepErr srcStep<=0 or dstStep<=0
// ippStsSizeErr ROI size error
// ippStsMirrorFlipErr unknown flip value
*/
IPPAPI(IppStatus, ippiMirror_8u_C1R, (
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize,
IppiAxis flip))
IPPAPI(IppStatus, ippiMirror_8u_C3R, (
const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize,
IppiAxis flip))
/* ////////////////////////////////////////////////////////////////////////// */
/* Threshold operations */
/* ////////////////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////////////////////
// Names: ippiThreshold_GT_8u_C1R
// ippiThreshold_GT_8u_C3R
//
// Purpose: Threshold operation if Greater
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to pSrc or pDst are NULL
// ippStsSizeErr Some size of roi less or equal zero
//
// Parameters:
// pSrc pointer to input image
// srcStep size of input image scan-line
// pDst pointer to output image
// dstStep size of output image scan-line
// roiSize ROI size
// threshold level (or levels) of the threshold operation
*/
IPPAPI(IppStatus,ippiThreshold_GT_8u_C1R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u threshold))
IPPAPI(IppStatus,ippiThreshold_GT_8u_C3R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, const Ipp8u threshold[3]))
/* ////////////////////////////////////////////////////////////////////////////
// Names: ippiThreshold_LT_8u_C1R
// ippiThreshold_LT_8u_C3R
//
// Purpose: Threshold operation if Less
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to pSrc or pDst are NULL
// ippStsSizeErr Some size of roi less or equal zero
//
// Parameters:
// pSrc pointer to input image
// srcStep size of input image scan-line
// pDst pointer to output image
// dstStep size of output image scan-line
// roiSize ROI size
// threshold level (or levels) of the threshold operation
*/
IPPAPI(IppStatus,ippiThreshold_LT_8u_C1R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u threshold))
IPPAPI(IppStatus,ippiThreshold_LT_8u_C3R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, const Ipp8u threshold[3]))
/* ////////////////////////////////////////////////////////////////////////////
// Names: ippiThreshold_GTVal_8u_C1R
// ippiThreshold_GTVal_8u_C3R
//
// Purpose: Thresold operations. Replace if Greater.
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to pSrc or pDst are NULL
// ippStsSizeErr Some size of roi less or equal zero
//
// Parameters:
// pSrc pointer to input image
// srcStep size of input image scan-line
// pDst pointer to output image
// dstStep size of output image scan-line
// roiSize ROI size
// threshold level (or levels) of the threshold operation
// value replacing value (or values)
// ippCmpOp comparison mode, ippCmpLess or ippCmpGreater
*/
IPPAPI(IppStatus,ippiThreshold_GTVal_8u_C1R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u threshold,
Ipp8u value))
IPPAPI(IppStatus,ippiThreshold_GTVal_8u_C3R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, const Ipp8u threshold[3],
const Ipp8u value[3]))
/* ////////////////////////////////////////////////////////////////////////////
// Names: ippiThreshold_LTVal_8u_C1R
// ippiThreshold_LTVal_8u_C3R
//
// Purpose: Thresold operations. Replace if Less.
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to pSrc or pDst are NULL
// ippStsSizeErr Some size of roi less or equal zero
//
// Parameters:
// pSrc pointer to input image
// srcStep size of input image scan-line
// pDst pointer to output image
// dstStep size of output image scan-line
// roiSize ROI size
// threshold level (or levels) of the threshold operation
// value replacing value (or values)
// ippCmpOp comparison mode, ippCmpLess or ippCmpGreater
*/
IPPAPI(IppStatus,ippiThreshold_LTVal_8u_C1R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u threshold,
Ipp8u value))
IPPAPI(IppStatus,ippiThreshold_LTVal_8u_C3R,(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize, const Ipp8u threshold[3],
const Ipp8u value[3]))
/* ////////////////////////////////////////////////////////////////////////////
// Names: ippiThreshold_LTValGTVal_8u_C1R
// ippiThreshold_LTValGTVal_8u_C3R
//
// Purpose: Threshold operation
// Return:
// ippStsNoErr Ok
// ippStsNullPtrErr Some of pointers to pSrc or pDst are NULL
// ippStsSizeErr Some size of roi less or equal zero
// ippStsThreshErr if (thresholdGT[n] < thresholdLT[n])
//
// Parameters:
// pSrc pointer to input image
// srcStep size of input image scan-line
// pDst pointer to output image
// dstStep size of output image scan-line
// pSrcDst pointer to input for in-place operation
// srcDstStep size of image scan-line for in-place operation
// roiSize ROI size
// thresholdGT level (or levels) of the threshold operation Greater
// valueGT replacing value (or values) of the threshold operation
// Greater
// thresholdLT level (or levels) of the threshold operation Less
// valueLT replacing value (or values) of the threshold operation
// Less
*/
IPPAPI(IppStatus,ippiThreshold_LTValGTVal_8u_C1R,(const Ipp8u* pSrc,int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize,
Ipp8u thresholdLT, Ipp8u valueLT,
Ipp8u thresholdGT, Ipp8u valueGT))
IPPAPI(IppStatus,ippiThreshold_LTValGTVal_8u_C3R,(const Ipp8u* pSrc,int srcStep,
Ipp8u* pDst, int dstStep, IppiSize roiSize,
const Ipp8u thresholdLT[3], const Ipp8u valueLT[3],
const Ipp8u thresholdGT[3],
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -