OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // packet mask used, and a pointer to the | 58 // packet mask used, and a pointer to the |
59 // corresponding packet masks. | 59 // corresponding packet masks. |
60 // \param[out] packet_mask A pointer to hold the packet mask array, | 60 // \param[out] packet_mask A pointer to hold the packet mask array, |
61 // of size: num_fec_packets * | 61 // of size: num_fec_packets * |
62 // "number of mask bytes". | 62 // "number of mask bytes". |
63 void GeneratePacketMasks(int num_media_packets, int num_fec_packets, | 63 void GeneratePacketMasks(int num_media_packets, int num_fec_packets, |
64 int num_imp_packets, bool use_unequal_protection, | 64 int num_imp_packets, bool use_unequal_protection, |
65 const PacketMaskTable& mask_table, | 65 const PacketMaskTable& mask_table, |
66 uint8_t* packet_mask); | 66 uint8_t* packet_mask); |
67 | 67 |
| 68 // Inserts |num_zeros| zero columns into |new_mask| at position |
| 69 // |new_bit_index|. If the current byte of |new_mask| can't fit all zeros, the |
| 70 // byte will be filled with zeros from |new_bit_index|, but the next byte will |
| 71 // be untouched. |
| 72 void InsertZeroColumns(int num_zeros, |
| 73 uint8_t* new_mask, |
| 74 int new_mask_bytes, |
| 75 int num_fec_packets, |
| 76 int new_bit_index); |
| 77 |
| 78 // Copies the left most bit column from the byte pointed to by |
| 79 // |old_bit_index| in |old_mask| to the right most column of the byte pointed |
| 80 // to by |new_bit_index| in |new_mask|. |old_mask_bytes| and |new_mask_bytes| |
| 81 // represent the number of bytes used per row for each mask. |num_fec_packets| |
| 82 // represent the number of rows of the masks. |
| 83 // The copied bit is shifted out from |old_mask| and is shifted one step to |
| 84 // the left in |new_mask|. |new_mask| will contain "xxxx xxn0" after this |
| 85 // operation, where x are previously inserted bits and n is the new bit. |
| 86 void CopyColumn(uint8_t* new_mask, |
| 87 int new_mask_bytes, |
| 88 uint8_t* old_mask, |
| 89 int old_mask_bytes, |
| 90 int num_fec_packets, |
| 91 int new_bit_index, |
| 92 int old_bit_index); |
| 93 |
68 } // namespace internal | 94 } // namespace internal |
69 } // namespace webrtc | 95 } // namespace webrtc |
| 96 |
70 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FORWARD_ERROR_CORRECTION_INTERNAL_H_ | 97 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FORWARD_ERROR_CORRECTION_INTERNAL_H_ |
OLD | NEW |