Commit 6278b016 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2585_BIT_ALLOCATION_DIFF

parent cb83eaf7
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1146,22 +1146,14 @@ static Word16 Find_bit_alloc_IVAS_fx(
            /* bits_per_bands[i] = 112; */
            bits_per_bands[i] = Q18_112;
            move32();
#ifndef FIX_2585_BIT_ALLOCATION_DIFF
            j = add( j, add( i, 1 ) );
#else
            j = add( i, 1 );
#endif
        }

        /* safety check for overage bit reallocation */
        /* else if (bits_per_bands[i] + sum_bit / 3 > 112) */
        ELSE IF( GT_32( L_add( bits_per_bands[i], Mpy_32_16_1( sum_bit, Q15_0_33 ) ), Q18_112 ) )
        {
#ifndef FIX_2585_BIT_ALLOCATION_DIFF
            j = add( j, add( i, 1 ) );
#else
            j = add( i, 1 );
#endif
        }
    }

+0 −14
Original line number Diff line number Diff line
@@ -204,7 +204,6 @@ void tdm_bit_alloc(
        }
        ELSE
        {
#ifdef FIX_2585_BIT_ALLOCATION_DIFF
            Word16 neg = 0;
            move16();
            if ( bit_rate_diff_fx < 0 )
@@ -212,17 +211,12 @@ void tdm_bit_alloc(
                neg = 1;
                move16();
            }
#endif
            IF( LT_16( ener_ratio_idx, LRTD_STEREO_MID_IS_PRIM ) )
            {
                bit_rate_diff_fx = imult3216( bit_rate_diff_fx, sub( LRTD_STEREO_MID_IS_PRIM, ener_ratio_idx ) ); /*Q0*/
                bit_rate_diff_fx = L_shr( bit_rate_diff_fx, 1 );                                                  /*Q0*/
                bit_rate_diff_fx = Mpy_32_16_1( L_abs( bit_rate_diff_fx ), 3277 /*0.1f in Q15*/ );                /*Q0*/
#ifdef FIX_2585_BIT_ALLOCATION_DIFF
                if ( neg != 0 )
#else
                if ( bit_rate_diff_fx < 0 )
#endif
                {
                    bit_rate_diff_fx = L_negate( bit_rate_diff_fx );
                }
@@ -232,11 +226,7 @@ void tdm_bit_alloc(
                bit_rate_diff_fx = imult3216( bit_rate_diff_fx, sub( ener_ratio_idx, LRTD_STEREO_MID_IS_PRIM ) ); /*Q0*/
                bit_rate_diff_fx = L_shr( bit_rate_diff_fx, 1 );                                                  /*Q0*/
                bit_rate_diff_fx = Mpy_32_16_1( L_abs( bit_rate_diff_fx ), 3277 /*0.1f in Q15*/ );                /*Q0*/
#ifdef FIX_2585_BIT_ALLOCATION_DIFF
                if ( neg != 0 )
#else
                if ( bit_rate_diff_fx < 0 )
#endif
                {
                    bit_rate_diff_fx = L_negate( bit_rate_diff_fx );
                }
@@ -338,11 +328,7 @@ void tdm_bit_alloc(
            *tdm_low_rate_mode = 0;
            move16();
        }
#ifndef FIX_2585_BIT_ALLOCATION_DIFF
        ELSE IF( ( tdm_lp_reuse_flag == 0 && LT_32( *total_brate_sec, TDM_UC_NORMAL_MODE_MINBR_LP_R ) && EQ_16( coder_type, UNVOICED ) ) || ( tdm_lp_reuse_flag == 0 && LE_32( *total_brate_sec, L_deposit_l( add( tdm_bit_allc_tbl[idx][0], MID_LP_BRATE ) ) ) ) )
#else
        ELSE IF( ( tdm_lp_reuse_flag == 0 && LT_32( *total_brate_sec, TDM_UC_NORMAL_MODE_MINBR_LP_R ) && EQ_16( coder_type, UNVOICED ) ) || ( tdm_lp_reuse_flag == 0 && LT_32( *total_brate_sec, L_deposit_l( add( tdm_bit_allc_tbl[idx][0], MID_LP_BRATE ) ) ) ) )
#endif
        {
            *total_brate_sec = L_add( *total_brate_sec, MID_LP_BRATE ); /*Q0*/
            move32();
+0 −1
Original line number Diff line number Diff line
@@ -103,7 +103,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_2585_BIT_ALLOCATION_DIFF                    /* VA : issue 2585, bit allocation different behaviors between float and fixed-point for corner cases */
#define FIX_BASOP_2592_OVERFLOW                         /* FhG: BASOP #2592: fix overflow in GetF0() */
#define FIX_BASOP_2591_EDGE_DETECT_COMP                 /* FhG: BASOP #2591: Wrong comparison in edge_detect_fx() */
#define FIX_NONBE_2580_USE_LENGTH_NOT_CONSTANT          /* Dolby: fix 2580: use dynamic length denominator for average energy in unclr_calc_corr_features_fx() */