LCOV - code coverage report
Current view: top level - lib_lc3plus - plc_tdc_tdac.c (source / functions) Hit Total Coverage
Test: Coverage on main -- short test vectors @ 1ecb9137d23f3dad766c8f6f3eb1e829e795f071 Lines: 37 37 100.0 %
Date: 2025-10-29 06:44:26 Functions: 1 1 100.0 %

          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        6912 : void processTdcTdac_fl(const LC3_FLOAT *synth_inp, const LC3_FLOAT *win, LC3_INT32 frame_length, LC3_INT32 la_zeroes, LC3_FLOAT *ola_mem)
      15             : {
      16             :         LC3_INT32 i, L, LD2, NZ, synth_len;
      17             :         LC3_FLOAT synth[(MAX_LEN + MDCT_MEM_LEN_MAX)], *synth1, *synth2, *ola_mem1, *ola_mem2, sz;
      18             :         const LC3_FLOAT *win1, *win2, *win3, *win4;
      19             : 
      20        6912 :     assert(la_zeroes <= frame_length / 2);
      21             : 
      22        6912 :     L         = frame_length;
      23        6912 :     LD2       = L/2;
      24        6912 :     NZ        = LD2 - la_zeroes;
      25        6912 :     synth_len = 2*L - la_zeroes;
      26             : 
      27        6912 :     move_float(synth, synth_inp, synth_len);
      28             : 
      29             :     /* calculate x_ov[L+la_zeroes] ... x_ov[2*L-1] */
      30        6912 :     win1 = &win[L + LD2 - 1];
      31        6912 :     win2 = &win[L + LD2];
      32             : 
      33        6912 :     win3 = &win[LD2 - 1];
      34        6912 :     win4 = &win[LD2];
      35             : 
      36        6912 :     synth1 = &synth[L + LD2 - 1 - la_zeroes];
      37        6912 :     synth2 = &synth[L + LD2 - la_zeroes];
      38             : 
      39        6912 :     ola_mem1 = &ola_mem[LD2 - la_zeroes];
      40        6912 :     ola_mem2 = &ola_mem[LD2 - la_zeroes - 1];
      41             : 
      42      421632 :     for (i = 0; i < NZ; i++)
      43             :     {
      44             :         /* analysis windowing + 2N -> N */
      45      414720 :         sz = *synth1 * *win1 + *synth2 * *win2;
      46             : 
      47             :         /* N -> 2N + synthesis windowing */
      48      414720 :         *ola_mem1 = sz * *win3;
      49      414720 :         *ola_mem2 = sz * *win4;
      50             : 
      51             :         /* pointer update */
      52      414720 :         win1--;
      53      414720 :         win2++;
      54      414720 :         win3--;
      55      414720 :         win4++;
      56      414720 :         synth1--;
      57      414720 :         synth2++;
      58      414720 :         ola_mem1++;
      59      414720 :         ola_mem2--;
      60             :     }
      61             : 
      62      421632 :     for (; i < LD2; i++)
      63             :     {
      64             :         /* analysis windowing + 2N -> N */
      65      414720 :         sz = *synth1 * *win1;
      66             : 
      67             :         /* N -> 2N + synthesis windowing */
      68      414720 :         *ola_mem1 = sz * *win3;
      69             : 
      70             :         /* pointer update */
      71      414720 :         win1--;
      72      414720 :         win2++;
      73      414720 :         win3--;
      74      414720 :         synth1--;
      75      414720 :         synth2++;
      76      414720 :         ola_mem1++;
      77             :     }
      78        6912 : }
      79             : 

Generated by: LCOV version 1.14