Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ #define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */ #define FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* Ericsson: premature cast to unsigned detected by USAN corrected */ /* #################### End BE switches ################################## */ Loading lib_dec/pvq_core_dec.c +0 −14 Original line number Diff line number Diff line Loading @@ -114,17 +114,11 @@ static void pvq_decode_band( for ( j = 0; j < Np; j++ ) { g_part[j] = -( (float) g_part_s[j] ) / 32768; #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* note: here g_part needs to be become exactly 1.0(float) thus in BASOP Word16 g_part_s is in the negative Q15 domain */ #endif #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* aligned to BASOP to avoid USAN undefined negation warning for -(-32768) */ g_part_s[j] = negate( g_part_s[j] ); #else g_part_s[j] = -g_part_s[j]; #endif } Loading Loading @@ -434,11 +428,7 @@ static void densitySymbolIndexDecode( { tot = res * ( res + 1 ) + 1; dec_freq = rc_decode( &st->BER_detect, hPVQ, tot ); #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR alpha = (int16_t) floor_sqrt_exact( (uint32_t) ( ( res + 1 ) * ( res + 1 ) - dec_freq ) ) + res + 1; #else alpha = (int16_t) floor_sqrt_exact( (uint32_t) ( res + 1 ) * ( res + 1 ) - dec_freq ) + res + 1; #endif sym_freq = 2 * ( res - alpha ) + 1; cum_freq = alpha * ( 2 * ( res + 1 ) - alpha ); } Loading @@ -456,11 +446,7 @@ static void densitySymbolIndexDecode( dec_freq = rc_decode( &st->BER_detect, hPVQ, tot ); if ( dec_freq < tot - ( res + 1 ) - ( res - ( c + 1 ) ) * ( res - c ) * c + c + 1 ) { #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR alpha = ( res_c - 1 + (int16_t) floor_sqrt_exact( (uint32_t) ( res_c * ( res_c + 4 * dec_freq - 2 ) + 1 ) ) ) / ( 2 * res_c ); #else alpha = ( res_c - 1 + (int16_t) floor_sqrt_exact( (uint32_t) res_c * ( res_c + 4 * dec_freq - 2 ) + 1 ) ) / ( 2 * res_c ); #endif sym_freq = 2 * alpha * res_c + 1; cum_freq = alpha * ( ( alpha - 1 ) * res_c + 1 ); Loading lib_enc/pvq_core_enc.c +0 −4 Original line number Diff line number Diff line Loading @@ -124,12 +124,8 @@ static void pvq_encode_band( for ( j = 0; j < Np; j++ ) { g_part[j] = -( (float) g_part_s[j] ) / 32768; #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* aligned to BASOP to avoid USAN undefined negation warning with -(-32768) */ g_part_s[j] = negate( g_part_s[j] ); #else g_part_s[j] = -g_part_s[j]; #endif } srt_vec_ind( g_part_s, sg_part, idx_sort, Np ); Loading Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ #define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */ #define FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* Ericsson: premature cast to unsigned detected by USAN corrected */ /* #################### End BE switches ################################## */ Loading
lib_dec/pvq_core_dec.c +0 −14 Original line number Diff line number Diff line Loading @@ -114,17 +114,11 @@ static void pvq_decode_band( for ( j = 0; j < Np; j++ ) { g_part[j] = -( (float) g_part_s[j] ) / 32768; #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* note: here g_part needs to be become exactly 1.0(float) thus in BASOP Word16 g_part_s is in the negative Q15 domain */ #endif #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* aligned to BASOP to avoid USAN undefined negation warning for -(-32768) */ g_part_s[j] = negate( g_part_s[j] ); #else g_part_s[j] = -g_part_s[j]; #endif } Loading Loading @@ -434,11 +428,7 @@ static void densitySymbolIndexDecode( { tot = res * ( res + 1 ) + 1; dec_freq = rc_decode( &st->BER_detect, hPVQ, tot ); #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR alpha = (int16_t) floor_sqrt_exact( (uint32_t) ( ( res + 1 ) * ( res + 1 ) - dec_freq ) ) + res + 1; #else alpha = (int16_t) floor_sqrt_exact( (uint32_t) ( res + 1 ) * ( res + 1 ) - dec_freq ) + res + 1; #endif sym_freq = 2 * ( res - alpha ) + 1; cum_freq = alpha * ( 2 * ( res + 1 ) - alpha ); } Loading @@ -456,11 +446,7 @@ static void densitySymbolIndexDecode( dec_freq = rc_decode( &st->BER_detect, hPVQ, tot ); if ( dec_freq < tot - ( res + 1 ) - ( res - ( c + 1 ) ) * ( res - c ) * c + c + 1 ) { #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR alpha = ( res_c - 1 + (int16_t) floor_sqrt_exact( (uint32_t) ( res_c * ( res_c + 4 * dec_freq - 2 ) + 1 ) ) ) / ( 2 * res_c ); #else alpha = ( res_c - 1 + (int16_t) floor_sqrt_exact( (uint32_t) res_c * ( res_c + 4 * dec_freq - 2 ) + 1 ) ) / ( 2 * res_c ); #endif sym_freq = 2 * alpha * res_c + 1; cum_freq = alpha * ( ( alpha - 1 ) * res_c + 1 ); Loading
lib_enc/pvq_core_enc.c +0 −4 Original line number Diff line number Diff line Loading @@ -124,12 +124,8 @@ static void pvq_encode_band( for ( j = 0; j < Np; j++ ) { g_part[j] = -( (float) g_part_s[j] ) / 32768; #ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR /* aligned to BASOP to avoid USAN undefined negation warning with -(-32768) */ g_part_s[j] = negate( g_part_s[j] ); #else g_part_s[j] = -g_part_s[j]; #endif } srt_vec_ind( g_part_s, sg_part, idx_sort, Np ); Loading