Loading lib_dec/ivas_ism_dec_fx.c +22 −9 Original line number Diff line number Diff line Loading @@ -173,18 +173,31 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx( render what still fits in the new granularity */ 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 ); IF( LT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ){ IF( LT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ) { #ifdef FIX_HRTF_LOAD /* flush already done in IVAS_DEC_ReadFormat() */ #else IF( NE_32( ( error = ivas_jbm_dec_flush_renderer_fx( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, data ) ), IVAS_ERR_OK ) ){ #ifdef NONBE_1200_ISM_JBM_BRATE_SW_FLUSH /* write back info for correct rendering of the flushable samples */ int16_t nchan_transport_ref = st_ivas->nchan_transport; st_ivas->nchan_transport = nchan_transport_old; move16(); #endif IF( NE_32( ( error = ivas_jbm_dec_flush_renderer_fx( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, data ) ), IVAS_ERR_OK ) ) { return error; } #ifdef NONBE_1200_ISM_JBM_BRATE_SW_FLUSH st_ivas->nchan_transport = nchan_transport_ref; move16(); #endif #endif } /* JBM: when granularity goes up set samples to discard at the beginning of the frame */ ELSE IF( GT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ) ELSE IF( GT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ) { IF( NE_32( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ), IVAS_ERR_OK ) ) { Loading Loading
lib_dec/ivas_ism_dec_fx.c +22 −9 Original line number Diff line number Diff line Loading @@ -173,18 +173,31 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx( render what still fits in the new granularity */ 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 ); IF( LT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ){ IF( LT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ) { #ifdef FIX_HRTF_LOAD /* flush already done in IVAS_DEC_ReadFormat() */ #else IF( NE_32( ( error = ivas_jbm_dec_flush_renderer_fx( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, data ) ), IVAS_ERR_OK ) ){ #ifdef NONBE_1200_ISM_JBM_BRATE_SW_FLUSH /* write back info for correct rendering of the flushable samples */ int16_t nchan_transport_ref = st_ivas->nchan_transport; st_ivas->nchan_transport = nchan_transport_old; move16(); #endif IF( NE_32( ( error = ivas_jbm_dec_flush_renderer_fx( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, data ) ), IVAS_ERR_OK ) ) { return error; } #ifdef NONBE_1200_ISM_JBM_BRATE_SW_FLUSH st_ivas->nchan_transport = nchan_transport_ref; move16(); #endif #endif } /* JBM: when granularity goes up set samples to discard at the beginning of the frame */ ELSE IF( GT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ) ELSE IF( GT_16( tc_granularity_new, st_ivas->hTcBuffer->n_samples_granularity ) ) { IF( NE_32( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ), IVAS_ERR_OK ) ) { Loading