Unverified Commit 42445dcd authored by norvell's avatar norvell
Browse files

Merge branch 'main' into ci/fix-generate-scripts-from-regressions

parents 7eaf792c 9a72bbcd
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3604,7 +3604,7 @@ static ivas_error decodeVoIP(
#ifdef SUPPORT_JBM_TRACEFILE
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, &parameterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
+3 −0
Original line number Diff line number Diff line
@@ -40,7 +40,9 @@
/* clang-format off */
  /* ################### Start compiler switches ######################## */

#ifndef NO_SUPPORT_JBM_TRACEFILE
#define SUPPORT_JBM_TRACEFILE                   /* support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */
#endif

/* #################### End compiler switches ######################### */

@@ -170,6 +172,7 @@

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_2585_BIT_ALLOCATION_DIFF                    /* VA : issue 2585, bit allocation different behaviors between float and fixed-point for corner cases */
#define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI         /* Nokia: BASOP issue 2442: Aligns float with identical diffuse gain limitation to minimize diff */

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

+17 −1
Original line number Diff line number Diff line
@@ -56,6 +56,10 @@
#define DIRAC_AVG_LENGTH_SYNTH_MS_FAST 10
#define DIRAC_ALPHA_MAX_FAST           0.12f
#define DIRECTION_SMOOTHNESS_ALPHA     0.01f
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
#define DIRAC_SMALL_DIFF_POW_LIM      65536.0f
#define DIRAC_SMALL_DIFF_POW_MAX_GAIN 2.0f
#endif


/*-------------------------------------------------------------------------
@@ -1250,6 +1254,9 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls(
    float *alpha_synthesis_fast;
    int16_t alphaMaxBin;
    int16_t alphaMaxBinFast;
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
    float diff_gain_limit;
#endif

    push_wmops( "dirac_out_synth_sfr" );

@@ -1434,17 +1441,26 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls(
            /*diffuse*/
            *p_power_diff_smooth_prev = g1 * ( *p_power_smooth_diff++ ) + g2 * ( *p_power_diff_smooth_prev ) + EPSILON;
            *( p_cy_auto_diff_smooth_prev ) = g1 * ( *( p_cy_auto_diff_smooth++ ) ) + g2 * ( *( p_cy_auto_diff_smooth_prev ) );

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
            diff_gain_limit = *p_power_diff_smooth_prev < DIRAC_SMALL_DIFF_POW_LIM ? DIRAC_SMALL_DIFF_POW_MAX_GAIN : DIRAC_GAIN_LIMIT;
#endif
            *( p_gains_diff ) = sqrtf( *( p_cy_auto_diff_smooth_prev++ ) / ( *( p_power_diff_smooth_prev++ ) ) );

            if ( *( p_gains_diff ) < 0.f )
            {
                *( p_gains_diff ) = 0.f;
            }
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
            else if ( *( p_gains_diff ) > diff_gain_limit )
            {
                *( p_gains_diff ) = diff_gain_limit;
            }
#else
            else if ( *( p_gains_diff ) > DIRAC_GAIN_LIMIT )
            {
                *( p_gains_diff ) = DIRAC_GAIN_LIMIT;
            }
#endif
            p_gains_diff++;
        }

+1 −0
Original line number Diff line number Diff line
@@ -3,3 +3,4 @@ BITRATE = 768000;
DOF = 3;
HQMODE = 1;
CODEC = LC3PLUS;
LC3PLUS_HIGHRES = 1;