Commit 1ace233b authored by vaclav's avatar vaclav Committed by Manuel Jander
Browse files

port fix

parent 4dbd7d4a
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -211,6 +211,34 @@ void ivas_mc2sba_fx(
    return;
}

#ifdef FIX_1419_MONO_STEREO_UMX

/*-------------------------------------------------------------------------*
 * ivas_stereo2sba()
 *
 * stereo signal is transformed into SBA in TD domain
 *-------------------------------------------------------------------------*/

void ivas_stereo2sba_fx(
    Word32 *input_fx[],       /* i  : core-coder transport stereo channels */
    Word32 *output_fx[],      /* o  : SBA output channels                  */
    const Word16 output_frame /* i  : output frame length per channel      */
)
{
    Word16 n;
    Word32 tmp;

    FOR( n = 0; n < output_frame; n++ )
    {
        tmp = input_fx[0][n];
        output_fx[0][n] = L_shr( L_add( tmp, input_fx[1][n] ), 1 ); /* W = 0.5 * ( L + R ) */
        output_fx[1][n] = L_shr( L_sub( tmp, input_fx[1][n] ), 1 ); /* Y = 0.5 * ( L - R ) */
    }

    return;
}

#endif

/*-------------------------------------------------------------------------*
 * ivas_stereo2sba()