Commit 1a9156a9 authored by Jan Kiene's avatar Jan Kiene
Browse files

port MR 2288 from float - BASOP version

Avoid rounding when passing angular information to efap_determine_gains()
parent c686cdd1
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@
#define FIX_1383_HEAD_TRACK_SANITIZER                   /* Nok: issue 1383: Fix head tracking struc values reading in renderer */
#define FIX_1330_JBM_MEMORY                             /* VA: issue 1330: memory savings in the JBM decoder */
#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_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)
+14 −1
Original line number Diff line number Diff line
@@ -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,16 @@ 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
#endif
                        elevation_fx = L_shl( elevation_fx, Q22 ); // Q22

#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 ) )
                        {