vector_int.c File Reference

#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "floating_fudge.h"
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/vector_int.h"

Functions

int32_t vec_dot_prodi16 (const int16_t x[], const int16_t y[], int n)
 Find the dot product of two int16_t vectors.
int32_t vec_circular_dot_prodi16 (const int16_t x[], const int16_t y[], int n, int pos)
 Find the dot product of two int16_t vectors, where the first is a circular buffer with an offset for the starting position.
void vec_lmsi16 (const int16_t x[], int16_t y[], int n, int16_t error)
void vec_circular_lmsi16 (const int16_t x[], int16_t y[], int n, int pos, int16_t error)
int32_t vec_min_maxi16 (const int16_t x[], int n, int16_t out[])
 Find the minimum and maximum values in an int16_t vector.

Detailed Description


Function Documentation

int32_t vec_circular_dot_prodi16 ( const int16_t  x[],
const int16_t  y[],
int  n,
int  pos 
)

Find the dot product of two int16_t vectors, where the first is a circular buffer with an offset for the starting position.

Parameters:
x The first vector.
y The first vector.
n The number of elements in the vectors.
pos The starting position in the x vector.
Returns:
The dot product of the two vectors.

References vec_dot_prodi16().

Referenced by g722_decode(), g722_encode(), v17_rx(), v27ter_rx(), and v29_rx().

int32_t vec_dot_prodi16 ( const int16_t  x[],
const int16_t  y[],
int  n 
)

Find the dot product of two int16_t vectors.

Parameters:
x The first vector.
y The first vector.
n The number of elements in the vectors.
Returns:
The dot product of the two vectors.

Referenced by vec_circular_dot_prodi16().

int32_t vec_min_maxi16 ( const int16_t  x[],
int  n,
int16_t  out[] 
)

Find the minimum and maximum values in an int16_t vector.

Parameters:
x The vector to be searched.
n The number of elements in the vector.
out A two element vector. The first will receive the maximum. The second will receive the minimum. This parameter may be set to NULL.
Returns:
The absolute maximum value. Since the range of negative numbers exceeds the range of positive one, the returned integer is longer than the ones being searched.


Generated on Tue Oct 7 20:25:52 2008 for spandsp by  doxygen 1.5.6