Loading lib_com/ivas_omasa_com.c +28 −2 Original line number Diff line number Diff line Loading @@ -335,11 +335,22 @@ int32_t ivas_interformat_brate( void ivas_combined_format_brate_sanity( const int32_t element_brate, /* i : element bitrate */ const int16_t core, /* i : core */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ const int32_t total_brate, /* i : total bitrate */ #endif int32_t *core_brate, /* i/o: core bitrate */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ int16_t *inactive_coder_type_flag, /* o : inactive coder_type flag */ #endif int16_t *diff_nBits /* o : number of differential bits */ ) { int16_t limit_high, nBits; #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ int32_t brate_diff; brate_diff = total_brate - *core_brate; #endif /* sanity check: at lowest IVAS bit-rates and one ISM channel coded by low-rate core-coder mode, it can happen that the CPE (MASA) bit-budget Loading @@ -364,6 +375,21 @@ void ivas_combined_format_brate_sanity( } } #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ /*-----------------------------------------------------------------* * set inactive coder_type flag in ACELP core *-----------------------------------------------------------------*/ if ( core == ACELP_CORE ) { *inactive_coder_type_flag = 0; /* AVQ by default */ if ( *core_brate + brate_diff <= MAX_GSC_INACTIVE_BRATE ) { *inactive_coder_type_flag = 1; /* GSC */ } } #endif return; } Loading lib_com/ivas_prot.h +6 −0 Original line number Diff line number Diff line Loading @@ -5805,7 +5805,13 @@ int32_t ivas_interformat_brate( void ivas_combined_format_brate_sanity( const int32_t element_brate, /* i : element bitrate */ const int16_t core, /* i : core */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ const int32_t total_brate, /* i : total bitrate */ #endif int32_t *core_brate, /* i/o: core bitrate */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ int16_t *inactive_coder_type_flag, /* o : inactive coder_type flag */ #endif int16_t *diff_nBits /* o : number of differential bits */ ); Loading lib_dec/ivas_core_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -280,7 +280,11 @@ ivas_error ivas_core_dec( if ( hCPE != NULL && hCPE->element_mode == IVAS_CPE_DFT && hCPE->brate_surplus > 0 ) { #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &tmps ); #else ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, &( sts[0]->core_brate ), &tmps ); #endif } /*------------------------------------------------------------------* Loading lib_enc/ivas_core_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -196,7 +196,11 @@ ivas_error ivas_core_enc( diff_nBits = 0; if ( hCPE != NULL && hCPE->element_mode == IVAS_CPE_DFT && hCPE->brate_surplus > 0 ) { #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &diff_nBits ); #else ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, &( sts[0]->core_brate ), &diff_nBits ); #endif } /*---------------------------------------------------------------------* Loading Loading
lib_com/ivas_omasa_com.c +28 −2 Original line number Diff line number Diff line Loading @@ -335,11 +335,22 @@ int32_t ivas_interformat_brate( void ivas_combined_format_brate_sanity( const int32_t element_brate, /* i : element bitrate */ const int16_t core, /* i : core */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ const int32_t total_brate, /* i : total bitrate */ #endif int32_t *core_brate, /* i/o: core bitrate */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ int16_t *inactive_coder_type_flag, /* o : inactive coder_type flag */ #endif int16_t *diff_nBits /* o : number of differential bits */ ) { int16_t limit_high, nBits; #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ int32_t brate_diff; brate_diff = total_brate - *core_brate; #endif /* sanity check: at lowest IVAS bit-rates and one ISM channel coded by low-rate core-coder mode, it can happen that the CPE (MASA) bit-budget Loading @@ -364,6 +375,21 @@ void ivas_combined_format_brate_sanity( } } #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ /*-----------------------------------------------------------------* * set inactive coder_type flag in ACELP core *-----------------------------------------------------------------*/ if ( core == ACELP_CORE ) { *inactive_coder_type_flag = 0; /* AVQ by default */ if ( *core_brate + brate_diff <= MAX_GSC_INACTIVE_BRATE ) { *inactive_coder_type_flag = 1; /* GSC */ } } #endif return; } Loading
lib_com/ivas_prot.h +6 −0 Original line number Diff line number Diff line Loading @@ -5805,7 +5805,13 @@ int32_t ivas_interformat_brate( void ivas_combined_format_brate_sanity( const int32_t element_brate, /* i : element bitrate */ const int16_t core, /* i : core */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ const int32_t total_brate, /* i : total bitrate */ #endif int32_t *core_brate, /* i/o: core bitrate */ #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ int16_t *inactive_coder_type_flag, /* o : inactive coder_type flag */ #endif int16_t *diff_nBits /* o : number of differential bits */ ); Loading
lib_dec/ivas_core_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -280,7 +280,11 @@ ivas_error ivas_core_dec( if ( hCPE != NULL && hCPE->element_mode == IVAS_CPE_DFT && hCPE->brate_surplus > 0 ) { #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &tmps ); #else ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, &( sts[0]->core_brate ), &tmps ); #endif } /*------------------------------------------------------------------* Loading
lib_enc/ivas_core_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -196,7 +196,11 @@ ivas_error ivas_core_enc( diff_nBits = 0; if ( hCPE != NULL && hCPE->element_mode == IVAS_CPE_DFT && hCPE->brate_surplus > 0 ) { #ifdef NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &diff_nBits ); #else ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, &( sts[0]->core_brate ), &diff_nBits ); #endif } /*---------------------------------------------------------------------* Loading