LMMS
Loading...
Searching...
No Matches
psy.c File Reference
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "../../codec.h"
#include "codec_internal.h"
#include "masking.h"
#include "psy.h"
#include "os.h"
#include "lpc.h"
#include "smallft.h"
#include "scales.h"
#include "misc.h"
#include <stdio.h>

Macros

#define NEGINF   -9999.f

Functions

vorbis_look_psy_global_vp_global_look (vorbis_info *vi)
void _vp_global_free (vorbis_look_psy_global *look)
static void _vi_gpsy_free (vorbis_info_psy_global *i)
void _vi_psy_free (vorbis_info_psy *i)
static void min_curve (float *c, float *c2)
static void max_curve (float *c, float *c2)
static void attenuate_curve (float *c, float att)
static float *** setup_tone_curves (float curveatt_dB[P_BANDS], float binHz, int n, float center_boost, float center_decay_rate)
void _vp_psy_init (vorbis_look_psy *p, vorbis_info_psy *vi, vorbis_info_psy_global *gi, int n, long rate)
void _vp_psy_clear (vorbis_look_psy *p)
static void seed_curve (float *seed, const float **curves, float amp, int oc, int n, int linesper, float dBoffset)
static void seed_loop (vorbis_look_psy *p, const float ***curves, const float *f, const float *flr, float *seed, float specmax)
static void seed_chase (float *seeds, int linesper, long n)
static void max_seeds (vorbis_look_psy *p, float *seed, float *flr)
static void bark_noise_hybridmp (int n, const long *b, const float *f, float *noise, const float offset, const int fixed)
void _vp_noisemask (vorbis_look_psy *p, float *logmdct, float *logmask)
void _vp_tonemask (vorbis_look_psy *p, float *logfft, float *logmask, float global_specmax, float local_specmax)
void _vp_offset_and_mix (vorbis_look_psy *p, float *noise, float *tone, int offset_select, float *logmask, float *mdct, float *logmdct)
float _vp_ampmax_decay (float amp, vorbis_dsp_state *vd)
static int apsort (const void *a, const void *b)
static void flag_lossless (int limit, float prepoint, float postpoint, float *mdct, float *floor, int *flag, int i, int jn)
static float noise_normalize (vorbis_look_psy *p, int limit, float *r, float *q, float *f, int *flags, float acc, int i, int n, int *out)
void _vp_couple_quantize_normalize (int blobno, vorbis_info_psy_global *g, vorbis_look_psy *p, vorbis_info_mapping0 *vi, float **mdct, int **iwork, int *nonzero, int sliding_lowpass, int ch)

Variables

static const double stereo_threshholds [] ={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}
static const double stereo_threshholds_limited [] ={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}

Macro Definition Documentation

◆ NEGINF

#define NEGINF   -9999.f

Function Documentation

◆ _vi_gpsy_free()

void _vi_gpsy_free ( vorbis_info_psy_global * i)
inlinestatic

◆ _vi_psy_free()

void _vi_psy_free ( vorbis_info_psy * i)

◆ _vp_ampmax_decay()

float _vp_ampmax_decay ( float amp,
vorbis_dsp_state * vd )

◆ _vp_couple_quantize_normalize()

void _vp_couple_quantize_normalize ( int blobno,
vorbis_info_psy_global * g,
vorbis_look_psy * p,
vorbis_info_mapping0 * vi,
float ** mdct,
int ** iwork,
int * nonzero,
int sliding_lowpass,
int ch )

◆ _vp_global_free()

void _vp_global_free ( vorbis_look_psy_global * look)

◆ _vp_global_look()

vorbis_look_psy_global * _vp_global_look ( vorbis_info * vi)

◆ _vp_noisemask()

void _vp_noisemask ( vorbis_look_psy * p,
float * logmdct,
float * logmask )

◆ _vp_offset_and_mix()

void _vp_offset_and_mix ( vorbis_look_psy * p,
float * noise,
float * tone,
int offset_select,
float * logmask,
float * mdct,
float * logmdct )

@ M1 ** The following codes improve a noise problem. A fundamental idea uses the value of masking and carries out the relative compensation of the MDCT. However, this code is not perfect and all noise problems cannot be solved. by Aoyumi @ 2004/04/18

◆ _vp_psy_clear()

void _vp_psy_clear ( vorbis_look_psy * p)

◆ _vp_psy_init()

void _vp_psy_init ( vorbis_look_psy * p,
vorbis_info_psy * vi,
vorbis_info_psy_global * gi,
int n,
long rate )

◆ _vp_tonemask()

void _vp_tonemask ( vorbis_look_psy * p,
float * logfft,
float * logmask,
float global_specmax,
float local_specmax )

◆ apsort()

int apsort ( const void * a,
const void * b )
static

◆ attenuate_curve()

void attenuate_curve ( float * c,
float att )
static

◆ bark_noise_hybridmp()

void bark_noise_hybridmp ( int n,
const long * b,
const float * f,
float * noise,
const float offset,
const int fixed )
static

◆ flag_lossless()

void flag_lossless ( int limit,
float prepoint,
float postpoint,
float * mdct,
float * floor,
int * flag,
int i,
int jn )
static

◆ max_curve()

void max_curve ( float * c,
float * c2 )
static

◆ max_seeds()

void max_seeds ( vorbis_look_psy * p,
float * seed,
float * flr )
static

◆ min_curve()

void min_curve ( float * c,
float * c2 )
static

◆ noise_normalize()

float noise_normalize ( vorbis_look_psy * p,
int limit,
float * r,
float * q,
float * f,
int * flags,
float acc,
int i,
int n,
int * out )
static

◆ seed_chase()

void seed_chase ( float * seeds,
int linesper,
long n )
static

◆ seed_curve()

void seed_curve ( float * seed,
const float ** curves,
float amp,
int oc,
int n,
int linesper,
float dBoffset )
static

◆ seed_loop()

void seed_loop ( vorbis_look_psy * p,
const float *** curves,
const float * f,
const float * flr,
float * seed,
float specmax )
static

◆ setup_tone_curves()

float *** setup_tone_curves ( float curveatt_dB[P_BANDS],
float binHz,
int n,
float center_boost,
float center_decay_rate )
static

Variable Documentation

◆ stereo_threshholds

const double stereo_threshholds[] ={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}
static

◆ stereo_threshholds_limited

const double stereo_threshholds_limited[] ={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}
static