Skip to content

OMASA redundancies in stereo mode selection

When debugging #861 (closed), there were noticed two strange conditions (probably redundancies ?) related to MASA/OMASA stereo mode selection:

  1. ivas_stereo_classifier.c, line 123:

if ( hCPE->element_brate >= MIN_BRATE_MDCT_STEREO && !( hCPE->element_brate == IVAS_48k && ivas_total_brate == IVAS_32k ) ) /* the second condition for PARAM mode OMASA */

It looks strange that element_brate (48 kbps) is considered to be higher than ivas_total_brate (32 kbps). This condition was introduced in cd76cbd5 by @pajunen.

  1. ivas_masa_enc.c, line 1987:

if ( ivas_total_brate - ism_total_brate < MASA_STEREO_MIN_BITRATE || ivas_total_brate - ism_total_brate < MIN_BRATE_MDCT_STEREO )

It seems to make no sense to test the same condition ivas_total_brate - ism_total_brate against two different thresholds. This condition was introduced as part of 45cc1b96 but was very likely worked on already earlier during the OMASA contribution work.

A review is needed. Tagging @vasilache, @pihlajakuja, @pajunen.