diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj
index 4a011c45491e6c6291184c76dba8f48657aec049..3e8bb5e72d3a8c88756d6e11432f66b2446dad0b 100644
--- a/Workspace_msvc/lib_dec.vcxproj
+++ b/Workspace_msvc/lib_dec.vcxproj
@@ -317,6 +317,7 @@
+
diff --git a/Workspace_msvc/lib_dec.vcxproj.filters b/Workspace_msvc/lib_dec.vcxproj.filters
index 010c41fafa68ecd8ee6d9e4bec2b17a4aaf60779..d3b4cb43127d339bc16fd8ea23aac7acc2917f54 100644
--- a/Workspace_msvc/lib_dec.vcxproj.filters
+++ b/Workspace_msvc/lib_dec.vcxproj.filters
@@ -811,6 +811,7 @@
decoder_evs_c
+
@@ -867,4 +868,4 @@
{c33b80b3-67ce-466b-91c0-4adfc9efcb5c}
-
\ No newline at end of file
+
diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h
index 79ad2bbc8b7646ce2960671d1e9220efa73ff7ec..9fd731d1def041377079cc5163c842d31433585f 100644
--- a/lib_com/ivas_prot.h
+++ b/lib_com/ivas_prot.h
@@ -5947,6 +5947,38 @@ int16_t ivas_get_num_bands_from_bw_idx(
const int16_t bwidth /* i : audio bandwidth */
);
+#ifdef IVAS_FLOAT_FIXED
+/*to be moved to prot_fx1.h*/
+void sns_avq_dec_fx(
+ Word16 *index, /* i : Quantization indices */
+ Word32 SNS_Q[NB_DIV][M], /* o : Quantized SNS vectors */
+ Word16 *q_snsq,
+ const Word16 L_frame, /* i : frame length */
+ const Word16 numlpc /* i : Number of sets of lpc */
+);
+
+void sns_avq_dec_stereo_fx(
+ Word16 *indexl, /* i : Quantization indices (left channel) */
+ Word16 *indexr, /* i : Quantization indices (right channe) */
+ const Word16 L_frame, /* i : frame length */
+ Word32 *SNS_Ql, /* o : Quantized SNS vectors (left channel) */
+ Word16 *q_l,
+ Word32 *SNS_Qr, /* o : Quantized SNS vectors (right channe) */
+ Word16 *q_r );
+
+void dequantize_sns_fx(
+ Word16 indices[CPE_CHANNELS][NPRM_LPC_NEW],
+ Word32 snsQ_out[CPE_CHANNELS][NB_DIV][M],
+ Decoder_State **sts );
+
+void inverseMS_fx(
+ const Word16 L_frame, /* i : frame length */
+ Word32 x0[], /* i/o: mid/left channel coefficients */
+ Word32 x1[], /* i/o: side/right channel coefficients */
+ const Word32 norm_fac /* i : normalization factor */
+);
+
+#endif
/* clang-format on */
diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c
index d39004cfd3ab17970e5da4396dbaa27f828ce8a0..13fed1dd9d197861c17971487a5f993a8deb74e7 100644
--- a/lib_com/ivas_rom_com.c
+++ b/lib_com/ivas_rom_com.c
@@ -5894,6 +5894,140 @@ const float ivas_sns_cdbk_tcx20_stage1[ 128 * 16 ] =
0.2253418f, 2.2539062f, 2.265625f, 0.57128906f, -0.7661133f, -0.6245117f, 0.21313477f, 1.2248535f, 0.8737793f, -0.12524414f, -0.9609375f, -2.416504f, -1.1223145f, -0.70532227f, -0.31469727f, -0.592041f,
};
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx20_stage1_fx[ 128 * 16 ] =
+{
+ -7498 , -8552 , -3948 , 11493 , 10929 , 4767 , 5696 , 4985 , 5673 , 1825 , -1927 , -2174 , -3321 , -4771 , -5964 , -7214 ,
+ -10641 , -13643 , -7600 , -1477 , 6893 , 10597 , 4021 , 919 , -537 , 684 , 6146 , 1349 , 1375 , 4748 , 736 , -3571 ,
+ 8121 , 9016 , 4721 , 3315 , 3543 , 4759 , 5279 , 5578 , 4435 , 3410 , 492 , -2942 , -8990 , -12493 , -13751 , -14493 ,
+ 646 , 4522 , 1609 , -2654 , -4481 , -4275 , -4938 , -4698 , -4089 , -1547 , 1428 , 4430 , 5202 , 4974 , 3429 , 441 ,
+ 1001 , -2898 , -4776 , -4824 , -1005 , 1623 , 4558 , 5049 , 5546 , 4459 , 3687 , 3688 , -126 , -3430 , -5243 , -7311 ,
+ -3765 , -762 , -3030 , -6261 , -7149 , -5194 , -3869 , 997 , 5325 , 6801 , 5249 , 4107 , 2928 , 2308 , 1946 , 369 ,
+ 10168 , 5956 , 3730 , 2771 , 2326 , 2853 , 3117 , 2884 , 1479 , -133 , -2832 , -4621 , -6076 , -6372 , -6981 , -8269 ,
+ 9885 , 6118 , 4056 , 3729 , 2954 , 2262 , 382 , -887 , -2030 , -1996 , -3016 , -3773 , -4113 , -4045 , -4375 , -5152 ,
+ -3335 , 5139 , 6949 , 5817 , 4078 , 4678 , 4112 , 3805 , 2705 , 921 , -2675 , -4919 , -5304 , -5636 , -7035 , -9300 ,
+ -5726 , 774 , 1426 , -213 , -1582 , -1060 , -1381 , -448 , -337 , 307 , -78 , 485 , 1252 , 2090 , 2767 , 1723 ,
+ 4376 , 8005 , 8723 , 8483 , 6453 , 4642 , 1740 , -811 , -3455 , -4423 , -5495 , -5697 , -5721 , -5357 , -5457 , -6006 ,
+ 9786 , 10280 , 4686 , 1498 , -692 , -958 , 1101 , 3151 , 2236 , 2122 , -1101 , -3777 , -4952 , -6004 , -7796 , -9579 ,
+ -5550 , 5500 , 6501 , 7932 , 2414 , 2004 , -724 , -797 , 465 , 79 , 1246 , -954 , -8806 , -5066 , -857 , -3387 ,
+ 3592 , -6275 , -6564 , -5666 , -2347 , -3624 , -3711 , -4039 , -4858 , -5538 , -5004 , -2044 , 6173 , 16714 , 9046 , 14147 ,
+ 16852 , 13619 , 9025 , 4301 , 605 , -1497 , -3065 , -3483 , -4472 , -4221 , -4897 , -5230 , -4820 , -4121 , -3894 , -4701 ,
+ 3227 , 10297 , 4142 , -3143 , -5540 , -3558 , 1739 , 5927 , 5194 , 4741 , -1693 , -3809 , -3779 , -3780 , -3312 , -6653 ,
+ -9100 , -5057 , -1642 , 2448 , -2023 , 4879 , 133 , 5593 , 1767 , 4924 , 6821 , 2411 , -1210 , -4078 , -4246 , -1619 ,
+ -7619 , -11980 , 600 , 2505 , 2570 , -5562 , 1970 , -1802 , 2335 , 4846 , -4895 , 3392 , 5151 , 6508 , 2257 , -277 ,
+ 8936 , 11845 , 11978 , 10584 , 9236 , 7186 , 3794 , 1874 , -708 , -3953 , -7322 , -9670 , -10750 , -10778 , -10917 , -11335 ,
+ 8587 , 838 , -5142 , -8197 , -8172 , -5767 , -4419 , -1944 , -79 , 1853 , 3022 , 3823 , 4142 , 4618 , 3723 , 3112 ,
+ -5283 , 568 , 1979 , 2570 , 2120 , 2234 , 1918 , 2247 , 1603 , 2038 , 1584 , -93 , -1478 , -3355 , -4339 , -4312 ,
+ 3278 , 2345 , 280 , -2908 , -4330 , -3770 , -3036 , -1236 , 758 , 3245 , 3120 , 2288 , 1603 , 916 , -401 , -2152 ,
+ 18828 , 10647 , 3579 , -3906 , -287 , 10855 , 5635 , -3673 , -6872 , -5289 , -2424 , -5462 , -6052 , -2769 , -4104 , -8707 ,
+ -4121 , 2761 , 3751 , 4035 , 3218 , -38 , -1640 , -513 , -750 , -12 , -1597 , -1672 , -1522 , -637 , 42 , -1302 ,
+ -5458 , 2924 , 6701 , 9084 , 6798 , 7952 , 4454 , 5450 , 5949 , 5277 , -2303 , -8307 , -11701 , -10523 , -8863 , -7432 ,
+ 379 , 6294 , 8583 , 7842 , 6055 , 3554 , -1419 , -894 , -4610 , -4731 , -3777 , -2242 , -3681 , -3172 , -3323 , -4856 ,
+ 9040 , 14426 , 8046 , 2314 , -89 , 612 , 655 , 895 , -4796 , -4631 , -1323 , -264 , -6051 , -6580 , -5728 , -6526 ,
+ 10320 , 9632 , 5351 , 853 , -2496 , -4459 , -5580 , -5161 , -5476 , -4380 , -3281 , -1752 , -624 , 1835 , 2457 , 2762 ,
+ 6230 , 4286 , 3054 , 2103 , 1411 , 882 , -116 , -345 , 353 , 511 , -1457 , -2334 , -2581 , -2840 , -3948 , -5209 ,
+ -2351 , -845 , -4051 , -7663 , -8133 , -6619 , -6596 , -5580 , -3850 , -278 , 3739 , 7371 , 8632 , 9397 , 9551 , 7277 ,
+ 14878 , 8087 , 1612 , -2811 , -4559 , -4173 , -3660 , -2457 , -1780 , -938 , -1082 , -880 , -541 , 40 , -680 , -1056 ,
+ -357 , 6763 , 7507 , 2217 , 983 , 5824 , 3263 , 5362 , 4023 , 5140 , -7718 , -7703 , -6304 , -5528 , -5237 , -8233 ,
+ -9056 , -2879 , 4548 , 9096 , 9567 , 8235 , 6713 , 5876 , 4240 , 2331 , -452 , -3615 , -6496 , -8240 , -9501 , -10367 ,
+ -6591 , -10319 , -10037 , 1092 , 9508 , 10608 , 14496 , -4303 , -5138 , -1136 , 3886 , 5677 , 2912 , -4172 , -5188 , -1298 ,
+ 3868 , 10098 , 10930 , 8191 , 5304 , 4169 , 3641 , 2883 , 1198 , -205 , -3154 , -5928 , -8536 , -10323 , -10806 , -11331 ,
+ -580 , -1263 , -2402 , -5074 , -6014 , -4529 , -3202 , -2168 , -259 , 2212 , 3665 , 5339 , 5604 , 4695 , 3222 , 754 ,
+ 1658 , -3851 , -5014 , -4529 , -1764 , -300 , 8217 , 16396 , 2000 , 824 , 665 , -1713 , -3175 , -3034 , -3057 , -3324 ,
+ -11375 , -8634 , -6184 , -6208 , -4129 , -150 , 1519 , 4345 , 5629 , 5310 , 4007 , 4455 , 3926 , 3560 , 3104 , 823 ,
+ 7473 , 12120 , 11294 , 4728 , 3568 , 5501 , 3688 , 3508 , 1692 , -1661 , -8566 , -9762 , -8843 , -8001 , -8086 , -8653 ,
+ 8613 , 5171 , 4353 , 3298 , 925 , -530 , -1637 , -2214 , -3071 , -2941 , -3234 , -2961 , -2504 , -1211 , -880 , -1176 ,
+ 621 , 10589 , 7196 , 3759 , 1529 , -659 , -1898 , -893 , -380 , -88 , -927 , -1736 , -2729 , -3606 , -4369 , -6410 ,
+ -10687 , -7849 , -5755 , -6353 , -5913 , -3150 , -2865 , -1183 , -382 , 1696 , 2622 , 5191 , 7208 , 8842 , 10178 , 8401 ,
+ -366 , 8121 , 9838 , 5330 , 503 , 3640 , 5493 , 4385 , 472 , -837 , -3977 , -9982 , -8797 , -5441 , -3061 , -5319 ,
+ 10435 , 576 , -3431 , -5099 , -5048 , -3131 , -1414 , 1467 , 2492 , 2334 , 1243 , 257 , 1129 , 1454 , -1171 , -2093 ,
+ -2408 , 4154 , 6243 , 5033 , 3118 , 2477 , 901 , 862 , 622 , 627 , -473 , -1897 , -2823 , -3803 , -5378 , -7253 ,
+ 5751 , -3944 , -5457 , -3268 , 270 , -185 , -1373 , -2563 , -3758 , -4024 , -4052 , -3460 , -2709 , -237 , 9209 , 19800 ,
+ 11172 , 15303 , 13936 , 10936 , 5606 , 374 , -3235 , -4534 , -5841 , -5872 , -6303 , -6525 , -6391 , -6176 , -6037 , -6414 ,
+ 5173 , 10429 , 7690 , -211 , -4293 , -3886 , -1661 , 896 , 81 , -608 , -1808 , -2380 , -2191 , -1905 , -2123 , -3203 ,
+ -8788 , -1052 , 5387 , 6699 , 5899 , 3671 , 3443 , 3830 , 4015 , 2746 , -536 , -2438 , -3985 , -4693 , -6124 , -8075 ,
+ -8721 , -8773 , -1913 , 3002 , 5005 , -1141 , -1250 , 4860 , 3573 , -249 , 246 , 1790 , 3243 , 3739 , -189 , -3222 ,
+ 12821 , 11330 , 7418 , 6142 , 4487 , 3660 , 3434 , 2422 , 898 , -805 , -4025 , -7013 , -9016 , -9871 , -10400 , -11484 ,
+ 6459 , 1432 , -705 , -1814 , -2564 , -2337 , -2669 , -1789 , -1565 , -767 , -696 , -14 , 629 , 1614 , 2310 , 2475 ,
+ 523 , 864 , 661 , 262 , 533 , 1619 , 2390 , 2554 , 2076 , 1532 , 248 , -542 , -1545 , -2462 , -3431 , -5282 ,
+ 2754 , 7840 , 1531 , -5320 , -7337 , -5059 , -1828 , 2415 , 2801 , 2414 , 920 , -54 , -675 , 295 , 594 , -1290 ,
+ 16459 , 9353 , 5397 , 5154 , 6401 , 4035 , 525 , -1206 , -2684 , -3963 , -5726 , -6290 , -6446 , -6516 , -6917 , -7575 ,
+ 3331 , 2764 , 1820 , 1449 , 404 , 197 , -617 , -518 , -755 , -625 , -1250 , -1192 , -1278 , -978 , -1091 , -1661 ,
+ 1202 , 10867 , 13999 , 10573 , 8667 , 5713 , 3901 , 1699 , -649 , -3697 , -6326 , -8102 , -9055 , -9334 , -9517 , -9940 ,
+ 3105 , 10471 , 11637 , 9256 , 1588 , -4373 , -5838 , -3257 , -2501 , -2719 , -3963 , -4248 , -3642 , -2230 , -780 , -2506 ,
+ 7036 , 12562 , 13320 , 10158 , 3016 , -3341 , -3328 , 586 , 1408 , -1129 , -5924 , -5878 , -5793 , -6843 , -7570 , -8279 ,
+ 11292 , 4466 , 2522 , 790 , -1414 , -1946 , -1506 , -261 , 583 , 802 , -656 , -1773 , -2651 , -2250 , -3307 , -4691 ,
+ 4319 , 4371 , 4567 , 4600 , 3221 , 2633 , 1994 , 1398 , 564 , -536 , -2662 , -3664 , -4402 , -4565 , -5348 , -6489 ,
+ -7437 , -5416 , -5951 , -7745 , -7676 , -4554 , -4813 , -2349 , 668 , 6481 , 8239 , 7629 , 6574 , 6530 , 6295 , 3525 ,
+ 13292 , 11390 , 5199 , 2139 , 489 , -271 , -644 , -427 , -1114 , -1854 , -3425 , -4756 , -5461 , -5211 , -4922 , -4424 ,
+ 710 , 9953 , 9525 , 5612 , 1946 , 2958 , 298 , -154 , -1714 , -3333 , -6410 , -9882 , -5524 , -2172 , -432 , -1382 ,
+ -10643 , -8047 , -2326 , 2007 , 3553 , 2546 , 4871 , 5435 , 4843 , 4106 , 2244 , 1050 , -497 , -1808 , -2878 , -4457 ,
+ 294 , -9337 , -8427 , -1045 , 9093 , 10411 , 3417 , 3239 , 2068 , -534 , 1078 , -1517 , -2125 , -1732 , -2738 , -2145 ,
+ 5432 , 12777 , 10582 , 2772 , -92 , 2136 , 2501 , 4105 , 2738 , 3539 , -1530 , -8480 , -9513 , -8753 , -8426 , -9787 ,
+ 5972 , 8255 , 4335 , -524 , -2484 , -2872 , -3937 , -3518 , -3037 , -774 , 635 , 1891 , 1590 , 660 , -1520 , -4672 ,
+ 6572 , 3645 , -218 , -1090 , 345 , 2321 , 3692 , 4654 , 4719 , 3041 , 2117 , 459 , -3402 , -7045 , -8640 , -11170 ,
+ -5410 , -344 , -990 , -3893 , -5051 , -2311 , -77 , 3918 , 4679 , 4822 , 3303 , 1776 , 337 , 305 , 409 , -1472 ,
+ 8389 , 11222 , 8707 , 4721 , 3131 , 2061 , 1130 , 791 , -354 , -651 , -3686 , -5202 , -6383 , -7339 , -7792 , -8746 ,
+ 9298 , 9362 , 6305 , 3177 , 968 , -72 , -945 , -819 , -1079 , -725 , -2067 , -2739 , -3434 , -4331 , -5460 , -7441 ,
+ 2704 , 6870 , 6571 , 6294 , 4511 , 3348 , 2296 , 2931 , 2159 , 954 , -1545 , -3421 , -5465 , -7201 , -9296 , -11710 ,
+ 880 , -1826 , -3492 , -4233 , -3893 , -2425 , -1948 , -823 , -259 , 657 , 1000 , 2107 , 2906 , 3603 , 3958 , 3790 ,
+ -196 , 6860 , 8581 , 9562 , 7277 , 7244 , 1471 , 1946 , -228 , -338 , -3115 , -7547 , -11656 , -9838 , -4686 , -5339 ,
+ 8578 , 4837 , 2226 , 754 , -1817 , -2201 , 499 , 2914 , 3313 , 3158 , -527 , -4733 , -5791 , -4100 , -3403 , -3706 ,
+ -4232 , 6556 , 1920 , 6615 , -946 , 4468 , 280 , 2157 , 766 , -524 , -922 , -1974 , -2072 , -1600 , -4968 , -5524 ,
+ 7288 , 2936 , -1640 , -4588 , -6332 , -6285 , -6188 , -5571 , -5223 , -3844 , -1671 , 2013 , 5110 , 8289 , 8345 , 7362 ,
+ 11493 , 11342 , 6954 , 1821 , -1692 , -2612 , -3300 , -3319 , -3814 , -2738 , -2931 , -2814 , -2479 , -1890 , -1719 , -2303 ,
+ 8177 , 11903 , 6525 , -1422 , -3274 , 251 , 4220 , 4653 , 3045 , -303 , -5550 , -5079 , -5244 , -5314 , -5883 , -6703 ,
+ -9438 , -3031 , 483 , 1317 , 1847 , 1874 , 3018 , 2956 , 788 , 3090 , 730 , -1912 , -1688 , 122 , 860 , -1017 ,
+ -3693 , -4977 , -541 , 2877 , 3327 , -2337 , -4262 , -2189 , 699 , 2375 , 3310 , 1962 , 1504 , 1017 , 1319 , -390 ,
+ 6065 , 7469 , 7234 , 10424 , 10658 , 7912 , 5388 , 4640 , 2156 , -733 , -4795 , -9010 , -11277 , -11766 , -11999 , -12365 ,
+ 10932 , 2437 , -1845 , -3262 , -3753 , -3716 , -4031 , -3422 , -2848 , -1620 , -1167 , 176 , 1764 , 2966 , 3342 , 4047 ,
+ -619 , -1377 , -1334 , -455 , -198 , 333 , 279 , 702 , 835 , 1061 , 505 , 476 , 127 , 254 , 270 , -859 ,
+ 5215 , 1197 , -575 , -1227 , -2612 , -2325 , -649 , 1885 , 2691 , 2793 , 1163 , -765 , -1768 , -1371 , -1567 , -2082 ,
+ 19164 , 11491 , 4615 , -1985 , -3389 , 3234 , 9530 , 1792 , -6657 , -7546 , -6135 , -3576 , -5395 , -6848 , -4207 , -4089 ,
+ -5579 , 2618 , 4644 , 1302 , 270 , 4372 , 3748 , 1797 , -752 , -937 , -2728 , -2859 , -706 , -865 , -1022 , -3304 ,
+ -1838 , 6025 , 10256 , 11080 , 7972 , 1492 , -1232 , 2649 , 3965 , 3980 , -6137 , -7448 , -7596 , -7566 , -6578 , -9023 ,
+ 1944 , 6450 , 7024 , 8636 , 7062 , 1810 , -1661 , -772 , 542 , -13 , -3255 , -4851 , -5285 , -5086 , -5501 , -7043 ,
+ 8123 , 16086 , 12234 , 5222 , 1088 , 112 , 327 , 1928 , -3259 , -5187 , -6713 , -7464 , -5697 , -5814 , -5336 , -5649 ,
+ 859 , 7375 , 6059 , 2544 , 375 , -1579 , -3831 , -3783 , -3738 , -2686 , -2393 , -1129 , 29 , 1048 , 1033 , -183 ,
+ 2101 , 4211 , 3442 , 2574 , 2178 , 2151 , 1104 , 386 , 135 , -216 , -2007 , -2668 , -2626 , -2609 , -3456 , -4701 ,
+ -5046 , -336 , -968 , -3416 , -4451 , -3637 , -4472 , -3410 , -3255 , -1874 , -1058 , 1763 , 4855 , 7351 , 9606 , 8347 ,
+ 19995 , 9006 , 2634 , -634 , -1483 , -1947 , -2216 , -805 , -298 , -446 , -2156 , -3518 , -3871 , -4075 , -4720 , -5467 ,
+ -2272 , 8650 , 9022 , 2896 , -866 , 3555 , 4656 , 4146 , 4057 , 5105 , 893 , -7960 , -11942 , -9282 , -3999 , -6659 ,
+ -3314 , 4163 , 6336 , 8539 , 7909 , 6703 , 4331 , 4759 , 3115 , 1223 , -1904 , -4488 , -6662 , -8210 , -10273 , -12228 ,
+ -1219 , -6996 , -6238 , 5560 , 19256 , 6948 , 16806 , -1718 , -4399 , -4432 , 1743 , -4434 , -5576 , -4824 , -5420 , -5055 ,
+ 7337 , 7092 , 7560 , 9007 , 7842 , 4106 , 2111 , 1823 , -310 , -2228 , -4758 , -6480 , -7636 , -7833 , -8350 , -9284 ,
+ -127 , -7162 , -7239 , -8124 , -5968 , -3470 , -2064 , 167 , 1784 , 2556 , 3741 , 6051 , 7042 , 5293 , 3278 , 4242 ,
+ -4837 , -8327 , -8445 , -7964 , -6737 , -3635 , 12584 , 10749 , 9489 , 14113 , 4466 , -818 , -963 , -2829 , -1662 , -5183 ,
+ -9221 , -7856 , -8616 , -9610 , -8803 , -4648 , -2322 , 3345 , 7609 , 8661 , 7189 , 7848 , 6804 , 4876 , 3375 , 1368 ,
+ 3370 , 8415 , 9491 , 3696 , 2112 , 4195 , 2535 , 1216 , -704 , -2599 , -4917 , -4773 , -4766 , -4924 , -5695 , -6652 ,
+ 5033 , 6480 , 5225 , 2803 , 1389 , 388 , -1095 , -1930 , -1285 , -783 , -2330 , -2783 , -2299 , -2271 , -2847 , -3696 ,
+ 6462 , 10974 , 9445 , 5632 , 3121 , 338 , -2526 , -3512 , -4157 , -4256 , -4496 , -3576 , -3213 , -3003 , -3042 , -4191 ,
+ -8903 , -5489 , -3362 , -3932 , -2867 , -42 , -794 , 1047 , 1551 , 2990 , 1925 , 1809 , 2047 , 3857 , 5983 , 4180 ,
+ -1078 , 5534 , 5668 , 8546 , 7579 , 7727 , 3515 , 2403 , 425 , -3939 , -7676 , -10486 , -4654 , -3810 , -5900 , -3854 ,
+ 11241 , 2333 , -888 , -2668 , -601 , 2056 , 973 , -782 , -1134 , -628 , -1278 , -1464 , -1036 , -1025 , -2566 , -2532 ,
+ 188 , 993 , 1510 , 3746 , 3964 , 4113 , 3912 , 3774 , 2904 , 1760 , -544 , -2262 , -3823 , -5032 , -6585 , -8617 ,
+ 17244 , 5164 , -3514 , -5803 , -5740 , -3512 , -4264 , -5949 , -7105 , -7263 , -6297 , -4203 , 3488 , 882 , 9119 , 17753 ,
+ 18572 , 16918 , 11329 , 8930 , 3706 , 2301 , -534 , -4811 , -6296 , -6264 , -6923 , -7015 , -7012 , -7183 , -7628 , -8090 ,
+ 2776 , 9267 , 4870 , -2407 , -3332 , 1594 , 479 , 626 , -2334 , -2117 , -1714 , -1452 , -1892 , -1016 , -575 , -2774 ,
+ -5418 , -1560 , 977 , 3118 , 4128 , 4683 , 3995 , 3168 , 1326 , 367 , -798 , -1786 , -2341 , -2513 , -3011 , -4334 ,
+ -5417 , -6011 , -5325 , -2432 , 93 , 2347 , 2339 , 1497 , 2097 , 3182 , 2553 , 1778 , 1688 , 2154 , 997 , -1540 ,
+ 9725 , 13565 , 12472 , 9916 , 5050 , 2613 , 1338 , 621 , -1049 , -4212 , -7066 , -8072 , -8504 , -8673 , -8645 , -9079 ,
+ 3568 , 2083 , 779 , -447 , -1488 , -1526 , -2026 , -1584 , -1564 , -893 , -955 , -362 , 96 , 991 , 1665 , 1663 ,
+ 4308 , 2100 , 967 , 1304 , 1477 , 1636 , 1557 , 2064 , 2234 , 1529 , -1013 , -2413 , -2782 , -3000 , -4202 , -5767 ,
+ -2729 , 7254 , 5313 , 626 , -4368 , -3106 , 689 , 2051 , 1436 , 577 , 2137 , -551 , -4980 , -1408 , 137 , -3079 ,
+ 15090 , 13574 , 8552 , 4879 , 2489 , 603 , 625 , 413 , -965 , -1853 , -5221 , -7106 , -7498 , -7482 , -7752 , -8349 ,
+ 2370 , 3151 , 1957 , 225 , -516 , -337 , -392 , 223 , 813 , 1307 , 124 , -276 , -702 , -1169 , -2432 , -4348 ,
+ -4031 , 4338 , 9696 , 9577 , 10361 , 8623 , 7730 , 5093 , 2251 , -518 , -3768 , -6931 , -9490 , -10533 , -10950 , -11448 ,
+ 10303 , 15787 , 11780 , 8011 , -1234 , -5671 , -6127 , -5176 , -4588 , -3477 , -4783 , -2583 , -2036 , -3150 , -2990 , -4066 ,
+ 1649 , 10539 , 12961 , 10244 , 5607 , -356 , -2601 , -488 , 30 , -2077 , -2877 , -8331 , -8515 , -7727 , -3810 , -4247 ,
+ 8997 , 5275 , 2084 , -488 , -2018 , -2461 , -3081 , -2315 , -2223 , -1654 , -1778 , -1155 , -563 , 285 , 587 , 507 ,
+ 2053 , 8908 , 7041 , 522 , -1083 , 1920 , 1555 , 2991 , 959 , 1714 , -3254 , -3680 , -2792 , -4401 , -4878 , -7576 ,
+ -9455 , -8989 , -9057 , -10160 , -9541 , -6763 , -5661 , -3200 , -593 , 3501 , 6901 , 10117 , 10416 , 11442 , 11927 , 9115 ,
+ 7190 , 11877 , 7889 , 1661 , -96 , 1823 , 1276 , 741 , -1950 , -1969 , -4935 , -5445 , -5084 , -4151 , -3666 , -5162 ,
+ 923 , 9232 , 9280 , 2340 , -3138 , -2558 , 873 , 5017 , 3579 , -513 , -3936 , -9898 , -4597 , -2889 , -1289 , -2425 ,
+};
+#endif
const float ivas_sns_cdbk_tcx20_stage2[ 64 * 16 ] =
{
-1.1569824f, -0.4765625f, 0.008056641f, 0.47802734f, 0.38330078f, -0.075683594f, -0.3737793f, -0.29516602f, -0.1352539f, 0.012939453f, 0.22241211f, 0.375f, 0.31689453f, 0.20874023f, 0.2541504f, 0.25439453f,
@@ -5961,7 +6095,76 @@ const float ivas_sns_cdbk_tcx20_stage2[ 64 * 16 ] =
0.3227539f, -1.0678711f, -1.1435547f, 0.068603516f, 0.7546387f, 0.38745117f, 0.09008789f, -0.0007324219f, -0.12792969f, 0.076416016f, 0.24853516f, 0.28735352f, 0.076660156f, -0.041748047f, -0.01977539f, 0.08911133f,
0.6101074f, -0.22070312f, -0.5324707f, -0.119384766f, 0.10473633f, 0.16333008f, -0.15112305f, -0.34472656f, -0.39746094f, -0.43652344f, -0.23876953f, 0.0017089844f, 0.056152344f, 0.22973633f, 0.50024414f, 0.7751465f,
};
-
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx20_stage2_fx[ 64 * 16 ] =
+{
+ -4739 , -1952 , 33 , 1958 , 1570 , -310 , -1531 , -1209 , -554 , 53 , 911 , 1536 , 1298 , 855 , 1041 , 1042 ,
+ -1663 , -904 , -175 , 651 , -1032 , -2713 , -1113 , 1177 , 1464 , 826 , 214 , -1494 , -1846 , 763 , 2736 , 3107 ,
+ 112 , -859 , -1631 , -2224 , -1919 , -1030 , -1104 , -307 , 1536 , 3827 , 3753 , 1748 , 107 , -638 , -468 , -902 ,
+ 46 , 1539 , 3454 , 2870 , 2388 , -2034 , -3447 , -1887 , -692 , -27 , -310 , -923 , -859 , -521 , 27 , 377 ,
+ 1736 , 793 , 312 , 1806 , 467 , -1631 , -500 , 1432 , 2116 , -102 , -2181 , -280 , 2082 , -270 , -2800 , -2981 ,
+ -499 , 628 , 1238 , 973 , 1115 , 3296 , 3147 , 1180 , -225 , -1217 , -1869 , -1759 , -1756 , -1809 , -1438 , -1005 ,
+ -814 , -42 , -125 , -171 , 215 , 305 , 107 , -109 , 761 , 921 , 805 , 630 , 183 , -456 , -1018 , -1190 ,
+ 3133 , 1965 , 1284 , 613 , 952 , 693 , 240 , -514 , -738 , -801 , -702 , -785 , -963 , -1364 , -1554 , -1460 ,
+ -2540 , -1194 , -624 , 654 , 1697 , 2507 , 1824 , 793 , -441 , -1656 , -427 , 1665 , 1549 , -53 , -1580 , -2175 ,
+ -2612 , -80 , 1350 , -1143 , -868 , 3411 , 1168 , -1279 , -1792 , -1401 , -43 , 224 , 407 , 470 , 941 , 1247 ,
+ -3135 , -2208 , -1570 , -1618 , -898 , 791 , 778 , -354 , -184 , 553 , 1861 , 2776 , 2413 , 1232 , 177 , -614 ,
+ 1427 , -894 , 74 , 274 , 1641 , 1416 , -2247 , -3524 , -984 , 2485 , 916 , -207 , 570 , 111 , -306 , -753 ,
+ 567 , 223 , 845 , -469 , -3177 , -2357 , 2872 , 824 , -1392 , 757 , 1566 , -859 , -167 , 552 , 315 , -101 ,
+ -1017 , -1966 , -2969 , -2645 , -1036 , 1791 , 2595 , 2648 , 2209 , 1368 , 569 , 1255 , 1349 , -305 , -1605 , -2241 ,
+ -180 , -2117 , -1548 , 2748 , 1044 , -1910 , -2213 , -915 , 378 , 69 , 1015 , 1919 , 2044 , 1120 , -379 , -1075 ,
+ 61 , 1450 , 1443 , -536 , -2041 , -2153 , -241 , 101 , -1208 , -1900 , -710 , 1553 , 1938 , 1209 , 785 , 249 ,
+ -871 , -3584 , -3398 , -2068 , -1304 , -586 , 802 , 1195 , 1173 , 629 , 692 , 918 , 1136 , 1304 , 1676 , 2286 ,
+ -5190 , 69 , 1485 , 2699 , 2450 , 2023 , 739 , 746 , 653 , -67 , -772 , -1497 , -1398 , -1046 , -609 , -285 ,
+ 436 , 3227 , 395 , -2370 , -1678 , 289 , 1631 , 1271 , 450 , 574 , 1098 , 1346 , 176 , -1624 , -2479 , -2743 ,
+ -2034 , 1082 , 2695 , 1685 , 1183 , 915 , 636 , -341 , -486 , 350 , 1164 , 625 , -760 , -1982 , -2380 , -2349 ,
+ 914 , 1532 , 886 , -2080 , -3920 , -4687 , -1446 , 2800 , 2748 , 1303 , 524 , -634 , -11 , 747 , 691 , 632 ,
+ 1084 , -467 , -438 , 1087 , 2116 , 2201 , 1470 , 691 , 853 , 987 , 574 , -224 , -1366 , -2404 , -3041 , -3123 ,
+ 3022 , -593 , -1542 , -411 , 421 , 580 , 276 , -223 , -67 , -96 , -91 , -202 , -250 , -445 , -371 , -7 ,
+ 4287 , 2796 , 539 , -861 , -426 , -868 , -1334 , -1937 , -2448 , -2081 , -837 , 139 , 474 , 386 , 738 , 1432 ,
+ -3717 , -1050 , 587 , 144 , -312 , -549 , -30 , 857 , 1641 , 2410 , 2657 , 2049 , 788 , -915 , -1966 , -2594 ,
+ 1656 , 90 , 245 , 2403 , 4979 , 1448 , -716 , -288 , -387 , -1023 , -1625 , -1371 , -1425 , -1584 , -1505 , -899 ,
+ 2943 , -214 , -1605 , -563 , 565 , 838 , 558 , -616 , -919 , -1002 , 498 , 2396 , 2264 , -116 , -2465 , -2562 ,
+ 29 , 1348 , 1688 , 136 , -859 , -273 , -627 , 84 , 1360 , 3635 , 2904 , -1691 , -2928 , -2031 , -1197 , -1576 ,
+ -3472 , 1420 , 442 , -1499 , -1990 , -1702 , -1566 , -1104 , 78 , 1033 , 1640 , 1632 , 1574 , 1220 , 1212 , 1081 ,
+ 1953 , -23 , -627 , -1383 , -1259 , 1004 , 3624 , 2500 , -1346 , -2634 , -1795 , -778 , -511 , -345 , 456 , 1163 ,
+ 4332 , -964 , -3948 , -3470 , 1285 , 4835 , 3224 , 584 , -77 , -893 , -848 , -484 , -428 , -664 , -1430 , -1053 ,
+ -117 , -1788 , -833 , 558 , 730 , 891 , -108 , -1659 , -2651 , -2745 , -1081 , 1583 , 2809 , 2204 , 1191 , 1018 ,
+ -1345 , -373 , -461 , -1404 , -2370 , -2179 , -1860 , -1422 , -886 , -763 , -387 , 596 , 1341 , 2668 , 4449 , 4396 ,
+ 703 , 1081 , 785 , 116 , -226 , 588 , 371 , 128 , -841 , -1511 , -2399 , -3059 , -3098 , -175 , 3474 , 4064 ,
+ 2514 , -777 , -1994 , -1860 , -1724 , -1633 , -1409 , -1049 , -426 , 483 , 1396 , 1809 , 1677 , 1298 , 934 , 762 ,
+ -2407 , 787 , 1259 , 1895 , 1549 , 339 , -1486 , -2126 , -2176 , -1736 , -1109 , -617 , -109 , 887 , 2228 , 2818 ,
+ -2370 , -192 , 160 , -107 , 141 , -1165 , -2137 , 299 , 2936 , 3445 , -1416 , -1420 , 1045 , 1309 , 500 , -1029 ,
+ -803 , 477 , 733 , 1105 , 1659 , 1199 , 396 , -525 , -596 , -699 , -668 , -547 , -466 , -585 , -527 , -153 ,
+ -854 , -1179 , -969 , -484 , 67 , 243 , 278 , -137 , -55 , 12 , 281 , 514 , 599 , 462 , 461 , 759 ,
+ -555 , 4717 , 2129 , -264 , -987 , -522 , -88 , -291 , -391 , -491 , -515 , -766 , -855 , -879 , -331 , 88 ,
+ -1373 , -2671 , -1199 , 3480 , 2467 , 1443 , 608 , 260 , -542 , -1600 , -1685 , -1118 , -694 , -114 , 750 , 1987 ,
+ 934 , 3323 , 1049 , -2373 , 769 , 3068 , 503 , -1591 , -2364 , -3449 , -3986 , -3071 , 844 , 5877 , 941 , -474 ,
+ -425 , 228 , -1215 , -1583 , -1505 , -1579 , -934 , -791 , -484 , -477 , 1056 , 4177 , 4488 , 3123 , -786 , -3291 ,
+ 1305 , -1331 , -1055 , 1844 , 3061 , 1077 , -2285 , -2600 , 230 , 4597 , 1138 , -3419 , -3967 , -827 , 2157 , 77 ,
+ 997 , 210 , -659 , -997 , -624 , 153 , 286 , -62 , -2489 , 591 , 3868 , 1520 , -1263 , -1424 , -494 , 387 ,
+ 550 , 1926 , -1797 , -3507 , -2499 , -447 , 586 , 751 , 425 , -141 , -276 , 149 , 519 , 762 , 1372 , 1626 ,
+ 4225 , -2078 , 205 , 1305 , -229 , -2501 , -1305 , -231 , 298 , 233 , -219 , -284 , -355 , -157 , 196 , 896 ,
+ 1933 , 2394 , 2521 , -320 , -2587 , -3794 , -3666 , -1887 , -607 , -128 , 189 , 577 , 518 , 1040 , 1956 , 1861 ,
+ -4582 , -2223 , -1479 , -548 , -20 , 1204 , 1867 , 1627 , 992 , -767 , -2361 , -1057 , 474 , 2119 , 2744 , 2011 ,
+ -3537 , -810 , -278 , -246 , 338 , 2203 , 3 , -278 , -22 , 2105 , 1761 , -1452 , -2749 , -633 , 2262 , 1334 ,
+ 2549 , 1831 , 1526 , 633 , -570 , -1662 , -2041 , -1590 , -568 , 965 , 2087 , 1627 , 325 , -934 , -1811 , -2366 ,
+ -2625 , 735 , 4126 , 1924 , -1352 , -1375 , -67 , -263 , -332 , -611 , -223 , 69 , -41 , -365 , -50 , 449 ,
+ 1945 , -542 , 862 , 1501 , -463 , -3503 , -3203 , 3338 , 4340 , -1886 , -1472 , -176 , -899 , -1007 , 153 , 1012 ,
+ 1176 , -2807 , 927 , 489 , -701 , -1222 , 1377 , 2025 , 1740 , 704 , 835 , 366 , -857 , -1584 , -1462 , -1007 ,
+ 1374 , 1113 , 165 , -297 , -35 , -391 , -815 , -1221 , -716 , -497 , -249 , 51 , 360 , 245 , 279 , 635 ,
+ 4741 , 2291 , -661 , -1808 , -1569 , -1013 , -23 , 449 , 899 , 914 , -15 , -826 , -1123 , -1159 , -870 , -227 ,
+ -3095 , -3457 , -326 , 1213 , 999 , 1504 , 2296 , 1487 , 1074 , 733 , 257 , -216 , -595 , -863 , -635 , -376 ,
+ 1313 , 1943 , 2320 , 2119 , 1731 , 1184 , 521 , -954 , -2164 , -2882 , -2594 , -1657 , -957 , -667 , -49 , 792 ,
+ -225 , 2104 , 1245 , 2010 , 1467 , -381 , -1564 , -1777 , -2347 , -1964 , -723 , 1747 , 2298 , 1153 , -937 , -2106 ,
+ 1110 , -1091 , -1843 , -326 , 890 , 1762 , 1723 , 1959 , 2404 , 1131 , -1081 , -2694 , -2783 , -1612 , -483 , 933 ,
+ -3280 , 740 , 493 , -1621 , -2458 , -538 , 3182 , 2390 , 1740 , 648 , 349 , -246 , -677 , -725 , -96 , 98 ,
+ 1151 , 1644 , 2333 , 571 , -841 , -749 , 1667 , 2880 , 2249 , 381 , -1951 , -2564 , -2038 , -1604 , -1690 , -1440 ,
+ 1322 , -4374 , -4684 , 281 , 3091 , 1587 , 369 , -3 , -524 , 313 , 1018 , 1177 , 314 , -171 , -81 , 365 ,
+ 2499 , -904 , -2181 , -489 , 429 , 669 , -619 , -1412 , -1628 , -1788 , -978 , 7 , 230 , 941 , 2049 , 3175
+};
+#endif
const float ivas_sns_cdbk_tcx20_stage3[ 32 * 16 ] =
{
-0.12109375f, -0.32348633f, -0.25976562f, 0.21435547f, 0.4814453f, 0.14819336f, -0.22363281f, -0.31030273f, -0.13256836f, 0.10107422f, 0.33276367f, 0.32495117f, 0.16577148f, -0.079833984f, -0.16210938f, -0.15527344f,
@@ -5997,7 +6200,44 @@ const float ivas_sns_cdbk_tcx20_stage3[ 32 * 16 ] =
0.17895508f, -0.31396484f, -0.033203125f, -0.02734375f, -0.0637207f, -0.11791992f, -0.03466797f, 0.0061035156f, 0.07324219f, 0.072753906f, 0.14916992f, 0.13671875f, 0.12524414f, 0.017333984f, -0.08178711f, -0.08618164f,
0.13330078f, -0.15893555f, -0.22045898f, -0.032226562f, -0.07739258f, -0.25463867f, -0.32299805f, -0.2614746f, 0.039794922f, 0.18554688f, 0.1262207f, -0.04321289f, -0.010498047f, 0.13330078f, 0.31860352f, 0.44506836f,
};
-
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx20_stage3_fx[32 * 16] =
+{
+ -496 , -1325 , -1064 , 878 , 1972 , 607 , -916 , -1271 , -543 , 414 , 1363 , 1331 , 679 , -327 , -664 , -636 ,
+ 362 , -60 , -548 , -1188 , 3577 , -1280 , -794 , 791 , -404 , 216 , -537 , -90 , -322 , -81 , -302 , 662 ,
+ -474 , 1151 , 1105 , -431 , -442 , -1174 , -1503 , -1387 , -649 , 79 , 712 , 865 , 1105 , 707 , 299 , 37 ,
+ 334 , 155 , -1060 , -1247 , -263 , 534 , 1502 , 1635 , 1393 , 587 , -48 , -494 , -698 , -945 , -853 , -533 ,
+ -102 , -2580 , 3220 , -45 , -520 , -353 , 93 , 202 , 19 , -559 , -404 , 0 , 267 , 59 , 248 , 455 ,
+ -1614 , 689 , 1170 , -355 , -659 , 214 , 1065 , 234 , -205 , -321 , 68 , 241 , 302 , -162 , -349 , -318 ,
+ 49 , -471 , -419 , -290 , 40 , -128 , -639 , -61 , 432 , -165 , -1970 , -1140 , 2419 , 2709 , 567 , -934 ,
+ 1995 , 749 , -847 , -723 , -809 , -1302 , -1034 , 36 , 1174 , 1053 , 777 , 479 , 202 , -226 , -725 , -798 ,
+ 503 , -396 , 223 , 711 , 939 , 1443 , 1651 , 131 , -658 , -607 , -422 , -361 , -558 , -963 , -997 , -639 ,
+ -2380 , -60 , -1779 , -303 , 1247 , 1476 , 787 , 528 , 535 , 131 , -102 , -243 , -199 , -125 , 129 , 359 ,
+ -480 , 67 , 624 , 1594 , 1140 , -29 , -302 , -842 , -1229 , -1468 , -958 , -139 , 349 , 447 , 512 , 716 ,
+ -441 , 257 , -20 , 524 , -98 , -901 , -345 , 1409 , 932 , -1626 , -1328 , 1998 , 1784 , -632 , -919 , -596 ,
+ 13 , -162 , 276 , -73 , -1083 , 1249 , 1237 , -1331 , -2051 , 634 , 2497 , 636 , -778 , -595 , 73 , -539 ,
+ 150 , -478 , -1380 , -2201 , -557 , 1248 , 1317 , -435 , -672 , -351 , 51 , 444 , 824 , 719 , 625 , 695 ,
+ -1787 , -1936 , -691 , -455 , -726 , -586 , 62 , 521 , 559 , 532 , 788 , 935 , 953 , 717 , 592 , 523 ,
+ -307 , 803 , 537 , -415 , -32 , -772 , -200 , 1387 , 1056 , -700 , -1667 , -1182 , -198 , 200 , 611 , 879 ,
+ -1136 , -297 , 1067 , 1599 , 933 , 85 , -496 , -329 , 704 , 1505 , 440 , -791 , -926 , -846 , -811 , -698 ,
+ 554 , 1640 , -641 , -1038 , 1272 , 2216 , -1350 , -1756 , 606 , 710 , -732 , -972 , -109 , -55 , -189 , -155 ,
+ -1245 , 526 , 853 , -490 , -1359 , -1307 , -459 , 418 , 1330 , 1485 , 1076 , 66 , -528 , -675 , -21 , 330 ,
+ 1408 , 1470 , 1952 , 558 , -474 , -218 , 330 , -50 , -91 , -404 , -330 , -556 , -753 , -1070 , -1056 , -717 ,
+ 48 , -64 , 1098 , -961 , -1463 , 2614 , -1256 , 333 , -225 , 412 , -110 , -417 , -56 , -260 , 2 , 305 ,
+ -416 , 207 , 378 , 157 , -143 , 675 , 352 , 15 , -633 , -373 , 108 , -981 , -1789 , -1138 , 895 , 2685 ,
+ -658 , 135 , 341 , 217 , -171 , 367 , 678 , 235 , -334 , 875 , 199 , -2878 , -1134 , 2089 , 1114 , -1075 ,
+ 2544 , 16 , 331 , 686 , 339 , -461 , -853 , -1260 , -1021 , -628 , 3 , 359 , 463 , 93 , -282 , -329 ,
+ 1673 , -1600 , -1453 , 892 , 900 , -44 , 456 , 879 , 586 , -366 , -785 , -970 , -549 , -140 , 126 , 396 ,
+ -901 , 3362 , -1315 , 487 , -27 , -544 , 32 , -54 , -225 , -100 , 268 , -6 , -228 , -277 , -289 , -183 ,
+ -605 , -695 , -453 , 2594 , -1649 , -1440 , 1218 , 352 , 100 , -292 , 42 , 3 , -89 , 81 , 342 , 494 ,
+ -276 , 125 , 78 , 668 , 688 , 152 , 243 , 303 , 145 , 226 , 286 , 252 , 795 , 844 , -1302 , -3227 ,
+ 522 , -167 , -889 , -105 , 51 , -136 , -646 , 213 , -785 , -1079 , 132 , 3267 , -1969 , -884 , 1495 , 982 ,
+ 1886 , 878 , 347 , -1000 , -2044 , -679 , 1235 , 203 , -306 , -879 , -543 , -38 , 273 , 119 , 160 , 390 ,
+ 733 , -1286 , -136 , -112 , -261 , -483 , -142 , 25 , 300 , 298 , 611 , 560 , 513 , 71 , -335 , -353 ,
+ 546 , -651 , -903 , -132 , -317 , -1043 , -1323 , -1071 , 163 , 760 , 517 , -177 , -43 , 546 , 1305 , 1823
+};
+#endif
const float ivas_sns_cdbk_tcx20_stage4[ 32 * 16 ] =
{
-0.0056152344f, -0.03955078f, 0.071777344f, 0.26879883f, 0.44140625f, -0.08203125f, -0.20092773f, -0.009277344f, 0.05810547f, -0.06347656f, -0.07910156f, -0.05126953f, -0.07006836f, -0.068847656f, -0.07885742f, -0.09082031f,
@@ -6034,8 +6274,49 @@ const float ivas_sns_cdbk_tcx20_stage4[ 32 * 16 ] =
-0.0017089844f, -0.014160156f, -0.048339844f, -0.037109375f, -0.0949707f, -0.005859375f, 0.48388672f, -0.17480469f, -0.19140625f, 0.5727539f, -0.18920898f, -0.26391602f, 0.0048828125f, 0.067871094f, -0.045654297f, -0.06201172f,
};
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx20_stage4_fx[ 32 * 16 ] =
+{
+ -23 , -162 , 294 , 1101 , 1808 , -336 , -823 , -38 , 238 , -260 , -324 , -210 , -287 , -282 , -323 , -372 ,
+ -49 , -247 , 49 , 204 , -183 , 155 , 406 , 257 , 91 , -371 , 16 , 1575 , 421 , -2168 , -1339 , 1183 ,
+ -1457 , 1563 , 444 , 336 , 129 , -10 , -15 , -113 , -128 , -394 , -382 , -424 , -287 , 33 , 271 , 436 ,
+ 157 , 92 , -904 , 2169 , -1450 , 1225 , -665 , -162 , 218 , -301 , -211 , 88 , 190 , 121 , -213 , -353 ,
+ 311 , -803 , 192 , -2 , -217 , -143 , 781 , 349 , -660 , -1220 , -924 , -287 , 221 , 635 , 780 , 987 ,
+ 337 , 1084 , -628 , -576 , -28 , 247 , -210 , -956 , -1165 , -580 , 325 , 976 , 847 , 398 , 61 , -133 ,
+ 843 , -807 , 219 , 110 , -49 , -191 , -461 , 246 , 1392 , 1370 , -584 , -1545 , -895 , 69 , 341 , -57 ,
+ 1408 , -1582 , -268 , -301 , -440 , 153 , 593 , 65 , 11 , 367 , 796 , 421 , -129 , -246 , -411 , -437 ,
+ 526 , 80 , 669 , 935 , -656 , -1721 , -781 , 354 , 349 , -93 , 46 , 56 , -14 , 78 , -24 , 196 ,
+ 112 , 33 , -306 , 471 , 9 , -1712 , 2296 , -1177 , 94 , -317 , -118 , 790 , 230 , 22 , -199 , -227 ,
+ -152 , 530 , -1584 , -390 , 9 , -51 , 806 , 1056 , 519 , -417 , -360 , 39 , 581 , 595 , -314 , -867 ,
+ 1217 , 271 , -1536 , -330 , 608 , -3 , -86 , 55 , -58 , -462 , -331 , -230 , -564 , -248 , 434 , 1262 ,
+ -103 , 98 , -113 , -4 , 335 , -551 , -94 , 2816 , -1630 , -504 , 276 , 178 , -221 , -60 , -186 , -238 ,
+ 60 , 171 , -102 , 21 , -326 , -190 , -116 , 90 , -469 , -487 , -171 , -8 , -1140 , 1358 , 2645 , -1333 ,
+ -573 , -82 , 1285 , -2182 , 1292 , 153 , -175 , -243 , -223 , -40 , -30 , 63 , 315 , 338 , 48 , 55 ,
+ -204 , 94 , -337 , -350 , 51 , 63 , -918 , 640 , -809 , 2336 , -1509 , 298 , 1930 , -1470 , 602 , -418 ,
+ -702 , -781 , -877 , -125 , 396 , -358 , -395 , 70 , 355 , 170 , 242 , 140 , 333 , 526 , 492 , 514 ,
+ -184 , 25 , 155 , 70 , 264 , 34 , -841 , -103 , 303 , 255 , -655 , -1131 , 1838 , 578 , -1675 , 1067 ,
+ -612 , 728 , 94 , -512 , 2 , 779 , 158 , -163 , 387 , 828 , 919 , 457 , -331 , -696 , -1030 , -1009 ,
+ -383 , 115 , -175 , 222 , 65 , -691 , -1245 , -708 , 283 , 1251 , 953 , -372 , 549 , 1413 , 150 , -1428 ,
+ -820 , -428 , 172 , 383 , 42 , 193 , 1079 , 977 , 557 , -176 , -262 , -564 , -744 , -413 , -138 , 143 ,
+ 600 , 113 , 1392 , -21 , -405 , 175 , -764 , -1357 , -582 , 164 , 149 , -297 , -490 , -7 , 387 , 944 ,
+ 977 , 1086 , 140 , 175 , 207 , 142 , 499 , 161 , -74 , -393 , -441 , -657 , -705 , -513 , -398 , -208 ,
+ -335 , -210 , -840 , 473 , 592 , -45 , -670 , -209 , 154 , 998 , 1575 , 223 , -1650 , -900 , 325 , 520 ,
+ -1044 , -1156 , 804 , 1184 , 196 , -140 , 51 , -475 , -858 , -334 , 550 , 669 , 323 , 208 , 55 , -32 ,
+ -278 , 97 , -45 , -152 , -784 , 487 , -82 , -1620 , 2324 , -113 , -981 , 425 , -194 , 122 , 307 , 487 ,
+ 390 , -32 , 1476 , -311 , -835 , 256 , 628 , 184 , 17 , -565 , -603 , 62 , 717 , 453 , -600 , -1235 ,
+ 262 , -96 , 317 , -990 , 168 , 771 , -1790 , 1064 , 1028 , -1523 , 167 , 1061 , 15 , -183 , -130 , -142 ,
+ 104 , 381 , 464 , -114 , -36 , -288 , 116 , -216 , -800 , -1336 , 2780 , -303 , -616 , -288 , -113 , 265 ,
+ -203 , 637 , -66 , -1133 , -1244 , -550 , 336 , 402 , 307 , 157 , 228 , -16 , -76 , 160 , 435 , 626 ,
+ -177 , -754 , -187 , -206 , 868 , 2171 , 398 , -527 , -386 , -355 , -360 , -395 , -185 , 90 , -54 , 58 ,
+ -7 , -58 , -198 , -152 , -389 , -24 , 1982 , -716 , -784 , 2346 , -775 , -1081 , 20 , 278 , -187 , -254
+};
+#endif
const float *const ivas_sns_cdbks_tcx20[SNS_MSVQ_NSTAGES_TCX20] = { ivas_sns_cdbk_tcx20_stage1, ivas_sns_cdbk_tcx20_stage2, ivas_sns_cdbk_tcx20_stage3, ivas_sns_cdbk_tcx20_stage4 };
+#ifdef IVAS_FLOAT_FIXED
+const Word16 *const ivas_sns_cdbks_tcx20_fx[SNS_MSVQ_NSTAGES_TCX20] = { ivas_sns_cdbk_tcx20_stage1_fx, ivas_sns_cdbk_tcx20_stage2_fx, ivas_sns_cdbk_tcx20_stage3_fx, ivas_sns_cdbk_tcx20_stage4_fx };
+#endif
const int16_t ivas_sns_cdbks_tcx10_levels[SNS_MSVQ_NSTAGES_TCX10] = { 128, 32, 8 };
const int16_t ivas_sns_cdbks_tcx10_bits[SNS_MSVQ_NSTAGES_TCX10] = { 7, 5, 3 };
@@ -6171,8 +6452,141 @@ const float ivas_sns_cdbk_tcx10_stage1[ 128 * 16 ] =
3.256836f, 3.5593262f, 2.2746582f, 1.1318359f, 0.3149414f, -0.02368164f, 0.27172852f, -0.19335938f, -0.48779297f, -0.9663086f, -0.9187012f, -1.0222168f, -1.512207f, -1.6816406f, -1.8964844f, -2.1069336f,
-0.057617188f, -0.45092773f, -0.9638672f, -0.72143555f, 0.20703125f, 1.4692383f, 1.921875f, 1.6833496f, 1.3933105f, 0.6699219f, 0.17333984f, -0.43798828f, -0.9772949f, -1.1477051f, -1.3552246f, -1.4057617f,
};
-
-const float ivas_sns_cdbk_tcx10_stage2[ 32 * 16 ] =
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx10_stage1_fx[ 128 * 16 ] =
+{
+ 4155 , 4844 , 1339 , -2626 , -4982 , -4674 , -4721 , -3645 , -803 , 3032 , 4826 , 4436 , 3204 , 1104 , -1360 , -4129 ,
+-1594 , -1284 , -4844 , -8342 , -8548 , -7606 , -6706 , -5389 , -1713 , 2074 , 5231 , 5641 , 7605 , 9627 , 9427 , 6422 ,
+1788 , 7725 , 11493 , 9169 , 6341 , 587 , 299 , -4595 , -4548 , -3005 , -1718 , -3671 , -4272 , -3268 , -4935 , -7392 ,
+6395 , 3818 , 2406 , 1897 , 897 , 256 , -693 , -1410 , -1832 , -2500 , -2621 , -2342 , -1577 , -1062 , -856 , -776 ,
+4150 , 7919 , 3439 , -2033 , -2704 , -1557 , 231 , 1278 , 3321 , 2731 , -93 , -3269 , -3781 , -2586 , -2807 , -4238 ,
+-3449 , -354 , 2017 , 2387 , 4764 , 5609 , 2963 , 1108 , 1421 , 28 , -950 , -1353 , -2415 , -2770 , -4077 , -4929 ,
+8524 , 7457 , 4506 , 1934 , 338 , -1987 , -2756 , -2266 , -1957 , -2240 , -2375 , -2413 , -2097 , -1743 , -1348 , -1577 ,
+7090 , 5351 , 2190 , 948 , 174 , 15 , 389 , 653 , 810 , 817 , 897 , 265 , -1778 , -3881 , -6266 , -7674 ,
+6804 , 11715 , 7237 , -532 , -1146 , 4914 , 6089 , 4999 , 2534 , -5124 , -6431 , -5499 , -5543 , -5359 , -6419 , -8238 ,
+7709 , 2493 , -2143 , -6489 , -5196 , -3714 , -2590 , -832 , -1060 , 376 , 749 , 4940 , 4149 , -203 , -522 , 2334 ,
+2478 , 4656 , 6266 , 8166 , 8080 , 7910 , 7237 , 5633 , 3847 , 82 , -2972 , -5614 , -9294 , -11465 , -12330 , -12680 ,
+-3763 , 439 , 1331 , -211 , -1125 , 837 , 3525 , 1259 , 263 , -714 , -2457 , -3123 , -445 , 2047 , 1650 , 487 ,
+4433 , 3075 , 1944 , 16 , -1183 , -2102 , -2546 , -2683 , -2426 , -1757 , -724 , 250 , 488 , 152 , 994 , 2067 ,
+-9469 , -5101 , -2893 , -3433 , -2063 , 164 , 2573 , 3814 , 3385 , 1553 , 818 , -98 , 1471 , 3904 , 3575 , 1801 ,
+15946 , 17207 , 12819 , 11001 , 8646 , 8327 , 189 , -5678 , -6626 , -8191 , -8726 , -8916 , -9067 , -9108 , -8807 , -9017 ,
+-5510 , -1763 , 1586 , 4321 , 5956 , 6915 , 5607 , 1816 , -152 , -948 , -2191 , -3237 , -3324 , -3026 , -2853 , -3196 ,
+8688 , 10873 , 8275 , 4634 , 1734 , -557 , -1294 , -1577 , -1538 , -3121 , -4044 , -4288 , -3973 , -4095 , -4377 , -5339 ,
+8314 , 381 , -4203 , -6906 , -2427 , 2895 , 4683 , -1276 , -3574 , -1537 , 382 , -1706 , -1536 , -1335 , 2670 , 5175 ,
+2014 , 6901 , 7450 , 8391 , 5660 , 5349 , 3318 , 632 , -1645 , -7184 , -11554 , -6162 , -2239 , -4081 , -3232 , -3618 ,
+2463 , 7959 , 4852 , -2086 , -2118 , 2942 , 2680 , 273 , -1971 , -3815 , -4209 , -3731 , -1973 , 228 , 710 , -2203 ,
+2203 , 1934 , 716 , -1238 , -808 , -125 , -35 , 38 , -139 , -93 , 845 , 1853 , 747 , -583 , -2071 , -3245 ,
+-8428 , -9073 , -4283 , -324 , 6076 , 5438 , -488 , -2617 , -275 , 3550 , -1050 , -170 , 4675 , 4235 , 2065 , 669 ,
+11333 , 11955 , 6902 , 1934 , -1514 , -2879 , -3232 , -4238 , -3422 , -2837 , -2629 , -2898 , -2649 , -2035 , -2008 , -1783 ,
+426 , 4019 , 4713 , 3739 , 3356 , 3491 , 3050 , 1887 , 1284 , -268 , -2029 , -3494 , -4307 , -4440 , -5214 , -6212 ,
+2092 , 5801 , 8237 , 9551 , 6780 , 3678 , 2472 , 1019 , 1067 , -1082 , -3123 , -5119 , -7460 , -7403 , -7732 , -8778 ,
+961 , 1615 , -886 , -4376 , -5548 , -5310 , -4982 , -4885 , -3665 , -1478 , 1198 , 2863 , 4755 , 6850 , 7462 , 5426 ,
+12293 , 13814 , 11807 , 11074 , 9876 , 10313 , 5810 , 199 , -2989 , -7493 , -10043 , -10534 , -10988 , -11237 , -10950 , -10951 ,
+250 , 3000 , 5233 , 3533 , 1034 , 378 , -553 , -1707 , -2133 , -2878 , -2837 , -2353 , -1841 , -364 , 705 , 534 ,
+8771 , 7295 , 2905 , -1528 , -2797 , -2224 , -2434 , -3707 , -3996 , -3372 , -2464 , -2340 , 88 , 2453 , 2127 , 1224 ,
+-5356 , -4080 , -3178 , -3415 , -3409 , -2987 , -2237 , -677 , 1836 , 4189 , 5902 , 5483 , 3659 , 2525 , 1749 , -4 ,
+8540 , 13122 , 10394 , 3057 , 1011 , 2922 , 1889 , -673 , -1284 , -4815 , -6548 , -6657 , -5605 , -4808 , -4643 , -5902 ,
+-904 , 3036 , 3724 , 1024 , 621 , 2200 , 3068 , 4347 , 4727 , 939 , -3049 , -4688 , -4457 , -3259 , -3173 , -4155 ,
+7412 , 8540 , 3520 , -908 , -2046 , -2396 , -2247 , -1458 , -976 , 74 , -489 , 690 , 143 , -3498 , -4187 , -2172 ,
+-9034 , -10692 , -9925 , -9020 , -3884 , 6891 , 9607 , 8744 , 7840 , 4174 , 2713 , 2569 , 3504 , 3316 , -948 , -5856 ,
+12528 , 15782 , 10788 , 3495 , -369 , -2158 , -2473 , -3242 , -3527 , -5125 , -5686 , -5358 , -4614 , -3620 , -2829 , -3594 ,
+3762 , 7050 , 3669 , -309 , -1556 , -2008 , -2380 , -2362 , -2016 , -1483 , -971 , -939 , -639 , 127 , 288 , -234 ,
+5466 , 5096 , 839 , -4326 , -4389 , -495 , 3962 , 6525 , 4641 , 474 , -1865 , -1808 , -2070 , -3368 , -3972 , -4710 ,
+-7682 , -10419 , -8678 , 2804 , 7231 , 15597 , 6455 , -2426 , -908 , 2257 , 7253 , 5190 , -3489 , -5573 , -6505 , -1107 ,
+10313 , 8489 , 4954 , 1234 , -1203 , -393 , 1849 , 1910 , 915 , -2272 , -5380 , -5480 , -3449 , -3573 , -4108 , -3807 ,
+9010 , 7210 , 5020 , 3041 , 1855 , 1295 , 314 , -953 , -2075 , -2616 , -2829 , -2858 , -3271 , -3970 , -4378 , -4795 ,
+1460 , 6841 , 8628 , 3136 , 3143 , 6063 , 5972 , 3426 , 2223 , -5238 , -7341 , -6357 , -5904 , -3889 , -4715 , -7448 ,
+1449 , -1827 , -4550 , -6487 , -5713 , -2732 , -660 , 433 , 1307 , 2371 , 2794 , 3239 , 3158 , 2432 , 2376 , 2409 ,
+5243 , 9630 , 12091 , 11941 , 10590 , 7240 , 4378 , 1797 , -801 , -6201 , -9586 , -10323 , -9468 , -8915 , -8728 , -8887 ,
+-6934 , -1067 , 786 , -193 , 251 , 625 , 700 , 418 , 356 , 314 , 163 , 106 , 6 , 1088 , 1894 , 1487 ,
+6060 , 3896 , 485 , -2939 , -4736 , -3436 , 282 , 2032 , 1869 , -523 , -3273 , -3045 , -833 , -16 , 1127 , 3049 ,
+-6670 , -1890 , 358 , -230 , 447 , 2409 , 3909 , 6279 , 5449 , 1441 , -878 , -2018 , -2272 , -1424 , -1908 , -3000 ,
+11826 , 16636 , 13050 , 6279 , 1706 , 781 , 2337 , -3227 , -5169 , -7375 , -6710 , -5822 , -6503 , -6377 , -5089 , -6343 ,
+485 , 663 , 700 , 2165 , 1981 , 966 , 376 , 1834 , 2298 , 1627 , 1114 , 702 , -758 , -3039 , -4935 , -6179 ,
+15276 , 10241 , 6249 , 2873 , 783 , 322 , 994 , 1738 , 951 , -1804 , -4461 , -5446 , -5652 , -6733 , -7613 , -7717 ,
+-4421 , -2251 , -2182 , -3670 , -3227 , -2064 , -1880 , -1860 , -609 , 307 , 1234 , 2129 , 3532 , 5592 , 5516 , 3853 ,
+3360 , 7922 , 10867 , 9394 , 6526 , 1053 , 1896 , 2883 , 1638 , -5507 , -7666 , -7210 , -7668 , -4745 , -5551 , -7191 ,
+2467 , 6411 , 8292 , 4274 , 2274 , 1209 , -243 , -1212 , -1185 , -2826 , -3570 , -3368 , -3512 , -3049 , -2692 , -3269 ,
+3028 , 7338 , 7308 , 4275 , 997 , -2048 , -3118 , -4094 , -3189 , -2517 , -1649 , -1480 , -692 , 504 , -1307 , -3355 ,
+-13713 , -11806 , -7131 , -79 , 6455 , 6414 , -589 , -4681 , -1922 , 6331 , 330 , 637 , 6245 , 5108 , 4653 , 3749 ,
+14977 , 9830 , 6085 , 2938 , 1863 , 1059 , -553 , -2267 , -3180 , -4394 , -5086 , -4951 , -4163 , -4237 , -4011 , -3909 ,
+-1081 , 3251 , 6408 , 7149 , 4954 , 5039 , 4478 , 4353 , 4522 , 680 , -6756 , -9382 , -7832 , -5831 , -3856 , -6094 ,
+7162 , 7991 , 4675 , 976 , 841 , 2948 , 4353 , 3456 , 2703 , 451 , -1709 , -4266 , -5937 , -7074 , -7860 , -8711 ,
+7238 , -605 , -4007 , 3 , 8333 , 1173 , -2176 , -5314 , -6069 , -5080 , -4591 , -4717 , -2795 , -241 , 5388 , 13461 ,
+10596 , 12578 , 13802 , 10908 , 7436 , 2231 , 2444 , 1872 , -2275 , -7177 , -9152 , -9171 , -8796 , -8290 , -8520 , -8488 ,
+-737 , 2442 , 485 , -2808 , -3574 , -3229 , -2953 , -2353 , -857 , 704 , 1697 , 2241 , 2025 , 2311 , 2655 , 1952 ,
+12162 , 6690 , 2238 , -2622 , -4617 , -5816 , -5879 , -5236 , -4308 , -2961 , -1748 , -1607 , 1838 , 2753 , 3664 , 5448 ,
+-3077 , 452 , 1966 , -389 , -1269 , 118 , 175 , 1055 , 3620 , 4579 , 1375 , -1234 , -1480 , -1197 , -1718 , -2974 ,
+15858 , 15042 , 10523 , 5569 , 4228 , 4314 , 3082 , 654 , -1725 , -5657 , -8057 , -9036 , -8888 , -8704 , -8514 , -8690 ,
+1704 , 1674 , 529 , 1843 , 4216 , 6144 , 6034 , 4105 , 2177 , -429 , -2012 , -2595 , -4212 , -5660 , -6417 , -7102 ,
+4241 , 3011 , -177 , -3536 , -4674 , -3686 , -1588 , 992 , 3180 , 2882 , 1972 , 1063 , 676 , -379 , -1461 , -2516 ,
+-10246 , -9377 , -9897 , -10469 , -9129 , -5712 , -3574 , -1246 , 1237 , 4416 , 7620 , 7504 , 9023 , 11338 , 10287 , 8226 ,
+5873 , 10679 , 11753 , 7933 , 5561 , 2214 , 30 , -1608 , -3259 , -6151 , -6707 , -5993 , -5418 , -4939 , -4492 , -5477 ,
+1703 , 1720 , 48 , -171 , 92 , 1005 , 1475 , 1312 , 659 , -228 , -981 , -1903 , -1549 , -716 , -784 , -1681 ,
+534 , 4872 , 3894 , -2429 , -4953 , -2172 , 3168 , 2622 , 2251 , 1388 , -2147 , -4094 , -1110 , 1384 , -375 , -2832 ,
+-10365 , -5877 , -612 , 3409 , 4994 , 5250 , 3856 , 2179 , 1532 , 1289 , 947 , 43 , -882 , -1327 , -1874 , -2562 ,
+7364 , 8825 , 6753 , 3174 , 1572 , 1020 , -1433 , -3832 , -4629 , -5540 , -5397 , -4403 , -2961 , -1278 , 255 , 511 ,
+3616 , 2982 , 2441 , 1531 , 2154 , 2980 , 1762 , 767 , 272 , -953 , -1744 , -2069 , -2225 , -2573 , -3790 , -5149 ,
+6016 , 10717 , 11396 , 4773 , 1867 , 5061 , 5183 , 3833 , 2366 , -3588 , -10444 , -10907 , -9023 , -5516 , -3941 , -7793 ,
+6375 , 1989 , -1308 , -3670 , -4356 , -4171 , -3980 , -3432 , -2043 , -587 , 591 , 1288 , 2794 , 3630 , 3600 , 3279 ,
+8179 , 11466 , 8560 , 3788 , 3482 , 5771 , 6843 , 5604 , 4908 , 1374 , -3903 , -8790 , -11546 , -12047 , -11857 , -11832 ,
+-3090 , 661 , 1382 , -807 , 2129 , 5268 , 1730 , -823 , -481 , -2827 , -4904 , -3053 , -219 , 1606 , 3077 , 350 ,
+8949 , 4159 , 587 , -2658 , -2926 , -2276 , -1678 , -1050 , -331 , -65 , -22 , -396 , -501 , -142 , -463 , -1189 ,
+-5048 , -1761 , -1240 , -3476 , -3747 , -2868 , 162 , 3168 , 4073 , 1904 , 569 , 468 , 1695 , 3016 , 2504 , 582 ,
+13457 , 16793 , 15820 , 10226 , 6095 , -181 , -2293 , -4895 , -6222 , -6960 , -7158 , -7267 , -7171 , -6955 , -6811 , -6477 ,
+-1163 , 1485 , 2929 , 4720 , 6317 , 6894 , 3387 , -44 , -1981 , -2797 , -3233 , -2707 , -2580 , -3352 , -3680 , -4195 ,
+10024 , 13762 , 8664 , 2406 , 361 , 330 , 523 , -3418 , -2716 , 1302 , -192 , -7081 , -7539 , -6126 , -4791 , -5509 ,
+221 , -2249 , -2660 , -1660 , -613 , -278 , -544 , -655 , 183 , 1048 , 1304 , 660 , 1055 , 1496 , 1247 , 1445 ,
+846 , 5133 , 6934 , 10757 , 11411 , 9325 , 4488 , 1331 , -3265 , -7057 , -8303 , -5003 , -4657 , -8262 , -7258 , -6419 ,
+9482 , 12253 , 6534 , -607 , -2653 , -673 , 306 , -1178 , -1765 , -3207 , -3766 , -3761 , -3142 , -1768 , -2113 , -3942 ,
+-550 , 1425 , 2011 , 157 , -1079 , -1413 , -1697 , -1610 , -686 , 39 , 810 , 288 , 848 , 1801 , 1010 , -1353 ,
+-10109 , -11744 , -7706 , 379 , 8248 , 6559 , 38 , -828 , 2185 , 6885 , 844 , 754 , 4769 , 3153 , -890 , -2538 ,
+13503 , 12466 , 7450 , 1458 , -2178 , -4645 , -5771 , -6295 , -6474 , -5971 , -4508 , -2899 , 1290 , 560 , 405 , 1608 ,
+4667 , 8260 , 6596 , 1763 , 3540 , 6861 , 3573 , -969 , -5225 , -5388 , -4163 , -2503 , -3545 , -3940 , -3641 , -5886 ,
+5072 , 10057 , 11017 , 4484 , 3638 , 2703 , 2095 , 2224 , 2067 , -2996 , -4340 , -4397 , -7071 , -7750 , -8132 , -8671 ,
+7076 , 4469 , 996 , -4409 , -7469 , -8582 , -7901 , -7025 , -4868 , -1656 , 2572 , 4172 , 4462 , 5363 , 6290 , 6510 ,
+11515 , 12880 , 10465 , 3540 , 1874 , 6237 , 6698 , 3799 , -2308 , -7772 , -8623 , -8541 , -7869 , -7144 , -7664 , -7087 ,
+1889 , 3817 , 3520 , 1054 , -342 , -451 , -2129 , -3116 , -3726 , -5315 , -4316 , -2809 , 54 , 3440 , 4742 , 3688 ,
+12822 , 7564 , 3096 , -1375 , -2981 , -3502 , -2957 , -2787 , -2321 , -2052 , -2014 , -1157 , -656 , -1499 , -1036 , 856 ,
+-7298 , -3128 , -1459 , -3766 , -3686 , -1244 , 669 , 2187 , 5005 , 6621 , 4491 , 1512 , 782 , 783 , -274 , -1196 ,
+12071 , 12166 , 10231 , 7547 , 4891 , 1997 , 167 , -1868 , -2940 , -5141 , -6998 , -7442 , -6793 , -6155 , -5653 , -6081 ,
+-1753 , 1625 , 4228 , 3372 , 2337 , 4063 , 4415 , 1944 , 491 , -2688 , -5614 , -5677 , -3836 , -1216 , -247 , -1444 ,
+12512 , 6411 , 2980 , 101 , -359 , -558 , -915 , -211 , -81 , -568 , -1190 , -2006 , -2777 , -3666 , -4294 , -5379 ,
+-9543 , -6774 , -6214 , -7549 , -7059 , -3854 , -1628 , 2101 , 5622 , 6976 , 6572 , 5418 , 5229 , 4875 , 3740 , 2087 ,
+8837 , 12535 , 11328 , 7255 , 2550 , -2526 , -4345 , -6428 , -5892 , -7230 , -7262 , -4485 , -1885 , -283 , -223 , -1946 ,
+9129 , 8498 , 4366 , 281 , -3607 , -5680 , -5660 , -5230 , -3574 , -1874 , -344 , -92 , 1479 , 1933 , 516 , -142 ,
+5256 , 9433 , 6759 , -793 , -3866 , -459 , 5206 , 4388 , 3690 , -2799 , -7970 , -5691 , -3094 , -697 , -2658 , -6706 ,
+-2216 , -5889 , -3568 , 2955 , 9741 , 7436 , 239 , -1003 , 1111 , 4778 , -1103 , -1008 , 1967 , -1394 , -4972 , -7074 ,
+10789 , 7440 , 2779 , -665 , -2630 , -3084 , -1314 , 514 , 584 , -2094 , -4598 , -5089 , -1705 , -879 , -523 , 474 ,
+6838 , 5757 , 5081 , 5754 , 4886 , 2602 , 782 , 166 , -233 , -2235 , -3851 , -4886 , -4905 , -4949 , -5029 , -5777 ,
+3777 , 8672 , 7923 , 2766 , 875 , 3035 , 2111 , 256 , -660 , -3765 , -6885 , -7930 , -5724 , -1376 , 64 , -3141 ,
+1043 , 1116 , -2723 , -6588 , -6935 , -6723 , -5310 , 129 , 5099 , 4079 , 3612 , 2961 , 2573 , 4722 , 2989 , -43 ,
+1107 , 6435 , 9892 , 10493 , 10103 , 8530 , 4943 , 5882 , 5571 , -2662 , -9598 , -11372 , -11225 , -10110 , -8411 , -9579 ,
+-5006 , -976 , 1744 , 1682 , 136 , -921 , -1278 , -2195 , -2395 , -1642 , 74 , 1034 , 1476 , 2263 , 2966 , 3036 ,
+5150 , 4553 , 3608 , 1262 , -1364 , -913 , 1595 , 2380 , 2112 , -469 , -3306 , -3879 , -2810 , -2832 , -2793 , -2294 ,
+-3555 , -3199 , -1984 , -903 , 897 , 2488 , 1905 , 2582 , 2162 , 544 , 447 , 1148 , 647 , -112 , -935 , -2133 ,
+19565 , 17281 , 11036 , 5756 , 1904 , 520 , -2148 , -4844 , -5499 , -5875 , -6311 , -6526 , -6486 , -6349 , -6068 , -5956 ,
+-4564 , 687 , 4457 , 4047 , 2491 , 1633 , 917 , 80 , 46 , 286 , -541 , -1798 , -2353 , -1410 , -1770 , -2208 ,
+10582 , 8739 , 6358 , 4552 , 5070 , 5384 , 3814 , 1464 , -830 , -3127 , -4787 , -5934 , -6628 , -7437 , -8195 , -9024 ,
+-8243 , -6062 , -5955 , -6127 , -4538 , -1750 , -708 , 329 , 1275 , 2189 , 2653 , 2630 , 4348 , 7441 , 7186 , 5331 ,
+3524 , 8176 , 10617 , 11183 , 9097 , 4548 , 2951 , -138 , -2003 , -4822 , -9077 , -10737 , -10317 , -6266 , -1688 , -5048 ,
+-160 , 2942 , 5298 , 6724 , 7063 , 1816 , -1506 , -2566 , -575 , -1613 , -6146 , -5214 , -2667 , -893 , -655 , -1848 ,
+1846 , 4832 , 4243 , 1910 , 516 , -856 , -1034 , -742 , -737 , -953 , -523 , -41 , -980 , -1924 , -2386 , -3170 ,
+-15228 , -14072 , -7488 , 944 , 6245 , 6079 , 828 , -630 , 1680 , 6027 , 390 , 513 , 5448 , 5516 , 2111 , 1639 ,
+19563 , 12033 , 6609 , 1145 , -1338 , -2373 , -3214 , -3154 , -3135 , -3507 , -3551 , -3495 , -3191 , -3941 , -4145 , -4305 ,
+-3621 , -2181 , 970 , 8464 , 10422 , 7881 , 6143 , 5042 , 3015 , 869 , -2539 , -3894 , -5022 , -7336 , -8360 , -9855 ,
+4589 , 9181 , 6169 , 1082 , 342 , 359 , 16 , 127 , 334 , -1624 , -2322 , -2546 , -2957 , -3264 , -4017 , -5471 ,
+3606 , -2296 , -3662 , -4758 , -3791 , -5478 , -4900 , -5253 , -5389 , -5139 , -4257 , -168 , 6209 , 6583 , 9851 , 18841 ,
+8752 , 12363 , 11875 , 8625 , 6928 , 5159 , 4395 , 2087 , 1077 , -2569 , -6852 , -9550 , -10394 , -10712 , -10636 , -10548 ,
+1860 , 2305 , -375 , -3366 , -3658 , -1668 , 102 , 33 , -397 , -793 , -1050 , -1026 , 612 , 3009 , 3141 , 1271 ,
+3601 , 5629 , 2769 , -909 , -3496 , -4488 , -4379 , -4804 , -4034 , -2723 , -478 , 276 , 2538 , 4467 , 3717 , 2316 ,
+-1091 , -1227 , -3638 , -5036 , -2839 , 46 , 2252 , 4024 , 4850 , 4463 , 2408 , 276 , -365 , -206 , -1119 , -2800 ,
+13340 , 14579 , 9317 , 4636 , 1290 , -97 , 1113 , -792 , -1998 , -3958 , -3763 , -4187 , -6194 , -6888 , -7768 , -8630 ,
+-236 , -1847 , -3948 , -2955 , 848 , 6018 , 7872 , 6895 , 5707 , 2744 , 710 , -1794 , -4003 , -4701 , -5551 , -5758
+};
+#endif
+const float ivas_sns_cdbk_tcx10_stage2[ 32 * 16 ] =
{
0.30615234f, 0.48828125f, -0.02709961f, -0.47680664f, -0.5300293f, -0.25463867f, -0.13305664f, -0.14941406f, -0.14819336f, 0.08666992f, 0.28833008f, 0.27514648f, 0.099365234f, -0.017578125f, 0.033203125f, 0.15893555f,
0.40942383f, -0.044189453f, -0.088378906f, 0.38720703f, 0.5151367f, 0.42236328f, 0.34960938f, 0.2680664f, 0.037597656f, -0.19970703f, -0.31054688f, -0.32617188f, -0.38452148f, -0.38085938f, -0.38598633f, -0.2692871f,
@@ -6208,7 +6622,45 @@ const float ivas_sns_cdbk_tcx10_stage2[ 32 * 16 ] =
-0.20361328f, -0.21557617f, -0.16308594f, -0.041748047f, -0.111083984f, -0.057617188f, 0.0390625f, 0.013183594f, 0.17358398f, 0.74902344f, 0.9448242f, 0.4477539f, -0.09423828f, -0.32739258f, -0.50634766f, -0.6467285f,
};
-const float ivas_sns_cdbk_tcx10_stage3[ 8 * 16 ] =
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx10_stage2_fx[ 32 * 16 ] =
+{
+ 1254 , 2000 , -111 , -1953 , -2171 , -1043 , -545 , -612 , -607 , 355 , 1181 , 1127 , 407 , -72 , 136 , 651 ,
+ 1677 , -181 , -362 , 1586 , 2110 , 1730 , 1432 , 1098 , 154 , -818 , -1272 , -1336 , -1575 , -1560 , -1581 , -1103 ,
+ -657 , -1538 , -1699 , -507 , 1053 , 1212 , 186 , -178 , -469 , -827 , 133 , 2395 , 4402 , 1302 , -1796 , -3012 ,
+ -2950 , 352 , 1493 , 317 , -158 , -83 , 933 , 969 , -252 , -2462 , -2188 , -58 , 1292 , 1447 , 1121 , 226 ,
+ 698 , -549 , -716 , -673 , -616 , -664 , 851 , 3231 , 3395 , 1140 , -408 , -1086 , -1210 , -1305 , -1243 , -845 ,
+ 2743 , 2575 , 2092 , 1507 , 389 , -1102 , -1786 , -2168 , -2057 , -1183 , -331 , 322 , -167 , -615 , -313 , 93 ,
+ -600 , -1922 , -1784 , -461 , 89 , -257 , -435 , -978 , -1404 , -863 , 41 , 1077 , 1513 , 1868 , 2050 , 2065 ,
+ -2614 , -1550 , -493 , 1920 , 2469 , 1658 , 1322 , 891 , 120 , 39 , 375 , 58 , -816 , -1117 , -1258 , -1006 ,
+ 4114 , 141 , -1496 , -667 , -717 , -670 , 81 , 172 , -377 , -514 , -566 , -636 , -562 , -172 , 483 , 1384 ,
+ -1224 , -232 , 927 , 1449 , 1662 , 219 , -1358 , -2391 , -2453 , -568 , 1446 , 1748 , 514 , -215 , 94 , 381 ,
+ -2542 , -2686 , -1605 , -961 , -430 , -99 , 429 , 1125 , 1378 , 1174 , 1221 , 1454 , 908 , 258 , 15 , 360 ,
+ -990 , 1611 , 1860 , -56 , -115 , 132 , -143 , 570 , 2335 , 1232 , -117 , -340 , -953 , -1048 , -1653 , -2325 ,
+ -1043 , 825 , 558 , 90 , 77 , 1451 , 1251 , -180 , -132 , 1996 , 1103 , -2372 , -3534 , -1902 , 879 , 933 ,
+ 413 , -20 , 632 , 2414 , 2389 , 615 , -571 , -1252 , -1630 , -1721 , -1782 , -2012 , -990 , 319 , 1376 , 1819 ,
+ -3559 , -518 , 1547 , 1324 , -401 , -1236 , -464 , 286 , 445 , 417 , 78 , -85 , -106 , 81 , 648 , 1542 ,
+ 175 , 86 , 1305 , 954 , -1355 , -3290 , -3017 , -1397 , 49 , 1139 , 1881 , 2013 , 1238 , 580 , -71 , -289 ,
+ -1374 , 310 , -1225 , -3016 , -2673 , -729 , 1486 , 1715 , 1031 , 429 , 124 , -461 , 110 , 1435 , 1736 , 1102 ,
+ 1452 , 2766 , 1584 , 39 , -167 , 368 , 1002 , 674 , -710 , -1804 , -1906 , -1640 , -1156 , -768 , -151 , 418 ,
+ 1743 , 660 , -478 , -657 , -589 , -842 , -315 , -227 , -806 , -1840 , -1270 , 444 , 2334 , 2275 , 464 , -895 ,
+ -1221 , -2116 , -2089 , -944 , 1010 , 2035 , 1826 , 1844 , 652 , -1037 , -1405 , -1030 , -188 , 323 , 779 , 1560 ,
+ 1345 , 1687 , 1678 , 945 , -1118 , -3020 , -1357 , 854 , 1198 , 98 , -913 , -918 , -434 , -448 , -201 , 605 ,
+ -720 , 1466 , 2918 , 2271 , 1555 , 1037 , 3 , -715 , -816 , -748 , -566 , -552 , -1105 , -1496 , -1558 , -972 ,
+ 769 , -1385 , -1653 , -673 , -1444 , -2353 , -1657 , 161 , 1159 , 991 , 469 , -49 , 638 , 1195 , 1616 , 2213 ,
+ 921 , -1842 , -199 , 2419 , 2210 , -340 , -2057 , -988 , 955 , 653 , -182 , 179 , -79 , -812 , -707 , -130 ,
+ 3529 , 896 , 163 , 98 , -379 , -690 , -478 , 329 , 251 , 506 , 958 , 943 , 23 , -1379 , -2370 , -2398 ,
+ 2120 , 592 , -895 , -1916 , 1168 , 4037 , 176 , -2475 , -1664 , 291 , -325 , -455 , 71 , 89 , -566 , -249 ,
+ 2005 , -2001 , -3131 , -1768 , -336 , 467 , 955 , 603 , 145 , 776 , 1259 , 1064 , 391 , -96 , -317 , -16 ,
+ -458 , 921 , 2 , -1318 , -618 , 1762 , 2872 , 1443 , -494 , -954 , 625 , 807 , -263 , -885 , -1580 , -1861 ,
+ -913 , -1382 , 280 , 380 , 190 , 897 , -146 , 150 , 2509 , 2072 , -1691 , -2832 , -2267 , 665 , 2229 , -140 ,
+ -57 , 1690 , 1163 , -536 , -1436 , -1521 , -1073 , -1169 , -1491 , -1688 , -1247 , -678 , 313 , 1668 , 2955 , 3108 ,
+ -3201 , 226 , 404 , -1437 , -1195 , 554 , 435 , -1440 , -1127 , 652 , 1406 , 1076 , 1635 , 1724 , 858 , -571 ,
+ -834 , -883 , -668 , -171 , -455 , -236 , 160 , 54 , 711 , 3068 , 3870 , 1834 , -386 , -1341 , -2074 , -2649
+};
+#endif
+const float ivas_sns_cdbk_tcx10_stage3[ 8 * 16 ] =
{
0.15209961f, -0.12768555f, 0.09375f, -0.083496094f, -0.25390625f, 0.12524414f, 0.2993164f, -0.09863281f, -0.34814453f, -0.2434082f, -0.11254883f, -0.060058594f, 0.032470703f, 0.15527344f, 0.23413086f, 0.2355957f,
-0.16235352f, -0.111083984f, -0.3173828f, -0.25634766f, 0.13842773f, 0.29858398f, 0.10498047f, 0.11743164f, 0.26611328f, 0.05444336f, -0.1459961f, -0.19238281f, 0.041748047f, 0.2097168f, 0.07421875f, -0.12011719f,
@@ -6220,8 +6672,27 @@ const float ivas_sns_cdbk_tcx10_stage3[ 8 * 16 ] =
-0.1821289f, 0.060058594f, 0.24780273f, 0.41674805f, 0.2890625f, -0.1472168f, -0.20581055f, -0.083984375f, -0.060302734f, -0.19921875f, -0.17651367f, -0.08984375f, 0.011230469f, 0.13110352f, 0.080078125f, -0.09106445f,
};
+#ifdef IVAS_FLOAT_FIXED
+/*Q12*/
+const Word16 ivas_sns_cdbk_tcx10_stage3_fx[ 8 * 16 ] =
+{
+ 623 , -523 , 384 , -342 , -1040 , 513 , 1226 , -404 , -1426 , -997 , -461 , -246 , 133 , 636 , 959 , 965 ,
+ -665 , -455 , -1300 , -1050 , 567 , 1223 , 430 , 481 , 1090 , 223 , -598 , -788 , 171 , 859 , 304 , -492 ,
+ -208 , 605 , -411 , -1315 , -717 , -764 , -1112 , -319 , 15 , -176 , 415 , 1433 , 1263 , 414 , 315 , 561 ,
+ -784 , -124 , 922 , 326 , -1112 , -803 , 1144 , 1435 , 427 , 25 , 268 , 478 , 151 , -534 , -930 , -887 ,
+ 1087 , -853 , -1027 , 490 , 1117 , 729 , -10 , -523 , -934 , 31 , 874 , 798 , 188 , -485 , -729 , -753 ,
+ 1051 , 1010 , 416 , -120 , -588 , -573 , -850 , -806 , 717 , 1704 , 536 , -841 , -665 , 167 , -153 , -1004 ,
+ -357 , 94 , 2 , 303 , 589 , 278 , 15 , 480 , 358 , 5 , -311 , -465 , -1287 , -1594 , -94 , 1984 ,
+ -746 , 246 , 1015 , 1707 , 1184 , -603 , -843 , -344 , -247 , -816 , -723 , -368 , 46 , 537 , 328 , -373
+};
+#endif
+
const float *const ivas_sns_cdbks_tcx10[SNS_MSVQ_NSTAGES_TCX10] = { ivas_sns_cdbk_tcx10_stage1, ivas_sns_cdbk_tcx10_stage2, ivas_sns_cdbk_tcx10_stage3};
+#ifdef IVAS_FLOAT_FIXED
+const Word16 *const ivas_sns_cdbks_tcx10_fx[SNS_MSVQ_NSTAGES_TCX10] = { ivas_sns_cdbk_tcx10_stage1_fx, ivas_sns_cdbk_tcx10_stage2_fx, ivas_sns_cdbk_tcx10_stage3_fx};
+#endif
+
const int16_t ivas_sns_cdbks_side_tcx20_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 32 };
const int16_t ivas_sns_cdbks_side_tcx20_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 5 };
const int16_t ivas_sns_cdbks_side_tcx10_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 8 };
@@ -6263,6 +6734,44 @@ const float ivas_sns_cdbks_side_tcx20_stage1[ 32 * 16 ] =
-0.19580078f, -0.14624023f, -0.11303711f, -0.055908203f, -0.052001953f, -0.009033203f, 0.022949219f, -0.0068359375f, -0.032470703f, 0.0017089844f, 0.045410156f, 0.025146484f, 0.039794922f, 0.07543945f, 0.1574707f, 0.24267578f,
};
+#ifdef IVAS_FLOAT_FIXED
+/*Q15*/
+const Word16 ivas_sns_cdbks_side_tcx20_stage1_fx[ 32 * 16 ] =
+{
+ -3728 , -2160 , 1376 , 1464 , 5856 , -904 , -10680 , -6904 , -1608 , 416 , 424 , 496 , 2688 , 4152 , 4160 , 4952 ,
+ -560 , 3056 , 7720 , 7344 , 3520 , 1648 , 1304 , -240 , -1584 , -2856 , -2792 , -3952 , -3656 , -3480 , -2920 , -2560 ,
+ -8728 , 8968 , 14888 , 5968 , 21344 , 5920 , 4776 , -264 , 8624 , -1504 , -17040 , -5336 , 1256 , -10424 , -14160 , -14288 ,
+ -1448 , -3424 , -3008 , -3480 , -3088 , 3056 , 8840 , 5432 , 2032 , 360 , 712 , -784 , -1200 , -1288 , -1424 , -1288 ,
+ 13432 , 2072 , -720 , -472 , -456 , -608 , -1712 , -1696 , -1040 , -1144 , -904 , -1920 , -1488 , -1384 , -1248 , -704 ,
+ 80 , 1008 , 664 , 448 , -296 , 424 , 312 , -992 , -1584 , -728 , 392 , -568 , -376 , -24 , 392 , 840 ,
+ 5688 , 7336 , 6456 , -624 , -9016 , -17624 , -10056 , -1160 , 24 , -1624 , 2464 , 1712 , 4152 , 5344 , 3976 , 2960 ,
+ -10488 , -9544 , -8104 , -5832 , -4608 , -3472 , -4152 , -3560 , -2824 , -2432 , 1000 , 5216 , 8184 , 10328 , 13400 , 16880 ,
+ -16272 , -1104 , 2744 , 1400 , 1136 , 1768 , 1136 , 776 , 1232 , 1040 , 928 , 8 , 936 , 1008 , 1448 , 1816 ,
+ -1328 , 736 , 320 , 1208 , 1824 , 1536 , 1064 , 2656 , 3136 , 1408 , -288 , -2120 , -1880 , -1544 , -3200 , -3528 ,
+ 8896 , 12112 , 13000 , 12592 , 9880 , 7096 , 5096 , 3976 , -264 , -4192 , -7528 , -12816 , -14632 , -15344 , -11792 , -6072 ,
+ -10376 , -9040 , -7304 , -6064 , -5168 , -3880 , -1520 , 1064 , 3592 , 5512 , 6664 , 5456 , 6560 , 6544 , 4664 , 3288 ,
+ -920 , -896 , -2184 , -3256 , -3448 , -3456 , -1864 , 568 , 2016 , 2568 , 2880 , 1688 , 1776 , 1696 , 1400 , 1440 ,
+ -4720 , -10120 , -2584 , 1744 , 2104 , 1056 , 1888 , 1904 , 1680 , 1368 , 1768 , 496 , 944 , 1104 , 768 , 608 ,
+ 16256 , 14832 , 9552 , 5128 , 1712 , 576 , -1640 , -2176 , -3552 , -4936 , -5616 , -6728 , -6040 , -5752 , -6296 , -5320 ,
+ -184 , -1008 , -3024 , -4136 , -5216 , -3936 , -3624 , -4376 , -4232 , -3232 , 576 , 4216 , 7160 , 8144 , 6144 , 6728 ,
+ -368 , -2000 , -1056 , 5944 , 2240 , -4560 , -3328 , 56 , -152 , 320 , 1032 , -224 , 144 , 784 , 568 , 592 ,
+ -1480 , -1800 , -1408 , 1760 , 6952 , 8256 , 2920 , -1120 , -1624 , -2040 , -2016 , -2568 , -1720 , -1448 , -1512 , -1160 ,
+ 2664 , 6728 , 1408 , 3608 , 12192 , 14000 , 10448 , 6336 , 512 , -5864 , -6624 , -12560 , -8152 , -6744 , -8048 , -9928 ,
+ -13144 , -6696 , -1600 , 616 , -2632 , 528 , 4400 , 8960 , 11480 , 11720 , 6280 , -1864 , -3816 , -5160 , -4912 , -4168 ,
+ 9056 , 9144 , 7344 , 1176 , -3360 , -2016 , -2800 , -6504 , -8400 , -7448 , -6560 , -4112 , -88 , 2680 , 4856 , 7016 ,
+ -3744 , -2248 , 8016 , -104 , -1416 , -1088 , 800 , -120 , -736 , 56 , 608 , -488 , -336 , 72 , 224 , 504 ,
+ 2632 , 7816 , 5536 , 952 , -1432 , -3464 , -2552 , -1216 , -208 , -848 , -1208 , -2080 , -1416 , -1040 , -1064 , -408 ,
+ -2368 , -5768 , -9744 , -11552 , -11408 , -8432 , -6872 , -6064 , -3680 , -1736 , 3160 , 10064 , 12880 , 18576 , 13312 , 9632 ,
+ -7928 , -3608 , -1672 , 1288 , -2016 , -608 , 360 , 1408 , -7064 , -632 , 304 , 1576 , 8632 , 12056 , 4336 , -6424 ,
+ 5312 , 5368 , 4720 , 3544 , 2936 , 3752 , 3848 , 3816 , 4296 , 3704 , 696 , -5192 , -6936 , -8968 , -11080 , -9816 ,
+ -4792 , 2248 , 8104 , 12752 , 10440 , 8984 , 6280 , 4520 , 2280 , -616 , -3800 , -9336 , -11736 , -12464 , -8504 , -4352 ,
+ -21240 , -19008 , -5088 , -2328 , -2720 , 320 , 3480 , 3464 , 4584 , 4256 , 5712 , 6032 , 3072 , 4104 , 6776 , 8592 ,
+ 2568 , 5384 , -472 , -6848 , -2944 , 1408 , 2200 , 248 , -1216 , -960 , -656 , -1040 , 120 , 528 , 504 , 1176 ,
+ -776 , -4680 , -12008 , -3696 , 1384 , 4616 , 1360 , 304 , 1304 , 1816 , 2016 , 1336 , 1840 , 2104 , 1720 , 1360 ,
+ 7576 , 7056 , 5488 , 5128 , 4136 , 3440 , 2848 , 656 , -1136 , -4208 , -6088 , -9664 , -8864 , -5648 , -2272 , 1552 ,
+ -6416 , -4792 , -3704 , -1832 , -1704 , -296 , 752 , -224 , -1064 , 56 , 1488 , 824 , 1304 , 2472 , 5160 , 7952
+};
+#endif
const float ivas_sns_cdbks_side_tcx20_stage2[ 32 * 16 ] =
{
-0.013916016f, 0.0007324219f, 0.017089844f, 0.005859375f, 0.056152344f, -0.08178711f, -0.2927246f, 0.00390625f, 0.140625f, 0.03881836f, 0.010498047f, 0.038330078f, 0.042236328f, 0.020751953f, 0.005859375f, 0.0075683594f,
@@ -6299,8 +6808,51 @@ const float ivas_sns_cdbks_side_tcx20_stage2[ 32 * 16 ] =
0.0847168f, 0.18920898f, -0.1796875f, -0.01586914f, -0.017822266f, -0.021728516f, 0.006591797f, -0.0075683594f, -0.019042969f, -0.0107421875f, -0.0146484375f, 0.014160156f, 0.0034179688f, -0.0056152344f, -0.0036621094f, -0.0017089844f,
};
+#ifdef IVAS_FLOAT_FIXED
+/*Q15*/
+const Word16 ivas_sns_cdbks_side_tcx20_stage2_fx[ 32 * 16 ] =
+{
+ -456 , 24 , 560 , 192 , 1840 , -2680 , -9592 , 128 , 4608 , 1272 , 344 , 1256 , 1384 , 680 , 192 , 248 ,
+ -2328 , -3360 , 1248 , 3000 , 3896 , 4416 , 1664 , -3648 , -4536 , -6792 , -8432 , -4936 , 1064 , 2664 , 5760 , 10312 ,
+ 2344 , 952 , 640 , 264 , 768 , 680 , 1056 , 720 , 1136 , 584 , -1240 , -4600 , -7104 , -3616 , 1888 , 5520 ,
+ -3544 , -896 , -2704 , -2696 , -2592 , 1632 , 3360 , 7824 , 8416 , 1040 , -5184 , -4800 , -264 , -16 , -472 , 896 ,
+ -744 , 920 , 4624 , -2216 , -2408 , 5328 , -240 , -2152 , -936 , -352 , -784 , 416 , -192 , -216 , -464 , -592 ,
+ -3192 , -3016 , -2016 , -392 , 216 , 1368 , 272 , -576 , -2792 , -4120 , -2064 , 4488 , 8256 , 5024 , 64 , -1528 ,
+ -6632 , 8864 , 1944 , 136 , 728 , -320 , -872 , -896 , -1072 , -552 , -848 , -48 , -248 , -312 , 152 , -32 ,
+ 2112 , -8752 , 4024 , 840 , -208 , 144 , 280 , -56 , 200 , -232 , -616 , 392 , 280 , 328 , 664 , 600 ,
+ -24 , -1232 , -1192 , -512 , 184 , -184 , -96 , 1072 , 1560 , 624 , -344 , 576 , 416 , 144 , -440 , -552 ,
+ 2272 , 1736 , 2000 , 4384 , 4400 , 176 , -3256 , -6008 , -7160 , -2736 , 664 , 1928 , 440 , 376 , 640 , 136 ,
+ 120 , -1656 , -168 , 6256 , -6160 , -1792 , 16 , -712 , -64 , 56 , 136 , 816 , 728 , 904 , 888 , 632 ,
+ 808 , -136 , -872 , -2816 , -2072 , -2248 , -2456 , -1640 , -2000 , -200 , 1848 , 2896 , 1928 , 2208 , 2544 , 2208 ,
+ 4488 , 2784 , 2328 , 1536 , 808 , 160 , -352 , -216 , 464 , -240 , -1360 , -888 , -1360 , -1992 , -3040 , -3120 ,
+ -5496 , 2184 , 5968 , 2424 , -656 , 1816 , 1280 , -3936 , -3536 , 4040 , 12432 , 1072 , -5288 , -4992 , -3456 , -3848 ,
+ -432 , -368 , -1224 , 88 , -1520 , -8008 , 3272 , 3624 , 280 , 336 , 432 , 1264 , 544 , 488 , 632 , 592 ,
+ 1448 , 2544 , -1144 , -6016 , 5152 , 2008 , -968 , -616 , -784 , 24 , -344 , 288 , -184 , -304 , -488 , -616 ,
+ 4488 , 368 , -1096 , -568 , -2544 , -4016 , -2504 , -568 , 4672 , 6984 , 4776 , 1056 , -2744 , -3944 , -2496 , -1880 ,
+ 968 , -4008 , -8112 , 3112 , 6192 , 856 , 424 , 984 , 296 , -304 , -840 , 288 , -80 , -56 , 288 , -8 ,
+ -1264 , -1272 , -2912 , -2256 , 728 , 3352 , 4208 , 2752 , 2152 , 2680 , 2488 , 1312 , -1568 , -3096 , -3392 , -3904 ,
+ 304 , 1536 , 2680 , 1232 , 208 , -1256 , -384 , 9248 , 912 , -8256 , -4200 , 520 , 376 , -472 , -1448 , -1008 ,
+ 2088 , 4072 , 3128 , -4384 , -8616 , -2072 , 1088 , 2160 , 1592 , 864 , 192 , 648 , -96 , -192 , -24 , -432 ,
+ -552 , -1712 , -1880 , 264 , -384 , -2256 , -2816 , -536 , -400 , 1536 , 5952 , 8824 , 4416 , -800 , -4176 , -5480 ,
+ -720 , -1768 , -744 , -16 , 2360 , 2736 , 1856 , -488 , 928 , 3080 , 2008 , -15984 , -608 , 5080 , 1920 , 352 ,
+ 12608 , -1616 , -2600 , -824 , -760 , -680 , 880 , -16 , -1720 , -1112 , -1520 , -352 , -592 , -728 , -528 , -440 ,
+ -7816 , -2128 , -592 , -112 , 1320 , 632 , 600 , 1008 , 984 , 936 , 336 , 1216 , 704 , 1144 , 1152 , 616 ,
+ 1264 , 944 , 848 , 1416 , 1144 , -720 , -1136 , -640 , -776 , -3120 , -4552 , -1072 , 448 , 1928 , 2120 , 1896 ,
+ -488 , 488 , 416 , 1488 , 240 , 2720 , 5832 , 1008 , -3848 , -2352 , -1576 , -232 , -528 , -800 , -1088 , -1272 ,
+ 2264 , -1608 , -7672 , -10576 , -5000 , -928 , 1928 , 1832 , 2824 , 2688 , 1712 , 1792 , 728 , 2584 , 4280 , 3144 ,
+ -4408 , -880 , 3512 , 5256 , 4360 , 1432 , 288 , 656 , 1312 , 576 , -984 , -816 , -2224 , -2840 , -2504 , -2744 ,
+ -640 , -1960 , -2008 , 264 , 1048 , 2688 , -1480 , -8376 , -904 , 3448 , 2056 , 1536 , 952 , 1040 , 1392 , 936 ,
+ -1640 , 2768 , 8904 , 1744 , -2096 , -4256 , -2392 , -1696 , -1200 , -48 , -32 , 712 , 296 , -24 , -432 , -608 ,
+ 2776 , 6200 , -5888 , -520 , -584 , -712 , 216 , -248 , -624 , -352 , -480 , 464 , 112 , -184 , -120 , -56
+};
+#endif
const float *const ivas_sns_cdbks_side_tcx20[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx20_stage1, ivas_sns_cdbks_side_tcx20_stage2 };
+#ifdef IVAS_FLOAT_FIXED
+/*Q15*/
+const Word16 *const ivas_sns_cdbks_side_tcx20_fx[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx20_stage1_fx, ivas_sns_cdbks_side_tcx20_stage2_fx };
+#endif
+
const float ivas_sns_cdbks_side_tcx10_stage1[ 32 * 16 ] =
{
-0.23950195f, -0.203125f, -0.17822266f, -0.1315918f, -0.123291016f, -0.095947266f, -0.106933594f, -0.16552734f, -0.14941406f, -0.075683594f, 0.026367188f, 0.1015625f, 0.17041016f, 0.2770996f, 0.37890625f, 0.5148926f,
@@ -6338,6 +6890,45 @@ const float ivas_sns_cdbks_side_tcx10_stage1[ 32 * 16 ] =
}
;
+#ifdef IVAS_FLOAT_FIXED
+/*Q15*/
+const Word16 ivas_sns_cdbks_side_tcx10_stage1_fx[ 32 * 16 ] =
+{
+
+ -7848 , -6656 , -5840 , -4312 , -4040 , -3144 , -3504 , -5424 , -4896 , -2480 , 864 , 3328 , 5584 , 9080 , 12416 , 16872 ,
+ 4224 , 6824 , 7512 , 9824 , 7952 , 4744 , 2576 , 808 , -2496 , -6040 , -8736 , -10896 , -9040 , -4576 , -1000 , -1680 ,
+ -4640 , -4360 , -3664 , -1224 , -1248 , 1688 , 2408 , 240 , 1472 , -768 , -4040 , -384 , 9208 , 7928 , 2304 , -4904 ,
+ 1752 , 4024 , 4568 , 3272 , 2560 , 608 , 1128 , 3400 , 2144 , -992 , -3240 , -3264 , -1968 , -3920 , -5976 , -4080 ,
+ -1424 , -1096 , -2184 , -2136 , -1600 , -3816 , -6736 , -6640 , -5104 , -32 , 3400 , 6944 , 8000 , 4760 , 3232 , 4416 ,
+ 1904 , 7392 , 3336 , -2824 , -2448 , 1712 , 1720 , -1384 , -2312 , -1216 , -792 , -1032 , -1048 , -1328 , -1248 , -432 ,
+ 656 , -1096 , -4768 , -13792 , -6424 , 1248 , 872 , 536 , 1256 , 1896 , 2216 , 2648 , 2992 , 3336 , 3928 , 4496 ,
+ 4480 , 10016 , 15456 , 17952 , 13048 , 8872 , 5768 , 3016 , -432 , -5624 , -10376 , -13808 , -17456 , -15040 , -8984 , -6896 ,
+ -12776 , -12320 , -12112 , -9552 , -8552 , -6528 , -4960 , -2968 , -1336 , 4376 , 9872 , 12640 , 13320 , 10192 , 9832 , 10872 ,
+ 11504 , 17136 , 13720 , 4704 , -1232 , -4304 , -6024 , -5920 , -5168 , -5728 , -5584 , -4984 , -2704 , -2168 , -2112 , -1136 ,
+ -21904 , -10168 , -7024 , -3928 , -3384 , 2632 , 7144 , 6840 , 3328 , 1080 , -1440 , 2560 , 2400 , 2544 , 6792 , 12520 ,
+ -5624 , -3840 , -1144 , 1976 , 5928 , 11032 , 12960 , 8904 , 4208 , -1208 , -5624 , -6976 , -6816 , -5680 , -4096 , -4008 ,
+ -6144 , -13096 , -584 , 3296 , 1888 , 928 , 1800 , 1400 , 1360 , 1536 , 1368 , 1792 , 2032 , 1032 , 440 , 936 ,
+ 11408 , 7680 , -1800 , -5968 , -9432 , -10216 , -9208 , -6496 , -5136 , -2704 , 992 , 4472 , 7248 , 6808 , 5392 , 6960 ,
+ -1896 , -3464 , 2944 , 9976 , 6208 , 4840 , 2976 , -688 , -1752 , -1456 , -2336 , -2912 , -2616 , -2816 , -3208 , -3800 ,
+ 5776 , 8536 , 7128 , 6888 , 6600 , 9088 , 7080 , -40 , -360 , -3832 , -7640 , -5192 , -2648 , -2912 , -11704 , -16760 ,
+ -12496 , -15912 , -11792 , -5288 , -856 , 296 , -416 , 1320 , 3128 , 5064 , 5352 , 6272 , 6928 , 6656 , 5896 , 5848 ,
+ 1912 , 2064 , 1344 , 1048 , 2592 , 2200 , -944 , -1656 , -816 , -5840 , -10576 , -5456 , -176 , 1808 , 3912 , 8560 ,
+ 1568 , -1384 , -7912 , -1256 , 1728 , 2248 , 1904 , 392 , -456 , -360 , 656 , 904 , 1016 , 760 , 464 , -264 ,
+ -120 , 48 , 448 , 0 , 696 , 1096 , 488 , 152 , 1864 , 4400 , 2848 , -168 , -2384 , -3120 , -3592 , -2656 ,
+ -5232 , -3632 , -4264 , -2352 , -2128 , -1848 , -1512 , -400 , 1592 , 1208 , -16 , -800 , -424 , 3016 , 7024 , 9784 ,
+ 18344 , 5184 , -408 , -1416 , -1904 , -488 , -704 , -1256 , -1104 , -1232 , -2264 , -2504 , -2088 , -2120 , -2776 , -3272 ,
+ -1304 , -1072 , -992 , -1688 , -1168 , -1344 , -1280 , 584 , 1688 , 456 , -1464 , -2000 , -400 , 2392 , 4040 , 3568 ,
+ 14784 , 15304 , 12752 , 7616 , 5384 , 5928 , 6856 , 1112 , -4496 , -9040 , -13088 , -12584 , -10176 , -9328 , -9488 , -1528 ,
+ -2888 , -7528 , -13744 , -16216 , -13232 , -9088 , -7384 , -4312 , -1464 , 3944 , 8176 , 10192 , 17080 , 15872 , 10728 , 9872 ,
+ 10880 , 9704 , 5888 , 2192 , 3280 , 4544 , 1144 , -1072 , -3952 , -6872 , -9712 , -6848 , -2696 , -5512 , -5248 , 4304 ,
+ -14480 , 576 , 2424 , 1096 , 1448 , 1544 , 992 , 1336 , 1344 , 752 , 152 , 616 , 936 , 616 , -16 , 680 ,
+ -12000 , -7664 , -2680 , -496 , -1608 , 2592 , 7576 , 9280 , 12576 , 9576 , 3256 , -288 , -3216 , -5392 , -6208 , -5304 ,
+ -5584 , -6016 , -6232 , -5184 , -6632 , -7168 , -4296 , 328 , 3936 , 8224 , 8200 , 6736 , 4760 , 4576 , 3400 , 952 ,
+ 2288 , 2368 , 5984 , 832 , -8112 , -9376 , -3656 , -1216 , 120 , 1048 , 1440 , 1880 , 2560 , 2360 , 936 , 536 ,
+ 2568 , 4440 , 5712 , 5072 , 4120 , -312 , -4944 , -6440 , -6424 , -3376 , -1504 , -856 , 664 , 784 , 432 , 48 ,
+ 8304 , 7392 , 7344 , 5608 , 5952 , 5536 , 5408 , 6632 , 5584 , 848 , -5448 , -7904 , -10480 , -13136 , -12536 , -9104
+};
+#endif
const float ivas_sns_cdbks_side_tcx10_stage2[ 8 * 16 ] =
{
-0.13989258f, -0.024658203f, 0.12670898f, 0.027832031f, 0.06689453f, 0.12817383f, 0.07495117f, -0.01977539f, -0.05834961f, -0.07543945f, -0.06542969f, -0.0546875f, -0.04345703f, -0.0063476562f, 0.034179688f, 0.029541016f,
@@ -6350,8 +6941,25 @@ const float ivas_sns_cdbks_side_tcx10_stage2[ 8 * 16 ] =
0.20898438f, -0.011230469f, -0.08496094f, -0.010986328f, 0.032958984f, -0.013183594f, -0.057861328f, -0.07104492f, -0.06689453f, -0.056396484f, -0.047851562f, -0.03491211f, -0.011962891f, 0.032714844f, 0.08178711f, 0.11035156f,
};
+#ifdef IVAS_FLOAT_FIXED
+/*Q15*/
+const Word16 ivas_sns_cdbks_side_tcx10_stage2_fx[ 8 * 16 ] =
+{
+ -4584 , -808 , 4152 , 912 , 2192 , 4200 , 2456 , -648 , -1912 , -2472 , -2144 , -1792 , -1424 , -208 , 1120 , 968 ,
+ -2200 , -3752 , -3208 , -2992 , -3992 , -328 , 3600 , 3784 , 1968 , 1248 , 672 , 568 , 792 , 928 , 1256 , 1656 ,
+ 1808 , 1000 , 1280 , 1904 , 704 , 1064 , 1312 , -288 , -1832 , -784 , 1216 , 2080 , 888 , -2416 , -4176 , -3776 ,
+ 3672 , 6576 , 1488 , -3552 , -4648 , -2792 , -1064 , 1112 , 1448 , 216 , -408 , -608 , -440 , -344 , -256 , -400 ,
+ -1368 , -2416 , -4856 , 696 , 5248 , 3904 , 1832 , 2648 , 4112 , 1776 , -1008 , -1336 , -1976 , -2336 , -2544 , -2376 ,
+ -2440 , -1352 , -1328 , -2248 , -1384 , -1264 , -1680 , -2912 , -1816 , 1208 , 2960 , 2192 , 2920 , 4296 , 2664 , 176 ,
+ -1736 , 1104 , 5248 , 5632 , 808 , -4352 , -4568 , -1376 , 224 , 664 , 280 , 48 , -376 , -992 , -736 , 128 ,
+ 6848 , -368 , -2784 , -360 , 1080 , -432 , -1896 , -2328 , -2192 , -1848 , -1568 , -1144 , -392 , 1072 , 2680 , 3616
+};
+#endif
const float *const ivas_sns_cdbks_side_tcx10[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx10_stage1, ivas_sns_cdbks_side_tcx10_stage2 };
+#ifdef IVAS_FLOAT_FIXED
+const Word16 *const ivas_sns_cdbks_side_tcx10_fx[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx10_stage1_fx, ivas_sns_cdbks_side_tcx10_stage2_fx };
+#endif
const int16_t sns_1st_cdbk[2][2][8 * 32] =
{
{ /* split 1 */
diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h
index f9fb4e57a9d585f92a97508016e6851a3d560f01..90e244bc55f579ba95e52dda1319e34f5bfb3d04 100644
--- a/lib_com/ivas_rom_com.h
+++ b/lib_com/ivas_rom_com.h
@@ -446,6 +446,10 @@ extern const int16_t ivas_sns_cdbks_tcx10_bits[];
extern const float *const ivas_sns_cdbks_tcx20[];
extern const float *const ivas_sns_cdbks_tcx10[];
+#ifdef IVAS_FLOAT_FIXED
+extern const Word16 *const ivas_sns_cdbks_tcx20_fx[];
+extern const Word16 *const ivas_sns_cdbks_tcx10_fx[];
+#endif
extern const int16_t ivas_sns_cdbks_side_tcx20_levels[];
extern const int16_t ivas_sns_cdbks_side_tcx20_bits[];
@@ -454,6 +458,10 @@ extern const int16_t ivas_sns_cdbks_side_tcx10_bits[];
extern const float *const ivas_sns_cdbks_side_tcx20[];
extern const float *const ivas_sns_cdbks_side_tcx10[];
+#ifdef IVAS_FLOAT_FIXED
+extern const Word16 *const ivas_sns_cdbks_side_tcx20_fx[];
+extern const Word16 *const ivas_sns_cdbks_side_tcx10_fx[];
+#endif
/* means and codebooks for the split VQ in the 2-stage SNS VQ */
extern const int16_t sns_1st_cdbk[2][2][8 * 32];
diff --git a/lib_com/lsf_tools.c b/lib_com/lsf_tools.c
index 7ed448a6622560123ea11518bacc014ae08ca6c7..cba26dbc4cb6dc0d006066bc9b3c9a7d81427c3e 100644
--- a/lib_com/lsf_tools.c
+++ b/lib_com/lsf_tools.c
@@ -42,6 +42,9 @@
#include "rom_com.h"
#include "basop_proto_func.h"
#include "wmc_auto.h"
+#ifdef IVAS_FLOAT_FIXED
+#include "prot_fx1.h"
+#endif
/*-------------------------------------------------------------------*
* Local function prototypes
@@ -2064,7 +2067,78 @@ void dec_FDCNG_MSVQ_stage1(
return;
}
+#ifdef IVAS_FLOAT_FIXED
+void dec_FDCNG_MSVQ_stage1_fx(
+ Word16 j_full, /* i : index full range */
+ Word16 n, /* i : dimension to generate */
+ const Word32 *invTrfMatrix, /* i : IDCT matrix for synthesis */
+ const DCTTYPE idcttype, /* i : specify which IDCT */
+ Word32 *uq, /* o : synthesized stage1 vector */
+ Word16 *uq_ind /* o : synthesized stage1 vector in BASOP */
+)
+{
+ Word16 col, segm_ind, j;
+ Word32 dct_vec[FDCNG_VQ_MAX_LEN];
+ const Word8 *cbpW8;
+ const Word16 *dct_col_shift_tab;
+ Word32 dct_vec_fx[FDCNG_VQ_MAX_LEN];
+ Word32 idct_vec_fx[FDCNG_VQ_MAX_LEN];
+ assert( n <= FDCNG_VQ_MAX_LEN );
+ assert( n >= FDCNG_VQ_DCT_MINTRUNC );
+
+ segm_ind = 0;
+ for ( col = 1; col <= FDCNG_VQ_DCT_NSEGM; col++ )
+ {
+ if ( j_full >= cdk1_ivas_cum_entries_per_segment[col] )
+ {
+ segm_ind++;
+ }
+ }
+
+ j = j_full - cdk1_ivas_cum_entries_per_segment[segm_ind]; /* j is the local segment index */
+
+
+ /* Word8 column variable Qx storage*/
+ cbpW8 = cdk_37bits_ivas_stage1_W8Qx_dct_sections[segm_ind]; /* Word8 storage fixed ptr_init */
+ cbpW8 += j * cdk1_ivas_cols_per_segment[segm_ind]; /* adaptive ptr init */
+ dct_col_shift_tab = stage1_dct_col_syn_shift[segm_ind];
+
+ for ( col = 0; col < cdk1_ivas_cols_per_segment[segm_ind]; col++ )
+ {
+ dct_vec[col] = shl( (Word16) cbpW8[col], dct_col_shift_tab[col] );
+ /* LOGIC( 1 ) , SHIFT( 1 );
+ in BASOP: s_and(for W8->W16), shl()
+ */
+ }
+ assert( j < cdk1_ivas_entries_per_segment[segm_ind] );
+
+ Word16 norm = 20;
+
+ for ( int i = 0; i < cdk1_ivas_cols_per_segment[segm_ind]; i++ )
+ {
+ dct_vec_fx[i] = L_shl( dct_vec[i], norm );
+ }
+
+ dctT2_N_apply_matrix_fx( (const Word32 *) dct_vec_fx, idct_vec_fx, cdk1_ivas_cols_per_segment[segm_ind], n, invTrfMatrix, FDCNG_VQ_DCT_MAXTRUNC, idcttype );
+
+
+ /*scale down to original fdcngvq domain and move to Q0 */
+ /* fdcng_dct_scaleF[1] --> Q15 conversion --> 860 */
+ // v_multc_att32( idct_vec_fx, 860, idct_vec_fx, n );
+ for ( int i = 0; i < n; i++ )
+ idct_vec_fx[i] = Mpy_32_32( idct_vec_fx[i], 56410112 ); /* norm + 31 - 31 = norm*/
+ /* fdcng_dct_scaleF[1] --> 0.0625-->scale down from search Q4 domain to Q0 ,
+ not really relevant for BASOP loop */
+
+ /*add common mid fdcng vector, in fdcng bands domain */
+ for ( int i = 0; i < n; i++ )
+ uq[i] = L_add( idct_vec_fx[i], L_lshl( cdk1r_tr_midQ_truncQ_fx[i], norm - 10 ) ); // making the Q factors equal
+ assert( uq_ind == NULL );
+
+ return;
+}
+#endif
/*--------------------------------------------------------------------------*
* msvq_dec()
*
@@ -2126,6 +2200,10 @@ void msvq_dec_float(
else
{
v_add( uq + start, cb[i] + Idx[i] * maxn, uq + start, n );
+ /*for ( int i = 0; i < n; i++ )
+ {
+ printf( "%f\n", uq[start + i] );
+ }*/
}
#define WMC_TOOL_SKIP
@@ -2143,7 +2221,126 @@ void msvq_dec_float(
return;
}
+#ifdef IVAS_FLOAT_FIXED
+static Word16 find_guarded_bits_fx( Word32 n );
+
+static Word16 find_guarded_bits_fx( Word32 n )
+{
+ return n <= 1 ? 0 : n <= 2 ? 1
+ : n <= 4 ? 2
+ : n <= 8 ? 3
+ : n <= 16 ? 4
+ : n <= 32 ? 5
+ : n <= 64 ? 6
+ : n <= 128 ? 7
+ : n <= 256 ? 8
+ : n <= 512 ? 9
+ : n <= 1024 ? 10
+ : 11;
+}
+
+void msvq_dec_fx(
+ const Word16 *const *cb, /* i : Codebook (indexed cb[*stages][levels][p]) */
+ const Word16 dims[], /* i : Dimension of each codebook stage (NULL: full dim.) */
+ const Word16 offs[], /* i : Starting dimension of each codebook stage (NULL: 0) */
+ const Word16 stages, /* i : Number of stages */
+ const Word16 N, /* i : Vector dimension */
+ const Word16 maxN, /* i : Codebook dimension */
+ const Word16 Idx[], /* i : Indices */
+ const Word16 applyIDCT_flag, /* i : applyIDCT flag */
+ const Word32 *invTrfMatrix, /* i : matrix for IDCT synthesis */
+ Word32 *uq, /* o : quantized vector */
+ Word16 *uq_ind, /* o : quantized vector (fixed point) */
+ Word16 exp )
+{
+ Word16 i, n, maxn, start;
+ Word16 j, max_size = 0;
+
+ FOR( i = 0; i < stages; i++ )
+ {
+ IF( dims )
+ {
+ IF( max_size < dims[i] )
+ max_size = dims[i];
+ }
+
+ ELSE
+ {
+ max_size = N;
+ }
+ }
+
+ set32_fx( uq, 0, N );
+ IF( uq_ind )
+ {
+ FOR( i = 0; i < N; ++i )
+ {
+ uq_ind[i] = 0;
+ move16();
+ }
+ }
+
+ FOR( i = 0; i < stages; i++ )
+ {
+ IF( dims )
+ {
+ n = dims[i];
+ maxn = n;
+ }
+ ELSE
+ {
+ n = N;
+ maxn = maxN;
+ }
+ IF( offs )
+ {
+ start = offs[i];
+ }
+ ELSE
+ {
+ start = 0;
+ }
+
+ Word16 guard_bits = find_guarded_bits_fx( max_size );
+ if ( i == 0 )
+ {
+ FOR( Word16 k = 0; k < N; k++ )
+ {
+ uq[k] = L_shr( uq[k], guard_bits );
+ }
+
+ }
+
+ IF( i == 0 && applyIDCT_flag != 0 )
+ {
+ assert( start == 0 );
+ dec_FDCNG_MSVQ_stage1_fx( Idx[0], N, invTrfMatrix, IDCT_T2_XX_24, uq, uq_ind ); /* IDCT_T2 N=24 used for all synthesis */
+ }
+ ELSE
+ {
+ // v_add( uq + start, cb[i] + Idx[i] * maxn, uq + start, n );
+ FOR( Word16 k = 0; k < n; k++ )
+ {
+ uq[start + k] = L_add( uq[start + k], L_lshl( cb[i][Idx[i] * maxn + k], 20 - exp - guard_bits ) );
+ }
+ }
+
+#define WMC_TOOL_SKIP
+ IF( uq_ind != NULL )
+ {
+ FOR( j = 0; j < n; ++j )
+ {
+ move16();
+ uq_ind[start + j] = add( uq_ind[start + j], (Word16) ( mult( cb[i][Idx[i] * maxn + j], 20971 ), ( 13 + exp ) - 15 ) );
+ }
+ }
+#undef WMC_TOOL_SKIP
+ }
+
+ return;
+}
+#endif
/*--------------------------------------------------------------------------*
* spec2isf()
*
@@ -2484,7 +2681,78 @@ void dctT2_N_apply_matrix(
return;
}
+#ifdef IVAS_FLOAT_FIXED
+void dctT2_N_apply_matrix_fx(
+ const Word32 *input, /* i : input in fdcng or DCT(fdcng) domain */
+ Word32 *output, /* o : output in DCT(fdcng) or fdcng ordomain */
+ const Word16 dct_dim, /* i : dct processing dim possibly truncated */
+ const Word16 fdcngvq_dim, /* i : fdcng domain length */
+ const Word32 *matrix, /* i : IDCT matrix */
+ const Word16 matrix_row_dim, /* i : */
+ const DCTTYPE dcttype /* i : matrix operation type */
+)
+{
+ Word16 i, j, dim_in, dim_out;
+ Word16 mat_step_col, mat_step_row, mat_step_col_flag;
+ const Word32 *pt_x, *pt_A;
+ Word32 tmp_y[FDCNG_VQ_MAX_LEN];
+ Word32 *pt_y;
+
+ /* non-square DCT_N and IDCT_N matrix application,
+ using a stored format of an IDCT_Nx(FDCNG_VQ_DCT_MAXTRUNC) matrix */
+ /* efficiently parallelized in SIMD */
+
+ assert( dct_dim <= FDCNG_VQ_DCT_MAXTRUNC );
+ assert( fdcngvq_dim <= FDCNG_VQ_MAX_LEN );
+
+ if ( ( dcttype & 1 ) == 0 ) /* even entries are DCTs */
+ {
+ /* DCT_typeII 24,21 -> XX in worst case */
+ dim_in = fdcngvq_dim;
+ dim_out = dct_dim;
+ mat_step_col = matrix_row_dim; /* matrix maximum storage size dependent, width of first row in matrix */
+ mat_step_row = 0;
+ mat_step_col_flag = 1;
+ assert( dcttype == DCT_T2_21_XX || dcttype == DCT_T2_24_XX );
+ }
+ else
+ {
+ assert( ( dcttype & 1 ) != 0 ); /* idct */
+ dim_in = dct_dim;
+ dim_out = fdcngvq_dim;
+ mat_step_col = 1;
+ mat_step_row = matrix_row_dim;
+ mat_step_col_flag = 0;
+ assert( dcttype == IDCT_T2_XX_24 );
+ }
+
+ pt_y = tmp_y;
+ for ( i = 0; i < dim_out; i++ )
+ {
+ pt_x = input;
+ *pt_y = 0;
+
+ /* +i(DCT) or +i*maxTrunc(IDCT) */
+#define WMC_TOOL_SKIP
+ pt_A = &( matrix[i * ( mat_step_row + mat_step_col_flag )] ); /* ptr indexing */
+ PTR_INIT( 1 );
+#undef WMC_TOOL_SKIP
+ for ( j = 0; j < dim_in; j++ )
+ {
+#define WMC_TOOL_SKIP
+ *pt_y += Mpy_32_32( ( *pt_x++ ), ( *pt_A ) );
+ pt_A += mat_step_col; /* step +maxtrunc or +1 */ /* ptr indexing*/
+ MAC( 1 );
+#undef WMC_TOOL_SKIP
+ }
+ pt_y++;
+ }
+
+ Copy32( tmp_y, output, dim_out );
+ return;
+}
+#endif
/*-------------------------------------------------------------------*
* extend_dctN_input()
*
diff --git a/lib_com/prot_fx1.h b/lib_com/prot_fx1.h
index e885188a9cc16e20abb8da733b0268d58907d5fd..f7d4da726a161d080d7f90b5b579ef3f590801f7 100644
--- a/lib_com/prot_fx1.h
+++ b/lib_com/prot_fx1.h
@@ -440,4 +440,50 @@ void delay_signal(
Word16 ceil_log_2( UWord64 val );
+#ifdef IVAS_FLOAT_FIXED
+void re8_k2y_fx(
+ const Word16 *k, /* i : Voronoi index k[0..7] */
+ const Word16 m, /* i : Voronoi modulo (m = 2^r = 1<=2) */
+ Word16 *y /* o : 8-dimensional point y[0..7] in RE8 */
+);
+
+void re8_PPV_fx(
+ const Word32 x[], /* i : point in R^8Q15 */
+ Word16 y[] /* o : point in RE8 (8-dimensional integer vector) */
+);
+
+void msvq_dec_fx(
+ const Word16 *const *cb, /* i : Codebook (indexed cb[*stages][levels][p]) */
+ const Word16 dims[], /* i : Dimension of each codebook stage (NULL: full dim.) */
+ const Word16 offs[], /* i : Starting dimension of each codebook stage (NULL: 0) */
+ const Word16 stages, /* i : Number of stages */
+ const Word16 N, /* i : Vector dimension */
+ const Word16 maxN, /* i : Codebook dimension */
+ const Word16 Idx[], /* i : Indices */
+ const Word16 applyIDCT_flag, /* i : applyIDCT flag */
+ const Word32 *invTrfMatrix, /* i : synthesis matrix */
+ Word32 *uq, /* o : quantized vector */
+ Word16 *uq_ind, /* o : quantized vector (fixed point) */
+ Word16 exp );
+
+void dec_FDCNG_MSVQ_stage1_fx(
+ Word16 j_full, /* i : index full range */
+ Word16 n, /* i : dimension to generate */
+ const Word32 *invTrfMatrix, /* i : IDCT matrix for synthesis */
+ const DCTTYPE idcttype, /* i : specify which IDCT */
+ Word32 *uq, /* o : synthesized stage1 vector */
+ Word16 *uq_ind /* o : synthesized stage1 vector in BASOP */
+);
+
+void dctT2_N_apply_matrix_fx(
+ const Word32 *input, /* i : input in fdcng or DCT(fdcng) domain */
+ Word32 *output, /* o : output in DCT(fdcng) or fdcng ordomain */
+ const Word16 dct_dim, /* i : dct processing dim possibly truncated */
+ const Word16 fdcngvq_dim, /* i : fdcng domain length */
+ const Word32 *matrix, /* i : IDCT matrix */
+ const Word16 matrix_row_dim, /* i : */
+ const DCTTYPE dcttype /* i : matrix operation type */
+);
+
+#endif
#endif
\ No newline at end of file
diff --git a/lib_com/rom_com.c b/lib_com/rom_com.c
index 5b8e81734d85d994744266a24e6ff7e3fb9c4641..a532b1c1d837bea2126eeb0ccf808b13f8166c58 100644
--- a/lib_com/rom_com.c
+++ b/lib_com/rom_com.c
@@ -10319,6 +10319,14 @@ const float cdk1r_tr_midQ_truncQ[FDCNG_VQ_MAX_LEN] = { /* to float from BASOP q
-9.312500000000000e+00f, -9.365234375000000e+00f, -1.283691406250000e+01f, -1.393066406250000e+01f, -1.420605468750000e+01f, -1.591015625000000e+01f, -1.729687500000000e+01f, -1.734179687500000e+01f
};
+#ifdef IVAS_FLOAT_FIXED
+const Word16 cdk1r_tr_midQ_truncQ_fx[FDCNG_VQ_MAX_LEN] = {
+ /* fixed value Q10*/
+ 18349, 13163, 11098, 9868, 6756, 4633, 4416, 2422, 3345, 2686, 325, -584,
+ -418, -2434, -5759, -5414, -9536, -9590, -13145, -14265, -14547, -16292, -17712, -17758,
+};
+#endif
+
const Word8* const cdk_37bits_ivas_stage1_W8Qx_dct_sections[] = { cdk1_ivas_dct_s0_W8, cdk1_ivas_dct_s1_W8, cdk1_ivas_dct_s2_W8, cdk1_ivas_dct_s3_W8 };
diff --git a/lib_com/rom_com.h b/lib_com/rom_com.h
index 5b0a5bd4874a28747beb2b6be8434611e12d64e2..a2c36637056f855619c5bd6908c5d78368385cf5 100644
--- a/lib_com/rom_com.h
+++ b/lib_com/rom_com.h
@@ -1672,6 +1672,9 @@ extern const Word16 cdk1_ivas_trunc_dct_cols_per_segment[];
extern const Word16 *stage1_dct_col_syn_shift[];
extern const float cdk1r_tr_midQ_truncQ[];
+#ifdef IVAS_FLOAT_FIXED
+extern const Word16 cdk1r_tr_midQ_truncQ_fx[];
+#endif
extern const float fdcng_dct_invScaleF[];
extern const float fdcng_dct_scaleF[];
diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c
index 875441418e0ec4955a05085f270b2cc15e740c70..d5d99d8d2602009af86b33fc1437b787a08dd7e3 100644
--- a/lib_dec/ivas_mdct_core_dec.c
+++ b/lib_dec/ivas_mdct_core_dec.c
@@ -46,6 +46,8 @@
#include
#ifdef IVAS_FLOAT_FIXED
#include "ivas_prot_fx.h"
+#include "prot_fx1.h"
+#include "prot_fx2.h"
#endif // IVAS_FLOAT_FIXED
@@ -270,8 +272,8 @@ static void dec_prm_tcx_spec(
*-----------------------------------------------------------------*/
void ivas_mdct_dec_side_bits_frame_channel(
- CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */
- int16_t param_lpc[CPE_CHANNELS][NPRM_LPC_NEW], /* o : lpc_parameters */
+ CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */
+ int16_t param_lpc[CPE_CHANNELS][NPRM_LPC_NEW], /* o : lpc_parameters */
int16_t p_param[CPE_CHANNELS][NB_DIV], /* o : pointer to param buffer */
Decoder_State *st0, /* i : pointer to bitstream handle */
int16_t nTnsBitsTCX10[CPE_CHANNELS][NB_DIV], /* o : number of bits for TNS */
@@ -491,6 +493,9 @@ void ivas_mdct_core_invQ(
/* LPC */
Word16 Aind[CPE_CHANNELS][M + 1];
float sns[CPE_CHANNELS][NB_DIV][M];
+#ifdef IVAS_FLOAT_FIXED
+ Word32 sns_fx[CPE_CHANNELS][NB_DIV][M];
+#endif
/* TCX */
float xn_buf[L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX];
int16_t tcx_offset[CPE_CHANNELS];
@@ -661,13 +666,60 @@ void ivas_mdct_core_invQ(
{
if ( !MCT_flag && sts[0]->sr_core == 25600 && ( ( hCPE->element_brate == IVAS_48k || hCPE->element_brate == IVAS_64k ) ) )
{
+#ifdef IVAS_FLOAT_FIXED
+ Word32 snsQ_out_fx[CPE_CHANNELS][NB_DIV][M];
+
+ dequantize_sns_fx( param_lpc, snsQ_out_fx, sts );
+ for ( int j = 0; j < NB_DIV; j++ )
+ {
+ for ( k = 0; k < M; k++ )
+ {
+ sns[0][j][k] = fix_to_float( snsQ_out_fx[0][j][k], 16 );
+ sns[1][j][k] = fix_to_float( snsQ_out_fx[1][j][k], 16 );
+ }
+ }
+#ifdef DUMPS_ENABLED
+ Word16 tmp_nSubframes = ( sts[0]->core == TCX_20_CORE ) ? 1 : NB_DIV;
+ for ( int j = 0; j < tmp_nSubframes; j++ )
+ {
+ dbgwrite_txt( sns[0][j], M, "Fixed_code_sns_0.txt", NULL );
+ dbgwrite_txt( sns[1][j], M, "Fixed_code_sns_1.txt", NULL );
+ }
+#endif
+
+#else
dequantize_sns( param_lpc, sns, sts );
+#ifdef DUMPS_ENABLED
+ Word16 tmp_nSubframes = ( sts[0]->core == TCX_20_CORE ) ? 1 : NB_DIV;
+ for ( int j = 0; j < tmp_nSubframes; j++ )
+ {
+ dbgwrite_txt( sns[0][j], M, "Float_code_sns_0.txt", NULL );
+ dbgwrite_txt( sns[1][j], M, "Float_code_sns_1.txt", NULL );
+ }
+#endif
+#endif
}
else
{
if ( sts[0]->core == TCX_20_CORE && sts[1]->core == TCX_20_CORE && sts[0]->mct_chan_mode != MCT_CHAN_MODE_IGNORE && sts[1]->mct_chan_mode != MCT_CHAN_MODE_IGNORE )
{
+#ifdef IVAS_FLOAT_FIXED
+ Word16 q_l = 0, q_r = 0;
+ sns_avq_dec_stereo_fx( param_lpc[0], param_lpc[1], sts[0]->L_frame, &sns_fx[0][0][0], &q_l, &sns_fx[1][0][0], &q_r );
+ for ( int i = 0; i < M; i++ )
+ {
+ sns[0][0][i] = fix_to_float( sns_fx[0][0][i], q_l );
+ sns[1][0][i] = fix_to_float( sns_fx[1][0][i], q_r );
+ }
+#ifdef DUMPS_ENABLED
+ dbgwrite_txt( &sns[1][0][0], M, "Fixed_code_sns_buf.txt", NULL );
+#endif
+#else
sns_avq_dec_stereo( param_lpc[0], param_lpc[1], sts[0]->L_frame, &sns[0][0][0], &sns[1][0][0] );
+#ifdef DUMPS_ENABLED
+ dbgwrite_txt( &sns[1][0][0], M, "Float_code_sns_buf.txt", NULL );
+#endif
+#endif
}
else
{
@@ -676,7 +728,41 @@ void ivas_mdct_core_invQ(
st = sts[ch];
if ( st->mct_chan_mode != MCT_CHAN_MODE_IGNORE )
{
+#ifdef IVAS_FLOAT_FIXED
+ Word32 SNS_Q_fx[CPE_CHANNELS][NB_DIV][M];
+ Word16 q_snsq = 0;
+ sns_avq_dec_fx( param_lpc[ch], SNS_Q_fx[ch], &q_snsq, st->L_frame, st->numlpc );
+ for ( int i = 0; i < CPE_CHANNELS; i++ )
+ {
+ for ( int j = 0; j < NB_DIV; j++ )
+ {
+ for ( k = 0; k < M; k++ )
+ {
+ sns[i][j][k] = fix_to_float( SNS_Q_fx[i][j][k], q_snsq );
+ }
+ }
+ }
+#ifdef DUMPS_ENABLED
+ for ( int i = 0; i < CPE_CHANNELS; i++ )
+ {
+ for ( int j = 0; j < NB_DIV; j++ )
+ {
+ dbgwrite_txt( sns, M, "Fixed_code_output.txt", NULL );
+ }
+ }
+#endif
+#else
sns_avq_dec( param_lpc[ch], sns[ch], st->L_frame, st->numlpc );
+#ifdef DUMPS_ENABLED
+ for ( int i = 0; i < CPE_CHANNELS; i++ )
+ {
+ for ( int j = 0; j < NB_DIV; j++ )
+ {
+ dbgwrite_txt( sns, M, "Float_code_output.txt", NULL );
+ }
+ }
+#endif
+#endif
}
}
}
@@ -919,7 +1005,7 @@ void ivas_mdct_core_reconstruct(
st->last_is_cng = 0;
/* Postfiltering */
- post_decoder_flt( st, synth_buf, pit_gain[ch], pitch[ch], x[ch][0], st->p_bpf_noise_buf_float);
+ post_decoder_flt( st, synth_buf, pit_gain[ch], pitch[ch], x[ch][0], st->p_bpf_noise_buf_float );
if ( signal_outFB[ch] )
{
diff --git a/lib_dec/ivas_sns_dec_fx.c b/lib_dec/ivas_sns_dec_fx.c
new file mode 100644
index 0000000000000000000000000000000000000000..eb155495c2a914330c03af8678a01bad926c082a
--- /dev/null
+++ b/lib_dec/ivas_sns_dec_fx.c
@@ -0,0 +1,346 @@
+/******************************************************************************************************
+
+ (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
+ Fraunhofer-Gesellschaft zur Foerderung der angewandten FORschung e.V., Huawei Technologies Co. LTD.,
+ Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
+ Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
+ contributors to this repository. All Rights Reserved.
+
+ This software is protected by copyright law and by international treaties.
+ The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
+ Fraunhofer-Gesellschaft zur Foerderung der angewandten FORschung e.V., Huawei Technologies Co. LTD.,
+ Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
+ Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
+ contributors to this repository retain full ownership rights in their respective contributions in
+ the software. This notice grants no license of any kind, including but not limited to patent
+ license, nor is any license granted by implication, estoppel or otherwise.
+
+ Contributors are required to enter into the IVAS codec Public Collaboration agreement beFORe making
+ contributions.
+
+ This software is provided "AS IS", without any express or implied warranties. The software is in the
+ development stage. It is intended exclusively FOR experts who have experience with such software and
+ solely FOR the purpose of inspection. All implied warranties of non-infringement, merchantability
+ and fitness FOR a particular purpose are hereby disclaimed and excluded.
+
+ Any dispute, controversy or claim arising under or in relation to providing this software shall be
+ submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
+ accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
+ the United Nations Convention on Contracts on the International Sales of Goods.
+
+*******************************************************************************************************/
+
+#include
+#include "options.h"
+#include "prot.h"
+#include "ivas_prot.h"
+#include "rom_com.h"
+#include "ivas_rom_com.h"
+#include "ivas_cnst.h"
+#include
+#include "wmc_auto.h"
+#ifdef IVAS_FLOAT_FIXED
+#include "prot_fx1.h"
+#include "prot_fx2.h"
+
+/*-------------------------------------------------------------------
+ * sns_1st_dec_fx()
+ *
+ *
+ *-------------------------------------------------------------------*/
+
+static void sns_1st_dec_fx(
+ const int16_t index, /* i : codebook index */
+ const int16_t core,
+ const int16_t L_frame,
+ Word32 *snsq_fx /* i/o: i:prediction o:quantized sns */
+)
+{
+ Word16 i;
+ const Word16 *p_dico, *means;
+
+ const Word16 cdbk_fix = 8; // 1.f / powf( 2, SNS_CDBKS_BITS_4_FRAC ) in Q15
+ const Word16 means_fix = 2; // 1.f / powf( 2, SNS_MEANS_BITS_4_FRAC ) in Q15
+
+ means = NULL;
+ SWITCH( L_frame )
+ {
+ case L_FRAME16k:
+ means = &sns_1st_means_16k[core - 1][0];
+ BREAK;
+ case L_FRAME25_6k:
+ means = &sns_1st_means_25k6[core - 1][0];
+ BREAK;
+ case L_FRAME32k:
+ means = &sns_1st_means_32k[core - 1][0];
+ BREAK;
+ default:
+ assert( !"illegal frame length in sns_1st_cod" );
+ }
+
+
+ p_dico = &sns_1st_cdbk[0][core - 1][0] + ( index % 32 ) * ( M / 2 );
+
+ FOR( i = 0; i < M / 2; i++ )
+ {
+ snsq_fx[i] = L_add( L_mult( ( *p_dico++ ), cdbk_fix ), L_mult( means[i], means_fix ) ); // Q16
+ }
+
+ p_dico = &sns_1st_cdbk[1][core - 1][0] + ( index >> 5 ) * ( M / 2 );
+
+ FOR( i = M / 2; i < M; i++ )
+ {
+ snsq_fx[i] = L_add( L_mult( ( *p_dico++ ), cdbk_fix ), L_mult( means[i], means_fix ) );
+ }
+
+ return;
+}
+/*-------------------------------------------------------------------
+ * sns_2st_dec_fx()
+ *
+ *
+ *-------------------------------------------------------------------*/
+
+static void sns_2st_dec_fx(
+ Word32 *snsq_fx, /* i/o: i:1st stage o:1st+2nd stage */
+ Word16 *q_snsq,
+ Word16 *indx /* i : index[] (4 bits per words) */
+)
+{
+ Word16 i;
+ Word16 xq_fx[M];
+ Word16 scale_fx = float_to_fix16( 0.400000006f, 15 );
+ /* quantize */
+ AVQ_dec_lpc( indx, xq_fx, 2 );
+ Word32 tmp = 0;
+ Word16 snsq_dIFf = 0;
+ Word32 tmp1;
+
+ FOR( i = 0; i < M; i++ )
+ {
+ tmp = L_mult( scale_fx, xq_fx[i] ); // q16
+ IF( *q_snsq >= 16 )
+ {
+ snsq_dIFf = *q_snsq - 16;
+ tmp1 = L_shr( snsq_fx[i], snsq_dIFf );
+ snsq_fx[i] = L_add( tmp1, tmp );
+ *q_snsq = 16;
+ }
+ ELSE
+ {
+ snsq_dIFf = 16 - *q_snsq;
+ tmp1 = L_shr( tmp, snsq_dIFf );
+ snsq_fx[i] = L_add( snsq_fx[i], tmp1 );
+ }
+ }
+ return;
+}
+/*-------------------------------------------------------------------
+ * sns_avq_dec_fx()
+ *
+ * Stereo noise-shaping AVQ decoder FOR 1 channel
+ *-------------------------------------------------------------------*/
+
+void sns_avq_dec_fx(
+ int16_t *index, /* i : Quantization indices */
+ Word32 SNS_Q[NB_DIV][M], /* o : Quantized SNS vectors */
+ Word16 *q_snsq,
+ const int16_t L_frame, /* i : frame length */
+ const int16_t numlpc /* i : Number of sets of lpc */
+)
+{
+ Word16 i, nbi, last;
+ Word16 q_type;
+
+ /* go from one-based indexing to zero-based indexing */
+ last = numlpc - 1;
+
+ index++;
+
+ /* Decode last LPC */
+ sns_1st_dec_fx( *index++, numlpc, L_frame, SNS_Q[last] ); // Q16
+ *q_snsq = 16;
+ sns_2st_dec_fx( SNS_Q[last], q_snsq, index );
+
+ nbi = 2 + index[0] + index[1];
+ index += nbi;
+
+ /* Decode intermediate LPC (512 framing) */
+ IF( numlpc == 2 )
+ {
+ q_type = *index++;
+
+ IF( q_type == 0 )
+ {
+ sns_1st_dec_fx( *index++, numlpc, L_frame, SNS_Q[0] );
+ *q_snsq = 16;
+ sns_2st_dec_fx( SNS_Q[0], q_snsq, index );
+ }
+ ELSE IF( q_type == 1 )
+ {
+ FOR( i = 0; i < M; i++ )
+ {
+ SNS_Q[0][i] = SNS_Q[1][i];
+ }
+ sns_2st_dec_fx( SNS_Q[0], q_snsq, index );
+ }
+ }
+
+ return;
+}
+
+/*-------------------------------------------------------------------
+ * sns_avq_dec_stereo_fx()
+ *
+ * Stereo noise-shaping AVQ decoder FOR 21 channels
+ *-------------------------------------------------------------------*/
+
+void sns_avq_dec_stereo_fx(
+ Word16 *indexl, /* i : Quantization indices (left channel) */
+ Word16 *indexr, /* i : Quantization indices (right channe) */
+ const Word16 L_frame, /* i : frame length */
+ Word32 *SNS_Ql, /* o : Quantized SNS vectors (left channel) */
+ Word16 *q_l,
+ Word32 *SNS_Qr, /* o : Quantized SNS vectors (right channe) */
+ Word16 *q_r )
+{
+ Word16 i, stereo_mode;
+
+ Word32 mid_q_fx[M], side_q_fx[M];
+ stereo_mode = *indexl++;
+ indexr++;
+ Word16 tmp1 = 0, tmp2 = 0, q_mid = 0, q_side = 0;
+ Word16 tmp_dIFf_q = 0;
+ IF( stereo_mode == 2 )
+ {
+ /* MS coding */
+ tmp1 = *indexl++;
+ sns_1st_dec_fx( tmp1, TCX_20_CORE, L_frame, mid_q_fx );
+ q_mid = 16;
+ sns_2st_dec_fx( mid_q_fx, &q_mid, indexl );
+
+ FOR( i = 0; i < M; i++ )
+ {
+ side_q_fx[i] = 0;
+ q_side = 31;
+ }
+
+ IF( *indexr++ == -1 )
+ {
+ sns_2st_dec_fx( side_q_fx, &q_side, indexr );
+ }
+
+ Word32 tmp_c = 0;
+ FOR( i = 0; i < M; i++ )
+ {
+ tmp_c = L_shr( side_q_fx[i], 1 ); // q_side
+
+ IF( q_mid >= q_side )
+ {
+ tmp_dIFf_q = q_mid - q_side;
+ SNS_Ql[i] = L_add( L_shr( mid_q_fx[i], tmp_dIFf_q ), tmp_c ); // q_side
+ SNS_Qr[i] = L_sub( L_shr( mid_q_fx[i], tmp_dIFf_q ), tmp_c ); // q_side
+ *q_r = q_side;
+ *q_l = *q_r;
+ }
+ ELSE
+ {
+ tmp_dIFf_q = q_side - q_mid;
+ SNS_Ql[i] = L_add( mid_q_fx[i], L_shr( tmp_c, tmp_dIFf_q ) ); // q_mid
+ SNS_Qr[i] = L_sub( mid_q_fx[i], L_shr( tmp_c, tmp_dIFf_q ) ); // q_mid
+ *q_r = q_mid;
+ *q_l = *q_r;
+ }
+ }
+ }
+ ELSE
+ {
+ /* LR decoding */
+ tmp1 = *indexl++;
+ tmp2 = *indexr++;
+ sns_1st_dec_fx( tmp1, TCX_20_CORE, L_frame, SNS_Ql );
+ *q_l = 16;
+ sns_2st_dec_fx( SNS_Ql, q_l, indexl );
+
+ sns_1st_dec_fx( tmp2, TCX_20_CORE, L_frame, SNS_Qr );
+ *q_r = 16;
+ sns_2st_dec_fx( SNS_Qr, q_r, indexr );
+ }
+
+ return;
+}
+
+/*-------------------------------------------------------------------
+ * dequantize_sns_fx()
+ *
+ * Dequantize SNS
+ *-------------------------------------------------------------------*/
+
+void dequantize_sns_fx(
+ Word16 indices[CPE_CHANNELS][NPRM_LPC_NEW],
+ Word32 snsQ_out_fx[CPE_CHANNELS][NB_DIV][M],
+ Decoder_State **sts )
+{
+ Word16 nSubframes, k, ch;
+ Word16 sns_stereo_mode[NB_DIV];
+ Word16 zero_side_flag[NB_DIV];
+ Decoder_State *st;
+
+ sns_stereo_mode[0] = indices[0][0];
+ sns_stereo_mode[1] = indices[0][1];
+ zero_side_flag[0] = indices[0][2];
+ zero_side_flag[1] = indices[0][3];
+
+ FOR( ch = 0; ch < CPE_CHANNELS; ++ch )
+ {
+ Word16 idxIndices;
+
+ st = sts[ch];
+ nSubframes = ( st->core == TCX_20_CORE ) ? 1 : NB_DIV;
+ idxIndices = 0;
+
+ FOR( k = 0; k < nSubframes; ++k )
+ {
+ const Word16 is_side = ch == 1 && sns_stereo_mode[k] == SNS_STEREO_MODE_MS;
+
+ const Word16 *const *cdbks_fx = ( nSubframes == 1 ) ? ivas_sns_cdbks_tcx20_fx : ivas_sns_cdbks_tcx10_fx;
+
+ Word16 nStages = ( ( nSubframes == 1 ) ? SNS_MSVQ_NSTAGES_TCX20 : SNS_MSVQ_NSTAGES_TCX10 );
+ Word32 *snsQ_fx = snsQ_out_fx[ch][k];
+
+ IF( is_side )
+ {
+ const Word16 *const *side_cdbks_fx = ( st->core == TCX_20_CORE ) ? ivas_sns_cdbks_side_tcx20_fx : ivas_sns_cdbks_side_tcx10_fx;
+
+ IF( zero_side_flag[k] )
+ {
+ set32_fx( snsQ_fx, 0, M );
+ continue;
+ }
+
+ nStages = SNS_MSVQ_NSTAGES_SIDE;
+ msvq_dec_fx( side_cdbks_fx, NULL, NULL, nStages, M, M, &indices[ch][idxIndices + SNS_STEREO_MODE_OFFSET_INDICES], 0, NULL, snsQ_fx, NULL, 15 ); // always 15
+ }
+ ELSE
+ {
+ msvq_dec_fx( cdbks_fx, NULL, NULL, nStages, M, M, &indices[ch][idxIndices + SNS_STEREO_MODE_OFFSET_INDICES], 0, NULL, snsQ_fx, NULL, 12 );
+ }
+ idxIndices += nStages;
+ }
+ }
+
+ IF( sns_stereo_mode[0] == SNS_STEREO_MODE_MS || sns_stereo_mode[1] == SNS_STEREO_MODE_MS )
+ {
+ nSubframes = ( sts[0]->core == TCX_20_CORE ) ? 1 : NB_DIV;
+ FOR( k = 0; k < nSubframes; ++k )
+ {
+ IF( sns_stereo_mode[k] == SNS_STEREO_MODE_MS )
+ {
+ inverseMS_fx( M, snsQ_out_fx[0][k], snsQ_out_fx[1][k], ONE_IN_Q31 );
+ }
+ }
+ }
+
+ return;
+}
+#endif
diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c
index c8dfd6a6b2d6eec06e0c35f7af47280795735d0f..1479aab899f97e4fe9925330187ce44ca9497206 100644
--- a/lib_dec/ivas_stereo_mdct_stereo_dec.c
+++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c
@@ -349,6 +349,29 @@ static void inverseBwMS(
return;
}
+#ifdef IVAS_FLOAT_FIXED
+static void inverseBwMS_fx(
+ const Word16 startLine, /* i : start line of sfb */
+ const Word16 stopLine, /* i : stop line of sfb */
+ Word32 x0[], /* i/o: mid/left channel coefficients */
+ Word32 x1[], /* i/o: side/right channel coefficients */
+ const Word32 norm_fac /* i : normalization factor */
+)
+{
+ Word16 j;
+ Word32 tmpValue;
+
+ for ( j = startLine; j < stopLine; j++ )
+ {
+ tmpValue = x0[j];
+ x0[j] = Mpy_32_32( L_add( x0[j], x1[j] ), norm_fac );
+ x1[j] = Mpy_32_32( L_sub_sat( tmpValue, x1[j] ), norm_fac );
+ }
+
+ return;
+}
+
+#endif
/*-------------------------------------------------------------------*
* inverseMS()
@@ -368,7 +391,19 @@ void inverseMS(
return;
}
+#ifdef IVAS_FLOAT_FIXED
+void inverseMS_fx(
+ const Word16 L_frame, /* i : frame length */
+ Word32 x0[], /* i/o: mid/left channel coefficients */
+ Word32 x1[], /* i/o: side/right channel coefficients */
+ const Word32 norm_fac /* i : normalization factor */
+)
+{
+ inverseBwMS_fx( 0, L_frame, x0, x1, norm_fac );
+ return;
+}
+#endif
/*-------------------------------------------------------------------*
* initMdctStereoDecData()
*