00001 #include <stdio.h>
00002 #include "common.h"
00003 #include "psycho_n1.h"
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 static FLOAT snrdef[32] = {
00015 30, 17, 16, 10, 3, 12, 8, 2.5, 5, 5, 6, 6, 5, 6, 10, 6, -4,
00016 -10, -21, -30, -42, -55, -68, -75, -75, -75, -75, -75, -91, -107, -110, -108
00017 };
00018
00019 #ifdef TESTSNR
00020
00021 static FLOAT snrdefa[32] = {
00022 31, 17, 11, 9, 9, 7, 5, 3, 3, 3, 3, 3, 3, 1, -0, -2,
00023 -5, -9,-15,-22,-32,-42,-54,-62,-63,-64,-66,-67,-83,-96,-98,-102
00024 };
00025
00026
00027 static FLOAT snrdefb[32] = {
00028 30, 17, 11, 9, 8, 9, 6, 5, 5, 4, 4, 3, 2, -0, -2, -5,
00029 -8,-13,-19,-27,-35,-46,-55,-64,-65,-66,-68,-69,-84,-97,-99,-104
00030 };
00031
00032
00033 static FLOAT snrdefc[32] = {
00034 32, 26, 22, 18, 16, 14, 12, 11, 10, 9, 9, 8, 6, 6, 4, 2,
00035 0, -2, -7,-12,-18,-27,-35,-47,-53,-54,-56,-57,-57,-70, 0, 0
00036 };
00037 #endif
00038
00039 void psycho_n1(double ltmin[2][SBLIMIT], int stereo)
00040 {
00041 int i, k;
00042
00043 for (k = 0; k < stereo; k++)
00044 for (i = 0; i < SBLIMIT; i++)
00045 ltmin[k][i] = snrdef[i];
00046 }