1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
9 * by the XIPHOPHORUS Company http://www.xiph.org/ *
11 ********************************************************************
13 function: random psychoacoustics (not including preecho)
14 last mod: $Id: psy.h,v 1.20 2001/05/27 06:44:00 xiphmont Exp $
16 ********************************************************************/
26 /* psychoacoustic setup ********************************************/
30 typedef struct vorbis_info_psy{
37 int eighth_octave_lines;
39 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
40 /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
41 /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
44 float toneatt[P_BANDS][P_LEVELS];
47 float peakatt[P_BANDS][P_LEVELS];
56 float noisemedian[P_BANDS*2];
65 struct vorbis_info_psy *vi;
73 long *octave; /* in n.ocshift format */
78 int eighth_octave_lines; /* power of two, please */
79 int total_octave_lines;
83 extern void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate);
84 extern void _vp_psy_clear(vorbis_look_psy *p);
85 extern void *_vi_psy_dup(void *source);
87 extern void _vi_psy_free(vorbis_info_psy *i);
88 extern vorbis_info_psy *_vi_psy_copy(vorbis_info_psy *i);
90 extern float _vp_compute_mask(vorbis_look_psy *p,
95 extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd);