Unverified Commit 9215c617 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into basop-2023-td-renderer-distance-attenuation-precision-problem

parents 8381e938 06072653
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@
#define FIX_1574_EFAP_CODE_LINT                         /* FhG: float issue 1574: Code quality fixes in ivas_efap.c */
#define FIX_BASOP_2529_MASA_RATIO_SCALINGS              /* Nokia: BASOP issue 2529: Fix MASA ratio scalings and verifications */
#define FIX_BASOP_2531_MCT_CP_BITRATE                   /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */
#define FIX_BASOP_2541_OMASA_ENC_FIXES                  /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */

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

+13 −1
Original line number Diff line number Diff line
@@ -4842,8 +4842,13 @@ static void ivas_encode_masaism_metadata_fx(
                eneBand32 = W_extract_h( W_shl( eneBand, shift ) );
                eneBand_exp = sub( 63, add( add( hMasa->data.q_energy, 1 ), shift ) );

#ifdef FIX_BASOP_2541_OMASA_ENC_FIXES
                energy_ism = L_tmp; // Copy existing value
                energy_ism_e = L_tmp_e;
#else
                energy_ism = 0;
                energy_ism_e = 0;
#endif
                move32();
                move16();
                FOR( obj = 0; obj < nchan_ism; obj++ )
@@ -4856,13 +4861,20 @@ static void ivas_encode_masaism_metadata_fx(

                FOR( band = 0; band < omasa_nbands; band++ )
                {
#ifndef FIX_BASOP_2541_OMASA_ENC_FIXES
                    energy_ism = BASOP_Util_Add_Mant32Exp( energy_ism, energy_ism_e, hOmasaEnergy->energy_ism_fx[sf][band], hOmasaEnergy->energy_ism_fx_e[sf][band], &energy_ism_e );

#endif
                    FOR( obj = 0; obj < nchan_ism; obj++ )
                    {
#ifdef FIX_BASOP_2541_OMASA_ENC_FIXES
                        L_tmp = Mpy_32_32( hOmasaEnergy->energy_ism_fx[sf][band], hOmasaEnergy->energy_ratio_ism_fx[sf][band][obj] ); // Q = (31 - hOmasaEnergy->energy_ism_fx_e[sf][band]) + Q30 - 31
                        L_tmp_e = add( 1, hOmasaEnergy->energy_ism_fx_e[sf][band] );
                        energy_ism_ind[obj] = BASOP_Util_Add_Mant32Exp( energy_ism_ind[obj], energy_ism_ind_e[obj], L_tmp, L_tmp_e, &energy_ism_ind_e[obj] );
#else

                        hOmasaData->masa_to_total_energy_ratio_fx[sf][0] = ONE_IN_Q30; // 1.0f in Q30
                        move32();
#endif
                    }
                }