Commit bb3d4be6 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

add address fix

parent ca21257e
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@

#define NONBE_MR2809
#define FIX_2436_RENDERER_CLDFBSTATES_EACH_ISM_INPUT
#define FIX_2436_CLDFBANAHANDLE_ADRESS

/* ##################### End NON-BE switches ########################### */

+18 −1
Original line number Diff line number Diff line
@@ -4400,7 +4400,7 @@ static ivas_error isar_pre_rend_init(
        }
#ifdef FIX_2436_RENDERER_CLDFBSTATES_EACH_ISM_INPUT
        /*call with additional flag to indicate long ana states*/
        IF( ( error = ISAR_PRE_REND_open( pSplitRendWrapper, pSplit_rend_config, outputSampleRate, cldfb_in_flag, outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM, num_subframes, 0, 0 /*1*/ ) ) != IVAS_ERR_OK )
        IF( ( error = ISAR_PRE_REND_open( pSplitRendWrapper, pSplit_rend_config, outputSampleRate, cldfb_in_flag, outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM, num_subframes, 0, 1 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
@@ -7129,7 +7129,11 @@ static ivas_error renderIsmToSplitBinaural(
                                         &tmpBinaural_CldfbRe[BINAURAL_CHANNELS * pos_idx + ch][slot_idx][0],
                                         &tmpBinaural_CldfbIm[BINAURAL_CHANNELS * pos_idx + ch][slot_idx][0],
                                         num_bands,
#ifdef FIX_2436_CLDFBANAHANDLE_ADRESS
                                         ismInput->base.ctx.pSplitRendWrapper->hCldfbHandles->cldfbAna[BINAURAL_CHANNELS * pos_idx + ch],
#else
                                         ismInput->base.ctx.pSplitRendWrapper->hCldfbHandles->cldfbAna[pos_idx + ch],
#endif
                                         &q_cldfb );
                }
            }
@@ -7224,12 +7228,21 @@ static void renderActiveInputsIsm_manageCldfbAnaStates(
        {
            FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
            {
#ifdef FIX_2436_CLDFBANAHANDLE_ADRESS_
                Word32 **pCurStatePtr = &( pCurCldfbAna[BINAURAL_CHANNELS * pos_idx + ch]->cldfb_state_fx );
                int states_len = sub( pCurCldfbAna[BINAURAL_CHANNELS * pos_idx + ch]->p_filter_length, pCurCldfbAna[BINAURAL_CHANNELS * pos_idx + ch]->no_channels );
#else
                Word32 **pCurStatePtr = &( pCurCldfbAna[pos_idx + ch]->cldfb_state_fx );
                int states_len = sub( pCurCldfbAna[pos_idx + ch]->p_filter_length, pCurCldfbAna[pos_idx + ch]->no_channels );
#endif

                IF( EQ_32( MODE, 0 ) ) /*MODE 0 = Backup*/
                {
#ifdef FIX_2436_CLDFBANAHANDLE_ADRESS_
                    cldfb_states_orig[BINAURAL_CHANNELS * pos_idx + ch] = (Word32) ( *pCurStatePtr );
#else
                    cldfb_states_orig[pos_idx + ch] = (Word32)(*pCurStatePtr);
#endif
                }

                IF( EQ_32( MODE, 1 ) ) /*MODE 1 = update*/
@@ -7246,7 +7259,11 @@ static void renderActiveInputsIsm_manageCldfbAnaStates(
                    /*restore if last iteration*/
                    // if ( EQ_32( i, sub( RENDERER_MAX_ISM_INPUTS, 1 ) ) )
                    {
#ifdef FIX_2436_CLDFBANAHANDLE_ADRESS_
                        *pCurStatePtr = (Word32 *) ( cldfb_states_orig[BINAURAL_CHANNELS * pos_idx + ch] );
#else
                        *pCurStatePtr = (Word32*)(cldfb_states_orig[pos_idx + ch]);
#endif
                    }
                }
            }