Loading lib_dec/ivas_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -532,6 +532,10 @@ ivas_error ivas_dec( } /* Rendering */ #ifdef JBM_PARAMUPMIX if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { #else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, Loading @@ -539,7 +543,7 @@ ivas_error ivas_dec( { return error; } #endif ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); } else if ( st_ivas->renderer_type == RENDERER_MC ) Loading lib_dec/ivas_jbm_dec.c +1 −8 Original line number Diff line number Diff line Loading @@ -896,15 +896,8 @@ ivas_error ivas_jbm_dec_render( } /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_output, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { return error; } ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); } else if ( st_ivas->renderer_type == RENDERER_MC ) Loading lib_dec/ivas_mc_paramupmix_dec.c +45 −34 Original line number Diff line number Diff line Loading @@ -181,7 +181,9 @@ void ivas_mc_paramupmix_dec( float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2]; /* decorrelated and undecorrelated*/ int16_t noparamupmix_delay; AUDIO_CONFIG output_config; #ifdef JBM_PARAMUPMIX float *p_output[MAX_OUTPUT_CHANNELS]; #endif hMCParamUpmix = st_ivas->hMCParamUpmix; assert( hMCParamUpmix ); Loading @@ -198,6 +200,19 @@ void ivas_mc_paramupmix_dec( { first_empty_channel = 8; /* Don't upmix */ } #ifdef JBM_PARAMUPMIX else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { /* Implement binaural rendering */ first_empty_channel = 4; /* don't erase LFE */ for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS * 2; ch++ ) { p_output[ch] = output_f[ch]; } ivas_binaural_cldfb( st_ivas, p_output ); } #endif else { first_empty_channel = 12; Loading Loading @@ -337,8 +352,7 @@ void ivas_mc_paramupmix_dec_render( uint16_t slot_size, ch; float *output_f_local[MAX_OUTPUT_CHANNELS]; MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; int16_t saved_subframes_rendered; int16_t saved_slots_rendered; hMCParamUpmix = st_ivas->hMCParamUpmix; assert( hMCParamUpmix ); Loading @@ -354,8 +368,6 @@ void ivas_mc_paramupmix_dec_render( /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, nSamplesAsked / slot_size ); *nSamplesRendered = slots_to_render * slot_size; saved_subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; saved_slots_rendered = st_ivas->hTcBuffer->slots_rendered; first_sf = st_ivas->hTcBuffer->subframes_rendered; last_sf = first_sf; Loading @@ -372,6 +384,13 @@ void ivas_mc_paramupmix_dec_render( #ifdef DEBUGGING assert( slots_to_render == 0 ); #endif /* Implement binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, output_f_local ); } else { for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS; ch++ ) { Loading @@ -395,16 +414,10 @@ void ivas_mc_paramupmix_dec_render( mvr2r( hMCParamUpmix->alphas[ch], hMCParamUpmix->alpha_prev[ch], IVAS_MAX_NUM_BANDS ); mvr2r( hMCParamUpmix->betas[ch], hMCParamUpmix->beta_prev[ch], IVAS_MAX_NUM_BANDS ); } } *nSamplesAvailable = ( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered ) * slot_size; /* Binaural renderer will do the slot rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { st_ivas->hTcBuffer->slots_rendered = saved_slots_rendered; st_ivas->hTcBuffer->subframes_rendered = saved_subframes_rendered; } pop_wmops(); } #endif Loading Loading @@ -498,18 +511,16 @@ ivas_error ivas_mc_paramupmix_dec_open( nchan_tc = st_ivas->hDecoderConfig->nchan_out; nchan_to_allocate = nchan_tc; } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { nchan_to_allocate = MC_PARAMUPMIX_MAX_INPUT_CHANS; } if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) { if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) { return error; } hMCParamUpmix->free_param_interpolator = 1; } ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, DEFAULT_JBM_CLDFB_TIMESLOTS, hMCParamUpmix->param_interpolator ); } #endif Loading lib_dec/ivas_output_config.c +20 −0 Original line number Diff line number Diff line Loading @@ -199,7 +199,11 @@ void ivas_renderer_select( } else { #ifdef JBM_PARAMUPMIX if ( st_ivas->mc_mode == MC_MODE_MCT ) #else if ( ( st_ivas->mc_mode == MC_MODE_MCT ) || ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) #endif { *renderer_type = RENDERER_BINAURAL_MIXER_CONV; } Loading @@ -223,11 +227,21 @@ void ivas_renderer_select( /* force HOA3 domain for rotation*/ *internal_config = AUDIO_CONFIG_HOA3; } #ifdef JBM_PARAMUPMIX if ( ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && ( *renderer_type == RENDERER_BINAURAL_FASTCONV ) ) { *internal_config = AUDIO_CONFIG_5_1_2; } #endif } } else { #ifdef JBM_PARAMUPMIX if ( st_ivas->mc_mode == MC_MODE_MCT ) #else if ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) #endif { *renderer_type = RENDERER_BINAURAL_MIXER_CONV_ROOM; } Loading @@ -244,6 +258,12 @@ void ivas_renderer_select( { *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } #endif #ifdef JBM_PARAMUPMIX if ( ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && ( *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) { *internal_config = AUDIO_CONFIG_5_1_2; } #endif } } Loading Loading
lib_dec/ivas_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -532,6 +532,10 @@ ivas_error ivas_dec( } /* Rendering */ #ifdef JBM_PARAMUPMIX if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { #else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, Loading @@ -539,7 +543,7 @@ ivas_error ivas_dec( { return error; } #endif ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); } else if ( st_ivas->renderer_type == RENDERER_MC ) Loading
lib_dec/ivas_jbm_dec.c +1 −8 Original line number Diff line number Diff line Loading @@ -896,15 +896,8 @@ ivas_error ivas_jbm_dec_render( } /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_output, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { return error; } ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); } else if ( st_ivas->renderer_type == RENDERER_MC ) Loading
lib_dec/ivas_mc_paramupmix_dec.c +45 −34 Original line number Diff line number Diff line Loading @@ -181,7 +181,9 @@ void ivas_mc_paramupmix_dec( float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2]; /* decorrelated and undecorrelated*/ int16_t noparamupmix_delay; AUDIO_CONFIG output_config; #ifdef JBM_PARAMUPMIX float *p_output[MAX_OUTPUT_CHANNELS]; #endif hMCParamUpmix = st_ivas->hMCParamUpmix; assert( hMCParamUpmix ); Loading @@ -198,6 +200,19 @@ void ivas_mc_paramupmix_dec( { first_empty_channel = 8; /* Don't upmix */ } #ifdef JBM_PARAMUPMIX else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { /* Implement binaural rendering */ first_empty_channel = 4; /* don't erase LFE */ for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS * 2; ch++ ) { p_output[ch] = output_f[ch]; } ivas_binaural_cldfb( st_ivas, p_output ); } #endif else { first_empty_channel = 12; Loading Loading @@ -337,8 +352,7 @@ void ivas_mc_paramupmix_dec_render( uint16_t slot_size, ch; float *output_f_local[MAX_OUTPUT_CHANNELS]; MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; int16_t saved_subframes_rendered; int16_t saved_slots_rendered; hMCParamUpmix = st_ivas->hMCParamUpmix; assert( hMCParamUpmix ); Loading @@ -354,8 +368,6 @@ void ivas_mc_paramupmix_dec_render( /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, nSamplesAsked / slot_size ); *nSamplesRendered = slots_to_render * slot_size; saved_subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; saved_slots_rendered = st_ivas->hTcBuffer->slots_rendered; first_sf = st_ivas->hTcBuffer->subframes_rendered; last_sf = first_sf; Loading @@ -372,6 +384,13 @@ void ivas_mc_paramupmix_dec_render( #ifdef DEBUGGING assert( slots_to_render == 0 ); #endif /* Implement binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, output_f_local ); } else { for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS; ch++ ) { Loading @@ -395,16 +414,10 @@ void ivas_mc_paramupmix_dec_render( mvr2r( hMCParamUpmix->alphas[ch], hMCParamUpmix->alpha_prev[ch], IVAS_MAX_NUM_BANDS ); mvr2r( hMCParamUpmix->betas[ch], hMCParamUpmix->beta_prev[ch], IVAS_MAX_NUM_BANDS ); } } *nSamplesAvailable = ( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered ) * slot_size; /* Binaural renderer will do the slot rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { st_ivas->hTcBuffer->slots_rendered = saved_slots_rendered; st_ivas->hTcBuffer->subframes_rendered = saved_subframes_rendered; } pop_wmops(); } #endif Loading Loading @@ -498,18 +511,16 @@ ivas_error ivas_mc_paramupmix_dec_open( nchan_tc = st_ivas->hDecoderConfig->nchan_out; nchan_to_allocate = nchan_tc; } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { nchan_to_allocate = MC_PARAMUPMIX_MAX_INPUT_CHANS; } if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) { if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) { return error; } hMCParamUpmix->free_param_interpolator = 1; } ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, DEFAULT_JBM_CLDFB_TIMESLOTS, hMCParamUpmix->param_interpolator ); } #endif Loading
lib_dec/ivas_output_config.c +20 −0 Original line number Diff line number Diff line Loading @@ -199,7 +199,11 @@ void ivas_renderer_select( } else { #ifdef JBM_PARAMUPMIX if ( st_ivas->mc_mode == MC_MODE_MCT ) #else if ( ( st_ivas->mc_mode == MC_MODE_MCT ) || ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) #endif { *renderer_type = RENDERER_BINAURAL_MIXER_CONV; } Loading @@ -223,11 +227,21 @@ void ivas_renderer_select( /* force HOA3 domain for rotation*/ *internal_config = AUDIO_CONFIG_HOA3; } #ifdef JBM_PARAMUPMIX if ( ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && ( *renderer_type == RENDERER_BINAURAL_FASTCONV ) ) { *internal_config = AUDIO_CONFIG_5_1_2; } #endif } } else { #ifdef JBM_PARAMUPMIX if ( st_ivas->mc_mode == MC_MODE_MCT ) #else if ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) #endif { *renderer_type = RENDERER_BINAURAL_MIXER_CONV_ROOM; } Loading @@ -244,6 +258,12 @@ void ivas_renderer_select( { *renderer_type = RENDERER_BINAURAL_FASTCONV_ROOM; } #endif #ifdef JBM_PARAMUPMIX if ( ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && ( *renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) { *internal_config = AUDIO_CONFIG_5_1_2; } #endif } } Loading