From 25b1b43cad60445450d432421509985c971d6ba1 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Wed, 24 Jan 2024 15:13:39 +0530 Subject: [PATCH] ivas_lfe_dec fixed functions enabled in path [x] enables the function calls to the fixed point converted IVAS LFE decoder module which were converted earlier. [x] Few BASOP corrections. --- lib_dec/ivas_init_dec.c | 4 ++-- lib_dec/ivas_jbm_dec.c | 4 ++-- lib_dec/ivas_lfe_dec_fx.c | 4 ++-- lib_dec/ivas_mct_dec.c | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 6715d956c..134c89dc9 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1835,7 +1835,7 @@ ivas_error ivas_init_decoder( } } -#ifdef IVAS_FLOAT_FIXED_TEST +#ifdef IVAS_FLOAT_FIXED IF( ( error = ivas_create_lfe_dec_fx( &st_ivas->hLFE, output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) #else IF( ( error = ivas_create_lfe_dec( &st_ivas->hLFE, output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) @@ -2305,7 +2305,7 @@ void ivas_destroy_dec( ivas_mct_dec_close( &st_ivas->hMCT ); /* LFE handle */ -#ifdef IVAS_FLOAT_FIXED_TEST +#ifdef IVAS_FLOAT_FIXED ivas_lfe_dec_close_fx( &( st_ivas->hLFE ) ); #else ivas_lfe_dec_close( &( st_ivas->hLFE ) ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 9e2080f90..63f585fed 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -601,7 +601,7 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->mc_mode == MC_MODE_MCT ) { /* LFE channel decoder */ -#ifdef IVAS_FLOAT_FIXED_TEST +#ifdef IVAS_FLOAT_FIXED Word32 *p_output_fx; p_output_fx = (Word32 *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( Word32 ) ); @@ -654,7 +654,7 @@ ivas_error ivas_jbm_dec_tc( else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { /* LFE channel decoder */ -#ifdef IVAS_FLOAT_FIXED_TEST +#ifdef IVAS_FLOAT_FIXED Word32 *p_output_fx; p_output_fx = (Word32 *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( Word32 ) ); diff --git a/lib_dec/ivas_lfe_dec_fx.c b/lib_dec/ivas_lfe_dec_fx.c index 694c68d98..a6b93e7b7 100644 --- a/lib_dec/ivas_lfe_dec_fx.c +++ b/lib_dec/ivas_lfe_dec_fx.c @@ -129,14 +129,14 @@ static void ivas_lfe_dec_windowing_fx( pInbuf[i] = Mpy_32_32( pInbuf[add( zero_pad_len, i )], pWindow_coeffs[i] ); } - FOR( i = 0; i < shl( zero_pad_len, 2 ); i++ ) + FOR( i = 0; i < shl( zero_pad_len, 1 ); i++ ) { pInbuf[add( fade_len, i )] = pInbuf[add( add( zero_pad_len, fade_len ), i )]; } FOR( i = 0; i < fade_len; i++ ) { - pInbuf[add( add( shl( zero_pad_len, 2 ), fade_len ), i )] = Mpy_32_32( pInbuf[add( add( i_mult( zero_pad_len, 3 ), fade_len ), i )], pWindow_coeffs[sub( sub( fade_len, i ), 1 )] ); + pInbuf[add( add( shl( zero_pad_len, 1 ), fade_len ), i )] = Mpy_32_32( pInbuf[add( add( i_mult( zero_pad_len, 3 ), fade_len ), i )], pWindow_coeffs[sub( sub( fade_len, i ), 1 )] ); } return; diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 0c819eaad..64344b712 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1017,7 +1017,7 @@ static ivas_error ivas_mc_dec_reconfig( } /* LFE handle */ -#ifdef IVAS_FLOAT_FIXED_TEST +#ifdef IVAS_FLOAT_FIXED ivas_lfe_dec_close_fx( &( st_ivas->hLFE ) ); #else ivas_lfe_dec_close( &( st_ivas->hLFE ) ); @@ -1060,7 +1060,7 @@ static ivas_error ivas_mc_dec_reconfig( } /* LFE handle */ -#ifdef IVAS_FLOAT_FIXED_TEST +#ifdef IVAS_FLOAT_FIXED ivas_lfe_dec_close_fx( &( st_ivas->hLFE ) ); #else ivas_lfe_dec_close( &( st_ivas->hLFE ) ); @@ -1204,8 +1204,8 @@ static ivas_error ivas_mc_dec_reconfig( } } -#ifdef IVAS_FLOAT_FIXED_TEST - if ( ( error = ivas_create_lfe_dec_fx( &st_ivas->hLFE, st_ivas->hDecoderConfig->output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) +#ifdef IVAS_FLOAT_FIXED + IF ( ( error = ivas_create_lfe_dec_fx( &st_ivas->hLFE, st_ivas->hDecoderConfig->output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_create_lfe_dec( &st_ivas->hLFE, st_ivas->hDecoderConfig->output_Fs, binauralization_delay_ns ) ) != IVAS_ERR_OK ) #endif // IVAS_FLOAT_FIXED -- GitLab