TwiceAsNice
2019-02-18
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "libdspau.h"
Functions | |
int | dspau_removemean (double *in, double *out, int len) |
Subtract mean from stream. More... | |
int | dspau_stretch (double *in, double *out, int len, double min, double max) |
Stretch minimum and maximum values of the input stream. More... | |
int | dspau_normalize (double *in, double *out, int len, double min, double max) |
Normalize the input stream to the minimum and maximum values. More... | |
int | dspau_sub (double *in1, double *in2, double *out, int len) |
Subtract elements of one stream from another's. More... | |
int | dspau_sum (double *in1, double *in2, double *out, int len) |
Sum elements of one stream to another's. More... | |
int | dspau_div (double *in1, double *in2, double *out, int len) |
Divide elements of one stream to another's. More... | |
int | dspau_mul (double *in1, double *in2, double *out, int len) |
Multiply elements of one stream to another's. More... | |
int | dspau_sub1 (double *in, double *out, int len, double val) |
Subtract a value from elements of the input stream. More... | |
int | dspau_sum1 (double *in, double *out, int len, double val) |
Sum elements of the input stream to a value. More... | |
int | dspau_div1 (double *in, double *out, int len, double val) |
Divide elements of the input stream to a value. More... | |
int | dspau_mul1 (double *in, double *out, int len, double val) |
Multiply elements of the input stream to a value. More... | |
static int | compare (const void *a, const void *b) |
int | dspau_median (double *in, double *out, int len, int size, int median) |
Median elements of the inut stream. More... | |
int dspau_div | ( | double * | in1, |
double * | in2, | ||
double * | out, | ||
int | len | ||
) |
Divide elements of one stream to another's.
in1 | the Numerators input stream. (input) |
in2 | the Denominators input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
int dspau_div1 | ( | double * | in, |
double * | out, | ||
int | len, | ||
double | val | ||
) |
Divide elements of the input stream to a value.
in | the Numerators input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
val | the denominator. |
int dspau_median | ( | double * | in, |
double * | out, | ||
int | len, | ||
int | size, | ||
int | median | ||
) |
Median elements of the inut stream.
in | the input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
size | the length of the median. |
median | the location of the median value. |
int dspau_mul | ( | double * | in1, |
double * | in2, | ||
double * | out, | ||
int | len | ||
) |
Multiply elements of one stream to another's.
in1 | the first input stream. (input) |
in2 | the second input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
int dspau_mul1 | ( | double * | in, |
double * | out, | ||
int | len, | ||
double | val | ||
) |
Multiply elements of the input stream to a value.
in | the first input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
val | the value used for this operation. |
int dspau_normalize | ( | double * | in, |
double * | out, | ||
int | len, | ||
double | min, | ||
double | max | ||
) |
Normalize the input stream to the minimum and maximum values.
in | the input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
min | the clamping minimum value. |
max | the clamping maximum value. |
Return 0 if success. Return -1 if any error occurs.
int dspau_removemean | ( | double * | in, |
double * | out, | ||
int | len | ||
) |
Subtract mean from stream.
in | the input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
int dspau_stretch | ( | double * | in, |
double * | out, | ||
int | len, | ||
double | min, | ||
double | max | ||
) |
Stretch minimum and maximum values of the input stream.
in | the input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
min | the desired minimum value. |
max | the desired maximum value. |
int dspau_sub | ( | double * | in1, |
double * | in2, | ||
double * | out, | ||
int | len | ||
) |
Subtract elements of one stream from another's.
in1 | the input stream to be subtracted. (input) |
in2 | the input stream with subtraction values. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
int dspau_sub1 | ( | double * | in, |
double * | out, | ||
int | len, | ||
double | val | ||
) |
Subtract a value from elements of the input stream.
in | the Numerators input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
val | the value to be subtracted. |
int dspau_sum | ( | double * | in1, |
double * | in2, | ||
double * | out, | ||
int | len | ||
) |
Sum elements of one stream to another's.
in1 | the first input stream. (input) |
in2 | the second input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
int dspau_sum1 | ( | double * | in, |
double * | out, | ||
int | len, | ||
double | val | ||
) |
Sum elements of the input stream to a value.
in | the first input stream. (input) |
out | the output stream. (output) |
len | the length of the input stream. |
val | the value used for this operation. |