Commit e1e3bfb5 authored by multrus's avatar multrus
Browse files

Merge branch '20250203_cleanup' into 'main'

20250203 cleanup

See merge request !1991
parents 406569eb 10b2039e
Loading
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -1999,7 +1999,6 @@ static ivas_error initOnFirstGoodFrame(
            if ( numInitialBadFrames > 0 )
            {
                /* Duplicate good first frame metadata to fill the beginning of stream. */
#ifdef NONBE_FIX_1261_MASA_EXT_META_JBM
                int16_t fullDelayNumSamplesLocal[3];
                int32_t delayTimeScaleLocal;
                float delayMs;
@@ -2012,9 +2011,6 @@ static ivas_error initOnFirstGoodFrame(
                    fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
                }
                delayMs = (float) ( fullDelayNumSamplesLocal[0] ) / (float) ( delayTimeScaleLocal );
#else
                IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL;
#endif

                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
@@ -2024,9 +2020,6 @@ static ivas_error initOnFirstGoodFrame(

                for ( int16_t j = 0; j < numInitialBadFrames; ++j )
                {
#ifndef NONBE_FIX_1261_MASA_EXT_META_JBM
                    float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale );
#endif
                    if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) );
+0 −4
Original line number Diff line number Diff line
@@ -170,12 +170,8 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_1217_OBJ_EDIT_FOA                         /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */
#define NONBE_FIX_1255_OBJ_EDIT_JBM                     /* VA: issue 1255: restore object editing in JBM */
#define NONBE_FIX_1262_OSBA_STEREO                      /* FhG: issue 1262: Fix missing scaling factor for OSBA stereo output */
#define NONBE_FIX_1189_GSC_IVAS_OMASA                   /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */
#define NONBE_1214_PLC_LSF_MEMORY                       /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */
#define NONBE_FIX_1261_MASA_EXT_META_JBM                /* Nokia: issue #1261: MASA metadata EXT output delay buffer init in JBM */

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

+0 −4
Original line number Diff line number Diff line
@@ -483,11 +483,7 @@ ivas_error acelp_core_dec(

        if ( st->element_mode > EVS_MONO && st->idchan == 0 && !( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && !tdm_low_rate_mode )
        {
#ifdef NONBE_FIX_1189_GSC_IVAS_OMASA
            if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) )
#else
            if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) )
#endif
            {
                st->GSC_IVAS_mode = get_next_indice( st, 2 );
            }
+0 −5
Original line number Diff line number Diff line
@@ -263,14 +263,9 @@ ivas_error core_switching_pre_dec(
        st->uv_count = 0;
    }

#ifdef NONBE_1214_PLC_LSF_MEMORY
    if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) /* EVS and HQ -> ACELP */ ||
         ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 && st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) ||
         ( st->core == ACELP_CORE && st->last_L_frame > L_FRAME16k ) /* TCX @ 25.6/32 kHz -> ACELP */ )
#else
    if ( ( ( st->core == ACELP_CORE || st->core == AMR_WB_CORE ) && st->last_core == HQ_CORE ) || ( ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD || ( st->element_mode == IVAS_CPE_MDCT && last_element_mode == IVAS_CPE_DFT ) ) && nchan_out == 2 &&
                                                                                                    st->core_brate != SID_2k40 && st->core_brate != FRAME_NO_DATA && ( last_core_brate_st0 == FRAME_NO_DATA || last_core_brate_st0 == SID_2k40 ) ) )
#endif
    {
        if ( st->element_mode == IVAS_CPE_DFT || st->element_mode == IVAS_CPE_TD )
        {
+0 −8
Original line number Diff line number Diff line
@@ -811,15 +811,11 @@ static void JB4_adaptActivePlayout(
                           ( dropRateMax - dropRateMin ) / dropGapMax +
                       dropRateMin;
                *scale = ( 1000 - rate ) / 10;
#ifdef NONBE_1215_FIX_JBM_MAX_SCALING
                /* Limit max scaling to the duration of one frame. APA will not exceed this limit
                 * anyway due to the 50% limitation of APA_MIN_SCALE and APA_MAX_SCALE. Limiting
                 * the value to a sensible range here avoids integer overflows at later stages when
                 * converting maxScaling from milliseconds to samples. */
                *maxScaling = JB4_MIN( currPlayoutDelay - targetMax, 1000 / IVAS_NUM_FRAMES_PER_SEC );
#else
                *maxScaling = currPlayoutDelay - targetMax;
#endif
            }
        }
    }
@@ -835,15 +831,11 @@ static void JB4_adaptActivePlayout(
             currPlayoutDelay < targetMaxStretch && currPlayoutDelay < (uint32_t) ( 110 + h->rfDelay / 4 ) )
        {
            *scale = 120;
#ifdef NONBE_1215_FIX_JBM_MAX_SCALING
            /* Limit max scaling to the duration of one frame. APA will not exceed this limit
             * anyway due to the 50% limitation of APA_MIN_SCALE and APA_MAX_SCALE. Limiting
             * the value to a sensible range here avoids integer overflows at later stages when
             * converting maxScaling from milliseconds to samples. */
            *maxScaling = JB4_MIN( targetMaxStretch - currPlayoutDelay, 1000 / IVAS_NUM_FRAMES_PER_SEC );
#else
            *maxScaling = targetMaxStretch - currPlayoutDelay;
#endif
        }
    }

Loading