Commit d9c2a9da authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

commit 3

parent 0c17fd1a
Loading
Loading
Loading
Loading
Loading
+34 −20
Original line number Diff line number Diff line
@@ -229,21 +229,21 @@ ivas_error ivas_param_mc_dec_open_fx(
    test();
    test();
    test();
    IF( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD || st_ivas->transport_config == output_config )
    IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) || EQ_32( st_ivas->transport_config, output_config ) )
    {
        hParamMC->synthesis_conf = PARAM_MC_SYNTH_DIRECT;
        move32();
    }
    ELSE IF( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO )
    ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_MONO ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) )
    {
        hParamMC->synthesis_conf = PARAM_MC_SYNTH_MONO_STEREO;
        move32();
    }
    ELSE IF( st_ivas->transport_config != output_config )
    ELSE IF( NE_32( st_ivas->transport_config, output_config ) )
    {
        test();
        test();
        IF( ( output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM && nchan_out_transport > audioCfg2channels( output_config ) ) || ( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM && nchan_out_transport > st_ivas->hOutSetup.nchan_out_woLFE ) )
        IF( ( NE_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && GT_32( nchan_out_transport, audioCfg2channels( output_config ) ) ) || ( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && GT_32( nchan_out_transport, st_ivas->hOutSetup.nchan_out_woLFE ) ) )
        {
            hParamMC->synthesis_conf = PARAM_MC_SYNTH_LS_CONV_COV;
            move32();
@@ -251,7 +251,7 @@ ivas_error ivas_param_mc_dec_open_fx(
            st_ivas->intern_config = output_config;
            move32();
            ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config );
            IF( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM )
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) )
            {
                st_ivas->hIntSetup.nchan_out_woLFE = st_ivas->hLsSetupCustom->num_spk;
                move32();
@@ -276,7 +276,7 @@ ivas_error ivas_param_mc_dec_open_fx(
    hParamMC->ls_conv_dmx_matrix_fx = NULL;

    test();
    IF( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO )
    IF( EQ_32( hParamMC->synthesis_conf, PARAM_MC_SYNTH_LS_CONV_COV ) || EQ_32( hParamMC->synthesis_conf, PARAM_MC_SYNTH_MONO_STEREO ) )
    {
        nchan_out_cov = add( st_ivas->hOutSetup.nchan_out_woLFE, st_ivas->hOutSetup.num_lfe );
    }
@@ -325,8 +325,8 @@ ivas_error ivas_param_mc_dec_open_fx(
    temp = shr( temp, sub( 15, temp_e ) );
    hParamMC->slot_size = temp;
    move16();
    set_s( hParamMC->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS );
    set_s( hParamMC->subframe_nbslots, PARAM_MC_MAX_NSLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS );
    set16_fx( hParamMC->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS );
    set16_fx( hParamMC->subframe_nbslots, PARAM_MC_MAX_NSLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS );
    hParamMC->nb_subframes = DEFAULT_JBM_SUBFRAMES_5MS;
    move16();

@@ -1157,9 +1157,12 @@ ivas_error ivas_param_mc_dec_reconfig_fx(

    hParamMC = st_ivas->hParamMC;
    error = IVAS_ERR_OK;
    move32();
    /* save important config information from the previous state */
    nchan_transport_old = st_ivas->nchan_transport;
    move32();
    num_param_bands_old = hParamMC->hMetadataPMC->num_parameter_bands;
    move32();

    /*-----------------------------------------------------------------*
     * prepare library opening
@@ -1299,6 +1302,7 @@ ivas_error ivas_param_mc_dec_reconfig_fx(
                    FOR( source_param_idx = 0; source_param_idx < parameter_band_mapping.n_source_bands[new_param_band_idx]; source_param_idx++ )
                    {
                        *p_icc_new_fx = add( *p_icc_new_fx, mult( icc_q_old_fx[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx] * num_param_lfe + param_idx], parameter_band_mapping.source_band_factor_fx[new_param_band_idx][source_param_idx] ) ); /*Q15*/
                        move16();
                    }
                    p_icc_new_fx++;
                }
@@ -1317,8 +1321,10 @@ ivas_error ivas_param_mc_dec_reconfig_fx(
                    {
                        p_ild_new_tmp = extract_h( BASOP_util_Pow2( L_mult0( 10885 /*log2(10)/10*2^15*/, ild_q_old_fx[parameter_band_mapping.source_band_idx[new_param_band_idx][source_param_idx] * num_param_lfe + param_idx] ), 8, &p_ild_new_e ) );
                        *p_ild_new_fx = add( *p_ild_new_fx, mult( p_ild_new_tmp, parameter_band_mapping.source_band_factor_fx[new_param_band_idx][source_param_idx] ) );
                        move16();
                    }
                    *p_ild_new_fx = extract_l( L_shr( Mpy_32_16_1( L_add( BASOP_Util_Log2( *p_ild_new_fx ), L_add( 16 << Q25, p_ild_new_e << 25 ) ), 24660 ), 15 ) );
                    move16();
                    p_ild_new_fx++;
                }
            }
@@ -1378,6 +1384,7 @@ ivas_error ivas_param_mc_dec_reconfig_fx(
        FOR( k = 0; k <= hParamMC->num_param_bands_synth; k++ )
        {
            st_ivas->hLsSetUpConversion->sfbOffset[k] = imult1616( PARAM_MC_BAND_TO_MDCT_BAND_RATIO, hParamMC->band_grouping[k] );
            move16();
        }
        FOR( ; k < MAX_SFB + 2; k++ )
        {
@@ -1534,7 +1541,7 @@ ivas_error ivas_param_mc_dec_reconfig_fx(
            max_param_band_residual = k;
            move16();
            assert( hParamMC->band_grouping[k] == hParamMC->max_band_decorr );
            break;
            BREAK;
        }
    }

@@ -2984,7 +2991,7 @@ void ivas_param_mc_dec_digest_tc_fx(

    push_wmops( "param_mc_dec_digest_tc" );

    set_s( channel_active, 0, MAX_CICP_CHANNELS );
    set16_fx( channel_active, 0, MAX_CICP_CHANNELS );
    nchan_transport = st_ivas->nchan_transport;
    move16();
    nchan_out_transport = add( st_ivas->hTransSetup.nchan_out_woLFE, st_ivas->hTransSetup.num_lfe );
@@ -2995,7 +3002,7 @@ void ivas_param_mc_dec_digest_tc_fx(
    {
        nchan_out_cldfb = BINAURAL_CHANNELS;
        move16();
        set_s( channel_active, 1, nchan_out_cldfb );
        set16_fx( channel_active, 1, nchan_out_cldfb );
        nchan_out_cov = add( st_ivas->hTransSetup.nchan_out_woLFE, st_ivas->hTransSetup.num_lfe );
        hSynthesisOutputSetup = &st_ivas->hTransSetup;
    }
@@ -3011,7 +3018,7 @@ void ivas_param_mc_dec_digest_tc_fx(
        nchan_out_cov = add( st_ivas->hOutSetup.nchan_out_woLFE, st_ivas->hOutSetup.num_lfe );
        nchan_out_cldfb = nchan_out_cov;
        move16();
        set_s( channel_active, 1, nchan_out_cov );
        set16_fx( channel_active, 1, nchan_out_cov );
        hSynthesisOutputSetup = &st_ivas->hOutSetup;
    }
    ELSE
@@ -3020,7 +3027,7 @@ void ivas_param_mc_dec_digest_tc_fx(
        move16();
        nchan_out_cldfb = nchan_out_transport;
        move16();
        set_s( channel_active, 1, nchan_out_cov );
        set16_fx( channel_active, 1, nchan_out_cov );
        hSynthesisOutputSetup = &st_ivas->hTransSetup;
    }

@@ -3478,12 +3485,13 @@ void ivas_param_mc_dec_render_fx(

    push_wmops( "param_mc_dec_render" );

    set_s( channel_active, 0, MAX_CICP_CHANNELS );
    set16_fx( channel_active, 0, MAX_CICP_CHANNELS );
    nchan_transport = st_ivas->nchan_transport;
    move16();
    nchan_out_transport = add( st_ivas->hTransSetup.nchan_out_woLFE, st_ivas->hTransSetup.num_lfe );
#ifndef MSAN_FIX
    nchan_out_init = nchan_out_transport;
    move16();
#endif
    output_Fs = st_ivas->hDecoderConfig->output_Fs;
    move32();
@@ -3493,7 +3501,7 @@ void ivas_param_mc_dec_render_fx(
    IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) )
    {
        nchan_out_cldfb = BINAURAL_CHANNELS;
        set_s( channel_active, 1, nchan_out_cldfb );
        set16_fx( channel_active, 1, nchan_out_cldfb );
#ifndef MSAN_FIX
        IF( st_ivas->hCombinedOrientationData )
        {
@@ -3513,7 +3521,7 @@ void ivas_param_mc_dec_render_fx(
        nchan_out_cov = add( st_ivas->hOutSetup.nchan_out_woLFE, st_ivas->hOutSetup.num_lfe );
        nchan_out_cldfb = nchan_out_cov;
        move16();
        set_s( channel_active, 1, nchan_out_cov );
        set16_fx( channel_active, 1, nchan_out_cov );
    }
    ELSE
    {
@@ -3521,7 +3529,7 @@ void ivas_param_mc_dec_render_fx(
        move16();
        nchan_out_cldfb = nchan_out_transport;
        move16();
        set_s( channel_active, 1, nchan_out_cov );
        set16_fx( channel_active, 1, nchan_out_cov );
    }

    /* set everything to zero that will not be decoded */
@@ -3660,7 +3668,9 @@ void ivas_param_mc_dec_render_fx(
                    FOR( Word16 l = 0; l < hParamMC->h_output_synthesis_params.max_band_decorr; l++ )
                    {
                        Cldfb_RealBuffer_fx[k][slot_idx][l] = L_shl( Cldfb_RealBuffer_fx[k][slot_idx][l], sub( 6, tmp_q ) );
                        move32();
                        Cldfb_ImagBuffer_fx[k][slot_idx][l] = L_shl( Cldfb_ImagBuffer_fx[k][slot_idx][l], sub( 6, tmp_q ) );
                        move32();
                    }
                }
            }
@@ -3766,6 +3776,7 @@ void ivas_param_mc_dec_render_fx(
            }
        }

        test();
        IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) )
        {
            Word16 input_q = 6;
@@ -5314,6 +5325,7 @@ static void ivas_param_mc_get_mixing_matrices_fx(
        FOR( lfe_idx1 = 0; lfe_idx1 < hSynthesisOutputSetup->num_lfe; lfe_idx1++ )
        {
            lfe_indices[lfe_idx1 + 1] = hSynthesisOutputSetup->index_lfe[lfe_idx1];
            move16();
        }
        lfe_indices[add( hSynthesisOutputSetup->num_lfe, 1 )] = nY_cov;
        move16();
@@ -6891,20 +6903,22 @@ static void ivas_param_mc_bs_decode_parameter_values_fx(
    Word16 dequant_ordered_fx[PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE];
    Word16 n_lfe_idx;

    range_coding = bit_buffer[( *bit_pos )++];
    range_coding = bit_buffer[*bit_pos];
    move16();
    *bit_pos = add( *bit_pos, 1 );

    /* Decoding the sequence */
    n_lfe_idx = sub( map_size, map_size_wo_lfe );
    sz_seq = add( imult1616( num_param_bands, map_size_wo_lfe ), imult1616( num_lfe_bands, n_lfe_idx ) );

    set_s( idx, 0, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
    set16_fx( idx, 0, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
    set16_fx( dequant_ordered_fx, 0, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
    set16_fx( dequant_seq_fx, 0, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
    IF( range_coding )
    {
        delta_coding = bit_buffer[( *bit_pos )++];
        delta_coding = bit_buffer[*bit_pos];
        move16();
        *bit_pos = add( *bit_pos, 1 );

        IF( delta_coding )
        {
+29 −27
Original line number Diff line number Diff line
@@ -124,10 +124,8 @@ void ivas_mc_paramupmix_dec_read_BS(
        bit_stream_orig = st0->bit_stream;
        next_bit_pos_orig = st0->next_bit_pos;
        move16();
        Word16 temp_e;
        Word32 L_temp = BASOP_Util_Divide3232_Scale_cadence( st_ivas->hDecoderConfig->ivas_total_brate, FRAMES_PER_SEC, &temp_e );
        L_temp = L_shr( L_temp, sub( 31, temp_e ) );
        last_bit_pos = (Word16) L_sub( L_temp, 1 );
        Word32 L_temp = Mpy_32_32( st_ivas->hDecoderConfig->ivas_total_brate, ONE_BY_FRAMES_PER_SEC );
        last_bit_pos = extract_l( L_sub( L_temp, 1 ) );
        nb_bits_read_orig = 0;
        move16();
        last_bit_pos = sub( last_bit_pos, nb_bits_read_orig ); /* reverse the bitstream for easier reading of indices */
@@ -233,7 +231,7 @@ void ivas_mc_paramupmix_dec_render(
    move16();

    /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */
    slots_to_render = min( sub( st_ivas->hTcBuffer->num_slots, st_ivas->hTcBuffer->slots_rendered ), nSamplesAsked / slot_size );
    slots_to_render = s_min( sub( st_ivas->hTcBuffer->num_slots, st_ivas->hTcBuffer->slots_rendered ), idiv1616( nSamplesAsked, slot_size ) );
    *nSamplesRendered = imult1616( slots_to_render, (Word16) slot_size );
    first_sf = st_ivas->hTcBuffer->subframes_rendered;
    move16();
@@ -264,7 +262,7 @@ void ivas_mc_paramupmix_dec_render(

            ivas_mc_paramupmix_dec_sf( st_ivas, output_local_fx );

            FOR( ch = 0; ch < min( MAX_OUTPUT_CHANNELS, ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ) ); ch++ )
            FOR( ch = 0; ch < s_min( MAX_OUTPUT_CHANNELS, ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ) ); ch++ )
            {
                output_local_fx[ch] += n_samples_sf;
            }
@@ -303,7 +301,7 @@ ivas_error ivas_mc_paramupmix_dec_open(
    ivas_error error;

    error = IVAS_ERR_OK;

    move32();

    /*-----------------------------------------------------------------*
     * prepare library opening
@@ -395,7 +393,7 @@ ivas_error ivas_mc_paramupmix_dec_open(
        test();
        test();
        test();
        IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO )
        IF( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) || EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) )
        {
            buffer_mode = TC_BUFFER_MODE_BUFFER;
            nchan_tc = st_ivas->hDecoderConfig->nchan_out;
@@ -403,7 +401,7 @@ ivas_error ivas_mc_paramupmix_dec_open(
            nchan_to_allocate = nchan_tc;
            move16();
        }
        ELSE IF( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
        ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) )
        {
            nchan_to_allocate = MC_PARAMUPMIX_MAX_INPUT_CHANS;
            move16();
@@ -546,9 +544,7 @@ static void ivas_param_upmix_dec_decorr_subframes(
    push_wmops( "ivas_param_upmix_dec_decorr_subframes" );

    /* TD decorrelator */
    Word16 temp_e;
    default_frame = BASOP_Util_Divide3232_Scale( st_ivas->hDecoderConfig->output_Fs, FRAMES_PER_SEC, &temp_e );
    default_frame = shr( default_frame, sub( 15, temp_e ) );
    default_frame = extract_l( Mpy_32_32( st_ivas->hDecoderConfig->output_Fs, ONE_BY_FRAMES_PER_SEC ) );
    nSamplesLeftForTD = nSamplesForRendering;
    move16();
    nchan_internal = MC_PARAMUPMIX_COMBINATIONS;
@@ -570,6 +566,7 @@ static void ivas_param_upmix_dec_decorr_subframes(
            FOR( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ )
            {
                q_format[i] = Q11;
                move16();
            }

            paramupmix_td_decorr_process_jbm_fx( hMCParamUpmix->hTdDecorr, p_tc_fx, pPcm_tmp_fx, nSamplesToDecorr, q_format );
@@ -757,20 +754,24 @@ static void ivas_mc_paramupmix_dec_sf(
        {
            FOR( k = 0; k < CLDFB_NO_CHANNELS_MAX; k++ )
            {
                Word32 qlre_fx = Cldfb_RealBuffer_fx[2 * ch][slot_idx][k];
                Word32 qlim_fx = Cldfb_ImagBuffer_fx[2 * ch][slot_idx][k];
                Word32 qrre_fx = Cldfb_RealBuffer_fx[2 * ch + 1][slot_idx][k];
                Word32 qrim_fx = Cldfb_ImagBuffer_fx[2 * ch + 1][slot_idx][k];
                Word32 *qlre_fx = &Cldfb_RealBuffer_fx[2 * ch][slot_idx][k];
                Word32 *qlim_fx = &Cldfb_ImagBuffer_fx[2 * ch][slot_idx][k];
                Word32 *qrre_fx = &Cldfb_RealBuffer_fx[2 * ch + 1][slot_idx][k];
                Word32 *qrim_fx = &Cldfb_ImagBuffer_fx[2 * ch + 1][slot_idx][k];

                Cldfb_RealBuffer_fx[shl( ch, 1 )][slot_idx][k] = L_add_sat( qlre_fx, qrre_fx );
                Cldfb_ImagBuffer_fx[shl( ch, 1 )][slot_idx][k] = L_add_sat( qlim_fx, qrim_fx );
                Cldfb_RealBuffer_fx[add( shl( ch, 1 ), 1 )][slot_idx][k] = L_sub_sat( qlre_fx, qrre_fx );
                Cldfb_ImagBuffer_fx[add( shl( ch, 1 ), 1 )][slot_idx][k] = L_sub_sat( qlim_fx, qrim_fx );
                Cldfb_RealBuffer_fx[2 * ch][slot_idx][k] = L_add_sat( *qlre_fx, *qrre_fx );
                Cldfb_ImagBuffer_fx[2 * ch][slot_idx][k] = L_add_sat( *qlim_fx, *qrim_fx );
                Cldfb_RealBuffer_fx[2 * ch + 1][slot_idx][k] = L_sub_sat( *qlre_fx, *qrre_fx );
                Cldfb_ImagBuffer_fx[2 * ch + 1][slot_idx][k] = L_sub_sat( *qlim_fx, *qrim_fx );
                move32();
                move32();
                move32();
                move32();
            }
        }
    }

    IF( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    IF( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) )
    {
        Word16 temp_e;
        maxBand = BASOP_Util_Divide3232_Scale( (Word32) W_mult0_32_32( CLDFB_NO_CHANNELS_MAX, st_ivas->hDecoderConfig->output_Fs ), 48000, &temp_e );
@@ -795,7 +796,7 @@ static void ivas_mc_paramupmix_dec_sf(
                    cldfbAnalysis_ts_fx_fixed_q( &( pPcm_temp_fx[ch][L_mult0( hMCParamUpmix->num_freq_bands, slot_idx )] ),
                                                 Cldfb_RealBuffer_subfr_fx[idx_in][slot_idx],
                                                 Cldfb_ImagBuffer_subfr_fx[idx_in][slot_idx],
                                                 maxBand, st_ivas->cldfbAnaDec[add( shl( MC_PARAMUPMIX_COMBINATIONS, 1 ), idx_in )], &q_cldfb );
                                                 maxBand, st_ivas->cldfbAnaDec[add( MC_PARAMUPMIX_COMBINATIONS * 2, idx_in )], &q_cldfb );
                }
                idx_in = add( idx_in, 1 );
            }
@@ -809,13 +810,13 @@ static void ivas_mc_paramupmix_dec_sf(
            {
                Copy32( Cldfb_RealBuffer_fx[MC_PARAMUPMIX_CHIDX1[ch]][slot_idx], Cldfb_RealBuffer_subfr_fx[idx_in][slot_idx], CLDFB_NO_CHANNELS_MAX );
                Copy32( Cldfb_ImagBuffer_fx[MC_PARAMUPMIX_CHIDX1[ch]][slot_idx], Cldfb_ImagBuffer_subfr_fx[idx_in][slot_idx], CLDFB_NO_CHANNELS_MAX );
                Copy32( Cldfb_RealBuffer_fx[MC_PARAMUPMIX_CHIDX2[ch]][slot_idx], Cldfb_RealBuffer_subfr_fx[add( idx_in, 1 )][slot_idx], CLDFB_NO_CHANNELS_MAX );
                Copy32( Cldfb_ImagBuffer_fx[MC_PARAMUPMIX_CHIDX2[ch]][slot_idx], Cldfb_ImagBuffer_subfr_fx[add( idx_in, 1 )][slot_idx], CLDFB_NO_CHANNELS_MAX );
                Copy32( Cldfb_RealBuffer_fx[MC_PARAMUPMIX_CHIDX2[ch]][slot_idx], Cldfb_RealBuffer_subfr_fx[idx_in + 1][slot_idx], CLDFB_NO_CHANNELS_MAX );
                Copy32( Cldfb_ImagBuffer_fx[MC_PARAMUPMIX_CHIDX2[ch]][slot_idx], Cldfb_ImagBuffer_subfr_fx[idx_in + 1][slot_idx], CLDFB_NO_CHANNELS_MAX );
            }
            idx_in = add( idx_in, 2 );
        }

        IF( st_ivas->hCombinedOrientationData && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
        IF( st_ivas->hCombinedOrientationData && EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) )
        {
            FOR( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered]; slot_idx++ )
            {
@@ -954,7 +955,7 @@ static Word16 huff_read(
        node = ht[node][next_bit];
        move16();
    }
    WHILE( GT_16( node, 0 ) );
    WHILE( node > 0 );

    return negate( add( node, 1 ) );
}
@@ -969,6 +970,7 @@ static void huffman_decode(
    Word16 iv, nquant, offset;

    nquant = 0;
    move16();
    SWITCH( parType )
    {
        case ALPHA:
+48 −27

File changed.

Preview size limit exceeded, changes collapsed.

+13 −6
Original line number Diff line number Diff line
@@ -123,8 +123,7 @@ void ivas_mct_dec_mct_fx(
    {
        FOR( ch = 0; ch < nchan; ch++ )
        {
            IF(
                NE_16( sts[ch]->mct_chan_mode, MCT_CHAN_MODE_IGNORE ) )
            IF( NE_16( sts[ch]->mct_chan_mode, MCT_CHAN_MODE_IGNORE ) )
            {
                hMCT->lowE_ch[ch] = get_next_indice_fx( sts[0], 1 );
                move16();
@@ -134,9 +133,9 @@ void ivas_mct_dec_mct_fx(

    FOR( ch = 0; ch < nchan; ch++ )
    {
        IF( NE_16( sts[ch]->mct_chan_mode, MCT_CHAN_MODE_IGNORE ) )
        if( NE_16( sts[ch]->mct_chan_mode, MCT_CHAN_MODE_IGNORE ) )
        {
            nchan_active++;
            nchan_active = add( nchan_active, 1 );
        }
    }

@@ -331,7 +330,7 @@ void mctStereoIGF_dec_fx(
                init_tcx_info_fx( sts[0], L_frame_nSubframe, L_frameTCX_nSubframe, k, bfi, &tcx_offset[0], &tcx_offsetFB[0], &L_frame[0], &L_frameTCX[0], &left_rect[0], &L_spec[0] );

                /* stereo IGF decoding */
                assert( ( EQ_16( sts[0]->core, sts[1]->core ) ) || ( EQ_16( hMCT->hBlockData[b]->hStereoMdct->mdct_stereo_mode[0], SMDCT_DUAL_MONO ) ) );
                assert( ( EQ_16( sts[0]->core, sts[1]->core ) ) || ( ( hMCT->hBlockData[b]->hStereoMdct->mdct_stereo_mode[0] == SMDCT_DUAL_MONO ) ) );

                decoder_tcx_IGF_stereo_fx( sts, hMCT->hBlockData[b]->hStereoMdct, hMCT->hBlockData[b]->mask, p_x, p_x_e, p_x_len, L_frame[0], left_rect[0], k, bfi, 1 /* MCT_flag */ );

@@ -404,7 +403,15 @@ void mctStereoIGF_dec_fx(
                {
                    CONTINUE;
                }
                nSubframes = ( EQ_16( st->core, TCX_10_CORE ) ) ? NB_DIV : 1;

                IF( EQ_16( st->core, TCX_10_CORE ) )
                {
                    nSubframes = NB_DIV;
                }
                ELSE
                {
                    nSubframes = 1;
                }
                move16();

                FOR( k = 0; k < nSubframes; k++ )