Possible typo in array initialization in function ivas_dirac_render_sf_fx()
Basic info
Git commit SHA: 7901bdd1
Bug description
I noticed a possible typo in lib_dec/ivas_dirac_dec_fx.c:2235: https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/blob/main/lib_dec/ivas_dirac_dec_fx.c?ref_type=heads#L2235. The code looks as follows:
FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ )
{
FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ )
{
set32_fx( Cldfb_RealBuffer_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX );
set32_fx( Cldfb_ImagBuffer_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX );
}
}
FOR( i = 0; i < BINAURAL_CHANNELS; i++ )
{
FOR( Word16 j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ )
{
set32_fx( Cldfb_RealBuffer_Binaural_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX );
set32_fx( Cldfb_RealBuffer_Binaural_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); // <------------- This is the line
}
}
The marked line is the same as the one directly above. I suspect that it should be Cldfb_ImagBuffer_Binaural_fx that should be initialized here?
Also, for readability/clean code purposes: could both loops please be moved after all variable declarations? This can also cause problems with the complexity measurements, even though it seems to be fine in this particular case.