Commit 097c0626 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_1352_HARMONIZE_OSBA_LOUDNESS

parent 89a12fbd
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -3514,20 +3514,9 @@ 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 −1
Original line number Diff line number Diff line
@@ -174,7 +174,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_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 −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 −23
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
            }
        }
    }
@@ -308,9 +294,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 +336,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;
}