Commit f3bd9671 authored by vaclav's avatar vaclav
Browse files

Call apa_exec() with 'hTcBuffer->tc_buffer' instead of 'apaExecBuffer'

parent d0ce969d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2243,11 +2243,12 @@ ivas_error ivas_jbm_dec_tc_buffer_open(
            n_samp_residual = 0;
        }

        nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full;
#ifdef OPT_TC
        nsamp_to_allocate = max( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ) * n_samp_full;

        if ( nsamp_to_allocate == 0 && nchan_residual * n_samp_residual == 0 )
#else
        nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full;
        nsamp_to_allocate += nchan_residual * n_samp_residual;

        if ( nsamp_to_allocate == 0 )
@@ -2415,11 +2416,12 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        n_samp_residual = 0;
    }

    nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full;
#ifdef OPT_TC
    nsamp_to_allocate = max( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ) * n_samp_full;

    if ( nsamp_to_allocate == 0 && nchan_residual * n_samp_residual == 0 )
#else
    nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full;
    nsamp_to_allocate += nchan_residual * n_samp_residual;

    if ( nsamp_to_allocate == 0 )
+6 −10
Original line number Diff line number Diff line
@@ -1364,13 +1364,6 @@ ivas_error IVAS_DEC_GetSamplesDecoder(
        }

#endif
#ifdef REMOVE_APA_BUFFER
        for ( int16_t ch = 0; ch < min( hIvasDec->st_ivas->hTcBuffer->nchan_transport_jbm, hIvasDec->st_ivas->hTcBuffer->nchan_buffer_full ); ch++ )
        {
            mvr2r( hIvasDec->st_ivas->p_output_f[ch], hIvasDec->st_ivas->hTcBuffer->tc[ch], hIvasDec->nSamplesFrame );
        }
#endif

        /*-----------------------------------------------------------------*
         * JBM
         *-----------------------------------------------------------------*/
@@ -1396,13 +1389,16 @@ ivas_error IVAS_DEC_GetSamplesDecoder(
            set_f( hIvasDec->apaExecBuffer, 0, nTransportChannels * APA_BUF_PER_CHANNEL );

#endif
#ifdef REMOVE_APA_BUFFER
            /* move decoded audio buffers st_ivas->p_output_f[][] to a serial buffer hTcBuffer->tc_buffer[] */
            ivas_syn_output_f( hIvasDec->st_ivas->p_output_f, hIvasDec->nSamplesFrame, nTransportChannels, hIvasDec->st_ivas->hTcBuffer->tc_buffer );

            if ( apa_exec( hIvasDec->hTimeScaler, hIvasDec->st_ivas->hTcBuffer->tc_buffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ) != 0 )
#else
#ifdef LIB_DEC_REVISION
            ivas_syn_output_f( hIvasDec->st_ivas->p_output_f, hIvasDec->nSamplesFrame, nTransportChannels, hIvasDec->apaExecBuffer );

#endif
#ifdef REMOVE_APA_BUFFERaa
            if ( apa_exec( hIvasDec->hTimeScaler, hIvasDec->st_ivas->hTcBuffer->tc_buffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ) != 0 )
#else
            if ( apa_exec( hIvasDec->hTimeScaler, hIvasDec->apaExecBuffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ) != 0 )
#endif
            {