#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include "common.h"#include "options.h"#include "encoder.h"#include "mem.h"#include "fft.h"#include "ath.h"#include "psycho_4.h"

Go to the source code of this file.
Defines | |
| #define | TRIGTABLESIZE 3142 |
| #define | TRIGTABLESCALE 1000.0 |
Functions | |
| void | psycho_4_trigtable_init (void) |
| INLINE FLOAT | psycho_4_cos (FLOAT phi) |
| INLINE FLOAT | psycho_4_sin (FLOAT phi) |
| void | psycho_4 (short int *buffer, short int savebuf[1056], int chn, double *smr, double sfreq, options *glopts) |
| void | psycho_4_init (double sfreq, options *glopts) |
| FLOAT8 | psycho_4_spreading_function (FLOAT8 bark) |
| void | psycho_4_allocmem () |
Variables | |
| static int | new = 0 |
| static int | old = 1 |
| static int | oldest = 0 |
| static int | init = 0 |
| static double | NMT = 5.5 |
| static FLOAT | minval [27] |
| static FLOAT * | grouped_c |
| static FLOAT * | grouped_e |
| static FLOAT * | nb |
| static FLOAT * | cb |
| static FLOAT * | tb |
| static FLOAT * | ecb |
| static FLOAT * | bc |
| static FLOAT * | wsamp_r |
| static FLOAT * | phi |
| static FLOAT * | energy |
| static FLOAT * | c |
| static FLOAT * | bark |
| static FLOAT * | thr |
| static F32 * | snrtmp |
| static int * | numlines |
| static int * | partition |
| static FLOAT * | cbval |
| static FLOAT * | rnorm |
| static FLOAT * | window |
| static FLOAT * | ath |
| static double * | tmn |
| static FCB * | s |
| static FHBLK * | lthr |
| static F2HBLK * | r |
| static F2HBLK * | phi_sav |
| static FLOAT | cos_table [TRIGTABLESIZE] |
| static FLOAT | sin_table [TRIGTABLESIZE] |
| #define TRIGTABLESCALE 1000.0 |
Definition at line 85 of file psycho_4.c.
Referenced by psycho_4_cos(), psycho_4_sin(), and psycho_4_trigtable_init().
| #define TRIGTABLESIZE 3142 |
Definition at line 84 of file psycho_4.c.
Referenced by psycho_4_cos(), psycho_4_sin(), and psycho_4_trigtable_init().
| void psycho_4 | ( | short int * | buffer, | |
| short int | savebuf[1056], | |||
| int | chn, | |||
| double * | smr, | |||
| double | sfreq, | |||
| options * | glopts | |||
| ) |
Definition at line 124 of file psycho_4.c.
References ath, bc, c, cb, CBANDS, cbval, ecb, energy, FLOAT, grouped_c, grouped_e, HBLKSIZE, init, LN_TO_LOG10, MAX, minval, nb, NMT, numlines, old, oldest, partition, phi, phi_sav, psycho_2_fft(), psycho_4_cos(), psycho_4_init(), psycho_4_sin(), r, rnorm, run, s, SNR, snrtmp, tb, thr, tmn, window, and wsamp_r.
Referenced by toolame().

| void psycho_4_allocmem | ( | void | ) |
Definition at line 474 of file psycho_4.c.
References ath, bark, bc, c, cb, cbval, ecb, energy, FLOAT, grouped_c, grouped_e, lthr, mem_alloc(), nb, numlines, partition, phi, phi_sav, r, rnorm, s, snrtmp, tb, thr, tmn, window, and wsamp_r.
Referenced by psycho_4_init().

| INLINE FLOAT psycho_4_cos | ( | FLOAT | phi | ) |
Definition at line 97 of file psycho_4.c.
References cos_table, TRIGTABLESCALE, and TRIGTABLESIZE.
Referenced by psycho_4().
| void psycho_4_init | ( | double | sfreq, | |
| options * | glopts | |||
| ) |
Definition at line 330 of file psycho_4.c.
References ath, ATH_energy(), options::athlevel, bark, BLKSIZE, CBANDS, cbval, FLOAT, fprintf, HBLKSIZE, MAX, minval, numlines, partition, PI, psycho_4_allocmem(), psycho_4_spreading_function(), psycho_4_trigtable_init(), rnorm, s, tmn, toolame_freq2bark(), options::verbosity, and window.
Referenced by psycho_4().

