Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define OPT_MCT_ENC_V2_NBE #define OPT_MCT_ENC_V1_NBE #define OPT_MCT_ENC_V1_BE #define OPT_SBA_REND_V1_BE Loading lib_enc/tcx_utils_enc_fx.c +31 −0 Original line number Diff line number Diff line Loading @@ -1355,23 +1355,37 @@ void tcx_scalar_quantization_ivas_fx( { Word16 i, tmp16, s; Word32 tmp32, offs32; #ifdef OPT_MCT_ENC_V2_NBE Word32 offs32_1; Word32 offset_Q16 = L_shl( offset, 1 ); // Q16 #endif /* common exponent for x and gain for comparison */ tmp16 = sub( gain_e, x_e ); #ifdef OPT_MCT_ENC_V2_NBE tmp32 = L_shl_sat( L_deposit_h( gain ), tmp16 ); // exp:x_e #else tmp32 = L_shl( L_deposit_h( gain ), s_max( -31, s_min( tmp16, 0 ) ) ); tmp16 = negate( s_max( tmp16, 0 ) ); #endif i = sub( L_frame, 1 ); IF( memQuantZeros_fx != NULL ) { test(); #ifdef OPT_MCT_ENC_V2_NBE FOR( ; ( ( memQuantZeros_fx[i] != 0 ) && ( L_abs( x[i] ) < tmp32 ) ); i-- ) #else WHILE( ( memQuantZeros_fx[i] != 0 ) && ( LT_32( L_abs( L_shl( x[i], tmp16 ) ), tmp32 ) ) ) #endif { test(); xq[i] = 0; move16(); #ifndef OPT_MCT_ENC_V2_NBE i = sub( i, 1 ); #endif } } Loading @@ -1394,6 +1408,22 @@ void tcx_scalar_quantization_ivas_fx( FOR( ; i >= 0; i-- ) { #ifdef OPT_MCT_ENC_V2_NBE offs32 = Mpy_32_16_1( x[i], gain ); offs32 = L_shl_sat( offs32, s ); /* convert to 15Q16 */ offs32_1 = L_add_sat( offs32, offset_Q16 ); /*15Q16 */ tmp16 = extract_h( offs32_1 ); IF( x[i] < 0 ) { offs32 = L_sub_sat( offs32, offset_Q16 ); /*15Q16 */ tmp16 = extract_h( offs32 ); if ( L_mac_sat( offs32, tmp16, -ONE_IN_Q15 ) > 0 ) { tmp16 = add( tmp16, 1 ); } } #else offs32 = Mpy_32_16_1( x[i], gain ); /* multiply */ offs32 = L_shl_sat( offs32, s ); /* convert to 15Q16 */ IF( x[i] > 0 ) Loading @@ -1414,6 +1444,7 @@ void tcx_scalar_quantization_ivas_fx( tmp16 = add( tmp16, 1 ); } } #endif xq[i] = tmp16; move16(); } Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define OPT_MCT_ENC_V2_NBE #define OPT_MCT_ENC_V1_NBE #define OPT_MCT_ENC_V1_BE #define OPT_SBA_REND_V1_BE Loading
lib_enc/tcx_utils_enc_fx.c +31 −0 Original line number Diff line number Diff line Loading @@ -1355,23 +1355,37 @@ void tcx_scalar_quantization_ivas_fx( { Word16 i, tmp16, s; Word32 tmp32, offs32; #ifdef OPT_MCT_ENC_V2_NBE Word32 offs32_1; Word32 offset_Q16 = L_shl( offset, 1 ); // Q16 #endif /* common exponent for x and gain for comparison */ tmp16 = sub( gain_e, x_e ); #ifdef OPT_MCT_ENC_V2_NBE tmp32 = L_shl_sat( L_deposit_h( gain ), tmp16 ); // exp:x_e #else tmp32 = L_shl( L_deposit_h( gain ), s_max( -31, s_min( tmp16, 0 ) ) ); tmp16 = negate( s_max( tmp16, 0 ) ); #endif i = sub( L_frame, 1 ); IF( memQuantZeros_fx != NULL ) { test(); #ifdef OPT_MCT_ENC_V2_NBE FOR( ; ( ( memQuantZeros_fx[i] != 0 ) && ( L_abs( x[i] ) < tmp32 ) ); i-- ) #else WHILE( ( memQuantZeros_fx[i] != 0 ) && ( LT_32( L_abs( L_shl( x[i], tmp16 ) ), tmp32 ) ) ) #endif { test(); xq[i] = 0; move16(); #ifndef OPT_MCT_ENC_V2_NBE i = sub( i, 1 ); #endif } } Loading @@ -1394,6 +1408,22 @@ void tcx_scalar_quantization_ivas_fx( FOR( ; i >= 0; i-- ) { #ifdef OPT_MCT_ENC_V2_NBE offs32 = Mpy_32_16_1( x[i], gain ); offs32 = L_shl_sat( offs32, s ); /* convert to 15Q16 */ offs32_1 = L_add_sat( offs32, offset_Q16 ); /*15Q16 */ tmp16 = extract_h( offs32_1 ); IF( x[i] < 0 ) { offs32 = L_sub_sat( offs32, offset_Q16 ); /*15Q16 */ tmp16 = extract_h( offs32 ); if ( L_mac_sat( offs32, tmp16, -ONE_IN_Q15 ) > 0 ) { tmp16 = add( tmp16, 1 ); } } #else offs32 = Mpy_32_16_1( x[i], gain ); /* multiply */ offs32 = L_shl_sat( offs32, s ); /* convert to 15Q16 */ IF( x[i] > 0 ) Loading @@ -1414,6 +1444,7 @@ void tcx_scalar_quantization_ivas_fx( tmp16 = add( tmp16, 1 ); } } #endif xq[i] = tmp16; move16(); } Loading