Commit 6b622cc4 authored by norvell's avatar norvell
Browse files

Cleanup and fix for asan error

parent 79372ffa
Loading
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1481,6 +1481,7 @@ void TDREND_Apply_ITD(
    int16_t prevShift;
    float *pstart1;
    float *pstart2;
    float *pstart3;
    float buffer[ITD_MEM_LEN + L_SUBFRAME5MS_48k];
    float *p_input;
    float *out_buf_A, *out_buf_B;
@@ -1504,9 +1505,10 @@ void TDREND_Apply_ITD(
        tlen1 = (int16_t) ( ( (float) ( transition_len * prevShift ) / ( (float) ( prevShift + currShift ) ) ) + 0.5f );
        tlen2 = transition_len - tlen1;
        pstart1 = p_input - prevShift;
        pstart2 = p_input + tlen1;
        length_in1 = tlen1 + prevShift;
        pstart2 = pstart1 + length_in1;
        length_in2 = tlen2 - currShift;
        pstart3 = pstart2 + length_in2;
    }
    else
    {
@@ -1514,9 +1516,10 @@ void TDREND_Apply_ITD(
        tlen1 = transition_len;
        tlen2 = 0;
        pstart1 = p_input - prevShift;
        pstart2 = p_input + tlen1 - currShift;
        length_in1 = transition_len + prevShift - currShift;
        pstart2 = pstart1 + length_in1;
        length_in2 = 0;
        pstart3 = pstart2 + length_in2;
    }

    if ( *previtd == 0 )
@@ -1551,9 +1554,9 @@ void TDREND_Apply_ITD(
    mvr2r( pstart2, out_buf_A + tlen1, length - tlen1 );

    /* Output buffer B */
    mvr2r( input, out_buf_B, tlen1 );
    mvr2r( p_input, out_buf_B, tlen1 );
    sincResample( pstart2, out_buf_B + tlen1, length_in2, tlen2 );
    mvr2r( pstart2 + tlen2 + currShift, out_buf_B + transition_len, tlen3 );
    mvr2r( pstart3, out_buf_B + transition_len, tlen3 );

    *previtd = itd;
    wmops_sub_end();
+2 −2

File changed.

Contains only whitespace changes.

+5 −5

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

Loading