Loading lib_com/ivas_agc_com.c +30 −0 Original line number Diff line number Diff line Loading @@ -134,3 +134,33 @@ int16_t ivas_agc_debug_inout( FILE *inStream, float **in, int16_t n_channels, in return FALSE; } #endif #ifdef AGC_FLAG_DISABLE /*-----------------------------------------------------------------------------------------* * Function ivas_agc_enc_get_flag() * * This function determines if AGC is enabled or disabled. *-----------------------------------------------------------------------------------------*/ /*! r: AGC enable flag */ int16_t ivas_agc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ) { int16_t agc_flag; /* AGC is enabled only if there is one transport channel. */ agc_flag = (int16_t) ( nchan_transport == 1 ); #ifdef DEBUG_AGC_ENCODER_CMD_OPTION /* If agc_configuration is not undefined, then this value decides on the state of * enablement, otherwise AGC is enabled only if there is one transport channel. */ agc_flag = ( agc_configuration != SBA_AGC_DEFAULT ) ? agc_configuration : agc_flag; #endif return agc_flag; } #endif lib_com/ivas_prot.h +10 −1 Original line number Diff line number Diff line Loading @@ -4368,12 +4368,21 @@ void ivas_sba_prototype_renderer_sf( /* AGC */ /*! r: AGC enable flag */ #ifdef AGC_FLAG_DISABLE int16_t ivas_agc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ); #else int16_t ivas_agc_enc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ); #endif ivas_error ivas_spar_agc_enc_open( ivas_agc_enc_state_t **hAgcEnc, /* i/o: AGC decoder handle */ Loading lib_com/options.h +2 −1 Original line number Diff line number Diff line Loading @@ -125,8 +125,9 @@ #endif /*#define SPAR_HOA_DBG*/ /* SPAR HOA debug statements */ /*#define DEBUG_BINAURAL_FILTER_DESIGN*/ /* debugging of Crend binaural filter design */ #define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ //#define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ #define DEBUG_JBM_CMD_OPTION /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */ #define AGC_FLAG_DISABLE /* to remove the AGC flag bit from the bitstream for the cases where AGC is now disabled */ #endif /* #################### End DEBUGGING switches ############################ */ Loading lib_dec/ivas_spar_decoder.c +11 −0 Original line number Diff line number Diff line Loading @@ -784,7 +784,18 @@ static void ivas_spar_dec_MD( if ( ivas_total_brate > IVAS_SID_5k2 && !bfi && hSpar->hMdDec->dtx_vad ) { #ifdef AGC_FLAG_DISABLE if ( ivas_agc_get_flag( hSpar->hMdDec->spar_md_cfg.nchan_transport ) != 0 ) { hSpar->AGC_flag = get_next_indice( st0, 1 ); } else { hSpar->AGC_flag = ivas_agc_get_flag( hSpar->hMdDec->spar_md_cfg.nchan_transport ); } #else hSpar->AGC_flag = get_next_indice( st0, 1 ); #endif ivas_agc_read_bits( hSpar->hAgcDec, st0, hSpar->hMdDec->spar_md_cfg.nchan_transport, hSpar->AGC_flag ); } Loading lib_enc/ivas_agc_enc.c +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ extern FILE *agcOut; static int16_t ivas_agc_writeBits( FILE *stream, const int16_t n_channels, ivas_agc_enc_state_t *pState ); #endif #ifndef AGC_FLAG_DISABLE /*-----------------------------------------------------------------------------------------* * Function ivas_agc_enc_get_flag() * Loading Loading @@ -87,6 +87,7 @@ int16_t ivas_agc_enc_get_flag( return agc_flag; } #endif /*-----------------------------------------------------------------------------------------* Loading Loading
lib_com/ivas_agc_com.c +30 −0 Original line number Diff line number Diff line Loading @@ -134,3 +134,33 @@ int16_t ivas_agc_debug_inout( FILE *inStream, float **in, int16_t n_channels, in return FALSE; } #endif #ifdef AGC_FLAG_DISABLE /*-----------------------------------------------------------------------------------------* * Function ivas_agc_enc_get_flag() * * This function determines if AGC is enabled or disabled. *-----------------------------------------------------------------------------------------*/ /*! r: AGC enable flag */ int16_t ivas_agc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ) { int16_t agc_flag; /* AGC is enabled only if there is one transport channel. */ agc_flag = (int16_t) ( nchan_transport == 1 ); #ifdef DEBUG_AGC_ENCODER_CMD_OPTION /* If agc_configuration is not undefined, then this value decides on the state of * enablement, otherwise AGC is enabled only if there is one transport channel. */ agc_flag = ( agc_configuration != SBA_AGC_DEFAULT ) ? agc_configuration : agc_flag; #endif return agc_flag; } #endif
lib_com/ivas_prot.h +10 −1 Original line number Diff line number Diff line Loading @@ -4368,12 +4368,21 @@ void ivas_sba_prototype_renderer_sf( /* AGC */ /*! r: AGC enable flag */ #ifdef AGC_FLAG_DISABLE int16_t ivas_agc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ); #else int16_t ivas_agc_enc_get_flag( #ifdef DEBUG_AGC_ENCODER_CMD_OPTION int16_t agc_configuration, /* i : AGC configuration from command-line */ #endif int16_t nchan_transport /* i : number of transport channels */ ); #endif ivas_error ivas_spar_agc_enc_open( ivas_agc_enc_state_t **hAgcEnc, /* i/o: AGC decoder handle */ Loading
lib_com/options.h +2 −1 Original line number Diff line number Diff line Loading @@ -125,8 +125,9 @@ #endif /*#define SPAR_HOA_DBG*/ /* SPAR HOA debug statements */ /*#define DEBUG_BINAURAL_FILTER_DESIGN*/ /* debugging of Crend binaural filter design */ #define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ //#define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ #define DEBUG_JBM_CMD_OPTION /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */ #define AGC_FLAG_DISABLE /* to remove the AGC flag bit from the bitstream for the cases where AGC is now disabled */ #endif /* #################### End DEBUGGING switches ############################ */ Loading
lib_dec/ivas_spar_decoder.c +11 −0 Original line number Diff line number Diff line Loading @@ -784,7 +784,18 @@ static void ivas_spar_dec_MD( if ( ivas_total_brate > IVAS_SID_5k2 && !bfi && hSpar->hMdDec->dtx_vad ) { #ifdef AGC_FLAG_DISABLE if ( ivas_agc_get_flag( hSpar->hMdDec->spar_md_cfg.nchan_transport ) != 0 ) { hSpar->AGC_flag = get_next_indice( st0, 1 ); } else { hSpar->AGC_flag = ivas_agc_get_flag( hSpar->hMdDec->spar_md_cfg.nchan_transport ); } #else hSpar->AGC_flag = get_next_indice( st0, 1 ); #endif ivas_agc_read_bits( hSpar->hAgcDec, st0, hSpar->hMdDec->spar_md_cfg.nchan_transport, hSpar->AGC_flag ); } Loading
lib_enc/ivas_agc_enc.c +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ extern FILE *agcOut; static int16_t ivas_agc_writeBits( FILE *stream, const int16_t n_channels, ivas_agc_enc_state_t *pState ); #endif #ifndef AGC_FLAG_DISABLE /*-----------------------------------------------------------------------------------------* * Function ivas_agc_enc_get_flag() * Loading Loading @@ -87,6 +87,7 @@ int16_t ivas_agc_enc_get_flag( return agc_flag; } #endif /*-----------------------------------------------------------------------------------------* Loading