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