Loading lib_dec/ivas_jbm_dec.c +31 −0 Original line number Diff line number Diff line Loading @@ -1351,11 +1351,19 @@ ivas_error ivas_jbm_dec_render( #endif for ( n = st_ivas->hIntSetup.nchan_out_woLFE - 1; n >= 0; n-- ) { #ifdef UNIFY_CHANNEL_MEM_HEAP mvr2r( p_output[n], p_output[n + st_ivas->nchan_ism], *nSamplesRendered ); #else mvr2r( output[n], output[n + st_ivas->nchan_ism], *nSamplesRendered ); #endif } for ( n = 0; n < st_ivas->nchan_ism; n++ ) { #ifdef UNIFY_CHANNEL_MEM_HEAP set_zero( p_output[n], *nSamplesRendered ); #else set_zero( output[n], *nSamplesRendered ); #endif } } } Loading Loading @@ -2286,6 +2294,8 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } #ifdef UNIFY_CHANNEL_MEM_HEAP *nchan_transport_internal = num_tc; *nchan_transport_full = num_tc; if ( st_ivas->ivas_format == SBA_FORMAT ) { if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) Loading @@ -2308,6 +2318,11 @@ int16_t ivas_jbm_dec_get_num_tc_channels( *nchan_transport_full = num_channels_internal; } } else if ( st_ivas->ivas_format == MASA_FORMAT && ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) ) { *nchan_transport_internal += 1; *nchan_transport_full += 1; } else { if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) Loading Loading @@ -2350,6 +2365,11 @@ int16_t ivas_jbm_dec_get_num_tc_channels( *nchan_transport_internal = 2 * BINAURAL_CHANNELS + 2; *nchan_transport_full = *nchan_transport_internal; } else if ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) { *nchan_transport_internal += 1; *nchan_transport_full += 1; } #endif } #ifdef UNIFY_CHANNEL_MEM_HEAP Loading Loading @@ -3064,6 +3084,17 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( { /* all renderers where we are done after TC decoding (might include DMX to mono/stereo */ case RENDERER_DISABLE: #ifdef UNIFY_CHANNEL_MEM_HEAP if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX && ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO ) ) { buffer_mode = TC_BUFFER_MODE_RENDERER; } else { buffer_mode = TC_BUFFER_MODE_BUFFER; } break; #endif case RENDERER_MCMASA_MONO_STEREO: case RENDERER_OSBA_STEREO: case RENDERER_MONO_DOWNMIX: Loading lib_dec/ivas_masa_dec.c +2 −0 Original line number Diff line number Diff line Loading @@ -1533,12 +1533,14 @@ ivas_error ivas_masa_dec_reconfigure( } } #ifdef FIX_XXX_MASA_CNA #ifndef UNIFY_CHANNEL_MEM_HEAP else if ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) { /* addtl channel for CNG */ tc_nchan_to_allocate++; } #endif #endif #ifdef UNIFY_CHANNEL_MEM_HEAP Loading lib_rend/ivas_rotation.c +1 −1 Original line number Diff line number Diff line Loading @@ -1796,7 +1796,7 @@ void ivas_combined_orientation_update_start_index( hCombinedOrientationData->cur_subframe_samples_rendered_start += samples_rendered; hCombinedOrientationData->subframe_idx_start += hCombinedOrientationData->cur_subframe_samples_rendered / hCombinedOrientationData->subframe_size; hCombinedOrientationData->cur_subframe_samples_rendered_start = hCombinedOrientationData->cur_subframe_samples_rendered % hCombinedOrientationData->subframe_size; hCombinedOrientationData->subframe_idx_start = max( hCombinedOrientationData->subframe_idx, hCombinedOrientationData->num_subframes - 1 ); hCombinedOrientationData->subframe_idx_start = min( hCombinedOrientationData->subframe_idx, hCombinedOrientationData->num_subframes - 1 ); } } return; Loading Loading
lib_dec/ivas_jbm_dec.c +31 −0 Original line number Diff line number Diff line Loading @@ -1351,11 +1351,19 @@ ivas_error ivas_jbm_dec_render( #endif for ( n = st_ivas->hIntSetup.nchan_out_woLFE - 1; n >= 0; n-- ) { #ifdef UNIFY_CHANNEL_MEM_HEAP mvr2r( p_output[n], p_output[n + st_ivas->nchan_ism], *nSamplesRendered ); #else mvr2r( output[n], output[n + st_ivas->nchan_ism], *nSamplesRendered ); #endif } for ( n = 0; n < st_ivas->nchan_ism; n++ ) { #ifdef UNIFY_CHANNEL_MEM_HEAP set_zero( p_output[n], *nSamplesRendered ); #else set_zero( output[n], *nSamplesRendered ); #endif } } } Loading Loading @@ -2286,6 +2294,8 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } #ifdef UNIFY_CHANNEL_MEM_HEAP *nchan_transport_internal = num_tc; *nchan_transport_full = num_tc; if ( st_ivas->ivas_format == SBA_FORMAT ) { if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) Loading @@ -2308,6 +2318,11 @@ int16_t ivas_jbm_dec_get_num_tc_channels( *nchan_transport_full = num_channels_internal; } } else if ( st_ivas->ivas_format == MASA_FORMAT && ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) ) { *nchan_transport_internal += 1; *nchan_transport_full += 1; } else { if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) Loading Loading @@ -2350,6 +2365,11 @@ int16_t ivas_jbm_dec_get_num_tc_channels( *nchan_transport_internal = 2 * BINAURAL_CHANNELS + 2; *nchan_transport_full = *nchan_transport_internal; } else if ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) { *nchan_transport_internal += 1; *nchan_transport_full += 1; } #endif } #ifdef UNIFY_CHANNEL_MEM_HEAP Loading Loading @@ -3064,6 +3084,17 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( { /* all renderers where we are done after TC decoding (might include DMX to mono/stereo */ case RENDERER_DISABLE: #ifdef UNIFY_CHANNEL_MEM_HEAP if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX && ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_MONO ) ) { buffer_mode = TC_BUFFER_MODE_RENDERER; } else { buffer_mode = TC_BUFFER_MODE_BUFFER; } break; #endif case RENDERER_MCMASA_MONO_STEREO: case RENDERER_OSBA_STEREO: case RENDERER_MONO_DOWNMIX: Loading
lib_dec/ivas_masa_dec.c +2 −0 Original line number Diff line number Diff line Loading @@ -1533,12 +1533,14 @@ ivas_error ivas_masa_dec_reconfigure( } } #ifdef FIX_XXX_MASA_CNA #ifndef UNIFY_CHANNEL_MEM_HEAP else if ( st_ivas->nchan_transport == 1 && ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) ) { /* addtl channel for CNG */ tc_nchan_to_allocate++; } #endif #endif #ifdef UNIFY_CHANNEL_MEM_HEAP Loading
lib_rend/ivas_rotation.c +1 −1 Original line number Diff line number Diff line Loading @@ -1796,7 +1796,7 @@ void ivas_combined_orientation_update_start_index( hCombinedOrientationData->cur_subframe_samples_rendered_start += samples_rendered; hCombinedOrientationData->subframe_idx_start += hCombinedOrientationData->cur_subframe_samples_rendered / hCombinedOrientationData->subframe_size; hCombinedOrientationData->cur_subframe_samples_rendered_start = hCombinedOrientationData->cur_subframe_samples_rendered % hCombinedOrientationData->subframe_size; hCombinedOrientationData->subframe_idx_start = max( hCombinedOrientationData->subframe_idx, hCombinedOrientationData->num_subframes - 1 ); hCombinedOrientationData->subframe_idx_start = min( hCombinedOrientationData->subframe_idx, hCombinedOrientationData->num_subframes - 1 ); } } return; Loading