Commit b46bbe05 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into 2122_basop_delay_alignment_split_rendering_and_external_rend_crashes_omasa

parents 6aaea8d6 5cb54858
Loading
Loading
Loading
Loading
Loading
+34 −6
Original line number Diff line number Diff line
@@ -3448,7 +3448,11 @@ static void do_object_editing_fx(

        if ( readInfo->bg_gain_edited )
        {
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
            editableParameters->gain_bed_fx = (Word32) ( readInfo->bg_gain * 536870912 ); /* Q29 */
#else
            editableParameters->gain_bed_fx = (Word32) readInfo->bg_gain * 536870912;                                                                                                                                                       /* Q29 */
#endif
        }

        for ( obj_idx = 0; obj_idx < editableParameters->num_obj; obj_idx++ )
@@ -3461,11 +3465,19 @@ static void do_object_editing_fx(
                    if ( readInfo->obj_azi_relative[obj_idx] )
                    {
                        /* azimuth: apply relative edit + wrap */
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
                        editableParameters->ism_metadata[obj_idx].azimuth_fx = ( ( editableParameters->ism_metadata[obj_idx].azimuth_fx + (Word32) ( readInfo->obj_azi[obj_idx] * 4194304 ) + 2264924160 ) % 1509949440 ) - 754974720; /* Q22 */
#else
                        editableParameters->ism_metadata[obj_idx].azimuth_fx = ( ( editableParameters->ism_metadata[obj_idx].azimuth_fx + (Word32) readInfo->obj_azi[obj_idx] * 4194304 + 2264924160 ) % 1509949440 ) - 754974720;          /* Q22 */
#endif
                    }
                    else
                    {
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
                        editableParameters->ism_metadata[obj_idx].azimuth_fx = (Word32) ( readInfo->obj_azi[obj_idx] * 4194304 ); /* Q22 */
#else
                        editableParameters->ism_metadata[obj_idx].azimuth_fx = (Word32) readInfo->obj_azi[obj_idx] * 4194304;                                                                                                               /* Q22 */
#endif
                    }
                }
                if ( readInfo->obj_ele_edited[obj_idx] )
@@ -3473,11 +3485,19 @@ static void do_object_editing_fx(
                    if ( readInfo->obj_ele_relative[obj_idx] )
                    {
                        /* elevation: apply relative edit + saturation */
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
                        editableParameters->ism_metadata[obj_idx].elevation_fx = L_max( L_min( editableParameters->ism_metadata[obj_idx].elevation_fx + (Word32) ( readInfo->obj_ele[obj_idx] * 4194304 ), 377487360 ), -377487360 ); /* Q22 */
#else
                        editableParameters->ism_metadata[obj_idx].elevation_fx = L_max( L_min( editableParameters->ism_metadata[obj_idx].elevation_fx + (Word32) readInfo->obj_ele[obj_idx] * 4194304, 377487360 ), -377487360 );           /* Q22 */
#endif
                    }
                    else
                    {
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
                        editableParameters->ism_metadata[obj_idx].elevation_fx = (Word32) ( readInfo->obj_ele[obj_idx] * 4194304 ); /* Q22 */
#else
                        editableParameters->ism_metadata[obj_idx].elevation_fx = (Word32) readInfo->obj_ele[obj_idx] * 4194304;                                                                                                             /* Q22 */
#endif
                    }
                }
            }
@@ -3489,14 +3509,22 @@ static void do_object_editing_fx(
                {
                    /* gain: apply relative edit + saturation */
#ifdef FIX_2140_OBJECT_EDITING_SANITIZER_ISSUES
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
                    editableParameters->ism_metadata[obj_idx].gain_fx = L_max( L_min( L_shl_sat( Mpy_32_32( editableParameters->ism_metadata[obj_idx].gain_fx, (Word32) ( readInfo->obj_gain[obj_idx] * 536870912 ) ), 2 ), OBJ_EDIT_GAIN_MAX_FX ), OBJ_EDIT_GAIN_MIN_FX ); /* Q29*Q29 -> Q27 shift back to Q29 */
#else
                    editableParameters->ism_metadata[obj_idx].gain_fx = L_max( L_min( L_shl_sat( Mpy_32_32( editableParameters->ism_metadata[obj_idx].gain_fx, (Word32) readInfo->obj_gain[obj_idx] * 536870912 ), 2 ), OBJ_EDIT_GAIN_MAX_FX ), OBJ_EDIT_GAIN_MIN_FX ); /* Q29*Q29 -> Q27 shift back to Q29 */
#endif
#else
                    editableParameters->ism_metadata[obj_idx].gain_fx = L_max( L_min( editableParameters->ism_metadata[obj_idx].gain_fx * (Word32) readInfo->obj_gain[obj_idx] * 536870912, OBJ_EDIT_GAIN_MAX_FX ), OBJ_EDIT_GAIN_MIN_FX ); /* Q29 */
#endif
                }
                else
                {
#ifdef FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE
                    editableParameters->ism_metadata[obj_idx].gain_fx = (Word32) ( readInfo->obj_gain[obj_idx] * 536870912 ); /* Q29 */
#else
                    editableParameters->ism_metadata[obj_idx].gain_fx = (Word32) readInfo->obj_gain[obj_idx] * 536870912;                                                                                                                   /* Q29 */
#endif
                }
            }
        }
