Commit 038c9073 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

introduce scaling factor for pre-rendered OSBA modes

parent 1df39ca6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1835,5 +1835,6 @@ typedef enum
#define ivas_omasa_dmx_scal_fac_5ch_static_inv ( 1.0f / ivas_omasa_dmx_scal_fac_5ch_static )

#endif

/* clang-format on */
/* IVAS_CNST_H  */
+3 −1
Original line number Diff line number Diff line
@@ -181,12 +181,14 @@

#define NONBE_FIX_1165_STATIC_SCAL_MCMASA               /* Nok: add static scaling to McMASA DMX */
#define NONBE_FIX_1165_STATIC_SCAL_OMASA                /* Nok: add static scaling to OMASA DMX */

#define NONBE_FIX_1165_STATIC_SCAL_OSBA_PREREND         /* FhG: static scaling factor for pre-rendered OSBA modes */

#define NONBE_FIX_1165_STATIC_SCAL_PARAMMC              /* FhG: add static scaling to ParamMC DMX */
/*#define NONBE_FIX_1165_APPLY_LIMITER_ON_ENCODER_DMX*/     /* FhG: apply the limiter before the core encoder for formats with downmixing where the signal could exceed the 16-bit value range */
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */



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

/* ################## End DEVELOPMENT switches ######################### */
+13 −1
Original line number Diff line number Diff line
@@ -1340,6 +1340,12 @@ 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_FIX_1165_STATIC_SCAL_OSBA_PREREND
			for (n = 0; n < nchan_out; n++)
			{
				v_multc(p_output[n], 2.0f, p_output[n], *nSamplesRendered);
			}
#endif
		}
        else
        {
@@ -1347,6 +1353,12 @@ ivas_error ivas_jbm_dec_render(
            {
                return error;
            }
#ifdef NONBE_FIX_1165_STATIC_SCAL_OSBA_PREREND
			for(n = 0; n < nchan_out; n++)
			{
			    v_multc(p_output[n], 2.0f, p_output[n], *nSamplesRendered);
			}
#endif

            if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
            {
+5 −1
Original line number Diff line number Diff line
@@ -72,7 +72,11 @@ static void ivas_merge_sba_transports(
    {
        for ( j = 0; j < input_frame; j++ )
        {
#ifdef NONBE_FIX_1165_STATIC_SCAL_OSBA_PREREND
            data_out_f[i][j] = 0.25f * ( data_in_f1[i][j] + data_in_f2[i][j] );
#else
			data_out_f[i][j] = 0.5f * (data_in_f1[i][j] + data_in_f2[i][j]);
#endif
        }
    }