Commit 73a2bb54 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept NONBE_FIX_947_STEREO_DMX_ROMOPT

parent 3d0146a0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@
#define FIX_699_FILE_READER_JBM_TSM                     /* VA: issue 699: complement FileReader_getFilePath() logic for TSM and JBM */
#define FIX_997_REMOVE_SPAR_DEC_UPMIXER                 /* VA: issue 997: remove obsolete function ivas_spar_dec_upmixer() */

#define NONBE_FIX_947_STEREO_DMX_ROMOPT                       /* Orange: ROM optimisation for POC*/  
#define NONBE_FIX_947_STEREO_DMX_EVS_PHA                      /* Orange: Fix issues on PHA */
#ifdef NONBE_FIX_947_STEREO_DMX_EVS_PHA
#define NONBE_FIX_947_STEREO_DMX_FADOPT                       /* Orange: Fading optimisation */  
+0 −6
Original line number Diff line number Diff line
@@ -111,15 +111,9 @@ extern const UWord16 ECSQ_tab_vals[ECSQ_PARAM_COUNT - 1][1 + ECSQ_TAB_VALS_SIZE]
/*----------------------------------------------------------------------------------*
 * Stereo downmix to EVS ROM tables
 *----------------------------------------------------------------------------------*/
#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
extern const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 2];
extern const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 2];
extern const Word32 Stereo_dmx_s_wnd_coef_48k_fx[L_FRAME48k >> 2];
#else
extern const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 1];
extern const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 1];
extern const Word32 Stereo_dmx_s_wnd_coef_48k_fx[L_FRAME48k >> 1];
#endif
extern const Word32 Stereo_dmx_wnd_coef_32k_fx[L_FRAME32k];
extern const Word32 Stereo_dmx_wnd_coef_48k_fx[L_FRAME48k];
/*----------------------------------------------------------------------------------*
+0 −108
Original line number Diff line number Diff line
@@ -510,7 +510,6 @@ const Word32 ari_bit_estimate_s17_LC_fx[RANGE_N_CONTEXT][RANGE_N_SYMBOLS] = // Q
 *----------------------------------------------------------------------------------*/


#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
// Q31
 const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 2] = {
    204411, 817566, 1839231, 3269018, 5106382, 7350624, 10000889, 13056168, 16515298, 20376962, 
@@ -568,113 +567,6 @@ const Word32 ari_bit_estimate_s17_LC_fx[RANGE_N_CONTEXT][RANGE_N_SYMBOLS] = // Q
    937357504, 944316544, 951281152, 958250944, 965225728, 972205056, 979188800, 986176512, 993168000, 1000162880, 
    1007160960, 1014161856, 1021165248, 1028170944, 1035178560, 1042187776, 1049198400, 1056210048, 1063222464, 1070235328
 };
