Commit 185e4b04 authored by multrus's avatar multrus
Browse files

merge from ivas-float-update

parents 017163c3 3665a9ce
Loading
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -552,7 +552,9 @@ ivas_error config_acelp1(
    const int16_t tdm_lp_reuse_flag,        /* i  : LPC reuse flag (can be 1 only with secondary channel */
    const int16_t tdm_low_rate_mode,        /* i  : secondary channel low rate mode flag */
    const int16_t idchan,                   /* i  : stereo channel ID               */
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
    const int16_t active_cnt, /* i  : Active frame counter            */
#endif
    const int16_t tdm_Pitch_reuse_flag, /* i  : primary channel pitch reuse flag*/
    const int16_t tdm_LRTD_flag,        /* i  : LRTD stereo mode flag           */
    const int16_t GSC_IVAS_mode         /* i  : GSC IVAS mode                   */
@@ -770,7 +772,11 @@ ivas_error config_acelp1(

            bits -= acelp_cfg->mid_lsf_bits;
        }
#ifdef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 )
#else
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 )
#endif
        {
            bits -= TDM_IC_LSF_PRED_BITS;
        }
+2 −0
Original line number Diff line number Diff line
@@ -2111,7 +2111,9 @@ void td_stereo_param_updt(
    const float lsp_old_PCh[],                                  /* i  : primary channel old LSPs                */
    const float lsf_old_PCh[],                                  /* i  : primary channel old LSFs                */
    const float pitch_buf_PCh[],                                /* i  : primary channel pitch buffer            */
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
    float tdm_lspQ_PCh[],                                       /* o  : Q LSPs for primary channel              */
#endif
    float tdm_lsfQ_PCh[],                                       /* o  : Q LSFs for primary channel              */
    float tdm_Pri_pitch_buf[],                                  /* o  : pitch values for primary channel        */
    const int16_t flag_ACELP16k,                                /* i  : ACELP@16kHz flag                        */
+44 −4
Original line number Diff line number Diff line
@@ -443,7 +443,9 @@ void td_stereo_param_updt(
    const float lsp_old_PCh[],   /* i  : primary channel old LSPs            */
    const float lsf_old_PCh[],   /* i  : primary channel old LSFs            */
    const float pitch_buf_PCh[], /* i  : primary channel pitch buffer        */
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
    float tdm_lspQ_PCh[], /* o  : Q LSPs for primary channel          */
#endif
    float tdm_lsfQ_PCh[],              /* o  : Q LSFs for primary channel          */
    float tdm_Pri_pitch_buf[],         /* o  : pitch values for primary channel    */
    const int16_t flag_ACELP16k,       /* i  : ACELP@16kHz flag                    */
@@ -456,17 +458,55 @@ void td_stereo_param_updt(
    if ( tdm_use_IAWB_Ave_lpc == 1 )
    {
        mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M );
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 );
        }
#else
        lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 );
#endif
#endif
    }
    else if ( flag_ACELP16k == 1 )
    {
#ifdef FIX_1111_TDM_LSP_BUFFER
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
        if ( tdm_lspQ_PCh != NULL )
        {
            mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
            lsp_convert_poly( tdm_lspQ_PCh, L_FRAME, 0 );
            lsp2lsf( tdm_lspQ_PCh, tdm_lsfQ_PCh, M, INT_FS_12k8 );
        }
        else
        {
#endif
            float lsp_temp[M];
            mvr2r( lsp_old_PCh, lsp_temp, M );
            lsp_convert_poly( lsp_temp, L_FRAME, 0 );
            lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 );
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
        }
#endif
#else
        mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
        lsp_convert_poly( tdm_lspQ_PCh, L_FRAME, 0 );
        lsp2lsf( tdm_lspQ_PCh, tdm_lsfQ_PCh, M, INT_FS_12k8 );
#endif
    }
    else
    {
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
        }
#else
        mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
#endif
#endif
        mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M );
    }

+4 −2
Original line number Diff line number Diff line
@@ -190,15 +190,17 @@
#define CONF_DISTATT                                    /* Eri: Make distance attenuation configurable */
#define FIX_1052_EXT_OUTPUT                             /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ 
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */

#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ 

#define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR          /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/
#define NONBE_FIX_MC_LFE_LPF                                  /* Dlb: Adding the LFE LPF filter back for MC content. */
#define NONBE_FIX_1052_SBA_EXT                          /* Dlb: SBA external output support */
#define FIX_1082_INSTRUM_FAILED_LC3PLUS                 /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */
#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR            /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS              /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */
#define FIX_1111_TDM_LSP_BUFFER                         /* VA: issue 1111: remove unused buffer `tdm_lspQ_PCh[]' */
#define NONBE_1325_TD_STEREO_QUANT_LSF_SEC              /* Nokia: issue 1325: fix for usage of active_cnt variable in TD stereo LSFQ */
#define NONBE_FIX_1130_DIV_ZERO_LEV_DUR                 /* VA: issue 1130: avoid div by zero in L-D by thresholding R[0] to a min value of 100.0 */


/* #################### End BASOP porting switches ############################ */

+17 −13
Original line number Diff line number Diff line
@@ -4504,7 +4504,9 @@ ivas_error acelp_core_dec(
    int16_t *unbits,                     /* o  : number of unused bits               */
    int16_t *sid_bw,                     /* o  : 0-NB/WB, 1-SWB SID                  */
    STEREO_TD_DEC_DATA_HANDLE hStereoTD, /* i/o: TD stereo decoder handle            */
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
    const float tdm_lspQ_PCh[M], /* i  : Q LSPs for primary channel          */
#endif
    const float tdm_lsfQ_PCh[M],      /* i  : Q LSFs for primary channel          */
    const int16_t use_cldfb_for_dft,  /* i  : flag to use of CLDFB for DFT Stereo */
    const int16_t last_element_mode,  /* i  : last element mode                   */
@@ -9066,7 +9068,9 @@ ivas_error config_acelp1(
    const int16_t tdm_lp_reuse_flag,        /* i  : LPC reuse flag (can be 1 only with secondary channel*/
    const int16_t tdm_low_rate_mode,        /* i  : secondary channel low rate mode flag*/
    const int16_t idchan,                   /* i  : channel id                          */
#ifndef NONBE_1325_TD_STEREO_QUANT_LSF_SEC
    const int16_t active_cnt, /* i  : Active frame counter                */
#endif
    const int16_t tdm_Pitch_reuse_flag, /* i  : primary channel pitch reuse flag    */
    const int16_t tdm_LRTD_flag,        /* i  : LRTD stereo mode flag               */
    const int16_t GSC_IVAS_mode         /* i  : GSC IVAS mode                       */
Loading