Unverified Commit 54ec745b authored by norvell's avatar norvell
Browse files

Minor corrections

parent ce1e5583
Loading
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -58,6 +58,11 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    int16_t numCldfbAnalyses_old, numCldfbSyntheses_old, ism_mode;
    int16_t tc_granularity_new;
    int16_t nchan_out_buff;
    int16_t tc_nchan_full_new;
    TC_BUFFER_MODE tc_buffer_mode_new;
    int16_t tc_nchan_rend_new;
    int16_t tc_nchan_allocate_new;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;

    nCPE_old = st_ivas->nCPE;
    nSCE_old = st_ivas->nSCE;
@@ -283,12 +288,6 @@ static ivas_error ivas_ism_bitrate_switching_dec(
     * TC buffer
     *-----------------------------------------------------------------*/

    int16_t tc_nchan_full_new;
    TC_BUFFER_MODE tc_buffer_mode_new;
    int16_t tc_nchan_rend_new;
    int16_t tc_nchan_allocate_new;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;

    hTcBuffer = st_ivas->hTcBuffer;
    tc_buffer_mode_new = ivas_dec_get_tc_buffer_mode( st_ivas );
    tc_nchan_rend_new = ivas_dec_get_num_tc_channels( st_ivas );
+9 −7
Original line number Diff line number Diff line
@@ -697,6 +697,11 @@ void ivas_ism_dec_digest_tc(
    Decoder_Struct *st_ivas /* i/o: IVAS decoder structure      */
)
{
    int16_t azimuth, elevation;
    float elevation_f;
    int16_t i;
    int16_t interpolator_length;

    ivas_dec_td_renderers_adapt_subframes( st_ivas );

    if ( st_ivas->renderer_type == RENDERER_TD_PANNING ||
@@ -708,13 +713,12 @@ void ivas_ism_dec_digest_tc(
         st_ivas->renderer_type == RENDERER_OSBA_STEREO ||
         ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) )
    {
        int16_t i;

        /* we have a full frame interpolator, adapt it */
        /* for BE testing */
        if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available )
        {
            int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );
            interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );

            if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ||
                 st_ivas->renderer_type == RENDERER_OSBA_AMBI ||
@@ -757,17 +761,17 @@ void ivas_ism_dec_digest_tc(
                       st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) &&
                     st_ivas->hCombinedOrientationData == NULL )
                {
                    float elevation = st_ivas->hIsmMetaData[i]->edited_elevation;
                    elevation_f = st_ivas->hIsmMetaData[i]->edited_elevation;

                    if ( st_ivas->hIntSetup.is_planar_setup )
                    {
                        /* If no elevation support in output format, then rendering should be done with zero elevation */
                        elevation = 0.f;
                        elevation_f = 0.f;
                    }

                    if ( st_ivas->hEFAPdata != NULL )
                    {
                        efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_azimuth, elevation, EFAP_MODE_EFAP );
                        efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_azimuth, elevation_f, EFAP_MODE_EFAP );
                        v_multc( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_gain, st_ivas->hIsmRendererData->gains[i], st_ivas->hEFAPdata->numSpk );
                    }
                }
@@ -776,8 +780,6 @@ void ivas_ism_dec_digest_tc(
                          st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
                {
                    // TODO tmu review when #215 is resolved
                    int16_t azimuth, elevation;

                    azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_azimuth + 0.5f );
                    elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_elevation + 0.5f );

+2 −1
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ void ivas_mc_paramupmix_dec_render(
)
{
    int16_t slots_to_render, first_sf, last_sf, subframe_idx;
    int16_t n_samples_sf;
    uint16_t slot_size, ch;
    float *output_f_local[MAX_OUTPUT_CHANNELS];
    MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix;
@@ -259,7 +260,7 @@ void ivas_mc_paramupmix_dec_render(

    for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ )
    {
        int16_t n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];
        n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];
        ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local );

        for ( ch = 0; ch < min( MAX_OUTPUT_CHANNELS, ivas_get_nchan_buffers_dec( st_ivas, -1, -1 ) ); ch++ )
+2 −2
Original line number Diff line number Diff line
@@ -120,6 +120,8 @@ ivas_error ivas_sba_dec_reconfigure(
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
    SPAR_DEC_HANDLE hSpar;
    int16_t nchan_transport;
    DIRAC_CONFIG_FLAG flag_config;
    int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1];

    hTcBuffer = st_ivas->hTcBuffer;
    hSpar = st_ivas->hSpar;
@@ -328,7 +330,6 @@ ivas_error ivas_sba_dec_reconfigure(

    if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO ) ) )
    {
        DIRAC_CONFIG_FLAG flag_config;

        flag_config = DIRAC_OPEN;
        if ( st_ivas->hDirAC != NULL )
@@ -343,7 +344,6 @@ ivas_error ivas_sba_dec_reconfigure(
    }
    else
    {
        int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1];

        hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND );
        if ( ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) )
+5 −4
Original line number Diff line number Diff line
@@ -390,6 +390,10 @@ ivas_error ivas_init_encoder(
    int32_t element_brate_tmp[MAX_NUM_OBJECTS];
    ENCODER_CONFIG_HANDLE hEncoderConfig;
    ivas_error error;
    int32_t ism_total_brate;
    int16_t k;
    int16_t n_all;
    int32_t brate_sce, brate_cpe;

    error = IVAS_ERR_OK;

@@ -635,8 +639,6 @@ ivas_error ivas_init_encoder(
    }
    else if ( ivas_format == MASA_ISM_FORMAT )
    {
        int32_t ism_total_brate;
        int16_t k;

        st_ivas->ism_mode = ivas_omasa_ism_mode_select( ivas_total_brate, hEncoderConfig->nchan_ism );
        st_ivas->nchan_transport = 2;
@@ -752,7 +754,7 @@ ivas_error ivas_init_encoder(
        else
        {
            /* allocate and initialize MCT core coder */
            int16_t n_all = st_ivas->nchan_transport + st_ivas->hEncoderConfig->nchan_ism;
            n_all = st_ivas->nchan_transport + st_ivas->hEncoderConfig->nchan_ism;
            st_ivas->nCPE = ( n_all + 1 ) >> 1;

            for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
@@ -862,7 +864,6 @@ ivas_error ivas_init_encoder(
        }
        else if ( st_ivas->mc_mode == MC_MODE_MCMASA )
        {
            int32_t brate_sce, brate_cpe;

            ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( hEncoderConfig->element_mode_init ), ivas_total_brate );

Loading