#else
// Q31
 const Word32 Stereo_dmx_s_wnd_coef_16k_fx[L_FRAME16k >> 1] = {
    204411, 817566, 1839231, 3269018, 5106382, 7350624, 10000889, 13056168, 16515298, 20376962, 
    24639688, 29301856, 34361688, 39817260, 45666492, 51907160, 58536884, 65553148, 72953272, 80734440, 
    88893688, 97427912, 106333872, 115608160, 125247248, 135247472, 145605040, 156315968, 167376224, 178781552, 
    190527648, 202610016, 215024064, 227765072, 240828160, 254208400, 267900656, 281899744, 296200320, 310796928, 
    325684032, 340855968, 356306944, 372031072, 388022368, 404274752, 420782016, 437537920, 454536032, 471769920, 
    489232992, 506918624, 524820096, 542930496, 561243072, 579750720, 598446528, 617323264, 636373760, 655590784, 
    674967040, 694495104, 714167552, 733976960, 753915712, 773976192, 794150848, 814431936, 834811776, 855282624, 
    875836544, 896465920, 917162752, 937919168, 958727360, 979579264, 1000467072, 1021382784, 1042318400, 1063266048, 
    1084217599, 1105165183, 1126100863, 1147016575, 1167904383, 1188756351, 1209564415, 1230320895, 1251017727, 1271647103, 
    1292201087, 1312671871, 1333051647, 1353332735, 1373507455, 1393567999, 1413506687, 1433316095, 1452988543, 1472516607, 
    1491892863, 1511109887, 1530160383, 1549037183, 1567732863, 1586240511, 1604553087, 1622663551, 1640564991, 1658250623, 
    1675713663, 1692947583, 1709945727, 1726701567, 1743208959, 1759461247, 1775452543, 1791176703, 1806627711, 1821799551, 
    1836686719, 1851283327, 1865583871, 1879582975, 1893275263, 1906655487, 1919718527, 1932459519, 1944873599, 1956956031, 
    1968702079, 1980107391, 1991167615, 2001878655, 2012236159, 2022236415, 2031875455, 2041149823, 2050055679, 2058589951, 
    2066749183, 2074530431, 2081930495, 2088946815, 2095576447, 2101817215, 2107666431, 2113121919, 2118181759, 2122843903, 
    2127106687, 2130968319, 2134427519, 2137482751, 2140132991, 2142377215, 2144214655, 2145644415, 2146666111, 2147279231
 };
 // Q31
 const Word32 Stereo_dmx_s_wnd_coef_32k_fx[L_FRAME32k >> 1] = {
    51423, 205686, 462776, 822667, 1285325, 1850705, 2518754, 3289407, 4162591, 5138222, 
    6216206, 7396441, 8678813, 10063200, 11549468, 13137475, 14827070, 16618091, 18510366, 20503712, 
    22597942, 24792852, 27088232, 29483864, 31979518, 34574956, 37269924, 40064172, 42957428, 45949412, 
    49039844, 52228420, 55514844, 58898792, 62379948, 65957972, 69632528, 73403256, 77269800, 81231792, 
    85288840, 89440576, 93686584, 98026464, 102459800, 106986176, 111605144, 116316264, 121119096, 126013168, 
    130998016, 136073168, 141238128, 146492400, 151835488, 157266880, 162786064, 168392496, 174085632, 179864960, 
    185729888, 191679888, 197714368, 203832752, 210034448, 216318896, 222685456, 229133536, 235662512, 242271760, 
    248960656, 255728544, 262574784, 269498720, 276499680, 283577024, 290730048, 297958048, 305260384, 312636288, 
    320085120, 327606144, 335198624, 342861856, 350595072, 358397568, 366268576, 374207360, 382213120, 390285152, 
    398422624, 406624768, 414890848, 423220000, 431611456, 440064448, 448578112, 457151680, 465784288, 474475136, 
    483223360, 492028160, 500888704, 509804096, 518773504, 527796064, 536870912, 545997184, 555174016, 564400512, 
    573675776, 582998976, 592369152, 601785472, 611246976, 620752768, 630301952, 639893568, 649526784, 659200640, 
    668914176, 678666496, 688456704, 698283776, 708146816, 718044864, 727976960, 737942208, 747939584, 757968192, 
    768027072, 778115200, 788231680, 798375424, 808545600, 818741184, 828961216, 839204672, 849470528, 859757952, 
    870065856, 880393216, 890739136, 901102592, 911482560, 921878080, 932288192, 942711808, 953147968, 963595648, 
    974053952, 984521728, 994998080, 1005481984, 1015972480, 1026468416, 1036968960, 1047472960, 1057979520, 1068487552, 
    1078996095, 1089504127, 1100010751, 1110514687, 1121015167, 1131511167, 1142001663, 1152485503, 1162961919, 1173429759, 
    1183887999, 1194335743, 1204771839, 1215195519, 1225605503, 1236001023, 1246381055, 1256744447, 1267090431, 1277417855, 
    1287725695, 1298013055, 1308279039, 1318522495, 1328742399, 1338937983, 1349108223, 1359251967, 1369368447, 1379456639, 
    1389515391, 1399544063, 1409541503, 1419506687, 1429438847, 1439336831, 1449199871, 1459026943, 1468817151, 1478569471, 
    1488283007, 1497956863, 1507590015, 1517181695, 1526730879, 1536236671, 1545698175, 1555114495, 1564484735, 1573807871, 
    1583083135, 1592309631, 1601486463, 1610612735, 1619687551, 1628710143, 1637679615, 1646594943, 1655455487, 1664260223, 
    1673008511, 1681699327, 1690332031, 1698905471, 1707419135, 1715872127, 1724263679, 1732592767, 1740858879, 1749060991, 
    1757198463, 1765270527, 1773276287, 1781215103, 1789086079, 1796888575, 1804621823, 1812285055, 1819877503, 1827398527, 
    1834847359, 1842223231, 1849525631, 1856753663, 1863906687, 1870983935, 1877984895, 1884908927, 1891755135, 1898523007, 
    1905211903, 1911821183, 1918350079, 1924798207, 1931164799, 1937449215, 1943650943, 1949769343, 1955803775, 1961753727, 
    1967618687, 1973398015, 1979091199, 1984697599, 1990216703, 1995648127, 2000991231, 2006245503, 2011410431, 2016485631, 
    2021470463, 2026364543, 2031167359, 2035878527, 2040497535, 2045023871, 2049457151, 2053797119, 2058043135, 2062194815, 
    2066251903, 2070213887, 2074080383, 2077851135, 2081525631, 2085103743, 2088584831, 2091968767, 2095255167, 2098443775, 
    2101534207, 2104526207, 2107419519, 2110213759, 2112908671, 2115504127, 2117999743, 2120395391, 2122690815, 2124885759, 
    2126979967, 2128973311, 2130865535, 2132656639, 2134346111, 2135934207, 2137420415, 2138804863, 2140087167, 2141267455, 
    2142345471, 2143321087, 2144194303, 2144964863, 2145632895, 2146198271, 2146660991, 2147020927, 2147277951, 2147432191
 };
 // Q31
 const Word32 Stereo_dmx_s_wnd_coef_48k_fx[L_FRAME48k >> 1] = {
    22902, 91608, 206114, 366416, 572507, 824378, 1122018, 1465415, 1854554, 2289418, 
    2769989, 3296246, 3868167, 4485728, 5148901, 5857660, 6611973, 7411808, 8257132, 9147909, 
    10084099, 11065664, 12092561, 13164746, 14282175, 15444799, 16652568, 17905432, 19203336, 20546226, 
    21934042, 23366728, 24844222, 26366462, 27933380, 29544910, 31200986, 32901534, 34646484, 36435760, 
    38269288, 40146984, 42068776, 44034576, 46044300, 48097868, 50195188, 52336168, 54520724, 56748756, 
    59020172, 61334876, 63692768, 66093744, 68537712, 71024552, 73554176, 76126456, 78741304, 81398592, 
    84098208, 86840048, 89623984, 92449904, 95317680, 98227200, 101178336, 104170952, 107204936, 110280144, 
    113396456, 116553736, 119751848, 122990656, 126270024, 129589808, 132949864, 136350064, 139790240, 143270256, 
    146789968, 150349232, 153947888, 157585760, 161262736, 164978624, 168733280, 172526544, 176358256, 180228256, 
    184136368, 188082416, 192066256, 196087712, 200146592, 204242752, 208376000, 212546160, 216753072, 220996528, 
    225276352, 229592384, 233944432, 238332288, 242755792, 247214752, 251708960, 256238240, 260802384, 265401216, 
    270034528, 274702112, 279403808, 284139392, 288908640, 293711360, 298547360, 303416448, 308318400, 313252960, 
    318220000, 323219264, 328250528, 333313632, 338408288, 343534304, 348691488, 353879616, 359098432, 364347744, 
    369627296, 374936928, 380276320, 385645312, 391043680, 396471168, 401927520, 407412544, 412925984, 418467616, 
    424037216, 429634528, 435259328, 440911328, 446590336, 452296128, 458028416, 463786944, 469571520, 475381856, 
    481217728, 487078848, 492965024, 498875968, 504811424, 510771168, 516754912, 522762432, 528793440, 534847712, 
    540924928, 547024960, 553147392, 559292032, 565458624, 571646912, 577856640, 584087488, 590339264, 596611584, 
    602904320, 609217152, 615549760, 621901888, 628273344, 634663808, 641072960, 647500608, 653946432, 660410176, 
    666891520, 673390208, 679906048, 686438592, 692987712, 699553088, 706134400, 712731392, 719343808, 725971328, 
    732613696, 739270592, 745941760, 752626880, 759325760, 766038016, 772763456, 779501696, 786252480, 793015488, 
    799790528, 806577216, 813375360, 820184576, 827004608, 833835136, 840675968, 847526656, 854387072, 861256832, 
    868135616, 875023168, 881919232, 888823488, 895735616, 902655296, 909582336, 916516352, 923457088, 930404224, 
    937357504, 944316544, 951281152, 958250944, 965225728, 972205056, 979188800, 986176512, 993168000, 1000162880, 
    1007160960, 1014161856, 1021165248, 1028170944, 1035178560, 1042187776, 1049198400, 1056210048, 1063222464, 1070235328, 
    1077248383, 1084261119, 1091273599, 1098285183, 1105295871, 1112305151, 1119312767, 1126318335, 1133321855, 1140322687, 
    1147320703, 1154315647, 1161307135, 1168294911, 1175278591, 1182257919, 1189232639, 1196202495, 1203167103, 1210126207, 
    1217079423, 1224026495, 1230967295, 1237901311, 1244828287, 1251748095, 1258660223, 1265564415, 1272460415, 1279348095, 
    1286226815, 1293096575, 1299956991, 1306807679, 1313648511, 1320479103, 1327299071, 1334108287, 1340906367, 1347693183, 
    1354468095, 1361231231, 1367981951, 1374720255, 1381445631, 1388157823, 1394856703, 1401541887, 1408213119, 1414870015, 
    1421512319, 1428139903, 1434752255, 1441349247, 1447930623, 1454495871, 1461044991, 1467577599, 1474093439, 1480592127, 
    1487073535, 1493537151, 1499982975, 1506410623, 1512819839, 1519210239, 1525581695, 1531933951, 1538266495, 1544579327, 
    1550872063, 1557144447, 1563396095, 1569627007, 1575836671, 1582024959, 1588191615, 1594336255, 1600458751, 1606558719, 
    1612635903, 1618690175, 1624721279, 1630728703, 1636712447, 1642672255, 1648607743, 1654518655, 1660404735, 1666265983, 
    1672101759, 1677912191, 1683696639, 1689455231, 1695187583, 1700893311, 1706572287, 1712224383, 1717849087, 1723446399, 
    1729016063, 1734557695, 1740071167, 1745556095, 1751012479, 1756439935, 1761838335, 1767207295, 1772546687, 1777856383, 
    1783135871, 1788385151, 1793604095, 1798792191, 1803949311, 1809075327, 1814169983, 1819233151, 1824264319, 1829263615, 
    1834230655, 1839165311, 1844067199, 1848936319, 1853772287, 1858574975, 1863344255, 1868079871, 1872781567, 1877449087, 
    1882082431, 1886681215, 1891245439, 1895774719, 1900268927, 1904727807, 1909151359, 1913539199, 1917891199, 1922207231, 
    1926487167, 1930730623, 1934937471, 1939107583, 1943240831, 1947337087, 1951395967, 1955417343, 1959401215, 1963347327, 
    1967255423, 1971125375, 1974957055, 1978750335, 1982504959, 1986220927, 1989897855, 1993535743, 1997134463, 2000693631, 
    2004213375, 2007693439, 2011133567, 2014533759, 2017893887, 2021213567, 2024493055, 2027731839, 2030929919, 2034087167, 
    2037203455, 2040278655, 2043312639, 2046305279, 2049256447, 2052166015, 2055033727, 2057859711, 2060643583, 2063385471, 
    2066085119, 2068742399, 2071357183, 2073929471, 2076459135, 2078945919, 2081389951, 2083790847, 2086148735, 2088463487, 
    2090734847, 2092962943, 2095147519, 2097288447, 2099385727, 2101439359, 2103449087, 2105414911, 2107336703, 2109214335, 
    2111047935, 2112837119, 2114582143, 2116282623, 2117938687, 2119550207, 2121117183, 2122639487, 2124116863, 2125549567, 
    2126937471, 2128280319, 2129578239, 2130831103, 2132038911, 2133201535, 2134318847, 2135391103, 2136418047, 2137399551, 
    2138335743, 2139226495, 2140071807, 2140871679, 2141625983, 2142334719, 2142997887, 2143615487, 2144187391, 2144713599, 
    2145194239, 2145629055, 2146018175, 2146361599, 2146659327, 2146911103, 2147117183, 2147277567, 2147391999, 2147460735
 };
