Rounding error fix in media_opt_util.
Review URL: https://webrtc-codereview.appspot.com/1013006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3351 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -309,8 +309,10 @@ VCMFecMethod::AvgRecoveryFEC(const VCMProtectionParameters* parameters) const
|
|||||||
const float protectionFactor = static_cast<float>(_protectionFactorD) /
|
const float protectionFactor = static_cast<float>(_protectionFactorD) /
|
||||||
255.0;
|
255.0;
|
||||||
|
|
||||||
|
// Round down for estimated #FEC packets/frame, to keep
|
||||||
|
// |fecPacketsPerFrame| <= |sourcePacketsPerFrame|.
|
||||||
WebRtc_UWord8 fecPacketsPerFrame = static_cast<WebRtc_UWord8>
|
WebRtc_UWord8 fecPacketsPerFrame = static_cast<WebRtc_UWord8>
|
||||||
(0.5 + protectionFactor * avgTotPackets);
|
(protectionFactor * avgTotPackets);
|
||||||
|
|
||||||
WebRtc_UWord8 sourcePacketsPerFrame = avgTotPackets - fecPacketsPerFrame;
|
WebRtc_UWord8 sourcePacketsPerFrame = avgTotPackets - fecPacketsPerFrame;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user