Loading lib_dec/ivas_binRenderer_internal.c +24 −39 Original line number Diff line number Diff line Loading @@ -262,58 +262,47 @@ static ivas_error ivas_binRenderer_convModuleOpen( IF( EQ_16( renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ) { hBinRenConvModule->numTaps = BINAURAL_NTAPS_MAX; move16(); hBinRenConvModule->numTaps = BINAURAL_NTAPS_MAX; move16(); /* Use variable order filtering */ bandIdx = 0; move16(); bandIdx = 0; move16(); FOR( ; bandIdx < 5; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); } FOR( ; bandIdx < 10; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_6; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_6; move16(); } FOR( ; bandIdx < 20; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_5; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_5; move16(); } FOR( ; bandIdx < 30; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_4; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_4; move16(); } FOR( ; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_3; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_3; move16(); } } ELSE { IF( EQ_16( hBinRenderer->ivas_format, SBA_FORMAT ) ) { hBinRenConvModule->numTaps = BINAURAL_NTAPS_SBA; move16(); hBinRenConvModule->numTaps = BINAURAL_NTAPS_SBA; move16(); } ELSE { hBinRenConvModule->numTaps = BINAURAL_NTAPS; move16(); hBinRenConvModule->numTaps = BINAURAL_NTAPS; move16(); } /* Use fixed order filtering */ bandIdx = 0; move16(); bandIdx = 0; move16(); FOR( ; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); } } Loading Loading @@ -417,35 +406,29 @@ static ivas_error ivas_binRenderer_convModuleOpen( { FOR( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { Word16 tmp = 0; move16(); Word16 tmp = 0; move16(); IF( isLoudspeaker ) { IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_5_1 ) ) { tmp = channelIndex_CICP6[chIdx]; move16(); tmp = channelIndex_CICP6[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_7_1 ) ) { tmp = channelIndex_CICP12[chIdx]; move16(); tmp = channelIndex_CICP12[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_5_1_2 ) ) { tmp = channelIndex_CICP14[chIdx]; move16(); tmp = channelIndex_CICP14[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_5_1_4 ) ) { tmp = channelIndex_CICP16[chIdx]; move16(); tmp = channelIndex_CICP16[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_7_1_4 ) ) { tmp = channelIndex_CICP19[chIdx]; move16(); tmp = channelIndex_CICP19[chIdx]; move16(); } } Loading Loading @@ -523,7 +506,8 @@ static ivas_error ivas_binRenderer_convModuleOpen( const int16_t renderer_type, const int16_t isLoudspeaker, const AUDIO_CONFIG input_config, const HRTFS_FASTCONV_HANDLE hHrtf ) const HRTFS_FASTCONV_HANDLE hHrtf ) { int16_t bandIdx, chIdx; BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule; Loading Loading @@ -894,8 +878,10 @@ static ivas_error ivas_alloc_pppMem_fx( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF memory" ); } FOR( i = 0; i < dim1; i++ ){ IF( ( localMem[i] = (Word32 **) malloc( dim2 * sizeof( Word32 * ) ) ) == NULL ){ FOR( i = 0; i < dim1; i++ ) { IF( ( localMem[i] = (Word32 **) malloc( dim2 * sizeof(Word32 * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF memory" ); } IF( allocate_init_flag == 0 ) Loading Loading @@ -2570,8 +2556,7 @@ void ivas_binaural_add_LFE( } else { gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE; } gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE; } for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ ) { Loading lib_dec/ivas_dirac_dec.c +17 −28 Original line number Diff line number Diff line Loading @@ -1514,17 +1514,14 @@ ivas_error ivas_dirac_dec_config_fx( /* Solve and setup flags for inits */ dec_config_flag = ( EQ_16( flag_config_inp, DIRAC_RECONFIGURE_MODE ) ) ? DIRAC_RECONFIGURE : flag_config_inp; output_Fs = st_ivas->hDecoderConfig->output_Fs; move32(); output_Fs = st_ivas->hDecoderConfig->output_Fs; move32(); hodirac_flag = ivas_get_hodirac_flag_fx( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order ); dec_param_estim_old = ( dec_config_flag == DIRAC_RECONFIGURE ) ? st_ivas->hDirAC->hConfig->dec_param_estim : FALSE; sparfoa_flag = 0; move16(); sparfoa_flag = 0; move16(); IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_FOA && st_ivas->ivas_format == SBA_FORMAT && !hodirac_flag ) { sparfoa_flag = 1; move16(); sparfoa_flag = 1; move16(); } IF( ( error = ivas_dirac_dec_config_internal_fx( st_ivas, dec_config_flag ) ) != IVAS_ERR_OK ) Loading @@ -1533,32 +1530,26 @@ ivas_error ivas_dirac_dec_config_fx( } /* This is required for parambin */ test(); test(); test(); test(); IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) || EQ_16( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) ) { st_ivas->hDirAC->hConfig->dec_param_estim = FALSE; move16(); st_ivas->hDirAC->hConfig->dec_param_estim = FALSE; move16(); } dec_param_estim_new = st_ivas->hDirAC->hConfig->dec_param_estim; move16(); dec_param_estim_new = st_ivas->hDirAC->hConfig->dec_param_estim; move16(); /* Setup renderers and meta */ /* First, free everything if in reconfig and not the active renderer */ need_parambin = 0; move16(); need_parambin = 0; move16(); SWITCH( st_ivas->renderer_type ) { case RENDERER_BINAURAL_PARAMETRIC: case RENDERER_BINAURAL_PARAMETRIC_ROOM: case RENDERER_STEREO_PARAMETRIC: need_parambin = 1; move16(); need_parambin = 1; move16(); BREAK; default: need_parambin = 0; move16(); need_parambin = 0; move16(); } IF( !need_parambin ) Loading @@ -1566,8 +1557,7 @@ ivas_error ivas_dirac_dec_config_fx( ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); } need_dirac_rend = 0; move16(); need_dirac_rend = 0; move16(); SWITCH( st_ivas->renderer_type ) { case RENDERER_DIRAC: Loading @@ -1577,12 +1567,10 @@ ivas_error ivas_dirac_dec_config_fx( case RENDERER_SBA_LINEAR_DEC: case RENDERER_OSBA_AMBI: case RENDERER_OSBA_LS: need_dirac_rend = 1; move16(); need_dirac_rend = 1; move16(); BREAK; default: need_dirac_rend = 0; move16(); need_dirac_rend = 0; move16(); } IF( !need_dirac_rend ) Loading Loading @@ -3221,8 +3209,7 @@ void ivas_dirac_dec_set_md_map_fx( exp = sub( exp_num, exp_denom ); IF( num > denom ) { IF (num > denom) { num = L_shr( num, 1 ); exp = add( exp, 1 ); } Loading Loading @@ -3330,8 +3317,10 @@ void ivas_dirac_dec_render_fx( } } IF( EQ_16( hSpatParamRendCom->slots_rendered, hSpatParamRendCom->num_slots ) ){ IF( EQ_16( st_ivas->hDirAC->hConfig->dec_param_estim, 1 ) ){ IF( EQ_16( hSpatParamRendCom->slots_rendered, hSpatParamRendCom->num_slots ) ) { IF( EQ_16( st_ivas->hDirAC->hConfig->dec_param_estim, 1 ) ) { temp = add( hSpatParamRendCom->dirac_read_idx, DEFAULT_JBM_CLDFB_TIMESLOTS ); hSpatParamRendCom->dirac_read_idx = sub( temp, i_mult( idiv1616( temp, hSpatParamRendCom->dirac_md_buffer_length ), hSpatParamRendCom->dirac_md_buffer_length ) ); } Loading lib_dec/ivas_init_dec.c +56 −49 Original line number Diff line number Diff line Loading @@ -188,8 +188,7 @@ ivas_error ivas_dec_setup( } ELSE { IF( ( error = ivas_masa_dec_reconfigure_fx( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) { IF ( ( error = ivas_masa_dec_reconfigure_fx( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) { return error; } } Loading Loading @@ -872,8 +871,7 @@ ivas_error ivas_dec_setup( *-------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED static ivas_error ivas_read_format( static ivas_error ivas_read_format( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Word16 *num_bits_read /* o : number of IVAS signaling bits read from the bitstream */ ) Loading Loading @@ -1033,8 +1031,7 @@ ivas_read_format( return error; } #else static ivas_error ivas_read_format( static ivas_error ivas_read_format( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t *num_bits_read /* o : number of IVAS signaling bits read from the bitstream */ ) Loading Loading @@ -1474,7 +1471,8 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Binaural Renderer configuration handle *--------------------------------------------------------------------*/ IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) IF ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { IF( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1611,7 +1609,8 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Binaural Renderer configuration handle *--------------------------------------------------------------------*/ if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1725,8 +1724,7 @@ ivas_error ivas_init_decoder_fx( IF( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM ) { IF( ( error = ivas_ls_custom_output_init_fx( st_ivas ) ) == IVAS_ERR_OK ) { IF ( ( error = ivas_ls_custom_output_init_fx( st_ivas ) ) == IVAS_ERR_OK ) { st_ivas->hOutSetup.ls_azimuth_fx = st_ivas->hLsSetupCustom->ls_azimuth_fx; st_ivas->hOutSetup.ls_elevation_fx = st_ivas->hLsSetupCustom->ls_elevation_fx; st_ivas->hIntSetup.ls_azimuth_fx = st_ivas->hLsSetupCustom->ls_azimuth_fx; Loading Loading @@ -1776,10 +1774,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->nCPE = 0; st_ivas->nchan_transport = 1; sce_id = 0; move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); IF( ( error = create_sce_dec( st_ivas, sce_id, ivas_total_brate ) ) != IVAS_ERR_OK ) { Loading @@ -1796,11 +1791,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->nSCE = 0; st_ivas->nCPE = 1; /* in stereo, there is always only one CPE */ cpe_id = 0; move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); IF( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1832,10 +1823,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->ism_extmeta_active = -1; st_ivas->ism_extmeta_cnt = 0; move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); IF( st_ivas->ism_mode == ISM_MODE_PARAM ) { st_ivas->nchan_transport = MAX_PARAM_ISM_WAVE; Loading Loading @@ -1988,8 +1976,7 @@ ivas_error ivas_init_decoder_fx( /* if we start in ISM_MODE_NONE in MASA_ISM, that appears as normal MASA, but we may change to a mode with ISMs */ st_ivas->ism_extmeta_active = -1; st_ivas->ism_extmeta_cnt = 0; move16(); move16(); move16(); move16(); IF( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -2304,9 +2291,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->nSCE = 0; st_ivas->nCPE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS / CPE_CHANNELS; st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; move16(); move16(); move16(); move16(); move16(); move16(); IF( ( error = ivas_mc_paramupmix_dec_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -2527,7 +2512,11 @@ ivas_error ivas_init_decoder_fx( } } #ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT IF( ( error = ivas_dirac_dec_init_binaural_data_fx( st_ivas, &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) #else IF( ( error = ivas_dirac_dec_init_binaural_data_fx( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -2556,21 +2545,6 @@ ivas_error ivas_init_decoder_fx( SrcSpatial_p->q_Pos_p = Q31; } IF( EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { nchan_rend--; /* Skip LFE channel -- added to the others */ } FOR( Word16 nS = 0; nS < nchan_rend; nS++ ) { TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]]; IF( Src_p->SrcSpatial_p != NULL ) { Src_p->SrcSpatial_p->q_Pos_p = Q31; } TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p; SrcSpatial_p->q_Pos_p = Q31; } IF( EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { #ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT Loading Loading @@ -2634,6 +2608,33 @@ ivas_error ivas_init_decoder_fx( st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; IF( ( st_ivas->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) { granularity = NS2SA( output_Fs, CLDFB_SLOT_NS ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels_fx( st_ivas ); IF ( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, MC_PARAMUPMIX_MAX_INPUT_CHANS, MC_PARAMUPMIX_MAX_INPUT_CHANS, granularity ) ) != IVAS_ERR_OK ) { return error; } } ELSE { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels_fx( st_ivas ); IF ( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK ) { return error; } } } IF ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { IF ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { /* Allocate TD renderer for the objects in DISC mode */ Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Loading Loading @@ -3158,8 +3159,10 @@ ivas_error ivas_init_decoder( } } if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) , st_ivas->ivas_format ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -3312,8 +3315,10 @@ ivas_error ivas_init_decoder( } } if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) , st_ivas->ivas_format ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -5492,7 +5497,8 @@ static ivas_error doSanityChecks_IVAS( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { if ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) IF ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { return IVAS_ERROR( IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED, "Wrong set-up: Head-rotation not supported in this configuration" ); } Loading Loading @@ -5605,7 +5611,8 @@ static ivas_error doSanityChecks_IVAS( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { if ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) if ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { return IVAS_ERROR( IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED, "Wrong set-up: Head-rotation not supported in this configuration" ); } Loading lib_dec/ivas_ism_dec.c +6 −6 Original line number Diff line number Diff line Loading @@ -132,9 +132,7 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx( } { test(); test(); test(); test(); test(); test(); /* transfer subframe info from DirAC or ParamMC to central tc buffer */ IF( EQ_32( last_ism_mode, ISM_MODE_PARAM ) && st_ivas->hSpatParamRendCom != NULL && ( NE_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) && NE_32( st_ivas->renderer_type, RENDERER_DISABLE ) ) ) { Loading Loading @@ -512,7 +510,8 @@ static ivas_error ivas_ism_bitrate_switching_dec( /* Deallocate the ParamISM struct */ ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config ); if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if (st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { /* close the parametric binaural renderer */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); Loading Loading @@ -567,7 +566,8 @@ static ivas_error ivas_ism_bitrate_switching_dec( return error; } if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if (st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { /* open the parametric binaural renderer */ if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) Loading lib_dec/ivas_ism_param_dec.c +4 −8 Original line number Diff line number Diff line Loading @@ -993,11 +993,7 @@ ivas_error ivas_param_ism_dec_open_fx( } } test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); IF( !( output_config == IVAS_AUDIO_CONFIG_EXTERNAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) ) { Loading @@ -1020,8 +1016,7 @@ ivas_error ivas_param_ism_dec_open_fx( hSpatParamRendCom->dirac_read_idx = 0; move16(); test(); test(); test(); test(); IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { IF( ( error = ivas_dirac_allocate_parameters_fx( hSpatParamRendCom, 1 ) ) != IVAS_ERR_OK ) Loading Loading @@ -2837,7 +2832,8 @@ void ivas_param_ism_dec_render_fx( const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ UWord16 *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ Word32 *output_f_fx[] ) Word32 *output_f_fx[] ) { Word16 ch, slots_to_render, first_sf, last_sf, subframe_idx; Loading Loading
lib_dec/ivas_binRenderer_internal.c +24 −39 Original line number Diff line number Diff line Loading @@ -262,58 +262,47 @@ static ivas_error ivas_binRenderer_convModuleOpen( IF( EQ_16( renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ) { hBinRenConvModule->numTaps = BINAURAL_NTAPS_MAX; move16(); hBinRenConvModule->numTaps = BINAURAL_NTAPS_MAX; move16(); /* Use variable order filtering */ bandIdx = 0; move16(); bandIdx = 0; move16(); FOR( ; bandIdx < 5; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); } FOR( ; bandIdx < 10; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_6; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_6; move16(); } FOR( ; bandIdx < 20; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_5; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_5; move16(); } FOR( ; bandIdx < 30; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_4; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_4; move16(); } FOR( ; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_3; move16(); hBinRenConvModule->numTapsArray[bandIdx] = NUM_TAPS_F0_3; move16(); } } ELSE { IF( EQ_16( hBinRenderer->ivas_format, SBA_FORMAT ) ) { hBinRenConvModule->numTaps = BINAURAL_NTAPS_SBA; move16(); hBinRenConvModule->numTaps = BINAURAL_NTAPS_SBA; move16(); } ELSE { hBinRenConvModule->numTaps = BINAURAL_NTAPS; move16(); hBinRenConvModule->numTaps = BINAURAL_NTAPS; move16(); } /* Use fixed order filtering */ bandIdx = 0; move16(); bandIdx = 0; move16(); FOR( ; bandIdx < hBinRenderer->conv_band; bandIdx++ ) { hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps; move16(); } } Loading Loading @@ -417,35 +406,29 @@ static ivas_error ivas_binRenderer_convModuleOpen( { FOR( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { Word16 tmp = 0; move16(); Word16 tmp = 0; move16(); IF( isLoudspeaker ) { IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_5_1 ) ) { tmp = channelIndex_CICP6[chIdx]; move16(); tmp = channelIndex_CICP6[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_7_1 ) ) { tmp = channelIndex_CICP12[chIdx]; move16(); tmp = channelIndex_CICP12[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_5_1_2 ) ) { tmp = channelIndex_CICP14[chIdx]; move16(); tmp = channelIndex_CICP14[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_5_1_4 ) ) { tmp = channelIndex_CICP16[chIdx]; move16(); tmp = channelIndex_CICP16[chIdx]; move16(); } ELSE IF( EQ_16( input_config, IVAS_AUDIO_CONFIG_7_1_4 ) ) { tmp = channelIndex_CICP19[chIdx]; move16(); tmp = channelIndex_CICP19[chIdx]; move16(); } } Loading Loading @@ -523,7 +506,8 @@ static ivas_error ivas_binRenderer_convModuleOpen( const int16_t renderer_type, const int16_t isLoudspeaker, const AUDIO_CONFIG input_config, const HRTFS_FASTCONV_HANDLE hHrtf ) const HRTFS_FASTCONV_HANDLE hHrtf ) { int16_t bandIdx, chIdx; BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule; Loading Loading @@ -894,8 +878,10 @@ static ivas_error ivas_alloc_pppMem_fx( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF memory" ); } FOR( i = 0; i < dim1; i++ ){ IF( ( localMem[i] = (Word32 **) malloc( dim2 * sizeof( Word32 * ) ) ) == NULL ){ FOR( i = 0; i < dim1; i++ ) { IF( ( localMem[i] = (Word32 **) malloc( dim2 * sizeof(Word32 * ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF memory" ); } IF( allocate_init_flag == 0 ) Loading Loading @@ -2570,8 +2556,7 @@ void ivas_binaural_add_LFE( } else { gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE; } gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE; } for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ ) { Loading
lib_dec/ivas_dirac_dec.c +17 −28 Original line number Diff line number Diff line Loading @@ -1514,17 +1514,14 @@ ivas_error ivas_dirac_dec_config_fx( /* Solve and setup flags for inits */ dec_config_flag = ( EQ_16( flag_config_inp, DIRAC_RECONFIGURE_MODE ) ) ? DIRAC_RECONFIGURE : flag_config_inp; output_Fs = st_ivas->hDecoderConfig->output_Fs; move32(); output_Fs = st_ivas->hDecoderConfig->output_Fs; move32(); hodirac_flag = ivas_get_hodirac_flag_fx( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order ); dec_param_estim_old = ( dec_config_flag == DIRAC_RECONFIGURE ) ? st_ivas->hDirAC->hConfig->dec_param_estim : FALSE; sparfoa_flag = 0; move16(); sparfoa_flag = 0; move16(); IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_FOA && st_ivas->ivas_format == SBA_FORMAT && !hodirac_flag ) { sparfoa_flag = 1; move16(); sparfoa_flag = 1; move16(); } IF( ( error = ivas_dirac_dec_config_internal_fx( st_ivas, dec_config_flag ) ) != IVAS_ERR_OK ) Loading @@ -1533,32 +1530,26 @@ ivas_error ivas_dirac_dec_config_fx( } /* This is required for parambin */ test(); test(); test(); test(); IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) || EQ_16( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) ) { st_ivas->hDirAC->hConfig->dec_param_estim = FALSE; move16(); st_ivas->hDirAC->hConfig->dec_param_estim = FALSE; move16(); } dec_param_estim_new = st_ivas->hDirAC->hConfig->dec_param_estim; move16(); dec_param_estim_new = st_ivas->hDirAC->hConfig->dec_param_estim; move16(); /* Setup renderers and meta */ /* First, free everything if in reconfig and not the active renderer */ need_parambin = 0; move16(); need_parambin = 0; move16(); SWITCH( st_ivas->renderer_type ) { case RENDERER_BINAURAL_PARAMETRIC: case RENDERER_BINAURAL_PARAMETRIC_ROOM: case RENDERER_STEREO_PARAMETRIC: need_parambin = 1; move16(); need_parambin = 1; move16(); BREAK; default: need_parambin = 0; move16(); need_parambin = 0; move16(); } IF( !need_parambin ) Loading @@ -1566,8 +1557,7 @@ ivas_error ivas_dirac_dec_config_fx( ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); } need_dirac_rend = 0; move16(); need_dirac_rend = 0; move16(); SWITCH( st_ivas->renderer_type ) { case RENDERER_DIRAC: Loading @@ -1577,12 +1567,10 @@ ivas_error ivas_dirac_dec_config_fx( case RENDERER_SBA_LINEAR_DEC: case RENDERER_OSBA_AMBI: case RENDERER_OSBA_LS: need_dirac_rend = 1; move16(); need_dirac_rend = 1; move16(); BREAK; default: need_dirac_rend = 0; move16(); need_dirac_rend = 0; move16(); } IF( !need_dirac_rend ) Loading Loading @@ -3221,8 +3209,7 @@ void ivas_dirac_dec_set_md_map_fx( exp = sub( exp_num, exp_denom ); IF( num > denom ) { IF (num > denom) { num = L_shr( num, 1 ); exp = add( exp, 1 ); } Loading Loading @@ -3330,8 +3317,10 @@ void ivas_dirac_dec_render_fx( } } IF( EQ_16( hSpatParamRendCom->slots_rendered, hSpatParamRendCom->num_slots ) ){ IF( EQ_16( st_ivas->hDirAC->hConfig->dec_param_estim, 1 ) ){ IF( EQ_16( hSpatParamRendCom->slots_rendered, hSpatParamRendCom->num_slots ) ) { IF( EQ_16( st_ivas->hDirAC->hConfig->dec_param_estim, 1 ) ) { temp = add( hSpatParamRendCom->dirac_read_idx, DEFAULT_JBM_CLDFB_TIMESLOTS ); hSpatParamRendCom->dirac_read_idx = sub( temp, i_mult( idiv1616( temp, hSpatParamRendCom->dirac_md_buffer_length ), hSpatParamRendCom->dirac_md_buffer_length ) ); } Loading
lib_dec/ivas_init_dec.c +56 −49 Original line number Diff line number Diff line Loading @@ -188,8 +188,7 @@ ivas_error ivas_dec_setup( } ELSE { IF( ( error = ivas_masa_dec_reconfigure_fx( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) { IF ( ( error = ivas_masa_dec_reconfigure_fx( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) { return error; } } Loading Loading @@ -872,8 +871,7 @@ ivas_error ivas_dec_setup( *-------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED static ivas_error ivas_read_format( static ivas_error ivas_read_format( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Word16 *num_bits_read /* o : number of IVAS signaling bits read from the bitstream */ ) Loading Loading @@ -1033,8 +1031,7 @@ ivas_read_format( return error; } #else static ivas_error ivas_read_format( static ivas_error ivas_read_format( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t *num_bits_read /* o : number of IVAS signaling bits read from the bitstream */ ) Loading Loading @@ -1474,7 +1471,8 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Binaural Renderer configuration handle *--------------------------------------------------------------------*/ IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) IF ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { IF( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1611,7 +1609,8 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Binaural Renderer configuration handle *--------------------------------------------------------------------*/ if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { if ( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1725,8 +1724,7 @@ ivas_error ivas_init_decoder_fx( IF( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM ) { IF( ( error = ivas_ls_custom_output_init_fx( st_ivas ) ) == IVAS_ERR_OK ) { IF ( ( error = ivas_ls_custom_output_init_fx( st_ivas ) ) == IVAS_ERR_OK ) { st_ivas->hOutSetup.ls_azimuth_fx = st_ivas->hLsSetupCustom->ls_azimuth_fx; st_ivas->hOutSetup.ls_elevation_fx = st_ivas->hLsSetupCustom->ls_elevation_fx; st_ivas->hIntSetup.ls_azimuth_fx = st_ivas->hLsSetupCustom->ls_azimuth_fx; Loading Loading @@ -1776,10 +1774,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->nCPE = 0; st_ivas->nchan_transport = 1; sce_id = 0; move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); IF( ( error = create_sce_dec( st_ivas, sce_id, ivas_total_brate ) ) != IVAS_ERR_OK ) { Loading @@ -1796,11 +1791,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->nSCE = 0; st_ivas->nCPE = 1; /* in stereo, there is always only one CPE */ cpe_id = 0; move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); IF( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1832,10 +1823,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->ism_extmeta_active = -1; st_ivas->ism_extmeta_cnt = 0; move16(); move16(); move16(); move16(); move16(); move16(); move16(); move16(); IF( st_ivas->ism_mode == ISM_MODE_PARAM ) { st_ivas->nchan_transport = MAX_PARAM_ISM_WAVE; Loading Loading @@ -1988,8 +1976,7 @@ ivas_error ivas_init_decoder_fx( /* if we start in ISM_MODE_NONE in MASA_ISM, that appears as normal MASA, but we may change to a mode with ISMs */ st_ivas->ism_extmeta_active = -1; st_ivas->ism_extmeta_cnt = 0; move16(); move16(); move16(); move16(); IF( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -2304,9 +2291,7 @@ ivas_error ivas_init_decoder_fx( st_ivas->nSCE = 0; st_ivas->nCPE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS / CPE_CHANNELS; st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; move16(); move16(); move16(); move16(); move16(); move16(); IF( ( error = ivas_mc_paramupmix_dec_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -2527,7 +2512,11 @@ ivas_error ivas_init_decoder_fx( } } #ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT IF( ( error = ivas_dirac_dec_init_binaural_data_fx( st_ivas, &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) #else IF( ( error = ivas_dirac_dec_init_binaural_data_fx( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) #endif { return error; } Loading Loading @@ -2556,21 +2545,6 @@ ivas_error ivas_init_decoder_fx( SrcSpatial_p->q_Pos_p = Q31; } IF( EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { nchan_rend--; /* Skip LFE channel -- added to the others */ } FOR( Word16 nS = 0; nS < nchan_rend; nS++ ) { TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]]; IF( Src_p->SrcSpatial_p != NULL ) { Src_p->SrcSpatial_p->q_Pos_p = Q31; } TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p; SrcSpatial_p->q_Pos_p = Q31; } IF( EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { #ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT Loading Loading @@ -2634,6 +2608,33 @@ ivas_error ivas_init_decoder_fx( st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; IF( ( st_ivas->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) { granularity = NS2SA( output_Fs, CLDFB_SLOT_NS ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels_fx( st_ivas ); IF ( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, MC_PARAMUPMIX_MAX_INPUT_CHANS, MC_PARAMUPMIX_MAX_INPUT_CHANS, granularity ) ) != IVAS_ERR_OK ) { return error; } } ELSE { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels_fx( st_ivas ); IF ( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK ) { return error; } } } IF ( st_ivas->ivas_format == MASA_ISM_FORMAT ) { IF ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { /* Allocate TD renderer for the objects in DISC mode */ Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Loading Loading @@ -3158,8 +3159,10 @@ ivas_error ivas_init_decoder( } } if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) , st_ivas->ivas_format ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -3312,8 +3315,10 @@ ivas_error ivas_init_decoder( } } if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) , st_ivas->ivas_format ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -5492,7 +5497,8 @@ static ivas_error doSanityChecks_IVAS( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { if ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) IF ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { return IVAS_ERROR( IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED, "Wrong set-up: Head-rotation not supported in this configuration" ); } Loading Loading @@ -5605,7 +5611,8 @@ static ivas_error doSanityChecks_IVAS( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { if ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) if ( !( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { return IVAS_ERROR( IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED, "Wrong set-up: Head-rotation not supported in this configuration" ); } Loading
lib_dec/ivas_ism_dec.c +6 −6 Original line number Diff line number Diff line Loading @@ -132,9 +132,7 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx( } { test(); test(); test(); test(); test(); test(); /* transfer subframe info from DirAC or ParamMC to central tc buffer */ IF( EQ_32( last_ism_mode, ISM_MODE_PARAM ) && st_ivas->hSpatParamRendCom != NULL && ( NE_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) && NE_32( st_ivas->renderer_type, RENDERER_DISABLE ) ) ) { Loading Loading @@ -512,7 +510,8 @@ static ivas_error ivas_ism_bitrate_switching_dec( /* Deallocate the ParamISM struct */ ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config ); if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if (st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { /* close the parametric binaural renderer */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); Loading Loading @@ -567,7 +566,8 @@ static ivas_error ivas_ism_bitrate_switching_dec( return error; } if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if (st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { /* open the parametric binaural renderer */ if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) Loading
lib_dec/ivas_ism_param_dec.c +4 −8 Original line number Diff line number Diff line Loading @@ -993,11 +993,7 @@ ivas_error ivas_param_ism_dec_open_fx( } } test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); IF( !( output_config == IVAS_AUDIO_CONFIG_EXTERNAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) ) { Loading @@ -1020,8 +1016,7 @@ ivas_error ivas_param_ism_dec_open_fx( hSpatParamRendCom->dirac_read_idx = 0; move16(); test(); test(); test(); test(); IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { IF( ( error = ivas_dirac_allocate_parameters_fx( hSpatParamRendCom, 1 ) ) != IVAS_ERR_OK ) Loading Loading @@ -2837,7 +2832,8 @@ void ivas_param_ism_dec_render_fx( const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ UWord16 *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ Word32 *output_f_fx[] ) Word32 *output_f_fx[] ) { Word16 ch, slots_to_render, first_sf, last_sf, subframe_idx; Loading