video_coding: Update to hybrid mode: Set FEC values for zero below a threshold.

Review URL: http://webrtc-codereview.appspot.com/245001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@773 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2011-10-19 15:48:30 +00:00
parent c693bac6e7
commit d0752c370d
2 changed files with 18 additions and 2 deletions

View File

@ -76,10 +76,17 @@ VCMNackFecMethod::ProtectionFactor(const
// Compute the protection factors
VCMFecMethod::ProtectionFactor(parameters);
if (parameters->rtt < kLowRttNackMs)
{
_protectionFactorD = 0;
_protectionFactorK = 0;
VCMFecMethod::UpdateProtectionFactorD(_protectionFactorD);
VCMFecMethod::UpdateProtectionFactorK(_protectionFactorK);
}
// When in Hybrid mode (RTT range), adjust FEC rates based on the
// RTT (NACK effectiveness) - adjustment factor is in the range [0,1].
if (parameters->rtt < kHighRttNackMs)
else if (parameters->rtt < kHighRttNackMs)
{
// TODO(mikhal): Disabling adjustment temporarily.
// WebRtc_UWord16 rttIndex = (WebRtc_UWord16) parameters->rtt;
@ -90,7 +97,7 @@ VCMNackFecMethod::ProtectionFactor(const
_protectionFactorD = static_cast<WebRtc_UWord8>
(adjustRtt *
static_cast<float>(_protectionFactorD));
// update FEC rates after applyingadjustment softness parameter
// update FEC rates after applying adjustment
VCMFecMethod::UpdateProtectionFactorD(_protectionFactorD);
}
@ -210,6 +217,13 @@ VCMFecMethod::UpdateProtectionFactorD(WebRtc_UWord8 protectionFactorD)
_protectionFactorD = protectionFactorD;
}
// Update FEC with protectionFactorK
void
VCMFecMethod::UpdateProtectionFactorK(WebRtc_UWord8 protectionFactorK)
{
_protectionFactorK = protectionFactorK;
}
// AvgRecoveryFEC: computes the residual packet loss (RPL) function.
// This is the average recovery from the FEC, assuming random packet loss model.
// Computed off-line for a range of FEC code parameters and loss rates.

View File

@ -187,6 +187,8 @@ public:
float AvgRecoveryFEC(const VCMProtectionParameters* parameters) const;
// Update FEC with protectionFactorD
void UpdateProtectionFactorD(WebRtc_UWord8 protectionFactorD);
// Update FEC with protectionFactorK
void UpdateProtectionFactorK(WebRtc_UWord8 protectionFactorK);
};