Commit 3f8cc06f authored by JÜRGEN Gerstacker's avatar JÜRGEN Gerstacker
Browse files

Merge branch '2027-replace-carry-overflow-using-64-bit-version-iii' into 'main'

Resolve "Replace Carry Overflow, using 64-bit Version (III.)"

Closes #2027

See merge request !2245
parents bee3768a 53798dc9
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -3537,7 +3537,11 @@ void QuantizeTCXSpectrum_fx(
            move16();
        }

#ifndef FIX_ISSUE_1965_REPLACE_CARRY_OVERFLOW
        tmp32 = L_deposit_l( 0 );
#else
        Word64 tmp64 = 0;
#endif
        FOR( i = 0; i < L_spec; i++ )
        {
            spectrum_fx[i] = L_mult( sqQ[i], 1 << ( 30 - SPEC_EXP_DEC ) );
@@ -3546,13 +3550,18 @@ void QuantizeTCXSpectrum_fx(
#ifndef FIX_ISSUE_1965_REPLACE_CARRY_OVERFLOW
            tmp32 = L_macNs_co( tmp32, abs_s( sqQ[i] ), i, &Carry, &Overflow );
#else
            tmp32 = L_macNs( tmp32, abs_s( sqQ[i] ), i );
            tmp64 = W_mac_16_16( tmp64, abs_s( sqQ[i] ), i );
#endif
        }
        *spectrum_e = SPEC_EXP_DEC;
        move16();

#ifndef FIX_ISSUE_1965_REPLACE_CARRY_OVERFLOW
        *nf_seed = extract_l( tmp32 );
#else
        assert( W_extract_h( tmp64 ) == 0 );
        *nf_seed = extract_l( W_extract_l( tmp64 ) );
#endif
    }
    ELSE
    {