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 processPLCmain_fx(Word16 plcMeth, Word16 *concealMethod, Word16 *nbLostFramesInRow, Word16 bfi, Word16 prev_bfi,
14 : Word16 frame_length, Word16 la_zeroes,
15 : #ifdef ENABLE_HR_MODE
16 : const Word32 w[],
17 : #else
18 : const Word16 w[],
19 : #endif
20 : Word16 x_fx[], Word16 ola_mem[],
21 : Word16 *ola_mem_exp, Word16 q_old_d_fx[], Word16 *q_old_fx_exp, Word32 q_d_fx[],
22 : Word16 *q_fx_exp, Word16 yLen, Word16 fs_idx, const Word16 *band_offsets, Word16 bands_number, Word16 *damping,
23 : Word16 old_pitch_int, Word16 old_pitch_fr, Word16 *ns_cum_alpha, Word16 *ns_seed,
24 : AplcSetup *plcAd, Word16 frame_dms, Word8 *scratchBuffer, Word16 *pc_nbLostFramesInRow
25 : #ifdef ENABLE_HR_MODE
26 : , Word16 hrmode
27 : #endif
28 : , Word32 rel_pitch_change
29 : , Word16 *alpha_type_2_table
30 : )
31 : {
32 0 : IF(sub(bfi, 1) == 0 && plcAd)
33 : {
34 : /* FFLC increases the PFLC counter */
35 0 : *pc_nbLostFramesInRow = add(*pc_nbLostFramesInRow, 1);
36 : }
37 :
38 0 : processPLCclassify_fx(plcMeth, concealMethod, nbLostFramesInRow, bfi, old_pitch_int, frame_length, frame_dms,
39 : fs_idx, yLen, q_old_d_fx, band_offsets, bands_number, plcAd, scratchBuffer
40 : #ifdef ENABLE_HR_MODE
41 : , hrmode
42 : #endif
43 : );
44 :
45 0 : processPLCapply_fx(
46 : concealMethod,
47 0 : *nbLostFramesInRow, bfi, prev_bfi, frame_length, la_zeroes, w, x_fx, ola_mem,
48 : ola_mem_exp, q_old_d_fx, q_old_fx_exp, q_d_fx, q_fx_exp, yLen, fs_idx, damping, old_pitch_int,
49 : old_pitch_fr, ns_cum_alpha, ns_seed, frame_dms, plcAd, scratchBuffer
50 : #ifdef ENABLE_HR_MODE
51 : , hrmode
52 : #endif
53 : , rel_pitch_change
54 : , alpha_type_2_table
55 : );
56 :
57 0 : IF (bfi == 0)
58 : {
59 0 : processPLCupdateSpec_fx(q_old_d_fx, q_old_fx_exp, q_d_fx, q_fx_exp, yLen);
60 : }
61 :
62 : #ifdef ENABLE_HR_MODE
63 0 : IF (plcAd != NULL && (sub(plcAd->PhECU_frame_ms , 10) == 0) && (hrmode == 0))
64 : #else
65 : IF (plcAd != NULL && (sub(plcAd->PhECU_frame_ms , 10) == 0))
66 : #endif
67 : {
68 0 : processPLCspec2shape_fx(prev_bfi, bfi, q_old_d_fx, yLen, plcAd->PhECU_oold_grp_shape_fx, plcAd->PhECU_old_grp_shape_fx);
69 : }
70 :
71 0 : }
72 :
73 :
|