Line data Source code
1 : /*==================================================================================== 2 : EVS Codec 3GPP TS26.452 Aug 12, 2021. Version 16.3.0 3 : ====================================================================================*/ 4 : 5 : #include <stdint.h> 6 : #include "options.h" /* Compilation switches */ 7 : #include "cnst.h" /* Common constants */ 8 : #include "rom_com.h" /* Static table prototypes */ 9 : #include "prot_fx.h" /* Function prototypes */ 10 : 11 : /*-------------------------------------------------------------------* 12 : * FEC_lsf_estim() 13 : * 14 : * - LSP calculation 15 : * - A(z) calculation 16 : *-------------------------------------------------------------------*/ 17 : 18 5822 : void FEC_lsf2lsp_interp( 19 : Decoder_State *st, /* i/o: Decoder static memory */ 20 : const Word16 L_frame, /* i : length of the frame */ 21 : Word16 *Aq, /* o : calculated A(z) for 4 subframes Q12 */ 22 : Word16 *lsf, /* o : estimated LSF vector Qlog2(2.56)*/ 23 : Word16 *lsp /* o : estimated LSP vector Q15* */ 24 : ) 25 : { 26 : 27 : /* convert LSFs to LSPs */ 28 5822 : IF( st->Opt_AMR_WB ) 29 : { 30 0 : E_LPC_isf_isp_conversion( lsf, lsp, M ); 31 : } 32 : ELSE 33 : { 34 5822 : IF( EQ_16( L_frame, L_FRAME ) ) 35 : { 36 1310 : lsf2lsp_fx( lsf, lsp, M, INT_FS_FX ); 37 : } 38 : ELSE /* L_frame == L_FRAME16k */ 39 : { 40 4512 : lsf2lsp_fx( lsf, lsp, M, INT_FS_16k_FX ); 41 : } 42 : } 43 : 44 : /*----------------------------------------------------------------------* 45 : * Interpolate LSP vector and find A(z) 46 : *----------------------------------------------------------------------*/ 47 : 48 5822 : IF( st->Opt_AMR_WB ) 49 : { 50 0 : int_lsp_fx( L_frame, st->lsp_old_fx, lsp, Aq, M, interpol_isp_amr_wb_fx, 1 ); 51 : } 52 : ELSE 53 : { 54 5822 : int_lsp_fx( L_frame, st->lsp_old_fx, lsp, Aq, M, interpol_frac_fx, 0 ); 55 : } 56 : 57 5822 : return; 58 : }