Loading lib_dec/ivas_cpe_dec.c +2 −7 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ ivas_error ivas_cpe_dec( int32_t cpe_brate; int32_t element_brate_ref; error = IVAS_ERR_OK; push_wmops( "ivas_cpe_dec" ); ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; Loading Loading @@ -181,7 +179,6 @@ ivas_error ivas_cpe_dec( } else { /* Note: This only works for stereo operation. If DTX would be applied for multiple CPEs a different bitrate signaling is needed */ if ( ivas_total_brate <= IVAS_SID_5k2 ) { stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, ivas_total_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); Loading Loading @@ -591,7 +588,7 @@ ivas_error ivas_cpe_dec( #endif pop_wmops(); return error; return IVAS_ERR_OK; } Loading @@ -614,8 +611,6 @@ ivas_error create_cpe_dec( ivas_error error; int32_t cpe_brate; error = IVAS_ERR_OK; /*-----------------------------------------------------------------* * Allocate CPE handle *-----------------------------------------------------------------*/ Loading Loading @@ -891,7 +886,7 @@ ivas_error create_cpe_dec( st_ivas->hCPE[cpe_id] = hCPE; return error; return IVAS_ERR_OK; } Loading lib_dec/ivas_ism_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ ivas_error ivas_ism_dec_config( if ( st_ivas->ini_active_frame != 0 ) { /* ISM bit-rate switching */ if ( ( st_ivas->ism_mode != last_ism_mode ) || ( st_ivas->hDecoderConfig->ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) if ( ( st_ivas->ism_mode != last_ism_mode ) || ( ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK ) Loading lib_dec/ivas_masa_dec.c +71 −65 Original line number Diff line number Diff line Loading @@ -1370,9 +1370,11 @@ ivas_error ivas_masa_dec_reconfigure( { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->total_brate = st_ivas->hCPE[cpe_id]->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ } sts = st_ivas->hCPE[cpe_id]->hCoreCoder; sts[0]->bit_stream = bit_stream + num_bits; num_bits += (int16_t) ( st_ivas->hCPE[cpe_id]->element_brate / FRAMES_PER_SEC ); if ( ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate >= MASA_STEREO_MIN_BITRATE ) || ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == FRAME_NO_DATA ) ) { Loading Loading @@ -1419,10 +1421,10 @@ ivas_error ivas_masa_dec_reconfigure( #endif /* regularization factor is bitrate-dependent */ #ifdef SPLIT_REND_WITH_HEAD_ROT st_ivas->hDiracDecBin[pos_idx]->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); st_ivas->hDiracDecBin[pos_idx]->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, ivas_total_brate ); } #else st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, ivas_total_brate ); #endif } Loading @@ -1439,9 +1441,9 @@ ivas_error ivas_masa_dec_reconfigure( #endif { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin[0]->hTdDecorr ), &( st_ivas->hDiracDecBin[0]->useTdDecorr ) ) ) != IVAS_ERR_OK ) if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin[0]->hTdDecorr ), &( st_ivas->hDiracDecBin[0]->useTdDecorr ) ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) #endif { return error; Loading Loading @@ -1484,7 +1486,10 @@ ivas_error ivas_masa_dec_reconfigure( st_ivas->ism_mode = ISM_MODE_NONE; } { /*-----------------------------------------------------------------* * JBM TC buffers *-----------------------------------------------------------------*/ int16_t tc_nchan_to_allocate; int16_t tc_nchan_transport; TC_BUFFER_MODE buffer_mode_new; Loading @@ -1505,9 +1510,11 @@ ivas_error ivas_masa_dec_reconfigure( { tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS; } if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { n_samples_granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); /* Use the same granularity as tdrend */ if ( n_samples_granularity > st_ivas->hTcBuffer->n_samples_granularity ) { if ( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ) != IVAS_ERR_OK ) Loading Loading @@ -1566,7 +1573,6 @@ ivas_error ivas_masa_dec_reconfigure( st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier; } } } return error; } Loading lib_dec/ivas_mct_dec.c +50 −53 Original line number Diff line number Diff line Loading @@ -1320,7 +1320,6 @@ static ivas_error ivas_mc_dec_reconfig( * JBM TC buffers *-----------------------------------------------------------------*/ { int16_t tc_nchan_full_new; DECODER_TC_BUFFER_HANDLE hTcBuffer; Loading Loading @@ -1381,8 +1380,6 @@ static ivas_error ivas_mc_dec_reconfig( st_ivas->hParamMC->slots_rendered = st_ivas->hTcBuffer->slots_rendered; mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hParamMC->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } } /*-----------------------------------------------------------------* * 'float' output audio buffers Loading lib_dec/ivas_sce_dec.c +4 −8 Original line number Diff line number Diff line Loading @@ -62,11 +62,9 @@ ivas_error ivas_sce_dec( float outputHB[1][L_FRAME48k]; /* 'float' buffer for output HB synthesis, one channel */ SCE_DEC_HANDLE hSCE; Decoder_State *st; int32_t ivas_total_brate, last_ivas_total_brate; int32_t ivas_total_brate; ivas_error error; error = IVAS_ERR_OK; push_wmops( "ivas_sce_dec" ); hSCE = st_ivas->hSCE[sce_id]; Loading @@ -75,7 +73,6 @@ ivas_error ivas_sce_dec( st->BER_detect |= st_ivas->BER_detect; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; if ( st_ivas->ivas_format == ISM_FORMAT ) { Loading @@ -101,7 +98,7 @@ ivas_error ivas_sce_dec( { st->total_brate = FRAME_NO_DATA; } else if ( !st_ivas->bfi && st_ivas->ivas_format != ISM_FORMAT && last_ivas_total_brate <= IVAS_SID_5k2 ) else if ( !st_ivas->bfi && st_ivas->ivas_format != ISM_FORMAT && st_ivas->hDecoderConfig->last_ivas_total_brate <= IVAS_SID_5k2 ) { st->total_brate = hSCE->element_brate - nb_bits_metadata * FRAMES_PER_SEC; } Loading Loading @@ -314,7 +311,7 @@ ivas_error ivas_sce_dec( pop_wmops(); return error; return IVAS_ERR_OK; } Loading @@ -335,7 +332,6 @@ ivas_error create_sce_dec( ivas_error error; int16_t output_frame; error = IVAS_ERR_OK; output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); /*-----------------------------------------------------------------* Loading Loading @@ -430,7 +426,7 @@ ivas_error create_sce_dec( hSCE->hCoreCoder[0] = st; st_ivas->hSCE[sce_id] = hSCE; return error; return IVAS_ERR_OK; } Loading Loading
lib_dec/ivas_cpe_dec.c +2 −7 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ ivas_error ivas_cpe_dec( int32_t cpe_brate; int32_t element_brate_ref; error = IVAS_ERR_OK; push_wmops( "ivas_cpe_dec" ); ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; Loading Loading @@ -181,7 +179,6 @@ ivas_error ivas_cpe_dec( } else { /* Note: This only works for stereo operation. If DTX would be applied for multiple CPEs a different bitrate signaling is needed */ if ( ivas_total_brate <= IVAS_SID_5k2 ) { stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, ivas_total_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); Loading Loading @@ -591,7 +588,7 @@ ivas_error ivas_cpe_dec( #endif pop_wmops(); return error; return IVAS_ERR_OK; } Loading @@ -614,8 +611,6 @@ ivas_error create_cpe_dec( ivas_error error; int32_t cpe_brate; error = IVAS_ERR_OK; /*-----------------------------------------------------------------* * Allocate CPE handle *-----------------------------------------------------------------*/ Loading Loading @@ -891,7 +886,7 @@ ivas_error create_cpe_dec( st_ivas->hCPE[cpe_id] = hCPE; return error; return IVAS_ERR_OK; } Loading
lib_dec/ivas_ism_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ ivas_error ivas_ism_dec_config( if ( st_ivas->ini_active_frame != 0 ) { /* ISM bit-rate switching */ if ( ( st_ivas->ism_mode != last_ism_mode ) || ( st_ivas->hDecoderConfig->ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) if ( ( st_ivas->ism_mode != last_ism_mode ) || ( ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK ) Loading
lib_dec/ivas_masa_dec.c +71 −65 Original line number Diff line number Diff line Loading @@ -1370,9 +1370,11 @@ ivas_error ivas_masa_dec_reconfigure( { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->total_brate = st_ivas->hCPE[cpe_id]->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ } sts = st_ivas->hCPE[cpe_id]->hCoreCoder; sts[0]->bit_stream = bit_stream + num_bits; num_bits += (int16_t) ( st_ivas->hCPE[cpe_id]->element_brate / FRAMES_PER_SEC ); if ( ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate >= MASA_STEREO_MIN_BITRATE ) || ( ivas_total_brate < MASA_STEREO_MIN_BITRATE && last_ivas_total_brate == FRAME_NO_DATA ) ) { Loading Loading @@ -1419,10 +1421,10 @@ ivas_error ivas_masa_dec_reconfigure( #endif /* regularization factor is bitrate-dependent */ #ifdef SPLIT_REND_WITH_HEAD_ROT st_ivas->hDiracDecBin[pos_idx]->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); st_ivas->hDiracDecBin[pos_idx]->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, ivas_total_brate ); } #else st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, ivas_total_brate ); #endif } Loading @@ -1439,9 +1441,9 @@ ivas_error ivas_masa_dec_reconfigure( #endif { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin[0]->hTdDecorr ), &( st_ivas->hDiracDecBin[0]->useTdDecorr ) ) ) != IVAS_ERR_OK ) if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin[0]->hTdDecorr ), &( st_ivas->hDiracDecBin[0]->useTdDecorr ) ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) #endif { return error; Loading Loading @@ -1484,7 +1486,10 @@ ivas_error ivas_masa_dec_reconfigure( st_ivas->ism_mode = ISM_MODE_NONE; } { /*-----------------------------------------------------------------* * JBM TC buffers *-----------------------------------------------------------------*/ int16_t tc_nchan_to_allocate; int16_t tc_nchan_transport; TC_BUFFER_MODE buffer_mode_new; Loading @@ -1505,9 +1510,11 @@ ivas_error ivas_masa_dec_reconfigure( { tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS; } if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) { n_samples_granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); /* Use the same granularity as tdrend */ if ( n_samples_granularity > st_ivas->hTcBuffer->n_samples_granularity ) { if ( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ) != IVAS_ERR_OK ) Loading Loading @@ -1566,7 +1573,6 @@ ivas_error ivas_masa_dec_reconfigure( st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier; } } } return error; } Loading
lib_dec/ivas_mct_dec.c +50 −53 Original line number Diff line number Diff line Loading @@ -1320,7 +1320,6 @@ static ivas_error ivas_mc_dec_reconfig( * JBM TC buffers *-----------------------------------------------------------------*/ { int16_t tc_nchan_full_new; DECODER_TC_BUFFER_HANDLE hTcBuffer; Loading Loading @@ -1381,8 +1380,6 @@ static ivas_error ivas_mc_dec_reconfig( st_ivas->hParamMC->slots_rendered = st_ivas->hTcBuffer->slots_rendered; mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hParamMC->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } } /*-----------------------------------------------------------------* * 'float' output audio buffers Loading
lib_dec/ivas_sce_dec.c +4 −8 Original line number Diff line number Diff line Loading @@ -62,11 +62,9 @@ ivas_error ivas_sce_dec( float outputHB[1][L_FRAME48k]; /* 'float' buffer for output HB synthesis, one channel */ SCE_DEC_HANDLE hSCE; Decoder_State *st; int32_t ivas_total_brate, last_ivas_total_brate; int32_t ivas_total_brate; ivas_error error; error = IVAS_ERR_OK; push_wmops( "ivas_sce_dec" ); hSCE = st_ivas->hSCE[sce_id]; Loading @@ -75,7 +73,6 @@ ivas_error ivas_sce_dec( st->BER_detect |= st_ivas->BER_detect; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; if ( st_ivas->ivas_format == ISM_FORMAT ) { Loading @@ -101,7 +98,7 @@ ivas_error ivas_sce_dec( { st->total_brate = FRAME_NO_DATA; } else if ( !st_ivas->bfi && st_ivas->ivas_format != ISM_FORMAT && last_ivas_total_brate <= IVAS_SID_5k2 ) else if ( !st_ivas->bfi && st_ivas->ivas_format != ISM_FORMAT && st_ivas->hDecoderConfig->last_ivas_total_brate <= IVAS_SID_5k2 ) { st->total_brate = hSCE->element_brate - nb_bits_metadata * FRAMES_PER_SEC; } Loading Loading @@ -314,7 +311,7 @@ ivas_error ivas_sce_dec( pop_wmops(); return error; return IVAS_ERR_OK; } Loading @@ -335,7 +332,6 @@ ivas_error create_sce_dec( ivas_error error; int16_t output_frame; error = IVAS_ERR_OK; output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); /*-----------------------------------------------------------------* Loading Loading @@ -430,7 +426,7 @@ ivas_error create_sce_dec( hSCE->hCoreCoder[0] = st; st_ivas->hSCE[sce_id] = hSCE; return error; return IVAS_ERR_OK; } Loading