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

📄 dsp.3

📁 FEC Optimized viterbi code
💻 3
字号:
.TH DSP 3.SH NAMEinitdp, freedp, dotprod, sumsq, peakval -\ SIMD-assisteddigital signal processing primitives.SH SYNOPSIS.nf.ft#include "fec.h"void *initdp(signed short *coeffs,int len);long dotprod(void *p,signed short *a);void freedp(void *p);unsigned long long sumsq(signed short *in,int cnt);int peakval(signed short *b,int cnt);.SH DESCRIPTIONThese functions provide several basic primitives useful in digitalsignal processing (DSP), especially in modems.  The \fBinitdp\fR,\fBdotprod\fR and \fBfreedp\fR functions implement an integer dotproduct useful in correlation and filtering operations on signed16-bit integers. \fBsumsq\fR computes the sumof the squares of an array of signed 16-bit integers,useful for measuring the energy of a signal. \fBpeakval\fR returns theabsolute value of the largest magitude element in the input array,useful for scaling a signal's amplitude.Each function uses IA32 or PowerPC Altivec instructions whenavailable; otherwise, a portable C version is used..SH USAGETo create a FIR filter or correlator, call \fBinitdp\fR with thecoefficients in \fBcoeff\fR and their number in \fBlen\fR.  Thiscreates the appropriate data structures and returns a handle.To compute a dot product, pass the handle from \fBinitdp\fR and theinput array to \fBdotprod\fR. No length field is needed as the numberof samples will be taken from the \fBlen\fR parameter originally givento \fBinitdp\fR. There must be at least as many samples in the inputarray as there were coefficients passed to \fBinitdp\fR.When the filter or correlator is no longer needed, the data structuresmay be freed by passing the handle to \fBfreedp\fR.The user is responsible for scaling the inputs to \fBinitdp\fR and\fBdotprod\fR, as the 32-bit result from \fBdotprod\fR will silentlywrap around in the event of overflow.To compute the sum of the squares of an array of signed 16-bitintegers, use sumsq\fR. This returns a 64 bit sum.\fBpeakval\fR computes the absolute value of each 16-bit element inthe input array and returns the largest..SH RETURN VALUES\fBinitdp\fR returns a handle that points to a control block, or NULL inthe event of an error (such as a memory allocation failure). \fBsumsq\fRand \fBpeakval\fR have no error returns..SH AUTHOR and COPYRIGHTPhil Karn, KA9Q (karn@ka9q.net)

⌨️ 快捷键说明

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