Commit 303be3ab authored by emerit's avatar emerit
Browse files

compiling

parent e1c6ff6b
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -905,7 +905,7 @@ typedef struct ivas_dirac_dec_binaural_data_structure
    float processMtxDecRePrev[BINAURAL_CHANNELS][BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX];
    float processMtxDecImPrev[BINAURAL_CHANNELS][BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX];
#ifdef IVAS_FLOAT_FIXED
    Word32 earlyPartEneCorrection_fx[CLDFB_NO_CHANNELS_MAX];
    Word16 earlyPartEneCorrection_fx[CLDFB_NO_CHANNELS_MAX];
    Word16 q_earlyPartEneCorrection;
    Word16 processMtxRe_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS + MAX_NUM_OBJECTS][CLDFB_NO_CHANNELS_MAX];
    Word16 processMtxIm_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS + MAX_NUM_OBJECTS][CLDFB_NO_CHANNELS_MAX];
@@ -1309,8 +1309,7 @@ typedef struct ivas_rev_delay_line_t
#else
    Word16 Gain_fx;
#endif
}
ivas_rev_delay_line_t;
} ivas_rev_delay_line_t;

typedef struct ivas_rev_iir_filter_t
{
@@ -1985,6 +1984,19 @@ typedef struct ivas_hrtfs_structure
{
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
    Word16 factor_Q_pOut_to_bin_fx;
#endif
#ifdef FIX_GEN_CREND_ROM
    float *pOut_to_bin_re[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];
    float *pOut_to_bin_im[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];
    float *pOut_to_bin_diffuse_re[BINAURAL_CHANNELS];
    float *pOut_to_bin_diffuse_im[BINAURAL_CHANNELS];
    float latency_s;
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
    float inv_diffuse_weight[BINAURAL_CHANNELS][MAX_INTERN_CHANNELS]; /* inverse diffuse weights array, access one inverse weight by pInvDiffuseWeight[channel] */
#else
    float inv_diffuse_weight[MAX_INTERN_CHANNELS]; /* inverse diffuse weights array, access one inverse weight by pInvDiffuseWeight[channel] */
#endif
    float gain_lfe;
#endif
    Word32 *pOut_to_bin_re_fx[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];
    Word32 *pOut_to_bin_im_fx[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS];
+201 −180
Original line number Diff line number Diff line
@@ -14607,7 +14607,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init(
    }
    ELSE IF( EQ_16( renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) /* Indication of binaural rendering with room effect */
    {
        Copy32( hHrtfParambin->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins );
        Copy( hHrtfParambin->parametricEarlyPartEneCorrection_fx, hDiracDecBin->earlyPartEneCorrection_fx, nBins );
        IF( hDiracDecBin->hReverb == NULL )
        {
@@ -14955,12 +14955,12 @@ static ivas_error initMasaExtRenderer(
    {
        IF( NE_16( hMasaExtRend->renderer_type, RENDERER_STEREO_PARAMETRIC ) )
        {
            IF( ( error = ivas_dirac_dec_binaural_copy_hrtfs_fx( &inputMasa->hMasaExtRend->hHrtfParambin ) ) != IVAS_ERR_OK )
            IF( ( error = ivas_dirac_dec_binaural_copy_hrtfs_fx( inputMasa->hMasaExtRend->hHrtfParambin ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#if 1  /*TODO: To be removed later after dependency on floating buffers in hHrtfParambin is removed*/
            if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &inputMasa->hMasaExtRend->hHrtfParambin ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( inputMasa->hMasaExtRend->hHrtfParambin ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -15187,8 +15187,7 @@ static void intermidiate_ext_dirac_render(
    MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA renderer structure             */
    Word32 *output_f[],                /* i/o: input/output signals in time domain */
    float *output_f_flt[],             /* i/o: input/output signals in time domain */
    Word16 to_fix
)
    Word16 to_fix )
{
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom;
@@ -15221,7 +15220,8 @@ static void intermidiate_ext_dirac_render(
            floatToFixed_arrL( output_f_flt[i], output_f[i], q_cldfb, L_FRAME48k );
        }
        for(slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++){
        for ( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++ )
        {
            IF( EQ_16( hDirACRend->panningConf, DIRAC_PANNING_VBAP ) )
            {
                hDirACRend->h_output_synthesis_psd_state.direct_responses_q = 30;
@@ -15265,16 +15265,20 @@ static void intermidiate_ext_dirac_render(
            }
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth )
        {
            hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_len );
            floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev){
        hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev = L_get_q_buf1(hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_len);;
        if ( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev )
        {
            hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_len );
            ;
            floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth )
        {
            hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth, hDirACRend->num_outputs_dir * hSpatParamRendCom->num_freq_bands );
            floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_len );
        }
@@ -15284,13 +15288,16 @@ static void intermidiate_ext_dirac_render(
        {
            num_channels_dir = hDirACRend->hOutSetup.nchan_out_woLFE;
        }
        if(h_dirac_output_synthesis_state->cy_auto_diff_smooth){
        if ( h_dirac_output_synthesis_state->cy_auto_diff_smooth )
        {
            h_dirac_output_synthesis_state->q_cy_auto_diff_smooth = L_get_q_buf( h_dirac_output_synthesis_state->cy_auto_diff_smooth, num_channels_dir * hSpatParamRendCom->num_freq_bands );
            floatToFixed_arrL( h_dirac_output_synthesis_state->cy_auto_diff_smooth, h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx, h_dirac_output_synthesis_state->q_cy_auto_diff_smooth, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev){
        hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev = L_get_q_buf1(hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_len);;
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev )
        {
            hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_len );
            ;
            floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_len );
        }
@@ -15298,7 +15305,8 @@ static void intermidiate_ext_dirac_render(
        hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q = Q26;
        floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_q, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_len );
        floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_len );
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev )
        {
            hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev, hSpatParamRendCom->num_freq_bands * hDirACRend->num_outputs_dir );
            floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_len );
        }
@@ -15325,7 +15333,8 @@ static void intermidiate_ext_dirac_render(
                /*for (i = 0; i < CLDFB_NO_CHANNELS_MAX; i++) {
                    output_f_fx[ch][hSpatParamRendCom->num_freq_bands * index_slot + i] = (Word32)(output_f[ch][hSpatParamRendCom->num_freq_bands * index_slot + i] * (1 << q_cldfb));
                }*/
                for (i = 0; i < hMasaExtRend->cldfbAnaRend[ch]->p_filter_length - hMasaExtRend->cldfbAnaRend[ch]->no_channels; i++) {
                for ( i = 0; i < hMasaExtRend->cldfbAnaRend[ch]->p_filter_length - hMasaExtRend->cldfbAnaRend[ch]->no_channels; i++ )
                {
                    hMasaExtRend->cldfbAnaRend[ch]->cldfb_state_fx[i] = (Word32) ( hMasaExtRend->cldfbAnaRend[ch]->cldfb_state[i] * ( 1 << ( hMasaExtRend->cldfbAnaRend[ch]->Q_cldfb_state ) ) );
                }
            }
@@ -15335,7 +15344,8 @@ static void intermidiate_ext_dirac_render(
            // f2me_buf(DirAC_mem.frame_dec_f, DirAC_mem.frame_dec_f_fx, &hDirACRend->proto_frame_dec_f_q, DirAC_mem.frame_dec_f_len);
        }
        hDirACRend->proto_frame_dec_f_q = 31 - hDirACRend->proto_frame_dec_f_q;
        if(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth )
        {
            hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands );
            hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->num_protos_dir * hSpatParamRendCom->num_freq_bands );
            floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_len );
@@ -15355,7 +15365,8 @@ static void intermidiate_ext_dirac_render(
        {
            q_cldfb = 11;
            hMasaExtRend->cldfbAnaRend[0]->Q_cldfb_state = q_cldfb;
             for (i = 0; i < hMasaExtRend->cldfbSynRend[ch]->p_filter_length; i++) {
            for ( i = 0; i < hMasaExtRend->cldfbSynRend[ch]->p_filter_length; i++ )
            {
                hMasaExtRend->cldfbSynRend[ch]->cldfb_state_fx[i] = (Word32) ( hMasaExtRend->cldfbSynRend[ch]->cldfb_state[i] * ( 1 << ( hMasaExtRend->cldfbAnaRend[0]->Q_cldfb_state - 1 ) ) );
            }
        }
@@ -15384,31 +15395,40 @@ else
        {
            fixedToFloat_arrL( DirAC_mem.reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, DirAC_mem.reference_power_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth, hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev){
        if ( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.gains_dir_prev){
        if ( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_q, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.gains_diff_prev){
        if ( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_len );
        }
        if(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len );
        }
        fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_len );
@@ -15432,12 +15452,14 @@ else
            /* CLDFB Analysis*/
            FOR( ch = 0; ch < nchan_transport; ch++ )
            {
                for (i = 0; i < hMasaExtRend->cldfbAnaRend[ch]->p_filter_length - hMasaExtRend->cldfbAnaRend[ch]->no_channels; i++) {
                for ( i = 0; i < hMasaExtRend->cldfbAnaRend[ch]->p_filter_length - hMasaExtRend->cldfbAnaRend[ch]->no_channels; i++ )
                {
                    hMasaExtRend->cldfbAnaRend[ch]->cldfb_state[i] = (float) ( hMasaExtRend->cldfbAnaRend[ch]->cldfb_state_fx[i] / ( 1 << ( hMasaExtRend->cldfbAnaRend[0]->Q_cldfb_state ) ) );
                }
            }
        }
        if(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth){
        if ( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth )
        {
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_len );
            fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len );
        }
@@ -15458,6 +15480,5 @@ else
            fixedToFloat_arrL( output_f[i], output_f_flt[i], hMasaExtRend->cldfbSynRend[0]->Q_cldfb_state, L_FRAME48k );
        }
    }
}
#endif
 No newline at end of file
+592 −2

File changed.

Preview size limit exceeded, changes collapsed.