Skip to content

[NON-BE] Resolve #1197 "OMASA rateswitch to PARAM_ONE_OBJ uses invalid data for the first 2sf"

Reason why this change is needed

When the bitrate switching in the decoder enters the OMASA mode ISM_MASA_MODE_PARAM_ONE_OBJ from another mode, the object metadata in st_ivas->hMasaIsmData is not zeroed and may contain old values. Since the reading and writing of this ringbuffer -like structure is done with an offset of 2 sub-frames the values read for the first 2 subframes are invalid. When staying in the mode, the ringbuffer content is valid.

Description of the change

In OMASA reconfiguration function, when entering ISM_MASA_MODE_PARAM_ONE_OBJ from another mode, zero the ringbuffers for object direction and energy ratio in st_ivas->hMasaIsmData.

In function ivas_omasa_preProcessStereoTransportsForEditedObjects that uses the ratio values, clip the sum to max 1.0f, since the sum of the dequantized values may exceed is by an epsilon.

Affected operating points

  • Encoder and bitstream are identical with earlier state.
  • Output non-BE: Differences for OMASA bitstreams containing bitrate switching to the mode ISM_MASA_MODE_PARAM_ONE_OBJ.
    • An example diff between main and the MR. OMASA mode switch every 50 frames. Switch to ISM_MASA_MODE_PARAM_ONE_OBJ at frames 200, 400, 500, 800, 1000 marked with orange stems (from 1sep-MASA, DISC, MASA, 1sep-MASA, DISC). Red/blue is difference signal caused by the change. It is limited to the locations where the mode ISM_MASA_MODE_PARAM_ONE_OBJ is entered and fades out quickly.

image

Related to #1197 (closed)

Merge request reports

Loading