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 |
11 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h" | 11 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <string.h> | 14 #include <string.h> |
15 | 15 |
16 #include <algorithm> | 16 #include <algorithm> |
17 | 17 |
| 18 #include "webrtc/base/checks.h" |
18 #include "webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h" | 19 #include "webrtc/modules/rtp_rtcp/source/fec_private_tables_bursty.h" |
19 #include "webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h" | 20 #include "webrtc/modules/rtp_rtcp/source/fec_private_tables_random.h" |
20 #include "webrtc/rtc_base/checks.h" | |
21 | 21 |
22 namespace { | 22 namespace { |
23 using webrtc::fec_private_tables::kPacketMaskBurstyTbl; | 23 using webrtc::fec_private_tables::kPacketMaskBurstyTbl; |
24 using webrtc::fec_private_tables::kPacketMaskRandomTbl; | 24 using webrtc::fec_private_tables::kPacketMaskRandomTbl; |
25 | 25 |
26 // Allow for different modes of protection for packets in UEP case. | 26 // Allow for different modes of protection for packets in UEP case. |
27 enum ProtectionMode { | 27 enum ProtectionMode { |
28 kModeNoOverlap, | 28 kModeNoOverlap, |
29 kModeOverlap, | 29 kModeOverlap, |
30 kModeBiasFirstPacket, | 30 kModeBiasFirstPacket, |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 new_mask[new_byte_index] |= ((old_mask[old_byte_index] & 0x80) >> 7); | 423 new_mask[new_byte_index] |= ((old_mask[old_byte_index] & 0x80) >> 7); |
424 if (new_bit_index % 8 != 7) { | 424 if (new_bit_index % 8 != 7) { |
425 new_mask[new_byte_index] <<= 1; | 425 new_mask[new_byte_index] <<= 1; |
426 } | 426 } |
427 old_mask[old_byte_index] <<= 1; | 427 old_mask[old_byte_index] <<= 1; |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 } // namespace internal | 431 } // namespace internal |
432 } // namespace webrtc | 432 } // namespace webrtc |
OLD | NEW |