Commit 05b535ce authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

convert more code to BASOP

parent 5e278c12
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ typedef struct _IVAS_ISM_METADATA
    float pitch;
    Word16 non_diegetic_flag;
#ifdef OBJ_EDITING_API
    float gain;
    Word32 gain_fx;
#endif

} IVAS_ISM_METADATA;
@@ -148,7 +148,7 @@ typedef struct _IVAS_EDITABLE_PARAMETERS
{
    int16_t num_obj;
    IVAS_ISM_METADATA ism_metadata[IVAS_MAX_NUM_OBJECTS];
    float gain_bed;
    Word32 gain_bed_fx;
} IVAS_EDITABLE_PARAMETERS;
#endif

+1 −1
Original line number Diff line number Diff line
@@ -5190,7 +5190,7 @@ void ivas_param_mc_dec_digest_tc_fx(
#ifdef OBJ_EDITING_API
void ivas_param_mc_dec_prepare_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                                 */
    const uint8_t nCldfbSlots                                   /* i  : number of CLFBS slots in the transport channels     */
    const UWord16 nCldfbSlots                                   /* i  : number of CLFBS slots in the transport channels     */
);
#endif

+27 −1
Original line number Diff line number Diff line
@@ -1307,8 +1307,34 @@ void ivas_param_ism_dec_digest_tc_fx(


#ifdef OBJ_EDITING_API


/*-------------------------------------------------------------------------*
 * ivas_param_ism_dec_prepare_renderer_fx()
 *
 *
 *-------------------------------------------------------------------------*/

void ivas_param_ism_dec_dequant_md_fx(
    Decoder_Struct *st_ivas )
{
    /* De-quantization */
    if ( !( st_ivas->hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 || st_ivas->hDecoderConfig->ivas_total_brate == FRAME_NO_DATA ) )
    {
        ivas_param_ism_dec_dequant_DOA_fx( st_ivas->hParamIsmDec, st_ivas->nchan_ism );
        ivas_param_ism_dec_dequant_powrat_fx( st_ivas->hParamIsmDec );
        st_ivas->hISMDTX.dtx_flag = 0;
    }
    else
    {
        st_ivas->hISMDTX.dtx_flag = 1;
    }

    return;
}

/*-------------------------------------------------------------------------*
 * ivas_param_ism_dec_prepare_renderer()
 * ivas_param_ism_dec_prepare_renderer_fx()
 *
 *
 *-------------------------------------------------------------------------*/
+146 −79
Original line number Diff line number Diff line
@@ -2222,7 +2222,7 @@ ivas_error ivas_jbm_dec_render_fx(
#ifdef OBJ_EDITING_API
                if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
                {
                    float gain = st_ivas->hSbaIsmData->gain_bed;
                    Word32 gain = st_ivas->hSbaIsmData->gain_bed_fx;
                    if ( gain != 1.0f && gain >= 0.0f )
                    {
                        int16_t i;
@@ -2230,7 +2230,7 @@ ivas_error ivas_jbm_dec_render_fx(
                        {
                            for ( i = 0; i < *nSamplesRendered; i++ )
                            {
                                p_output[n][i] += p_tc[n + st_ivas->nchan_ism][i] * gain;
                                assert ( 0 && "This is yet to be implemented");
                            }
                        }
                    }
@@ -2238,16 +2238,15 @@ ivas_error ivas_jbm_dec_render_fx(
                    {
                        for ( n = 0; n < nchan_out; n++ )
                        {
                            v_add( p_output[n], p_tc[n + st_ivas->nchan_ism], p_output[n], *nSamplesRendered );
                            assert ( 0 && "This is yet to be implemented");
                        }
                    }
                }
                else
#else
#endif
                {
                    ivas_osba_stereo_add_channels_fx( p_tc_fx, p_output_fx, ONE_IN_Q11, nchan_out, st_ivas->nchan_ism, *nSamplesRendered );
                }
#endif
            }
            ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_OSBA_AMBI ) || EQ_32( st_ivas->renderer_type, RENDERER_OSBA_LS ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) )
            {
@@ -4421,152 +4420,220 @@ void ivas_jbm_dec_prepare_renderer(

    n_render_timeslots = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity;

    if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER )

    IF( EQ_16( st_ivas->hTcBuffer->tc_buffer_mode, TC_BUFFER_MODE_BUFFER ) )
    {
        ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );

        if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hDecoderConfig->Opt_tsm )
        test();
        test();
        test();
        IF( ( EQ_16( st_ivas->ivas_format, MASA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) && st_ivas->hDecoderConfig->Opt_tsm )
        {
            ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
        }
    }
    else if ( st_ivas->ivas_format == STEREO_FORMAT )
    ELSE IF( EQ_16( st_ivas->ivas_format, STEREO_FORMAT ) )
    {
        ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );
    }
    else if ( st_ivas->ivas_format == ISM_FORMAT )
    ELSE IF( EQ_16( st_ivas->ivas_format, ISM_FORMAT ) )
    {
        /* Rendering */
        if ( st_ivas->ism_mode == ISM_MODE_PARAM )
        IF( EQ_16( st_ivas->ism_mode, ISM_MODE_PARAM ) )
        {
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
            test();
            test();
            IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) || EQ_16( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) )
            {
                ivas_dirac_dec_set_md_map( st_ivas, n_render_timeslots );
                ivas_param_ism_params_to_masa_param_mapping( st_ivas );
                ivas_dirac_dec_set_md_map_fx( st_ivas, n_render_timeslots );

                ivas_param_ism_params_to_masa_param_mapping_fx( st_ivas );
            }
            else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
        }
        ELSE /* ISM_MODE_DISC */
        {
                ivas_param_ism_dec_prepare_renderer( st_ivas, n_render_timeslots );
            ivas_ism_dec_digest_tc_fx( st_ivas );
        }
    }
        else /* ISM_MODE_DISC */
    ELSE IF( EQ_16( st_ivas->ivas_format, SBA_FORMAT ) || EQ_16( st_ivas->ivas_format, MASA_FORMAT ) )
    {
        IF( st_ivas->hSCE[0] )
        {
            Word16 shift = getScaleFactor32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN );
            IF( LT_16( sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift ), 4 ) )
            {
            ivas_ism_dec_digest_tc( st_ivas );
                shift = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, 4 );
            }
            scale_sig32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, shift ); // Q(31-cngNoiseLevelExp+shift)
            st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift );
        }
    else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT )
    {
        ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
        ivas_sba_dec_digest_tc_fx( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
    }
    else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
    ELSE IF( EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
    {

        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        IF( EQ_16( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
        {
            ivas_ism_dec_digest_tc( st_ivas );
            ivas_ism_dec_digest_tc_fx( st_ivas );

            test();
            test();
            test();
            test();
            /* delay the objects here for all renderers where it is needed */
            if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ||
                   st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ||
                   st_ivas->renderer_type == RENDERER_OSBA_AMBI ||
                   st_ivas->renderer_type == RENDERER_OSBA_LS ||
                   st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) &&
                 ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
            IF(
                (
                    EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) ||
                    EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ||
                    EQ_16( st_ivas->renderer_type, RENDERER_OSBA_AMBI ) ||
                    EQ_16( st_ivas->renderer_type, RENDERER_OSBA_LS ) ||
                    EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) &&
                ( NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) )
            {
                for ( n = 0; n < st_ivas->nchan_ism; n++ )
                FOR( n = 0; n < st_ivas->nchan_ism; n++ )
                {
                    delay_signal( st_ivas->hTcBuffer->tc[n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hSbaIsmData->delayBuffer[n], st_ivas->hSbaIsmData->delayBuffer_size );
                    delay_signal32_fx( st_ivas->hTcBuffer->tc_fx[n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hSbaIsmData->delayBuffer_fx[n], st_ivas->hSbaIsmData->delayBuffer_size );
                }
            }

            if ( !st_ivas->sba_dirac_stereo_flag )
            IF( !st_ivas->sba_dirac_stereo_flag )
            {
                if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
                IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) )
                {
                    n_render_timeslots *= ( st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size );
                    Word16 temp, temp_e;
                    temp = BASOP_Util_Divide1616_Scale( st_ivas->hTcBuffer->n_samples_granularity, st_ivas->hSpatParamRendCom->slot_size, &temp_e );
                    n_render_timeslots = extract_l( L_shr( L_mult0( n_render_timeslots, temp ), sub( 15, temp_e ) ) );
                }

                ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
                IF( st_ivas->hSCE[0] )
                {
                    Word16 shift = getScaleFactor32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN );
                    if ( LT_16( sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift ), 4 ) )
                    {
                        shift = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, 4 );
                    }
                    scale_sig32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, shift ); // Q(31-cngNoiseLevelExp+shift)
                    st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift );
                }
        else
                ivas_sba_dec_digest_tc_fx( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
            }
        }
        ELSE
        {
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );

            ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
            IF( st_ivas->hSCE[0] )
            {
                Word16 shift = getScaleFactor32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN );
                if ( LT_16( sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift ), 4 ) )
                {
                    shift = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, 4 );
                }
                scale_sig32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, shift ); // Q(31-cngNoiseLevelExp+shift)
                st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift );
            }
            ivas_sba_dec_digest_tc_fx( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
        }
    else if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
    }
    ELSE IF( EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) )
    {
        if ( st_ivas->renderer_type == RENDERER_OMASA_MIX_EXT || st_ivas->renderer_type == RENDERER_OMASA_OBJECT_EXT )
        test();
        IF( EQ_32( st_ivas->renderer_type, RENDERER_OMASA_MIX_EXT ) || EQ_32( st_ivas->renderer_type, RENDERER_OMASA_OBJECT_EXT ) )
        {
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );

            if ( st_ivas->hDecoderConfig->Opt_tsm )
            IF( st_ivas->hDecoderConfig->Opt_tsm )
            {
                ivas_jbm_masa_sf_to_slot_map( st_ivas, n_render_timeslots );
            }
        }
        else
        ELSE
        {
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC )
            test();
            IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
            {
                n_render_timeslots *= ( st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size );
                n_render_timeslots = i_mult( n_render_timeslots, idiv1616( st_ivas->hTcBuffer->n_samples_granularity, st_ivas->hSpatParamRendCom->slot_size ) );
            }

            ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
            IF( st_ivas->hSCE[0] )
            {
                Word16 shift = getScaleFactor32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN );
                if ( LT_16( sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift ), 4 ) )
                {
                    shift = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, 4 );
                }
                scale_sig32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, shift ); // Q(31- (st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp - shift)
                st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift );
                move16();
            }
            ivas_sba_dec_digest_tc_fx( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );

            if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
            IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
            {
                ivas_ism_dec_digest_tc( st_ivas );
                ivas_ism_dec_digest_tc_fx( st_ivas );
            }
        }

            if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_DIRAC )
        test();
        IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_16( st_ivas->renderer_type, RENDERER_DIRAC ) )
        {
                int16_t num_objects;
            Word16 num_objects;

            /* Delay the signal to match CLDFB delay. Delay the whole buffer. */
            num_objects = 0;
                if ( ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC )
            move16();

            test();
            test();
            IF( ( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_MASA_ONE_OBJ ) || EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) ) && NE_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) )
            {
                num_objects = 1;
                move16();
            }
                else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
            ELSE IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
            {
                num_objects = st_ivas->nchan_ism;
                move16();
            }
                for ( n = 0; n < num_objects; n++ )
                {
                    if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC )
            FOR( n = 0; n < num_objects; n++ )
            {
                        v_multc( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN, st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available );
                    }
