Home
last modified time | relevance | path

Searched refs:packet_mask (Results 1 – 12 of 12) sorted by relevance

/external/webrtc/modules/rtp_rtcp/source/
Dflexfec_header_reader_writer_unittest.cc60 std::unique_ptr<uint8_t[]> packet_mask(new uint8_t[kFlexfecMaxPacketSize]); in GeneratePacketMask() local
61 memset(packet_mask.get(), 0, kFlexfecMaxPacketSize); in GeneratePacketMask()
63 packet_mask[i] = random.Rand<uint8_t>(); in GeneratePacketMask()
65 return packet_mask; in GeneratePacketMask()
68 void ClearBit(size_t index, uint8_t* packet_mask) { in ClearBit() argument
69 packet_mask[index / 8] &= ~(1 << (7 - index % 8)); in ClearBit()
72 void SetBit(size_t index, uint8_t* packet_mask) { in SetBit() argument
73 packet_mask[index / 8] |= (1 << (7 - index % 8)); in SetBit()
76 rtc::scoped_refptr<Packet> WriteHeader(const uint8_t* packet_mask, in WriteHeader() argument
84 writer.FinalizeFecHeader(kMediaSsrc, kMediaStartSeqNum, packet_mask, in WriteHeader()
[all …]
Dflexfec_header_reader_writer.cc127 uint8_t* const packet_mask = data + kPacketMaskOffset; in ReadFecHeader() local
128 bool k_bit0 = (packet_mask[0] & 0x80) != 0; in ReadFecHeader()
129 uint16_t mask_part0 = ByteReader<uint16_t>::ReadBigEndian(&packet_mask[0]); in ReadFecHeader()
132 ByteWriter<uint16_t>::WriteBigEndian(&packet_mask[0], mask_part0); in ReadFecHeader()
143 bool k_bit1 = (packet_mask[2] & 0x80) != 0; in ReadFecHeader()
148 uint8_t bit15 = (packet_mask[2] >> 6) & 0x01; in ReadFecHeader()
149 packet_mask[1] |= bit15; in ReadFecHeader()
150 uint32_t mask_part1 = ByteReader<uint32_t>::ReadBigEndian(&packet_mask[2]); in ReadFecHeader()
153 ByteWriter<uint32_t>::WriteBigEndian(&packet_mask[2], mask_part1); in ReadFecHeader()
164 bool k_bit2 = (packet_mask[6] & 0x80) != 0; in ReadFecHeader()
[all …]
Dulpfec_header_reader_writer_unittest.cc44 std::unique_ptr<uint8_t[]> packet_mask(new uint8_t[packet_mask_size]); in GeneratePacketMask() local
46 packet_mask[i] = random.Rand<uint8_t>(); in GeneratePacketMask()
48 return packet_mask; in GeneratePacketMask()
51 std::unique_ptr<Packet> WriteHeader(const uint8_t* packet_mask, in WriteHeader() argument
59 writer.FinalizeFecHeader(kMediaSsrc, kMediaStartSeqNum, packet_mask, in WriteHeader()
147 auto packet_mask = GeneratePacketMask(packet_mask_size, 0xabcd); in TEST() local
155 writer.FinalizeFecHeader(kMediaSsrc, kMediaStartSeqNum, packet_mask.get(), in TEST()
165 EXPECT_EQ(0, memcmp(packet + kUlpfecPacketMaskOffset, packet_mask.get(), in TEST()
171 auto packet_mask = GeneratePacketMask(packet_mask_size, 0xabcd); in TEST() local
179 writer.FinalizeFecHeader(kMediaSsrc, kMediaStartSeqNum, packet_mask.get(), in TEST()
[all …]
Dforward_error_correction_internal.cc45 uint8_t* packet_mask) { in FitSubMask() argument
47 memcpy(packet_mask, sub_mask, num_rows * num_sub_mask_bytes); in FitSubMask()
53 packet_mask[pkt_mask_idx] = sub_mask[pkt_mask_idx2]; in FitSubMask()
85 uint8_t* packet_mask) { in ShiftFitSubMask() argument
111 packet_mask[pkt_mask_idx + 1] = shift_left_prev_byte; in ShiftFitSubMask()
130 packet_mask[pkt_mask_idx] = comb_new_byte; in ShiftFitSubMask()
136 packet_mask[pkt_mask_idx] = shift_right_curr_byte; in ShiftFitSubMask()
238 uint8_t* packet_mask, in RemainingPacketProtection() argument
251 end_row, &packet_mask_sub_21[0], packet_mask); in RemainingPacketProtection()
260 &packet_mask[num_fec_for_imp_packets * num_mask_bytes]); in RemainingPacketProtection()
[all …]
Dulpfec_header_reader_writer.cc96 size_t UlpfecHeaderWriter::MinPacketMaskSize(const uint8_t* packet_mask, in MinPacketMaskSize() argument
108 const uint8_t* packet_mask, in FinalizeFecHeader() argument
133 memcpy(&data[12], packet_mask, packet_mask_size); in FinalizeFecHeader()
Dflexfec_header_reader_writer.h73 size_t MinPacketMaskSize(const uint8_t* packet_mask,
81 const uint8_t* packet_mask,
Dulpfec_header_reader_writer.h54 size_t MinPacketMaskSize(const uint8_t* packet_mask,
62 const uint8_t* packet_mask,
Dforward_error_correction.h393 virtual size_t MinPacketMaskSize(const uint8_t* packet_mask,
403 const uint8_t* packet_mask,
Dforward_error_correction_internal.h86 uint8_t* packet_mask);
Dforward_error_correction.cc443 uint8_t packet_mask = in InsertFecPacket() local
446 if (packet_mask & (1 << (7 - bit_idx))) { in InsertFecPacket()
/external/webrtc/modules/rtp_rtcp/test/testFec/
Dtest_fec.cc163 std::unique_ptr<uint8_t[]> packet_mask( in RunTest() local
189 memset(packet_mask.get(), 0, in RunTest()
195 kUseUnequalProtection, &mask_table, packet_mask.get()); in RunTest()
209 packet_mask[i * mask_bytes_per_fec_packet + j / 8]; in RunTest()
Dtest_packet_masks_metrics.cc692 void GetPacketMaskConvertToBitMask(uint8_t* packet_mask, in GetPacketMaskConvertToBitMask() argument
700 packet_mask[i * mask_bytes_fec_packet + j / 8]; in GetPacketMaskConvertToBitMask()
715 std::unique_ptr<uint8_t[]> packet_mask( in ProcessXORPacketMasks() local
725 memset(packet_mask.get(), 0, num_media_packets * mask_bytes_fec_packet); in ProcessXORPacketMasks()
728 memcpy(packet_mask.get(), &mask[0], mask.size()); in ProcessXORPacketMasks()
730 GetPacketMaskConvertToBitMask(packet_mask.get(), num_media_packets, in ProcessXORPacketMasks()