Commit d957092e authored by vaclav's avatar vaclav
Browse files

FIX_MCT3 updates

parent 23f78e43
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3090,6 +3090,9 @@ void ivas_mdct_core_invQ(
    float *x[CPE_CHANNELS][NB_DIV],                             /* i/o: signal buffer                           */
    float Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )],    /* i  : LP coefficients                         */
    int16_t ms_mask[NB_DIV][MAX_SFB],                           /* i  : M/S mask                                */
#ifdef FIX_MCT3
    const int16_t n_CoreChannels,                               /* i  : number of core channels to be coded     */
#endif    
    const int16_t MCT_flag                                      /* i  : hMCT handle allocated (1) or not (0)    */
);

+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ ivas_error ivas_cpe_dec(
    }

#ifdef FIX_MCT3
    if ( cpe_id == st_ivas->nCPE - 1 && hCPE->hCoreCoder[1]->mct_chan_mode == MCT_CHAN_MODE_IGNORE )
    if ( ( ( st_ivas->nchan_transport + ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ? st_ivas->nchan_ism : 0 ) ) % CPE_CHANNELS != 0 ) && cpe_id == st_ivas->nCPE - 1 && hCPE->hCoreCoder[1]->mct_chan_mode == MCT_CHAN_MODE_IGNORE )
    {
        n_CoreChannels = 1; /* in case of odd number of MCT channels, ignore the last one */
    }
+5 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ ivas_error ivas_mct_dec(
    {
#ifdef FIX_MCT3
        n_CoreChannels[cpe_id] = CPE_CHANNELS;
        if ( cpe_id == nCPE - 1 && st_ivas->hCPE[cpe_id]->hCoreCoder[1]->mct_chan_mode == MCT_CHAN_MODE_IGNORE )
        if ( ( ( st_ivas->nchan_transport + ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ? st_ivas->nchan_ism : 0 ) ) % CPE_CHANNELS != 0 ) && cpe_id == nCPE - 1 && st_ivas->hCPE[cpe_id]->hCoreCoder[1]->mct_chan_mode == MCT_CHAN_MODE_IGNORE )
        {
            n_CoreChannels[cpe_id] = 1; /* in case of odd number of MCT channels, ignore the last one */
        }
@@ -184,7 +184,11 @@ ivas_error ivas_mct_dec(
        }

        ivas_mdct_core_invQ( st_ivas->hCPE[cpe_id], nTnsBitsTCX10[cpe_id], p_param[cpe_id], param_lpc[cpe_id], param[cpe_id],
#ifdef FIX_MCT3
                             fUseTns[cpe_id], tnsData[cpe_id], x, x, Aq[cpe_id], NULL, n_CoreChannels[cpe_id], 1 );
#else
                             fUseTns[cpe_id], tnsData[cpe_id], x, x, Aq[cpe_id], NULL, 1 );
#endif

        st_ivas->BER_detect |= st_ivas->hCPE[cpe_id]->hCoreCoder[0]->BER_detect;
        st_ivas->BER_detect |= st_ivas->hCPE[cpe_id]->hCoreCoder[1]->BER_detect;
+4 −9
Original line number Diff line number Diff line
@@ -494,6 +494,9 @@ void ivas_mdct_core_invQ(
    float *x[CPE_CHANNELS][NB_DIV],                          /* i/o: signal buffer                          */
    float Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* i  : LP coefficients                        */
    int16_t ms_mask[NB_DIV][MAX_SFB],                        /* i  : M/S mask                               */
#ifdef FIX_MCT3
    const int16_t n_CoreChannels, /* i  : number of core channels to be coded    */
#endif
    const int16_t MCT_flag /* i  : hMCT handle allocated (1) or not (0)   */
)
{
@@ -522,14 +525,6 @@ void ivas_mdct_core_invQ(
    float tmp_ms_sig[CPE_CHANNELS][N_MAX];
    float concealment_noise[CPE_CHANNELS][L_FRAME48k];
    TONALMDCTCONC_NOISE_GEN_MODE noise_gen_mode_bfi;
#ifdef FIX_MCT3
    int16_t n_CoreChannels = CPE_CHANNELS;

    if ( hCPE->hCoreCoder[1]->mct_chan_mode == MCT_CHAN_MODE_IGNORE )
    {
        n_CoreChannels = 1;
    }
#endif

    push_wmops( "mdct_core_invQ" );
    sts = hCPE->hCoreCoder;
+4 −0
Original line number Diff line number Diff line
@@ -248,7 +248,11 @@ void stereo_mdct_core_dec(
        }
    }

#ifdef FIX_MCT3
    ivas_mdct_core_invQ( hCPE, nTnsBitsTCX10, p_param, param_lpc, param, fUseTns, tnsData, x_0, x, Aq, ms_mask, CPE_CHANNELS, 0 );
#else
    ivas_mdct_core_invQ( hCPE, nTnsBitsTCX10, p_param, param_lpc, param, fUseTns, tnsData, x_0, x, Aq, ms_mask, 0 );
#endif

    for ( ch = 0; ch < nChannels; ch++ )
    {