[non-BE][split-non-BE][rend-non-BE] Resolve "Assert in stereo_dft_generate_comfort_noise_fx() for stereo bitstream with dtx and bit rate switching"

  • Related issues:
  • Requested reviewers:

Reason why this change is needed

  • The test case mentioned in #2614 causes an assertion failure, due to a L_shl overflow.

Description of the change

  • Reduce the target scale of the result by the exponent of "ptr_cng" accordingly to avoid the overflow, instead of only accounting the exponent of "ptr_tmp" vector alone.

*ptr_tmp = tmp * *ptr_tmp + ( 1 - tmp ) * sqrtf( *ptr_cng++ ) * hStereoDft->scale;

Affected operating points

  • Decoder using LP CNG.

Closes #2614

Merge request reports

Loading