Files
tcd/mbe/enc_analysis.cpp
T

123 lines
9.6 KiB
C++

// The encoder's analysis tables: the two analysis windows and the voicing decision tables.
// Generated data; do not edit.
#include "enc_tables.h"
namespace halfrate::tables {
// Analysis window of the pitch spectrum, 256 points.
const float kLongWindow[256] = {
0x1.306b9ep-11f, 0x1.30f3a4p-11f, 0x1.328bap-11f, 0x1.353352p-11f, 0x1.38ea52p-11f, 0x1.3db00ap-11f,
0x1.4383bep-11f, 0x1.4a6486p-11f, 0x1.52514ep-11f, 0x1.5b48dep-11f, 0x1.6549dp-11f, 0x1.705296p-11f,
0x1.7c6178p-11f, 0x1.897498p-11f, 0x1.9789ecp-11f, 0x1.a69f46p-11f, 0x1.b6b24ap-11f, 0x1.c7c07cp-11f,
0x1.d9c734p-11f, 0x1.ecc3a6p-11f, 0x1.00596ep-10f, 0x1.0ac8ep-10f, 0x1.15ae88p-10f, 0x1.2108b8p-10f,
0x1.2cd5a8p-10f, 0x1.391384p-10f, 0x1.45c066p-10f, 0x1.52da54p-10f, 0x1.605f48p-10f, 0x1.6e4d24p-10f,
0x1.7ca1cp-10f, 0x1.8b5ae2p-10f, 0x1.9a763ep-10f, 0x1.a9f17ep-10f, 0x1.b9ca38p-10f, 0x1.c9fdf8p-10f,
0x1.da8a36p-10f, 0x1.eb6c62p-10f, 0x1.fca1dap-10f, 0x1.0713fap-9f, 0x1.0ffdfap-9f, 0x1.190d8cp-9f,
0x1.224146p-9f, 0x1.2b97bcp-9f, 0x1.350f78p-9f, 0x1.3ea702p-9f, 0x1.485cdcp-9f, 0x1.522f86p-9f,
0x1.5c1d76p-9f, 0x1.662524p-9f, 0x1.7044fep-9f, 0x1.7a7b74p-9f, 0x1.84c6ecp-9f, 0x1.8f25dp-9f,
0x1.999682p-9f, 0x1.a41764p-9f, 0x1.aea6dp-9f, 0x1.b94326p-9f, 0x1.c3eabep-9f, 0x1.ce9bf2p-9f,
0x1.d95516p-9f, 0x1.e4148p-9f, 0x1.eed886p-9f, 0x1.f99f7ap-9f, 0x1.0233d8p-8f, 0x1.0797bcp-8f,
0x1.0cfa96p-8f, 0x1.125b8cp-8f, 0x1.17b9cap-8f, 0x1.1d147ap-8f, 0x1.226ac8p-8f, 0x1.27bbdep-8f,
0x1.2d06eap-8f, 0x1.324b18p-8f, 0x1.378796p-8f, 0x1.3cbb96p-8f, 0x1.41e646p-8f, 0x1.4706dcp-8f,
0x1.4c1c88p-8f, 0x1.512684p-8f, 0x1.562404p-8f, 0x1.5b1442p-8f, 0x1.5ff67cp-8f, 0x1.64c9eep-8f,
0x1.698dd6p-8f, 0x1.6e417ap-8f, 0x1.72e41ep-8f, 0x1.777506p-8f, 0x1.7bf382p-8f, 0x1.805edcp-8f,
0x1.84b664p-8f, 0x1.88f96cp-8f, 0x1.8d274ep-8f, 0x1.913f62p-8f, 0x1.954106p-8f, 0x1.992b98p-8f,
0x1.9cfe8p-8f, 0x1.a0b922p-8f, 0x1.a45aecp-8f, 0x1.a7e34cp-8f, 0x1.ab51b8p-8f, 0x1.aea5a4p-8f,
0x1.b1de8ep-8f, 0x1.b4fbf6p-8f, 0x1.b7fd5ep-8f, 0x1.bae25p-8f, 0x1.bdaa58p-8f, 0x1.c0550ap-8f,
0x1.c2e1f8p-8f, 0x1.c550bep-8f, 0x1.c7a0fcp-8f, 0x1.c9d256p-8f, 0x1.cbe474p-8f, 0x1.cdd704p-8f,
0x1.cfa9b6p-8f, 0x1.d15c46p-8f, 0x1.d2ee6ep-8f, 0x1.d45ffp-8f, 0x1.d5b092p-8f, 0x1.d6e02p-8f,
0x1.d7ee6cp-8f, 0x1.d8db48p-8f, 0x1.d9a694p-8f, 0x1.da502ep-8f, 0x1.dad7fcp-8f, 0x1.db3deap-8f,
0x1.db81e6p-8f, 0x1.dba3e6p-8f, 0x1.dba3e6p-8f, 0x1.db81e6p-8f, 0x1.db3deap-8f, 0x1.dad7fcp-8f,
0x1.da502ep-8f, 0x1.d9a694p-8f, 0x1.d8db48p-8f, 0x1.d7ee6cp-8f, 0x1.d6e02p-8f, 0x1.d5b092p-8f,
0x1.d45ffp-8f, 0x1.d2ee6ep-8f, 0x1.d15c46p-8f, 0x1.cfa9b6p-8f, 0x1.cdd704p-8f, 0x1.cbe474p-8f,
0x1.c9d256p-8f, 0x1.c7a0fcp-8f, 0x1.c550bep-8f, 0x1.c2e1f8p-8f, 0x1.c0550ap-8f, 0x1.bdaa58p-8f,
0x1.bae25p-8f, 0x1.b7fd5ep-8f, 0x1.b4fbf6p-8f, 0x1.b1de8ep-8f, 0x1.aea5a4p-8f, 0x1.ab51b8p-8f,
0x1.a7e34cp-8f, 0x1.a45aecp-8f, 0x1.a0b922p-8f, 0x1.9cfe8p-8f, 0x1.992b98p-8f, 0x1.954106p-8f,
0x1.913f62p-8f, 0x1.8d274ep-8f, 0x1.88f96cp-8f, 0x1.84b664p-8f, 0x1.805edcp-8f, 0x1.7bf382p-8f,
0x1.777506p-8f, 0x1.72e41ep-8f, 0x1.6e417ap-8f, 0x1.698dd6p-8f, 0x1.64c9eep-8f, 0x1.5ff67cp-8f,
0x1.5b1442p-8f, 0x1.562404p-8f, 0x1.512684p-8f, 0x1.4c1c88p-8f, 0x1.4706dcp-8f, 0x1.41e646p-8f,
0x1.3cbb96p-8f, 0x1.378796p-8f, 0x1.324b18p-8f, 0x1.2d06eap-8f, 0x1.27bbdep-8f, 0x1.226ac8p-8f,
0x1.1d147ap-8f, 0x1.17b9cap-8f, 0x1.125b8cp-8f, 0x1.0cfa96p-8f, 0x1.0797bcp-8f, 0x1.0233d8p-8f,
0x1.f99f7ap-9f, 0x1.eed886p-9f, 0x1.e4148p-9f, 0x1.d95516p-9f, 0x1.ce9bf2p-9f, 0x1.c3eabep-9f,
0x1.b94326p-9f, 0x1.aea6dp-9f, 0x1.a41764p-9f, 0x1.999682p-9f, 0x1.8f25dp-9f, 0x1.84c6ecp-9f,
0x1.7a7b74p-9f, 0x1.7044fep-9f, 0x1.662524p-9f, 0x1.5c1d76p-9f, 0x1.522f86p-9f, 0x1.485cdcp-9f,
0x1.3ea702p-9f, 0x1.350f78p-9f, 0x1.2b97bcp-9f, 0x1.224146p-9f, 0x1.190d8cp-9f, 0x1.0ffdfap-9f,
0x1.0713fap-9f, 0x1.fca1dap-10f, 0x1.eb6c62p-10f, 0x1.da8a36p-10f, 0x1.c9fdf8p-10f, 0x1.b9ca38p-10f,
0x1.a9f17ep-10f, 0x1.9a763ep-10f, 0x1.8b5ae2p-10f, 0x1.7ca1cp-10f, 0x1.6e4d24p-10f, 0x1.605f48p-10f,
0x1.52da54p-10f, 0x1.45c066p-10f, 0x1.391384p-10f, 0x1.2cd5a8p-10f, 0x1.2108b8p-10f, 0x1.15ae88p-10f,
0x1.0ac8ep-10f, 0x1.00596ep-10f, 0x1.ecc3a6p-11f, 0x1.d9c734p-11f, 0x1.c7c07cp-11f, 0x1.b6b24ap-11f,
0x1.a69f46p-11f, 0x1.9789ecp-11f, 0x1.897498p-11f, 0x1.7c6178p-11f, 0x1.705296p-11f, 0x1.6549dp-11f,
0x1.5b48dep-11f, 0x1.52514ep-11f, 0x1.4a6486p-11f, 0x1.4383bep-11f, 0x1.3db00ap-11f, 0x1.38ea52p-11f,
0x1.353352p-11f, 0x1.328bap-11f, 0x1.30f3a4p-11f, 0x1.306b9ep-11f,
};
// Analysis window of the amplitude spectrum, 160 points.
const float kShortWindow[160] = {
0x1.e80cdep-11f, 0x1.ea3dbap-11f, 0x1.f0cf6ap-11f, 0x1.fbbf52p-11f, 0x1.058488p-10f, 0x1.0f5344p-10f,
0x1.1b47f2p-10f, 0x1.295dcap-10f, 0x1.398f2ap-10f, 0x1.4bd59ap-10f, 0x1.6029cep-10f, 0x1.7683a2p-10f,
0x1.8eda28p-10f, 0x1.a923a8p-10f, 0x1.c5559ep-10f, 0x1.e364c4p-10f, 0x1.01a28cp-9f, 0x1.1274eep-9f,
0x1.2422cep-9f, 0x1.36a51cp-9f, 0x1.49f47p-9f, 0x1.5e0916p-9f, 0x1.72db02p-9f, 0x1.8861e6p-9f,
0x1.9e9526p-9f, 0x1.b56bep-9f, 0x1.ccdcf6p-9f, 0x1.e4df08p-9f, 0x1.fd687cp-9f, 0x1.0b37c4p-8f,
0x1.17f512p-8f, 0x1.24e714p-8f, 0x1.32089ap-8f, 0x1.3f5466p-8f, 0x1.4cc528p-8f, 0x1.5a558p-8f,
0x1.680004p-8f, 0x1.75bf3ap-8f, 0x1.838da4p-8f, 0x1.9165cp-8f, 0x1.9f4202p-8f, 0x1.ad1ce2p-8f,
0x1.baf0d8p-8f, 0x1.c8b858p-8f, 0x1.d66de4p-8f, 0x1.e40bfep-8f, 0x1.f18d38p-8f, 0x1.feec2ap-8f,
0x1.0611bep-7f, 0x1.0c96f4p-7f, 0x1.13031ap-7f, 0x1.1953ap-7f, 0x1.1f86p-7f, 0x1.2597bep-7f,
0x1.2b866ep-7f, 0x1.314fb2p-7f, 0x1.36f13ap-7f, 0x1.3c68c4p-7f, 0x1.41b422p-7f, 0x1.46d136p-7f,
0x1.4bbdf4p-7f, 0x1.507864p-7f, 0x1.54fea4p-7f, 0x1.594ee4p-7f, 0x1.5d676ap-7f, 0x1.614692p-7f,
0x1.64ead4p-7f, 0x1.6852b6p-7f, 0x1.6b7cdep-7f, 0x1.6e680ap-7f, 0x1.71130cp-7f, 0x1.737cd6p-7f,
0x1.75a46ep-7f, 0x1.7788fap-7f, 0x1.7929b8p-7f, 0x1.7a86p-7f, 0x1.7b9d46p-7f, 0x1.7c6f1ep-7f,
0x1.7cfb32p-7f, 0x1.7d414ap-7f, 0x1.7d414ap-7f, 0x1.7cfb32p-7f, 0x1.7c6f1ep-7f, 0x1.7b9d46p-7f,
0x1.7a86p-7f, 0x1.7929b8p-7f, 0x1.7788fap-7f, 0x1.75a46ep-7f, 0x1.737cd6p-7f, 0x1.71130cp-7f,
0x1.6e680ap-7f, 0x1.6b7cdep-7f, 0x1.6852b6p-7f, 0x1.64ead4p-7f, 0x1.614692p-7f, 0x1.5d676ap-7f,
0x1.594ee4p-7f, 0x1.54fea4p-7f, 0x1.507864p-7f, 0x1.4bbdf4p-7f, 0x1.46d136p-7f, 0x1.41b422p-7f,
0x1.3c68c4p-7f, 0x1.36f13ap-7f, 0x1.314fb2p-7f, 0x1.2b866ep-7f, 0x1.2597bep-7f, 0x1.1f86p-7f,
0x1.1953ap-7f, 0x1.13031ap-7f, 0x1.0c96f4p-7f, 0x1.0611bep-7f, 0x1.feec2ap-8f, 0x1.f18d38p-8f,
0x1.e40bfep-8f, 0x1.d66de4p-8f, 0x1.c8b858p-8f, 0x1.baf0d8p-8f, 0x1.ad1ce2p-8f, 0x1.9f4202p-8f,
0x1.9165cp-8f, 0x1.838da4p-8f, 0x1.75bf3ap-8f, 0x1.680004p-8f, 0x1.5a558p-8f, 0x1.4cc528p-8f,
0x1.3f5466p-8f, 0x1.32089ap-8f, 0x1.24e714p-8f, 0x1.17f512p-8f, 0x1.0b37c4p-8f, 0x1.fd687cp-9f,
0x1.e4df08p-9f, 0x1.ccdcf6p-9f, 0x1.b56bep-9f, 0x1.9e9526p-9f, 0x1.8861e6p-9f, 0x1.72db02p-9f,
0x1.5e0916p-9f, 0x1.49f47p-9f, 0x1.36a51cp-9f, 0x1.2422cep-9f, 0x1.1274eep-9f, 0x1.01a28cp-9f,
0x1.e364c4p-10f, 0x1.c5559ep-10f, 0x1.a923a8p-10f, 0x1.8eda28p-10f, 0x1.7683a2p-10f, 0x1.6029cep-10f,
0x1.4bd59ap-10f, 0x1.398f2ap-10f, 0x1.295dcap-10f, 0x1.1b47f2p-10f, 0x1.0f5344p-10f, 0x1.058488p-10f,
0x1.fbbf52p-11f, 0x1.f0cf6ap-11f, 0x1.ea3dbap-11f, 0x1.e80cdep-11f,
};
// Pitch index where each row of the voicing threshold tables starts (rows 0..8).
const int32_t kVoicingRowStart[9] = {
0, 30, 50, 65, 80, 92, 104, 112, 116,
};
// Voicing threshold per row and band (with the voicing table option on).
const float kVoicingThresholdBase[9 * 8] = {
0x1.a66666p-1f, 0x1.d9999ap-1f, 0x1p+0f, 0x1.99999ap-1f, 0x1.cp-1f, 0x1.99999ap-1f, 0x1.8p-1f, 0x1.666666p-1f,
0x1.0cccccp+0f, 0x1.2cccccp+0f, 0x1.f33334p-1f, 0x1.733334p-1f, 0x1.8p-1f, 0x1.4cccccp-1f, 0x1.4cccccp-1f, 0x1.4p-1f,
0x1.ccccccp-1f, 0x1.f33334p-1f, 0x1.a66666p-1f, 0x1.4cccccp-1f, 0x1.59999ap-1f, 0x1.266666p-1f, 0x1.19999ap-1f, 0x1.0cccccp-1f,
0x1.4cccccp-1f, 0x1.59999ap-1f, 0x1.4cccccp-1f, 0x1p-1f, 0x1.19999ap-1f, 0x1.e66666p-2f, 0x1.e66666p-2f, 0x1.99999ap-2f,
0x1.19999ap-1f, 0x1.19999ap-1f, 0x1p-1f, 0x1.b33334p-2f, 0x1.b33334p-2f, 0x1.99999ap-2f, 0x1.8p-2f, 0x1.4cccccp-2f,
0x1.8p-2f, 0x1.99999ap-2f, 0x1.8p-2f, 0x1.19999ap-2f, 0x1.4cccccp-2f, 0x1.ccccccp-3f, 0x1.19999ap-2f, 0x1.666666p-3f,
0x1.19999ap-2f, 0x1.333334p-2f, 0x1.19999ap-2f, 0x1.ccccccp-3f, 0x1.ccccccp-3f, 0x1.99999ap-3f, 0x1.333334p-3f, 0x1p-3f,
0x1.ccccccp-3f, 0x1p-2f, 0x1.99999ap-3f, 0x1.333334p-3f, 0x1.666666p-3f, 0x1.666666p-3f, 0x1.99999ap-3f, 0x1.666666p-3f,
0x1.99999ap-4f, 0x1.99999ap-3f, 0x1.666666p-3f, 0x1.666666p-3f, 0x1.333334p-4f, 0x1.333334p-3f, 0x1.333334p-3f, 0x1p-3f,
};
// Voicing threshold slope on the pitch's fit cost, per row and band.
const float kVoicingThresholdSlope[9 * 8] = {
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.ccccccp-1f,
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.99999ap-1f, -0x1p+0f, -0x1p+0f,
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.99999ap-1f, -0x1.99999ap-1f, -0x1p+0f,
-0x1.ccccccp-1f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f,
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f,
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.ccccccp-1f, -0x1p+0f, -0x1.666666p-1f, -0x1.ccccccp-1f, -0x1.99999ap-1f,
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.99999ap-1f, -0x1.666666p-1f,
-0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.666666p-1f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1p+0f,
0.0f, -0x1p+0f, -0x1p+0f, -0x1p+0f, -0x1.99999ap-4f, -0x1p+0f, -0x1p+0f, -0x1p+0f,
};
// Upper edges (Hz) of the 18 bands of the candidate re-scoring histogram; entry 0 is 0.
const float kRescoreBandEdge[18] = {
0.0f, 0x1.9p+6f, 0x1.9p+7f, 0x1.2cp+8f, 0x1.9p+8f, 0x1.fep+8f, 0x1.3bp+9f, 0x1.81p+9f, 0x1.ccp+9f,
0x1.0ep+10f, 0x1.3d8p+10f, 0x1.72p+10f, 0x1.aep+10f, 0x1.f4p+10f, 0x1.22p+11f, 0x1.518p+11f, 0x1.89cp+11f, 0x1.ce8p+11f,
};
} // namespace halfrate::tables