Added metrics test code for the FEC packet masks.

The test computes metrics (average residual loss) for each mask type and size, 
for a given set of loss models (random and bursty), and verifies various 
behaviour of the codes (including relation/comparison to RS code).
Review URL: https://webrtc-codereview.appspot.com/748008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3185 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
marpan@webrtc.org 2012-11-28 19:43:58 +00:00
parent aa46ea0b8b
commit 993494764d
3 changed files with 1297 additions and 7 deletions

View File

@ -0,0 +1,188 @@
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
namespace {
// Maximum number of media packets allowed in this test. The burst mask types
// are currently defined up to (kMaxMediaPacketsTest, kMaxMediaPacketsTest).
const int kMaxMediaPacketsTest = 12;
// Maximum number of FEC codes considered in this test.
const int kNumberCodes = kMaxMediaPacketsTest * (kMaxMediaPacketsTest + 1) / 2;
// For the random mask type: reference level for the maximum average residual
// loss expected for each code size up to:
// (kMaxMediaPacketsTest, kMaxMediaPacketsTest).
const float kMaxResidualLossRandomMask[kNumberCodes] = {
0.009463,
0.022436,
0.007376,
0.033895,
0.012423,
0.004644,
0.043438,
0.019937,
0.008820,
0.003438,
0.051282,
0.025795,
0.012872,
0.006458,
0.003195,
0.057728,
0.032146,
0.016708,
0.009242,
0.005054,
0.003078,
0.063050,
0.037261,
0.021767,
0.012447,
0.007099,
0.003826,
0.002504,
0.067476,
0.042348,
0.026169,
0.015695,
0.009478,
0.005887,
0.003568,
0.001689,
0.071187,
0.046575,
0.031697,
0.019797,
0.012433,
0.007027,
0.004845,
0.002777,
0.001753,
0.074326,
0.050628,
0.034978,
0.021955,
0.014821,
0.009462,
0.006393,
0.004181,
0.003105,
0.001231,
0.077008,
0.054226,
0.038407,
0.026251,
0.018634,
0.011568,
0.008130,
0.004957,
0.003334,
0.002069,
0.001304,
0.079318,
0.057180,
0.041268,
0.028842,
0.020033,
0.014061,
0.009636,
0.006411,
0.004583,
0.002817,
0.001770,
0.001258
};
// For the bursty mask type: reference level for the maximum average residual
// loss expected for each code size up to:
// (kMaxMediaPacketsTest, kMaxMediaPacketsTest).
const float kMaxResidualLossBurstyMask[kNumberCodes] = {
0.033236,
0.053344,
0.026616,
0.064129,
0.036589,
0.021892,
0.071055,
0.043890,
0.028009,
0.018524,
0.075968,
0.049828,
0.033288,
0.022791,
0.016088,
0.079672,
0.054586,
0.037872,
0.026679,
0.019326,
0.014293,
0.082582,
0.058719,
0.042045,
0.030504,
0.022391,
0.016894,
0.012946,
0.084935,
0.062169,
0.045620,
0.033713,
0.025570,
0.019439,
0.015121,
0.011920,
0.086881,
0.065267,
0.048721,
0.037613,
0.028278,
0.022152,
0.017314,
0.013791,
0.011130,
0.088516,
0.067911,
0.051709,
0.040819,
0.030777,
0.024547,
0.019689,
0.015877,
0.012773,
0.010516,
0.089909,
0.070332,
0.054402,
0.043210,
0.034096,
0.026625,
0.021823,
0.017648,
0.014649,
0.011982,
0.010035,
0.091109,
0.072428,
0.056775,
0.045418,
0.036679,
0.028599,
0.023693,
0.019966,
0.016603,
0.013690,
0.011359,
0.009657
};
} // namespace

View File

@ -7,24 +7,38 @@
# be found in the AUTHORS file in the root of the source tree.
{
'targets': [
{
'target_name': 'test_fec',
'targets': [{
'target_name': 'test_fec',
'type': 'executable',
'dependencies': [
'rtp_rtcp',
'<(webrtc_root)/test/test.gyp:test_support_main',
],
],
'include_dirs': [
'../../source',
'../../../../system_wrappers/interface',
],
'sources': [
'test_fec.cc',
],
},
{
'target_name': 'test_packet_masks_metrics',
'type': 'executable',
'dependencies': [
'rtp_rtcp',
'<(webrtc_root)/test/test.gyp:test_support_main',
'rtp_rtcp',
'<(DEPTH)/testing/gtest.gyp:gtest',
],
'include_dirs': [
'../../source',
'<(webrtc_root)/system_wrappers/interface',
],
'sources': [
'test_packet_masks_metrics.cc',
'average_residual_loss_xor_codes.h',
],
},
],
}

File diff suppressed because it is too large Load Diff