+2 −0
Original line number Diff line number Diff line
@@ -987,6 +987,7 @@ Word32 div_w( Word32 L_num, Word32 L_den )
    }
}

#ifndef REMOVE_BASOP_Util_Divide3232_Scale_cadence
Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x, Word32 y, Word16 *s )
{
    Word32 z;
@@ -1038,6 +1039,7 @@ Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x, Word32 y, Word16 *s )

    return z;
}
#endif

Word32 div_w_newton( Word32 num, Word32 den );
/*
+2 −0
Original line number Diff line number Diff line
@@ -328,9 +328,11 @@ Word16 BASOP_Util_Divide3232_Scale( Word32 x, /*!< i : Numerator*/
                                    Word32 y,    /*!< i  : Denominator*/
                                    Word16 *s ); /*!< o  : Additional scalefactor difference*/

#ifndef REMOVE_BASOP_Util_Divide3232_Scale_cadence
Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x,    /*!< i  : Numerator*/
                                            Word32 y,    /*!< i  : Denominator*/
                                            Word16 *s ); /*!< o  : Additional scalefactor difference*/
#endif


Word32 BASOP_Util_Divide3232_Scale_newton( Word32 x,    /*!< i  : Numerator*/
+188 −71
Original line number Diff line number Diff line
@@ -2322,19 +2322,35 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = sub( shr( n, 3 ), 1 ); /* (3*m/8) - 1 = (n/8) - 1 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                /* Align with the following non-fractional mode so as to gain 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  /* Align with the following non-fractional mode so as to gain 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc ); /* bit growth = 1 (compensated by non-fractional mode MAC). Qx - 1*/
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc ); // Qx - 1
        move16();

@@ -2348,19 +2364,35 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = shr( m, 3 ); /* (4*m/8) - (3*m/8) = m/8 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  // Q15 + Qx
        acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc ); // Qx - 1
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc ); // Qx - 1
        move16();

@@ -2371,9 +2403,15 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    }

    /* special case: i = m/2 i.e. 1/3 */
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_shl_sat( *RZ0--, 15 );                // Q15 + Qx
    acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
#else
    acc = L_shl( *RZ0--, 15 );                      // Q15 + Qx
    acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );       // Q15 + Qx
    acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );       // Q15 + Qx
#endif
    *RY++ = round_fx( acc ); // Qx - 1
    move16();

@@ -2396,19 +2434,34 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = sub( shr( m, 2 ), 1 ); /* (6*m/8) - ((m/2)+1) = m/4 - 1 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0--, 15 );                // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0--, 15 );                  // Q15 + Qx
        acc = L_mac0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc ); // Qx - 1
        move16();

        acc = L_mult0( *IZ0++, -32768 ); // Q15 + Qx
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_msu0_sat( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_msu0( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc ); // Qx - 1
        move16();

@@ -2423,19 +2476,34 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = shr( m, 2 );
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0--, 15 );                // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_msu0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc ); // Qx - 1
        move16();

        acc = L_mult0( *IZ0++, -32768 ); // Q15 + Qx
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_msu0_sat( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_msu0( acc, *RZ1--, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ1++, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *RZ2--, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2++, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc ); // Qx - 1
        move16();

@@ -2446,15 +2514,26 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    }

    /* special case: i = m, i.e 2/3 */
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
#else
    acc = L_shl( *RZ0++, 15 );                      // Q15 + Qx
    acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );       // Q15 + Qx
    acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );       // Q15 + Qx
#endif
    *RY++ = round_fx( acc ); // Qx - 1
    move16();

    acc = L_deposit_l( 0 );
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
    acc = L_mac0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
#else
    acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] );     // Q15 + Qx
    acc = L_mac0( acc, *RZ2++, t_sin[s2_ind] );     // Q15 + Qx
