Commit 6d536ce3 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Integration of fixed point sub-functions 14.

[x] save synthesis update in core dec fix
[x] Moving intermediate FTF conversions outside wb_tbe_dec, swb_CNG_dec_ivas_fx, swb_bwe_dec
[x] Conversion of ivas_td_binaural_renderer_sf subfunctions
[x] Integerate and convert subfunctions of ivas_mc_dec_config
[x] ISM init cleanup
[x] Fix for issue #717
[x] Removes redundant flags/variables from td_cng_dec_structure
[x] Clean up of ivas_param_ism_dec_render
[x] Fix for renderer failures
parent 1d5b4a21
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1605,6 +1605,10 @@ typedef enum

#define LR_IAC_LENGTH_NR_FC                     ( RV_LENGTH_NR_FC )

#define DEG_360_IN_Q22                          (360 << Q22)
#define DEG_180_IN_Q22                          (180 << Q22)
#define DEG_90_IN_Q22                           (90 << Q22)

/* ----- Enums - TD Renderer ----- */

typedef enum
+8 −6
Original line number Diff line number Diff line
@@ -268,27 +268,29 @@ AUDIO_CONFIG ivas_mc_map_ls_setup_to_output_config(
{
    AUDIO_CONFIG audio_config;
    audio_config = IVAS_AUDIO_CONFIG_INVALID;
    move16();

    switch ( mc_ls_setup )
    SWITCH( mc_ls_setup )
    {
        case MC_LS_SETUP_5_1:
            audio_config = IVAS_AUDIO_CONFIG_5_1;
            break;
            BREAK;
        case MC_LS_SETUP_7_1:
            audio_config = IVAS_AUDIO_CONFIG_7_1;
            break;
            BREAK;
        case MC_LS_SETUP_5_1_2:
            audio_config = IVAS_AUDIO_CONFIG_5_1_2;
            break;
            BREAK;
        case MC_LS_SETUP_5_1_4:
            audio_config = IVAS_AUDIO_CONFIG_5_1_4;
            break;
            BREAK;
        case MC_LS_SETUP_7_1_4:
            audio_config = IVAS_AUDIO_CONFIG_7_1_4;
            break;
            BREAK;
        default:
            assert( 0 && "MC loudspeaker setup is not valid!\n" );
    }
	move16();

    return audio_config;
}
+9 −3
Original line number Diff line number Diff line
@@ -432,7 +432,7 @@ ivas_error ivas_mct_dec(
);

/*! r: number of channels to be synthesised */
int16_t getNumChanSynthesis(
Word16 getNumChanSynthesis(
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder structure                  */
);

@@ -1248,7 +1248,6 @@ void ivas_param_ism_dec_render_fx(
    const uint16_t nSamplesAsked,                               /* i  : number of CLDFB slots requested             */
    uint16_t *nSamplesRendered,                                 /* o  : number of CLDFB slots rendered              */
    uint16_t *nSamplesAvailable,                                /* o  : number of CLDFB slots still to render       */
    float *output_f[],                                           /* o  : rendered time signal                        */
    Word32 *output_f_fx[]
);
void ivas_param_ism_params_to_masa_param_mapping_fx(
@@ -4139,7 +4138,7 @@ int16_t ivas_get_hodirac_flag(
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);

int16_t ivas_get_sba_dirac_stereo_flag(
Word16 ivas_get_sba_dirac_stereo_flag(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);

@@ -5112,6 +5111,13 @@ ivas_error ivas_sba_dec_render(
    uint16_t *nSamplesAvailable,                                /* o  : number of CLDFB slots still to render   */
    float *output_f[]                                           /* o  : rendered time signal                    */
);
#ifdef IVAS_FLOAT_FIXED
void ivas_spar_dec_upmixer_sf_fx(
    Decoder_Struct *st_ivas,     /* i/o: IVAS decoder handle                     */
    float *output[],             /* o  : output audio channels                   */
    const Word16 nchan_internal /* i  : number of internal channels             */
);
#endif // IVAS_FLOAT_FIXED

void ivas_spar_dec_upmixer_sf(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
+2 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
#define NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS                /* VA: issue 820: Double precision arithmetic in combined formats */
#define NONBE_FIX_849_OMASA_BFI_CRASH                         /* VA: issue 849: fix OMASA 2TC and FEC crashes */
#define IVAS_FLOAT_FIXED
#define ISM_DISABLE
#define FIX_TMP_714
#define BASOP_NOGLOB_TMP_715
#define EVS_FUNC_MODIFIED
@@ -117,5 +118,6 @@
/* ################## End DEVELOPMENT switches ######################### */

/* clang-format on */
#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO

#endif
+9 −16
Original line number Diff line number Diff line
@@ -2677,19 +2677,12 @@ void ivas_swb_tbe_dec_fx(
    STEREO_ICBWE_DEC_HANDLE hStereoICBWE, /* i/o: IC-BWE state structure          */
    const Word32 *bwe_exc_extended_fx,    /* i  : bandwidth extended excitation   */
    Word16 Q_exc,
  //const float voice_factors[],          /* i  : voicing factors                 */
    const Word16 voice_factors_fx[],    /* i  : voicing factors                 */
  //const float old_syn_12k8_16k[],       /* i  : low band synthesis              */
    const Word32 old_syn_12k8_16k_fx[], /* i  : low band synthesis              */
    Word16 *White_exc16k_fx,            /* o  : shaped white excitation for the FB TBE */
    Word32 *synth_fx,                   /* o  : SHB synthesis/final synthesis   */
    Word16 *pitch_buf_fx,
    Word16 *Q_white_exc );
/* Below 2 function to be cleaned up when intermediate float buffer maintenance is removed */
void ivas_swb_tbe_dec_float2fix(Decoder_State *st, STEREO_ICBWE_DEC_HANDLE hStereoICBWE);
void ivas_swb_tbe_dec_fix2float(Decoder_State *st, STEREO_ICBWE_DEC_HANDLE hStereoICBWE/*, Word16 Q_bwe_exc_orig*/);
#endif
void swb_tbe_dec(
    Decoder_State *st,                    /* i/o: decoder state structure                 */
Loading