Commit 216fae66 authored by vaclav's avatar vaclav
Browse files

fix

parent 92520238
Loading
Loading
Loading
Loading
Loading
+17 −29
Original line number Diff line number Diff line
@@ -2243,19 +2243,21 @@ static void binRenderer_split_fx(
    Word32 ImagBuffer_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],                                   /* i  : LS signals                                    */
    const Word16 slot_idx_start,
    const Word16 num_freq_bands,
    const Word16 nchan_out,
    Word16 *input_q )
    const Word16 nchan_out )
{
    Word16 pos_idx, slot_idx, ch;
    Word16 pos_idx, slot_idx, ch, input_q;
    Word32 Cldfb_RealBuffer_Binaural_loc[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
    Word32 Cldfb_ImagBuffer_Binaural_loc[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];

    input_q = Q6;
    move16();

    /* Perform binaural rendering */
    ivas_binRenderer_fx( hBinRenderer, &hSplitBinRend->splitrend.multiBinPoseData, hCombinedOrientationData, numTimeSlots,
#ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG
                         NULL,
#endif
                         Cldfb_RealBuffer_Binaural_loc, Cldfb_ImagBuffer_Binaural_loc, RealBuffer_fx, ImagBuffer_fx, input_q );
                         Cldfb_RealBuffer_Binaural_loc, Cldfb_ImagBuffer_Binaural_loc, RealBuffer_fx, ImagBuffer_fx, &input_q );

    FOR( slot_idx = 0; slot_idx < numTimeSlots; slot_idx++ )
    {
@@ -2289,15 +2291,20 @@ static void binRenderer_fx(
    Word32 Cldfb_RealBuffer_Binaural_fx[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Rotated Binaural signals                      */
    Word32 Cldfb_ImagBuffer_Binaural_fx[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Rotated Binaural signals                      */
    Word32 RealBuffer_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],                                   /* i  : LS signals                                    */
    Word32 ImagBuffer_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],                                   /* i  : LS signals                                    */
    Word16 *input_q )
    Word32 ImagBuffer_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]                                    /* i  : LS signals                                    */
)
{
    Word16 input_q;

    input_q = Q6;
    move16();

    /* Perform binaural rendering */
    ivas_binRenderer_fx( hBinRenderer, NULL, hCombinedOrientationData, numTimeSlots,
#ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG
                         NULL,
#endif
                         Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx, RealBuffer_fx, ImagBuffer_fx, input_q );
                         Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx, RealBuffer_fx, ImagBuffer_fx, &input_q );

    return;
}
@@ -3880,10 +3887,7 @@ void ivas_dirac_dec_render_sf_fx(
            st_ivas->hIsmRendererData->interp_offset_fx = add( st_ivas->hIsmRendererData->interp_offset_fx, i_mult( hSpatParamRendCom->num_freq_bands, st_ivas->hSpar->subframe_nbslots[st_ivas->hSpar->subframes_rendered] ) );
        }

        /* Perform binaural rendering */
        Word16 input_q;
        input_q = Q6;
        move16();
        /* Perform binaural rendering, output in Q6 format */
#ifdef FIX_1319_STACK_SBA_DECODER
        test();
        IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
@@ -3903,12 +3907,12 @@ void ivas_dirac_dec_render_sf_fx(
            }

            binRenderer_split_fx( st_ivas->hBinRenderer, st_ivas->hSplitBinRend, st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx],
                                  Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx, Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx, slot_idx_start, hSpatParamRendCom->num_freq_bands, st_ivas->hDecoderConfig->nchan_out, &input_q );
                                  Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx, Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx, slot_idx_start, hSpatParamRendCom->num_freq_bands, st_ivas->hDecoderConfig->nchan_out );
        }
        ELSE
        {
            binRenderer_fx( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx],
                            Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx, Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx, &input_q );
                            Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx, Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx );
        }
#else
        IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
@@ -3937,22 +3941,6 @@ void ivas_dirac_dec_render_sf_fx(
                             Cldfb_RealBuffer_fx, Cldfb_ImagBuffer_fx, &input_q );
#endif

        Word16 pos_idx;
        IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
        {
            FOR( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
            {
                FOR( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++ )
                {
                    FOR( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
                    {
                        Copy32( Cldfb_RealBuffer_Binaural_fx[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural_fx[add( i_mult( pos_idx, BINAURAL_CHANNELS ), ch )][add( slot_idx_start, slot_idx )], hSpatParamRendCom->num_freq_bands ); // Q6
                        Copy32( Cldfb_ImagBuffer_Binaural_fx[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural_fx[add( i_mult( pos_idx, BINAURAL_CHANNELS ), ch )][add( slot_idx_start, slot_idx )], hSpatParamRendCom->num_freq_bands ); // Q6
                    }
                }
            }
        }

        /* Inverse CLDFB*/
        FOR( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
        {