#endif
    *IY-- = round_fx( acc ); // Qx - 1
    move16();
    IZ0--; /* Just decrement the address counter */
@@ -2470,19 +2549,35 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = sub( shr( m, 3 ), 1 ); /* (9*m/8) - (m +1) = m/8 - 1 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc ); // Qx - 1
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc ); // Qx - 1
        move16();

@@ -2496,19 +2591,35 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    l = shr( n, 3 ); /* (12*m/8) - (9*m/8) = 3*m/8 = n/8 */
    FOR( i = 0; i < l; i++ )
    {
#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *RZ0++, 15 );                // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0_sat( acc, *IZ1, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ2, t_sin[s2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *RZ0++, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );   /* Non-fractional mode gains 1 more bit headroom. Q15 + Qx*/
        acc = L_mac0( acc, *IZ1, t_sin[s1_ind] );   // Q15 + Qx
        acc = L_mac0( acc, *RZ2, t_sin[c2_ind] );   // Q15 + Qx
        acc = L_msu0( acc, *IZ2, t_sin[s2_ind] );   // Q15 + Qx
#endif
        *RY++ = round_fx( acc ); // Qx - 1
        move16();

#ifdef FIX_2170_ASSERT_IN_FFT3
        acc = L_shl_sat( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0_sat( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0_sat( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0_sat( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#else
        acc = L_shl( *IZ0--, 15 );                  // Q15 + Qx
        acc = L_msu0( acc, *RZ1++, t_sin[s1_ind] ); // Q15 + Qx
        acc = L_msu0( acc, *IZ1--, t_sin[c1_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *RZ2++, t_sin[s2_ind] ); // Q15 + Qx
        acc = L_mac0( acc, *IZ2--, t_sin[c2_ind] ); // Q15 + Qx
#endif
        *IY-- = round_fx( acc ); // Qx - 1
        move16();

@@ -2519,9 +2630,15 @@ void fft3_fx( const Word16 X[] /*Qx*/, Word16 Y[] /*Qx*/, const Word16 n )
    }

    /* special case: i = 3*m/2 */
#ifdef FIX_2170_ASSERT_IN_FFT3
    acc = L_shl_sat( *RZ0, 15 );                  // Q15 + Qx
    acc = L_msu0_sat( acc, *RZ1, t_sin[c1_ind] ); // Q15 + Qx
    acc = L_mac0_sat( acc, *RZ2, t_sin[c2_ind] ); // Q15 + Qx
#else
    acc = L_shl( *RZ0, 15 );                        // Q15 + Qx
    acc = L_msu0( acc, *RZ1, t_sin[c1_ind] );       // Q15 + Qx
    acc = L_mac0( acc, *RZ2, t_sin[c2_ind] );       // Q15 + Qx
#endif
    *RY = round_fx( acc ); // Qx - 1
    move16();

+5 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@
#endif

/* ################### Start FIXES switches ########################### */
#define REMOVE_BASOP_Util_Divide3232_Scale_cadence           /* remove this division variant */
#define FIX_1990_SANITIZER_IN_REVERB_LOAD                    /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure - keep until #2059 is addressed */
#define FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK            /* Eri: Issue 1999: Range check on float values of distance attenuation, while the float values are not propagated to this function. The test is not correct, but configurable distance attenuation is not used in Characterization.*/
#define TEMP_FIX_2088_MSAN_INIT_ERROR                        /* Eri: Temporary fix for Issue 2088 - MSAN error. Will come with later port of JBM+Split rendering update */
@@ -86,10 +87,14 @@
#define FIX_2166_ASSERT_OSBA_PLC_STEREO_OUT                  /* FhG: fix for issue 2166 - add missing averaging factor 0.5 in for the sum of energies in function stereo_dft_dmx_swb_nrg_fx()*/

#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE                /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
#define FIX_2170_ASSERT_IN_FFT3                              /* Eri: Assert in fft3_fx from EVS, adding _sat */
#define FIX_2082_FP_LEFTOVERS_OMASA_DEC                      /* Nokia: fix for issue 2082, cleaning remaining floating point code */
#define FIX_2174_JBM_BASOP_ALIGNMENT                         /* VoiceAge, Nokia: Fixes to JBM BASOP implementation and alignment to float */

#define FIX_2176_ASSERT_DEC_MAP_PARAMS_DIRAC2STEREO          /* FhG: Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the subframe_band_nrg[][] calculation */
#define FIX_2015_PREMPH_SAT_ALT                              /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor, allows preemphis to get 1 more bit headroom */
#define FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE       /* Nokia: Fixes float  to fx conversion in decoder app with object edit file interface */

/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
Loading