#ifndef TMP_FIX_OMASA_SR_BE
                    if ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
#endif
                test();
                IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) && EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) )
                {
                        delay_signal( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size );
                    }
                    v_multc_fixed_16( st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN_FX, st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available );
                }
                delay_signal32_fx( st_ivas->hTcBuffer->tc_fx[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer_fx[n], st_ivas->hMasaIsmData->delayBuffer_size );
            }
        }
    }
    else if ( st_ivas->ivas_format == MC_FORMAT )
    ELSE IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) )
    {
        if ( st_ivas->mc_mode == MC_MODE_MCT )
        IF( EQ_16( st_ivas->mc_mode, MC_MODE_MCT ) )
        {
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );
        }
        else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
        ELSE IF( EQ_16( st_ivas->mc_mode, MC_MODE_PARAMUPMIX ) )
        {
            ivas_mc_paramupmix_dec_digest_tc( st_ivas, (uint8_t) n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
            ivas_mc_paramupmix_dec_digest_tc( st_ivas, (UWord8) n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
        }
        else if ( st_ivas->mc_mode == MC_MODE_PARAMMC )
        ELSE IF( EQ_16( st_ivas->mc_mode, MC_MODE_PARAMMC ) )
        {
            ivas_param_mc_dec_prepare_renderer( st_ivas, (uint8_t) n_render_timeslots );
            ivas_param_mc_dec_prepare_renderer( st_ivas, (UWord16) n_render_timeslots );
        }
        else if ( st_ivas->mc_mode == MC_MODE_MCMASA )
        ELSE IF( EQ_16( st_ivas->mc_mode, MC_MODE_MCMASA ) )
        {
            ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
            IF( st_ivas->hSCE[0] )
            {
                Word16 shift = getScaleFactor32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN );
                if ( LT_16( sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift ), 4 ) )
                {
                    shift = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, 4 );
                }
                scale_sig32( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, shift ); // Q(31-cngNoiseLevelExp+shift)
                st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp = sub( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->cngNoiseLevelExp, shift );
                move16();
            }
            ivas_sba_dec_digest_tc_fx( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available );
        }
    }

+217 −222

File changed.

Preview size limit exceeded, changes collapsed.

Loading