Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ #define NONBE_1200_ISM_JBM_BRATE_SW_FLUSH /* VA: issue 1200: fix bug in renderer flush in ISM JBM bitrate switching */ #define NONBE_1293_CRASH_FIRST_FRAME_LOST /* VA: issue 1293: fix G.192 decoder crash when first frame is lost */ #define FIX_1384_MSAN_stereo_tcx_core_enc /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */ #define NONBE_FIX_1297_SPAR_JBM_MEM_SAN /* Dolby: issue 1297, SPAR + JBM + BR switch memory sanitizer */ // object-editing feature porting #define OBJ_EDITING_API /* object editing changes related to the API */ Loading lib_dec/ivas_jbm_dec.c +60 −33 Original line number Diff line number Diff line Loading @@ -1749,22 +1749,45 @@ ivas_error ivas_jbm_dec_flush_renderer( } else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN if ( ism_mode_old == ISM_SBA_MODE_DISC ) { #endif float *tc_local[MAX_TRANSPORT_CHANNELS]; int16_t last_spar_md_idx; int16_t last_dirac_md_idx; uint16_t nSamplesAvailableNext; /* to render flushed samples, use configuration from the last received frame */ #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN ISM_MODE ism_mode_orig; RENDERER_TYPE renderer_type_orig; int32_t ivas_total_brate; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; renderer_type_orig = st_ivas->renderer_type; ism_mode_orig = st_ivas->ism_mode; st_ivas->ism_mode = ism_mode_old; st_ivas->renderer_type = renderer_type_old; st_ivas->hDecoderConfig->ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; #endif last_spar_md_idx = st_ivas->hSpar->render_to_md_map[st_ivas->hSpar->slots_rendered - 1]; last_dirac_md_idx = st_ivas->hSpatParamRendCom->render_to_md_map[st_ivas->hSpatParamRendCom->slots_rendered - 1]; #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN #ifdef DEBUGGING assert( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ); #endif #else #ifdef DEBUGGING assert( ism_mode_old == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ); #endif /* copy from ISM delay buffer to the correct place in TCs */ #endif /* copy from ISM delay buffer to the correct place in tcs */ for ( ch_idx = 0; ch_idx < st_ivas->nchan_ism; ch_idx++ ) { #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN tc_local[ch_idx] = &st_ivas->hTcBuffer->tc[ch_idx][hTcBuffer->n_samples_rendered]; #else tc_local[ch_idx] = &st_ivas->hTcBuffer->tc[ch_idx + 2][hTcBuffer->n_samples_rendered]; #endif mvr2r( st_ivas->hSbaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hSbaIsmData->delayBuffer_size ); } Loading @@ -1789,8 +1812,12 @@ ivas_error ivas_jbm_dec_flush_renderer( { return error; } /* restore original configuration */ #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN st_ivas->ism_mode = ism_mode_orig; st_ivas->renderer_type = renderer_type_orig; st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate; } #endif } else { Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ #define NONBE_1200_ISM_JBM_BRATE_SW_FLUSH /* VA: issue 1200: fix bug in renderer flush in ISM JBM bitrate switching */ #define NONBE_1293_CRASH_FIRST_FRAME_LOST /* VA: issue 1293: fix G.192 decoder crash when first frame is lost */ #define FIX_1384_MSAN_stereo_tcx_core_enc /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */ #define NONBE_FIX_1297_SPAR_JBM_MEM_SAN /* Dolby: issue 1297, SPAR + JBM + BR switch memory sanitizer */ // object-editing feature porting #define OBJ_EDITING_API /* object editing changes related to the API */ Loading
lib_dec/ivas_jbm_dec.c +60 −33 Original line number Diff line number Diff line Loading @@ -1749,22 +1749,45 @@ ivas_error ivas_jbm_dec_flush_renderer( } else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN if ( ism_mode_old == ISM_SBA_MODE_DISC ) { #endif float *tc_local[MAX_TRANSPORT_CHANNELS]; int16_t last_spar_md_idx; int16_t last_dirac_md_idx; uint16_t nSamplesAvailableNext; /* to render flushed samples, use configuration from the last received frame */ #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN ISM_MODE ism_mode_orig; RENDERER_TYPE renderer_type_orig; int32_t ivas_total_brate; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; renderer_type_orig = st_ivas->renderer_type; ism_mode_orig = st_ivas->ism_mode; st_ivas->ism_mode = ism_mode_old; st_ivas->renderer_type = renderer_type_old; st_ivas->hDecoderConfig->ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; #endif last_spar_md_idx = st_ivas->hSpar->render_to_md_map[st_ivas->hSpar->slots_rendered - 1]; last_dirac_md_idx = st_ivas->hSpatParamRendCom->render_to_md_map[st_ivas->hSpatParamRendCom->slots_rendered - 1]; #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN #ifdef DEBUGGING assert( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ); #endif #else #ifdef DEBUGGING assert( ism_mode_old == ISM_SBA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ); #endif /* copy from ISM delay buffer to the correct place in TCs */ #endif /* copy from ISM delay buffer to the correct place in tcs */ for ( ch_idx = 0; ch_idx < st_ivas->nchan_ism; ch_idx++ ) { #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN tc_local[ch_idx] = &st_ivas->hTcBuffer->tc[ch_idx][hTcBuffer->n_samples_rendered]; #else tc_local[ch_idx] = &st_ivas->hTcBuffer->tc[ch_idx + 2][hTcBuffer->n_samples_rendered]; #endif mvr2r( st_ivas->hSbaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hSbaIsmData->delayBuffer_size ); } Loading @@ -1789,8 +1812,12 @@ ivas_error ivas_jbm_dec_flush_renderer( { return error; } /* restore original configuration */ #ifdef NONBE_FIX_1297_SPAR_JBM_MEM_SAN st_ivas->ism_mode = ism_mode_orig; st_ivas->renderer_type = renderer_type_orig; st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate; } #endif } else { Loading