Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 475) sorted by relevance

12345678910>>...19

/frameworks/native/opengl/libs/EGL/
DBlobCache_test.cpp56 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_F() local
58 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 4)); in TEST_F()
59 ASSERT_EQ('e', buf[0]); in TEST_F()
60 ASSERT_EQ('f', buf[1]); in TEST_F()
61 ASSERT_EQ('g', buf[2]); in TEST_F()
62 ASSERT_EQ('h', buf[3]); in TEST_F()
66 unsigned char buf[2] = { 0xee, 0xee }; in TEST_F() local
69 ASSERT_EQ(size_t(2), mBC->get("ab", 2, buf, 2)); in TEST_F()
70 ASSERT_EQ('c', buf[0]); in TEST_F()
71 ASSERT_EQ('d', buf[1]); in TEST_F()
[all …]
/frameworks/native/libs/gui/tests/
DSurfaceTextureClient_test.cpp221 ANativeWindowBuffer* buf; in TEST_F() local
222 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
223 EXPECT_EQ(1, buf->width); in TEST_F()
224 EXPECT_EQ(1, buf->height); in TEST_F()
225 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F()
226 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F()
231 ANativeWindowBuffer* buf; in TEST_F() local
234 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F()
235 EXPECT_EQ(16, buf->width); in TEST_F()
236 EXPECT_EQ(8, buf->height); in TEST_F()
[all …]
DCpuConsumer_test.cpp166 void checkPixel(const CpuConsumer::LockedBuffer &buf, in checkPixel() argument
169 switch(buf.format) { in checkPixel()
172 uint16_t *bPtr = (uint16_t*)buf.data; in checkPixel()
173 bPtr += y * buf.stride + x; in checkPixel()
191 uint8_t *bPtr = (uint8_t*)buf.data; in checkPixel()
192 bPtr += y * buf.stride + x; in checkPixel()
199 uint16_t *bPtr = ((uint16_t*)buf.data) + y * buf.stride + x; in checkPixel()
206 uint8_t *bPtr = (uint8_t*)buf.data; in checkPixel()
207 bPtr += (y * buf.stride + x) * bytesPerPixel; in checkPixel()
215 ADD_FAILURE() << "Unknown format for check:" << buf.format; in checkPixel()
[all …]
DFillBuffer.cpp25 void fillYV12Buffer(uint8_t* buf, int w, int h, int stride) { in fillYV12Buffer() argument
39 buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity; in fillYV12Buffer()
41 buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = intensity; in fillYV12Buffer()
43 buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 0] = in fillYV12Buffer()
44 buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 1] = in fillYV12Buffer()
45 buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 0] = in fillYV12Buffer()
46 buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 1] = in fillYV12Buffer()
54 void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride, in fillYV12BufferRect() argument
66 buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = inside ? 240 : 64; in fillYV12BufferRect()
70 buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = 16; in fillYV12BufferRect()
[all …]
/frameworks/ml/nn/driver/cache/nnCache/
DnnCache_test.cpp65 uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_P() local
67 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_P()
68 ASSERT_EQ(0xee, buf[0]); in TEST_P()
69 ASSERT_EQ(0xee, buf[1]); in TEST_P()
70 ASSERT_EQ(0xee, buf[2]); in TEST_P()
71 ASSERT_EQ(0xee, buf[3]); in TEST_P()
75 uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_P() local
78 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_P()
79 ASSERT_EQ('e', buf[0]); in TEST_P()
80 ASSERT_EQ('f', buf[1]); in TEST_P()
[all …]
/frameworks/ml/nn/driver/cache/BlobCache/
DBlobCache_test.cpp70 unsigned char buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_P() local
72 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 4)); in TEST_P()
73 ASSERT_EQ('e', buf[0]); in TEST_P()
74 ASSERT_EQ('f', buf[1]); in TEST_P()
75 ASSERT_EQ('g', buf[2]); in TEST_P()
76 ASSERT_EQ('h', buf[3]); in TEST_P()
80 unsigned char buf[2] = { 0xee, 0xee }; in TEST_P() local
83 ASSERT_EQ(size_t(2), mBC->get("ab", 2, buf, 2)); in TEST_P()
84 ASSERT_EQ('c', buf[0]); in TEST_P()
85 ASSERT_EQ('d', buf[1]); in TEST_P()
[all …]
/frameworks/layoutlib/create/src/com/android/tools/layoutlib/java/
DIntegralToString.java139 char[] buf = new char[bufLen]; in intToString()
144 buf[--cursor] = DIGITS[radix * q - i]; in intToString()
149 buf[--cursor] = '-'; in intToString()
152 return new String(buf, cursor, bufLen - cursor); in intToString()
209 char[] buf = (sb != null) ? BUFFER.get() : new char[bufLen];
217 buf[--cursor] = ONES[r];
218 buf[--cursor] = TENS[r];
227 buf[--cursor] = DIGITS[r];
232 buf[--cursor] = '-';
236 sb.append(buf, cursor, bufLen - cursor);
[all …]
/frameworks/base/core/jni/
Dandroid_server_Watchdog.cpp32 char buf[64]; in dumpOneStack() local
34 snprintf(buf, sizeof(buf), "/proc/%d/stack", tid); in dumpOneStack()
35 int stackFd = open(buf, O_RDONLY); in dumpOneStack()
38 strncat(buf, ":\n", sizeof(buf) - strlen(buf) - 1); in dumpOneStack()
39 write(outFd, buf, strlen(buf)); in dumpOneStack()
43 while ((nBytes = read(stackFd, buf, sizeof(buf))) > 0) { in dumpOneStack()
44 write(outFd, buf, nBytes); in dumpOneStack()
56 char buf[128]; in dumpKernelStacks() local
74 snprintf(buf, sizeof(buf), "\n----- begin pid %d kernel stacks -----\n", getpid()); in dumpKernelStacks()
75 write(outFd, buf, strlen(buf)); in dumpKernelStacks()
[all …]
Dandroid_os_SystemProperties.cpp35 char buf[PROPERTY_VALUE_MAX]; in SystemProperties_getSS() local
45 len = property_get(key, buf, ""); in SystemProperties_getSS()
49 rvJ = env->NewStringUTF(buf); in SystemProperties_getSS()
71 char buf[PROPERTY_VALUE_MAX]; in SystemProperties_get_int() local
82 len = property_get(key, buf, ""); in SystemProperties_get_int()
84 result = strtol(buf, &end, 0); in SystemProperties_get_int()
85 if (end == buf) { in SystemProperties_get_int()
101 char buf[PROPERTY_VALUE_MAX]; in SystemProperties_get_long() local
112 len = property_get(key, buf, ""); in SystemProperties_get_long()
114 result = strtoll(buf, &end, 0); in SystemProperties_get_long()
[all …]
/frameworks/native/opengl/tests/EGLTest/
Degl_cache_test.cpp48 uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_F() local
50 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
51 ASSERT_EQ(0xee, buf[0]); in TEST_F()
52 ASSERT_EQ(0xee, buf[1]); in TEST_F()
53 ASSERT_EQ(0xee, buf[2]); in TEST_F()
54 ASSERT_EQ(0xee, buf[3]); in TEST_F()
58 uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_F() local
61 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
62 ASSERT_EQ('e', buf[0]); in TEST_F()
63 ASSERT_EQ('f', buf[1]); in TEST_F()
[all …]
/frameworks/av/media/libstagefright/codecs/aacenc/src/
Dtransform.c42 static void Shuffle(int *buf, int num, const unsigned char* bitTab) in Shuffle() argument
48 part0 = buf; in Shuffle()
49 part1 = buf + num; in Shuffle()
73 static void Radix4First(int *buf, int num) in Radix4First() argument
80 r0 = buf[0] + buf[2]; in Radix4First()
81 r1 = buf[1] + buf[3]; in Radix4First()
82 r2 = buf[0] - buf[2]; in Radix4First()
83 r3 = buf[1] - buf[3]; in Radix4First()
84 r4 = buf[4] + buf[6]; in Radix4First()
85 r5 = buf[5] + buf[7]; in Radix4First()
[all …]
/frameworks/av/media/libstagefright/codecs/aacenc/src/asm/ARMV7/
DR4R8First_v7.s44 VADD.S32 d4, d0, d1 @ r0 = buf[0] + buf[2]@i0 = buf[1] + buf[3]@
45 VSUB.S32 d5, d0, d1 @ r1 = buf[0] - buf[2]@i1 = buf[1] - buf[3]@
46 VSUB.S32 d7, d2, d3 @ r2 = buf[4] - buf[6]@i2 = buf[5] - buf[7]@
47 VADD.S32 d6, d2, d3 @ r3 = buf[4] + buf[6]@i3 = buf[5] + buf[7]@
55 VADD.S32 d4, d8, d9 @ r0 = buf[ 8] + buf[10]@i0 = buf[ 9] + buf[11]@
56 VSUB.S32 d7, d10, d11 @ r1 = buf[12] - buf[14]@i1 = buf[13] - buf[15]@
57 VADD.S32 d6, d10, d11 @ r2 = buf[12] + buf[14]@i2 = buf[13] + buf[15]@
59 VSUB.S32 d5, d8, d9 @ r3 = buf[ 8] - buf[10]@i3 = buf[ 9] - buf[11]@
134 VADD.S32 d4, d0, d1 @ r0 = buf[0] + buf[2]@ r1 = buf[1] + buf[3]@
135 VSUB.S32 d5, d0, d1 @ r2 = buf[0] - buf[2]@ r3 = buf[1] - buf[3]@
[all …]
/frameworks/base/services/net/java/android/net/util/
DIpUtils.java46 private static int checksum(ByteBuffer buf, int seed, int start, int end) { in checksum() argument
48 final int bufPosition = buf.position(); in checksum()
52 buf.position(start); in checksum()
53 ShortBuffer shortBuf = buf.asShortBuffer(); in checksum()
56 buf.position(bufPosition); in checksum()
66 short b = buf.get(start); in checksum()
83 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv4() argument
85 partial += intAbs(buf.getShort(headerOffset + 12)); in pseudoChecksumIPv4()
86 partial += intAbs(buf.getShort(headerOffset + 14)); in pseudoChecksumIPv4()
87 partial += intAbs(buf.getShort(headerOffset + 16)); in pseudoChecksumIPv4()
[all …]
/frameworks/minikin/tests/unittest/
DWordBreakerTests.cpp40 uint16_t buf[] = {'h', 'e', 'l', 'l' ,'o', ' ', 'w', 'o', 'r', 'l', 'd'}; in TEST_F() local
43 breaker.setText(buf, NELEM(buf)); in TEST_F()
50 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST_F()
58 uint16_t buf[] = {'h', 'e', 'l', 0x00AD, 'l' ,'o', ' ', 'w', 'o', 'r', 'l', 'd'}; in TEST_F() local
61 breaker.setText(buf, NELEM(buf)); in TEST_F()
67 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST_F()
75 uint16_t buf[] = {'s', 'u', 'g', 'a', 'r', '-', 'f', 'r', 'e', 'e'}; in TEST_F() local
78 breaker.setText(buf, NELEM(buf)); in TEST_F()
80 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); in TEST_F()
82 EXPECT_EQ((ssize_t)NELEM(buf), breaker.wordEnd()); in TEST_F()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DKeepalivePacketData.java115 ByteBuffer buf = ByteBuffer.allocate(length); in nattKeepalivePacket() local
116 buf.order(ByteOrder.BIG_ENDIAN); in nattKeepalivePacket()
117 buf.putShort((short) 0x4500); // IP version and TOS in nattKeepalivePacket()
118 buf.putShort((short) length); in nattKeepalivePacket()
119 buf.putInt(0); // ID, flags, offset in nattKeepalivePacket()
120 buf.put((byte) 64); // TTL in nattKeepalivePacket()
121 buf.put((byte) OsConstants.IPPROTO_UDP); in nattKeepalivePacket()
122 int ipChecksumOffset = buf.position(); in nattKeepalivePacket()
123 buf.putShort((short) 0); // IP checksum in nattKeepalivePacket()
124 buf.put(srcAddress.getAddress()); in nattKeepalivePacket()
[all …]
/frameworks/base/tools/aapt/
DZipEntry.cpp388 unsigned char buf[kLFHLen]; in read() local
393 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) { in read()
398 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in read()
404 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]); in read()
405 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]); in read()
406 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]); in read()
407 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]); in read()
408 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]); in read()
409 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]); in read()
410 mCompressedSize = ZipEntry::getLongLE(&buf[0x12]); in read()
[all …]
/frameworks/base/services/net/java/android/net/dhcp/
DDhcpPacket.java357 Inet4Address srcIp, short destUdp, short srcUdp, ByteBuffer buf, in fillInPacket() argument
369 buf.clear(); in fillInPacket()
370 buf.order(ByteOrder.BIG_ENDIAN); in fillInPacket()
373 buf.put(ETHER_BROADCAST); in fillInPacket()
374 buf.put(mClientMac); in fillInPacket()
375 buf.putShort((short) OsConstants.ETH_P_IP); in fillInPacket()
382 ipHeaderOffset = buf.position(); in fillInPacket()
383 buf.put(IP_VERSION_HEADER_LEN); in fillInPacket()
384 buf.put(IP_TOS_LOWDELAY); // tos: IPTOS_LOWDELAY in fillInPacket()
385 ipLengthOffset = buf.position(); in fillInPacket()
[all …]
/frameworks/compile/libbcc/bcinfo/include/bcinfo/Wrap/
DBCHeaderField.h48 bool Write(uint8_t* buf, size_t buf_len) { in Write() argument
57 WriteFixedSubfield(static_cast<FixedSubfield>(ID_), buf); in Write()
59 buf + sizeof(FixedSubfield)); in Write()
60 memcpy(buf + kTagLenSize, data_, len_); in Write()
63 memset(buf + fields_len, 0, pad_len); in Write()
68 bool Read(const uint8_t* buf, size_t buf_len) { in Read() argument
71 ReadFixedSubfield(&field, buf); in Read()
73 ReadFixedSubfield(&field, buf + sizeof(FixedSubfield)); in Read()
76 memcpy(data_, buf + kTagLenSize, len_); in Read()
89 static size_t GetDataSizeFromSerialized(const uint8_t* buf) { in GetDataSizeFromSerialized() argument
[all …]
/frameworks/base/tests/touchlag/
Dtouchlag.cpp50 void clearBuffer(Buffer* buf, uint32_t pixel) { in clearBuffer() argument
51 android_memset32(buf->pixels, pixel, buf->s * buf->h * 4); in clearBuffer()
54 void drawTwoPixels(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { in drawTwoPixels() argument
55 if (y>0 && y<ssize_t(buf->h)) { in drawTwoPixels()
56 uint32_t* bits = buf->pixels + y * buf->s; in drawTwoPixels()
57 if (x>=0 && x<ssize_t(buf->w)) { in drawTwoPixels()
61 if ((x+W)>=0 && (x+W)<ssize_t(buf->w)) { in drawTwoPixels()
67 void drawHLine(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { in drawHLine() argument
68 if (y>0 && y<ssize_t(buf->h)) { in drawHLine()
74 if (x+w > buf->w) { in drawHLine()
[all …]
/frameworks/av/media/mtp/tests/
DMtpFfsHandle_test.cpp92 char buf[TEST_PACKET_SIZE + 1]; in TEST_F() local
93 buf[TEST_PACKET_SIZE] = '\0'; in TEST_F()
94 EXPECT_EQ(handle->read(buf, TEST_PACKET_SIZE), TEST_PACKET_SIZE); in TEST_F()
95 EXPECT_STREQ(buf, dummyDataStr.c_str()); in TEST_F()
99 char buf[TEST_PACKET_SIZE + 1]; in TEST_F() local
100 buf[TEST_PACKET_SIZE] = '\0'; in TEST_F()
102 EXPECT_EQ(read(bulk_in, buf, TEST_PACKET_SIZE), TEST_PACKET_SIZE); in TEST_F()
103 EXPECT_STREQ(buf, dummyDataStr.c_str()); in TEST_F()
110 char buf[size + 1]; in TEST_F() local
111 buf[size] = '\0'; in TEST_F()
[all …]
DAsyncIO_test.cpp52 char buf[TEST_PACKET_SIZE + 1]; in TEST_F() local
53 buf[TEST_PACKET_SIZE] = '\0'; in TEST_F()
58 aio.aio_buf = buf; in TEST_F()
65 EXPECT_STREQ(buf, dummyDataStr.c_str()); in TEST_F()
69 char buf[TEST_PACKET_SIZE + 1]; in TEST_F() local
70 buf[TEST_PACKET_SIZE] = '\0'; in TEST_F()
81 EXPECT_EQ(read(dummy_file.fd, buf, TEST_PACKET_SIZE), TEST_PACKET_SIZE); in TEST_F()
82 EXPECT_STREQ(buf, dummyDataStr.c_str()); in TEST_F()
86 char buf[TEST_PACKET_SIZE + 1]; in TEST_F() local
87 buf[TEST_PACKET_SIZE] = '\0'; in TEST_F()
[all …]
/frameworks/av/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/
DR4R8First_v5.s95 add r8, r0, r2 @ r0 = buf[0] + buf[2]@
96 add r9, r1, r3 @ i0 = buf[1] + buf[3]@
98 sub r0, r0, r2 @ r1 = buf[0] - buf[2]@
99 sub r1, r1, r3 @ i1 = buf[1] - buf[3]@
101 add r2, r4, r6 @ r2 = buf[4] + buf[6]@
102 add r3, r5, r7 @ i2 = buf[5] + buf[7]@
104 sub r4, r4, r6 @ r3 = buf[4] - buf[6]@
105 sub r5, r5, r7 @ i3 = buf[5] - buf[7]@
148 add r0, r2, r4 @ r0 = buf[ 8] + buf[10]@
149 add r1, r3, r5 @ i0 = buf[ 9] + buf[11]@
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DResponseData.java36 public abstract void format(ByteArrayOutputStream buf); in format() argument
38 public static void writeLength(ByteArrayOutputStream buf, int length) { in writeLength() argument
43 buf.write(0x81); in writeLength()
45 buf.write(length); in writeLength()
59 public void format(ByteArrayOutputStream buf) { in format() argument
62 buf.write(tag); // tag in format()
63 buf.write(1); // length in format()
64 buf.write(mId); // identifier of item chosen in format()
98 public void format(ByteArrayOutputStream buf) { in format() argument
99 if (buf == null) { in format()
[all …]
/frameworks/minikin/libs/minikin/
DFontLanguage.cpp33 static bool isEmojiSubtag(const char* buf, size_t bufLen, const char* subtag, size_t subtagLen) { in isEmojiSubtag() argument
37 if (strncmp(buf, subtag, subtagLen) != 0) { in isEmojiSubtag()
40 return (bufLen == subtagLen || buf[subtagLen] == '\0' || in isEmojiSubtag()
41 buf[subtagLen] == '-' || buf[subtagLen] == '_'); in isEmojiSubtag()
126 FontLanguage::FontLanguage(const char* buf, size_t length) : FontLanguage() { in FontLanguage() argument
127 size_t firstDelimiterPos = nextDelimiterIndex(buf, length, 0); in FontLanguage()
128 if (isValidLanguageCode(buf, firstDelimiterPos)) { in FontLanguage()
129 mLanguage = packLanguageOrRegion(buf, firstDelimiterPos, 'a', 'a'); in FontLanguage()
142 size_t nextDelimiterPos = nextDelimiterIndex(buf, length, nextComponentStartPos); in FontLanguage()
147 const char* p = buf + nextComponentStartPos; in FontLanguage()
[all …]
/frameworks/native/libs/ui/
DHdrCapabilities.cpp45 int32_t* const buf = static_cast<int32_t*>(buffer); in flatten() local
46 reinterpret_cast<float&>(buf[0]) = mMaxLuminance; in flatten()
47 reinterpret_cast<float&>(buf[1]) = mMaxAverageLuminance; in flatten()
48 reinterpret_cast<float&>(buf[2]) = mMinLuminance; in flatten()
49 buf[3] = static_cast<int32_t>(mSupportedHdrTypes.size()); in flatten()
51 buf[4 + i] = mSupportedHdrTypes[i]; in flatten()
67 int32_t const * const buf = static_cast<int32_t const *>(buffer); in unflatten() local
68 const size_t itemCount = size_t(buf[3]); in unflatten()
75 mMaxLuminance = reinterpret_cast<float const&>(buf[0]); in unflatten()
76 mMaxAverageLuminance = reinterpret_cast<float const&>(buf[1]); in unflatten()
[all …]

12345678910>>...19