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

Merge branch 'enc_cleanup_Q_info_dec' into 'main'

MASA and SBA path functions conversion, cleanup and MSAN error fixes

See merge request !685
parents 53914e3b 942d7bf3
Loading
Loading
Loading
Loading
+43 −39
Original line number Diff line number Diff line
@@ -966,8 +966,8 @@ void smooth_dft2td_transition(

void smooth_dft2td_transition_fx(
    CPE_DEC_HANDLE hCPE,             /* i/o: CPE decoder structure			 */
  Word32 *output_fx[CPE_CHANNELS], /* i/o: synthesis @external Fs       */
  const Word16 output_frame   /* i  : output frame lenght          */
    Word32 *output_fx[CPE_CHANNELS], /* i/o: synthesis @external Fs       Q11*/
    const Word16 output_frame        /* i  : output frame lenght           Q0*/
);
/*! r: flag indicating a valid bitrate */
int16_t is_IVAS_bitrate(
@@ -2759,7 +2759,7 @@ void stereo_td_init_dec(

void stereo_td_init_dec_fx(
  STEREO_TD_DEC_DATA_HANDLE hStereoTD,                        /* i/o: TD stereo decoder handle                */
  const Word16 last_element_mode                             /* i  : last element mode                       */
  const Word16 last_element_mode                             /* i  : last element mode                       Q0*/
);

void tdm_configure_dec(
@@ -2783,15 +2783,15 @@ void tdm_upmix_plain(
);

void tdm_upmix_plain_fx(
  Word32 Left_fx[],                 /* o  : left channel            */
  Word32 Right_fx[],                /* o  : right channel           */
  const Word32 PCh_2_L_fx[],        /* i  : primary channel         */
  const Word32 SCh_2_R_fx[],        /* i  : secondary channel       */
  const Word32 LR_ratio_fx,         /* i  : mixing ratio            */
  const Word32 inv_den_LR_ratio_fx, /* i  : inverse mixing ration   */
  const Word16 start_index,    /* i  : start index             */
  const Word16 end_index,      /* i  : end index               */
  const Word16 plus_minus_flag /* i  : plus/minus flag         */
    Word32 Left_fx[],                 /* o  : left channel            Qx*/
    Word32 Right_fx[],                /* o  : right channel           Qx*/
    const Word32 PCh_2_L_fx[],        /* i  : primary channel         Qx*/
    const Word32 SCh_2_R_fx[],        /* i  : secondary channel       Qx*/
    const Word32 LR_ratio_fx,         /* i  : mixing ratio            Q31*/
    const Word32 inv_den_LR_ratio_fx, /* i  : inverse mixing ration   Q31*/
    const Word16 start_index,         /* i  : start index             Q0*/
    const Word16 end_index,           /* i  : end index               Q0*/
    const Word16 plus_minus_flag      /* i  : plus/minus flag         Q0*/
);

void stereo_tdm_combine(
@@ -2805,11 +2805,11 @@ void stereo_tdm_combine(

void stereo_tdm_combine_fx(
    CPE_DEC_HANDLE hCPE,       /* i/o: CPE decoder structure                       */
  Word32 *PCh_2_L_fx,         /* i/o: Primary channel -> output as left channel   */
  Word32 *SCh_2_R_fx,         /* i/o: Secondary channel -> output as right channel*/
  const Word16 output_frame, /* i  : Number of samples                           */
  const Word16 flag_HB,      /* i  : flag to distinguish between core (0) and HB (1) synthesis */
  const Word16 tdm_ratio_idx /* i  : TDM ratio index                             */
    Word32 *PCh_2_L_fx,        /* i/o: Primary channel -> output as left channel					Qx*/
    Word32 *SCh_2_R_fx,        /* i/o: Secondary channel -> output as right channel					Qx*/
    const Word16 output_frame, /* i  : Number of samples											Q0*/
    const Word16 flag_HB,      /* i  : flag to distinguish between core (0) and HB (1) synthesis	Q0*/
    const Word16 tdm_ratio_idx /* i  : TDM ratio index												Q0*/
);
#ifdef IVAS_FLOAT_FIXED
Word16 tdm_lp_comparison_fx(
@@ -3663,8 +3663,8 @@ void applyDmxMdctStereo(

void applyDmxMdctStereo_fx(
  const CPE_DEC_HANDLE hCPE,                                  /* i  : CPE handle								   */
  Word32 *output_fx[CPE_CHANNELS],                                /* o  : output from core decoder                */
  const Word16 output_frame                                  /* i  : output frame length                     */
  Word32 *output_fx[CPE_CHANNELS],                            /* o  : output from core decoder                q_out*/
  const Word16 output_frame                                   /* i  : output frame length						 Q0*/
);


@@ -4104,7 +4104,7 @@ void stereo_switching_enc(
#endif
void stereo_switching_dec(
    CPE_DEC_HANDLE hCPE,                                        /* i/o: CPE decoder structure                   */
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
    const Word32 ivas_total_brate                               /* i  : IVAS total bitrate                    Q0*/
);

void stereo_td2dft_update(
@@ -4118,11 +4118,11 @@ void stereo_td2dft_update(

void stereo_td2dft_update_fx(
    CPE_DEC_HANDLE hCPE,      /* i/o: CPE decoder structure     */
  const Word16 n,           /* i  : channel number          */
  Word32 output_fx[],            /* i/o: synthesis @internal Fs  */
  Word32 synth_fx[],             /* i/o: synthesis @output Fs    */
  Word32 hb_synth_fx[],          /* i/o: hb synthesis            */
  const Word16 output_frame /* i  : frame length            */
    const Word16 n,           /* i  : channel number          Q0*/
    Word32 output_fx[],       /* i/o: synthesis @internal Fs  Q11*/
    Word32 synth_fx[],        /* i/o: synthesis @output Fs    Q11*/
    Word32 hb_synth_fx[],     /* i/o: hb synthesis            Q11*/
    const Word16 output_frame /* i  : frame length            Q0*/
);
void stereo_mdct2dft_update(
    CPE_DEC_HANDLE hCPE,                                        /* i/o: CPE decoder structure                   */
@@ -4132,8 +4132,8 @@ void stereo_mdct2dft_update(

void stereo_mdct2dft_update_fx(
    CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure        */
  Word32 output0_fx[],     /* i/o: synthesis @internal Fs, ch0  */
  Word32 synth0_fx[]       /* i/o: synthesis @output Fs, ch0    */
    Word32 output0_fx[], /* i/o: synthesis @internal Fs, ch0  Q11*/
    Word32 synth0_fx[]   /* i/o: synthesis @output Fs, ch0    Q11*/
);
/*! r: number of bits written */
#ifdef IVAS_FLOAT_FIXED
@@ -5878,12 +5878,12 @@ void ivas_sba_mix_matrix_determiner(

/* AGC */
/*! r: AGC enable flag */
#ifndef IVAS_FLOAT_FIXED
int16_t ivas_agc_enc_get_flag(
    const int16_t nchan_transport                               /* i  : number of transport channels            */
);

#ifdef IVAS_FLOAT_FIXED
Word16 ivas_agc_enc_get_flag_fx(
#else
Word16 ivas_agc_enc_get_flag(
  const Word16 nchan_transport /* i  : number of transport channels            */
);
#endif
@@ -7160,9 +7160,11 @@ void ivas_masa_estimate_energy(
    const int16_t nchan_transport                               /* i  : number of MASA input/transport channels         */
);

#ifndef IVAS_FLOAT_FIXED
ivas_error ivas_masa_enc_config(
    Encoder_Struct* st_ivas                                     /* i/o: IVAS encoder structure                          */
);
#endif

void ivas_masa_set_elements(
    const int32_t ivas_total_brate,                             /* i  : codec total bitrate                             */
@@ -8073,9 +8075,11 @@ void ivas_omasa_enc_close(
    OMASA_ENC_HANDLE *hOMasa                                    /* i/o: encoder OMASA handle                    */
);

#ifndef IVAS_FLOAT_FIXED
ivas_error ivas_omasa_enc_config(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
);
#endif // !IVAS_FLOAT_FIXED

ivas_error ivas_omasa_dec_config(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
@@ -8465,10 +8469,10 @@ void dequantize_sns_fx(
    Decoder_State **sts );

void inverseMS_fx(
    const Word16 L_frame,                                      /* i  : frame length                            */
    Word32 x0[],                                                 /* i/o: mid/left channel coefficients           */
    Word32 x1[],                                                 /* i/o: side/right channel coefficients         */
    const Word32 norm_fac                                        /* i  : normalization factor                    */
    const Word16 L_frame, /* i  : frame length						Q0*/
    Word32 x0[],          /* i/o: mid/left channel coefficients		Qx*/
    Word32 x1[],          /* i/o: side/right channel coefficients	Qx*/
    const Word32 norm_fac /* i  : normalization factor			   Q31*/
);

#endif
+13 −0
Original line number Diff line number Diff line
@@ -3467,4 +3467,17 @@ void ivas_omasa_encode_masa_to_total_fx(
    const Word16 low_bitrate_mode,
    const Word16 nbands,
    const Word16 nblocks );
ivas_error ivas_masa_enc_config_fx(
    Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */
);
ivas_error ivas_omasa_enc_config_fx(
    Encoder_Struct *st_ivas /* i/o: IVAS encoder structure                  */
);

void ivas_omasa_enc_close_fx(
    OMASA_ENC_HANDLE *hOMasa /* i/o: encoder OMASA handle */
);
ivas_error ivas_omasa_enc_open_fx(
    Encoder_Struct *st_ivas /* i/o: IVAS encoder handle          */
);
#endif
+1 −2
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ void ivas_spar_config_fx(
    }
    ELSE
    {
        *nchan_transport = ivas_get_sba_num_TCs( ivas_total_brate, sba_order );
        *nchan_transport = ivas_get_sba_num_TCs_fx( ivas_total_brate, sba_order );
        move16();
    }

@@ -460,7 +460,6 @@ int16_t ivas_get_sba_num_TCs(

    return nchan_transport;
}

#ifdef IVAS_FLOAT_FIXED
Word16 ivas_get_sba_num_TCs_fx(
    const Word32 ivas_total_brate, /* i  : IVAS total bitrate      */
+148 −125

File changed.

Preview size limit exceeded, changes collapsed.

+145 −145

File changed.

Preview size limit exceeded, changes collapsed.

Loading