10c1bc742181ded4930842b46e9507372f0b1b963James Dong/**
20c1bc742181ded4930842b46e9507372f0b1b963James Dong *
30c1bc742181ded4930842b46e9507372f0b1b963James Dong * File Name:  omxVCM4P10_InterpolateChroma.c
40c1bc742181ded4930842b46e9507372f0b1b963James Dong * OpenMAX DL: v1.0.2
50c1bc742181ded4930842b46e9507372f0b1b963James Dong * Revision:   9641
60c1bc742181ded4930842b46e9507372f0b1b963James Dong * Date:       Thursday, February 7, 2008
70c1bc742181ded4930842b46e9507372f0b1b963James Dong *
80c1bc742181ded4930842b46e9507372f0b1b963James Dong * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
90c1bc742181ded4930842b46e9507372f0b1b963James Dong *
100c1bc742181ded4930842b46e9507372f0b1b963James Dong *
110c1bc742181ded4930842b46e9507372f0b1b963James Dong * Description:
120c1bc742181ded4930842b46e9507372f0b1b963James Dong * This function will calculate 1/8 Pixel interpolation for Chroma Block
130c1bc742181ded4930842b46e9507372f0b1b963James Dong *
140c1bc742181ded4930842b46e9507372f0b1b963James Dong */
150c1bc742181ded4930842b46e9507372f0b1b963James Dong
160c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxtypes.h"
170c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armOMX.h"
180c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxVC.h"
190c1bc742181ded4930842b46e9507372f0b1b963James Dong
200c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armVC.h"
210c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armCOMM.h"
220c1bc742181ded4930842b46e9507372f0b1b963James Dong
230c1bc742181ded4930842b46e9507372f0b1b963James Dong
240c1bc742181ded4930842b46e9507372f0b1b963James Dong/**
250c1bc742181ded4930842b46e9507372f0b1b963James Dong * Function: omxVCM4P10_InterpolateChroma,
260c1bc742181ded4930842b46e9507372f0b1b963James Dong *
270c1bc742181ded4930842b46e9507372f0b1b963James Dong * Description:
280c1bc742181ded4930842b46e9507372f0b1b963James Dong * Performs 1/8-pixel interpolation for inter chroma MB.
290c1bc742181ded4930842b46e9507372f0b1b963James Dong *
300c1bc742181ded4930842b46e9507372f0b1b963James Dong * Remarks:
310c1bc742181ded4930842b46e9507372f0b1b963James Dong *
320c1bc742181ded4930842b46e9507372f0b1b963James Dong * Parameters:
330c1bc742181ded4930842b46e9507372f0b1b963James Dong * [in]	pSrc	Pointer to the source reference frame buffer
340c1bc742181ded4930842b46e9507372f0b1b963James Dong * [in]	srcStep Reference frame step in byte
350c1bc742181ded4930842b46e9507372f0b1b963James Dong * [in]	dstStep Destination frame step in byte. Must be multiple of roi.width.
360c1bc742181ded4930842b46e9507372f0b1b963James Dong * [in]	dx		Fractional part of horizontal motion vector component
370c1bc742181ded4930842b46e9507372f0b1b963James Dong *						in 1/8 pixel unit;valid in the range [0,7]
380c1bc742181ded4930842b46e9507372f0b1b963James Dong * [in]	dy		Fractional part of vertical motion vector component
390c1bc742181ded4930842b46e9507372f0b1b963James Dong *						in 1/8 pixel unit;valid in the range [0,7]
400c1bc742181ded4930842b46e9507372f0b1b963James Dong * [in]	roi		Dimension of the interpolation region;the parameters roi.width and roi.height must
410c1bc742181ded4930842b46e9507372f0b1b963James Dong *                      be equal to either 2, 4, or 8.
420c1bc742181ded4930842b46e9507372f0b1b963James Dong * [out]	pDst	Pointer to the destination frame buffer.
430c1bc742181ded4930842b46e9507372f0b1b963James Dong *                   if roi.width==2,  2-byte alignment required
440c1bc742181ded4930842b46e9507372f0b1b963James Dong *                   if roi.width==4,  4-byte alignment required
450c1bc742181ded4930842b46e9507372f0b1b963James Dong *                   if roi.width==8,  8-byte alignment required
460c1bc742181ded4930842b46e9507372f0b1b963James Dong *
470c1bc742181ded4930842b46e9507372f0b1b963James Dong * Return Value:
480c1bc742181ded4930842b46e9507372f0b1b963James Dong * If the function runs without error, it returns OMX_Sts_NoErr.
490c1bc742181ded4930842b46e9507372f0b1b963James Dong * If one of the following cases occurs, the function returns OMX_Sts_BadArgErr:
500c1bc742181ded4930842b46e9507372f0b1b963James Dong *	pSrc or pDst is NULL.
510c1bc742181ded4930842b46e9507372f0b1b963James Dong *	srcStep or dstStep < 8.
520c1bc742181ded4930842b46e9507372f0b1b963James Dong *	dx or dy is out of range [0-7].
530c1bc742181ded4930842b46e9507372f0b1b963James Dong *	roi.width or roi.height is out of range {2,4,8}.
540c1bc742181ded4930842b46e9507372f0b1b963James Dong *	roi.width is equal to 2, but pDst is not 2-byte aligned.
550c1bc742181ded4930842b46e9507372f0b1b963James Dong *	roi.width is equal to 4, but pDst is not 4-byte aligned.
560c1bc742181ded4930842b46e9507372f0b1b963James Dong *	roi.width is equal to 8, but pDst is not 8 byte aligned.
570c1bc742181ded4930842b46e9507372f0b1b963James Dong *	srcStep or dstStep is not a multiple of 8.
580c1bc742181ded4930842b46e9507372f0b1b963James Dong *
590c1bc742181ded4930842b46e9507372f0b1b963James Dong */
600c1bc742181ded4930842b46e9507372f0b1b963James Dong
610c1bc742181ded4930842b46e9507372f0b1b963James DongOMXResult omxVCM4P10_InterpolateChroma (
620c1bc742181ded4930842b46e9507372f0b1b963James Dong     const OMX_U8* pSrc,
630c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_S32 srcStep,
640c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_U8* pDst,
650c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_S32 dstStep,
660c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_S32 dx,
670c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_S32 dy,
680c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMXSize roi
690c1bc742181ded4930842b46e9507372f0b1b963James Dong )
700c1bc742181ded4930842b46e9507372f0b1b963James Dong{
710c1bc742181ded4930842b46e9507372f0b1b963James Dong    return armVCM4P10_Interpolate_Chroma
720c1bc742181ded4930842b46e9507372f0b1b963James Dong        ((OMX_U8*)pSrc, srcStep, pDst, dstStep, roi.width, roi.height, dx, dy);
730c1bc742181ded4930842b46e9507372f0b1b963James Dong}
740c1bc742181ded4930842b46e9507372f0b1b963James Dong
750c1bc742181ded4930842b46e9507372f0b1b963James Dong
760c1bc742181ded4930842b46e9507372f0b1b963James Dong/*****************************************************************************
770c1bc742181ded4930842b46e9507372f0b1b963James Dong *                              END OF FILE
780c1bc742181ded4930842b46e9507372f0b1b963James Dong *****************************************************************************/
790c1bc742181ded4930842b46e9507372f0b1b963James Dong
80