Commit 77af7675 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

use new ivas_CLDFB_RINGBUF_GetByIdx in DEBUGGING code too

parent ab5ed9bb
Loading
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -1301,6 +1301,9 @@ void ivas_binaural_cldfb(
    float Cldfb_ImagBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
    float *re, *im;
#endif
    int16_t slot_idx, subframeIdx, index_slot, idx_in, idx_lfe, maxBand, ch;

    /* Implement a 5 msec loops */
@@ -1396,8 +1399,14 @@ void ivas_binaural_cldfb(
                                   maxBand );
                        }

#ifdef FIX_1119_SPLIT_RENDERING_VOIP
                        ivas_CLDFB_RINGBUF_GetByIdx( st_ivas->hSplitBinRend->hMultiBinCldfbData[( pos_idx * BINAURAL_CHANNELS ) + ch], &re, &im, ( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx );
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], re, maxBand );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], im, maxBand );
#else
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
#endif
                    }
                }
            }
@@ -1445,6 +1454,9 @@ void ivas_binaural_cldfb_sf(
    float Cldfb_ImagBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
    float *re, *im;
#endif
    int16_t slot_idx, subframeIdx, index_slot, idx_in, idx_lfe, maxBand, ch;
    int16_t slots_to_render, first_sf, last_sf;
    int16_t slot_index_start, slot_index_start_cldfb;
@@ -1537,8 +1549,14 @@ void ivas_binaural_cldfb_sf(
                {
                    for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
                    {
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
                        ivas_CLDFB_RINGBUF_GetByIdx( st_ivas->hSplitBinRend->hMultiBinCldfbData[( pos_idx * BINAURAL_CHANNELS ) + ch], &re, &im, slot_index_start + slot_idx );
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], re, maxBand );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], im, maxBand );
#else
                        mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand );
                        mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand );
#endif
                    }
                }
            }