/system/media/audio_utils/ |
D | primitives.c | 30 void memcpy_to_i16_from_q4_27(int16_t *dst, const int32_t *src, size_t count) in memcpy_to_i16_from_q4_27() argument 33 *dst++ = clamp16(*src++ >> 12); in memcpy_to_i16_from_q4_27() 37 void memcpy_to_i16_from_u8(int16_t *dst, const uint8_t *src, size_t count) in memcpy_to_i16_from_u8() argument 39 dst += count; in memcpy_to_i16_from_u8() 42 *--dst = (int16_t)(*--src - 0x80) << 8; in memcpy_to_i16_from_u8() 46 void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count) in memcpy_to_u8_from_i16() argument 49 *dst++ = (*src++ >> 8) + 0x80; in memcpy_to_u8_from_i16() 53 void memcpy_to_u8_from_p24(uint8_t *dst, const uint8_t *src, size_t count) in memcpy_to_u8_from_p24() argument 57 *dst++ = src[0] + 0x80; in memcpy_to_u8_from_p24() 59 *dst++ = src[2] + 0x80; in memcpy_to_u8_from_p24() [all …]
|
D | format.c | 25 void memcpy_by_audio_format(void *dst, audio_format_t dst_format, in memcpy_by_audio_format() argument 37 if (dst != src) { in memcpy_by_audio_format() 39 memcpy(dst, src, count * audio_bytes_per_sample(dst_format)); in memcpy_by_audio_format() 50 memcpy_to_i16_from_float((int16_t*)dst, (float*)src, count); in memcpy_by_audio_format() 53 memcpy_to_i16_from_u8((int16_t*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() 56 memcpy_to_i16_from_p24((int16_t*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() 59 memcpy_to_i16_from_i32((int16_t*)dst, (int32_t*)src, count); in memcpy_by_audio_format() 62 memcpy_to_i16_from_q8_23((int16_t*)dst, (int32_t*)src, count); in memcpy_by_audio_format() 71 memcpy_to_float_from_i16((float*)dst, (int16_t*)src, count); in memcpy_by_audio_format() 74 memcpy_to_float_from_u8((float*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() [all …]
|
/system/media/audio_utils/tests/ |
D | string_tests.cpp | 54 char dst[STRING_SIZE]; in TEST() member 57 char over[sizeof(dst) + 5]; in TEST() 58 char under[sizeof(dst) - 5]; in TEST() 69 dst[sizeof(dst) - 1] = 0; in TEST() 70 check(dst, DST_START, sizeof(dst)); in TEST() 71 EXPECT_EQ(sizeof(dst) + DST_START, dst_mirror[sizeof(dst)]); in TEST() 74 audio_utils_strlcpy_zerofill(dst, over); in TEST() 75 check(dst, OVER_START, sizeof(dst)); in TEST() 78 EXPECT_EQ(sizeof(dst) + DST_START, dst_mirror[sizeof(dst)]); in TEST() 81 audio_utils_strlcpy_zerofill(dst, under); in TEST() [all …]
|
D | primitives_benchmark.cpp | 31 std::vector<float> dst(count); in BM_MemcpyToFloatFromFloatWithClamping() local 45 benchmark::DoNotOptimize(dst.data()); in BM_MemcpyToFloatFromFloatWithClamping() 46 memcpy_to_float_from_float_with_clamping(dst.data(), src.data(), count, 1.413); in BM_MemcpyToFloatFromFloatWithClamping() 50 if (expected != dst) { in BM_MemcpyToFloatFromFloatWithClamping() 62 std::vector<float> dst(count); in BM_MemcpyFloat() local 74 benchmark::DoNotOptimize(dst.data()); in BM_MemcpyFloat() 75 memcpy(dst.data(), src.data(), count * sizeof(float)); in BM_MemcpyFloat() 79 if (src != dst) { in BM_MemcpyFloat() 91 std::vector<float> dst(count); in BM_MemcpyToFloatFromI16() local 103 benchmark::DoNotOptimize(dst.data()); in BM_MemcpyToFloatFromI16() [all …]
|
/system/core/libunwindstack/tests/ |
D | MemoryRangesTest.cpp | 51 std::vector<uint8_t> dst(2000); in TEST_F() local 52 size_t bytes = ranges_->Read(0, dst.data(), dst.size()); in TEST_F() 55 ASSERT_EQ(0x15U, dst[i]) << "Failed at byte " << i; in TEST_F() 58 bytes = ranges_->Read(2000, dst.data(), dst.size()); in TEST_F() 61 ASSERT_EQ(0x26U, dst[i]) << "Failed at byte " << i; in TEST_F() 64 bytes = ranges_->Read(4000, dst.data(), dst.size()); in TEST_F() 67 ASSERT_EQ(0x37U, dst[i]) << "Failed at byte " << i; in TEST_F() 72 std::vector<uint8_t> dst(4096); in TEST_F() local 73 ASSERT_EQ(0UL, ranges_->Read(1000, dst.data(), dst.size())); in TEST_F() 74 ASSERT_EQ(0UL, ranges_->Read(5000, dst.data(), dst.size())); in TEST_F() [all …]
|
D | MemoryRangeTest.cpp | 46 std::vector<uint8_t> dst(1024); in TEST_F() local 47 ASSERT_TRUE(range.ReadFully(0, dst.data(), dst.size())); in TEST_F() 48 for (size_t i = 0; i < dst.size(); i++) { in TEST_F() 49 ASSERT_EQ(0x4cU, dst[i]) << "Failed at byte " << i; in TEST_F() 58 std::vector<uint8_t> dst(1024); in TEST_F() local 59 ASSERT_TRUE(range.ReadFully(1020, dst.data(), 4)); in TEST_F() 61 ASSERT_EQ(0x4cU, dst[i]) << "Failed at byte " << i; in TEST_F() 65 ASSERT_FALSE(range.ReadFully(1020, dst.data(), 5)); in TEST_F() 66 ASSERT_FALSE(range.ReadFully(1024, dst.data(), 1)); in TEST_F() 67 ASSERT_FALSE(range.ReadFully(1024, dst.data(), 1024)); in TEST_F() [all …]
|
D | MemoryLocalTest.cpp | 35 std::vector<uint8_t> dst(1024); in TEST() local 36 ASSERT_TRUE(local.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST() 37 ASSERT_EQ(0, memcmp(src.data(), dst.data(), 1024)); in TEST() 39 ASSERT_EQ(0x4cU, dst[i]); in TEST() 43 ASSERT_TRUE(local.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST() 44 ASSERT_EQ(0, memcmp(src.data(), dst.data(), 1024)); in TEST() 46 ASSERT_EQ(0x23U, dst[i]); in TEST() 49 ASSERT_EQ(0x4cU, dst[i]); in TEST() 56 std::vector<uint8_t> dst(100); in TEST() local 57 ASSERT_FALSE(local.ReadFully(0, dst.data(), 1)); in TEST() [all …]
|
D | MemoryRemoteTest.cpp | 73 std::vector<uint8_t> dst(1024); in TEST_F() local 74 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST_F() 76 ASSERT_EQ(0x4cU, dst[i]) << "Failed at byte " << i; in TEST_F() 102 std::vector<uint8_t> dst(kTotalPages * getpagesize()); in TEST_F() local 103 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), src.size())); in TEST_F() 105 ASSERT_EQ(i / getpagesize(), dst[i]) << "Failed at byte " << i; in TEST_F() 135 std::vector<uint8_t> dst(4096); in TEST_F() local 137 remote.Read(reinterpret_cast<uint64_t>(mapping + getpagesize() - 1024), dst.data(), 4096); in TEST_F() 141 ASSERT_EQ(0x4cU, dst[i]) << "Failed at byte " << i; in TEST_F() 146 remote.Read(reinterpret_cast<uint64_t>(mapping + 3 * getpagesize() - 1024), dst.data(), 4096); in TEST_F() [all …]
|
/system/media/audio_utils/include/audio_utils/ |
D | primitives.h | 68 void memcpy_to_i16_from_q4_27(int16_t *dst, const int32_t *src, size_t count); 80 void memcpy_to_i16_from_u8(int16_t *dst, const uint8_t *src, size_t count); 93 void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count); 106 void memcpy_to_u8_from_float(uint8_t *dst, const float *src, size_t count); 119 void memcpy_to_u8_from_p24(uint8_t *dst, const uint8_t *src, size_t count); 132 void memcpy_to_u8_from_i32(uint8_t *dst, const int32_t *src, size_t count); 145 void memcpy_to_u8_from_q8_23(uint8_t *dst, const int32_t *src, size_t count); 158 void memcpy_to_i16_from_i32(int16_t *dst, const int32_t *src, size_t count); 173 void memcpy_to_i16_from_float(int16_t *dst, const float *src, size_t count); 188 void memcpy_to_float_from_q4_27(float *dst, const int32_t *src, size_t count); [all …]
|
D | string.h | 24 inline size_t audio_utils_strlcpy_zerofill(char *dst, const char *src, size_t dst_size) { in audio_utils_strlcpy_zerofill() argument 25 const size_t srclen = strlcpy(dst, src, dst_size); in audio_utils_strlcpy_zerofill() 29 memset(dst + srclen_with_zero, 0 /* value */, num_zeroes); /* clear remaining buffer */ in audio_utils_strlcpy_zerofill() 38 inline size_t audio_utils_strlcpy_zerofill(char (&dst)[size], const char *src) { in audio_utils_strlcpy_zerofill() 39 return audio_utils_strlcpy_zerofill(dst, src, size); in audio_utils_strlcpy_zerofill() 44 inline size_t audio_utils_strlcpy(char (&dst)[size], const char *src) { in audio_utils_strlcpy() 45 return strlcpy(dst, src, size); in audio_utils_strlcpy()
|
/system/core/libunwindstack/ |
D | Memory.cpp | 46 static size_t ProcessVmRead(pid_t pid, uint64_t remote_src, void* dst, size_t len) { in ProcessVmRead() argument 62 .iov_base = &reinterpret_cast<uint8_t*>(dst)[total_read], .iov_len = len, in ProcessVmRead() 113 static size_t PtraceRead(pid_t pid, uint64_t addr, void* dst, size_t bytes) { in PtraceRead() argument 128 memcpy(dst, reinterpret_cast<uint8_t*>(&data) + align_bytes, copy_bytes); in PtraceRead() 130 dst = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(dst) + copy_bytes); in PtraceRead() 139 memcpy(dst, &data, sizeof(long)); in PtraceRead() 140 dst = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(dst) + sizeof(long)); in PtraceRead() 150 memcpy(dst, &data, left_over); in PtraceRead() 156 bool Memory::ReadFully(uint64_t addr, void* dst, size_t size) { in ReadFully() argument 157 size_t rc = Read(addr, dst, size); in ReadFully() [all …]
|
/system/media/camera/src/ |
D | camera_metadata.c | 266 camera_metadata_t *place_camera_metadata(void *dst, in place_camera_metadata() argument 270 if (dst == NULL) return NULL; in place_camera_metadata() 280 camera_metadata_t *metadata = (camera_metadata_t*)dst; in place_camera_metadata() 345 camera_metadata_t* copy_camera_metadata(void *dst, size_t dst_size, in copy_camera_metadata() argument 349 if (dst == NULL) return NULL; in copy_camera_metadata() 357 place_camera_metadata(dst, dst_size, src->entry_count, src->data_count); in copy_camera_metadata() 602 int append_camera_metadata(camera_metadata_t *dst, in append_camera_metadata() argument 604 if (dst == NULL || src == NULL ) return ERROR; in append_camera_metadata() 607 if (src->entry_count + dst->entry_count < src->entry_count) return ERROR; in append_camera_metadata() 608 if (src->data_count + dst->data_count < src->data_count) return ERROR; in append_camera_metadata() [all …]
|
/system/core/storaged/ |
D | storaged_diskstats.cpp | 110 void convert_hal_disk_stats(struct disk_stats* dst, const DiskStats& src) { in convert_hal_disk_stats() argument 111 dst->read_ios = src.reads; in convert_hal_disk_stats() 112 dst->read_merges = src.readMerges; in convert_hal_disk_stats() 113 dst->read_sectors = src.readSectors; in convert_hal_disk_stats() 114 dst->read_ticks = src.readTicks; in convert_hal_disk_stats() 115 dst->write_ios = src.writes; in convert_hal_disk_stats() 116 dst->write_merges = src.writeMerges; in convert_hal_disk_stats() 117 dst->write_sectors = src.writeSectors; in convert_hal_disk_stats() 118 dst->write_ticks = src.writeTicks; in convert_hal_disk_stats() 119 dst->io_in_flight = src.ioInFlight; in convert_hal_disk_stats() [all …]
|
/system/core/libdiskconfig/ |
D | diskutils.c | 34 write_raw_image(const char *dst, const char *src, loff_t offset, int test) in write_raw_image() argument 44 ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, (unsigned long long)offset); in write_raw_image() 51 if ((dst_fd = open(dst, O_RDWR)) < 0) { in write_raw_image() 52 ALOGE("Could not open '%s' for read/write (errno=%d).", dst, errno); in write_raw_image() 57 ALOGE("Could not seek to offset %lld in %s.", (long long)offset, dst); in write_raw_image() 88 ALOGE("Error (%d) while writing to '%s'", errno, dst); in write_raw_image() 105 ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, (long long)offset); in write_raw_image()
|
/system/core/libunwindstack/include/unwindstack/ |
D | Memory.h | 44 virtual size_t Read(uint64_t addr, void* dst, size_t size) = 0; 46 bool ReadFully(uint64_t addr, void* dst, size_t size); 48 inline bool Read32(uint64_t addr, uint32_t* dst) { in Read32() argument 49 return ReadFully(addr, dst, sizeof(uint32_t)); in Read32() 52 inline bool Read64(uint64_t addr, uint64_t* dst) { in Read64() argument 53 return ReadFully(addr, dst, sizeof(uint64_t)); in Read64()
|
/system/bt/bta/pan/ |
D | bta_pan_ci.cc | 123 void bta_pan_ci_rx_write(uint16_t handle, const RawAddress& dst, in bta_pan_ci_rx_write() argument 132 ((tBTA_PAN_DATA_PARAMS*)p_buf)->dst = dst; in bta_pan_ci_rx_write() 160 void bta_pan_ci_rx_writebuf(uint16_t handle, const RawAddress& dst, in bta_pan_ci_rx_writebuf() argument 165 ((tBTA_PAN_DATA_PARAMS*)p_buf)->dst = dst; in bta_pan_ci_rx_writebuf() 184 BT_HDR* bta_pan_ci_readbuf(uint16_t handle, RawAddress& src, RawAddress& dst, in bta_pan_ci_readbuf() argument 194 dst = ((tBTA_PAN_DATA_PARAMS*)p_buf)->dst; in bta_pan_ci_readbuf() 243 UNUSED_ATTR const RawAddress& dst, in bta_pan_ci_rx_writebuf() argument 249 UNUSED_ATTR RawAddress& dst, in bta_pan_ci_readbuf() argument
|
/system/bt/osi/src/ |
D | compat.cc | 64 size_t strlcpy(char* dst, const char* src, size_t siz) { in strlcpy() argument 65 char* d = dst; in strlcpy() 95 size_t strlcat(char* dst, const char* src, size_t siz) { in strlcat() argument 96 char* d = dst; in strlcat() 103 dlen = d - dst; in strlcat()
|
/system/core/base/ |
D | stringprintf.cpp | 26 void StringAppendV(std::string* dst, const char* format, va_list ap) { in StringAppendV() argument 41 dst->append(space, result); in StringAppendV() 63 dst->append(buf, result); in StringAppendV() 77 void StringAppendF(std::string* dst, const char* format, ...) { in StringAppendF() argument 80 StringAppendV(dst, format, ap); in StringAppendF()
|
/system/bt/stack/pan/ |
D | pan_main.cc | 383 const RawAddress& dst, uint16_t protocol, uint8_t* p_data, in pan_data_ind_cb() argument 414 if (dst.address[0] & 0x01) { in pan_data_ind_cb() 421 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in pan_data_ind_cb() 426 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, in pan_data_ind_cb() 436 if (pan_cb.pcb[i].rem_bda == dst) { in pan_data_ind_cb() 437 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in pan_data_ind_cb() 450 (*pan_cb.pan_data_ind_cb)(pcb->handle, src, dst, protocol, p_data, len, ext, in pan_data_ind_cb() 477 const RawAddress& dst, uint16_t protocol, in pan_data_buf_ind_cb() argument 514 if (dst.address[0] & 0x01) { in pan_data_buf_ind_cb() 522 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, in pan_data_buf_ind_cb() [all …]
|
/system/media/camera/include/system/ |
D | camera_metadata.h | 201 camera_metadata_t *place_camera_metadata(void *dst, size_t dst_size, 278 camera_metadata_t *copy_camera_metadata(void *dst, size_t dst_size, 316 int append_camera_metadata(camera_metadata_t *dst, const camera_metadata_t *src); 350 int add_camera_metadata_entry(camera_metadata_t *dst, 363 int sort_camera_metadata(camera_metadata_t *dst); 417 int delete_camera_metadata_entry(camera_metadata_t *dst, 430 int update_camera_metadata_entry(camera_metadata_t *dst, 579 char *dst,
|
/system/core/libutils/include/utils/ |
D | Unicode.h | 89 void utf32_to_utf8(const char32_t* src, size_t src_len, char* dst, size_t dst_len); 111 void utf16_to_utf8(const char16_t* src, size_t src_len, char* dst, size_t dst_len); 147 const uint8_t* src, size_t srcLen, char16_t* dst, size_t dstLen); 158 const uint8_t* src, size_t srcLen, char16_t* dst, size_t dstLen);
|
/system/media/camera/docs/ |
D | metadata-generate | 169 local dst="$2" # Absolute path 175 if ! [[ -d $dst ]]; then 176 echo "FAIL: Destination directory $dst does not exist" >& 2 180 cp -R "$src" "$dst" 184 echo "ERROR: Failed to copy $(relpath "$src") to $(relpath "$dst")" >& 2 186 echo "OK: Copied $(relpath "$src") to $(relpath "$dst")" 187 out_files+=$'\n'" $dst"
|
/system/core/libutils/ |
D | Unicode.cpp | 200 void utf32_to_utf8(const char32_t* src, size_t src_len, char* dst, size_t dst_len) in utf32_to_utf8() argument 202 if (src == nullptr || src_len == 0 || dst == nullptr) { in utf32_to_utf8() 208 char *cur = dst; in utf32_to_utf8() 257 char16_t *strcpy16(char16_t *dst, const char16_t *src) in strcpy16() argument 259 char16_t *q = dst; in strcpy16() 267 return dst; in strcpy16() 328 void utf16_to_utf8(const char16_t* src, size_t src_len, char* dst, size_t dst_len) in utf16_to_utf8() argument 330 if (src == nullptr || src_len == 0 || dst == nullptr) { in utf16_to_utf8() 336 char *cur = dst; in utf16_to_utf8() 534 const uint8_t* src, size_t srcLen, char16_t* dst, size_t dstLen) { in utf8_to_utf16_no_null_terminator() argument [all …]
|
/system/bt/btif/src/ |
D | btif_a2dp_source.cc | 270 SchedulingStats* dst) { in btif_a2dp_source_accumulate_scheduling_stats() argument 271 dst->total_updates += src->total_updates; in btif_a2dp_source_accumulate_scheduling_stats() 272 dst->last_update_us = src->last_update_us; in btif_a2dp_source_accumulate_scheduling_stats() 273 dst->overdue_scheduling_count += src->overdue_scheduling_count; in btif_a2dp_source_accumulate_scheduling_stats() 274 dst->total_overdue_scheduling_delta_us += in btif_a2dp_source_accumulate_scheduling_stats() 276 dst->max_overdue_scheduling_delta_us = in btif_a2dp_source_accumulate_scheduling_stats() 277 std::max(dst->max_overdue_scheduling_delta_us, in btif_a2dp_source_accumulate_scheduling_stats() 279 dst->premature_scheduling_count += src->premature_scheduling_count; in btif_a2dp_source_accumulate_scheduling_stats() 280 dst->total_premature_scheduling_delta_us += in btif_a2dp_source_accumulate_scheduling_stats() 282 dst->max_premature_scheduling_delta_us = in btif_a2dp_source_accumulate_scheduling_stats() [all …]
|
/system/core/libbacktrace/ |
D | backtrace_read_benchmarks.cpp | 69 static size_t ProcessVmRead(pid_t pid, uint64_t remote_src, void* dst, size_t len) { in ProcessVmRead() argument 71 .iov_base = dst, .iov_len = len, in ProcessVmRead() 93 static size_t PtraceRead(pid_t pid, uint64_t addr, void* dst, size_t bytes) { in PtraceRead() argument 100 memcpy(dst, &data, sizeof(long)); in PtraceRead() 101 dst = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(dst) + sizeof(long)); in PtraceRead() 111 memcpy(dst, &data, left_over); in PtraceRead()
|