Commit 405a9899 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_ISSUE_1744_IVAS_SPAR_TO_DIRAC

parent deb69feb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@



#define FIX_ISSUE_1744_IVAS_SPAR_TO_DIRAC       /* FhG: NON-BE!!! Simplify azimuth & elevation calculations, remove parameter mismatch for divide3232, fix copy/paste error for elevation */
#define FIX_ISSUE_1744_IVAS_DIRAC_GET_MONO_FLAG /* FhG: NON-BE!!! Simplify threshold - comparison, change (wrong) Equal-comparion to (correct) Greater-Than-comparison */
#define NONBE_FIX_864_JBM_RENDER_FRAMESIZE                    /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */

+0 −33
Original line number Diff line number Diff line
@@ -44,9 +44,7 @@
/*------------------------------------------------------------------------------------------*
 * Local constants
 *------------------------------------------------------------------------------------------*/
#ifdef FIX_ISSUE_1744_IVAS_SPAR_TO_DIRAC
#define DEG180_BY_PI_Q24 ( (Word32) 0x394BB835 ) /* 180.0/PI in Q24) */
#endif

#define IVAS_DEFAULT_DTX_CNG_RAMP ( 8 )

@@ -2948,22 +2946,7 @@ void ivas_spar_to_dirac_fx(

                Word16 check_azi_fx = BASOP_util_atan2( dvy_fx[band], dvx_fx[band], 0 ); /*Q13*/

#ifdef FIX_ISSUE_1744_IVAS_SPAR_TO_DIRAC
                Word32 azi_intermediate = Mpy_32_16_1( DEG180_BY_PI_Q24, check_azi_fx );
#else
                Word16 check_azi_fx_res;
                Word32 check_azi_fx_32 = L_shl( check_azi_fx, 16 ); /*Q29*/

                IF( check_azi_fx_32 < 0 )
                {
                    check_azi_fx_res = negate( divide3232( L_negate( check_azi_fx_32 ), 1686629760 /*3.145f in Q29*/ ) ); /*Q15*/
                }
                ELSE
                {
                    check_azi_fx_res = divide3232( check_azi_fx_32, 1686629760 /*3.145f in Q29*/ ); /*Q15*/
                }
                Word32 azi_intermediate = Mpy_32_16_1( DEGREE_180_Q_22, check_azi_fx_res ); /*Q22*/
#endif

                azi_intermediate = L_add( azi_intermediate, ONE_IN_Q21 ); /*Q22*/

@@ -2978,23 +2961,7 @@ void ivas_spar_to_dirac_fx(
                }

                Word16 check_ele_fx = BASOP_util_atan2( dvz_fx[band], radius_fx, sub( add( 9, q_dvnorm ), q_temp ) ); /*Q13*/
#ifdef FIX_ISSUE_1744_IVAS_SPAR_TO_DIRAC
                Word32 ele_intermediate = Mpy_32_16_1( DEG180_BY_PI_Q24, check_ele_fx );
#else

                Word16 check_ele_fx_res;
                Word32 check_ele_fx_32 = L_shl( check_ele_fx, 16 ); /*Q29*/

                IF( check_ele_fx_32 < 0 )
                {
                    check_ele_fx_res = negate( divide3232( L_negate( check_ele_fx_32 ), 1686629760 /*3.145f in Q29*/ ) ); /*Q15*/
                }
                ELSE
                {
                    check_ele_fx_res = divide3232( check_ele_fx_32, 1686629760 /*3.145f in Q29*/ ); /*Q15*/
                }
                Word32 ele_intermediate = Mpy_32_16_1( DEGREE_180_Q_22, check_ele_fx_res ); /*Q22*/
#endif
                ele_intermediate = L_add( ele_intermediate, ONE_IN_Q21 ); /*Q22*/

                Word16 ele_res;