| Index: webrtc/modules/video_coding/utility/quality_scaler.cc
|
| diff --git a/webrtc/modules/video_coding/utility/quality_scaler.cc b/webrtc/modules/video_coding/utility/quality_scaler.cc
|
| index 99bc6dad223bdaa58fcfcb56da6d451cf0ab0ad4..7ef7c575ba4b699210fca7c4e40f0b557a54d440 100644
|
| --- a/webrtc/modules/video_coding/utility/quality_scaler.cc
|
| +++ b/webrtc/modules/video_coding/utility/quality_scaler.cc
|
| @@ -10,8 +10,15 @@
|
|
|
| #include "webrtc/modules/video_coding/utility/quality_scaler.h"
|
|
|
| +#include <math.h>
|
| +
|
| #include <algorithm>
|
| -#include <cmath>
|
| +
|
| +// TODO(kthelgason): Some versions of Android have issues with log2.
|
| +// See https://code.google.com/p/android/issues/detail?id=212634 for details
|
| +#if defined(WEBRTC_ANDROID)
|
| +#define log2(x) (log(x) / log(2))
|
| +#endif
|
|
|
| namespace webrtc {
|
|
|
| @@ -182,7 +189,7 @@ void QualityScaler::UpdateTargetResolution(int width, int height) {
|
| maximum_shift_ = 0;
|
| } else {
|
| maximum_shift_ = static_cast<int>(
|
| - std::log2(std::min(width, height) / kMinDownscaleDimension));
|
| + log2(std::min(width, height) / kMinDownscaleDimension));
|
| }
|
| target_res_ = Resolution{width, height};
|
| }
|
|
|