⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 omxsp_dotprod_s16.c

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 C
字号:
/** *  * File Name:  omxSP_DotProd_S16.c * OpenMAX DL: v1.0.2 * Revision:   10586 * Date:       Wednesday, March 5, 2008 *  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. *  *  * * Description: * This file contains module for Dot Product of two vectors * */#include "omxtypes.h"#include "armOMX.h"#include "omxSP.h"/** * Function:  omxSP_DotProd_S16   (2.2.2.1.1) * * Description: * Calculates the dot product of the two input vectors.  This function does  * not perform scaling. The internal accumulator width must be at least 32  * bits.  If any of the partially accumulated values exceeds the range of a  * signed 32-bit integer then the result is undefined.  * * Input Arguments: *    *   pSrc1 - pointer to the first input vector; must be aligned on an 8-byte  *            boundary.  *   pSrc2 - pointer to the second input vector; must be aligned on an 8-byte  *            boundary.  *   len - length of the vectors in pSrc1 and pSrc2  * * Output Arguments: * * Return Value: *     *    The dot product result  Note: this function returns the actual result  *              rather than the standard OMXError.  * */OMX_S32 omxSP_DotProd_S16(                            const OMX_S16 *pSrc1,                            const OMX_S16 *pSrc2,                            OMX_INT        len                            ){    OMX_S32 DotProd;    OMX_S32 Var1,Var2;        /* Return if value 'len' is not valid */        if(len <= 0)    {       return (OMX_S32)0;    }        /* Compute the DotProduct */        DotProd = 0;        do    {        Var1 = *pSrc1++;        Var2 = *pSrc2++;                DotProd += (OMX_S32)(Var1*Var2);                        len--;            }while(len != 0);    return DotProd;} /* End of File */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -