Skip to content

Resolve "ivas_cpe_enc_fx(): Wrong calculation of total_brate"

Reason why this change is needed

The calculation of sts[n]->total_brate in ivas_cpe_enc_fx() is not working correctly (at least for some cases):

sts[n]->total_brate = L_shl( div_l( hCPE->element_brate, n_CoreChannels ), 1 );                                                      /* Q0 */

For example, for a total_brate of 384000, the expression returns 65534.

Description of the change

Replace the expression using div_l() by a direct assignment or a L_shr(), dependent on the number of core-channels.

Affected operating points

  • Change seems to be BE. In theory, bitstreams using MDCT Stereo CPEs are affected.

Closes #2362 (closed)

Edited by multrus

Merge request reports

Loading