Visible to Intel only — GUID: GUID-4F7C1D57-ADD0-4064-895F-8CF190D4B404
Visible to Intel only — GUID: GUID-4F7C1D57-ADD0-4064-895F-8CF190D4B404
ResizeYUV420Lanczos
Changes the size of the NV12 image by interpolation with the Lanczos filter.
Syntax
IppStatus ippiResizeYUV420Lanczos_8u_P2R(const Ipp8u* pSrcY, Ipp32s srcYStep, const Ipp8u* pSrcUV, Ipp32s srcUVStep, Ipp8u* pDstY, Ipp32s dstYStep, Ipp8u* pDstUV, Ipp32s dstUVStep, IppiPoint dstOffset, IppiSize dstSize, IppiBorderType border, const Ipp8u* pBorderValue, const IppiResizeYUV420Spec* pSpec, Ipp8u* pBuffer);
Include Files
ippi.h
Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Parameters
pSrcY |
Pointer to the source image Y plane. |
srcYStep |
Distance in bytes between starts of consecutive lines in the source image Y plane. |
pSrcUV |
Pointer to the source image UV plane. |
srcUVStep |
Distance in bytes between starts of consecutive lines in the source image UV plane. |
pDstY |
Pointer to the destination image Y plane. |
dstYStep |
Distance in bytes between starts of consecutive lines in the destination image Y plane. |
pDstUV |
Pointer to the destination image UV plane. |
dstUVStep |
Distance in bytes between starts of consecutive lines in the destination image UV plane. |
dstOffset |
Offset of the tiled destination image with respect to the destination image origin. |
dstSize |
Size of the destination image in pixels. |
border |
Type of the border. |
pBorderValue |
Pointer to the constant value to assign to pixels of the constant border. This parameter is applicable only to the ippBorderConst border type. |
pSpec |
Pointer to the spec structure for the resize filter. |
pBuffer |
Pointer to the work buffer. |
Description
This function changes an image size using interpolation with the Lanczos filter. The image size can be either reduced or increased in each direction, depending on the destination image size.
This function operates with ROI (see ROI Processing in Geometric Transforms). It resizes the source image ROI origin to the destination image ROI origin. The destination image ROI origin must be defined by the following parameters: the offset of the tiled destination image with respect to the destination image origin and the destination image size. The source image ROI origin is defined automatically. To obtain the source image ROI origin offset, call the ippiResizeYUV420GetSrcOffset function. Parameters pSrcY, pSrcUV and pDstY, pDstUV must point to the processed source and destination image ROI origins respectively.
The source and destination images are in the 4:2:0 two-plane image format (NV12): all Y samples (pSrcY) are found first in memory as an array of unsigned chars with an even number of lines memory alignment, followed by an array (pSrcY) of unsigned chars containing interleaved U and V samples. Supported values for border are ippBorderRepl and ippBorderInMem.
Applied interpolation algorithm uses edge pixels of the source image that are out of the image origin. The function ippiResizeYUV420Lanczos uses in calculation the weighted values of these outer pixels. To obtain the size of the out of the source image origin, call the function ippiResizeYUV420GetBorderSize for the corresponding flavor.
If the border type is equal to ippBorderRepl, the source image edge pixels are replicated out of the image origin. If the border type is equal to ippBorderInMem, the outer pixels are obtained from the out of the source image origin space. For the mixed border types, the combined approach is applied.
Prior to using the ippiResizeLinear function, initialize the IppiResizeYUV420Spec structure by calling the ippiResizeYUV420LanczosInit and compute the size of the external buffer pBuffer by calling the ippiResizeYUV420GetBufferSize for the corresponding flavor.
Return Values
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if one of the specified pointers is NULL. |
ippStsNoOperation |
Indicates a warning if width or height of the destination image is equal to zero. |
ippStsBorderErr |
Indicates an error if the border value is illegal. |
ippStsContextMatchErr |
Indicates an error if pointer to the spec structure is invalid. |
ippStsMisalignedOffsetErr |
Indicates an error if one of the fields of the dstOffset parameter is odd. |
ippStsSizeWrn |
Indicates a warning in the following cases:
|
ippStsSizeErr |
Indicates an error if width of the destination image is equal to 1, or if width or height of the source or destination image is negative. |
ippStsOutOfRangeErr |
Indicates an error if the destination image offset point is outside the destination image origin. |
ippStsNotSupportedModeErr |
Indicates an error if the requested mode is not supported. |