Commit bba17be9 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'main' into 1378_conformance_script_isar

parents 303290fd 9cac7912
Loading
Loading
Loading
Loading
Loading
+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
+4 −0
Original line number Diff line number Diff line
@@ -192,6 +192,10 @@
#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 */


#define FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING    /* Orange: Fix for basop issue 2184 - to prevent one channel from becoming inaudible in the mono downmix output */

/* ##################### 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 );
+14 −1
Original line number Diff line number Diff line
@@ -187,8 +187,9 @@ static float get_panning(
{
    float aziRad, eleRad, y, mappedX, aziRadMapped, panning;
    float A, A2, A3;
#ifndef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
    const float LsAngleRad = 30.0f * PI_OVER_180;

#endif
    aziRad = aziDeg * PI_OVER_180;
    eleRad = eleDeg * PI_OVER_180;
    y = ( sinf( aziRad ) * cosf( eleRad ) );
@@ -197,17 +198,29 @@ static float get_panning(

    /* Determine the real valued amplitude panning gains */
    panning = 0.0f;
#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL
    if ( aziRadMapped >= LS_ANGLE_RAD_30_DEG )
#else
    if ( aziRadMapped >= LsAngleRad )
#endif
    { /* Left side */
        panning = 1.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 */
        panning = -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 );
        panning = 2 * A3 - 1.0f;
+6 −0
Original line number Diff line number Diff line
@@ -1081,6 +1081,12 @@ typedef struct stereo_dmx_evs_correlation_filter_structure
{
    float isd_rate_s;
    float iccr_s;
#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING
    float phitd;
    float iccres_s;
    float lvlin[CPE_CHANNELS];
#endif

    float ipd_ff[STEREO_DMX_EVS_NB_SUBBAND_MAX];
    float Pr[STEREO_DMX_EVS_NB_SUBBAND_MAX];
    float Pi[STEREO_DMX_EVS_NB_SUBBAND_MAX];
Loading