#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_3.h"#include "psycho_3priv.h"

Go to the source code of this file.
Defines | |
| #define | OLDTHRESHx |
| #define | DBTAB 1000 |
| #define | CRITBANDMAX 32 |
| #define | SUBSIZE 136 |
Functions | |
| INLINE double | psycho_3_add_db (double a, double b) |
| void | psycho_3 (short buffer[2][1152], double scale[2][SBLIMIT], double ltmin[2][SBLIMIT], frame_info *frame, options *glopts) |
| void | psycho_3_fft (FLOAT sample[BLKSIZE], FLOAT energy[BLKSIZE]) |
| void | psycho_3_powerdensityspectrum (FLOAT energy[BLKSIZE], FLOAT power[HBLKSIZE]) |
| void | psycho_3_spl (double *Lsb, FLOAT *power, double *scale) |
| void | psycho_3_tonal_label (FLOAT power[HBLKSIZE], int *tonelabel, FLOAT Xtm[HBLKSIZE]) |
| void | psycho_3_tonal_label_range (FLOAT *power, int *tonelabel, int *maxima, FLOAT *Xtm, int start, int end, int srange) |
| void | psycho_3_init_add_db (void) |
| void | psycho_3_noise_label (FLOAT power[HBLKSIZE], FLOAT energy[BLKSIZE], int *tonelabel, int *noiselabel, FLOAT Xnm[HBLKSIZE]) |
| void | psycho_3_decimation (FLOAT *ath, int *tonelabel, FLOAT *Xtm, int *noiselabel, FLOAT *Xnm, FLOAT *bark) |
| void | psycho_3_threshold (FLOAT *LTg, int *tonelabel, FLOAT *Xtm, int *noiselabel, FLOAT *Xnm, FLOAT *bark, FLOAT *ath, int bit_rate, int *freq_subset) |
| void | psycho_3_minimummasking (FLOAT *LTg, double *LTmin, int *freq_subset) |
| void | psycho_3_smr (double *LTmin, double *Lsb) |
| void | psycho_3_init (options *glopts) |
| void | psycho_3_dump (int *tonelabel, FLOAT *Xtm, int *noiselabel, FLOAT *Xnm) |
Variables | |
| static double | dbtable [DBTAB] |
| int | cbands = 0 |
| int | cbandindex [CRITBANDMAX] |
| int | freq_subset [SUBSIZE] |
| FLOAT | bark [HBLKSIZE] |
| FLOAT | ath [HBLKSIZE] |
| int * | numlines |
| FLOAT * | cbval |
| int | partition [HBLKSIZE] |
| static D1408 * | fft_buf |
| frame_header * | header |
| #define CRITBANDMAX 32 |
Definition at line 27 of file psycho_3.c.
| #define DBTAB 1000 |
Definition at line 24 of file psycho_3.c.
| #define OLDTHRESHx |
Definition at line 11 of file psycho_3.c.
| #define SUBSIZE 136 |
Definition at line 32 of file psycho_3.c.
Referenced by psycho_3_init(), psycho_3_minimummasking(), and psycho_3_threshold().
| void psycho_3 | ( | short | buffer[2][1152], | |
| double | scale[2][SBLIMIT], | |||
| double | ltmin[2][SBLIMIT], | |||
| frame_info * | frame, | |||
| options * | glopts | |||
| ) |
Definition at line 71 of file psycho_3.c.
References ath, bark, bitrate, frame_header::bitrate_index, BLKSIZE, energy, fft_buf, FLOAT, freq_subset, HBLKSIZE, frame_info::header, init, frame_info::nch, psycho_3_decimation(), psycho_3_dump(), psycho_3_fft(), psycho_3_init(), psycho_3_minimummasking(), psycho_3_noise_label(), psycho_3_powerdensityspectrum(), psycho_3_smr(), psycho_3_spl(), psycho_3_threshold(), psycho_3_tonal_label(), frame_info::sblimit, SCALE, options::verbosity, and frame_header::version.
Referenced by toolame().

| INLINE double psycho_3_add_db | ( | double | a, | |
| double | b | |||
| ) |
Definition at line 44 of file psycho_3.c.
References dbtable, and FLOAT.
Referenced by psycho_3_noise_label(), psycho_3_threshold(), and psycho_3_tonal_label_range().
| void psycho_3_decimation | ( | FLOAT * | ath, | |
| int * | tonelabel, | |||
| FLOAT * | Xtm, | |||
| int * | noiselabel, | |||
| FLOAT * | Xnm, | |||
| FLOAT * | bark | |||
| ) |
Definition at line 309 of file psycho_3.c.
References DBMIN, HBLKSIZE, NOISE, and TONE.
Referenced by psycho_3().
| void psycho_3_dump | ( | int * | tonelabel, | |
| FLOAT * | Xtm, | |||
| int * | noiselabel, | |||
| FLOAT * | Xnm | |||
| ) |
Definition at line 524 of file psycho_3.c.
References fprintf, HAN_SIZE, NOISE, and TONE.
Referenced by psycho_3().
| void psycho_3_fft | ( | FLOAT | sample[BLKSIZE], | |
| FLOAT | energy[BLKSIZE] | |||
| ) |
Definition at line 128 of file psycho_3.c.
References energy, FLOAT, init, mem_alloc(), PI, psycho_1_fft(), and window.
Referenced by psycho_3().

| void psycho_3_init | ( | options * | glopts | ) |
Definition at line 434 of file psycho_3.c.
References ath, ATH_dB(), options::athlevel, bark, BLKSIZE, cbandindex, CBANDS, cbands, cbval, fft_buf, FLOAT, fprintf, freq_subset, HBLKSIZE, mem_alloc(), numlines, partition, psycho_3_init_add_db(), s_freq, frame_header::sampling_frequency, SUBSIZE, toolame_freq2bark(), options::verbosity, and frame_header::version.
Referenced by psycho_3().

