pesq 0.2.0

Pure Rust implementation of ITU-T P.862 PESQ speech quality assessment
Documentation
//! Table 1 of spec 06 section 6.4.1: the 49 Bark bands for 16 kHz.
//!
//! Same row layout as [`super::table::BARK_BANDS`] (spec 03, 3.8): the
//! group counts sum to 256, covering bins 1..=256 of the 512-point power
//! spectrum, and bands 42 to 48 extend coverage to a top band centred at
//! 7796.5 Hz. The decimal digits are transcribed verbatim from the
//! specification table; the extra precision beyond f32 is intentional.
//!
//! One row per band is the readable transcription of the specification
//! table, so the formatting of this block is pinned with
//! `#[rustfmt::skip]`.

use super::table::BarkBand;

#[allow(clippy::excessive_precision)]
#[rustfmt::skip]
pub(super) const BARK_BANDS_16K: [BarkBand; 49] = [
    BarkBand::new(1, 0.078672, 7.867213, 0.157344, 15.734426, 100.0, 51_286_152.0),
    BarkBand::new(1, 0.316341, 31.634144, 0.317994, 31.799433, 99.999_992, 2_454_709.5),
    BarkBand::new(1, 0.636559, 63.655895, 0.322441, 32.244064, 100.0, 70_794.593_75),
    BarkBand::new(1, 0.961246, 96.124611, 0.326934, 32.693359, 100.000_008, 4_897.788_574),
    BarkBand::new(1, 1.290450, 129.044968, 0.331474, 33.147385, 100.000_008, 1_174.897_705),
    BarkBand::new(1, 1.624217, 162.421738, 0.336061, 33.606140, 100.000_015, 389.045_166),
    BarkBand::new(1, 1.962597, 196.259659, 0.340697, 34.069702, 99.999_992, 104.712_86),
    BarkBand::new(1, 2.305636, 230.563568, 0.345381, 34.538116, 99.999_969, 45.708_82),
    BarkBand::new(2, 2.653383, 265.338348, 0.350114, 35.011429, 50.000_027, 17.782_795),
    BarkBand::new(1, 3.005889, 300.588867, 0.354897, 35.489655, 100.0, 9.772_372),
    BarkBand::new(1, 3.363201, 336.320129, 0.359729, 35.972870, 99.999_969, 4.897_789),
    BarkBand::new(1, 3.725371, 372.537140, 0.364611, 36.461121, 100.000_015, 3.090_296),
    BarkBand::new(1, 4.092449, 409.244934, 0.369544, 36.954407, 99.999_947, 1.905_461),
    BarkBand::new(1, 4.464486, 446.448578, 0.374529, 37.452911, 100.000_061, 1.258_925),
    BarkBand::new(2, 4.841533, 484.568604, 0.379565, 40.269653, 53.047_077, 0.977_237),
    BarkBand::new(1, 5.223642, 526.600586, 0.384653, 42.311859, 110.000_046, 0.724_436),
    BarkBand::new(1, 5.610866, 570.303833, 0.389794, 45.992554, 117.991_989, 0.562_341),
    BarkBand::new(2, 6.003256, 619.423340, 0.394989, 51.348511, 65.0, 0.457_088),
    BarkBand::new(2, 6.400869, 672.121643, 0.400236, 55.040527, 68.760_147, 0.389_045),
    BarkBand::new(2, 6.803755, 728.525696, 0.405538, 56.775208, 69.999_931, 0.331_131),
    BarkBand::new(2, 7.211971, 785.675964, 0.410894, 58.699402, 71.428_818, 0.295_121),
    BarkBand::new(2, 7.625571, 846.835693, 0.416306, 62.445862, 75.000_038, 0.269_153),
    BarkBand::new(2, 8.044611, 909.691650, 0.421773, 64.820923, 76.843_384, 0.257_04),
    BarkBand::new(2, 8.469146, 977.063293, 0.427297, 69.195374, 80.968_781, 0.251_189),
    BarkBand::new(2, 8.899232, 1049.861694, 0.432877, 76.745667, 88.646_126, 0.251_189),
    BarkBand::new(3, 9.334927, 1129.635986, 0.438514, 84.016235, 63.864_388, 0.251_189),
    BarkBand::new(3, 9.776288, 1217.257568, 0.444209, 90.825684, 68.155_35, 0.251_189),
    BarkBand::new(3, 10.223374, 1312.109497, 0.449962, 97.931152, 72.547_775, 0.263_027),
    BarkBand::new(3, 10.676242, 1412.501465, 0.455774, 103.348877, 75.584_831, 0.288_403),
    BarkBand::new(4, 11.134952, 1517.999390, 0.461645, 107.801880, 58.379_192, 0.309_03),
    BarkBand::new(3, 11.599563, 1628.894165, 0.467577, 113.552246, 80.950_836, 0.338_844),
    BarkBand::new(4, 12.070135, 1746.194336, 0.473569, 121.490601, 64.135_651, 0.371_535),
    BarkBand::new(5, 12.546731, 1871.568848, 0.479621, 130.420410, 54.384_785, 0.398_107),
    BarkBand::new(4, 13.029408, 2008.776123, 0.485736, 143.431763, 73.821_884, 0.436_516),
    BarkBand::new(5, 13.518232, 2158.979248, 0.491912, 158.486816, 64.437_073, 0.467_735),
    BarkBand::new(6, 14.013264, 2326.743164, 0.498151, 176.872803, 59.176_456, 0.489_779),
    BarkBand::new(6, 14.514566, 2513.787109, 0.504454, 198.314697, 65.521_278, 0.501_187),
    BarkBand::new(7, 15.022202, 2722.488770, 0.510819, 219.549561, 61.399_822, 0.501_187),
    BarkBand::new(8, 15.536238, 2952.586670, 0.517250, 240.600098, 58.144_047, 0.512_861),
    BarkBand::new(9, 16.056736, 3205.835449, 0.523745, 268.702393, 57.004_543, 0.524_807),
    BarkBand::new(9, 16.583761, 3492.679932, 0.530308, 306.060059, 64.126_297, 0.524_807),
    BarkBand::new(12, 17.117382, 3820.219238, 0.536934, 349.937012, 54.311_001, 0.524_807),
    BarkBand::new(12, 17.657663, 4193.938477, 0.543629, 398.686279, 61.114_979, 0.512_861),
    BarkBand::new(15, 18.204674, 4619.846191, 0.550390, 454.713867, 55.077_751, 0.478_63),
    BarkBand::new(16, 18.758478, 5100.437012, 0.557220, 506.841797, 56.849_335, 0.426_58),
    BarkBand::new(18, 19.319147, 5636.199219, 0.564119, 564.863770, 55.628_868, 0.371_535),
    BarkBand::new(21, 19.886751, 6234.313477, 0.571085, 637.261230, 53.137_054, 0.363_078),
    BarkBand::new(25, 20.461355, 6946.734863, 0.578125, 794.717285, 54.985_844, 0.416_869),
    BarkBand::new(20, 21.043034, 7796.473633, 0.585232, 931.068359, 79.546_974, 0.537_032),
];