Modified media_opt and qm_select to allow for robustness settings

based on the content metrics. Re-organized the class structure in qm_select
into a resolution class and robustness settings class, both derived from
a main (qm/content analysis) class.
Review URL: http://webrtc-codereview.appspot.com/55006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@188 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
marpan@google.com
2011-07-12 17:12:57 +00:00
parent 6bed064e2f
commit 86548c62e9
7 changed files with 425 additions and 311 deletions

View File

@@ -21,6 +21,13 @@
namespace webrtc {
void
VCMProtectionMethod::UpdateContentMetrics(
const VideoContentMetrics* contentMetrics)
{
_qmRobustness->UpdateContent(contentMetrics);
}
bool
VCMProtectionMethod::BetterThan(VCMProtectionMethod *pm)
{
@@ -417,6 +424,10 @@ VCMFecMethod::ProtectionFactor(const VCMProtectionParameters* parameters)
codeRateDelta = plossMax - 1;
}
codeRateDelta = _qmRobustness->AdjustFecFactor(codeRateDelta, bitRate,
parameters->frameRate,
parameters->rtt, packetLoss);
// For Key frame:
// Effectively at a higher rate, so we scale/boost the rate
// The boost factor may depend on several factors: ratio of packet
@@ -462,6 +473,14 @@ VCMFecMethod::ProtectionFactor(const VCMProtectionParameters* parameters)
_protectionFactorK = codeRateKey;
_protectionFactorD = codeRateDelta;
// Set the UEP protection on/off for Key and Delta frames
_uepKey = _qmRobustness->SetUepProtection(codeRateKey, bitRate,
packetLoss, 0);
_uepDelta = _qmRobustness->SetUepProtection(codeRateKey, bitRate,
packetLoss, 1);
// DONE WITH FEC PROTECTION SETTINGS
return true;
}