Loading apps/decoder.c +1 −1 Original line number Diff line number Diff line Loading @@ -810,7 +810,7 @@ cleanup: #endif } #ifdef FIX_1990_SANITIZER_IN_REVERB_LOAD #ifdef FIX_1990_SANITIZER_IN_REVERB_LOADaa // TODO: /* This free differs from float version and is done always. This should be safe to do even though we leave a return * value as not handled. This is needed as HRTF statistics from ROM are currently converted from float values. */ Loading lib_dec/lib_dec_fx.c +4 −124 Original line number Diff line number Diff line Loading @@ -1626,136 +1626,16 @@ static ivas_error IVAS_DEC_Setup( * - reconfigure the decoder when the number of TC or IVAS total bitrate change *----------------------------------------------------------------*/ #if 1 if ( st_ivas->bfi == 0 ) { if ( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) { return error; } } #else IF( st_ivas->bfi == 0 ) { Word32 ivas_total_brate; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src = 0; move16(); test(); test(); test(); test(); test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && ( !( st_ivas->ini_active_frame == 0 && NE_32( ivas_total_brate, FRAME_NO_DATA ) && LT_32( ivas_total_brate, MASA_STEREO_MIN_BITRATE ) && EQ_16( st_ivas->nCPE, 1 ) ) ) && st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 1] && st_ivas->ivas_format == MASA_FORMAT && st_ivas->last_ivas_format != MASA_FORMAT && ( ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) && st_ivas->ini_active_frame == 0 ) ) { IF( st_ivas->hSpar ) { Word16 Q_tmp = getScaleFactor16( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16 ); Scale_sig( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16, sub( Q_tmp, st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q ) ); st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q = Q_tmp; } } test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && EQ_16( (Word16) st_ivas->ivas_format, MASA_ISM_FORMAT ) && GT_16( st_ivas->ini_frame, 0 ) && ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) && st_ivas->ini_active_frame == 0 ) { IF( st_ivas->hSpar ) { Word16 Q_tmp = getScaleFactor16( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16 ); Scale_sig( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16, sub( Q_tmp, st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q ) ); st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q = Q_tmp; move16(); } } #ifdef FIX_HRTF_LOAD IF( NE_32( ( error = ivas_dec_setup( st_ivas ) ), IVAS_ERR_OK ) ) #else IF( NE_32( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, data ) ), IVAS_ERR_OK ) ) #endif IF( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) { return error; } test(); IF( ( st_ivas->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_PARAMMC ) ) { MC_LS_SETUP mc_ls_setup; mc_ls_setup = ivas_mc_map_output_config_to_mc_ls_setup_fx( st_ivas->transport_config ); st_ivas->nchan_transport = ivas_param_mc_getNumTransportChannels_fx( ivas_total_brate, mc_ls_setup ); } test(); test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && ( !( st_ivas->ini_active_frame == 0 && NE_32( ivas_total_brate, FRAME_NO_DATA ) && LT_32( ivas_total_brate, MASA_STEREO_MIN_BITRATE ) && EQ_16( st_ivas->nCPE, 1 ) ) ) && st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 1] && st_ivas->ivas_format == MASA_FORMAT && ( ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) || st_ivas->ini_active_frame == 0 ) ) { IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) { Word16 nchan_rend = num_src; IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) ) { 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; move16(); } TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p; SrcSpatial_p->q_Pos_p = Q31; move16(); } } } test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && EQ_16( (Word16) st_ivas->ivas_format, MASA_ISM_FORMAT ) && st_ivas->ini_frame > 0 && ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) && st_ivas->ini_active_frame == 0 ) { IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) { Word16 nchan_rend = num_src; test(); IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) ) { 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; move16(); } TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p; SrcSpatial_p->q_Pos_p = Q31; move16(); } } } } #ifdef DEBUGGING int16_t a = 0; // this is just to help the clang-formatting keep alignments correct #endif } *nTransportChannels = (UWord8) st_ivas->hTcBuffer->nchan_transport_jbm; *nTcBufferGranularity = (UWord16) st_ivas->hTcBuffer->n_samples_granularity; Loading Loading
apps/decoder.c +1 −1 Original line number Diff line number Diff line Loading @@ -810,7 +810,7 @@ cleanup: #endif } #ifdef FIX_1990_SANITIZER_IN_REVERB_LOAD #ifdef FIX_1990_SANITIZER_IN_REVERB_LOADaa // TODO: /* This free differs from float version and is done always. This should be safe to do even though we leave a return * value as not handled. This is needed as HRTF statistics from ROM are currently converted from float values. */ Loading
lib_dec/lib_dec_fx.c +4 −124 Original line number Diff line number Diff line Loading @@ -1626,136 +1626,16 @@ static ivas_error IVAS_DEC_Setup( * - reconfigure the decoder when the number of TC or IVAS total bitrate change *----------------------------------------------------------------*/ #if 1 if ( st_ivas->bfi == 0 ) { if ( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) { return error; } } #else IF( st_ivas->bfi == 0 ) { Word32 ivas_total_brate; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src = 0; move16(); test(); test(); test(); test(); test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && ( !( st_ivas->ini_active_frame == 0 && NE_32( ivas_total_brate, FRAME_NO_DATA ) && LT_32( ivas_total_brate, MASA_STEREO_MIN_BITRATE ) && EQ_16( st_ivas->nCPE, 1 ) ) ) && st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 1] && st_ivas->ivas_format == MASA_FORMAT && st_ivas->last_ivas_format != MASA_FORMAT && ( ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) && st_ivas->ini_active_frame == 0 ) ) { IF( st_ivas->hSpar ) { Word16 Q_tmp = getScaleFactor16( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16 ); Scale_sig( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16, sub( Q_tmp, st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q ) ); st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q = Q_tmp; } } test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && EQ_16( (Word16) st_ivas->ivas_format, MASA_ISM_FORMAT ) && GT_16( st_ivas->ini_frame, 0 ) && ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) && st_ivas->ini_active_frame == 0 ) { IF( st_ivas->hSpar ) { Word16 Q_tmp = getScaleFactor16( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16 ); Scale_sig( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 16, sub( Q_tmp, st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q ) ); st_ivas->hSpar->hFbMixer->cldfb_cross_fade_q = Q_tmp; move16(); } } #ifdef FIX_HRTF_LOAD IF( NE_32( ( error = ivas_dec_setup( st_ivas ) ), IVAS_ERR_OK ) ) #else IF( NE_32( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, data ) ), IVAS_ERR_OK ) ) #endif IF( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) { return error; } test(); IF( ( st_ivas->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_PARAMMC ) ) { MC_LS_SETUP mc_ls_setup; mc_ls_setup = ivas_mc_map_output_config_to_mc_ls_setup_fx( st_ivas->transport_config ); st_ivas->nchan_transport = ivas_param_mc_getNumTransportChannels_fx( ivas_total_brate, mc_ls_setup ); } test(); test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && ( !( st_ivas->ini_active_frame == 0 && NE_32( ivas_total_brate, FRAME_NO_DATA ) && LT_32( ivas_total_brate, MASA_STEREO_MIN_BITRATE ) && EQ_16( st_ivas->nCPE, 1 ) ) ) && st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 1] && st_ivas->ivas_format == MASA_FORMAT && ( ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) || st_ivas->ini_active_frame == 0 ) ) { IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) { Word16 nchan_rend = num_src; IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) ) { 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; move16(); } TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p; SrcSpatial_p->q_Pos_p = Q31; move16(); } } } test(); test(); test(); test(); test(); IF( is_DTXrate( ivas_total_brate ) == 0 && EQ_16( (Word16) st_ivas->ivas_format, MASA_ISM_FORMAT ) && st_ivas->ini_frame > 0 && ( GT_32( ivas_total_brate, IVAS_SID_5k2 ) && NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) && st_ivas->ini_active_frame == 0 ) { IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) { Word16 nchan_rend = num_src; test(); IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) ) { 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; move16(); } TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p; SrcSpatial_p->q_Pos_p = Q31; move16(); } } } } #ifdef DEBUGGING int16_t a = 0; // this is just to help the clang-formatting keep alignments correct #endif } *nTransportChannels = (UWord8) st_ivas->hTcBuffer->nchan_transport_jbm; *nTcBufferGranularity = (UWord16) st_ivas->hTcBuffer->n_samples_granularity; Loading