dsp man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

DSP(3)									DSP(3)

NAME
       initdp,	freedp, dotprod, sumsq, peakval - SIMD-assisted digital signal
       processing primitives

SYNOPSIS
       #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);

DESCRIPTION
       These functions provide several basic primitives useful in digital sig‐
       nal  processing	(DSP),	especially in modems.  The initdp, dotprod and
       freedp functions implement an integer dot product useful in correlation
       and  filtering operations on signed 16-bit integers. sumsq computes the
       sum of the squares of an array of signed 16-bit	integers,  useful  for
       measuring the energy of a signal. peakval returns the absolute 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 when available;
       otherwise, a portable C version is used.

USAGE
       To create a FIR filter or correlator, call initdp with the coefficients
       in  coeff  and  their number in len.  This creates the appropriate data
       structures and returns a handle.

       To compute a dot product, pass the handle from  initdp  and  the	 input
       array  to  dotprod.  No length field is needed as the number of samples
       will be taken from the len parameter originally given to initdp.	 There
       must be at least as many samples in the input array as there were coef‐
       ficients passed to initdp.

       When the filter or correlator is no longer needed, the data  structures
       may be freed by passing the handle to freedp.

       The  user  is responsible for scaling the inputs to initdp and dotprod,
       as the 32-bit result from dotprod will  silently	 wrap  around  in  the
       event of overflow.

       To  compute  the	 sum of the squares of an array of signed 16-bit inte‐
       gers, use sumsq. This returns a 64 bit sum.

       peakval computes the absolute value of each 16-bit element in the input
       array and returns the largest.

RETURN VALUES
       initdp  returns a handle that points to a control block, or NULL in the
       event of an error (such as a  memory  allocation	 failure).  sumsq  and
       peakval have no error returns.

AUTHOR and COPYRIGHT
       Phil Karn, KA9Q (karn@ka9q.net)

									DSP(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net