Commit 877586bb authored by bayers's avatar bayers
Browse files

fix JBM for OSBA, flushing on changing granularity was getting the wrong settings

parent 51cb9db1
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -477,8 +477,10 @@ ivas_error ivas_dec_setup(
                st_ivas->sba_order = 3;
            }

#ifndef JBM_FOR_OSBA
            /* set Ambisonic (SBA) order used for analysis and coding */
            st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order );
#endif 

            if ( st_ivas->ini_frame > 0 && ivas_total_brate != st_ivas->last_active_ivas_total_brate )
            {
@@ -498,6 +500,10 @@ ivas_error ivas_dec_setup(
            }
            else
            {
#ifdef JBM_FOR_OSBA
                /* set Ambisonic (SBA) order used for analysis and coding */
                st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order );
#endif 
                ivas_sba_config( ivas_total_brate, st_ivas->sba_analysis_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init );
                /*correct number of CPEs for discrete ISM coding*/
                if ( st_ivas->ini_frame > 0 && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
+7 −4
Original line number Diff line number Diff line
@@ -229,8 +229,9 @@ ivas_error ivas_sba_dec_reconfigure(

        if ( granularity_new < st_ivas->hTcBuffer->n_samples_granularity )
        {
            /* write back info for correct rendering */
            /* write back info for correct rendering of the flushable samples */
            st_ivas->sba_analysis_order = sba_analysis_order_old;
            st_ivas->hDecoderConfig->ivas_total_brate = last_ivas_total_brate;
            if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, granularity_new, st_ivas->renderer_type, st_ivas->intern_config, &st_ivas->hIntSetup, st_ivas->mc_mode, ism_mode_old, nSamplesFlushed,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                        pcm_resolution,
@@ -239,7 +240,9 @@ ivas_error ivas_sba_dec_reconfigure(
            {
                return error;
            }
            /* restore correct values for the current frame*/
            st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order );
            st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate;
        }
        else if ( granularity_new > st_ivas->hTcBuffer->n_samples_granularity )
        {