Commit 659ff2ab authored by vaillancour's avatar vaillancour
Browse files

proposal for issue 2471

parent b0d052d7
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@
#define FIX_2283_ISM_MD_DELAY                           /* Dolby: Fix ISM metadata delay round-off */
#define FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING      /* FhG: basop issue 2262: correct buffer update for FD-CNG buffer in case of BR switching */
#define FIX_2440_AGC_PRESCALING                         /* FhG: basop issue 2440: Fix loop bounds when scaling p_output_fx before ivas_spar_dec_agc_pca_fx() */

#define FIX_2471_REMOVE_POSSIBLE_OVRF                   /* VA: basop issue 2471: correcting undesired overflow */
/* ##################### End NON-BE switches ########################### */

/* ################## End MAINTENANCE switches ######################### */
+4 −1
Original line number Diff line number Diff line
@@ -997,8 +997,11 @@ void norm_corr_ivas_fx(
        corr = extract_h( L_tmp );

        /* Compute 1/sqrt(energy of excf[]) */
#ifndef FIX_2471_REMOVE_POSSIBLE_OVRF
        Word16 _0_01 = extract_l( L_shr( 21474836 /* 0.01 in Q31 */, sub( 31, add( shl( sub( Q_new, h_e ), 1 ), 1 ) ) ) );

#else
        Word64 _0_01 = W_shr( 21474836 /* 0.01 in Q31 */, sub( 31, add( shl( sub( Q_new, h_e ), 1 ), 1 ) ) );
#endif
        W_tmp = W_mac_16_16( _0_01, excf[0], excf[0] );
        FOR( i = 1; i < L_subfr; i++ )
        {
+8 −0
Original line number Diff line number Diff line
@@ -1019,12 +1019,20 @@ void tcx_ltp_encode_ivas_fx(

        IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) )
        {
#ifndef FIX_2471_REMOVE_POSSIBLE_OVRF           
            tempFlatness_fx = extract_l( L_shr( GetTCXAvgTemporalFlatnessMeasure_ivas_fx( st->hTranDet, NSUBBLOCKS - NSUBBLOCKS_SHIFT, add( nPrevSubblocks, NSUBBLOCKS_SHIFT ) ), 14 ) ); // Q7
#else
            tempFlatness_fx = extract_h( L_shl_sat( GetTCXAvgTemporalFlatnessMeasure_ivas_fx( st->hTranDet, NSUBBLOCKS - NSUBBLOCKS_SHIFT, add( nPrevSubblocks, NSUBBLOCKS_SHIFT ) ), 2 ) );
#endif
            maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS - NSUBBLOCKS_SHIFT, add( nPrevSubblocks, NSUBBLOCKS_SHIFT ) );            // Q3
        }
        ELSE
        {
#ifndef FIX_2471_REMOVE_POSSIBLE_OVRF
            tempFlatness_fx = extract_l( L_shr( ( GetTCXAvgTemporalFlatnessMeasure_ivas_fx( st->hTranDet, NSUBBLOCKS, nPrevSubblocks ) ), 14 ) ); // Q7
#else
            tempFlatness_fx = extract_h( L_shl_sat( ( GetTCXAvgTemporalFlatnessMeasure_ivas_fx( st->hTranDet, NSUBBLOCKS, nPrevSubblocks ) ), 2 ) ); // Q7
#endif
            maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks );                // Q3
        }