Home
last modified time | relevance | path

Searched refs:ByteBuffer (Results 1 – 25 of 316) sorted by relevance

12345678910>>...13

/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DColorSpace.java18 import java.nio.ByteBuffer;
42 ByteBuffer input, ByteBuffer output, int width, int height) { in convertYuv420pToRgba8888()
61 ByteBuffer input, ByteBuffer output, int width, int height) { in convertArgb8888ToRgba8888()
80 ByteBuffer input, ByteBuffer output, int width, int height) { in convertRgba8888ToHsva8888()
99 ByteBuffer input, ByteBuffer output, int width, int height) { in convertRgba8888ToYcbcra8888()
105 private static void expectInputSize(ByteBuffer input, int expectedSize) { in expectInputSize()
113 private static void expectOutputSize(ByteBuffer output, int expectedSize) { in expectOutputSize()
122 ByteBuffer input, ByteBuffer output, int width, int height); in nativeYuv420pToRgba8888()
125 ByteBuffer input, ByteBuffer output, int width, int height); in nativeArgb8888ToRgba8888()
128 ByteBuffer input, ByteBuffer output, int width, int height); in nativeRgba8888ToHsva8888()
[all …]
DPixelUtils.java18 import java.nio.ByteBuffer;
44 public static void copyPixels(ByteBuffer input, in copyPixels()
45 ByteBuffer output, in copyPixels()
67 private static native void nativeCopyPixels(ByteBuffer input, in nativeCopyPixels()
68 ByteBuffer output, in nativeCopyPixels()
DGLToolbox.java24 import java.nio.ByteBuffer;
70 public static void readFbo(int fboId, ByteBuffer pixels, int width, int height) { in readFbo()
76 public static void readTarget(RenderTarget target, ByteBuffer pixels, int width, int height) { in readTarget()
104 setTexturePixels(texId, target, (ByteBuffer)null, width, height); in allocateTexturePixels()
114 public static void setTexturePixels(int texId, int target, ByteBuffer pixels, in setTexturePixels()
120 pixels = ByteBuffer.allocateDirect(width * height * 4); in setTexturePixels()
151 public static void setVboData(int vboId, ByteBuffer data) { in setVboData()
159 ByteBuffer buffer = ByteBuffer.allocateDirect(len).order(ByteOrder.nativeOrder()); in setVboFloats()
/frameworks/libs/net/common/device/com/android/net/module/util/
DIpv6Utils.java40 import java.nio.ByteBuffer;
50 public static ByteBuffer buildIcmpv6Packet(final MacAddress srcMac, final MacAddress dstMac, in buildIcmpv6Packet()
52 final ByteBuffer... options) { in buildIcmpv6Packet()
57 for (ByteBuffer option: options) { in buildIcmpv6Packet()
60 final ByteBuffer packet = ByteBuffer.allocate(etherHeaderLen + ipv6HeaderLen in buildIcmpv6Packet()
73 for (ByteBuffer option : options) { in buildIcmpv6Packet()
92 private static ByteBuffer[] buildIcmpv6Payload(final ByteBuffer payloadHeader, in buildIcmpv6Payload()
93 final ByteBuffer... options) { in buildIcmpv6Payload()
94 final ByteBuffer[] payload = new ByteBuffer[options.length + 1]; in buildIcmpv6Payload()
103 public static ByteBuffer buildRaPacket(final MacAddress srcMac, final MacAddress dstMac, in buildRaPacket()
[all …]
/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/
DBufferPool.java19 import java.nio.ByteBuffer;
28 private final ByteBuffer[] mBuffers;
35 mBuffers = new ByteBuffer[maxBuffers]; in BufferPool()
38 public ByteBuffer acquire(int needed) { in acquire()
48 return ByteBuffer.allocate(chooseCapacity(mInitialBufferSize, needed)); in acquire()
59 public void release(ByteBuffer buffer) { in release()
67 public ByteBuffer grow(ByteBuffer buffer, int needed) { in grow()
70 final ByteBuffer oldBuffer = buffer; in grow()
72 buffer = ByteBuffer.allocate(capacity); in grow()
/frameworks/base/core/java/android/util/apk/
DZipUtils.java23 import java.nio.ByteBuffer;
54 static Pair<ByteBuffer, Long> findZipEndOfCentralDirectoryRecord(RandomAccessFile zip) in findZipEndOfCentralDirectoryRecord()
74 Pair<ByteBuffer, Long> result = findZipEndOfCentralDirectoryRecord(zip, 0); in findZipEndOfCentralDirectoryRecord()
97 private static Pair<ByteBuffer, Long> findZipEndOfCentralDirectoryRecord( in findZipEndOfCentralDirectoryRecord()
121 ByteBuffer buf = ByteBuffer.allocate(ZIP_EOCD_REC_MIN_SIZE + maxCommentSize); in findZipEndOfCentralDirectoryRecord()
133 ByteBuffer eocd = buf.slice(); in findZipEndOfCentralDirectoryRecord()
144 private static int findZipEndOfCentralDirectoryRecord(ByteBuffer zipContents) { in findZipEndOfCentralDirectoryRecord()
209 public static long getZipEocdCentralDirectoryOffset(ByteBuffer zipEndOfCentralDirectory) { in getZipEocdCentralDirectoryOffset()
222 ByteBuffer zipEndOfCentralDirectory, long offset) { in setZipEocdCentralDirectoryOffset()
235 public static long getZipEocdCentralDirectorySizeBytes(ByteBuffer zipEndOfCentralDirectory) { in getZipEocdCentralDirectorySizeBytes()
[all …]
DVerityBuilder.java24 import java.nio.ByteBuffer;
56 public final ByteBuffer verityData;
64 private VerityResult(ByteBuffer verityData, int merkleTreeSize, byte[] rootHash) { in VerityResult()
97 ByteBuffer output = bufferFactory.create( in generateVerityTreeInternal()
101 ByteBuffer tree = slice(output, 0, merkleTreeSize); in generateVerityTreeInternal()
108 @NonNull SignatureInfo signatureInfo, @NonNull ByteBuffer footerOutput) in generateApkVerityFooter()
138 ByteBuffer output = bufferFactory.create( in generateFsVerityRootHash()
142 ByteBuffer tree = slice(output, 0, merkleTreeSize); in generateFsVerityRootHash()
152 @NonNull ByteBuffer apkDigest, @NonNull SignatureInfo signatureInfo) in generateApkVerityRootHash()
156 ByteBuffer footer = ByteBuffer.allocate(CHUNK_SIZE_BYTES).order(ByteOrder.LITTLE_ENDIAN); in generateApkVerityRootHash()
[all …]
DApkSigningBlockUtils.java27 import java.nio.ByteBuffer;
72 Pair<ByteBuffer, Long> eocdAndOffsetInFile = getEocd(apk); in findSignature()
73 ByteBuffer eocd = eocdAndOffsetInFile.first; in findSignature()
81 Pair<ByteBuffer, Long> apkSigningBlockAndOffsetInFile = in findSignature()
83 ByteBuffer apkSigningBlock = apkSigningBlockAndOffsetInFile.first; in findSignature()
87 ByteBuffer apkSignatureSchemeBlock = findApkSignatureSchemeBlock(apkSigningBlock, in findSignature()
211 ByteBuffer eocdBuf = signatureInfo.eocd.duplicate(); in computeContentDigestsPer1MbChunk()
352 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in parseVerityDigestAndVerifySourceLength()
375 public ByteBuffer create(int capacity) { in verifyIntegrityForVerityBasedAlgorithm()
376 return ByteBuffer.allocate(capacity); in verifyIntegrityForVerityBasedAlgorithm()
[all …]
DSignatureInfo.java21 import java.nio.ByteBuffer;
30 public final @NonNull ByteBuffer signatureBlock;
42 public final @NonNull ByteBuffer eocd;
44 SignatureInfo(@NonNull ByteBuffer signatureBlock, long apkSigningBlockOffset, in SignatureInfo()
45 long centralDirOffset, long eocdOffset, @NonNull ByteBuffer eocd) { in SignatureInfo()
DSourceStampVerifier.java38 import java.nio.ByteBuffer;
164 ByteBuffer sourceStampBlock = signatureInfo.signatureBlock; in verify()
165 ByteBuffer sourceStampBlockData = in verify()
172 ByteBuffer signedSignatureSchemes = in verify()
174 Map<Integer, ByteBuffer> signedSignatureSchemeData = new HashMap<>(); in verify()
176 ByteBuffer signedSignatureScheme = in verify()
189 ByteBuffer signatures = ApkSigningBlockUtils.getLengthPrefixedSlice( in verify()
200 ByteBuffer stampAttributeData = getLengthPrefixedSlice(sourceStampBlockData); in verify()
201 ByteBuffer stampAttributeDataSignatures = getLengthPrefixedSlice(sourceStampBlockData); in verify()
230 ByteBuffer sourceStampBlockData, byte[] sourceStampCertificateDigest) in verifySourceStampCertificate()
[all …]
/frameworks/base/tests/GamePerformance/src/android/gameperformance/
DRenderPatch.java18 import java.nio.ByteBuffer;
41 private final ByteBuffer mVertexBuffer;
42 private final ByteBuffer mTextureBuffer;
43 private final ByteBuffer mIndexBuffer;
76 mVertexBuffer = ByteBuffer.allocateDirect(pointCount * VERTEX_STRIDE); in RenderPatch()
79 mTextureBuffer = ByteBuffer.allocateDirect(pointCount * TEXTURE_STRIDE); in RenderPatch()
105 ByteBuffer.allocateDirect( in RenderPatch()
139 public ByteBuffer getVertexBuffer() { in getVertexBuffer()
143 public ByteBuffer getTextureBuffer() { in getTextureBuffer()
147 public ByteBuffer getIndexBuffer() { in getIndexBuffer()
/frameworks/base/opengl/java/android/opengl/
DETC1Util.java23 import java.nio.ByteBuffer;
85 ByteBuffer decodedData = ByteBuffer.allocateDirect(stride*height) in loadTexture()
117 public ETC1Texture(int width, int height, ByteBuffer data) { in ETC1Texture()
139 public ByteBuffer getData() { return mData; } in getData()
143 private ByteBuffer mData;
160 ByteBuffer headerBuffer = ByteBuffer.allocateDirect(ETC1.ETC_PKM_HEADER_SIZE) in createTexture()
170ByteBuffer dataBuffer = ByteBuffer.allocateDirect(encodedSize).order(ByteOrder.nativeOrder()); in createTexture()
194 ByteBuffer compressedImage = ByteBuffer.allocateDirect(encodedImageSize). in compressTexture()
207 ByteBuffer dataBuffer = texture.getData(); in writeTexture()
212ByteBuffer header = ByteBuffer.allocateDirect(ETC1.ETC_PKM_HEADER_SIZE).order(ByteOrder.nativeOrde… in writeTexture()
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/
DRuleBinaryParserTest.java46 import java.nio.ByteBuffer;
116 ByteBuffer rule = in testBinaryStream_validCompoundFormula_noIndexing()
117 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryStream_validCompoundFormula_noIndexing()
155 ByteBuffer rule = in testBinaryString_validCompoundFormula_notConnector_noIndexing()
156 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validCompoundFormula_notConnector_noIndexing()
200 ByteBuffer rule = in testBinaryString_validCompoundFormula_andConnector_noIndexing()
201 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validCompoundFormula_andConnector_noIndexing()
248 ByteBuffer rule = in testBinaryString_validCompoundFormula_orConnector_noIndexing()
249 ByteBuffer.allocate(DEFAULT_FORMAT_VERSION_BYTES.length + ruleBytes.length); in testBinaryString_validCompoundFormula_orConnector_noIndexing()
287 ByteBuffer rule = in testBinaryString_validAtomicFormula_stringValue_noIndexing()
[all …]
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFileUtil.java25 import java.nio.ByteBuffer;
71 public static final int analyzeStyle(@NonNull ByteBuffer buffer, in analyzeStyle()
150 public static long getRevision(@NonNull ByteBuffer buffer, @IntRange(from = 0) int index) { in getRevision()
164 public static String getPostScriptName(@NonNull ByteBuffer buffer, in getPostScriptName()
181 public static int isPostScriptType1Font(@NonNull ByteBuffer buffer, in isPostScriptType1Font()
190 public static int isCollectionFont(@NonNull ByteBuffer buffer) { in isCollectionFont()
191 ByteBuffer copied = buffer.slice(); in isCollectionFont()
204 private static native long nGetFontRevision(@NonNull ByteBuffer buffer, in nGetFontRevision()
208 private static native String nGetFontPostScriptName(@NonNull ByteBuffer buffer, in nGetFontPostScriptName()
212 private static native int nIsPostScriptType1Font(@NonNull ByteBuffer buffer, in nIsPostScriptType1Font()
/frameworks/libs/net/common/framework/com/android/net/module/util/
DIpUtils.java25 import java.nio.ByteBuffer;
45 private static int checksum(ByteBuffer buf, int seed, int start, int end) { in checksum()
82 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv4()
92 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv6()
100 private static byte ipversion(ByteBuffer buf, int headerOffset) { in ipversion()
104 public static short ipChecksum(ByteBuffer buf, int headerOffset) { in ipChecksum()
109 private static short transportChecksum(ByteBuffer buf, int protocol, in transportChecksum()
134 public static short udpChecksum(ByteBuffer buf, int ipOffset, int transportOffset) { in udpChecksum()
142 public static short tcpChecksum(ByteBuffer buf, int ipOffset, int transportOffset, in tcpChecksum()
150 public static short icmpv6Checksum(ByteBuffer buf, int ipOffset, int transportOffset, in icmpv6Checksum()
/frameworks/base/keystore/java/android/security/
DAuthTokenUtils.java23 import java.nio.ByteBuffer;
45 ByteBuffer.wrap(array, 1, 8).order(ByteOrder.nativeOrder()).getLong(); in toHardwareAuthToken()
49 ByteBuffer.wrap(array, 9, 8).order(ByteOrder.nativeOrder()).getLong(); in toHardwareAuthToken()
53 ByteBuffer.wrap(array, 17, 8).order(ByteOrder.nativeOrder()).getLong(); in toHardwareAuthToken()
59 ByteBuffer.wrap(array, 25, 4).order(ByteOrder.BIG_ENDIAN).getInt(); in toHardwareAuthToken()
63 ByteBuffer.wrap(array, 29, 8).order(ByteOrder.BIG_ENDIAN).getLong(); in toHardwareAuthToken()
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryablePrimitive.java26 import java.nio.ByteBuffer;
64 public T unmarshal(ByteBuffer buffer) { in unmarshal()
74 public void marshal(T value, ByteBuffer buffer) { in marshal()
104 private void marshalPrimitive(int value, ByteBuffer buffer) { in marshalPrimitive()
108 private void marshalPrimitive(float value, ByteBuffer buffer) { in marshalPrimitive()
112 private void marshalPrimitive(double value, ByteBuffer buffer) { in marshalPrimitive()
116 private void marshalPrimitive(long value, ByteBuffer buffer) { in marshalPrimitive()
120 private void marshalPrimitive(Rational value, ByteBuffer buffer) { in marshalPrimitive()
125 private void marshalPrimitive(byte value, ByteBuffer buffer) { in marshalPrimitive()
129 private Object unmarshalObject(ByteBuffer buffer) { in unmarshalObject()
DMarshalQueryableArray.java28 import java.nio.ByteBuffer;
48 public void fillPosition(Object arr, int index, ByteBuffer buffer); in fillPosition()
53 public void fillPosition(Object arr, int index, ByteBuffer buffer) { in getPrimitiveArrayFiller()
61 public void fillPosition(Object arr, int index, ByteBuffer buffer) { in getPrimitiveArrayFiller()
69 public void fillPosition(Object arr, int index, ByteBuffer buffer) { in getPrimitiveArrayFiller()
77 public void fillPosition(Object arr, int index, ByteBuffer buffer) { in getPrimitiveArrayFiller()
85 public void fillPosition(Object arr, int index, ByteBuffer buffer) { in getPrimitiveArrayFiller()
96 static void unmarshalPrimitiveArray(Object arr, int size, ByteBuffer buffer,
120 public void marshal(T value, ByteBuffer buffer) {
128 public T unmarshal(ByteBuffer buffer) {
[all …]
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/
DCube.java19 import java.nio.ByteBuffer;
72 ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4); in Cube()
78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); in Cube()
84 mIndexBuffer = ByteBuffer.allocateDirect(indices.length); in Cube()
99 private ByteBuffer mIndexBuffer;
/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/
DIpUtilsTest.java27 import java.nio.ByteBuffer;
41 private int getUnsignedByte(ByteBuffer buf, int offset) { in getUnsignedByte()
45 private int getChecksum(ByteBuffer buf, int offset) { in getChecksum()
81 ByteBuffer packet = ByteBuffer.wrap(new byte[] { in testIpv6TcpChecksum()
127 ByteBuffer packet = ByteBuffer.wrap(new byte[] { in testIpv4UdpChecksum()
/frameworks/base/services/core/java/com/android/server/am/
DLmkdConnection.java40 import java.nio.ByteBuffer;
69 public boolean isReplyExpected(ByteBuffer replyBuf, ByteBuffer dataReceived, in isReplyExpected()
101 private final ByteBuffer mInputBuf =
102 ByteBuffer.allocate(LMKD_REPLY_MAX_SIZE);
113 private ByteBuffer mReplyBuf = null;
264 private boolean write(ByteBuffer buf) { in write()
275 private int read(ByteBuffer buf) { in read()
291 public boolean exchange(ByteBuffer req, ByteBuffer repl) { in exchange()
/frameworks/native/opengl/tests/gldual/src/com/android/gldual/
DTriangleRenderer.java19 import java.nio.ByteBuffer;
121 ByteBuffer vbb = ByteBuffer.allocateDirect(VERTS * 3 * 4); in Triangle()
125 ByteBuffer tbb = ByteBuffer.allocateDirect(VERTS * 2 * 4); in Triangle()
128 ByteBuffer ibb = ByteBuffer.allocateDirect(VERTS * 2); in Triangle()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/
DCpuVideoTrackDecoder.java33 import java.nio.ByteBuffer;
55 private ByteBuffer mDecodedBuffer;
56 private ByteBuffer mUnrotatedBytes;
81 MediaCodec codec, ByteBuffer[] buffers, int bufferIndex, BufferInfo info) { in onDataAvailable()
114 ByteBuffer outBytes = outputVideoFrame.lockBytes(Frame.MODE_WRITE); in copyFrameDataTo()
121 mUnrotatedBytes = ByteBuffer.allocateDirect(mWidth * mHeight * 4); in copyFrameDataTo()
137 private void copyRotate(ByteBuffer input, ByteBuffer output, int rotation) { in copyRotate()
237 ByteBuffer input, ByteBuffer output, int colorFormat, int width, int height) { in convertImage()
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/
DFrame.java23 import java.nio.ByteBuffer;
86 } else if (object instanceof ByteBuffer) { in setObjectValue()
87 setData((ByteBuffer)object); in setObjectValue()
106 public abstract void setData(ByteBuffer buffer, int offset, int length); in setData()
108 public void setData(ByteBuffer buffer) { in setData()
113 setData(ByteBuffer.wrap(bytes, offset, length)); in setData()
116 public abstract ByteBuffer getData(); in getData()
/frameworks/base/core/java/android/os/incremental/
DV4Signature.java29 import java.nio.ByteBuffer;
67 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray()
101 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray()
171 ByteBuffer buffer = ByteBuffer.allocate(size).order(ByteOrder.LITTLE_ENDIAN); in getSignedData()
231 return ByteBuffer.wrap(buffer).order(ByteOrder.LITTLE_ENDIAN).getInt(); in readIntLE()
235 final byte[] buffer = ByteBuffer.wrap(new byte[4]).order(ByteOrder.LITTLE_ENDIAN).putInt( in writeIntLE()
255 private static byte[] readBytes(ByteBuffer buffer) throws IOException { in readBytes()
277 private static void writeBytes(ByteBuffer buffer, byte[] bytes) { in writeBytes()

12345678910>>...13