Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Unified Diff: webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h

Issue 2269893002: Move InsertZeroColumns and CopyColumn to ::internal. (pt. 1) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Review response. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h
diff --git a/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h b/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h
index 48117514ecad86691c2b3526a34ab473c3153f59..82f02c21e56855511b509dcd5527b7cd861024bb 100644
--- a/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h
+++ b/webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h
@@ -65,6 +65,33 @@ void GeneratePacketMasks(int num_media_packets, int num_fec_packets,
const PacketMaskTable& mask_table,
uint8_t* packet_mask);
+// Inserts |num_zeros| zero columns into |new_mask| at position
+// |new_bit_index|. If the current byte of |new_mask| can't fit all zeros, the
+// byte will be filled with zeros from |new_bit_index|, but the next byte will
+// be untouched.
+void InsertZeroColumns(int num_zeros,
+ uint8_t* new_mask,
+ int new_mask_bytes,
+ int num_fec_packets,
+ int new_bit_index);
+
+// Copies the left most bit column from the byte pointed to by
+// |old_bit_index| in |old_mask| to the right most column of the byte pointed
+// to by |new_bit_index| in |new_mask|. |old_mask_bytes| and |new_mask_bytes|
+// represent the number of bytes used per row for each mask. |num_fec_packets|
+// represent the number of rows of the masks.
+// The copied bit is shifted out from |old_mask| and is shifted one step to
+// the left in |new_mask|. |new_mask| will contain "xxxx xxn0" after this
+// operation, where x are previously inserted bits and n is the new bit.
+void CopyColumn(uint8_t* new_mask,
+ int new_mask_bytes,
+ uint8_t* old_mask,
+ int old_mask_bytes,
+ int num_fec_packets,
+ int new_bit_index,
+ int old_bit_index);
+
} // namespace internal
} // namespace webrtc
+
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FORWARD_ERROR_CORRECTION_INTERNAL_H_

Powered by Google App Engine
This is Rietveld 408576698