Home
last modified time | relevance | path

Searched refs:kHeaderSize (Results 1 – 25 of 39) sorted by relevance

12

/external/openscreen/cast/common/channel/
Dmessage_framer.cc22 static constexpr size_t kHeaderSize = sizeof(uint32_t); variable
35 std::vector<uint8_t> out(message_size + kHeaderSize, 0); in Serialize()
37 if (!message.SerializeToArray(&out[kHeaderSize], message_size)) { in Serialize()
44 if (input.size() < kHeaderSize) { in TryDeserialize()
53 if (input.size() < (kHeaderSize + message_size)) { in TryDeserialize()
58 if (!result.message.ParseFromArray(input.data() + kHeaderSize, in TryDeserialize()
62 result.length = kHeaderSize + message_size; in TryDeserialize()
Dmessage_framer_unittest.cc25 static constexpr size_t kHeaderSize = sizeof(uint32_t); variable
34 CastFramerTest() : buffer_(kHeaderSize + kMaxBodySize) {} in CastFramerTest()
134 for (size_t i = kHeaderSize; i < mangled_cast_message.size(); ++i) { in TEST_F()
135 std::fill(mangled_cast_message.begin() + kHeaderSize, in TEST_F()
/external/perfetto/src/ipc/
Dbuffered_frame_deserializer_unittest.cc32 constexpr uint32_t kHeaderSize = sizeof(uint32_t); variable
47 const uint32_t payload_size = static_cast<uint32_t>(size - kHeaderSize); in GetSimpleFrame()
71 memcpy(enc_buf, base::AssumeLittleEndian(&payload_size), kHeaderSize); in GetSimpleFrame()
72 memcpy(enc_buf + kHeaderSize, payload.data(), payload.size()); in GetSimpleFrame()
87 size_t expected_size = expected_frame_with_header.size() - kHeaderSize; in FrameEq()
93 expected_frame_with_header.data() + kHeaderSize, in FrameEq()
112 ASSERT_EQ(size - kHeaderSize, decoded_frame->SerializeAsString().size()); in TEST()
138 serialized_frame.resize(kHeaderSize + payload_size); in TEST()
139 memcpy(serialized_frame.data() + kHeaderSize, payload.data(), payload_size); in TEST()
141 kHeaderSize); in TEST()
[all …]
Dbuffered_frame_deserializer.cc36 constexpr size_t kHeaderSize = sizeof(uint32_t); variable
94 if (size_ < consumed_size + kHeaderSize) in EndReceive()
100 memcpy(base::AssumeLittleEndian(&payload_size), rd_ptr, kHeaderSize); in EndReceive()
106 next_frame_size += kHeaderSize; in EndReceive()
107 rd_ptr += kHeaderSize; in EndReceive()
180 buf.resize(kHeaderSize + payload_size); in Serialize()
181 memcpy(&buf[0], base::AssumeLittleEndian(&payload_size), kHeaderSize); in Serialize()
182 memcpy(&buf[kHeaderSize], payload.data(), payload.size()); in Serialize()
/external/skqp/src/gpu/
DGrMemoryPool.cpp73 size_t blockSize = size + kHeaderSize; in allocate()
121 fHead->fCurrPtr = reinterpret_cast<intptr_t>(fHead) + kHeaderSize; in release()
123 fHead->fFreeSize = fHead->fSize - kHeaderSize; in release()
152 blockSize = SkTMax<size_t>(blockSize, kHeaderSize); in CreateBlock()
159 block->fFreeSize = blockSize - kHeaderSize; in CreateBlock()
160 block->fCurrPtr = reinterpret_cast<intptr_t>(block) + kHeaderSize; in CreateBlock()
189 intptr_t userStart = b + kHeaderSize; in validate()
201 SkASSERT(ptrOffset == kHeaderSize); in validate()
DGrProgramDesc.h123 kHeaderSize = SkAlign4(sizeof(KeyHeader)), enumerator
127 kProcessorKeysOffset = kHeaderOffset + kHeaderSize,
133 kPreAllocSize = kHeaderOffset + kHeaderSize +
/external/webrtc/modules/rtp_rtcp/source/rtcp_packet/
Dtransport_feedback_unittest.cc28 static const int kHeaderSize = 20; variable
152 kHeaderSize + kStatusChunkSize + (kLength * kSmallDeltaSize); in TEST()
163 const size_t kExpectedSizeBytes = kHeaderSize + kStatusChunkSize; in TEST()
175 kHeaderSize + kStatusChunkSize + (kLength * kSmallDeltaSize); in TEST()
188 kHeaderSize + kStatusChunkSize + (kLength * kSmallDeltaSize); in TEST()
201 kHeaderSize + kStatusChunkSize + (kLength * kSmallDeltaSize); in TEST()
213 kHeaderSize + kStatusChunkSize + (kLength * kLargeDeltaSize); in TEST()
226 kHeaderSize + (2 * kStatusChunkSize) + (kLength * kLargeDeltaSize); in TEST()
242 kHeaderSize + kStatusChunkSize + (3 * kLargeDeltaSize) + kSmallDeltaSize; in TEST()
261 kHeaderSize + (3 * kStatusChunkSize) + (kLength * kSmallDeltaSize); in TEST()
[all …]
/external/perfetto/src/profiling/memory/
Dshared_ring_buffer.cc46 constexpr auto kHeaderSize = kAlignment; variable
199 base::AlignUp<kAlignment>(size + kHeaderSize); in BeginWrite()
216 result.data = wr_ptr + kHeaderSize; in BeginWrite()
236 uint8_t* wr_ptr = buf.data - kHeaderSize; in EndWrite()
259 if (avail_read < kHeaderSize) { in BeginRead()
274 const size_t size_with_header = base::AlignUp<kAlignment>(size + kHeaderSize); in BeginRead()
286 rd_ptr += kHeaderSize; in BeginRead()
294 size_t size_with_header = base::AlignUp<kAlignment>(buf.size + kHeaderSize); in EndRead()
/external/llvm-project/compiler-rt/lib/xray/tests/unit/
Dprofile_collector_test.cpp26 static constexpr auto kHeaderSize = 16u; variable
55 ASSERT_GE(B.Size, kHeaderSize); in ValidateBlock()
59 char LocalBuffer[kHeaderSize] = {}; in ValidateBlock()
60 internal_memcpy(LocalBuffer, B.Data, kHeaderSize); in ValidateBlock()
73 char LocalBuffer[kHeaderSize] = {}; in ParseBlockHeader()
74 internal_memcpy(LocalBuffer, B.Data, kHeaderSize); in ParseBlockHeader()
156 auto DStart = static_cast<const char *>(B.Data) + kHeaderSize; in TEST()
/external/webrtc/modules/video_coding/utility/
Divf_file_writer_unittest.cc25 static const int kHeaderSize = 32; variable
68 uint8_t data[kHeaderSize]; in VerifyIvfHeader()
69 ASSERT_EQ(static_cast<size_t>(kHeaderSize), file->Read(data, kHeaderSize)); in VerifyIvfHeader()
169 kHeaderSize + in TEST_F()
/external/bsdiff/
Dtest_utils.cc105 TEST_AND_RETURN_FALSE(contents.size() >= kHeaderSize); in LoadFromFile()
117 static_cast<uint64_t>(kHeaderSize + ctrl_len + diff_len)); in LoadFromFile()
118 extra_len = file_size - kHeaderSize - ctrl_len - diff_len; in LoadFromFile()
120 uint8_t* ptr = contents.data() + kHeaderSize; in LoadFromFile()
/external/tensorflow/tensorflow/core/lib/io/
Drecord_reader.cc152 offset += kHeaderSize + length + kFooterSize; in GetMetadata()
163 data_size + (kHeaderSize + kFooterSize) * entries; in GetMetadata()
197 s = ReadChecksummed(*offset + kHeaderSize, length, record); in ReadRecord()
207 *offset += kHeaderSize + length + kFooterSize; in ReadRecord()
237 *offset += kHeaderSize + length + kFooterSize; in SkipRecords()
Drecord_writer.cc109 char header[kHeaderSize]; in WriteRecord()
129 char header[kHeaderSize]; in WriteRecord()
/external/angle/src/compiler/fuzz/
Dtranslator_fuzzer.cpp101 const size_t kHeaderSize = 128; in LLVMFuzzerTestOneInput() local
103 if (size <= kHeaderSize) in LLVMFuzzerTestOneInput()
182 size -= kHeaderSize; in LLVMFuzzerTestOneInput()
183 data += kHeaderSize; in LLVMFuzzerTestOneInput()
/external/skia/src/utils/
DSkCustomTypeface.cpp313 static constexpr size_t kHeaderSize = 16; variable
315 static_assert(sizeof(gHeaderString) == 1 + kHeaderSize, "need header to be 16 bytes");
320 wstream.write(gHeaderString, kHeaderSize); in onOpenStream()
375 char header[kHeaderSize]; in Deserialize()
376 if (stream->read(header, kHeaderSize) != kHeaderSize || in Deserialize()
377 0 != memcmp(header, gHeaderString, kHeaderSize)) in Deserialize()
/external/swiftshader/tests/fuzzers/
DVertexRoutineFuzzer.cpp94 const size_t kHeaderSize = 1 + 2 * sw::MAX_VERTEX_INPUTS + 32 * sw::VERTEX_TEXTURE_IMAGE_UNITS; in LLVMFuzzerTestOneInput() local
96 if(size <= kHeaderSize) in LLVMFuzzerTestOneInput()
136 const char *glslSource = reinterpret_cast<const char *>(data + kHeaderSize); in LLVMFuzzerTestOneInput()
/external/libchrome/components/policy/core/common/
Dpreg_parser.cc337 const int kHeaderSize = arraysize(kPRegFileHeader); in ReadDataInternal() local
338 if (!preg_data || preg_data_size < kHeaderSize || in ReadDataInternal()
339 memcmp(kPRegFileHeader, preg_data, kHeaderSize) != 0) { in ReadDataInternal()
348 const uint8_t* cursor = preg_data + kHeaderSize; in ReadDataInternal()
/external/vixl/test/
Dtest-pool-manager.cc679 const int kHeaderSize = 4; in TEST() local
690 PoolManager<int32_t> pool_manager(kHeaderSize, in TEST()
712 const int kPoolSize = kVeneerSize * kNumBranches + kHeaderSize; in TEST()
764 VIXL_ASSERT(new_pc == pc + kNewObjectSize + kHeaderSize); in TEST()
775 const int kHeaderSize = 4; in TEST() local
785 PoolManager<int32_t> pool_manager(kHeaderSize, in TEST()
810 const int kPoolSize = kVeneerSize * kNumBranches + kHeaderSize; in TEST()
848 VIXL_ASSERT(new_pc == pc + kBigObjectSize + kHeaderSize); in TEST()
/external/webrtc/modules/rtp_rtcp/source/
Dvideo_rtp_depacketizer_vp8_unittest.cc212 constexpr size_t kHeaderSize = 5; in TEST() local
224 EXPECT_EQ(parsed->video_payload.size(), rtp_payload.size() - kHeaderSize); in TEST()
226 EXPECT_EQ(parsed->video_payload.cdata(), rtp_payload.cdata() + kHeaderSize); in TEST()
/external/lzma/CPP/7zip/Archive/7z/
D7zIn.cpp273 for (unsigned i = 8; i < kHeaderSize; i++) in TestSignature2()
284 RINOK(ReadStream_FALSE(stream, _header, kHeaderSize)); in FindAndReadSignature()
293 memcpy(buf, _header, kHeaderSize); in FindAndReadSignature()
298 UInt32 readSize = kBufSize - kHeaderSize; in FindAndReadSignature()
309 RINOK(stream->Read(buf + kHeaderSize, readSize, &processed)); in FindAndReadSignature()
329 memcpy(_header, p, kHeaderSize); in FindAndReadSignature()
331 return stream->Seek(_arhiveBeginStreamPosition + kHeaderSize, STREAM_SEEK_SET, NULL); in FindAndReadSignature()
336 memmove(buf, buf + processed, kHeaderSize); in FindAndReadSignature()
1556 db.ArcInfo.StartPositionAfterHeader = _arhiveBeginStreamPosition + kHeaderSize; in ReadDatabase2()
1557 db.PhySize = kHeaderSize; in ReadDatabase2()
[all …]
/external/lzma/CPP/7zip/Archive/
DLzmaHandler.cpp313 const UInt32 kHeaderSize = 1 + 4 + 8; in IsArc_Lzma() local
314 if (size < kHeaderSize) in IsArc_Lzma()
326 if (size < kHeaderSize + 2) in IsArc_Lzma()
328 if (p[kHeaderSize] != 0) in IsArc_Lzma()
332 if ((p[kHeaderSize + 1] & 0x80) != 0) in IsArc_Lzma()
/external/skia/src/gpu/
DGrProgramDesc.h171 kHeaderSize = 1, // "header" in ::Build enumerator
174 kPreAllocSize = kHeaderSize +
/external/pdfium/core/fpdfapi/parser/
Dcpdf_hint_tables.cpp101 const uint32_t kHeaderSize = 288; in ReadPageHintTable() local
102 if (hStream->BitsRemaining() < kHeaderSize) in ReadPageHintTable()
264 const uint32_t kHeaderSize = 192; in ReadSharedObjHintTable() local
265 if (hStream->BitsRemaining() < kHeaderSize) in ReadSharedObjHintTable()
/external/tensorflow/tensorflow/core/lib/wav/
Dwav_io.cc143 constexpr size_t kHeaderSize = sizeof(WavHeader); in EncodeAudioAsS16LEWav() local
166 const size_t file_size = kHeaderSize + num_samples * kBytesPerSample; in EncodeAudioAsS16LEWav()
203 data += kHeaderSize; in EncodeAudioAsS16LEWav()
/external/skqp/src/core/
DSkVertices.cpp330 #define kHeaderSize (3 * sizeof(uint32_t)) macro
358 const size_t size = SkAlign4(kHeaderSize + sizes.fArrays); in encode()
378 if (length < kHeaderSize) { in Decode()
402 if (SkAlign4(kHeaderSize + sizes.fArrays) != length) { in Decode()

12