Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ #define FIX_NCHAN_BUFFERS /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */ #define FIX_RENDERER_STACK /* VA: issue 1322: reduction of renderers' buffers size */ #define JBM_MEMORY_OPT /* VA: issue 916: optimization of RAM in the JBM decoder */ #define NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ #define FIX_1370_EXTERNAL_ORIENTATION_CHECK /* Nokia: add sanity check for Euler angles for external orientations */ Loading lib_dec/ivas_jbm_dec.c +32 −1 Original line number Diff line number Diff line Loading @@ -2669,7 +2669,10 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ ) { #ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP int16_t ch_idx, num_tc_buffer_mem, n_samples_still_available; float tc_buffer_mem[MAX_INTERN_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES - 1]; #endif #ifdef JBM_MEMORY_OPT ivas_error error; #else Loading @@ -2680,6 +2683,26 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( hTcBuffer = st_ivas->hTcBuffer; #ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP num_tc_buffer_mem = 0; n_samples_still_available = 0; if ( st_ivas->hDecoderConfig->Opt_tsm ) { /* save samples of the TC buffer from the previous frame */ num_tc_buffer_mem = min( hTcBuffer->nchan_transport_internal, nchan_transport_internal ); n_samples_still_available = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered; /* what is remaining from last frame needs always be smaller than the new granularity */ assert( n_samples_still_available < n_samples_granularity ); for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ ) { mvr2r( hTcBuffer->tc_buffer_old[ch_idx] + hTcBuffer->n_samples_flushed, tc_buffer_mem[ch_idx], n_samples_still_available ); } } #endif /* if granularity changes, adapt subframe_nb_slots */ if ( n_samples_granularity != hTcBuffer->n_samples_granularity ) { Loading Loading @@ -2797,6 +2820,14 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } #endif #ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* propagate samples of the TC buffer from the previous frame */ for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ ) { mvr2r( tc_buffer_mem[ch_idx], hTcBuffer->tc_buffer_old[ch_idx], n_samples_still_available ); } #endif return IVAS_ERR_OK; } Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ #define FIX_NCHAN_BUFFERS /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */ #define FIX_RENDERER_STACK /* VA: issue 1322: reduction of renderers' buffers size */ #define JBM_MEMORY_OPT /* VA: issue 916: optimization of RAM in the JBM decoder */ #define NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ #define FIX_1370_EXTERNAL_ORIENTATION_CHECK /* Nokia: add sanity check for Euler angles for external orientations */ Loading
lib_dec/ivas_jbm_dec.c +32 −1 Original line number Diff line number Diff line Loading @@ -2669,7 +2669,10 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ ) { #ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP int16_t ch_idx, num_tc_buffer_mem, n_samples_still_available; float tc_buffer_mem[MAX_INTERN_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES - 1]; #endif #ifdef JBM_MEMORY_OPT ivas_error error; #else Loading @@ -2680,6 +2683,26 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( hTcBuffer = st_ivas->hTcBuffer; #ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP num_tc_buffer_mem = 0; n_samples_still_available = 0; if ( st_ivas->hDecoderConfig->Opt_tsm ) { /* save samples of the TC buffer from the previous frame */ num_tc_buffer_mem = min( hTcBuffer->nchan_transport_internal, nchan_transport_internal ); n_samples_still_available = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered; /* what is remaining from last frame needs always be smaller than the new granularity */ assert( n_samples_still_available < n_samples_granularity ); for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ ) { mvr2r( hTcBuffer->tc_buffer_old[ch_idx] + hTcBuffer->n_samples_flushed, tc_buffer_mem[ch_idx], n_samples_still_available ); } } #endif /* if granularity changes, adapt subframe_nb_slots */ if ( n_samples_granularity != hTcBuffer->n_samples_granularity ) { Loading Loading @@ -2797,6 +2820,14 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } #endif #ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* propagate samples of the TC buffer from the previous frame */ for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ ) { mvr2r( tc_buffer_mem[ch_idx], hTcBuffer->tc_buffer_old[ch_idx], n_samples_still_available ); } #endif return IVAS_ERR_OK; } Loading