Commit d5bc6589 authored by vaclav's avatar vaclav
Browse files

fixes

parent 8269b26d
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ ivas_error ivas_dec_get_format(
            }

            /* this should be non-zero if original input format was MASA_ISM_FORMAT */
            st_ivas->ism_mode = ISM_MODE_NONE;
            st_ivas->nchan_ism = st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2];

            if ( st_ivas->nchan_ism > 0 )
+1 −1
Original line number Diff line number Diff line
@@ -1547,7 +1547,7 @@ ivas_error ivas_jbm_dec_render(


/*--------------------------------------------------------------------------*
 * ivas_jbm_dec_dec_flush_renderer()
 * ivas_jbm_dec_flush_renderer()
 *
 * Flush samples if renderer granularity changes on a bitrate change
 *--------------------------------------------------------------------------*/
+19 −10
Original line number Diff line number Diff line
@@ -1154,13 +1154,19 @@ ivas_error IVAS_DEC_ReadFormat(
        *intern_audio_config = st_ivas->intern_config;

#ifdef FIX_HRTF_LOAD_JBM
        if ( renderer_type_old != st_ivas->renderer_type && renderer_type_old != RENDERER_DISABLE )
        if ( ( renderer_type_old != st_ivas->renderer_type && renderer_type_old != RENDERER_DISABLE ) ||
             ( st_ivas->ini_active_frame > 0 && ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode != ISM_MASA_MODE_DISC ) )
        {
            /* JBM: when granularity goes down (e.g. Discrete ISM with TD Obj Renderer -> ParamISM with binaural fastconv
            render what still fits in the new granularity */
            int16_t tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->ivas_format, st_ivas->mc_mode, st_ivas->hDecoderConfig->output_Fs );

            // st_ivas->nchan_transport = nchan_transport_old; // ToDo: commented for the moment to kepp the changes bit-exact but this is likely a bug in the main
            // st_ivas->nchan_transport = nchan_transport_old; // ToDo: temporarily deactivated to keep FIX_HRTF_LOAD bit-exact but this is likely a bug in the main

            if ( st_ivas->ivas_format == MASA_FORMAT )
            {
                st_ivas->nchan_ism = 0; // ToDo: temporary hack to keep FIX_HRTF_LOAD bit-exact but this is likely a bug in the main
            }

            if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity )
            {
@@ -3956,6 +3962,8 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
            bool tmp;

#ifdef FIX_HRTF_LOAD_JBM
            if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame )
            {
                if ( hIvasDec->nSamplesAvailableNext == 0 || hIvasDec->nSamplesAvailableNext == hIvasDec->nSamplesFrame )
                {
                    uint16_t nSamplesFlushed_ref = hIvasDec->nSamplesFlushed;
@@ -3969,6 +3977,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples(

                    *bitstreamReadDone = false;
                }
            }
#endif

#ifdef OBJ_EDITING_API