Path: blob/master/thirdparty/libvorbis/modes/psych_8.h
9917 views
/********************************************************************1* *2* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *3* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *4* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *5* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *6* *7* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *8* by the Xiph.Org Foundation https://xiph.org/ *9* *10********************************************************************1112function: 8kHz psychoacoustic settings1314********************************************************************/1516static const att3 _psy_tone_masteratt_8[3]={17{{ 32, 25, 12}, 0, 0}, /* 0 */18{{ 30, 25, 12}, 0, 0}, /* 0 */19{{ 20, 0, -14}, 0, 0}, /* 0 */20};2122static const vp_adjblock _vp_tonemask_adj_8[3]={23/* adjust for mode zero */24/* 63 125 250 500 1 2 4 8 16 */25{{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */26{{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */27{{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */28};293031static const noise3 _psy_noisebias_8[3]={32/* 63 125 250 500 1k 2k 4k 8k 16k*/33{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99},34{-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99},35{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},3637{{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99},38{-10,-10,-10,-10,-10,-10, -5, -5, -5, 0, 0, 0, 0, 0, 99, 99, 99},39{-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}},4041{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 99, 99, 99},42{-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99},43{-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}},44};4546/* stereo mode by base quality level */47static const adj_stereo _psy_stereo_modes_8[3]={48/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */49{{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},50{ 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},51{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},52{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},53{{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},54{ 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},55{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},56{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},57{{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},58{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4},59{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},60{ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},61};6263static const noiseguard _psy_noiseguards_8[2]={64{10,10,-1},65{10,10,-1},66};6768static const compandblock _psy_compand_8[2]={69{{700, 1, 2, 3, 4, 5, 6, 7, /* 7dB */718, 8, 9, 9,10,10,11, 11, /* 15dB */7212,12,13,13,14,14,15, 15, /* 23dB */7316,16,17,17,17,18,18, 19, /* 31dB */7419,19,20,21,22,23,24, 25, /* 39dB */75}},76{{770, 1, 2, 3, 4, 5, 6, 6, /* 7dB */787, 7, 6, 6, 5, 5, 4, 4, /* 15dB */793, 3, 3, 4, 5, 6, 7, 8, /* 23dB */809,10,11,12,13,14,15, 16, /* 31dB */8117,18,19,20,21,22,23, 24, /* 39dB */82}},83};8485static const double _psy_lowpass_8[3]={3.,4.,4.};86static const int _noise_start_8[2]={8764,64,88};89static const int _noise_part_8[2]={908,8,91};9293static const int _psy_ath_floater_8[3]={94-100,-100,-105,95};9697static const int _psy_ath_abs_8[3]={98-130,-130,-140,99};100101102