r996: add renderprofiles.C to POTFILES.in
[cinelerra_cv/mob.git] / toolame-02l / psycho_n1.c
blob91340232818fa2969429fb5dc56cfb4640303ce3
1 #include <stdio.h>
2 #include "common.h"
3 #include "psycho_n1.h"
5 /* this is the null psychoacoustic model
6 All it does it copy some predefined values.
7 No actual modelling takes place */
9 /* a bunch of SNR values I sort of made up MFC 1 oct 99
10 Found by averaging the SNR values over a sound file
11 FIXME: Do a more rigourous investigation MFC Feb 2003 */
13 // From Castanets.wav
14 static FLOAT snrdef[32] = {
15 30, 17, 16, 10, 3, 12, 8, 2.5, 5, 5, 6, 6, 5, 6, 10, 6, -4,
16 -10, -21, -30, -42, -55, -68, -75, -75, -75, -75, -75, -91, -107, -110, -108
19 #ifdef TESTSNR
20 // Using TMBG song "I am not your broom" about 1min. Psy Model 2
21 static FLOAT snrdefa[32] = {
22 31, 17, 11, 9, 9, 7, 5, 3, 3, 3, 3, 3, 3, 1, -0, -2,
23 -5, -9,-15,-22,-32,-42,-54,-62,-63,-64,-66,-67,-83,-96,-98,-102
26 // Using Babylon5 "messages from earth: track 6" 15mins. Psy Model 2.
27 static FLOAT snrdefb[32] = {
28 30, 17, 11, 9, 8, 9, 6, 5, 5, 4, 4, 3, 2, -0, -2, -5,
29 -8,-13,-19,-27,-35,-46,-55,-64,-65,-66,-68,-69,-84,-97,-99,-104
32 // Using Babylon5 "messages from earth: track 6" 15mins. Psy Model 1
33 static FLOAT snrdefc[32] = {
34 32, 26, 22, 18, 16, 14, 12, 11, 10, 9, 9, 8, 6, 6, 4, 2,
35 0, -2, -7,-12,-18,-27,-35,-47,-53,-54,-56,-57,-57,-70, 0, 0
37 #endif
39 void psycho_n1(double ltmin[2][SBLIMIT], int stereo)
41 int i, k;
43 for (k = 0; k < stereo; k++)
44 for (i = 0; i < SBLIMIT; i++)
45 ltmin[k][i] = snrdef[i];