📄 omxippp_getcentralmoment_s64.c
字号:
/** * * * File Name: omxIPPP_GetCentralMoment_S64.c * OpenMAX DL: v1.0.2 * Revision: 10586 * Date: Wednesday, March 5, 2008 * * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. * * * * Description : Image Statistical Routine - Returns nOrd by mOrd central moment * calculated by omxIP_Moments_U8_CxR() functions, beforehand. * */#include "omxtypes.h"#include "armOMX.h"#include "omxIP.h"#include "armCOMM.h"#include "armIP.h"/** * Function: omxIPPP_GetCentralMoment_S64 (4.3.1.2.6) * * Description: * Returns the nOrd by mOrd central moment calculated by the Moments_U8 * function, and places the scaled result into the memory pointed to by * pValue. * * Input Arguments: * * pState - pointer to the state structure * mOrd,nOrd - specify the required spatial moment * nChannel - specifies the desired image channel from which to extract the * spatial moment. For a C3 input image, the valid range is from * 0-2. For a C1 input image, the only valid value is 0. * scaleFactor - value of the scale factor * * Output Arguments: * * pValue - pointer to the computed moment value * * Return Value: * * OMX_Sts_NoErr - no error * OMX_Sts_BadArgErr - bad arguments detected; at least one of the * following is true: * - pState or pValue is NULL * - nChannel contains an invalid channel number * OMX_StsIPPP_ContextMatchErr - contents of the implementation-specific * structure OMXMomentState are invalid * */OMXResult omxIPPP_GetCentralMoment_S64( const OMXMomentState *pState, OMX_INT mOrd, OMX_INT nOrd, OMX_INT nChannel, OMX_S64* pValue, OMX_INT scaleFactor ){ ARMIPPP_MomentState *pMomentState = (ARMIPPP_MomentState *)pState; armRetArgErrIf(!pMomentState, OMX_Sts_BadArgErr); armRetArgErrIf(!pValue, OMX_Sts_BadArgErr); armRetArgErrIf((nChannel < 0) || (nChannel > 2) || (nChannel > pMomentState->maxValidChannel), OMX_Sts_BadArgErr); armRetArgErrIf((mOrd < 0) || (mOrd > ARM_IPPP_MOMENTS_MAX_ORDER-1), OMX_Sts_BadArgErr); armRetArgErrIf((nOrd < 0) || (nOrd > ARM_IPPP_MOMENTS_MAX_ORDER-1), OMX_Sts_BadArgErr); *pValue = pMomentState->ctMoments[nChannel][mOrd][nOrd]; *pValue = armSatRoundLeftShift_S64(*pValue, -scaleFactor); return OMX_Sts_NoErr;}/* End of file */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -