Commit c5866e1f authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI

parent b77b1568
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -94,7 +94,6 @@
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI         /* Nokia: BASOP issue 2442: Increase accuracy of computations and add additional gain clamp for low energy decorrelated signal rendering. */
#define FIX_FMSW_DEC_EXT                                /* float issue 1566: fix EXT output in format switching */
#define FIX_BASOP_2612_RESET_DECIM_MEM                  /* FhG: BASOP #2612: reset (zero) the 16k resampler memory of the secondary channel on DFT->TD stereo switch (otherwise -> fx overshoot) */
#define FIX_BASOP_2621_STEREO_CNG_NOISY_SPEECH_QSHIFT   /* FhG: BASOP #2621: stereo_dft_generate_comfort_noise_fx flag_noisy_speech: compare (lp_speech-lp_noise) Q23 diff against 28.0 in Q23 (was vs integer 28 with q_lp_noise=0) */
+0 −63
Original line number Diff line number Diff line
@@ -56,10 +56,8 @@
#define POINT_3679_Q31 790059234 /*.3679 q31*/
#define POINT_1175_Q31 252329329 /*.1175 q31*/

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
#define DIRAC_SMALL_DIFF_POW_LIM      65536
#define DIRAC_SMALL_DIFF_POW_MAX_GAIN 2
#endif

/*-------------------------------------------------------------------------
 * Local function prototypes
@@ -1880,10 +1878,8 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
    Word16 exp = 0, exp1, tmp, q_com, q_tmp, min_exp;
    Word32 tmp32;
    move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
    Word32 L_tmp_cross;
    Word16 q_tmp_cross;
#endif

    Word64 Cldfb_RealBuffer64_fx[MAX_OUTPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    Word64 Cldfb_ImagBuffer64_fx[MAX_OUTPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
@@ -2010,7 +2006,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
        masa_stereo_type_detect->target_power_y_smooth_fx = L_shl( masa_stereo_type_detect->target_power_y_smooth_fx,
                                                                   sub( q_com, masa_stereo_type_detect->q_target_power_y_smooth ) );
        move32();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI

        W_temp = W_add( W_mult0_32_32( a, target_power_y ), W_mult0_32_32( b, masa_stereo_type_detect->target_power_y_smooth_fx ) ); // Q31 + q_com
        IF( W_temp )
@@ -2028,14 +2023,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
            masa_stereo_type_detect->q_target_power_y_smooth = Q31;
            move16();
        }
#else
        masa_stereo_type_detect->target_power_y_smooth_fx =
            L_add( Mpy_32_32( a, target_power_y ),
                   Mpy_32_32( b, masa_stereo_type_detect->target_power_y_smooth_fx ) ); //(Q31, q_com) -> q_com
        move32();
        masa_stereo_type_detect->q_target_power_y_smooth = q_com;
        move16();
#endif

        IF( NE_16( masa_stereo_type_detect->q_subtract_power_y, masa_stereo_type_detect->q_subtract_power_y_smooth ) )
        {
@@ -2075,11 +2062,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
        {
            subtract_target_ratio = L_sub( BASOP_Util_Log2( masa_stereo_type_detect->subtract_power_y_smooth_fx ),
                                           BASOP_Util_Log2( masa_stereo_type_detect->target_power_y_smooth_fx ) ); // Q25
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
            exp = sub( masa_stereo_type_detect->q_subtract_power_y_smooth, masa_stereo_type_detect->q_target_power_y_smooth );
#else
            exp = sub( masa_stereo_type_detect->q_subtract_power_y_smooth, q_com );
#endif
            L_tmp = Mpy_32_32( L_sub( subtract_target_ratio, L_shl( exp, 25 ) ), LOG10_2_Q31 ); // Q25
        }
        ELSE
@@ -2305,7 +2288,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
    Word32 cmp = W_shl_sat_l( DIRAC_GAIN_LIMIT_Q26, sub( h_dirac_output_synthesis_state->gains_dir_prev_q, 26 ) );
    Word32 cmp2 = W_extract_h( W_shl( W_mult_32_32( DIRAC_GAIN_LIMIT_Q26, L_shl( 1, h_dirac_output_synthesis_state->gains_diff_prev_q ) ), Q5 ) );

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
    Word32 diff_gain_limit = L_shl( DIRAC_SMALL_DIFF_POW_MAX_GAIN, h_dirac_output_synthesis_state->gains_diff_prev_q );
    Word32 power_diff_small_lim;
    IF( GT_16( h_dirac_output_synthesis_state->proto_power_diff_smooth_q, norm_l( DIRAC_SMALL_DIFF_POW_LIM ) ) )
@@ -2321,7 +2303,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
        power_diff_small_lim = L_shl( DIRAC_SMALL_DIFF_POW_LIM, h_dirac_output_synthesis_state->proto_power_diff_smooth_q );
    }

#endif

    FOR( k = 0; k < nchan_out_woLFE; k++ )
    {
@@ -2404,7 +2385,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
                *( p_gains_diff ) = cmp2; /*h_dirac_output_synthesis_state->gains_diff_prev_q*/
                move32();
            }
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI

            test();
            IF( LT_32( *( p_power_diff_smooth_prev - 1 ), power_diff_small_lim ) && GT_32( *( p_gains_diff ), diff_gain_limit ) ) /* proto_power_diff_smooth_q and gains_diff_prev_q */
