Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 431) sorted by relevance

12345678910>>...18

/system/bt/embdrv/sbc/decoder/srce/
Dsynthesis-8-generated.c51 SBC_BUFFER_T const* RESTRICT buffer, in SynthWindow80_generated() argument
55 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(8235, buffer[12])) >> 3; in SynthWindow80_generated()
56 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(-23167, buffer[20])) >> 3; in SynthWindow80_generated()
57 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(26479, buffer[28])) >> 2; in SynthWindow80_generated()
58 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(-17397, buffer[36])) << 1; in SynthWindow80_generated()
59 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(9399, buffer[44])) << 3; in SynthWindow80_generated()
60 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(17397, buffer[52])) << 1; in SynthWindow80_generated()
61 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(26479, buffer[60])) >> 2; in SynthWindow80_generated()
62 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(23167, buffer[68])) >> 3; in SynthWindow80_generated()
63 /* 1 - stage 0 */ pcm_b += (MUL_16S_16S(8235, buffer[76])) >> 3; in SynthWindow80_generated()
[all …]
Dsynthesis-sbc.c247 SBC_BUFFER_T const* RESTRICT buffer,
250 SBC_BUFFER_T const* RESTRICT buffer,
432 SBC_BUFFER_T buffer[80], in SynthWindow40_int32_int32_symmetry_with_sum()
439 OI_ASSERT(buffer[2] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
440 OI_ASSERT(buffer[10] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
441 OI_ASSERT(buffer[18] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
442 OI_ASSERT(buffer[26] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
443 OI_ASSERT(buffer[34] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
444 OI_ASSERT(buffer[42] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
445 OI_ASSERT(buffer[50] == 0); in SynthWindow40_int32_int32_symmetry_with_sum()
[all …]
/system/connectivity/wifilogd/tests/
Dmemory_reader_unittest.cpp31 constexpr std::array<uint8_t, 1> buffer{}; in TEST() local
32 MemoryReader memory_reader(buffer.data(), buffer.size()); in TEST()
37 constexpr std::array<uint8_t, 0> buffer{}; in TEST() local
38 MemoryReader memory_reader(buffer.data(), buffer.size()); in TEST()
48 constexpr std::array<uint8_t, 3> buffer{{1, 2, 3}}; in TEST() local
50 MemoryReader reader1{buffer.data(), buffer.size()}; in TEST()
51 EXPECT_EQ(buffer[0], *reader1.GetBytesOrDie(sizeof(uint8_t))); in TEST()
55 EXPECT_EQ(buffer[1], *reader2.GetBytesOrDie(sizeof(uint8_t))); in TEST()
62 constexpr std::array<uint8_t, 3> buffer{{1, 2, 3}}; in TEST() local
64 MemoryReader reader1{buffer.data(), buffer.size()}; in TEST()
[all …]
Dos_unittest.cpp196 std::array<uint8_t, 8192> buffer{}; in TEST_F() local
197 EXPECT_CALL(*raw_os_, Recv(kFakeFd, buffer.data(), buffer.size(), MSG_TRUNC)) in TEST_F()
198 .WillOnce(Return(buffer.size())); in TEST_F()
200 constexpr std::tuple<size_t, Os::Errno> kExpectedResult{buffer.size(), 0}; in TEST_F()
202 os_->ReceiveDatagram(kFakeFd, buffer.data(), buffer.size())); in TEST_F()
209 std::array<uint8_t, kReadBufferSize> buffer{}; in TEST_F() local
210 EXPECT_CALL(*raw_os_, Recv(kFakeFd, buffer.data(), buffer.size(), MSG_TRUNC)) in TEST_F()
215 os_->ReceiveDatagram(kFakeFd, buffer.data(), buffer.size())); in TEST_F()
222 std::array<uint8_t, kReadBufferSize> buffer{}; in TEST_F() local
223 EXPECT_CALL(*raw_os_, Recv(kFakeFd, buffer.data(), buffer.size(), MSG_TRUNC)) in TEST_F()
[all …]
/system/core/libstats/socket/tests/
Dstats_event_test.cpp26 T readNext(uint8_t** buffer) { in readNext() argument
27 T value = *(T*)(*buffer); in readNext()
28 *buffer += sizeof(T); in readNext()
32 void checkTypeHeader(uint8_t** buffer, uint8_t typeId, uint8_t numAnnotations = 0) { in checkTypeHeader() argument
34 EXPECT_EQ(readNext<uint8_t>(buffer), typeHeader); in checkTypeHeader()
38 void checkScalar(uint8_t** buffer, T expectedValue) { in checkScalar() argument
39 EXPECT_EQ(readNext<T>(buffer), expectedValue); in checkScalar()
42 void checkString(uint8_t** buffer, const string& expectedString) { in checkString() argument
43 uint32_t size = readNext<uint32_t>(buffer); in checkString()
44 string parsedString((char*)(*buffer), size); in checkString()
[all …]
/system/chre/util/tests/
Dbuffer_test.cc24 void fillBufferWithSequentialValues(float *buffer, size_t size) { in fillBufferWithSequentialValues() argument
26 buffer[i] = static_cast<float>(i); in fillBufferWithSequentialValues()
31 Buffer<float> buffer; in TEST() local
32 EXPECT_EQ(buffer.data(), nullptr); in TEST()
33 EXPECT_EQ(buffer.size(), 0); in TEST()
40 Buffer<float> buffer; in TEST() local
41 buffer.wrap(buf, ARRAY_SIZE(buf)); in TEST()
42 EXPECT_EQ(buffer.data(), buf); in TEST()
43 EXPECT_EQ(buffer.size(), ARRAY_SIZE(buf)); in TEST()
50 Buffer<float> buffer; in TEST() local
[all …]
/system/core/libunwindstack/tests/
DMemoryOfflineBufferTest.cpp50 static void VerifyBuffer(uint8_t* buffer, size_t start_value, size_t length) { in VerifyBuffer() argument
52 ASSERT_EQ((start_value + i) % 189, buffer[i]) << "Failed at byte " << i; in VerifyBuffer()
57 std::vector<uint8_t> buffer(1024); in TEST_F() local
58 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F()
59 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 1)); in TEST_F()
60 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 2)); in TEST_F()
61 ASSERT_FALSE(memory_->ReadFully(0x3000, buffer.data(), 1)); in TEST_F()
62 ASSERT_FALSE(memory_->ReadFully(0x3001, buffer.data(), 1)); in TEST_F()
66 std::vector<uint8_t> buffer(1024); in TEST_F() local
67 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 10)); in TEST_F()
[all …]
DMemoryCacheTest.cpp47 std::vector<uint8_t> buffer(i); in TEST_F() local
48 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F()
50 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F()
56 std::vector<uint8_t> buffer(i); in TEST_F() local
57 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F()
59 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F()
65 std::vector<uint8_t> buffer(i); in TEST_F() local
66 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F()
68 ASSERT_EQ(std::vector<uint8_t>(i, 0xab), buffer) << "Failed at size " << i; in TEST_F()
75 std::vector<uint8_t> buffer(i); in TEST_F() local
[all …]
DMemoryFileTest.cpp51 std::vector<char> buffer(11); in TEST_F() local
52 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F()
53 buffer[10] = '\0'; in TEST_F()
54 ASSERT_STREQ("0123456789", buffer.data()); in TEST_F()
61 std::vector<char> buffer(11); in TEST_F() local
62 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F()
63 buffer[10] = '\0'; in TEST_F()
64 ASSERT_STREQ("abcdefghij", buffer.data()); in TEST_F()
77 std::vector<char> buffer(9); in TEST_F() local
78 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 8)); in TEST_F()
[all …]
DMapInfoCreateMemoryTest.cpp46 std::vector<uint8_t> buffer(20000); in InitElf() local
47 memset(buffer.data(), 0, buffer.size()); in InitElf()
56 memcpy(&buffer[file_offset], &ehdr, sizeof(ehdr)); in InitElf()
58 ASSERT_TRUE(android::base::WriteFully(fd, buffer.data(), buffer.size())); in InitElf()
62 std::vector<uint8_t> buffer(12288, 0); in SetUp() local
63 memcpy(buffer.data(), ELFMAG, SELFMAG); in SetUp()
64 buffer[EI_CLASS] = ELFCLASS32; in SetUp()
65 ASSERT_TRUE(android::base::WriteFully(elf_.fd, buffer.data(), 1024)); in SetUp()
67 memset(buffer.data(), 0, buffer.size()); in SetUp()
68 memcpy(&buffer[0x1000], ELFMAG, SELFMAG); in SetUp()
[all …]
DMemoryBufferTest.cpp37 std::vector<uint8_t> buffer(1024); in TEST_F() local
38 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F()
56 std::vector<uint8_t> buffer(memory_->Size()); in TEST_F() local
57 ASSERT_TRUE(memory_->ReadFully(0, buffer.data(), buffer.size())); in TEST_F()
58 for (size_t i = 0; i < buffer.size(); i++) { in TEST_F()
59 ASSERT_EQ(i, buffer[i]) << "Failed at byte " << i; in TEST_F()
65 std::vector<uint8_t> buffer(200); in TEST_F() local
66 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 101)); in TEST_F()
67 ASSERT_FALSE(memory_->ReadFully(100, buffer.data(), 1)); in TEST_F()
68 ASSERT_FALSE(memory_->ReadFully(101, buffer.data(), 2)); in TEST_F()
[all …]
/system/core/libutils/include/utils/
DFlattenable.h46 static size_t align(void const*& buffer) { in align() argument
48 uintptr_t b = uintptr_t(buffer); in align()
49 buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1)); in align()
50 return size_t(uintptr_t(buffer) - b); in align()
54 static size_t align(void*& buffer) { in align() argument
56 void* b = buffer; in align()
57 buffer = reinterpret_cast<void*>((uintptr_t(buffer) + (N-1)) & ~(N-1)); in align()
58 size_t delta = size_t(uintptr_t(buffer) - uintptr_t(b)); in align()
63 static void advance(void*& buffer, size_t& size, size_t offset) { in advance() argument
64 buffer = reinterpret_cast<void*>( uintptr_t(buffer) + offset ); in advance()
[all …]
/system/core/debuggerd/libdebuggerd/test/
Ddump_memory_test.cpp110 virtual size_t Read(uint64_t addr, void* buffer, size_t bytes) override { in Read() argument
129 memcpy(buffer, buffer_.data() + offset, bytes); in Read()
136 void SetReadData(uint8_t* buffer, size_t bytes) { in SetReadData() argument
138 memcpy(buffer_.data(), buffer, bytes); in SetReadData()
201 uint8_t buffer[256]; in TEST_F() local
202 for (size_t i = 0; i < sizeof(buffer); i++) { in TEST_F()
203 buffer[i] = i; in TEST_F()
205 memory_mock_->SetReadData(buffer, sizeof(buffer)); in TEST_F()
220 uint8_t buffer[256]; in TEST_F() local
221 for (size_t i = 0; i < sizeof(buffer); i++) { in TEST_F()
[all …]
/system/core/libappfuse/
DFuseAppLoop.cc32 bool HandleLookUp(FuseAppLoop* loop, FuseBuffer* buffer, FuseAppLoopCallback* callback) { in HandleLookUp() argument
35 if (buffer->request.header.nodeid != FUSE_ROOT_ID) { in HandleLookUp()
37 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp()
41 const size_t filename_length = buffer->request.header.len - sizeof(fuse_in_header); in HandleLookUp()
42 if (buffer->request.lookup_name[filename_length - 1] != 0) { in HandleLookUp()
44 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp()
47 const uint64_t inode = static_cast<uint64_t>(atol(buffer->request.lookup_name)); in HandleLookUp()
50 return loop->ReplySimple(buffer->request.header.unique, -ENOENT); in HandleLookUp()
53 callback->OnLookup(buffer->request.header.unique, inode); in HandleLookUp()
57 bool HandleGetAttr(FuseAppLoop* loop, FuseBuffer* buffer, FuseAppLoopCallback* callback) { in HandleGetAttr() argument
[all …]
/system/media/audio_utils/
Decho_reference.c50 void *buffer; // main buffer member
72 struct resampler_buffer* buffer) in echo_reference_get_next_buffer() argument
84 buffer->raw = NULL; in echo_reference_get_next_buffer()
85 buffer->frame_count = 0; in echo_reference_get_next_buffer()
89 buffer->frame_count = (buffer->frame_count > er->wr_frames_in) ? in echo_reference_get_next_buffer()
90 er->wr_frames_in : buffer->frame_count; in echo_reference_get_next_buffer()
92 buffer->i16 = (int16_t *)er->wr_src_buf + (er->wr_curr_frame_size - er->wr_frames_in) * in echo_reference_get_next_buffer()
99 struct resampler_buffer* buffer) in echo_reference_release_buffer() argument
110 er->wr_frames_in -= buffer->frame_count; in echo_reference_release_buffer()
116 free(er->buffer); in echo_reference_reset_l()
[all …]
/system/bt/bta/hf_client/
Dbta_hf_client_at.cc801 char* buffer) { in bta_hf_client_parse_ok() argument
802 AT_CHECK_EVENT(buffer, "OK"); in bta_hf_client_parse_ok()
803 AT_CHECK_RN(buffer); in bta_hf_client_parse_ok()
807 return buffer; in bta_hf_client_parse_ok()
811 char* buffer) { in bta_hf_client_parse_error() argument
812 AT_CHECK_EVENT(buffer, "ERROR"); in bta_hf_client_parse_error()
813 AT_CHECK_RN(buffer); in bta_hf_client_parse_error()
817 return buffer; in bta_hf_client_parse_error()
821 char* buffer) { in bta_hf_client_parse_ring() argument
822 AT_CHECK_EVENT(buffer, "RING"); in bta_hf_client_parse_ring()
[all …]
/system/core/logcat/
Dlogpersist29 buffer=${buffer_default}
37 --buffer=*) buffer="${1#--buffer=}" ;;
38 -b|--buffer) buffer="${2}" ; shift ;;
62 if [ -z "${buffer}" -o "${buffer_default}" = "${buffer}" ]; then
63 unset buffer
65 if [ -n "${buffer}" ] && ! logcat -b ${buffer} -g >/dev/null 2>&1; then
66 echo ERROR: Invalid --buffer ${buffer} >&2
75 if [ -n "${size}${buffer}" -o "true" = "${clear}" ]; then
76 echo WARNING: Can not use --clear, --size or --buffer with ${progname%.*}.cat >&2
91 elif [ "${buffer}|${size}" != "${current_buffer}|${current_size}" ]; then
[all …]
/system/bt/osi/src/
Dbuffer.cc39 buffer_t* buffer = in buffer_new() local
42 buffer->root = buffer; in buffer_new()
43 buffer->refcount = 1; in buffer_new()
44 buffer->length = size; in buffer_new()
46 return buffer; in buffer_new()
70 void buffer_free(buffer_t* buffer) { in buffer_free() argument
71 if (!buffer) return; in buffer_free()
73 if (buffer->root != buffer) { in buffer_free()
75 if (--buffer->root->refcount == 0) osi_free(buffer->root); in buffer_free()
76 osi_free(buffer); in buffer_free()
[all …]
/system/gatekeeper/
Dgatekeeper_messages.cpp43 static inline void append_to_buffer(uint8_t **buffer, const SizedBuffer &to_append) { in append_to_buffer() argument
45 memcpy(*buffer, &length, sizeof(length)); in append_to_buffer()
46 *buffer += sizeof(length); in append_to_buffer()
48 memcpy(*buffer, to_append.Data<uint8_t>(), length); in append_to_buffer()
49 *buffer += length; in append_to_buffer()
53 static inline gatekeeper_error_t read_from_buffer(const uint8_t **buffer, const uint8_t *end, in read_from_buffer() argument
56 if (!fitsBuffer(*buffer, end, sizeof(uint32_t))) return ERROR_INVALID; in read_from_buffer()
60 memcpy(&length, *buffer, sizeof(length)); in read_from_buffer()
62 *buffer += sizeof(length); in read_from_buffer()
68 if (!fitsBuffer(*buffer, end, length)) return ERROR_INVALID; in read_from_buffer()
[all …]
/system/chre/apps/wifi_offload/
Dflatbuffers_serialization.cc23 size_t Serialize(const wifi_offload::ScanStats &stats, uint8_t *buffer, in Serialize() argument
25 return Serialize(stats, buffer, buffer_len, "ScanStats"); in Serialize()
28 bool Deserialize(const uint8_t *buffer, size_t buffer_len, in Deserialize() argument
30 return Deserialize<wifi_offload::ScanStats>(buffer, buffer_len, stats, in Deserialize()
34 size_t Serialize(const wifi_offload::ScanConfig &config, uint8_t *buffer, in Serialize() argument
36 return Serialize(config, buffer, buffer_len, "ScanConfig"); in Serialize()
39 bool Deserialize(const uint8_t *buffer, size_t buffer_len, in Deserialize() argument
41 return Deserialize<wifi_offload::ScanConfig>(buffer, buffer_len, config, in Deserialize()
46 uint8_t *buffer, size_t buffer_len) { in Serialize() argument
49 return Serialize(msg, buffer, buffer_len, "ScanResults"); in Serialize()
[all …]
/system/core/logcat/tests/
Dlogcat_benchmark.cpp46 void init(const char* buffer) { in BM_logcat_sorted_order() argument
48 if (buffer != NULL) { in BM_logcat_sorted_order()
49 ok = sscanf(buffer, "%d-%d %d:%d:%d.%d ", &month, &day, &hour, in BM_logcat_sorted_order()
54 explicit timestamp(const char* buffer) { in BM_logcat_sorted_order() argument
55 init(buffer); in BM_logcat_sorted_order()
78 char buffer[5120]; in BM_logcat_sorted_order() local
83 while (fgets(buffer, sizeof(buffer), fp)) { in BM_logcat_sorted_order()
84 if (!strncmp(begin, buffer, sizeof(begin) - 1)) { in BM_logcat_sorted_order()
89 last_buffer = strdup(buffer); in BM_logcat_sorted_order()
90 last.init(buffer); in BM_logcat_sorted_order()
[all …]
/system/nvram/core/
Dcrypto_boringssl.cpp35 uint8_t buffer[SHA256_DIGEST_LENGTH]; in SHA256() local
36 ::SHA256(data, data_size, buffer); in SHA256()
39 if (digest_size < sizeof(buffer)) { in SHA256()
40 memcpy(digest, buffer, digest_size); in SHA256()
42 memcpy(digest, buffer, sizeof(buffer)); in SHA256()
43 memset(digest + sizeof(buffer), 0, digest_size - sizeof(buffer)); in SHA256()
/system/core/liblog/tests/
Dliblog_benchmark.cpp210 android_log_event_int_t buffer; in BM_pmsg_short() local
213 buffer.header.tag = 0; in BM_pmsg_short()
214 buffer.payload.type = EVENT_TYPE_INT; in BM_pmsg_short()
216 buffer.payload.data = snapshot; in BM_pmsg_short()
218 newVec[2].iov_base = &buffer; in BM_pmsg_short()
219 newVec[2].iov_len = sizeof(buffer); in BM_pmsg_short()
223 buffer.payload.data = snapshot; in BM_pmsg_short()
272 struct packet* buffer = (struct packet*)(((uintptr_t)buf + 7) & ~7); in BM_pmsg_short_aligned() local
273 if (((uintptr_t)&buffer->pmsg_header) & 7) { in BM_pmsg_short_aligned()
274 fprintf(stderr, "&buffer=0x%p iterations=%" PRIu64 "\n", &buffer->pmsg_header, in BM_pmsg_short_aligned()
[all …]
/system/nfc/utils/test/ringbuffer_fuzzer/
Dringbuffer_fuzzer.cpp18 ringbuffer_t* buffer = ringbuffer_init(buffer_size); in LLVMFuzzerTestOneInput() local
20 if (buffer == nullptr) { in LLVMFuzzerTestOneInput()
28 ringbuffer_available(buffer); in LLVMFuzzerTestOneInput()
32 ringbuffer_size(buffer); in LLVMFuzzerTestOneInput()
41 ringbuffer_insert(buffer, &Data[i], bytes_to_insert); in LLVMFuzzerTestOneInput()
53 if (ringbuffer_size(buffer) != 0) { in LLVMFuzzerTestOneInput()
54 offset = Data[i++] % ringbuffer_size(buffer); in LLVMFuzzerTestOneInput()
57 ringbuffer_peek(buffer, offset, copy_buffer, (size_t)bytes_to_grab); in LLVMFuzzerTestOneInput()
68 ringbuffer_pop(buffer, copy_buffer, bytes_to_grab); in LLVMFuzzerTestOneInput()
76 ringbuffer_delete(buffer, (size_t)Data[i++]); in LLVMFuzzerTestOneInput()
[all …]
/system/core/adb/client/
Dfastdeploycallbacks.cpp30 static void appendBuffer(std::vector<char>* buffer, const char* input, int length) { in appendBuffer() argument
31 if (buffer != NULL) { in appendBuffer()
32 buffer->insert(buffer->end(), input, input + length); in appendBuffer()
40 virtual void OnStdout(const char* buffer, int length);
41 virtual void OnStderr(const char* buffer, int length);
61 void DeployAgentBufferCallback::OnStdout(const char* buffer, int length) { in OnStdout() argument
62 appendBuffer(mpOutBuffer, buffer, length); in OnStdout()
65 void DeployAgentBufferCallback::OnStderr(const char* buffer, int length) { in OnStderr() argument
66 appendBuffer(mpErrBuffer, buffer, length); in OnStderr()

12345678910>>...18