Commit a69a8445 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into evs_dec_updates

parents 0a4e9134 07fb06f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -613,7 +613,7 @@
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\prot_fx.h">
      <Filter>common_all_c</Filter>
      <Filter>common_h</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
+1 −5
Original line number Diff line number Diff line
@@ -669,11 +669,6 @@ Word16 read_flag_EC_DFT(
    Word16 *flag               /* o  : flag value           */
);

/*file : ivas_mc_param_dec_fx.c*/
Word16 param_mc_get_num_cldfb_syntheses_ivas_fx(
    Decoder_Struct *st_ivas /* i  : Parametric MC handle */
);

void ivas_init_dec_get_num_cldfb_instances(
    Decoder_Struct *st_ivas,  /* i  : IVAS decoder structure                  */
    Word16 *numCldfbAnalyses, /* o  : number of CLDFB analysis instances      */
@@ -1974,6 +1969,7 @@ void ivas_DetectTonalComponents_fx(
    const Word16 scaleFactors_exp[],
    const Word16 scaleFactors_max_e,
    const Word32 secondLastPowerSpectrum[],
    const Word16 secondLastPowerSpectrum_e,
    const Word16 nSamples,
    const Word16 nSamplesCore,
    Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins  */
+15 −22
Original line number Diff line number Diff line
@@ -6532,6 +6532,7 @@ void ivas_RefineTonalComponents_fx(
    const Word16 scaleFactors_exp[],
    const Word16 scaleFactors_max_e,
    const Word32 secondLastPowerSpectrum[],
    const Word16 secondLastPowerSpectrum_e,
    const Word16 nSamples,
    const Word16 nSamplesCore,
    const Word16 floorPowerSpectrum, /* i: lower limit for power spectrum bins  */
@@ -6685,12 +6686,7 @@ void hf_synth_fx(
    Word16 *synth,                 /* i  : 12.8kHz synthesis signal		 Q_syn2*/
    Word16 *synth16k,              /* o  : 16kHz synthesis signal        Q_syn2*/
    const Word16 Q_exc,            /* i  : excitation scaling             */
    const Word16 Q_syn2,           /* i  : synthesis scaling              */
    Word16 *delay_syn_hf,          /*i/o: HF synthesis memory            Q_syn2*/
    Word16 *memExp1,               /* o  : HF excitation exponent         */
    Word16 *mem_hp_interp,         /* i/o: interpol. memory               Qx*/
    const Word16 extl,             /* i  : flag indicating BWE            Q0*/
    const Word16 CNG_mode          /* i  : CNG_mode                       Q0*/
    const Word16 Q_syn2            /* i  : synthesis scaling              */
);
void hf_synth_amr_wb_init_fx(
@@ -9661,13 +9657,6 @@ void set32_fx(
    const Word16 N  /* i  : Lenght of the vector                */
);
void delay_signal_fx(
    Word32 x[],        /* i/o: signal to be delayed              */
    const Word16 len,  /* i  : length of the input signal        */
    Word32 mem[],      /* i/o: synchronization memory            */
    const Word16 delay /* i  : delay in samples                  */
);
void delay_signal_q_adj_fx(
    Word32 x[],         /* i/o: signal to be delayed                    */
    const Word16 len,   /* i  : length of the input signal              */
@@ -9805,7 +9794,8 @@ void addBassPostFilter_ivas_fx(
    Word32 **iAnalysis_fx,
    HANDLE_CLDFB_FILTER_BANK cldfb );
Word32 ism_dequant_meta_fx(                                /* o  : Q22*/
/* o  : Q22*/
Word32 ism_dequant_meta_fx(
    const Word16 idx,              /* i  : quantizer index              */
    const Word32 borders_fx[],     /* i  : level borders                Q22*/
    const Word32 q_step_fx,        /* i  : quantization step            Q22   */
@@ -9815,10 +9805,13 @@ Word32 ism_dequant_meta_fx( /* o : Q22*/
void save_synthesis_hq_fec_fx(
    Decoder_State *st,         /* i/o: decoder state structure     */
    const Word16 synth_fx[],   /* i  : decoded synthesis (EVS)     */
    const Word32 output_fx[],  /* i  : decoded synthesis           */
    const Word16 output_frame, /* i  : decoded synthesis           */
    const Word16 Qpostd,       /* i  : Q value of delayed signal   */
    CPE_DEC_HANDLE hCPE        /* i  : CPE decoder structure       */
);
void calculate_nbits_meta_fx(
    const Word16 nchan_ism,
    Word32 q_energy_ratio_ism[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS][MAX_NUM_OBJECTS], // Q30
@@ -10556,15 +10549,15 @@ void floating_point_add(
    const Word32 my, /* i:  mantissa of the adder Q31  */
    const Word16 ey  /* i:  exponent of the adder Q0   */
);
/*delay_signal_fx is also present*/
void delay_signal(
void delay_signal_fx(
    Word16 x[],        /* i/o: signal to be delayed              */
    const Word16 len,  /* i  : length of the input signal        */
    Word16 mem[],      /* i/o: synchronization memory            */
    const Word16 delay /* i  : delay in samples                  */
);
void delay_signal32(
void delay_signal32_fx(
    Word32 x[],        /* i/o: signal to be delayed              */
    const Word16 len,  /* i  : length of the input signal        */
    Word32 mem[],      /* i/o: synchronization memory            */
+24 −24
Original line number Diff line number Diff line
@@ -1769,35 +1769,35 @@ static const Word16 filter_LP30_300K_fx[LFE_PLC_FDEL + 1] =
const Resampling_cfg resampling_cfg_tbl[] =
{	
    /* fin           fout          up.fact.    den.fac. len.out     filter coefs.                           filter length/2     filter mem./2                  flags */
    {  8000,  8000,  12800, 12800,   8,     8,    5,     256,    /*filter5_39s320_120,*/ filter5_39s320_120_fx,      15,            15,                RS_INV_FAC, RS_INV_FAC    },
	{  12800, 12800, 8000,  8000,    5,     5,    8,     160,    /*filter5_39s320_120,*/ filter5_39s320_120_fx,      L_FILT_UP8k,   L_FILT_UP8k,       RS_INV_FAC, RS_INV_FAC    },
	{  16000, 16000, 8000,  8000,    6,     6,    12,    160,    /*filter_LP12_180H,*/   filter_LP12_180H_fx,        180 / 6,       180 / 6,             0,          0           },
	{  12800, 12800, 16000, 16000,   15,    15,   12,    320,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,        L_FILT_UP16k,  L_FILT_UP16k,        0,          0           },
	{  12800, 12800, 32000, 32000,   15,    15,   6,     640,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,        L_FILT_UP32k,  L_FILT_UP32k,        0,          0           },
	{  12800, 12800, 48000, 48000,   15,    15,   4,     960,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,        L_FILT_UP48k,  L_FILT_UP48k,        0,          0           },
																								    
    {  16000, 16000, 12800, 12800,   12,     12,   15,   256,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,        L_FILT16k,     L_FILT16k,           0,          0           },
	{  16000, 16000, 32000, 32000,   12,     12,   6,    640,    /*filter_LP12_180H, */  filter_LP12_180H_fx,        L_FILT16k,     L_FILT16k,           0,          0           },
	{  16000, 16000, 48000, 48000,   12,     12,   4,    960,    /*filter_LP12_180H,*/   filter_LP12_180H_fx,        L_FILT16k,     L_FILT16k,           0,          0           },
													     
    {  32000, 32000, 12800, 12800,   6,	    6,    15,    256,    /*filter_LP15_180H,*/   filter_LP15_180H_13b_fx,    L_FILT32k,     L_FILT32k,           0,          0			},
	{  32000, 32000, 16000, 16000,   6,	    6,    12,    320,    /*filter_LP12_180H,*/   filter_LP12_180H_13b_fx,    L_FILT32k,     L_FILT32k,           0,          0			},
	{  32000, 32000, 25600, 25600,   12,     12,   15,   512,    /*filter_LP15_360H,*/   filter_LP15_360H_13b_fx,    L_FILT32k,     L_FILT32k,           0,          0			},
	{  32000, 32000, 48000, 48000,   3,      3,    2,    960,    /*filter_LP3_90H,*/     filter_LP3_90H_fx,          L_FILT32k,     L_FILT32k,           0,          0			},
												  	     
    {  48000, 48000, 12800, 12800,   4,      4,    15,   256,    /*filter_LP15_180H,*/   filter_LP15_180H_13b_fx,    L_FILT48k,     L_FILT48k,           0,          0			},
	{  48000, 48000, 16000, 16000,   4,      4,    12,   320,    /*filter_LP12_180H,*/   filter_LP12_180H_13b_fx,    L_FILT48k,     L_FILT48k,           0,          0			},
	{  48000, 48000, 25600, 25600,   8,      8,    15,   512,    /*filter_LP15_360H,*/   filter_LP15_360H_13b_fx,    L_FILT48k,     L_FILT48k,		     0,          0			},
	{  48000, 48000, 32000, 32000,   2,      2,    3,    640,    /*filter_LP3_90H,*/     filter_LP3_90H_fx,          L_FILT48k,     L_FILT48k,		     0,          0			},
    {  8000,  12800,   8,    5,     256,    /*filter5_39s320_120,*/ filter5_39s320_120_fx,       15,                RS_INV_FAC    },
	{  12800, 8000,    5,    8,     160,    /*filter5_39s320_120,*/ filter5_39s320_120_fx,       L_FILT_UP8k,       RS_INV_FAC    },
	{  16000, 8000,    6,    12,    160,    /*filter_LP12_180H,*/   filter_LP12_180H_fx,         180 / 6,             0           },
	{  12800, 16000,   15,   12,    320,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,         L_FILT_UP16k,        0           },
	{  12800, 32000,   15,   6,     640,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,         L_FILT_UP32k,        0           },
	{  12800, 48000,   15,   4,     960,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,         L_FILT_UP48k,        0           },
																								    
    {  16000, 12800,    12,    15,   256,    /*filter_LP15_180H,*/   filter_LP15_180H_fx,        L_FILT16k,           0,                 },
	{  16000, 32000,    12,    6,    640,    /*filter_LP12_180H, */  filter_LP12_180H_fx,        L_FILT16k,           0,                 },
	{  16000, 48000,    12,    4,    960,    /*filter_LP12_180H,*/   filter_LP12_180H_fx,        L_FILT16k,           0,                 },
							   
    {  32000, 12800,    6,	   15,    256,    /*filter_LP15_180H,*/   filter_LP15_180H_13b_fx,    L_FILT32k,           0,      			},
	{  32000, 16000,    6,	   12,    320,    /*filter_LP12_180H,*/   filter_LP12_180H_13b_fx,    L_FILT32k,           0,      			},
	{  32000, 25600,    12,    15,   512,    /*filter_LP15_360H,*/   filter_LP15_360H_13b_fx,    L_FILT32k,           0,       		},
	{  32000, 48000,    3,     2,    960,    /*filter_LP3_90H,*/     filter_LP3_90H_fx,          L_FILT32k,           0,       		},
							     
    {  48000, 12800,    4,     15,   256,    /*filter_LP15_180H,*/   filter_LP15_180H_13b_fx,    L_FILT48k,           0,       		},
	{  48000, 16000,    4,     12,   320,    /*filter_LP12_180H,*/   filter_LP12_180H_13b_fx,    L_FILT48k,           0,       		},
	{  48000, 25600,    8,     15,   512,    /*filter_LP15_360H,*/   filter_LP15_360H_13b_fx,    L_FILT48k,		     0,        		},
	{  48000, 32000,    2,     3,    640,    /*filter_LP3_90H,*/     filter_LP3_90H_fx,          L_FILT48k,		     0,        		},
												  
    /* configs with NB 4kHz low-pass */			  
    {  16000, 16000, 12800, 12800,   12,     12,   15,   256,    /*filter_LP24_90H,*/    filter_LP24_90H_fx,        L_FILT16k,      L_FILT16k,		     0,          0			},
	{  32000, 32000, 12800, 12800,   6,      6,    15,   256,    /*filter_LP24_90H,*/    filter_LP24_90H_13b_fx,    L_FILT32k,      L_FILT32k,           0,          0			},
	{  48000, 48000, 12800, 12800,   4,      4,    15,   256,    /*filter_LP24_90H,*/    filter_LP24_90H_13b_fx,    L_FILT48k,      L_FILT48k,           0,          0			},
    {  16000, 12800,   12,     15,   256,    /*filter_LP24_90H,*/    filter_LP24_90H_fx,         L_FILT16k,		     0,        		},
	{  32000, 12800,   6,      15,   256,    /*filter_LP24_90H,*/    filter_LP24_90H_13b_fx,     L_FILT32k,           0,       		},
	{  48000, 12800,   4,      15,   256,    /*filter_LP24_90H,*/    filter_LP24_90H_13b_fx,     L_FILT48k,           0,       		},
    /* entry for LFE PLC */
    {  1600,  1600,  48000, 48000,   30,     30,   1,     960,   /*filter_LP30_300K,*/   filter_LP30_300K_fx,       LFE_PLC_FDEL/30,LFE_PLC_FDEL / 30,   0,          0           },
    {  0,     0,      0,        0,    0,      0,   0,       0,    /*              0, */                    0,               0,           0,              0,          0           } /* trailing entry (just to calculate the length of this table) */
    {  1600,  48000,    30,      1,     960,   /*filter_LP30_300K,*/   filter_LP30_300K_fx,      LFE_PLC_FDEL / 30,   0,                 },
    {  0,      0,        0,      0,       0,    /*              0, */                    0,          0,              0,                 } /* trailing entry (just to calculate the length of this table) */
};
//den fac value for last entry is calculated as den.fac = (num.fac*fin)/fout
+4 −12
Original line number Diff line number Diff line
@@ -49,13 +49,8 @@
#define INTERP_EXP 0
typedef struct
{
    Word32 fin;    /* input frequency                   */
    Word32 fin_fx;     /* input frequency                   Q0	*/

    Word32 fout;    /* output frequency                  */
    Word32 fout_fx;    /* output frequency                  Q0	*/

    Word16 fac_num;    /* numerator of resampling factor    */
    Word16 fac_num_fx; /* numerator of resampling factor    Q0	*/

    Word16 fac_den_fx; /* denominator of resampling factor  Q0	*/
@@ -63,10 +58,7 @@ typedef struct

    const Word16 *filter_fx; /* resampling filter coefficients    Q14	*/

    Word16 filt_len;    /* number of filter coeff.           */
    Word16 filt_len_fx; /* number of filter coeff.			Q0	*/

    UWord16 flags;    /* flags from config. table          */
    UWord16 flags_fx;   /* flags from config. table          Q0	*/
                        // UNS_Word16 flags_fx;     /* flags from config. table          Q0	*/

Loading