Home | History | Annotate | Download | only in src
      1 /**
      2  *
      3  * File Name:  omxVCM4P2_MEGetBufSize.c
      4  * OpenMAX DL: v1.0.2
      5  * Revision:   9641
      6  * Date:       Thursday, February 7, 2008
      7  *
      8  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
      9  *
     10  *
     11  *
     12  * Description:
     13  * Initialization modules for the vendor specific Motion Estimation structure.
     14  *
     15  */
     16 
     17 #include "omxtypes.h"
     18 #include "armOMX.h"
     19 #include "omxVC.h"
     20 
     21 #include "armVC.h"
     22 #include "armCOMM.h"
     23 
     24 /**
     25  * Function:  omxVCM4P2_MEGetBufSize   (6.2.4.1.1)
     26  *
     27  * Description:
     28  * Computes the size, in bytes, of the vendor-specific specification
     29  * structure for the following motion estimation functions:
     30  * BlockMatch_Integer_8x8, BlockMatch_Integer_16x16, and MotionEstimationMB.
     31  *
     32  * Input Arguments:
     33  *
     34  *   MEmode - motion estimation mode; available modes are defined by the
     35  *            enumerated type OMXVCM4P2MEMode
     36  *   pMEParams - motion estimation parameters
     37  *
     38  * Output Arguments:
     39  *
     40  *   pSize - pointer to the number of bytes required for the specification
     41  *            structure
     42  *
     43  * Return Value:
     44  *
     45  *    OMX_Sts_NoErr - no error
     46  *    OMX_Sts_BadArgErr - one or more of the following is true:
     47  *    -    an invalid value was specified for the parameter MEmode
     48  *    -    a negative or zero value was specified for the
     49  *         parameter pMEParams->searchRange
     50  *
     51  */
     52 
     53 OMXResult omxVCM4P2_MEGetBufSize(
     54     OMXVCM4P2MEMode MEMode,
     55     const OMXVCM4P2MEParams *pMEParams,
     56     OMX_U32 *pSize
     57    )
     58 {
     59     armRetArgErrIf(!pMEParams, OMX_Sts_BadArgErr);
     60     armRetArgErrIf(!pSize, OMX_Sts_BadArgErr);
     61     armRetArgErrIf(pMEParams->searchRange <= 0, OMX_Sts_BadArgErr);
     62     armRetArgErrIf((MEMode != OMX_VC_M4P10_FAST_SEARCH) &&
     63                    (MEMode != OMX_VC_M4P10_FULL_SEARCH), OMX_Sts_BadArgErr);
     64 
     65     *pSize = (OMX_INT) sizeof(ARMVCM4P2_MESpec);
     66 
     67     return OMX_Sts_NoErr;
     68 }
     69 
     70 /* End of file */
     71