Home | History | Annotate | Download | only in src
      1 /*
      2  * Copyright (C) 2007-2008 ARM Limited
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  *
     16  */
     17 /**
     18  *
     19  * File Name:  omxVCM4P10_InterpolateChroma.c
     20  * OpenMAX DL: v1.0.2
     21  * Revision:   12290
     22  * Date:       Wednesday, April 9, 2008
     23  *
     24  *
     25  *
     26  * Description:
     27  * This function will calculate 1/8 Pixel interpolation for Chroma Block
     28  *
     29  */
     30 
     31 #include "omxtypes.h"
     32 #include "armOMX.h"
     33 #include "omxVC.h"
     34 
     35 #include "armVC.h"
     36 #include "armCOMM.h"
     37 
     38 
     39 /**
     40  * Function: omxVCM4P10_InterpolateChroma,
     41  *
     42  * Description:
     43  * Performs 1/8-pixel interpolation for inter chroma MB.
     44  *
     45  * Remarks:
     46  *
     47  * Parameters:
     48  * [in]	pSrc	Pointer to the source reference frame buffer
     49  * [in]	srcStep Reference frame step in byte
     50  * [in]	dstStep Destination frame step in byte. Must be multiple of roi.width.
     51  * [in]	dx		Fractional part of horizontal motion vector component
     52  *						in 1/8 pixel unit;valid in the range [0,7]
     53  * [in]	dy		Fractional part of vertical motion vector component
     54  *						in 1/8 pixel unit;valid in the range [0,7]
     55  * [in]	roi		Dimension of the interpolation region;the parameters roi.width and roi.height must
     56  *                      be equal to either 2, 4, or 8.
     57  * [out]	pDst	Pointer to the destination frame buffer.
     58  *                   if roi.width==2,  2-byte alignment required
     59  *                   if roi.width==4,  4-byte alignment required
     60  *                   if roi.width==8,  8-byte alignment required
     61  *
     62  * Return Value:
     63  * If the function runs without error, it returns OMX_Sts_NoErr.
     64  * If one of the following cases occurs, the function returns OMX_Sts_BadArgErr:
     65  *	pSrc or pDst is NULL.
     66  *	srcStep or dstStep < 8.
     67  *	dx or dy is out of range [0-7].
     68  *	roi.width or roi.height is out of range {2,4,8}.
     69  *	roi.width is equal to 2, but pDst is not 2-byte aligned.
     70  *	roi.width is equal to 4, but pDst is not 4-byte aligned.
     71  *	roi.width is equal to 8, but pDst is not 8 byte aligned.
     72  *	srcStep or dstStep is not a multiple of 8.
     73  *
     74  */
     75 
     76 OMXResult omxVCM4P10_InterpolateChroma (
     77      const OMX_U8* pSrc,
     78      OMX_S32 srcStep,
     79      OMX_U8* pDst,
     80      OMX_S32 dstStep,
     81      OMX_S32 dx,
     82      OMX_S32 dy,
     83      OMXSize roi
     84  )
     85 {
     86     return armVCM4P10_Interpolate_Chroma
     87         ((OMX_U8*)pSrc, srcStep, pDst, dstStep, roi.width, roi.height, dx, dy);
     88 }
     89 
     90 
     91 /*****************************************************************************
     92  *                              END OF FILE
     93  *****************************************************************************/
     94 
     95