Commit 9ba216ba authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files
Merge branch 'main' of ssh://forge.3gpp.org:29419/ivas-codec-pc/ivas-codec into increase-lc3plus-coverage
parents c3f8d024 d2b4a887
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ DEPS = $(addprefix $(OBJDIR)/,$(SRCS_LIBCOM:.c=.P) $(SRCS_LIBDEBUG:.c=.P) $(SRCS

.PHONY: all clean

all: $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND)
all: $(CLI_APIENC) $(CLI_APIDEC) $(CLI_APIREND) $(CLI_APIPOSTREND) $(CLI_AMBICONVERT)

$(OBJDIR):
	$(QUIET)mkdir -p $(OBJDIR)
+2 −2
Original line number Diff line number Diff line
@@ -78,8 +78,8 @@ int main( int argc, char *argv[] )
    if ( argc != 5 )
    {
        printf( "----------------------------------------------------------------------------------\n" );
        printf( "Usage:\n" );
        printf( "./ambi_converter input_file output_file input_convention output_convention\n" );
        printf( "\n" );
        printf( "Usage: ambi_converter input_file output_file input_convention output_convention\n" );
        printf( "\n" );
        printf( "input_convention and output convention must be an integer number in [0,5]\n" );
        printf( "the following conventions are supported:\n" );
+4 −0
Original line number Diff line number Diff line
@@ -1483,6 +1483,10 @@ typedef enum

#define VBAP_NUM_SEARCH_SECTORS                 4

#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
#define LS_ANGLE_RAD_30_DEG                     0.52359879f                /* 30.0f * PI_OVER_180 */
#define INV_TAN_LS_ANGLE_RAD_30_DEG             1.7320507f                 /* 1.0f/tanf(30.0f * PI_OVER_180) */
#endif

/*----------------------------------------------------------------------------------*
 * Binaural Rendering Constants
+2 −0
Original line number Diff line number Diff line
@@ -192,6 +192,8 @@
#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP               /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */
#define FIX_1330_JBM_MEMORY_FIX                         /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */
#define NONBE_1380_OMASA_BUILD_DIFF                     /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */
#define NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL /* Nokia: Adjustments in remaining stereo panning functions to make them BE between Debug and Release */


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

+14 −0
Original line number Diff line number Diff line
@@ -301,7 +301,9 @@ void ivas_ism_get_stereo_gains(
{
    float aziRad, eleRad;
    float y, mappedX, aziRadMapped, A, A2, A3;
#ifndef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
    const float LsAngleRad = 30.0f * PI_OVER_180;
#endif

    /* Convert azi and ele to an azi value of the cone of confusion */
    aziRad = azimuth * PI_OVER_180;
@@ -311,19 +313,31 @@ void ivas_ism_get_stereo_gains(
    aziRadMapped = atan2f( y, mappedX );

    /* Determine the amplitude panning gains */
#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
    if ( aziRadMapped >= LS_ANGLE_RAD_30_DEG )
#else
    if ( aziRadMapped >= LsAngleRad )
#endif
    { /* Left side */
        *left_gain = 1.0f;
        *right_gain = 0.0f;
    }
#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
    else if ( aziRadMapped <= -LS_ANGLE_RAD_30_DEG )
#else
    else if ( aziRadMapped <= -LsAngleRad )
#endif
    { /* Right side */
        *left_gain = 0.0f;
        *right_gain = 1.0f;
    }
    else /* Tangent panning law */
    {
#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
        A = tanf( aziRadMapped ) * INV_TAN_LS_ANGLE_RAD_30_DEG;
#else
        A = tanf( aziRadMapped ) / tanf( LsAngleRad );
#endif
        A2 = ( A - 1.0f ) / max( 0.001f, A + 1.0f );
        A3 = 1.0f / ( A2 * A2 + 1.0f );
        *left_gain = sqrtf( A3 );
Loading