Reland of move VCMQmRobustness. (patchset #1 id:1 of https://codereview.webrtc.org/1935753002/ )
Reason for revert: Not root cause for perf regression (regression still ongoing). Original issue's description: > Revert of Remove VCMQmRobustness. (patchset #1 id:1 of https://codereview.webrtc.org/1917083003/ ) > > Reason for revert: > Speculative revert for perf regression. > > Original issue's description: > > Remove VCMQmRobustness. > > > > Class contained a lot of not-really-wired-up functionality that ended up > > being complicated ways of saying return 1; or return false;. This > > removes this dependency that complicates code readability significantly. > > > > BUG=webrtc:5066 > > R=marpan@google.com, marpan@webrtc.org > > TBR=stefan@webrtc.org > > > > Committed: https://crrev.com/73894369791cb5eedc8788baf918ec07d11d351d > > Cr-Commit-Position: refs/heads/master@{#12516} > > TBR=marpan@webrtc.org,stefan@webrtc.org,marpan@google.com > # Not skipping CQ checks because original CL landed more than 1 days ago. > BUG=webrtc:5066, chromium:607838 > > Committed: https://crrev.com/602316c3cd8556cc78d44f3ea4cd5fc8e70d9417 > Cr-Commit-Position: refs/heads/master@{#12572} TBR=marpan@webrtc.org,stefan@webrtc.org,marpan@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:5066, chromium:607838 Review-Url: https://codereview.webrtc.org/1941643002 Cr-Commit-Position: refs/heads/master@{#12583}
This commit is contained in:
@ -34,19 +34,10 @@ VCMProtectionMethod::VCMProtectionMethod()
|
||||
_protectionFactorD(0),
|
||||
_scaleProtKey(2.0f),
|
||||
_maxPayloadSize(1460),
|
||||
_qmRobustness(new VCMQmRobustness()),
|
||||
_useUepProtectionK(false),
|
||||
_useUepProtectionD(true),
|
||||
_corrFecCost(1.0),
|
||||
_type(kNone) {}
|
||||
|
||||
VCMProtectionMethod::~VCMProtectionMethod() {
|
||||
delete _qmRobustness;
|
||||
}
|
||||
void VCMProtectionMethod::UpdateContentMetrics(
|
||||
const VideoContentMetrics* contentMetrics) {
|
||||
_qmRobustness->UpdateContent(contentMetrics);
|
||||
}
|
||||
VCMProtectionMethod::~VCMProtectionMethod() {}
|
||||
|
||||
VCMNackFecMethod::VCMNackFecMethod(int64_t lowRttNackThresholdMs,
|
||||
int64_t highRttNackThresholdMs)
|
||||
@ -333,17 +324,6 @@ bool VCMFecMethod::ProtectionFactor(const VCMProtectionParameters* parameters) {
|
||||
codeRateDelta = kPacketLossMax - 1;
|
||||
}
|
||||
|
||||
float adjustFec = 1.0f;
|
||||
// Avoid additional adjustments when layers are active.
|
||||
// TODO(mikhal/marco): Update adjusmtent based on layer info.
|
||||
if (parameters->numLayers == 1) {
|
||||
adjustFec = _qmRobustness->AdjustFecFactor(
|
||||
codeRateDelta, parameters->bitRate, parameters->frameRate,
|
||||
parameters->rtt, packetLoss);
|
||||
}
|
||||
|
||||
codeRateDelta = static_cast<uint8_t>(codeRateDelta * adjustFec);
|
||||
|
||||
// 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
|
||||
@ -411,13 +391,6 @@ bool VCMFecMethod::ProtectionFactor(const VCMProtectionParameters* parameters) {
|
||||
_corrFecCost = 0.0f;
|
||||
}
|
||||
|
||||
// TODO(marpan): Set the UEP protection on/off for Key and Delta frames
|
||||
_useUepProtectionK = _qmRobustness->SetUepProtection(
|
||||
codeRateKey, parameters->bitRate, packetLoss, 0);
|
||||
|
||||
_useUepProtectionD = _qmRobustness->SetUepProtection(
|
||||
codeRateDelta, parameters->bitRate, packetLoss, 1);
|
||||
|
||||
// DONE WITH FEC PROTECTION SETTINGS
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user