@@ -2413,7 +2393,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
                move32();
            }

#endif
            p_gains_diff++;
        }

@@ -2431,16 +2410,11 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
            *( p_cy_auto_dir_smooth_prev++ ) = L_shr_r( L_tmp, q_tmp ); // q_cy_auto_dir_smooth_prev_local

            move32();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI

            W_temp = W_mac_32_32( W_mult_32_32( g1, ( *( p_cy_cross_dir_smooth ) ) ), g2, ( *( p_cy_cross_dir_smooth_prev ) ) );
            q_tmp_cross = W_norm( W_temp );
            L_tmp_cross = W_extract_h( W_shl( W_temp, q_tmp_cross ) );
            *( p_cy_cross_dir_smooth_prev ) = L_shr_r( L_tmp_cross, q_tmp_cross ); // q_cy_cross_dir_smooth_prev
#else
            *( p_cy_cross_dir_smooth_prev ) = Madd_32_32( Mpy_32_32( g1, ( *( p_cy_cross_dir_smooth ) ) ),
                                                          g2, ( *( p_cy_cross_dir_smooth_prev ) ) ); // (Q31, q_cy_cross_dir_smooth_prev) -> q_cy_cross_dir_smooth_prev
#endif
            move32();
            test();
            if ( *( p_cy_cross_dir_smooth_prev ) == 0 && ( *( p_cy_cross_dir_smooth ) != 0 ) )
