Line data Source code
1 : /****************************************************************************** 2 : * ETSI TS 103 634 V1.5.1 * 3 : * Low Complexity Communication Codec Plus (LC3plus) * 4 : * * 5 : * Copyright licence is solely granted through ETSI Intellectual Property * 6 : * Rights Policy, 3rd April 2019. No patent licence is granted by implication, * 7 : * estoppel or otherwise. * 8 : ******************************************************************************/ 9 : 10 : #include "defines.h" 11 : #include "functions.h" 12 : 13 0 : void processPLCLpcScaling_fx(Word32 tdc_A_32[], Word16 tdc_A_16[], Word16 m) 14 : { 15 : Counter i; 16 : Word16 s; 17 : 18 : #ifdef DYNMEM_COUNT 19 : Dyn_Mem_In("processPLCLpcScaling_fx", sizeof(struct { 20 : Counter i; 21 : Word16 s; 22 : })); 23 : #endif 24 : 25 0 : s = getScaleFactor32_lc3plus(tdc_A_32, m); 26 0 : FOR (i = 0; i < m; i++) 27 : { 28 0 : tdc_A_16[i] = round_fx_sat(L_shl_sat(tdc_A_32[i], s)); move16(); 29 : } 30 : 31 : #ifdef DYNMEM_COUNT 32 : Dyn_Mem_Out(); 33 : #endif 34 0 : } 35 : 36 :