#endif


// Q31
+0 −43
Original line number Diff line number Diff line
@@ -1988,7 +1988,6 @@ static void weighted_ave_fx(
)
{

#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
    Word16 i, j, len, len2;
    Word32 gain_tmp_fx = 0, gain_sub_fx;
    move32();
@@ -2015,24 +2014,6 @@ static void weighted_ave_fx(
        dst_fx[i] = L_add_sat( Mpy_32_32( src1_fx[i], gain_fx ), Mpy_32_32( src2_fx[i], L_sub( MAX_32, gain_tmp_fx ) ) ); // Q16
        move32();
    }
#else
    Word16 i, len;
    Word32 gain_tmp_fx = 0, gain_sub_fx;
    move32();
    len = shr( input_frame, 1 );
    gain_sub_fx = L_sub( gain_fx, old_gain_fx );
    FOR( i = 0; i < len; i++ )
    {
        gain_tmp_fx = L_add( old_gain_fx, Mpy_32_32( gain_sub_fx, wnd_fx[i] ) );                                              // Q31
        dst_fx[i] = L_add_sat( Mpy_32_32( src1_fx[i], gain_tmp_fx ), Mpy_32_32( src2_fx[i], L_sub( MAX_32, gain_tmp_fx ) ) ); // Q16
        move32();
    }
    FOR( ; i < input_frame; i++ )
    {
        dst_fx[i] = L_add_sat( Mpy_32_32( src1_fx[i], gain_fx ), Mpy_32_32( src2_fx[i], L_sub( MAX_32, gain_tmp_fx ) ) ); // Q16
        move32();
    }
#endif


    return;
@@ -2226,7 +2207,6 @@ static void adapt_gain_fx(
)
{

#ifdef NONBE_FIX_947_STEREO_DMX_ROMOPT
    Word16 i, j, len, len2;
    Word32 gain_tmp_fx, gain_sub_fx;

@@ -2252,29 +2232,6 @@ static void adapt_gain_fx(
        dst_fx[i] = Mpy_32_32( src_fx[i], gain_fx ); // Q16
        move32();
    }
#else
    Word16 i, len;
    Word32 gain_tmp_fx, gain_sub_fx;

    len = shr( input_frame, 1 );

    //  gain_sub = gain - old_gain;
    gain_sub_fx = L_sub( gain_fx, old_gain_fx ); // Q31

    FOR( i = 0; i < len; i++ )
    {
        //  gain_tmp = old_gain + gain_sub * wnd[i];
        gain_tmp_fx = L_add( old_gain_fx, Mpy_32_32( gain_sub_fx, wnd_fx[i] ) ); // Q31                                                                          //  dst[i] = src[i] * gain_tmp;
        dst_fx[i] = Mpy_32_32( src_fx[i], gain_tmp_fx );                         // Q16
        move32();
    }
    FOR( ; i < input_frame; i++ )
    {
        //  dst[i] = src[i] * gain;
        dst_fx[i] = Mpy_32_32( src_fx[i], gain_fx ); // Q16
        move32();
    }
#endif


    return;