Change to return no adjustment (default) if content_metrics=NULL,

and return true (default) for UEP flag if content_metrics=NULL.
Also parameter name change and get function for UEP in media_opt_util.
Review URL: http://webrtc-codereview.appspot.com/70002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@199 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
marpan@google.com
2011-07-13 17:19:49 +00:00
parent 75e1239266
commit 59fd0f12e6
4 changed files with 40 additions and 29 deletions

View File

@@ -424,9 +424,11 @@ VCMFecMethod::ProtectionFactor(const VCMProtectionParameters* parameters)
codeRateDelta = plossMax - 1;
}
codeRateDelta = _qmRobustness->AdjustFecFactor(codeRateDelta, bitRate,
parameters->frameRate,
parameters->rtt, packetLoss);
float adjustFec = _qmRobustness->AdjustFecFactor(codeRateDelta, bitRate,
parameters->frameRate,
parameters->rtt, packetLoss);
codeRateDelta = static_cast<WebRtc_UWord8>(codeRateDelta * adjustFec);
// For Key frame:
// Effectively at a higher rate, so we scale/boost the rate
@@ -474,12 +476,12 @@ VCMFecMethod::ProtectionFactor(const VCMProtectionParameters* parameters)
_protectionFactorD = codeRateDelta;
// Set the UEP protection on/off for Key and Delta frames
_uepKey = _qmRobustness->SetUepProtection(codeRateKey, bitRate,
packetLoss, 0);
// TODO (marpan): Set the UEP protection on/off for Key and Delta frames
_useUepProtectionK = _qmRobustness->SetUepProtection(codeRateKey, bitRate,
packetLoss, 0);
_uepDelta = _qmRobustness->SetUepProtection(codeRateKey, bitRate,
packetLoss, 1);
_useUepProtectionD = _qmRobustness->SetUepProtection(codeRateKey, bitRate,
packetLoss, 1);
// DONE WITH FEC PROTECTION SETTINGS
return true;