diff --git a/lib_com/options.h b/lib_com/options.h index d54af21f35dfb2f3a1c1fdf5de3444e675213c0b..c89a248523c74e65af1066e010bed50f31522194 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -134,6 +134,7 @@ #define FIX_1411_IGF_CRASH_BW_SWITCHING /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_1344_REND_MASA_LOW_FS /* Nokia: Issue 1344: Fix sanitizer errors when using IVAS_rend to render MASA with lower sampling rates */ +#define NONBE_1412_AVOID_ROUNDING_AZ_ELEV /* FhG: Avoid rounding when passing azimuth and elevation to efap_determine_gains() */ // object-editing feature porting #define TMP_FIX_SPLIT_REND // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions) diff --git a/lib_dec/ivas_ism_param_dec_fx.c b/lib_dec/ivas_ism_param_dec_fx.c index 430e087130f0f45f4ea51f03ff0e18ef0204ea29..bdb341658a6eae768f366813b84377b3bc6a6dc4 100644 --- a/lib_dec/ivas_ism_param_dec_fx.c +++ b/lib_dec/ivas_ism_param_dec_fx.c @@ -942,7 +942,9 @@ void ivas_ism_dec_digest_tc_fx( ( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_MIXER_CONV_ROOM ) && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) { Word16 i; +#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV Word32 azimuth_fx, elevation_fx; +#endif /* we have a full frame interpolator, adapt it */ /* for BE testing */ @@ -1011,9 +1013,11 @@ void ivas_ism_dec_digest_tc_fx( } ELSE { +#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV // TODO tmu review when #215 is resolved azimuth_fx = L_shr( L_add( st_ivas->hIsmMetaData[i]->edited_azimuth_fx, 2097152 ), Q22 ); // Q0 ,2097152 = .5f in Q22 elevation_fx = L_shr( L_add( st_ivas->hIsmMetaData[i]->edited_elevation_fx, 2097152 ), Q22 ); // Q0 ,2097152 = .5f in Q22 +#endif test(); test(); @@ -1029,6 +1033,9 @@ void ivas_ism_dec_digest_tc_fx( ( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) && EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) ) && st_ivas->hCombinedOrientationData == NULL ) { +#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV + Word32 elevation_fx = st_ivas->hIsmMetaData[i]->edited_elevation_fx; +#endif if ( st_ivas->hIntSetup.is_planar_setup ) { /* If no elevation support in output format, then rendering should be done with zero elevation */ @@ -1038,10 +1045,17 @@ void ivas_ism_dec_digest_tc_fx( IF( st_ivas->hEFAPdata != NULL ) { +#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV azimuth_fx = L_shl( azimuth_fx, Q22 ); // Q22 elevation_fx = L_shl( elevation_fx, Q22 ); // Q22 +#endif + +#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV + efap_determine_gains_fx( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains_fx[i], st_ivas->hIsmMetaData[i]->edited_azimuth_fx, elevation_fx, EFAP_MODE_EFAP ); +#else efap_determine_gains_fx( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains_fx[i], azimuth_fx, elevation_fx, EFAP_MODE_EFAP ); +#endif // TODO: align Q values properly IF( NE_32( st_ivas->hIsmMetaData[i]->edited_gain_fx, ONE_IN_Q29 ) ) {