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 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ |
13 | 13 |
14 // This file contains a set of packets masks for the FEC code. The masks in | 14 // This file contains a set of packets masks for the FEC code. The masks in |
15 // this table are specifically designed to favor recovery of bursty/consecutive | 15 // this table are specifically designed to favor recovery of bursty/consecutive |
16 // loss network conditions. The tradeoff is worse recovery for random losses. | 16 // loss network conditions. The tradeoff is worse recovery for random losses. |
17 // These packet masks are currently defined to protect up to 12 media packets. | 17 // These packet masks are currently defined to protect up to 12 media packets. |
18 // They have the following property: for any packet mask defined by the | 18 // They have the following property: for any packet mask defined by the |
19 // parameters (k,m), where k = number of media packets, m = number of FEC | 19 // parameters (k,m), where k = number of media packets, m = number of FEC |
20 // packets, all "consecutive" losses of size <= m are completely recoverable. | 20 // packets, all "consecutive" losses of size <= m are completely recoverable. |
21 // By consecutive losses we mean consecutive with respect to the sequence | 21 // By consecutive losses we mean consecutive with respect to the sequence |
22 // number ordering of the list (media and FEC) of packets. The difference | 22 // number ordering of the list (media and FEC) of packets. The difference |
23 // between these masks (|kFecMaskBursty|) and |kFecMaskRandom| type, defined | 23 // between these masks (|kFecMaskBursty|) and |kFecMaskRandom| type, defined |
24 // in fec_private_tables.h, is more significant for longer codes | 24 // in fec_private_tables.h, is more significant for longer codes |
25 // (i.e., more packets/symbols in the code, so larger (k,m), i.e., k > 4, | 25 // (i.e., more packets/symbols in the code, so larger (k,m), i.e., k > 4, |
26 // m > 3). | 26 // m > 3). |
27 | 27 |
28 #include "webrtc/typedefs.h" | 28 #include "webrtc/typedefs.h" |
29 | 29 |
30 namespace { | 30 namespace webrtc { |
| 31 namespace fec_private_tables { |
31 | 32 |
32 const uint8_t kMaskBursty1_1[2] = { | 33 const uint8_t kMaskBursty1_1[2] = { |
33 0x80, 0x00 | 34 0x80, 0x00 |
34 }; | 35 }; |
35 | 36 |
36 const uint8_t kMaskBursty2_1[2] = { | 37 const uint8_t kMaskBursty2_1[2] = { |
37 0xc0, 0x00 | 38 0xc0, 0x00 |
38 }; | 39 }; |
39 | 40 |
40 const uint8_t kMaskBursty2_2[4] = { | 41 const uint8_t kMaskBursty2_2[4] = { |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 kPacketMaskBursty5, | 750 kPacketMaskBursty5, |
750 kPacketMaskBursty6, | 751 kPacketMaskBursty6, |
751 kPacketMaskBursty7, | 752 kPacketMaskBursty7, |
752 kPacketMaskBursty8, | 753 kPacketMaskBursty8, |
753 kPacketMaskBursty9, | 754 kPacketMaskBursty9, |
754 kPacketMaskBursty10, | 755 kPacketMaskBursty10, |
755 kPacketMaskBursty11, | 756 kPacketMaskBursty11, |
756 kPacketMaskBursty12 | 757 kPacketMaskBursty12 |
757 }; | 758 }; |
758 | 759 |
759 } // namespace | 760 } // namespace fec_private_tables |
| 761 } // namespace webrtc |
760 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ | 762 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_FEC_PRIVATE_TABLES_BURSTY_H_ |
OLD | NEW |