Home
last modified time | relevance | path

Searched refs:ival (Results 1 – 4 of 4) sorted by relevance

/system/media/audio_utils/include/audio_utils/
Dprimitives.h861 static inline uint8_t clamp8_from_q8_23(int32_t ival) in clamp8_from_q8_23() argument
865 if (ival < limneg) { in clamp8_from_q8_23()
867 } else if (ival > limpos) { in clamp8_from_q8_23()
870 return (ival >> 16) + 0x80; in clamp8_from_q8_23()
914 static inline int32_t clamp24_from_q8_23(int32_t ival) in clamp24_from_q8_23() argument
918 if (ival < limneg) { in clamp24_from_q8_23()
920 } else if (ival > limpos) { in clamp24_from_q8_23()
923 return ival; in clamp24_from_q8_23()
989 static inline float float_from_q4_27(int32_t ival) in float_from_q4_27() argument
1000 return ival * scale; in float_from_q4_27()
[all …]
/system/media/audio_utils/
Dprimitives.c183 int32_t ival = clamp24_from_float(*src++); in memcpy_to_p24_from_float() local
186 *dst++ = ival >> 16; in memcpy_to_p24_from_float()
187 *dst++ = ival >> 8; in memcpy_to_p24_from_float()
188 *dst++ = ival; in memcpy_to_p24_from_float()
190 *dst++ = ival; in memcpy_to_p24_from_float()
191 *dst++ = ival >> 8; in memcpy_to_p24_from_float()
192 *dst++ = ival >> 16; in memcpy_to_p24_from_float()
200 int32_t ival = clamp24_from_q8_23(*src++); in memcpy_to_p24_from_q8_23() local
203 *dst++ = ival >> 16; in memcpy_to_p24_from_q8_23()
204 *dst++ = ival >> 8; in memcpy_to_p24_from_q8_23()
[all …]
/system/media/audio_utils/tests/
Dprimitives_tests.cpp66 int16_t ival = clamp16_from_float(f / (1 << 15)); in testClamp16() local
70 EXPECT_EQ(lim16pos, ival); in testClamp16()
72 EXPECT_EQ(lim16neg, ival); in testClamp16()
77 int ival2 = clamp16_from_float(float_from_i16(ival)); in testClamp16()
78 int diff = abs(ival - ival2); in testClamp16()
85 int32_t ival = clamp24_from_float(f / (1 << 23)); in testClamp24() local
89 EXPECT_EQ(lim24pos, ival); in testClamp24()
91 EXPECT_EQ(lim24neg, ival); in testClamp24()
96 int ival2 = clamp24_from_float(float_from_q8_23(ival)); in testClamp24()
97 int diff = abs(ival - ival2); in testClamp24()
/system/netd/tests/
Dbinder_test.cpp1113 const int ival = std::stoi(value); in TEST_F() local
1114 EXPECT_GT(ival, 0); in TEST_F()
1116 EXPECT_TRUE(mNetd->setProcSysNet(ipversion, category, tun, parameter, std::to_string(2 * ival)) in TEST_F()
1119 EXPECT_EQ(2 * ival, std::stoi(value)); in TEST_F()
1121 EXPECT_TRUE(mNetd->setProcSysNet(ipversion, category, tun, parameter, std::to_string(ival)) in TEST_F()
1124 EXPECT_EQ(ival, std::stoi(value)); in TEST_F()