Commit ec843afa authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

MSAN fixes, LTV crash fixes, Float code cleanup in MC and renderer

[x] MSAN fixes for stereo cases
[x] Fixes for few LTV crashes
[x] Float code cleanup in Multichannel config
[x] Float code cleanup in lib_rend module
parent 15656fb4
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -274,7 +274,11 @@ void tcx_arith_scale_envelope(

    tmp2 = BASOP_Util_Add_MantExp(negate(b), b_e, tmp, tmp2, &scale);
    scale = BASOP_Util_Divide1616_Scale(scale, round_fx(a), &tmp);
#ifdef BASOP_NOGLOB
    scale = shl_o(scale, sub(sub(add(tmp, tmp2), a_e), 1), &Overflow); /* Q15 */
#else
    scale = shl(scale, sub(sub(add(tmp, tmp2), a_e), 1)); /* Q15 */
#endif

    /* iscale = 1.0f / scale; */
    iscale_e = 0;
+11 −1
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include <string.h>
#include "stl.h"
#include <assert.h>

#ifdef WMOPS
static double frameRate = FRAME_RATE;   /* default value : 10 ms */
#endif /* ifdef WMOPS */
@@ -854,9 +855,11 @@ void generic_WMOPS_output (Word16 dtx_mode, char *test_file_name) {
/* FROM_EVS_DEV */

#define MAX_STACK       64
#if WMOPS
static int stack[MAX_STACK];
static int sptr;
static int sum_stack[MAX_STACK];
#endif

/* jdr 20120117: add FLC similar functions */
void BASOP_frame_update(void)
@@ -1062,6 +1065,7 @@ void BASOP_push_wmops (const char *label)
#endif

#endif /* if WMOPS */
  UNUSED_PARAM(label);
}


@@ -1115,7 +1119,9 @@ Word32 BASOP_get_wops (void)
#define MILLION_CYCLES     1e6
#define FAC               (FRAMES_PER_SECOND/MILLION_CYCLES)

#if WMOPS
static Word32 prom_cnt = 0;
#endif

void WMOPS_destroy(void)
{
@@ -1292,6 +1298,7 @@ void WMOPS_output_all(Word16 dtx_mode)
  WMOPS_destroy();

#endif /* if WMOPS */
  UNUSED_PARAM(dtx_mode);
}
void WMOPS_output_all_std(Word16 dtx_mode)
{
@@ -1392,6 +1399,7 @@ void WMOPS_output_all_std(Word16 dtx_mode)
  WMOPS_destroy();

#endif /* if WMOPS */
  UNUSED_PARAM(dtx_mode);
}


@@ -1431,6 +1439,8 @@ void BASOP_get_total_wmops(double *min, double *max, double *avg)
    *avg = (nbframe[0] == 0) ? 0 : ops_cnt / nbframe[0];
  }
#endif /* if WMOPS */
  UNUSED_PARAM(min);
  UNUSED_PARAM(max);
  UNUSED_PARAM(avg);
}

/* end of file */
+4 −4
Original line number Diff line number Diff line
@@ -258,8 +258,8 @@ void Inac_switch_ematch_ivas_fx(
                FOR(j = 0; j < 8; j++)
                {
                    L_tmp = L_mult0(*pt_exc, ftmp);
                    L_tmp = L_shl(L_tmp, add(exp, 15));  /* Q(Q_exc) -> Q(15+Q_exc)*/
                    *pt_exc = round_fx(L_tmp);           /*Q_exc - 1*/
                    L_tmp = L_shl_sat(L_tmp, add(exp, 15));  /* Q(Q_exc) -> Q(15+Q_exc)*/
                    *pt_exc = round_fx_sat(L_tmp);           /*Q_exc - 1*/
                    pt_exc++;
                }
            }
@@ -268,8 +268,8 @@ void Inac_switch_ematch_ivas_fx(
                FOR(j = 0; j < 16; j++)
                {
                    L_tmp = L_mult0(*pt_exc,ftmp);
                    L_tmp = L_shl(L_tmp, add(exp,15));  /* Q(Q_exc) -> Q(15+Q_exc)*/
                    *pt_exc = round_fx(L_tmp);          /*Q_exc - 1*/
                    L_tmp = L_shl_sat(L_tmp, add(exp,15));  /* Q(Q_exc) -> Q(15+Q_exc)*/
                    *pt_exc = round_fx_sat(L_tmp);          /*Q_exc - 1*/
                    pt_exc++;
                }
            }
+3 −1
Original line number Diff line number Diff line
@@ -6723,7 +6723,7 @@ void ivas_ls_setup_conversion_process_mdct(
void ivas_ls_setup_conversion_process_mdct_param_mc_fx(
    Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure          */
    Word32 *x_fx[][NB_DIV],       /* i/o: Fixed output synthesis signal         */
    Word16 x_e[MAX_CICP_CHANNELS][NB_DIV]/* i/o: Exponent for output synthesis signal */
    Word16 x_e[CPE_CHANNELS][NB_DIV]/* i/o: Exponent for output synthesis signal */
);
#endif // IVAS_FLOAT_FIXED

@@ -7234,6 +7234,7 @@ void ivas_merge_masa_transports(
    const int16_t num_transport_channels                        /* i  : Number of transport audio signals       */
);

#ifndef IVAS_FLOAT_FIXED
ivas_error ivas_omasa_data_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder handle                     */
);
@@ -7241,6 +7242,7 @@ ivas_error ivas_omasa_data_open(
void ivas_omasa_data_close(
    MASA_ISM_DATA_HANDLE *hMasaIsmData                          /* i/o: MASA_ISM rendering handle               */
);
#endif

ivas_error ivas_omasa_ism_metadata_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
+16 −1
Original line number Diff line number Diff line
@@ -1399,7 +1399,7 @@ void ivas_mdct_core_tns_ns_fx(
    Word32 *x_fx[CPE_CHANNELS][NB_DIV],                          /* o  : synthesis @internal_FS                 */
    Word32 Aq_fx[CPE_CHANNELS][(NB_SUBFR16k + 1) * (M + 1)], /* o  : LP coefficients                        */
    const Word16 MCT_flag,                                   /* i  : hMCT handle allocated (1) or not (0)   */
    Word16 x_e[MAX_CICP_CHANNELS][NB_DIV]
    Word16 x_e[CPE_CHANNELS][NB_DIV]
);

void decoder_tcx_imdct_fx(
@@ -2185,4 +2185,19 @@ void ivas_param_mc_dec_read_BS_fx(
    PARAM_MC_DEC_HANDLE hParamMC,   /* i/o: decoder ParamMC handle  */
    Word16 *nb_bits                /* o  : number of bits written  */
);

ivas_error ivas_omasa_data_open_fx(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder handle                     */
);

void ivas_omasa_data_close_fx(
    MASA_ISM_DATA_HANDLE *hMasaIsmData                          /* i/o: MASA_ISM rendering handle               */
);

ivas_error ivas_mc_dec_config_fx(
    Decoder_Struct *st_ivas,    /* i/o: IVAS decoder structure                */
    const Word16 idx,          /* i  : LS config. index                      */
    UWord16 *nSamplesRendered, /* o  : samples flushed from last frame (JBM) */
    Word16 *data /* o  : output synthesis signal                 */
);
#endif
Loading