Skip to content

Floating-point leftovers: lib_dec/ivas_omasa_dec_fx.c

Bug description

In lib_dec/ivas_omasa_dec_fx.c, there are a few floating-point leftovers in the definition of the constants:


#define EXT_RENDER_IIR_FAC              0.95f
#define MULT_17_DIV_20_Q15              ( Word16 )( ( 17.0 / 20.0f ) * pow( 2, 15 ) + 0.5f )
#define MULT_1_DIV_CLDFB_NO_COL_MAX_Q15 ( Word16 )( ( 1.0 / CLDFB_NO_COL_MAX ) * pow( 2, 15 ) + 0.5f )
#define ONEMINUX_EXT_RENDER_IIR_FAC_Q31 ( Word32 )( ( 1.0f - EXT_RENDER_IIR_FAC ) * pow( 2, 31 ) + 0.5f )
#define EXT_RENDER_IIR_FAC_Q31          ( Word32 )( EXT_RENDER_IIR_FAC * pow( 2, 31 ) + 0.5f )

This floating-point code is used during runtime, and it shouldn't be too difficult to convert that into fixed-point constants.