Commit df8e5801 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '1824-regression-decoder-crash-for-stereo-jbm-decoding-at-80kbps-in' into 'main'

Resolve "[regression] Decoder crash for Stereo JBM decoding at 80kbps in normalized_cross_correlation_self_fx()"

Closes #1824

See merge request !1916
parents de430f5e c772a10e
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -144,4 +144,6 @@

#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */

#define FIX_1824

#endif
+6 −0
Original line number Diff line number Diff line
@@ -113,9 +113,15 @@ Word16 normalized_cross_correlation_self_fx( const Word16 *signal,
    sumXX = L_shl( sumXX, normX );
    normY = norm_l( sumYY );
    sumYY = L_shl( sumYY, normY );
#ifdef FIX_1824
    product = L_shr( L_mult0( extract_h( sumXX ), extract_h( sumYY ) ), 1 );
    normXY = add( normX, normY );
    normXY = sub( normXY, 32 + 1 );
#else
    product = L_mult0( extract_h( sumXX ), extract_h( sumYY ) );
    normXY = add( normX, normY );
    normXY = sub( normXY, 32 );
#endif

    /* change norm to factor of 2 */
    IF( s_and( normXY, 0x1 ) != 0 )