/******************************************************************************
*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*****************************************************************************
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
#include <stdio.h>
#include <math.h>
#include "impd_type_def.h"
#include "impd_drc_common.h"
#include "impd_drc_extr_delta_coded_info.h"
#include "impd_drc_struct.h"
#include "impd_drc_interface.h"
#include "impd_drc_selection_process.h"
#include "impd_drc_filter_bank.h"
#include "impd_drc_rom.h"
const FLOAT32 samp_rate_tbl[13][12] = {
{1.559742927551f, -2.926673889160f, 1.378173947334f, -1.844531774521f,
0.855774641037f, 0.997517585754f, -1.995035171509f, 0.997517585754f,
-1.995032072067f, 0.995038211346f},
{1.557545065880f, -2.905559301376f, 1.361245870590f, -1.830842256546f,
0.844074070454f, 0.997298538685f, -1.994597077370f, 0.997298538685f,
-1.994593381882f, 0.994600534439f},
{1.547380685806f, -2.808161973953f, 1.285161137581f, -1.767331838608f,
0.791711509228f, 0.996279776096f, -1.992559552193f, 0.996279776096f,
-1.992552518845f, 0.992566406727f},
{1.535182833672f, -2.691803932190f, 1.198426246643f, -1.690699458122f,
0.732504665852f, 0.995044350624f, -1.990088701248f, 0.995044350624f,
-1.990076303482f, 0.990100920200f},
{1.530909657478f, -2.651169300079f, 1.169166922569f, -1.663750052452f,
0.712657511234f, 0.994607865810f, -1.989215731621f, 0.994607865810f,
-1.989201068878f, 0.989230215549f},
{1.511321425438f, -2.465713739395f, 1.042117238045f, -1.539572954178f,
0.627297878265f, 0.992580235004f, -1.985160470009f, 0.992580235004f,
-1.985132932663f, 0.985188126564f},
{1.488207340240f, -2.248480796814f, 0.906192243099f, -1.391770243645f,
0.537688970566f, 0.990125238895f, -1.980250477791f, 0.990125238895f,
-1.980201482773f, 0.980299532413f},
{1.480212569237f, -2.173723459244f, 0.862487196922f, -1.340346932411f,
0.509323298931f, 0.989259064198f, -1.978518128395f, 0.989259064198f,
-1.978460073471f, 0.978576123714f},
{1.444234013557f, -1.839543223381f, 0.685432314873f, -1.107139229774f,
0.397262454033f, 0.985242545605f, -1.970485091209f, 0.985242545605f,
-1.970375299454f, 0.970594763756f},
{1.403080821037f, -1.461511373520f, 0.519652962685f, -0.837045848370f,
0.298268288374f, 0.980395674706f, -1.960791349411f, 0.980395674706f,
-1.960597157478f, 0.960985362530f},
{1.389132857323f, -1.334347724915f, 0.471855700016f, -0.744739949703f,
0.271380871534f, 0.978689610958f, -1.957379221916f, 0.978689610958f,
-1.957149744034f, 0.957608699799f},
{1.327733159065f, -0.780098080635f, 0.309720277786f, -0.334008187056f,
0.191363617778f, 0.970807731152f, -1.941615462303f, 0.970807731152f,
-1.941183090210f, 0.942047894001f},
{1.308971643448f, -0.612507879734f, 0.275601744652f, -0.207099482417f,
0.179165065289f, 0.968287348747f, -1.936574697495f, 0.968287348747f,
-1.936063885689f, 0.937085747719f}};
const ia_delta_gain_code_table_struct
ia_drc_gain_tbls_prof_0_1[NUM_GAIN_TBL_PROF_0_1_ENTRIES] = {
{2, 0x003, -0.125f}, {2, 0x002, 0.125f}, {3, 0x001, -0.250f},
{3, 0x002, 0.000f}, {4, 0x000, -2.000f}, {5, 0x002, -0.500f},
{5, 0x00F, -0.375f}, {5, 0x00E, 1.000f}, {6, 0x019, -0.625f},
{6, 0x018, 0.250f}, {6, 0x006, 0.375f}, {7, 0x00F, -1.000f},
{7, 0x034, -0.875f}, {7, 0x036, -0.750f}, {7, 0x037, 0.500f},
{8, 0x01D, 0.625f}, {9, 0x039, -1.875f}, {9, 0x0D5, -1.125f},
{9, 0x0D7, 0.750f}, {9, 0x0D4, 0.875f}, {10, 0x070, -1.500f},
{10, 0x1AC, -1.375f}, {10, 0x1AD, -1.250f}, {11, 0x0E2, -1.750f},
{11, 0x0E3, -1.625f}
};
const ia_delta_gain_code_table_struct
ia_drc_gain_tbls_prof_2[NUM_GAIN_TBL_PROF_2_ENTRIES] = {
{3, 0x007, -0.125f}, {4, 0x00C, -0.625f}, {4, 0x009, -0.500f},
{4, 0x005, -0.375f}, {4, 0x003, -0.250f}, {4, 0x001, 0.000f},
{4, 0x00B, 0.125f}, {5, 0x011, -0.875f}, {5, 0x00E, -0.750f},
{5, 0x005, 0.250f}, {5, 0x004, 0.375f}, {5, 0x008, 0.500f},
{5, 0x000, 0.625f}, {5, 0x00D, 0.750f}, {5, 0x00F, 0.875f},
{5, 0x010, 1.000f}, {5, 0x01B, 1.125f}, {6, 0x02B, -1.250f},
{6, 0x028, -1.125f}, {6, 0x002, -1.000f}, {6, 0x012, 1.250f},
{6, 0x018, 1.375f}, {6, 0x029, 1.500f}, {7, 0x06A, -4.000f},
{7, 0x054, -1.750f}, {7, 0x068, -1.625f}, {7, 0x026, -1.500f},
{7, 0x006, -1.375f}, {7, 0x032, 1.625f}, {8, 0x0D2, -2.250f},
{8, 0x0AB, -2.125f}, {8, 0x0AA, -2.000f}, {8, 0x04F, -1.875f},
{8, 0x04E, 1.750f}, {8, 0x0D7, 1.875f}, {8, 0x00E, 2.000f},
{9, 0x1AD, -3.625f}, {9, 0x1AC, -3.375f}, {9, 0x1A6, -3.250f},
{9, 0x0CD, -3.125f}, {9, 0x0CE, -2.750f}, {9, 0x1A7, -2.625f},
{9, 0x01F, -2.500f}, {9, 0x0CC, -2.375f}, {10, 0x03C, -3.500f},
{10, 0x19E, -3.000f}, {10, 0x19F, -2.875f}, {11, 0x07A, -3.875f},
{11, 0x07B, -3.750f}};
const FLOAT32 channel_weight[] = {
10.0f, 6.0f, 4.5f, 3.0f, 1.5f, 0.0f, -1.5f, -3.0f,
-4.5f, -6.0f, -10.0f, -15.0f, -20.0f, -30.0f, -40.0f, -1000.0f};
const FLOAT32 dwnmix_coeff_v1[] = {
10.00f, 6.00f, 4.50f, 3.00f, 1.50f, 0.00f, -0.50f, -1.00f,
-1.50f, -2.00f, -2.50f, -3.00f, -3.50f, -4.00f, -4.50f, -5.00f,
-5.50f, -6.00f, -6.50f, -7.00f, -7.50f, -8.00f, -9.00f, -10.00f,
-11.00f, -12.00f, -15.00f, -20.00f, -25.00f, -30.00f, -40.00f, -100000.0f};
const FLOAT32 eq_slope_tbl[] = {-32.0f, -24.0f, -18.0f, -12.0f, -7.0f, -4.0f,
-2.0f, -1.0f, 1.0f, 2.0f, 4.0f, 7.0f,
12.0f, 18.0f, 24.0f, 32.0f};
const FLOAT32 eq_gain_delta_tbl[] = {
-22.0f, -16.0f, -13.0f, -11.0f, -9.0f, -7.0f, -6.0f, -5.0f,
-4.0f, -3.0f, -2.5f, -2.0f, -1.5f, -1.0f, -0.5f, 0.0f,
0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.0f, 4.0f, 5.0f,
6.0f, 7.0f, 9.0f, 11.0f, 13.0f, 16.0f, 22.0f, 32.0f,
};
const FLOAT32 zero_pole_radius_tbl[] = {
0.00000000E+00f, 7.57409621E-11f, 7.47451079E-09f, 7.37623509E-08f,
3.37872933E-07f, 1.05439995E-06f, 2.61370951E-06f, 5.55702854E-06f,
1.05878771E-05f, 1.85806475E-05f, 3.05868707E-05f, 4.78395414E-05f,
7.17558214E-05f, 1.03938342E-04f, 1.46175269E-04f, 2.00439375E-04f,
2.68886099E-04f, 3.53850890E-04f, 4.57845890E-04f, 5.83555840E-04f,
7.33833469E-04f, 9.11694835E-04f, 1.12031354E-03f, 1.36301492E-03f,
1.64327072E-03f, 1.96469179E-03f, 2.33102194E-03f, 2.74613220E-03f,
3.21401190E-03f, 3.73876374E-03f, 4.32459544E-03f, 4.97581391E-03f,
5.69681637E-03f, 6.49208482E-03f, 7.36617809E-03f, 8.32372531E-03f,
9.36941616E-03f, 1.05079999E-02f, 1.17442720E-02f, 1.30830696E-02f,
1.45292655E-02f, 1.60877611E-02f, 1.77634824E-02f, 1.95613634E-02f,
2.14863531E-02f, 2.35434026E-02f, 2.57374570E-02f, 2.80734543E-02f,
3.05563174E-02f, 3.31909470E-02f, 3.59822176E-02f, 3.89349759E-02f,
4.20540236E-02f, 4.53441292E-02f, 4.88100089E-02f, 5.24563305E-02f,
5.62877022E-02f, 6.03086725E-02f, 6.45237267E-02f, 6.89372867E-02f,
7.35536888E-02f, 7.83772022E-02f, 8.34120139E-02f, 8.86622295E-02f,
9.41318572E-02f, 9.98248383E-02f, 1.05744988E-01f, 1.11896060E-01f,
1.18281692E-01f, 1.24905407E-01f, 1.31770656E-01f, 1.38880774E-01f,
1.46238968E-01f, 1.53848350E-01f, 1.61711931E-01f, 1.69832602E-01f,
1.78213134E-01f, 1.86856180E-01f, 1.95764288E-01f, 2.04939872E-01f,
2.14385241E-01f, 2.24102572E-01f, 2.34093949E-01f, 2.44361281E-01f,
2.54906416E-01f, 2.65731007E-01f, 2.76836663E-01f, 2.88224846E-01f,
2.99896836E-01f, 3.11853856E-01f, 3.24096978E-01f, 3.36627185E-01f,
3.49445283E-01f, 3.62551987E-01f, 3.75947863E-01f, 3.89633417E-01f,
4.03608948E-01f, 4.17874694E-01f, 4.32430804E-01f, 4.47277188E-01f,
4.62413728E-01f, 4.77840215E-01f, 4.93556231E-01f, 5.09561300E-01f,
5.25854886E-01f, 5.42436182E-01f, 5.59304416E-01f, 5.76458573E-01f,
5.93897760E-01f, 6.11620665E-01f, 6.29626155E-01f, 6.47912800E-01f,
6.66479111E-01f, 6.85323536E-01f, 7.04444408E-01f, 7.23839939E-01f,
7.43508339E-01f, 7.63447523E-01f, 7.83655465E-01f, 8.04130018E-01f,
8.24868977E-01f, 8.45869958E-01f, 8.67130578E-01f, 8.88648331E-01f,
9.10420537E-01f, 9.32444632E-01f, 9.54717815E-01f, 9.77237225E-01f};
const FLOAT32 zero_pole_angle_tbl[] = {
0.00000000E+00f, 6.90533966E-04f, 7.31595252E-04f, 7.75098170E-04f,
8.21187906E-04f, 8.70018279E-04f, 9.21752258E-04f, 9.76562500E-04f,
1.03463193E-03f, 1.09615434E-03f, 1.16133507E-03f, 1.23039165E-03f,
1.30355455E-03f, 1.38106793E-03f, 1.46319050E-03f, 1.55019634E-03f,
1.64237581E-03f, 1.74003656E-03f, 1.84350452E-03f, 1.95312500E-03f,
2.06926386E-03f, 2.19230869E-03f, 2.32267015E-03f, 2.46078330E-03f,
2.60710909E-03f, 2.76213586E-03f, 2.92638101E-03f, 3.10039268E-03f,
3.28475162E-03f, 3.48007312E-03f, 3.68700903E-03f, 3.90625000E-03f,
4.13852771E-03f, 4.38461738E-03f, 4.64534029E-03f, 4.92156660E-03f,
5.21421818E-03f, 5.52427173E-03f, 5.85276202E-03f, 6.20078536E-03f,
6.56950324E-03f, 6.96014624E-03f, 7.37401807E-03f, 7.81250000E-03f,
8.27705542E-03f, 8.76923475E-03f, 9.29068059E-03f, 9.84313320E-03f,
1.04284364E-02f, 1.10485435E-02f, 1.17055240E-02f, 1.24015707E-02f,
1.31390065E-02f, 1.39202925E-02f, 1.47480361E-02f, 1.56250000E-02f,
1.65541108E-02f, 1.75384695E-02f, 1.85813612E-02f, 1.96862664E-02f,
2.08568727E-02f, 2.20970869E-02f, 2.34110481E-02f, 2.48031414E-02f,
2.62780130E-02f, 2.78405849E-02f, 2.94960723E-02f, 3.12500000E-02f,
3.31082217E-02f, 3.50769390E-02f, 3.71627223E-02f, 3.93725328E-02f,
4.17137454E-02f, 4.41941738E-02f, 4.68220962E-02f, 4.96062829E-02f,
5.25560260E-02f, 5.56811699E-02f, 5.89921445E-02f, 6.25000000E-02f,
6.62164434E-02f, 7.01538780E-02f, 7.43254447E-02f, 7.87450656E-02f,
8.34274909E-02f, 8.83883476E-02f, 9.36441923E-02f, 9.92125657E-02f,
1.05112052E-01f, 1.11362340E-01f, 1.17984289E-01f, 1.25000000E-01f,
1.32432887E-01f, 1.40307756E-01f, 1.48650889E-01f, 1.57490131E-01f,
1.66854982E-01f, 1.76776695E-01f, 1.87288385E-01f, 1.98425131E-01f,
2.10224104E-01f, 2.22724680E-01f, 2.35968578E-01f, 2.50000000E-01f,
2.64865774E-01f, 2.80615512E-01f, 2.97301779E-01f, 3.14980262E-01f,
3.33709964E-01f, 3.53553391E-01f, 3.74576769E-01f, 3.96850263E-01f,
4.20448208E-01f, 4.45449359E-01f, 4.71937156E-01f, 5.00000000E-01f,
5.29731547E-01f, 5.61231024E-01f, 5.94603558E-01f, 6.29960525E-01f,
6.67419927E-01f, 7.07106781E-01f, 7.49153538E-01f, 7.93700526E-01f,
8.40896415E-01f, 8.90898718E-01f, 9.43874313E-01f, 1.00000000E+00f};
const FLOAT32 shape_filt_lf_y1_bound_tbl[][3] = {
{-0.994f, -0.996f, -1.0f},
{-0.99f, -0.995f, -0.999f},
{-0.98f, -0.989f, -0.996f},
{-0.97f, -0.983f, -0.994f},
};
const FLOAT32 shape_filt_hf_y1_bound_tbl[][3] = {
{0.15f, 0.75f, 1.05f}, {0.43f, 0.87f, 1.07f}, {0.60f, 0.92f, 1.07f},
{0.80f, 1.00f, 1.06f}, {0.90f, 1.04f, 1.073f},
};
const FLOAT32 shape_filt_lf_gain_offset_tbl[][3] = {
{3.0f, 2.0f, 1.2f},
{3.0f, 2.0f, 1.5f},
{3.0f, 2.0f, 2.0f},
{3.0f, 2.0f, 2.0f},
};
const FLOAT32 shape_filt_hf_gain_offset_tbl[][3] = {
{4.5f, 6.0f, 3.5f}, {3.7f, 4.0f, 2.7f}, {3.0f, 3.5f, 2.0f},
{2.0f, 2.5f, 1.5f}, {1.5f, 2.0f, 1.31f},
};
const FLOAT32 shape_filt_lf_radius_tbl[] = {
0.988f, 0.98f, 0.96f, 0.94f,
};
const FLOAT32 shape_filt_hf_radius_tbl[] = {0.45f, 0.40f, 0.35f, 0.30f, 0.30f};
const FLOAT32 shape_filt_cutoff_freq_norm_hf_tbl[] = {0.15f, 0.20f, 0.25f,
0.35f, 0.45f};
const ia_cicp_sigmoid_characteristic_param_struct
pstr_cicp_sigmoid_characteristic_param[] = {
{0.0f, 9.0f, 12.0f}, {0.2f, 9.0f, 12.0f}, {0.4f, 9.0f, 12.0f},
{0.6f, 9.0f, 12.0f}, {0.8f, 6.0f, 8.0f}, {1.0f, 5.0f, 6.0f}};
const ia_slope_code_table_struct
slope_code_tbl_entries_by_size[NUM_SLOPE_TBL_ENTRIES] = {
{1, 0x001, 0.0f, 7}, {2, 0x000, -0.005f, 6},
{4, 0x007, 0.005f, 8}, {5, 0x00A, -0.1953f, 3},
{5, 0x009, -0.0781f, 4}, {5, 0x00D, -0.0312f, 5},
{5, 0x00B, 0.0312f, 9}, {6, 0x018, -3.0518f, 0},
{6, 0x011, 0.0781f, 10}, {7, 0x032, -0.4883f, 2},
{7, 0x020, 1.2207f, 13}, {7, 0x033, 3.0518f, 14},
{8, 0x042, -1.2207f, 1}, {9, 0x087, 0.1953f, 11},
{9, 0x086, 0.4883f, 12},
};
const FLOAT32 dwnmix_coeff[] = {0.0f, -0.5f, -1.0f, -1.5f, -2.0f, -2.5f,
-3.0f, -3.5f, -4.0f, -4.5f, -5.0f, -5.5f,
-6.0f, -7.5f, -9.0f, -1000.0f};
const FLOAT32 dwnmix_coeff_lfe[] = {
10.0f, 6.0f, 4.5f, 3.0f, 1.5f, 0.0f, -1.5f, -3.0f,
-4.5f, -6.0f, -10.0f, -15.0f, -20.0f, -30.0f, -40.0f, -1000.0f};
WORD32 drc_characteristic_order_default[][3] = {
{1, 2, -1}, {2, 3, 1}, {3, 4, 2}, {4, 5, 3}, {5, 6, 4}, {6, 5, -1},
{7, 9, -1}, {8, 10, -1}, {9, 7, -1}, {10, 8, -1}, {11, 10, 9}};
WORD32 measurement_system_default_tbl[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
WORD32 measurement_system_bs1770_3_tbl[] = {0, 0, 8, 0, 1, 3, 0, 5, 6, 7, 4, 2};
WORD32 measurement_system_user_tbl[] = {0, 0, 1, 0, 8, 5, 0, 2, 3, 4, 6, 7};
WORD32 measurement_system_expert_tbl[] = {0, 0, 3, 0, 1, 8, 0, 4, 5, 6, 7, 2};
WORD32 measurement_system_rms_a_tbl[] = {0, 0, 5, 0, 1, 3, 0, 8, 6, 7, 4, 2};
WORD32 measurement_system_rms_b_tbl[] = {0, 0, 5, 0, 1, 3, 0, 6, 8, 7, 4, 2};
WORD32 measurement_system_rms_c_tbl[] = {0, 0, 5, 0, 1, 3, 0, 6, 7, 8, 4, 2};
WORD32 measurement_system_rms_d_tbl[] = {0, 0, 3, 0, 1, 7, 0, 4, 5, 6, 8, 2};
WORD32 measurement_system_rms_e_tbl[] = {0, 0, 1, 0, 7, 5, 0, 2, 3, 4, 6, 8};
WORD32 measurement_method_prog_loudness_tbl[] = {0, 0, 1, 0, 0, 0,
0, 2, 3, 4, 0, 0};
WORD32 measurement_method_peak_loudness_tbl[] = {0, 7, 0, 0, 0, 0,
6, 5, 4, 3, 2, 1};
const ia_loc_sys_interface_struct loc_sys_interface[] = {
{0, 1, {0, 0, 0}, 0, 0}, {0, 1, {2, 0, 0}, 0, 0},
};
const ia_loc_loudness_norm_ctrl_interface_struct
loc_loudness_norm_ctrl_interface[] = {
{0, 0.0f}, {0, 0.0f},
};
const ia_loc_loudness_norm_param_interface_struct
loc_loudness_norm_param_interface[] = {
{0, 0, LOUDNESS_DEVIATION_MAX_DEFAULT,
USER_METHOD_DEFINITION_PROGRAM_LOUDNESS,
USER_MEASUREMENT_SYSTEM_BS_1770_3, USER_LOUDNESS_PREPROCESSING_OFF, 20,
LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT, 0.0f, 0.0f},
{0, 0, LOUDNESS_DEVIATION_MAX_DEFAULT,
USER_METHOD_DEFINITION_PROGRAM_LOUDNESS,
USER_MEASUREMENT_SYSTEM_BS_1770_3, USER_LOUDNESS_PREPROCESSING_OFF, 20,
LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT, 0.0f, 0.0f},
};
const ia_loc_drc_interface_struct loc_dyn_range_ctrl_interface[] = {
{1,
3,
{MATCH_EFFECT_TYPE, MATCH_DYNAMIC_RANGE, MATCH_DRC_CHARACTERISTIC},
SHORT_TERM_LOUDNESS_TO_AVG,
1,
5.0f,
3.0f,
10.0f,
3},
{1,
3,
{MATCH_EFFECT_TYPE, MATCH_DYNAMIC_RANGE, MATCH_DRC_CHARACTERISTIC},
TOP_OF_LOUDNESS_RANGE_TO_AVG,
0,
5.0f,
3.0f,
10.0f,
3},
};
const ia_loc_requested_drc_effect_struct loc_requested_drc_effect_type_str[] = {
{1,
1,
{EFFECT_TYPE_REQUESTED_NIGHT, EFFECT_TYPE_REQUESTED_GENERAL_COMPR,
EFFECT_TYPE_REQUESTED_ARTISTIC, EFFECT_TYPE_REQUESTED_LIMITED,
EFFECT_TYPE_REQUESTED_DIALOG}},
{4,
1,
{EFFECT_TYPE_REQUESTED_LOWLEVEL, EFFECT_TYPE_REQUESTED_NIGHT,
EFFECT_TYPE_REQUESTED_LIMITED, EFFECT_TYPE_REQUESTED_ARTISTIC,
EFFECT_TYPE_REQUESTED_DIALOG}},
};
const ia_loc_drc_parameter_interface_struct loc_drc_parameter_interface[] = {
{1.0f, 1.0f, 0}, {1.0f, 1.0f, 0},
};
FLOAT32 f_bands_nrm_QMF71[71] = {
0.004583300000000f, 0.000833330000000f, 0.002083300000000f,
0.005875000000000f, 0.009791700000000f, 0.014292000000000f,
0.019792000000000f, 0.027000000000000f, 0.035417000000000f,
0.042625000000000f, 0.056750000000000f, 0.072375000000000f,
0.088000000000000f, 0.103620000000000f, 0.119250000000000f,
0.134870000000000f, 0.150500000000000f, 0.166120000000000f,
0.181750000000000f, 0.197370000000000f, 0.213000000000000f,
0.228620000000000f, 0.244250000000000f, 0.259880000000000f,
0.275500000000000f, 0.291130000000000f, 0.306750000000000f,
0.322380000000000f, 0.338000000000000f, 0.353630000000000f,
0.369250000000000f, 0.384880000000000f, 0.400500000000000f,
0.416130000000000f, 0.431750000000000f, 0.447380000000000f,
0.463000000000000f, 0.478630000000000f, 0.494250000000000f,
0.509870000000000f, 0.525500000000000f, 0.541120000000000f,
0.556750000000000f, 0.572370000000000f, 0.588000000000000f,
0.603620000000000f, 0.619250000000000f, 0.634870000000000f,
0.650500000000000f, 0.666120000000000f, 0.681750000000000f,
0.697370000000000f, 0.713000000000000f, 0.728620000000000f,
0.744250000000000f, 0.759870000000000f, 0.775500000000000f,
0.791120000000000f, 0.806750000000000f, 0.822370000000000f,
0.838000000000000f, 0.853620000000000f, 0.869250000000000f,
0.884870000000000f, 0.900500000000000f, 0.916120000000000f,
0.931750000000000f, 0.947370000000000f, 0.963000000000000f,
0.974540000000000f, 0.999040000000000f};
FLOAT32 f_bands_nrm_QMF64[64] = {
0.0078125000000000f, 0.0234380000000000f, 0.0390620000000000f,
0.0546880000000000f, 0.0703120000000000f, 0.0859380000000000f,
0.1015600000000000f, 0.1171900000000000f, 0.1328100000000000f,
0.1484400000000000f, 0.1640600000000000f, 0.1796900000000000f,
0.1953100000000000f, 0.2109400000000000f, 0.2265600000000000f,
0.2421900000000000f, 0.2578100000000000f, 0.2734400000000000f,
0.2890600000000000f, 0.3046900000000000f, 0.3203100000000000f,
0.3359400000000000f, 0.3515600000000000f, 0.3671900000000000f,
0.3828100000000000f, 0.3984400000000000f, 0.4140600000000000f,
0.4296900000000000f, 0.4453100000000000f, 0.4609400000000000f,
0.4765600000000000f, 0.4921900000000000f, 0.5078100000000000f,
0.5234400000000000f, 0.5390600000000000f, 0.5546900000000000f,
0.5703100000000000f, 0.5859400000000000f, 0.6015600000000000f,
0.6171900000000000f, 0.6328100000000000f, 0.6484400000000000f,
0.6640600000000000f, 0.6796900000000000f, 0.6953100000000000f,
0.7109400000000000f, 0.7265600000000000f, 0.7421900000000000f,
0.7578100000000000f, 0.7734400000000000f, 0.7890600000000000f,
0.8046900000000000f, 0.8203100000000000f, 0.8359400000000000f,
0.8515600000000000f, 0.8671900000000000f, 0.8828100000000000f,
0.8984400000000000f, 0.9140600000000000f, 0.9296900000000000f,
0.9453100000000000f, 0.9609400000000000f, 0.9765600000000000f,
0.9921900000000000f};
FLOAT32 f_bands_nrm_STFT256[257] = {
0.000000000000000f, 0.003906250000000f, 0.007812500000000f,
0.011718750000000f, 0.015625000000000f, 0.019531250000000f,
0.023437500000000f, 0.027343750000000f, 0.031250000000000f,
0.035156250000000f, 0.039062500000000f, 0.042968750000000f,
0.046875000000000f, 0.050781250000000f, 0.054687500000000f,
0.058593750000000f, 0.062500000000000f, 0.066406250000000f,
0.070312500000000f, 0.074218750000000f, 0.078125000000000f,
0.082031250000000f, 0.085937500000000f, 0.089843750000000f,
0.093750000000000f, 0.097656250000000f, 0.101562500000000f,
0.105468750000000f, 0.109375000000000f, 0.113281250000000f,
0.117187500000000f, 0.121093750000000f, 0.125000000000000f,
0.128906250000000f, 0.132812500000000f, 0.136718750000000f,
0.140625000000000f, 0.144531250000000f, 0.148437500000000f,
0.152343750000000f, 0.156250000000000f, 0.160156250000000f,
0.164062500000000f, 0.167968750000000f, 0.171875000000000f,
0.175781250000000f, 0.179687500000000f, 0.183593750000000f,
0.187500000000000f, 0.191406250000000f, 0.195312500000000f,
0.199218750000000f, 0.203125000000000f, 0.207031250000000f,
0.210937500000000f, 0.214843750000000f, 0.218750000000000f,
0.222656250000000f, 0.226562500000000f, 0.230468750000000f,
0.234375000000000f, 0.238281250000000f, 0.242187500000000f,
0.246093750000000f, 0.250000000000000f, 0.253906250000000f,
0.257812500000000f, 0.261718750000000f, 0.265625000000000f,
0.269531250000000f, 0.273437500000000f, 0.277343750000000f,
0.281250000000000f, 0.285156250000000f, 0.289062500000000f,
0.292968750000000f, 0.296875000000000f, 0.300781250000000f,
0.304687500000000f, 0.308593750000000f, 0.312500000000000f,
0.316406250000000f, 0.320312500000000f, 0.324218750000000f,
0.328125000000000f, 0.332031250000000f, 0.335937500000000f,
0.339843750000000f, 0.343750000000000f, 0.347656250000000f,
0.351562500000000f, 0.355468750000000f, 0.359375000000000f,
0.363281250000000f, 0.367187500000000f, 0.371093750000000f,
0.375000000000000f, 0.378906250000000f, 0.382812500000000f,
0.386718750000000f, 0.390625000000000f, 0.394531250000000f,
0.398437500000000f, 0.402343750000000f, 0.406250000000000f,
0.410156250000000f, 0.414062500000000f, 0.417968750000000f,
0.421875000000000f, 0.425781250000000f, 0.429687500000000f,
0.433593750000000f, 0.437500000000000f, 0.441406250000000f,
0.445312500000000f, 0.449218750000000f, 0.453125000000000f,
0.457031250000000f, 0.460937500000000f, 0.464843750000000f,
0.468750000000000f, 0.472656250000000f, 0.476562500000000f,
0.480468750000000f, 0.484375000000000f, 0.488281250000000f,
0.492187500000000f, 0.496093750000000f, 0.500000000000000f,
0.503906250000000f, 0.507812500000000f, 0.511718750000000f,
0.515625000000000f, 0.519531250000000f, 0.523437500000000f,
0.527343750000000f, 0.531250000000000f, 0.535156250000000f,
0.539062500000000f, 0.542968750000000f, 0.546875000000000f,
0.550781250000000f, 0.554687500000000f, 0.558593750000000f,
0.562500000000000f, 0.566406250000000f, 0.570312500000000f,
0.574218750000000f, 0.578125000000000f, 0.582031250000000f,
0.585937500000000f, 0.589843750000000f, 0.593750000000000f,
0.597656250000000f, 0.601562500000000f, 0.605468750000000f,
0.609375000000000f, 0.613281250000000f, 0.617187500000000f,
0.621093750000000f, 0.625000000000000f, 0.628906250000000f,
0.632812500000000f, 0.636718750000000f, 0.640625000000000f,
0.644531250000000f, 0.648437500000000f, 0.652343750000000f,
0.656250000000000f, 0.660156250000000f, 0.664062500000000f,
0.667968750000000f, 0.671875000000000f, 0.675781250000000f,
0.679687500000000f, 0.683593750000000f, 0.687500000000000f,
0.691406250000000f, 0.695312500000000f, 0.699218750000000f,
0.703125000000000f, 0.707031250000000f, 0.710937500000000f,
0.714843750000000f, 0.718750000000000f, 0.722656250000000f,
0.726562500000000f, 0.730468750000000f, 0.734375000000000f,
0.738281250000000f, 0.742187500000000f, 0.746093750000000f,
0.750000000000000f, 0.753906250000000f, 0.757812500000000f,
0.761718750000000f, 0.765625000000000f, 0.769531250000000f,
0.773437500000000f, 0.777343750000000f, 0.781250000000000f,
0.785156250000000f, 0.789062500000000f, 0.792968750000000f,
0.796875000000000f, 0.800781250000000f, 0.804687500000000f,
0.808593750000000f, 0.812500000000000f, 0.816406250000000f,
0.820312500000000f, 0.824218750000000f, 0.828125000000000f,
0.832031250000000f, 0.835937500000000f, 0.839843750000000f,
0.843750000000000f, 0.847656250000000f, 0.851562500000000f,
0.855468750000000f, 0.859375000000000f, 0.863281250000000f,
0.867187500000000f, 0.871093750000000f, 0.875000000000000f,
0.878906250000000f, 0.882812500000000f, 0.886718750000000f,
0.890625000000000f, 0.894531250000000f, 0.898437500000000f,
0.902343750000000f, 0.906250000000000f, 0.910156250000000f,
0.914062500000000f, 0.917968750000000f, 0.921875000000000f,
0.925781250000000f, 0.929687500000000f, 0.933593750000000f,
0.937500000000000f, 0.941406250000000f, 0.945312500000000f,
0.949218750000000f, 0.953125000000000f, 0.957031250000000f,
0.960937500000000f, 0.964843750000000f, 0.968750000000000f,
0.972656250000000f, 0.976562500000000f, 0.980468750000000f,
0.984375000000000f, 0.988281250000000f, 0.992187500000000f,
0.996093750000000f, 1.000000000000000f};
FLOAT64 qmf_filter_coeff[640] = {0,
-0.00055252865047,
-0.00056176925738,
-0.00049475180896,
-0.00048752279712,
-0.00048937912498,
-0.00050407143497,
-0.00052265642972,
-0.00054665656337,
-0.00056778025613,
-0.00058709304852,
-0.00061327473938,
-0.00063124935319,
-0.00065403333621,
-0.00067776907764,
-0.00069416146273,
-0.00071577364744,
-0.00072550431222,
-0.00074409418541,
-0.00074905980532,
-0.00076813719270,
-0.00077248485949,
-0.00078343322877,
-0.00077798694927,
-0.00078036647100,
-0.00078014496257,
-0.00077579773310,
-0.00076307935757,
-0.00075300014201,
-0.00073193571525,
-0.00072153919876,
-0.00069179375372,
-0.00066504150893,
-0.00063415949025,
-0.00059461189330,
-0.00055645763906,
-0.00051455722108,
-0.00046063254803,
-0.00040951214522,
-0.00035011758756,
-0.00028969811748,
-0.00020983373440,
-0.00014463809349,
-0.00006173344072,
0.00001349497418,
0.00010943831274,
0.00020430170688,
0.00029495311041,
0.00040265402160,
0.00051073884952,
0.00062393761391,
0.00074580258865,
0.00086084433262,
0.00098859883015,
0.00112501551307,
0.00125778846475,
0.00139024948272,
0.00154432198471,
0.00168680832531,
0.00183482654224,
0.00198411407369,
0.00214615835557,
0.00230172547746,
0.00246256169126,
0.00262017586902,
0.00278704643465,
0.00294694477165,
0.00311254206525,
0.00327396134847,
0.00344188741828,
0.00360082681231,
0.00376039229104,
0.00392074323703,
0.00408197531935,
0.00422642692270,
0.00437307196781,
0.00452098527825,
0.00466064606118,
0.00479325608498,
0.00491376035745,
0.00503930226013,
0.00514073539032,
0.00524611661324,
0.00534716811982,
0.00541967759307,
0.00548760401507,
0.00554757145088,
0.00559380230045,
0.00562206432097,
0.00564551969164,
0.00563891995151,
0.00562661141932,
0.00559171286630,
0.00554043639400,
0.00547537830770,
0.00538389758970,
0.00527157587272,
0.00513822754514,
0.00498396877629,
0.00481094690600,
0.00460395301471,
0.00438018617447,
0.00412516423270,
0.00384564081246,
0.00354012465507,
0.00320918858098,
0.00284467578623,
0.00245085400321,
0.00202741761850,
0.00157846825768,
0.00109023290512,
0.00058322642480,
0.00002760451905,
-0.00054642808664,
-0.00115681355227,
-0.00180394725893,
-0.00248267236449,
-0.00319337783900,
-0.00394011240522,
-0.00472225962400,
-0.00553372111088,
-0.00637922932685,
-0.00726158168517,
-0.00817982333726,
-0.00913253296085,
-0.01011502154986,
-0.01113155480321,
-0.01218499959508,
0.01327182200351,
0.01439046660792,
0.01554055533423,
0.01673247129989,
0.01794333813443,
0.01918724313698,
0.02045317933555,
0.02174675502535,
0.02306801692862,
0.02441609920285,
0.02578758475467,
0.02718594296329,
0.02860721736385,
0.03005026574279,
0.03150176087389,
0.03297540810337,
0.03446209487686,
0.03596975605542,
0.03748128504252,
0.03900536794745,
0.04053491705584,
0.04206490946367,
0.04360975421304,
0.04514884056413,
0.04668430272642,
0.04821657200672,
0.04973857556014,
0.05125561555216,
0.05276307465207,
0.05424527683589,
0.05571736482138,
0.05716164501299,
0.05859156836260,
0.05998374801761,
0.06134551717207,
0.06268578081172,
0.06397158980681,
0.06522471064380,
0.06643675122104,
0.06760759851228,
0.06870438283512,
0.06976302447127,
0.07076287107266,
0.07170026731102,
0.07256825833083,
0.07336202550803,
0.07410036424342,
0.07474525581194,
0.07531373362019,
0.07580083586584,
0.07619924793396,
0.07649921704119,
0.07670934904245,
0.07681739756964,
0.07682300113923,
0.07672049241746,
0.07650507183194,
0.07617483218536,
0.07573057565061,
0.07515762552870,
0.07446643947564,
0.07364060057620,
0.07267746427299,
0.07158263647903,
0.07035330735093,
0.06896640131951,
0.06745250215166,
0.06576906686508,
0.06394448059633,
0.06196027790387,
0.05981665708090,
0.05751526919867,
0.05504600343009,
0.05240938217366,
0.04959786763445,
0.04663033051701,
0.04347687821958,
0.04014582784127,
0.03664181168133,
0.03295839306691,
0.02908240060125,
0.02503075618909,
0.02079970728622,
0.01637012582228,
0.01176238327857,
0.00696368621617,
0.00197656014503,
-0.00320868968304,
-0.00857117491366,
-0.01412888273558,
-0.01988341292573,
-0.02582272888064,
-0.03195312745332,
-0.03827765720822,
-0.04478068215856,
-0.05148041767934,
-0.05837053268336,
-0.06544098531359,
-0.07269433008129,
-0.08013729344279,
-0.08775475365593,
-0.09555333528914,
-0.10353295311463,
-0.11168269317730,
-0.12000779846800,
-0.12850028503878,
-0.13715517611934,
-0.14597664911870,
-0.15496070710605,
-0.16409588556669,
-0.17338081721706,
-0.18281725485142,
-0.19239667457267,
-0.20212501768103,
-0.21197358538056,
-0.22196526964149,
-0.23206908706791,
-0.24230168845974,
-0.25264803095722,
-0.26310532994603,
-0.27366340405625,
-0.28432141891085,
-0.29507167170646,
-0.30590985751916,
-0.31682789136456,
-0.32781137272105,
-0.33887226938665,
-0.34999141229310,
0.36115899031355,
0.37237955463061,
0.38363500139043,
0.39492117615675,
0.40623176767625,
0.41756968968409,
0.42891199207373,
0.44025537543665,
0.45159965356824,
0.46293080852757,
0.47424532146115,
0.48552530911099,
0.49677082545707,
0.50798175000434,
0.51912349702391,
0.53022408956855,
0.54125534487322,
0.55220512585061,
0.56307891401370,
0.57385241316923,
0.58454032354679,
0.59511230862496,
0.60557835389180,
0.61591099320291,
0.62612426956055,
0.63619801077286,
0.64612696959461,
0.65590163024671,
0.66551398801627,
0.67496631901712,
0.68423532934598,
0.69332823767032,
0.70223887193539,
0.71094104263095,
0.71944626349561,
0.72774489002994,
0.73582117582769,
0.74368278636488,
0.75131374561237,
0.75870807608242,
0.76586748650939,
0.77277808813327,
0.77942875190216,
0.78583531203920,
0.79197358416424,
0.79784664137700,
0.80344857518505,
0.80876950044491,
0.81381912706217,
0.81857760046468,
0.82304198905409,
0.82722753473360,
0.83110384571520,
0.83469373618402,
0.83797173378865,
0.84095413924722,
0.84362382812005,
0.84598184698206,
0.84803157770763,
0.84978051984268,
0.85119715249343,
0.85230470352147,
0.85310209497017,
0.85357205739107,
0.85373856005937,
0.85357205739107,
0.85310209497017,
0.85230470352147,
0.85119715249343,
0.84978051984268,
0.84803157770763,
0.84598184698206,
0.84362382812005,
0.84095413924722,
0.83797173378865,
0.83469373618402,
0.83110384571520,
0.82722753473360,
0.82304198905409,
0.81857760046468,
0.81381912706217,
0.80876950044491,
0.80344857518505,
0.79784664137700,
0.79197358416424,
0.78583531203920,
0.77942875190216,
0.77277808813327,
0.76586748650939,
0.75870807608242,
0.75131374561237,
0.74368278636488,
0.73582117582769,
0.72774489002994,
0.71944626349561,
0.71094104263095,
0.70223887193539,
0.69332823767032,
0.68423532934598,
0.67496631901712,
0.66551398801627,
0.65590163024671,
0.64612696959461,
0.63619801077286,
0.62612426956055,
0.61591099320291,
0.60557835389180,
0.59511230862496,
0.58454032354679,
0.57385241316923,
0.56307891401370,
0.55220512585061,
0.54125534487322,
0.53022408956855,
0.51912349702391,
0.50798175000434,
0.49677082545707,
0.48552530911099,
0.47424532146115,
0.46293080852757,
0.45159965356824,
0.44025537543665,
0.42891199207373,
0.41756968968409,
0.40623176767625,
0.39492117615675,
0.38363500139043,
0.37237955463061,
-0.36115899031355,
-0.34999141229310,
-0.33887226938665,
-0.32781137272105,
-0.31682789136456,
-0.30590985751916,
-0.29507167170646,
-0.28432141891085,
-0.27366340405625,
-0.26310532994603,
-0.25264803095722,
-0.24230168845974,
-0.23206908706791,
-0.22196526964149,
-0.21197358538056,
-0.20212501768103,
-0.19239667457267,
-0.18281725485142,
-0.17338081721706,
-0.16409588556669,
-0.15496070710605,
-0.14597664911870,
-0.13715517611934,
-0.12850028503878,
-0.12000779846800,
-0.11168269317730,
-0.10353295311463,
-0.09555333528914,
-0.08775475365593,
-0.08013729344279,
-0.07269433008129,
-0.06544098531359,
-0.05837053268336,
-0.05148041767934,
-0.04478068215856,
-0.03827765720822,
-0.03195312745332,
-0.02582272888064,
-0.01988341292573,
-0.01412888273558,
-0.00857117491366,
-0.00320868968304,
0.00197656014503,
0.00696368621617,
0.01176238327857,
0.01637012582228,
0.02079970728622,
0.02503075618909,
0.02908240060125,
0.03295839306691,
0.03664181168133,
0.04014582784127,
0.04347687821958,
0.04663033051701,
0.04959786763445,
0.05240938217366,
0.05504600343009,
0.05751526919867,
0.05981665708090,
0.06196027790387,
0.06394448059633,
0.06576906686508,
0.06745250215166,
0.06896640131951,
0.07035330735093,
0.07158263647903,
0.07267746427299,
0.07364060057620,
0.07446643947564,
0.07515762552870,
0.07573057565061,
0.07617483218536,
0.07650507183194,
0.07672049241746,
0.07682300113923,
0.07681739756964,
0.07670934904245,
0.07649921704119,
0.07619924793396,
0.07580083586584,
0.07531373362019,
0.07474525581194,
0.07410036424342,
0.07336202550803,
0.07256825833083,
0.07170026731102,
0.07076287107266,
0.06976302447127,
0.06870438283512,
0.06760759851228,
0.06643675122104,
0.06522471064380,
0.06397158980681,
0.06268578081172,
0.06134551717207,
0.05998374801761,
0.05859156836260,
0.05716164501299,
0.05571736482138,
0.05424527683589,
0.05276307465207,
0.05125561555216,
0.04973857556014,
0.04821657200672,
0.04668430272642,
0.04514884056413,
0.04360975421304,
0.04206490946367,
0.04053491705584,
0.03900536794745,
0.03748128504252,
0.03596975605542,
0.03446209487686,
0.03297540810337,
0.03150176087389,
0.03005026574279,
0.02860721736385,
0.02718594296329,
0.02578758475467,
0.02441609920285,
0.02306801692862,
0.02174675502535,
0.02045317933555,
0.01918724313698,
0.01794333813443,
0.01673247129989,
0.01554055533423,
0.01439046660792,
-0.01327182200351,
-0.01218499959508,
-0.01113155480321,
-0.01011502154986,
-0.00913253296085,
-0.00817982333726,
-0.00726158168517,
-0.00637922932685,
-0.00553372111088,
-0.00472225962400,
-0.00394011240522,
-0.00319337783900,
-0.00248267236449,
-0.00180394725893,
-0.00115681355227,
-0.00054642808664,
0.00002760451905,
0.00058322642480,
0.00109023290512,
0.00157846825768,
0.00202741761850,
0.00245085400321,
0.00284467578623,
0.00320918858098,
0.00354012465507,
0.00384564081246,
0.00412516423270,
0.00438018617447,
0.00460395301471,
0.00481094690600,
0.00498396877629,
0.00513822754514,
0.00527157587272,
0.00538389758970,
0.00547537830770,
0.00554043639400,
0.00559171286630,
0.00562661141932,
0.00563891995151,
0.00564551969164,
0.00562206432097,
0.00559380230045,
0.00554757145088,
0.00548760401507,
0.00541967759307,
0.00534716811982,
0.00524611661324,
0.00514073539032,
0.00503930226013,
0.00491376035745,
0.00479325608498,
0.00466064606118,
0.00452098527825,
0.00437307196781,
0.00422642692270,
0.00408197531935,
0.00392074323703,
0.00376039229104,
0.00360082681231,
0.00344188741828,
0.00327396134847,
0.00311254206525,
0.00294694477165,
0.00278704643465,
0.00262017586902,
0.00246256169126,
0.00230172547746,
0.00214615835557,
0.00198411407369,
0.00183482654224,
0.00168680832531,
0.00154432198471,
0.00139024948272,
0.00125778846475,
0.00112501551307,
0.00098859883015,
0.00086084433262,
0.00074580258865,
0.00062393761391,
0.00051073884952,
0.00040265402160,
0.00029495311041,
0.00020430170688,
0.00010943831274,
0.00001349497418,
-0.00006173344072,
-0.00014463809349,
-0.00020983373440,
-0.00028969811748,
-0.00035011758756,
-0.00040951214522,
-0.00046063254803,
-0.00051455722108,
-0.00055645763906,
-0.00059461189330,
-0.00063415949025,
-0.00066504150893,
-0.00069179375372,
-0.00072153919876,
-0.00073193571525,
-0.00075300014201,
-0.00076307935757,
-0.00077579773310,
-0.00078014496257,
-0.00078036647100,
-0.00077798694927,
-0.00078343322877,
-0.00077248485949,
-0.00076813719270,
-0.00074905980532,
-0.00074409418541,
-0.00072550431222,
-0.00071577364744,
-0.00069416146273,
-0.00067776907764,
-0.00065403333621,
-0.00063124935319,
-0.00061327473938,
-0.00058709304852,
-0.00056778025613,
-0.00054665656337,
-0.00052265642972,
-0.00050407143497,
-0.00048937912498,
-0.00048752279712,
-0.00049475180896,
-0.00056176925738,
-0.00055252865047};
const ia_filter_bank_params_struct
normal_cross_freq[FILTER_BANK_PARAMETER_COUNT] = {
{2.0f / 1024.0f, 0.0000373252f, 0.9913600345f},
{3.0f / 1024.0f, 0.0000836207f, 0.9870680830f},
{4.0f / 1024.0f, 0.0001480220f, 0.9827947083f},
{5.0f / 1024.0f, 0.0002302960f, 0.9785398263f},
{6.0f / 1024.0f, 0.0003302134f, 0.9743033527f},
{2.0f / 256.0f, 0.0005820761f, 0.9658852897f},
{3.0f / 256.0f, 0.0012877837f, 0.9492662926f},
{2.0f / 128.0f, 0.0022515827f, 0.9329321561f},
{3.0f / 128.0f, 0.0049030350f, 0.9010958535f},
{2.0f / 64.0f, 0.0084426929f, 0.8703307793f},
{3.0f / 64.0f, 0.0178631928f, 0.8118317459f},
{2.0f / 32.0f, 0.0299545822f, 0.7570763753f},
{3.0f / 32.0f, 0.0604985076f, 0.6574551915f},
{2.0f / 16.0f, 0.0976310729f, 0.5690355937f},
{3.0f / 16.0f, 0.1866943331f, 0.4181633458f},
{2.0f / 8.0f, 0.2928932188f, 0.2928932188f},
};