zenilib: zenilib/jni/external/libvorbis/lib/psy.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
psy.h File Reference
`#include "smallft.h"`
`#include "backends.h"`
`#include "envelope.h"`

Go to the source code of this file.

## Classes

struct | vorbis_info_psy
struct | vorbis_info_psy_global
struct | vorbis_look_psy
struct | vorbis_look_psy_global

## Macros

#define | NOISE_COMPAND_LEVELS 40
#define | P_BANDS 17 /* 62Hz to 16kHz */
#define | P_LEVEL_0 30. /* 30 dB */
#define | P_LEVELS 8 /* 30dB to 100dB */
#define | P_NOISECURVES 3

## Typedefs

typedef struct vorbis_info_psy | vorbis_info_psy

## Functions

vorbis_info_psy * | _vi_psy_copy (vorbis_info_psy *i)
void * | _vi_psy_dup (void *source)
void | _vi_psy_free (vorbis_info_psy *i)
float | _vp_ampmax_decay (float amp, vorbis_dsp_state *vd)
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)
void | _vp_noisemask (vorbis_look_psy *p, float *logmdct, float *logmask)
void | _vp_offset_and_mix (vorbis_look_psy *p, float *noise, float *tone, int offset_select, float *logmask, float *mdct, float *logmdct)
void | _vp_psy_clear (vorbis_look_psy *p)
void | _vp_psy_init (vorbis_look_psy *p, vorbis_info_psy *vi, vorbis_info_psy_global *gi, int n, long rate)
void | _vp_tonemask (vorbis_look_psy *p, float *logfft, float *logmask, float global_specmax, float local_specmax)

## Macro Definition Documentation

#define NOISE_COMPAND_LEVELS 40

Definition at line 35 of file psy.h.

Referenced by _vp_noisemask(), and vorbis_encode_compand_setup().

#define P_BANDS 17 /* 62Hz to 16kHz */

Definition at line 30 of file psy.h.

Referenced by _vp_psy_clear(), _vp_psy_init(), seed_loop(), setup_tone_curves(), vorbis_encode_noisebias_setup(), and vorbis_encode_tonemask_setup().

#define P_LEVEL_0 30. /* 30 dB */

Definition at line 32 of file psy.h.

Referenced by seed_curve(), and setup_tone_curves().

#define P_LEVELS 8 /* 30dB to 100dB */

Definition at line 31 of file psy.h.

Referenced by _vp_psy_clear(), seed_curve(), and setup_tone_curves().

#define P_NOISECURVES 3

Definition at line 33 of file psy.h.

Referenced by _vp_psy_clear(), _vp_psy_init(), and vorbis_encode_noisebias_setup().

## Typedef Documentation

typedef struct vorbis_info_psy vorbis_info_psy

## Function Documentation

vorbis_info_psy* _vi_psy_copy | ( | vorbis_info_psy * | i | ) |

void* _vi_psy_dup | ( | void * | source | ) |

void _vi_psy_free | ( | vorbis_info_psy * | i | ) |

Definition at line 62 of file psy.c.

References _ogg_free, and memset.

Referenced by vorbis_info_clear().

float _vp_ampmax_decay | ( | float | amp,
|  | vorbis_dsp_state * | vd
| ) |  |

Definition at line 830 of file psy.c.

References vorbis_info_psy_global::ampmax_att_per_sec, codec_setup_info::blocksizes, vorbis_info::codec_setup, codec_setup_info::psy_g_param, vorbis_info::rate, vorbis_dsp_state::vi, vi, and vorbis_dsp_state::W.

Referenced by vorbis_analysis_blockout().

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
| ) |  |

@ M2 ** The boost problem by the combination of noise normalization and point stereo is eased. However, this is a temporary patch. by Aoyumi @ 2004/04/18

Definition at line 1007 of file psy.c.

References vorbis_info_psy::blockflag, vorbis_info_mapping0::coupling_ang, vorbis_info_mapping0::coupling_mag, vorbis_info_psy_global::coupling_pointlimit, vorbis_info_psy_global::coupling_postpointamp, vorbis_info_psy_global::coupling_prepointamp, vorbis_info_mapping0::coupling_steps, e, fabs(), flag_lossless(), floor(), FLOOR1_fromdB_LOOKUP, i, j, k, vorbis_look_psy::m_val, memcpy, memset, vorbis_look_psy::n, noise_normalize(), vorbis_info_psy::normal_p, vorbis_info_psy::normal_partition, NULL, stereo_threshholds, stereo_threshholds_limited, and vorbis_look_psy::vi.

Referenced by mapping0_forward().

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

Definition at line 699 of file psy.c.

References vorbis_look_psy::bark, bark_noise_hybridmp(), i, vorbis_look_psy::n, NOISE_COMPAND_LEVELS, vorbis_info_psy::noisecompand, vorbis_info_psy::noisewindowfixed, and vorbis_look_psy::vi.

Referenced by mapping0_forward().

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

Definition at line 772 of file psy.c.

References i, vorbis_look_psy::m_val, max, vorbis_look_psy::n, vorbis_info_psy::noisemaxsupp, vorbis_look_psy::noiseoffset, vorbis_info_psy::tone_masteratt, and vorbis_look_psy::vi.

Referenced by mapping0_forward().

void _vp_psy_clear | ( | vorbis_look_psy * | p | ) |

Definition at line 361 of file psy.c.

References _ogg_free, vorbis_look_psy::ath, vorbis_look_psy::bark, i, j, memset, vorbis_look_psy::noiseoffset, vorbis_look_psy::octave, P_BANDS, P_LEVELS, P_NOISECURVES, and vorbis_look_psy::tonecurves.

Referenced by vorbis_dsp_clear().

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

Definition at line 267 of file psy.c.

References _ogg_malloc, ATH, vorbis_look_psy::ath, vorbis_look_psy::bark, vorbis_info_psy_global::eighth_octave_lines, vorbis_look_psy::eighth_octave_lines, vorbis_look_psy::firstoc, fromOC, cordic::hi, i, int, j, cordic::lo, vorbis_look_psy::m_val, MAX_ATH, memset, vorbis_look_psy::n, vorbis_info_psy::noiseoff, vorbis_look_psy::noiseoffset, vorbis_info_psy::noisewindowhi, vorbis_info_psy::noisewindowhimin, vorbis_info_psy::noisewindowlo, vorbis_info_psy::noisewindowlomin, vorbis_look_psy::octave, P_BANDS, P_NOISECURVES, vorbis_look_psy::rate, setup_tone_curves(), vorbis_look_psy::shiftoc, toBARK, vorbis_info_psy::tone_centerboost, vorbis_info_psy::tone_decay, vorbis_info_psy::toneatt, vorbis_look_psy::tonecurves, toOC, vorbis_look_psy::total_octave_lines, vorbis_look_psy::vi, and vi.

Referenced by _vds_shared_init(), and main().

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

Definition at line 747 of file psy.c.

References vorbis_look_psy::ath, vorbis_info_psy::ath_adjatt, vorbis_info_psy::ath_maxatt, i, max_seeds(), vorbis_look_psy::n, NEGINF, seed_loop(), vorbis_look_psy::tonecurves, vorbis_look_psy::total_octave_lines, vorbis_look_psy::vi, and vi.

Referenced by mapping0_forward().