Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 220) sorted by relevance

123456789

/packages/modules/Bluetooth/system/bta/le_audio/
Dstorage_helper.cc91 auto* ptr = out.data(); in serializePacs() local
94 UINT8_TO_STREAM(ptr, LEAUDIO_PACS_STORAGE_CURRENT_LAYOUT_MAGIC); in serializePacs()
95 UINT8_TO_STREAM(ptr, num_of_pacs); in serializePacs()
103 UINT16_TO_STREAM(ptr, handle); in serializePacs()
104 UINT16_TO_STREAM(ptr, ccc_handle); in serializePacs()
105 UINT8_TO_STREAM(ptr, pac_recs.size()); in serializePacs()
115 UINT8_TO_STREAM(ptr, pac_len - 1 /* Minus size */); in serializePacs()
118 UINT8_TO_STREAM(ptr, pac.codec_id.coding_format); in serializePacs()
119 UINT16_TO_STREAM(ptr, pac.codec_id.vendor_company_id); in serializePacs()
120 UINT16_TO_STREAM(ptr, pac.codec_id.vendor_codec_id); in serializePacs()
[all …]
/packages/modules/StatsD/lib/libkll/encoding/
Dvarint.h30 static char* Encode32(char* ptr, uint32_t v);
31 static char* Encode64(char* ptr, uint64_t v);
39 static char* Encode32Inline(char* ptr, uint32_t v);
52 uint8_t* ptr = reinterpret_cast<uint8_t*>(sptr); in Encode32Inline() local
55 *(ptr++) = static_cast<uint8_t>(v); in Encode32Inline()
57 *(ptr++) = static_cast<uint8_t>(v | B); in Encode32Inline()
58 *(ptr++) = static_cast<uint8_t>(v >> 7); in Encode32Inline()
60 *(ptr++) = static_cast<uint8_t>(v | B); in Encode32Inline()
61 *(ptr++) = static_cast<uint8_t>((v >> 7) | B); in Encode32Inline()
62 *(ptr++) = static_cast<uint8_t>(v >> 14); in Encode32Inline()
[all …]
Dvarint.cpp29 unsigned char* ptr = reinterpret_cast<unsigned char*>(sptr); in Encode64() local
34 *(ptr++) = x32; in Encode64()
35 *(ptr++) = y32 >> 7; in Encode64()
36 *(ptr++) = x32 >> 14; in Encode64()
37 *(ptr++) = y32 >> 21; in Encode64()
39 *(ptr++) = v >> 28; in Encode64()
40 return reinterpret_cast<char*>(ptr); in Encode64()
42 *(ptr++) = (v >> 28) | (1 << 7); in Encode64()
43 return Varint::Encode32(reinterpret_cast<char*>(ptr), v >> 35); in Encode64()
/packages/modules/Virtualization/vmbase/src/
Dheap.rs25 use core::ptr;
26 use core::ptr::NonNull;
69 let ptr = unsafe { alloc(layout) }; in aligned_boxed_slice() localVariable
70 let ptr = NonNull::new(ptr)?.as_ptr(); in aligned_boxed_slice() localVariable
71 let slice_ptr = ptr::slice_from_raw_parts_mut(ptr, size); in aligned_boxed_slice()
79 allocate(size, false).map_or(ptr::null_mut(), |p| p.cast::<c_void>().as_ptr()) in malloc()
84 let Some(size) = nmemb.checked_mul(size) else { return ptr::null_mut() }; in calloc()
85 allocate(size, true).map_or(ptr::null_mut(), |p| p.cast::<c_void>().as_ptr()) in calloc()
98 ptr::write_bytes(dest, val, len); in __memset_chk()
108 unsafe extern "C" fn free(ptr: *mut c_void) { in free()
[all …]
/packages/modules/Bluetooth/system/gd/rust/topshim/src/
Dutils.rs40 ptr: *const T, field
47 Self { ptr: std::ptr::null(), _covariant: PhantomData } in null()
54 Self { ptr: val, _covariant: PhantomData } in from_ref()
59 self.ptr as *const CT in cast_into()
65 self.ptr in into()
71 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
77 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
83 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
89 Self { ptr: val.as_ptr(), _covariant: PhantomData } in from()
96 Some(ref v) => Self { ptr: v, _covariant: PhantomData }, in from()
[all …]
/packages/modules/Bluetooth/system/osi/src/
Dallocator.cc56 void* ptr = malloc(size); in osi_malloc() local
57 log::assert_that(ptr != nullptr, "assert failed: ptr != nullptr"); in osi_malloc()
58 return ptr; in osi_malloc()
64 void* ptr = calloc(1, size); in osi_calloc() local
65 log::assert_that(ptr != nullptr, "assert failed: ptr != nullptr"); in osi_calloc()
66 return ptr; in osi_calloc()
69 void osi_free(void* ptr) { free(ptr); } in osi_free() argument
81 OsiObject::OsiObject(void* ptr) : ptr_(ptr) {} in OsiObject() argument
83 OsiObject::OsiObject(const void* ptr) : ptr_(const_cast<void*>(ptr)) {} in OsiObject() argument
92 void* ptr = ptr_; in Release() local
[all …]
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/
DPyramid.cpp46 curr->ptr = y + border; in allocatePyramidPacked()
76 img->ptr = y + border; in allocateImage()
123 base = pyr->ptr[-h] - off; in BorderSpread()
136 base = pyr->ptr[top - pyr->border] - pyr->border; in BorderSpread()
141 base = pyr->ptr[pyr->height + pyr->border - bot] - pyr->border; in BorderSpread()
158 scr->ptr[j2][i] = (short) in BorderExpandOdd()
159 ((6 * in->ptr[j][i] + (in->ptr[j-1][i] + in->ptr[j+1][i]) + 4) >> 3); in BorderExpandOdd()
160 scr->ptr[j2+1][i] = (short)((in->ptr[j][i] + in->ptr[j+1][i] + 1) >> 1); in BorderExpandOdd()
170 out->ptr[j][i2] = (short) (out->ptr[j][i2] + in BorderExpandOdd()
171 (mode * ((6 * scr->ptr[j][i] + in BorderExpandOdd()
[all …]
DBlend.cpp259 memset(imgMos->Y.ptr[0], 255, (imgMos->Y.width * imgMos->Y.height)); in runBlend()
261 memset(imgMos->V.ptr[0], 128, (imgMos->V.width * imgMos->V.height) << 1); in runBlend()
293 imageMosaicYVU = imgMos->Y.ptr[0]; in runBlend()
343 ImageTypeShort yptr = m_pFrameYPyr->ptr[h]; in FillFramePyramid()
344 ImageTypeShort uptr = m_pFrameUPyr->ptr[h]; in FillFramePyramid()
345 ImageTypeShort vptr = m_pFrameVPyr->ptr[h]; in FillFramePyramid()
463 if (imgMos.Y.ptr[y][x] != imgMos.Y.ptr[y][x+1] && in DoMergeAndBlend()
464 imgMos.Y.ptr[y][x] != 255 && in DoMergeAndBlend()
465 imgMos.Y.ptr[y][x+1] != 255) in DoMergeAndBlend()
468 unsigned char idx1 = imgMos.Y.ptr[y][x]; in DoMergeAndBlend()
[all …]
/packages/apps/Gallery2/jni/filters/
Dedge.c38 uint8_t* ptr = destination; in JNIFUNCF() local
62 tmp += *(ptr + (loc - row_stride + 4 + l)); in JNIFUNCF()
63 tmp += *(ptr + (loc + 4 + l)) * 2.0f; in JNIFUNCF()
64 tmp += *(ptr + (loc + row_stride + 4 + l)); in JNIFUNCF()
65 tmp -= *(ptr + (loc - row_stride - 4 + l)); in JNIFUNCF()
66 tmp -= *(ptr + (loc - 4 + l)) * 2.0f; in JNIFUNCF()
67 tmp -= *(ptr + (loc + row_stride - 4 + l)); in JNIFUNCF()
76 tmp -= *(ptr + (loc - row_stride - 4 + l)); in JNIFUNCF()
77 tmp -= *(ptr + (loc - row_stride + l)) * 2.0f; in JNIFUNCF()
78 tmp -= *(ptr + (loc - row_stride + 4 + l)); in JNIFUNCF()
[all …]
/packages/modules/DnsResolver/
Dsethostent.cpp67 char *buf, *ptr; in _hf_gethtbyname2() local
84 if ((ptr = buf = (char*) malloc(len = info->buflen)) == NULL) { in _hf_gethtbyname2()
125 HENT_SCOPY(hent.h_name, h_name, ptr, len); in _hf_gethtbyname2()
129 HENT_SCOPY(aliases[anum], h_alias, ptr, len); in _hf_gethtbyname2()
131 ptr = align_ptr(ptr); in _hf_gethtbyname2()
132 if ((size_t)(ptr - buf) >= info->buflen) goto nospc; in _hf_gethtbyname2()
141 HENT_COPY(addr_ptrs[num], addr, hp->h_length, ptr, len); in _hf_gethtbyname2()
156 ptr = info->buf; in _hf_gethtbyname2()
162 HENT_ARRAY(hp->h_aliases, anum, ptr, len); in _hf_gethtbyname2()
163 HENT_ARRAY(hp->h_addr_list, num, ptr, len); in _hf_gethtbyname2()
[all …]
Dhostent.h50 #define HENT_ARRAY(dst, anum, ptr, len) do { \ argument
53 dst = (char**) ptr; \
54 ptr += _len; \
58 #define HENT_COPY(dst, src, slen, ptr, len) do { \ argument
60 memcpy(ptr, src, (size_t) slen); \
61 dst = ptr; \
62 ptr += slen; \
66 #define HENT_SCOPY(dst, src, ptr, len) do { \ argument
68 HENT_COPY(dst, src, _len, ptr, len); \
/packages/modules/Bluetooth/system/osi/test/fuzzers/allocator/
Dfuzz_allocator.cc39 void* ptr = nullptr; in callArbitraryFunction() local
44 ptr = osi_malloc(size); in callArbitraryFunction()
46 ptr = osi_calloc(size); in callArbitraryFunction()
48 if (ptr) { in callArbitraryFunction()
49 alloc_vector->push_back(ptr); in callArbitraryFunction()
61 void* ptr = alloc_vector->at(index); in callArbitraryFunction() local
62 if (ptr) { in callArbitraryFunction()
64 osi_free(ptr); in callArbitraryFunction()
66 osi_free_and_reset(&ptr); in callArbitraryFunction()
/packages/services/Car/cpp/evs/apps/default/src/
DRenderDirectView.cpp102 RawStreamConfig* ptr = reinterpret_cast<RawStreamConfig*>(streamCfgs.data.i32); in activate() local
104 if (ptr->direction == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT && in activate()
105 ptr->format == HAL_PIXEL_FORMAT_RGBA_8888) { in activate()
106 if (ptr->framerate >= minReqFps && ptr->width * ptr->height > maxArea) { in activate()
107 targetCfg->id = ptr->id; in activate()
108 targetCfg->width = ptr->width; in activate()
109 targetCfg->height = ptr->height; in activate()
110 targetCfg->format = static_cast<PixelFormat>(ptr->format); in activate()
112 maxArea = ptr->width * ptr->height; in activate()
117 ++ptr; in activate()
/packages/modules/Bluetooth/system/test/mock/
Dmock_osi_allocator.cc31 OsiObject::OsiObject(void* ptr) : ptr_(ptr) {} in OsiObject() argument
33 OsiObject::OsiObject(const void* ptr) : ptr_(const_cast<void*>(ptr)) {} in OsiObject() argument
42 void* ptr = ptr_; in Release() local
44 return ptr; in Release()
67 void osi_free(void* ptr) { in osi_free() argument
69 test::mock::osi_allocator::osi_free(ptr); in osi_free()
/packages/modules/Bluetooth/system/embdrv/sbc/decoder/include/
Doi_bitstream.h72 #define OI_BITSTREAM_GetWritePtr(bs) ((bs)->ptr.w - 3)
73 #define OI_BITSTREAM_GetReadPtr(bs) ((bs)->ptr.r - 3)
78 #define OI_BITSTREAM_READUINT(result, bits, ptr, value, bitPtr) \ argument
85 (value) = ((value) << 8) | *(ptr)++; \
96 #define OI_BITSTREAM_WRITEUINT(ptr, value, bitPtr, datum, bits) \ argument
103 *(ptr)++ = (uint8_t)((value) >> 24); \
108 #define OI_BITSTREAM_WRITEFLUSH(ptr, value, bitPtr) \ argument
112 *(ptr)++ = (uint8_t)((value) >> 24); \
/packages/modules/StatsD/statsd/src/
Dhash.cpp30 inline uint32_t DecodeFixed32(const char *ptr) { in DecodeFixed32() argument
31 return ((static_cast<uint32_t>(static_cast<unsigned char>(ptr[0]))) | in DecodeFixed32()
32 (static_cast<uint32_t>(static_cast<unsigned char>(ptr[1])) << 8) | in DecodeFixed32()
33 (static_cast<uint32_t>(static_cast<unsigned char>(ptr[2])) << 16) | in DecodeFixed32()
34 (static_cast<uint32_t>(static_cast<unsigned char>(ptr[3])) << 24)); in DecodeFixed32()
37 inline uint64_t DecodeFixed64(const char* ptr) { in DecodeFixed64() argument
38 uint64_t lo = DecodeFixed32(ptr); in DecodeFixed64()
39 uint64_t hi = DecodeFixed32(ptr + 4); in DecodeFixed64()
/packages/modules/Virtualization/libs/dice/open_dice/src/
Dops.rs27 use std::ptr;
37 ptr::null_mut(), // context in hash()
56 ptr::null_mut(), // context in kdf()
83 ptr::null_mut(), // context
117 ptr::null_mut(), // context
136 ptr::null_mut(), // context in verify()
165 ptr::null_mut(), // context
Dbcc.rs25 use std::{ffi::CStr, ptr};
48 let component_name = values.component_name.map_or(ptr::null(), |name| { in bcc_format_config_descriptor()
107 ptr::null_mut(), // context in bcc_main_flow()
143 ptr::null_mut(), // context in bcc_handover_main_flow()
188 let mut cdi_attest: *const u8 = ptr::null(); in bcc_handover_parse()
189 let mut cdi_seal: *const u8 = ptr::null(); in bcc_handover_parse()
190 let mut chain: *const u8 = ptr::null(); in bcc_handover_parse()
/packages/apps/Nfc/src/com/android/nfc/
DRoutingTableParser.java206 int ptr = 0; in getCommitStatus() local
207 while (entry[ptr] == routingEntry.mEntry[ptr]) { in getCommitStatus()
208 ptr += 1; in getCommitStatus()
210 if (ptr == routingEntry.mEntry.length) { in getCommitStatus()
216 int ptr = 0; in getCommitStatus() local
217 while (entry[ptr] == routingEntry.mEntry[ptr]) { in getCommitStatus()
218 ptr += 1; in getCommitStatus()
220 if (ptr == entry.length) { in getCommitStatus()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/bluetooth/
DBluetoothScanner.java205 for (int ptr = mClients.size() - 1; ptr > -1; ptr--) { in startListening()
206 if (mClients.get(ptr).listener == listener) { in startListening()
256 for (int ptr = mClients.size() - 1; ptr > -1; ptr--) { in stopListening()
257 ClientRecord client = mClients.get(ptr); in stopListening()
259 mClients.remove(ptr); in stopListening()
326 for (int ptr = mClients.size() - 1; ptr > -1; ptr--) { in removeDevice()
327 ClientRecord client = mClients.get(ptr); in removeDevice()
/packages/modules/Bluetooth/system/gd/common/
Dstrings.cc116 char* ptr = nullptr; in Int64FromString() local
118 int64_t value = std::strtoll(str.c_str(), &ptr, 10); in Int64FromString()
123 if (ptr == str.c_str()) { in Int64FromString()
127 if (ptr != (str.c_str() + str.size())) { in Int64FromString()
143 char* ptr = nullptr; in Uint64FromString() local
145 uint64_t value = std::strtoull(str.c_str(), &ptr, 10); in Uint64FromString()
150 if (ptr == str.c_str()) { in Uint64FromString()
154 if (ptr != (str.c_str() + str.size())) { in Uint64FromString()
/packages/modules/Bluetooth/system/bta/groups/
Dgroups.cc184 auto* ptr = out.data(); in SerializeGroups() local
187 UINT8_TO_STREAM(ptr, GROUP_STORAGE_CURRENT_LAYOUT_MAGIC); in SerializeGroups()
188 UINT8_TO_STREAM(ptr, num_groups); in SerializeGroups()
193 UINT8_TO_STREAM(ptr, id); in SerializeGroups()
196 memcpy(ptr, uuid128.data(), Uuid::kNumBytes128); in SerializeGroups()
197 ptr += Uuid::kNumBytes128; in SerializeGroups()
208 auto* ptr = in.data(); in DeserializeGroups() local
211 STREAM_TO_UINT8(magic, ptr); in DeserializeGroups()
215 STREAM_TO_UINT8(num_groups, ptr); in DeserializeGroups()
226 STREAM_TO_UINT8(id, ptr); in DeserializeGroups()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/leveldb/
DLevelDBInstance.java37 private LevelDBInstance(long ptr, String path) { in LevelDBInstance() argument
38 this.mNativePtr = ptr; in LevelDBInstance()
48 long ptr = nativeCreateInstance(path); in createLevelDBInstance() local
49 if (ptr == 0) { in createLevelDBInstance()
53 return new LevelDBInstance(ptr, path); in createLevelDBInstance()
/packages/modules/Bluetooth/system/osi/include/
Dallocator.h26 typedef void (*free_fn)(void* ptr);
42 void osi_free(void* ptr);
52 OsiObject(void* ptr);
53 OsiObject(const void* ptr);
/packages/modules/StatsD/tests/apps/statsdapp/jni/
Dalloc_stress_activity.cpp42 char *ptr = (char *)malloc(s); in Java_com_android_server_cts_device_statsd_StatsdCtsBackgroundService_cmain() local
43 memset(ptr, (int)allocCount >> 10, s); in Java_com_android_server_cts_device_statsd_StatsdCtsBackgroundService_cmain()
45 *((long long *)&ptr[i]) = allocCount + i; in Java_com_android_server_cts_device_statsd_StatsdCtsBackgroundService_cmain()
50 gptr = ptr; in Java_com_android_server_cts_device_statsd_StatsdCtsBackgroundService_cmain()

123456789