common_audio/signal_processing: Remove unused macros WEBRTC_SPL_GET_BYTE and WEBRTC_SPL_SET_BYTE
These two macros are not used anywhere in webrtc. Previously used in old neteq (I think). BUG=3348,3353 TESTED=manually on linux and trybots R=tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/18149004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6916 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
8a2c84f59d
commit
b5ab52d010
@ -36,19 +36,6 @@
|
||||
#define WEBRTC_SPL_ABS_W32(a) \
|
||||
(((int32_t)a >= 0) ? ((int32_t)a) : -((int32_t)a))
|
||||
|
||||
#ifdef WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
#define WEBRTC_SPL_GET_BYTE(a, nr) (((int8_t *)a)[nr])
|
||||
#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \
|
||||
(((int8_t *)d_ptr)[index] = (val))
|
||||
#else
|
||||
#define WEBRTC_SPL_GET_BYTE(a, nr) \
|
||||
((((int16_t *)a)[nr >> 1]) >> (((nr + 1) & 0x1) * 8) & 0x00ff)
|
||||
#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \
|
||||
((int16_t *)d_ptr)[index >> 1] = \
|
||||
((((int16_t *)d_ptr)[index >> 1]) \
|
||||
& (0x00ff << (8 * ((index) & 0x1)))) | (val << (8 * ((index + 1) & 0x1)))
|
||||
#endif
|
||||
|
||||
#define WEBRTC_SPL_MUL(a, b) \
|
||||
((int32_t) ((int32_t)(a) * (int32_t)(b)))
|
||||
#define WEBRTC_SPL_UMUL(a, b) \
|
||||
|
@ -30,17 +30,12 @@ TEST_F(SplTest, MacroTest) {
|
||||
int B = 21;
|
||||
int a = -3;
|
||||
int b = WEBRTC_SPL_WORD32_MAX;
|
||||
int nr = 2;
|
||||
int d_ptr2 = 0;
|
||||
|
||||
EXPECT_EQ(10, WEBRTC_SPL_MIN(A, B));
|
||||
EXPECT_EQ(21, WEBRTC_SPL_MAX(A, B));
|
||||
|
||||
EXPECT_EQ(3, WEBRTC_SPL_ABS_W16(a));
|
||||
EXPECT_EQ(3, WEBRTC_SPL_ABS_W32(a));
|
||||
EXPECT_EQ(0, WEBRTC_SPL_GET_BYTE(&B, nr));
|
||||
WEBRTC_SPL_SET_BYTE(&d_ptr2, 1, nr);
|
||||
EXPECT_EQ(65536, d_ptr2);
|
||||
|
||||
EXPECT_EQ(-63, WEBRTC_SPL_MUL(a, B));
|
||||
EXPECT_EQ(-2147483645, WEBRTC_SPL_MUL(a, b));
|
||||
|
Loading…
x
Reference in New Issue
Block a user