| INLINE FLOAT psycho_4_sin | ( | FLOAT | phi | ) |
Definition at line 109 of file psycho_4.c.
References sin_table, TRIGTABLESCALE, and TRIGTABLESIZE.
Referenced by psycho_4().
| FLOAT8 psycho_4_spreading_function | ( | FLOAT8 | bark | ) |
Definition at line 434 of file psycho_4.c.
References FLOAT8, and LN_TO_LOG10.
Referenced by psycho_4_init().
| void psycho_4_trigtable_init | ( | void | ) |
Definition at line 88 of file psycho_4.c.
References cos_table, sin_table, TRIGTABLESCALE, and TRIGTABLESIZE.
Referenced by psycho_4_init().
FLOAT* ath [static] |
Definition at line 78 of file psycho_4.c.
FLOAT * bark [static] |
Definition at line 71 of file psycho_4.c.
FLOAT * bc [static] |
Definition at line 69 of file psycho_4.c.
FLOAT* c [static] |
Definition at line 71 of file psycho_4.c.
FLOAT * cb [static] |
Definition at line 69 of file psycho_4.c.
FLOAT* cbval [static] |
Definition at line 76 of file psycho_4.c.
FLOAT cos_table[TRIGTABLESIZE] [static] |
Definition at line 86 of file psycho_4.c.
Referenced by psycho_4_cos(), and psycho_4_trigtable_init().
FLOAT * ecb [static] |
Definition at line 69 of file psycho_4.c.
FLOAT * energy [static] |
Definition at line 70 of file psycho_4.c.
FLOAT* grouped_c [static] |
Definition at line 69 of file psycho_4.c.
FLOAT * grouped_e [static] |
Definition at line 69 of file psycho_4.c.
int init = 0 [static] |
Definition at line 45 of file psycho_4.c.
Definition at line 81 of file psycho_4.c.
FLOAT minval[27] [static] |
Initial value:
{
0.0,
20.0,
20.0,
20.0,
20.0,
20.0,
17.0,
15.0,
10.0,
7.0,
4.4,
4.5, 4.5, 4.5,4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5,
3.5
}
Definition at line 52 of file psycho_4.c.
Referenced by psycho_4(), and psycho_4_init().
FLOAT * nb [static] |
Definition at line 69 of file psycho_4.c.
int new = 0 [static] |
Definition at line 44 of file psycho_4.c.
double NMT = 5.5 [static] |
int* numlines [static] |
Definition at line 74 of file psycho_4.c.
int old = 1 [static] |
Definition at line 44 of file psycho_4.c.
int oldest = 0 [static] |
Definition at line 44 of file psycho_4.c.
int* partition [static] |
Definition at line 75 of file psycho_4.c.
FLOAT * phi [static] |
Definition at line 70 of file psycho_4.c.
Definition at line 82 of file psycho_4.c.
Definition at line 82 of file psycho_4.c.
FLOAT * rnorm [static] |
Definition at line 76 of file psycho_4.c.
Definition at line 80 of file psycho_4.c.
FLOAT sin_table[TRIGTABLESIZE] [static] |
Definition at line 87 of file psycho_4.c.
Referenced by psycho_4_sin(), and psycho_4_trigtable_init().
Definition at line 72 of file psycho_4.c.
FLOAT * tb [static] |
Definition at line 69 of file psycho_4.c.
Referenced by direct_dist_scale_factor(), implicit_weight_table(), psycho_2(), psycho_4(), psycho_4_allocmem(), and rpza_decode_stream().
FLOAT * thr [static] |
double* tmn [static] |
Definition at line 79 of file psycho_4.c.
FLOAT* window [static] |
Definition at line 77 of file psycho_4.c.
FLOAT* wsamp_r [static] |
Definition at line 70 of file psycho_4.c.
1.5.5