Commit 5e702251 authored by multrus's avatar multrus
Browse files

Merge branch '20250811_cleanup' into 'main'

20250811 cleanup

See merge request !2208
parents ea0d9cd2 d90d0cdf
Loading
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -3514,20 +3514,8 @@ static void parseCombinedFormatInput(
        inConfig->numAmbisonicsBuses = 1;
        inConfig->ambisonicsBuses[0].audioConfig = audioConfig;
        inConfig->ambisonicsBuses[0].inputChannelIndex = inConfig->numAudioObjects;
#ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
        inConfig->ambisonicsBuses[0].gain_dB = 0.f;
#else
        inConfig->ambisonicsBuses[0].gain_dB = -6.f;
#endif
        *configString += 4;

#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
        /* Modify input gain for objects too */
        for ( int16_t i = 0; i < inConfig->numAudioObjects; ++i )
        {
            inConfig->audioObjects[i].gain_dB = -6.f;
        }
#endif
    }
    else if ( audioConfig == IVAS_AUDIO_CONFIG_MASA1 || audioConfig == IVAS_AUDIO_CONFIG_MASA2 )
    {
+0 −3
Original line number Diff line number Diff line
@@ -173,9 +173,6 @@

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */
#define NONBE_1339_FIXOSBA_EXT_LOUDNESS                 /* FhG: issue 1339: apply scaling with EXT output in OSBA high-BR mode */
#define NONBE_1352_HARMONIZE_OSBA_LOUDNESS             /* FhG: do not scale OSBA inputs by 0.5 any more */
#define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */
#define NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING         /* Nokia: Fix OMASA to MASA1 rendering in IVAS_rend */

+0 −8
Original line number Diff line number Diff line
@@ -1506,11 +1506,7 @@ void decoder_tcx_tns(
            hTcxCfg->tcx_last_overlap_mode = hTcxCfg->tcx_curr_overlap_mode;
        }

#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT
        if ( ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 && whitenedDomain ) || ( L_spec > L_frameTCX ) )
#else
        if ( ( hTcxCfg->fIsTNSAllowed && fUseTns != 0 && bfi != 1 ) || ( L_spec > L_frameTCX ) )
#endif
        {
            L = L_spec;
        }
@@ -1552,11 +1548,7 @@ void decoder_tcx_tns(

        if ( ( L_frame == st->L_frame >> 1 ) && st->tcxonly && isTCX5 )
        {
#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT
            if ( st->element_mode == EVS_MONO || ( L_spec < L_frameTCX && !whitenedDomain ) ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */
#else
            if ( st->element_mode == EVS_MONO || L_spec < L_frameTCX ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */
#endif
            {
                tcx5TnsUngrouping( L_frameTCX >> 1, hTcxCfg->tnsConfig[0][0].iFilterBorders[0] >> 1, x, DEC );
            }
+0 −10
Original line number Diff line number Diff line
@@ -1110,12 +1110,6 @@ ivas_error ivas_jbm_dec_render(
                {
                    mvr2r( p_tc[n], p_output[n], *nSamplesRendered );
                }
#if defined( NONBE_1339_FIXOSBA_EXT_LOUDNESS ) && !defined( NONBE_1352_HARMONIZE_OSBA_LOUDNESS )
                for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ )
                {
                    v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered );
                }
#endif
            }
            else
            {
@@ -1128,12 +1122,10 @@ ivas_error ivas_jbm_dec_render(
        else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
        {
            ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output );
#ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
            for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ )
            {
                v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered );
            }
#endif
        }
        else
        {
@@ -1156,12 +1148,10 @@ ivas_error ivas_jbm_dec_render(
                    set_zero( p_output[n], *nSamplesRendered );
                }
            }
#ifdef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
            for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ )
            {
                v_multc( p_output[n], 2.0f, p_output[n], *nSamplesRendered );
            }
#endif
        }
    }
    else if ( st_ivas->ivas_format == MC_FORMAT )
+0 −24
Original line number Diff line number Diff line
@@ -183,21 +183,11 @@ ivas_error ivas_osba_dirac_td_binaural_jbm(
                for ( b = 0; b < num_cldfb_bands; b++ )
                {
                    st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] =
#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
                        ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) +
                        ( 0.5f * Cldfb_RealBuffer[b] );
#else
                        st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] +
                        Cldfb_RealBuffer[b];
#endif
                    st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] =
#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
                        ( 0.5f * st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] ) +
                        ( 0.5f * Cldfb_ImagBuffer[b] );
#else
                        st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] +
                        Cldfb_ImagBuffer[b];
#endif
                }
            }
        }
@@ -214,11 +204,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm(
            int16_t i;
            for ( i = 0; i < nSamplesAsked; i++ )
            {
#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
                output_f[n][i] = 0.5f * output_f[channel_offset + n][i] + 0.5f * p_sepobj[n][i];
#else
                output_f[n][i] = output_f[channel_offset + n][i] + p_sepobj[n][i];
#endif
            }
        }
    }
@@ -307,10 +293,6 @@ ivas_error ivas_osba_render_sf(
        {
            v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered );
        }

#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
        v_multc( p_output[n], 0.5f, p_output[n], *nSamplesRendered );
#endif
    }

    return IVAS_ERR_OK;
@@ -353,12 +335,6 @@ void ivas_osba_stereo_add_channels(
        }
    }

#ifndef NONBE_1352_HARMONIZE_OSBA_LOUDNESS
    for ( n = 0; n < nchan_out; n++ )
    {
        v_multc( output_f[n], 0.5f, output_f[n], n_samples_to_render );
    }
#endif

    return;
}