Commit f92737e4 authored by Jan Kiene's avatar Jan Kiene
Browse files

Accept FIX_BASOP_2571_MASA_EXT_RENDER_FIXES

parent 3f3e94bf
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define NONBE_FIX_ISSUE_2206_MDCT_STEREO_FIX_2549       /* FhG: Correct scale inconsistency of old_inp_16k_fx buffer scale. */
#define FIX_BASOP_2571_MASA_EXT_RENDER_FIXES            /* Nokia: BASOP issue 2571: Fix MASA EXT DirAC renderer by unifying it with decoder */
#define NONBE_FIX_2575                                  /* Fhg: Fix issue 2575, precision loss in FD CNG */
#define FIX_2584_TD_SM_ISSUE                            /* VA: Fix inconsistencies in the SM part of the TD stereo */
#define FIX_2556_ALIGN_CONDITIONS                       /* VA: Fix different conditions that were not exact between float and fix, BE on self-test */
+0 −30
Original line number Diff line number Diff line
@@ -3896,13 +3896,11 @@ static void ivas_masa_ext_dirac_render_sf_fx(
    Word32 dirEne_fx;
    Word32 surCohEner_fx;
    move16();
#ifdef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
    Word16 tmp1;
    Word16 size;
    Word16 shift;
    DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params;
    DIRAC_OUTPUT_SYNTHESIS_STATE *h_dirac_output_synthesis_state;
#endif

    FOR( Word16 ii = 0; ii < MAX_OUTPUT_CHANNELS; ii++ )
    {
@@ -3957,7 +3955,6 @@ static void ivas_masa_ext_dirac_render_sf_fx(
        move16();
    }

#ifdef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
    IF( EQ_16( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_MONO ) )
    {
        IF( hDirACRend->masa_stereo_type_detect )
@@ -4071,7 +4068,6 @@ static void ivas_masa_ext_dirac_render_sf_fx(
        }
    }

#endif
    /* Subframe loop */
    slot_idx_start = hSpatParamRendCom->slots_rendered;
    move16();
@@ -4083,10 +4079,6 @@ static void ivas_masa_ext_dirac_render_sf_fx(
    md_idx = hSpatParamRendCom->render_to_md_map[subframe_idx];
    move16();

#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
    DIRAC_OUTPUT_SYNTHESIS_STATE *h_dirac_output_synthesis_state;
    h_dirac_output_synthesis_state = &( hDirACRend->h_output_synthesis_psd_state );
#endif

    /* copy parameters into local buffers*/

@@ -4623,33 +4615,13 @@ static void ivas_masa_ext_dirac_render_sf_fx(
    }
    ELSE
    {
#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
        IF( hDirACRend->proto_signal_decorr_on )
        {
            Word16 new_proto_diffuse_buffer_f_q = getScaleFactor32( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len );
            Word16 new_proto_direct_buffer_f_q = getScaleFactor32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_len );

            scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len, new_proto_diffuse_buffer_f_q ); // hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_q + new_proto_diffuse_buffer_f_q
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_len, new_proto_direct_buffer_f_q );    // hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q + new_proto_direct_buffer_f_q
            hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q = add( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, new_proto_direct_buffer_f_q );
            move16();
            hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_q = add( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_q, new_proto_diffuse_buffer_f_q );
            move16();
        }

#endif
        Word16 reference_power_temp_q = getScaleFactor32( DirAC_mem.reference_power_fx, DirAC_mem.reference_power_len );
        scale_sig32( DirAC_mem.reference_power_fx, DirAC_mem.reference_power_len, reference_power_temp_q ); /*DirAC_mem.reference_power_q + reference_power_temp_q*/
        DirAC_mem.reference_power_q[0] = add( DirAC_mem.reference_power_q[0], reference_power_temp_q );
        DirAC_mem.reference_power_q[1] = add( DirAC_mem.reference_power_q[1], reference_power_temp_q );
        move16();
#ifdef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
        DirAC_mem.reference_power_smooth_q[0] = DirAC_mem.reference_power_q[0];
        DirAC_mem.reference_power_smooth_q[1] = DirAC_mem.reference_power_q[1];
#else
        DirAC_mem.reference_power_smooth_q[0] = add( DirAC_mem.reference_power_q[0], reference_power_temp_q );
        DirAC_mem.reference_power_smooth_q[1] = add( DirAC_mem.reference_power_q[1], reference_power_temp_q );
#endif
        move16();

        Word16 q_cy_auto_diff_smooth = getScaleFactor32( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx, h_dirac_output_synthesis_state->cy_auto_diff_smooth_len );
@@ -4757,7 +4729,6 @@ static void ivas_masa_ext_dirac_render_sf_fx(
        DirAC_mem.reference_power_smooth_q[1] = s_min( hDirACRend->h_output_synthesis_psd_state.reference_power_smooth_prev_q[1], DirAC_mem.reference_power_q[1] );
        move16();

#ifdef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
        IF( NE_16( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_q, Q26 ) )
        {
            Scale_sig32( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_fx,
@@ -4777,7 +4748,6 @@ static void ivas_masa_ext_dirac_render_sf_fx(
            move16();
        }

#endif
        ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx( Cldfb_RealBuffer_fx,
                                                                    Cldfb_ImagBuffer_fx,
                                                                    hSpatParamRendCom,
+0 −255
Original line number Diff line number Diff line
@@ -242,10 +242,6 @@ struct IVAS_REND
static ivas_error initMasaExtRenderer( input_masa *inputMasa, const AUDIO_CONFIG outConfig, const RENDER_CONFIG_DATA *hRendCfg, hrtf_handles *hHrtfs );

static void freeMasaExtRenderer( MASA_EXT_REND_HANDLE *hMasaExtRendOut );
#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES

static void intermidiate_ext_dirac_render( MASA_EXT_REND_HANDLE hMasaExtRend, Word16 to_fix );
#endif
static ivas_error renderSbaToMultiBinauralCldfb( input_sba *sbaInput, Word32 Cldfb_Out_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_Out_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const Word16 low_res_pre_rend_rot, const Word16 num_subframes, const Word16 Q_in );
static ivas_error renderSbaToMultiBinaural( input_sba *sbaInput, const AUDIO_CONFIG outConfig, Word32 out[][L_FRAME48k], const Word16 *pq_fact );

@@ -9330,16 +9326,6 @@ static ivas_error renderInputMasa(
                case RENDERER_DIRAC:

                    copyMasaMetadataToDiracRenderer_fx( &masaInput->masaMetadata, masaInput->hMasaExtRend->hSpatParamRendCom, maxBin );
#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
                    intermidiate_ext_dirac_render( masaInput->hMasaExtRend, 1 );
#endif
#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
                    FOR( ch = 0; ch < masaInput->hMasaExtRend->hDirACRend->hOutSetup.nchan_out_woLFE + masaInput->hMasaExtRend->hDirACRend->hOutSetup.num_lfe; ch++ )
                    {
                        masaInput->hMasaExtRend->cldfbAnaRend[0]->Q_cldfb_state = Q11;
                        move16();
                    }
#endif
                    FOR( ch = 0; ch < inAudio.config.numChannels; ch++ )
                    {
                        Scale_sig32( tmpBuffer_buff_fx[ch], inAudio.config.numSamplesPerChannel, sub( Q11, *outAudio.pq_fact ) ); /* Q11 */
@@ -9359,9 +9345,6 @@ static ivas_error renderInputMasa(
                        move16();
                    }

#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
                    intermidiate_ext_dirac_render( masaInput->hMasaExtRend, 0 );
#endif
                    BREAK;
                case RENDERER_STEREO_PARAMETRIC:
                case RENDERER_BINAURAL_PARAMETRIC:
@@ -11283,244 +11266,6 @@ static void freeMasaExtRenderer(
    return;
}

#ifndef FIX_BASOP_2571_MASA_EXT_RENDER_FIXES
static void intermidiate_ext_dirac_render(
    MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA renderer structure             */
    Word16 to_fix )
{
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom;
    DIRAC_DEC_STACK_MEM DirAC_mem;
    Word16 ch;
    DIRAC_REND_HANDLE hDirACRend;
    Word16 subframe_idx;
    Word16 slot_idx;
    Word16 nchan_transport;
    Word16 tmp;

    hDirACRend = hMasaExtRend->hDirACRend;
    hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom;
    nchan_transport = hMasaExtRend->nchan_input;
    DIRAC_OUTPUT_SYNTHESIS_STATE *h_dirac_output_synthesis_state;

    h_dirac_output_synthesis_state = &( hDirACRend->h_output_synthesis_psd_state );

    subframe_idx = hSpatParamRendCom->subframes_rendered;
    move16();

    DirAC_mem = hDirACRend->stack_mem;

    IF( to_fix )
    {
        DirAC_mem.reference_power_smooth_q[0] = DirAC_mem.reference_power_q[0] = Q31;
        DirAC_mem.reference_power_smooth_q[1] = DirAC_mem.reference_power_q[1] = Q31;
        move16();
        move16();
        move16();
        FOR( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++ )
        {
            Scale_sig32( hDirACRend->h_output_synthesis_psd_state.direct_responses_fx, i_mult( hSpatParamRendCom->num_freq_bands, hDirACRend->num_outputs_dir ), sub( Q30, hDirACRend->h_output_synthesis_psd_state.direct_responses_q ) ); /* Q30 */
            hDirACRend->h_output_synthesis_psd_state.direct_responses_q = Q30;
            move16();
        }

        IF( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_fx )
        {
            Word16 shift = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_len, shift ); /* Q(hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth + shift) */
            hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth = add( hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth, shift );
            move16();
        }
        IF( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_fx )
        {
            Word16 shift = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_prev_len, shift ); /* Q(hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev + shift) */
            hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev = add( hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth_prev, shift );
            move16();
        }

        IF( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx )
        {
            Word16 shift = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_len, shift ); /* Q(hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth + shift) */
            hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth = add( hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth, shift );
            move16();
        }

        IF( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx )
        {
            tmp = L_norm_arr( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_len );
            scale_sig32( h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_len, tmp ); /* Q(h_dirac_output_synthesis_state->q_cy_auto_diff_smooth + tmp) */
            h_dirac_output_synthesis_state->q_cy_auto_diff_smooth = add( h_dirac_output_synthesis_state->q_cy_auto_diff_smooth, tmp );
            move16();
        }

        IF( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_fx )
        {
            tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_prev_len, tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev + tmp) */
            hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev = add( hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth_prev, tmp );
            move16();
        }

        scale_sig32( hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_len, sub( Q26, hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_q ) ); /* Q26 */
        hDirACRend->h_output_synthesis_psd_state.gains_dir_prev_q = Q26;
        move16();
        scale_sig32( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_len, sub( Q26, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q ) ); /* Q26 */
        hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q = Q26;
        move16();
        IF( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx )
        {
            Word16 shift = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_len, shift ); /* Q(hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev + shift) */
            hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev = add( hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev, shift );
            move16();
        }

        IF( EQ_16( hDirACRend->proto_signal_decorr_on, 1 ) )
        {
            tmp = L_norm_arr( hDirACRend->h_freq_domain_decorr_ap_state->decorr_buffer_fx, hDirACRend->h_freq_domain_decorr_ap_state->decorr_buffer_len );
            scale_sig32( hDirACRend->h_freq_domain_decorr_ap_state->decorr_buffer_fx, hDirACRend->h_freq_domain_decorr_ap_state->decorr_buffer_len, tmp ); /* Q(hDirACRend->h_freq_domain_decorr_ap_state->q_decorr_buffer + tmp) */
            hDirACRend->h_freq_domain_decorr_ap_state->q_decorr_buffer = add( hDirACRend->h_freq_domain_decorr_ap_state->q_decorr_buffer, tmp );
            move16();
        }

        IF( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx )
        {
            Word16 shift, norm1, norm2;
            Word32 tmp1, tmp2;
            maximum_abs_32_fx( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len, &tmp2 );
            maximum_abs_32_fx( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len, &tmp1 );

            IF( tmp1 == 0 )
            {
                norm1 = 31;
                move16();
            }
            ELSE
            {
                norm1 = norm_l( tmp1 );
            }

            IF( tmp2 == 0 )
            {
                norm2 = 31;
                move16();
            }
            ELSE
            {
                norm2 = norm_l( tmp2 );
            }

            shift = s_min( norm1, norm2 );

            Word16 hr_exp = sub( 31, shift );

            Scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len, sub( sub( 31, hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_q ), hr_exp ) ); /* Q(31 - hr_exp) */
            hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_q = sub( 31, hr_exp );
            move16();
        }

        FOR( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[subframe_idx]; slot_idx++ )
        {
            /* CLDFB Analysis*/
            FOR( ch = 0; ch < nchan_transport; ch++ )
            {
                hMasaExtRend->cldfbAnaRend[ch]->Q_cldfb_state = Q11;
                move16();
            }
        }

        IF( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx )
        {
            tmp = 0;
            move16();
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                tmp = s_min( tmp, L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx + slot_idx, s_min( hSpatParamRendCom->num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ) );
            }
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx + slot_idx, s_min( hSpatParamRendCom->num_freq_bands, CLDFB_NO_CHANNELS_HALF ), tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q + tmp) */
            }
            hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q[0] = add( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q[0], tmp );
            move16();
            tmp = 0;
            move16();
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                tmp = s_min( tmp, L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx + slot_idx + CLDFB_NO_CHANNELS_HALF, s_max( 0, sub( hSpatParamRendCom->num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ) ) );
            }
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx + slot_idx + CLDFB_NO_CHANNELS_HALF, s_max( 0, sub( hSpatParamRendCom->num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ), tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q + tmp) */
            }
            hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q[1] = add( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q[1], tmp );
            move16();
            tmp = 0;
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                tmp = s_min( tmp, L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, s_min( CLDFB_NO_CHANNELS_HALF, hSpatParamRendCom->num_freq_bands ) ) );
            }
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx, s_min( CLDFB_NO_CHANNELS_HALF, hSpatParamRendCom->num_freq_bands ), tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q + tmp) */
            }
            hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q[0] = add( tmp, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q[0] );
            move16();
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                tmp = s_min( tmp, L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx + CLDFB_NO_CHANNELS_HALF, s_max( 0, sub( hSpatParamRendCom->num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ) ) );
            }
            FOR( slot_idx = 0; slot_idx < hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_len; slot_idx = add( slot_idx, hSpatParamRendCom->num_freq_bands ) )
            {
                scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_fx + CLDFB_NO_CHANNELS_HALF, s_max( 0, sub( hSpatParamRendCom->num_freq_bands, CLDFB_NO_CHANNELS_HALF ) ), tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q + tmp) */
            }
            hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q[1] = add( tmp, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_prev_q[1] );
            move16();
        }

        IF( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx != NULL && GT_16( hDirACRend->h_output_synthesis_psd_params.max_band_decorr, 0 ) )
        {

            tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_len, tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q + tmp) */
            hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q = add( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_q, tmp );
            move16();
        }

        IF( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx != NULL && GT_16( hDirACRend->h_output_synthesis_psd_params.max_band_decorr, 0 ) )
        {
            tmp = L_norm_arr( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len );
            scale_sig32( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_len, tmp ); /* Q(hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q + tmp) */
            hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q = add( hDirACRend->h_output_synthesis_psd_state.proto_power_diff_smooth_prev_q, tmp );
            move16();
        }
    }
    ELSE
    {
        FOR( slot_idx = 0; slot_idx < hSpatParamRendCom->subframe_nbslots[hSpatParamRendCom->subframes_rendered]; slot_idx++ )
        {
            /* CLDFB Analysis*/
            FOR( ch = 0; ch < nchan_transport; ch++ )
            {
                scale_sig32( hMasaExtRend->cldfbAnaRend[ch]->cldfb_state_fx, hMasaExtRend->cldfbAnaRend[ch]->cldfb_size, sub( Q11, hMasaExtRend->cldfbAnaRend[0]->Q_cldfb_state ) ); /* Q11 */
                hMasaExtRend->cldfbAnaRend[ch]->Q_cldfb_state = Q11;
                move16();
            }
        }

        FOR( ch = 0; ch < hDirACRend->hOutSetup.nchan_out_woLFE + hDirACRend->hOutSetup.num_lfe; ch++ )
        {
            scale_sig32( hMasaExtRend->cldfbSynRend[ch]->cldfb_state_fx, hMasaExtRend->cldfbSynRend[ch]->cldfb_size, sub( Q11, hMasaExtRend->cldfbSynRend[0]->Q_cldfb_state ) ); /* Q11 */
            hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state = Q11;
            move16();
        }
    }

    return;
}
#endif

static ivas_error printConfigInfo_rend(
    IVAS_REND_HANDLE hIvasRend /* i  : IVAS renderer handle     */