Incorrect scaling of LFE buffer in MCT-MC Binaural output with Crend
Basic info
Bug description
When rendering MC5.1 encoded at 192kbps to BINAURAL with JBM operation, the binaural output has very weak bass compared to the float reference branch. External rendering of the decoder passthrough output does not demonstrate the same problem, indicating a scaling issue with adding the LFE signal to binaural output. This causes a high MLD of 16.66.
There seems to be a code block in ivas_jbm_dec.c:3174ff
that scales the signal before the ivas_binaural_add_LFE_fx()
function call, which is not present before other calls to this function. It specifically checks if the renderer is CREND and applies a downscaling to the entire signal:
test();
IF( st_ivas->hDecoderConfig->Opt_tsm && EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_MIXER_CONV ) )
{
FOR( i = 0; i < nchan_in; i++ )
{
scale_sig32( p_tc_fx[i], *nSamplesRendered, -Q2 ); // Q(11-2)
}
}
I'm not sure if this scaling is actually needed, removing it results in a reduction of the MLD from 16.66 to 0.09. However an expert should probably check if this scaling is otherwise needed, or if this change breaks other modes.
Ways to reproduce
Bitstream has been uploaded.
./IVAS_cod_flt_ref -mc 5_1 -max_band FB 192000 48 experiments/basop-verification/MC-5_1/proc_input/bm2aa1s13.wav out/mc-5_1--bm2aa1s13--192000.192
networkSimulator_g192 experiments/basop-verification/dly_error_profile_3.dat out/mc-5_1--bm2aa1s13--192000.192 out/mc-5_1--bm2aa1s13--192000.netsimout-dly_error_profile_3.192 out/mc-5_1--bm2aa1s13--192000.netsimtrace 1 0
./IVAS_dec_fx -voip -Tracefile out/mc-5_1--bm2aa1s13--192000.jbm-dly_error_profile_3.dec.BINAURAL.fx.dectrace BINAURAL 48 out/mc-5_1--bm2aa1s13--192000.netsimout-dly_error_profile_3.192 out/mc-5_1--bm2aa1s13--192000.jbm-dly_error_profile_3.dec.BINAURAL.fx.wav
./IVAS_dec_flt_ref -voip -Tracefile out/mc-5_1--bm2aa1s13--192000.jbm-dly_error_profile_3.dec.BINAURAL.flt.dectrace BINAURAL 48 out/mc-5_1--bm2aa1s13--192000.netsimout-dly_error_profile_3.192 out/mc-5_1--bm2aa1s13--192000.jbm-dly_error_profile_3.dec.BINAURAL.flt.wav