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 "options.h" 11 : #include "wmc_auto.h" 12 : #include "functions.h" 13 : 14 0 : LC3_FLOAT array_max_abs(LC3_FLOAT *in, LC3_INT32 len) 15 : { 16 : LC3_FLOAT max; 17 : LC3_INT32 i; 18 : 19 0 : max = LC3_FABS(in[0]); 20 : 21 0 : for (i = 0; i < len; i++) 22 : { 23 0 : if (LC3_FABS(in[i]) > LC3_FABS(max)) 24 : { 25 0 : max = LC3_FABS(in[i]); 26 : } 27 : } 28 : 29 0 : return max; 30 : } 31 :