| void psycho_3_init_add_db | ( | void | ) |
Definition at line 249 of file psycho_3.c.
References DBTAB, and dbtable.
Referenced by psycho_3_init().
| void psycho_3_minimummasking | ( | FLOAT * | LTg, | |
| double * | LTmin, | |||
| int * | freq_subset | |||
| ) |
Definition at line 409 of file psycho_3.c.
References SBLIMIT, and SUBSIZE.
Referenced by psycho_3().
| void psycho_3_noise_label | ( | FLOAT | power[HBLKSIZE], | |
| FLOAT | energy[BLKSIZE], | |||
| int * | tonelabel, | |||
| int * | noiselabel, | |||
| FLOAT | Xnm[HBLKSIZE] | |||
| ) |
Definition at line 264 of file psycho_3.c.
References cbandindex, cbands, DBMIN, energy, NOISE, and psycho_3_add_db().
Referenced by psycho_3().

| void psycho_3_powerdensityspectrum | ( | FLOAT | energy[BLKSIZE], | |
| FLOAT | power[HBLKSIZE] | |||
| ) |
Definition at line 152 of file psycho_3.c.
References energy, and POWERNORM.
Referenced by psycho_3().
| void psycho_3_smr | ( | double * | LTmin, | |
| double * | Lsb | |||
| ) |
| void psycho_3_spl | ( | double * | Lsb, | |
| FLOAT * | power, | |||
| double * | scale | |||
| ) |
Definition at line 163 of file psycho_3.c.
References DBMIN, FLOAT, HBLKSIZE, MAX, and SBLIMIT.
Referenced by psycho_3().
| void psycho_3_threshold | ( | FLOAT * | LTg, | |
| int * | tonelabel, | |||
| FLOAT * | Xtm, | |||
| int * | noiselabel, | |||
| FLOAT * | Xnm, | |||
| FLOAT * | bark, | |||
| FLOAT * | ath, | |||
| int | bit_rate, | |||
| int * | freq_subset | |||
| ) |
Definition at line 339 of file psycho_3.c.
References DBMIN, FLOAT, HBLKSIZE, NOISE, psycho_3_add_db(), SUBSIZE, and TONE.
Referenced by psycho_3().

| void psycho_3_tonal_label | ( | FLOAT | power[HBLKSIZE], | |
| int * | tonelabel, | |||
| FLOAT | Xtm[HBLKSIZE] | |||
| ) |
Definition at line 186 of file psycho_3.c.
References DBMIN, and psycho_3_tonal_label_range().
Referenced by psycho_3().

| void psycho_3_tonal_label_range | ( | FLOAT * | power, | |
| int * | tonelabel, | |||
| int * | maxima, | |||
| FLOAT * | Xtm, | |||
| int | start, | |||
| int | end, | |||
| int | srange | |||
| ) |
Definition at line 223 of file psycho_3.c.
References DBMIN, psycho_3_add_db(), and TONE.
Referenced by psycho_3_tonal_label().

| FLOAT ath[HBLKSIZE] |
Definition at line 34 of file psycho_3.c.
Referenced by ATH_dB(), psycho_3(), psycho_3_init(), psycho_4(), psycho_4_allocmem(), and psycho_4_init().
| FLOAT bark[HBLKSIZE] |
Definition at line 34 of file psycho_3.c.
Referenced by psycho_1_subsampling(), psycho_3(), psycho_3_init(), psycho_4_allocmem(), and psycho_4_init().
| int cbandindex[CRITBANDMAX] |
Definition at line 29 of file psycho_3.c.
Referenced by psycho_3_init(), and psycho_3_noise_label().
| int cbands = 0 |
Definition at line 28 of file psycho_3.c.
Referenced by psycho_3_init(), and psycho_3_noise_label().
| FLOAT* cbval |
Definition at line 37 of file psycho_3.c.
double dbtable[DBTAB] [static] |
Definition at line 25 of file psycho_3.c.
Definition at line 39 of file psycho_3.c.
Referenced by psycho_1(), psycho_3(), and psycho_3_init().
| int freq_subset[SUBSIZE] |
Definition at line 41 of file psycho_3.c.
Referenced by calculate_format(), chunk_len(), CRC_calc(), decode(), decode_frame(), decode_frame_adu(), decode_frame_mp3on4(), encode(), encode_info(), http_send_data(), ima4_encode_block(), main_bit_allocation(), main_bit_allocation_new(), mjpeg_get_avi_field2(), mjpeg_get_quicktime_field2(), mjpeg_insert_avi_markers(), mjpeg_insert_quicktime_markers(), mp3len(), mpeg3_layer_header(), mpeg3demux_read_program(), mpegaudio_parse(), oggvorbis_encode_init(), FileVorbis::open_file(), FileOGG::open_file(), parse_args(), print_config(), psycho_1(), qtrle_decode_16bpp(), qtrle_decode_24bpp(), qtrle_decode_32bpp(), qtrle_decode_4bpp(), qtrle_decode_8bpp(), quicktime_atom_read_header(), FileTGA::read_frame_header(), ShapeWipeMain::read_pattern_image(), RenderFarmClientThread::read_string(), FileTGA::read_tga(), rtsp_parse_request(), RenderFarmServerThread::run(), skip_frame(), split_video(), svq3_decode_slice_header(), toolame(), wmx2_encode_block(), FileEXR::write_frame(), write_frames(), write_header(), and FileTGA::write_tga().
| int* numlines |
Definition at line 36 of file psycho_3.c.
| int partition[HBLKSIZE] |
Definition at line 38 of file psycho_3.c.
1.5.5