Commit 63061134 authored by norvell's avatar norvell
Browse files

Unify subframe pointer increment for TD renderer under FIX_550_FIRST_FRAME_ACCESS

parent 58089589
Loading
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -330,6 +330,19 @@ ivas_error ivas_td_binaural_renderer_unwrap(
        {
            return error;
        }

#ifdef FIX_550_FIRST_FRAME_ACCESS
        /* Advance subframe pointer */
        c_indx = 0;
        for ( nS = 0; nS < num_src; nS++ )
        {
            if ( !( ivas_format == MC_FORMAT && nS == lfe_idx ) ) /* Skip LFE for MC */
            {
                hBinRendererTd->Sources[c_indx]->InputFrame_p += subframe_length;
                c_indx++;
            }
        }
#endif
    }

    if ( hReverb != NULL )
@@ -407,8 +420,13 @@ ivas_error TDREND_GetMix(
        {
            pan_left = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f;
            pan_right = 1.f - pan_left;
#ifdef FIX_550_FIRST_FRAME_ACCESS
            v_multc_acc( Src_p->InputFrame_p, pan_left, output_buf[0], subframe_length );
            v_multc_acc( Src_p->InputFrame_p, pan_right, output_buf[1], subframe_length );
#else
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_left, output_buf[0], subframe_length );
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length );
#endif
        }
    }

+2 −0
Original line number Diff line number Diff line
@@ -79,7 +79,9 @@ ivas_error TDREND_REND_RenderSourceHRFilt(
    v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length );
    v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length );

#ifndef FIX_550_FIRST_FRAME_ACCESS
    Src_p->InputFrame_p += subframe_length; /* Increment input pointer */
#endif


    return IVAS_ERR_OK;