@@ -2895,13 +2869,8 @@ void ivas_dirac_dec_compute_directional_responses_fx(

                        Word16 max_exp = MIN16B;
                        move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                        maximum_fx( exp_arr, num_channels_dir, &max_exp );
                        FOR( l = 0; l < num_channels_dir; l++ )
#else
                        maximum_fx( exp_arr, MAX_OUTPUT_CHANNELS, &max_exp );
                        FOR( l = 0; l < MAX_OUTPUT_CHANNELS; l++ )
#endif
                        {
                            direct_response_hoa_fx[l] = L_shr( direct_response_hoa_fx[l], sub( max_exp, exp_arr[l] ) ); /*Q(31-exp_arr[l])->Q(31-max_exp)*/
                            move32();
@@ -3039,13 +3008,8 @@ void ivas_dirac_dec_compute_directional_responses_fx(
                        }
                        Word16 max_exp = MIN_16;
                        move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                        maximum_fx( exp_arr, num_channels_dir, &max_exp );
                        FOR( l = 0; l < num_channels_dir; l++ )
#else
                        maximum_fx( exp_arr, MAX_OUTPUT_CHANNELS, &max_exp );
                        FOR( l = 0; l < MAX_OUTPUT_CHANNELS; l++ )
#endif
                        {
                            direct_response_hoa_fx[l] = L_shr( direct_response_hoa_fx[l], sub( max_exp, exp_arr[l] ) ); /*q(31-exp_arr[l])->q(31-max_exp)*/
                            move32();
@@ -3057,11 +3021,7 @@ void ivas_dirac_dec_compute_directional_responses_fx(

                    Q_direct_response_hoa = sub( Q31, exp_direct_response_hoa );

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                    Scale_sig32( direct_response_hoa_fx, num_channels_dir, sub( Q29, Q_direct_response_hoa ) ); /*Q_direct_response_hoa->q29*/
#else
                    Scale_sig32( direct_response_hoa_fx, MAX_OUTPUT_CHANNELS, sub( Q29, Q_direct_response_hoa ) ); /*Q_direct_response_hoa->q29*/
#endif
                    direct_response_q = Q29;
                    move16();

@@ -3161,14 +3121,8 @@ void ivas_dirac_dec_compute_directional_responses_fx(
                        move16();
                    }

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                    maximum_fx( exp_table, num_channels_dir, &exp_max );
                    FOR( i = 0; i < num_channels_dir; i++ )
#else
                    maximum_fx( exp_table, MAX_OUTPUT_CHANNELS, &exp_max );

                    FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ )
#endif
                    {
                        direct_response_ls_fx[i] = L_shr( direct_response_ls_fx[i], sub( exp_max, exp_table[i] ) ); /*(q(31-exp_table[i])->q(31-exp_max))*/
                        move32();
@@ -3335,13 +3289,8 @@ void ivas_dirac_dec_compute_directional_responses_fx(

                    max_exp = MIN16B; /*Q0*/
                    move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                    maximum_fx( exp_arr, num_channels_dir, &max_exp );
                    FOR( l = 0; l < num_channels_dir; l++ )
#else
                    maximum_fx( exp_arr, MAX_OUTPUT_CHANNELS, &max_exp );
                    FOR( l = 0; l < MAX_OUTPUT_CHANNELS; l++ )
#endif
                    {
                        direct_response_ls_fx[l] = L_shr( direct_response_ls_fx[l], sub( max_exp, exp_arr[l] ) ); /*Q(31-exp_arr[l])->Q(31-max_exp)*/
                        move32();
@@ -3355,11 +3304,7 @@ void ivas_dirac_dec_compute_directional_responses_fx(
                normalizePanningGains_fx( direct_response_ls_fx, &Q_direct_response_ls, num_channels_dir );
                exp_direct_response_ls = sub( 31, Q_direct_response_ls );

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                Scale_sig32( direct_response_ls_fx, num_channels_dir, sub( Q29, Q_direct_response_ls ) ); /*Q_direct_response_ls->Q29*/
#else
                Scale_sig32( direct_response_ls_fx, MAX_OUTPUT_CHANNELS, sub( Q29, Q_direct_response_ls ) ); /*Q_direct_response_ls->Q29*/
#endif
                direct_response_q = Q29;
                move16();

@@ -4086,19 +4031,11 @@ static void spreadCoherencePanningHoa_fx(
        }
        Word16 max_val = MIN_16;
        move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
        FOR( i = 0; i < num_channels_dir; i++ )
#else
        FOR( i = 0; i < 16; i++ )
#endif
        {
            max_val = s_max( max_val, exp_arr[i] );
        }
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
        FOR( i = 0; i < num_channels_dir; i++ )
#else
        FOR( i = 0; i < 16; i++ )
#endif
        {
            direct_response_fx[i] = L_shr( direct_response_fx[i], sub( max_val, exp_arr[i] ) ); // Q(31-exp_arr[i])->q(31-max_val)
            move32();
+0 −61
Original line number Diff line number Diff line
@@ -2559,7 +2559,6 @@ void protoSignalComputation2_fx(
            }
        }

#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
        stereo_type_detect->left_bb_power_fx = BASOP_Util_Add_Mant32Exp( Mpy_32_32( a_fx, left_bb_power_fx ), sub( 31, q_Left_Right_power ), Mpy_32_32( b_fx, stereo_type_detect->left_bb_power_fx ), sub( 31, stereo_type_detect->q_left_bb_power ), &stereo_type_detect->q_left_bb_power );
        move32();
        stereo_type_detect->q_left_bb_power = sub( 31, stereo_type_detect->q_left_bb_power );
@@ -2574,49 +2573,6 @@ void protoSignalComputation2_fx(
        move32();
        stereo_type_detect->q_total_bb_power = sub( 31, stereo_type_detect->q_total_bb_power );
        move16();
#else
        temp = Mpy_32_32( a_fx, left_bb_power_fx ); // q_Left_Right_power
        IF( LT_16( q_Left_Right_power, stereo_type_detect->q_left_bb_power ) )
        {
            stereo_type_detect->left_bb_power_fx = L_add( temp, L_shr( Mpy_32_32( b_fx, stereo_type_detect->left_bb_power_fx ), sub( stereo_type_detect->q_left_bb_power, q_Left_Right_power ) ) ); // q_Left_Right_power
            move32();
            stereo_type_detect->q_left_bb_power = q_Left_Right_power;
            move16();
        }
        ELSE
        {
            stereo_type_detect->left_bb_power_fx = Madd_32_32( L_shr( temp, sub( q_Left_Right_power, stereo_type_detect->q_left_bb_power ) ), b_fx, stereo_type_detect->left_bb_power_fx ); // stereo_type_detect->q_left_bb_power
            move32();
        }

        temp = Mpy_32_32( a_fx, right_bb_power_fx ); // q_Left_Right_power
        IF( LT_16( q_Left_Right_power, stereo_type_detect->q_right_bb_power ) )
        {
            stereo_type_detect->right_bb_power_fx = L_add( temp, L_shr( Mpy_32_32( b_fx, stereo_type_detect->right_bb_power_fx ), sub( stereo_type_detect->q_right_bb_power, q_Left_Right_power ) ) ); // q_Left_Right_power
            move32();
            stereo_type_detect->q_right_bb_power = q_Left_Right_power;
            move16();
        }
        ELSE
        {
            stereo_type_detect->right_bb_power_fx = Madd_32_32( L_shr( temp, sub( q_Left_Right_power, stereo_type_detect->q_right_bb_power ) ), b_fx, stereo_type_detect->right_bb_power_fx ); // stereo_type_detect->q_right_bb_power
            move32();
        }

        temp = Mpy_32_32( a_fx, total_bb_power_fx ); // q_Left_Right_power
        IF( LT_16( q_Left_Right_power, stereo_type_detect->q_total_bb_power ) )
        {
            stereo_type_detect->total_bb_power_fx = L_add( temp, L_shr( Mpy_32_32( b_fx, stereo_type_detect->total_bb_power_fx ), sub( stereo_type_detect->q_total_bb_power, q_Left_Right_power ) ) ); // q_Left_Right_power
            move32();
            stereo_type_detect->q_total_bb_power = q_Left_Right_power;
            move16();
        }
        ELSE
        {
            stereo_type_detect->total_bb_power_fx = Madd_32_32( L_shr( temp, sub( q_Left_Right_power, stereo_type_detect->q_total_bb_power ) ), b_fx, stereo_type_detect->total_bb_power_fx ); // stereo_type_detect->q_total_bb_power
            move32();
        }
#endif

        IF( LT_16( stereo_type_detect->q_left_bb_power, stereo_type_detect->q_right_bb_power ) )
        {
@@ -2670,7 +2626,6 @@ void protoSignalComputation2_fx(
            q_lr_hi_power = stereo_type_detect->q_right_hi_power;
        }
        q_lr_hi_power = sub( q_lr_hi_power, 1 ); /* = (q_lr_hi_power * 2) */
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
        /* We need to use accurately EPSILON from float (1e-15) in correct Q format as it can
         * dominate the division in high bands when total_hi_power is low or zero. This leads to
         * decision differences between BASOP and float. Close enough value is 2^-50 which is
@@ -2697,14 +2652,9 @@ void protoSignalComputation2_fx(
        temp = BASOP_Util_Divide3232_Scale_newton( lr_hi_power_fx, denom_fx, &exp );
        exp = sub( 31, add( sub( 31, exp ), sub( q_lr_hi_power, q_denom ) ) );
        exp = s_min( exp, 0 ); /* 2*min(l,r) <= l+r so we can clamp ratio <= 1 */
#else
        temp = BASOP_Util_Divide3232_Scale_newton( lr_hi_power_fx, L_add( stereo_type_detect->total_hi_power_fx, EPSILON_FX ), &exp ); // Q=31-(exp+ stereo_type_detect->q_total_hi_power-q_lr_hi_power)
        exp = sub( 31, add( sub( 31, exp ), sub( q_lr_hi_power, stereo_type_detect->q_total_hi_power ) ) );
#endif
        temp = BASOP_Util_Log2( temp ); // q25
        IF( NE_32( temp, MIN_32 ) )
        {
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
            IF( LT_16( exp, -63 ) )
            {
                temp = MIN_32;
@@ -2714,9 +2664,6 @@ void protoSignalComputation2_fx(
            {
                temp = Mpy_32_32( L_add( L_shl( exp, Q25 ), temp ), LOG10_2_Q31 ); // Q25
            }
#else
            temp = Mpy_32_32( L_add( L_shl( exp, Q25 ), temp ), LOG10_2_Q31 ); // Q25
#endif
        }
        // 20480 = 10 in Q11
        lr_total_hi_ratio_fx = Mpy_32_16_1( temp, 20480 ); // Q21
@@ -2863,11 +2810,7 @@ void protoSignalComputation2_fx(

    IF( GT_16( min_q_shift[0], min_q_shift[1] ) )
    {
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
        FOR( l = 0; l < i_mult( 3, num_freq_bands ); l += num_freq_bands ) /* Note: There are always 3 decorrelator prototypes in this function */
#else
        FOR( l = 0; l < i_mult( num_proto, num_freq_bands ); l += num_freq_bands )
#endif
        {
            Scale_sig32( proto_frame_f_fx + shl( l, 1 ), shl( s_min( CLDFB_NO_CHANNELS_HALF, num_freq_bands ), 1 ), sub( min_q_shift[1], min_q_shift[0] ) );
        }
@@ -2876,11 +2819,7 @@ void protoSignalComputation2_fx(
    }
    ELSE
    {
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
        FOR( l = 0; l < i_mult( 3, num_freq_bands ); l += num_freq_bands ) /* Note: There are always 3 decorrelator prototypes in this function */
#else
        FOR( l = 0; l < i_mult( num_proto, num_freq_bands ); l += num_freq_bands )
#endif
        {
            Scale_sig32( proto_frame_f_fx + shl( add( l, CLDFB_NO_CHANNELS_HALF ), 1 ), shl( s_max( 0, sub( num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ), 1 ), sub( min_q_shift[0], min_q_shift[1] ) );
        }
+0 −16
Original line number Diff line number Diff line
@@ -8979,7 +8979,6 @@ static void copyMasaMetadataToDiracRenderer_fx(
        {
            FOR( bin = MASA_band_grouping_24[band]; bin < MASA_band_grouping_24[band + 1] && bin < maxBin; bin++ )
            {
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                IF( meta->directional_meta[0].azimuth_fx[sf][band] < 0 )
                {
                    hSpatParamRendCom->azimuth[meta_write_index][bin] = negate( extract_l( L_shr( L_negate( meta->directional_meta[0].azimuth_fx[sf][band] ), Q22 ) ) ); /* Q22 - Q22 = Q0 */
@@ -8988,11 +8987,7 @@ static void copyMasaMetadataToDiracRenderer_fx(
                {
                    hSpatParamRendCom->azimuth[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[0].azimuth_fx[sf][band], Q22 ) );
                }
#else
                hSpatParamRendCom->azimuth[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[0].azimuth_fx[sf][band], Q22 ) ); /* Q22 - Q22 = Q0 */
#endif
                move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                IF( meta->directional_meta[0].elevation_fx[sf][band] < 0 )
                {
                    hSpatParamRendCom->elevation[meta_write_index][bin] = negate( extract_l( L_shr( L_negate( meta->directional_meta[0].elevation_fx[sf][band] ), Q22 ) ) ); /* Q22 - Q22 = Q0 */
@@ -9001,9 +8996,6 @@ static void copyMasaMetadataToDiracRenderer_fx(
                {
                    hSpatParamRendCom->elevation[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[0].elevation_fx[sf][band], Q22 ) );
                }
#else
                hSpatParamRendCom->elevation[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[0].elevation_fx[sf][band], Q22 ) ); /* Q22 - Q22 = Q0 */
#endif
                move16();
                hSpatParamRendCom->energy_ratio1_fx[meta_write_index][bin] = meta->directional_meta[0].energy_ratio_fx[sf][band];
                move32();
@@ -9016,7 +9008,6 @@ static void copyMasaMetadataToDiracRenderer_fx(

                IF( EQ_16( hSpatParamRendCom->numSimultaneousDirections, 2 ) )
                {
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                    IF( meta->directional_meta[1].azimuth_fx[sf][band] < 0 )
                    {
                        hSpatParamRendCom->azimuth2[meta_write_index][bin] = negate( extract_l( L_shr( L_negate( meta->directional_meta[1].azimuth_fx[sf][band] ), Q22 ) ) ); /* Q22 - Q22 = Q0 */
@@ -9025,11 +9016,7 @@ static void copyMasaMetadataToDiracRenderer_fx(
                    {
                        hSpatParamRendCom->azimuth2[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[1].azimuth_fx[sf][band], Q22 ) );
                    }
#else
                    hSpatParamRendCom->azimuth2[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[1].azimuth_fx[sf][band], Q22 ) ); /* Q22 - Q22 = Q0 */
#endif
                    move16();
#ifdef FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI
                    IF( meta->directional_meta[1].elevation_fx[sf][band] < 0 )
                    {
                        hSpatParamRendCom->elevation2[meta_write_index][bin] = negate( extract_l( L_shr( L_negate( meta->directional_meta[1].elevation_fx[sf][band] ), Q22 ) ) ); /* Q22 - Q22 = Q0 */
@@ -9038,9 +9025,6 @@ static void copyMasaMetadataToDiracRenderer_fx(
                    {
                        hSpatParamRendCom->elevation2[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[1].elevation_fx[sf][band], Q22 ) );
                    }
#else
                    hSpatParamRendCom->elevation2[meta_write_index][bin] = extract_l( L_shr( meta->directional_meta[1].elevation_fx[sf][band], Q22 ) ); /* Q22 - Q22 = Q0 */
#endif
                    move16();
                    hSpatParamRendCom->energy_ratio2_fx[meta_write_index][bin] = meta->directional_meta[1].energy_ratio_fx[sf][band];
                    move32();