Stop using ANDROID macro in favour of WEBRTC_ANDROID.

Since WEBRTC_ANDROID is defined by WebRTC while ANDROID is defined by
Chromium we should stop using ANDROID in WebRTC source code.

Bug: webrtc:8400
Change-Id: I1d59caaabd8af2423e86476b72e0e9185e6c7a3a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/10805
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20306}
This commit is contained in:
Mirko Bonadei
2017-10-16 11:08:54 +02:00
committed by Commit Bot
parent 138d4ac54d
commit c8c71b9d76
4 changed files with 23 additions and 15 deletions

View File

@ -580,7 +580,8 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
}
int VP8EncoderImpl::SetCpuSpeed(int width, int height) {
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|| defined(WEBRTC_ANDROID)
// On mobile platform, use a lower speed setting for lower resolutions for
// CPUs with 4 or more cores.
RTC_DCHECK_GT(number_of_cores_, 0);
@ -605,7 +606,7 @@ int VP8EncoderImpl::SetCpuSpeed(int width, int height) {
}
int VP8EncoderImpl::NumberOfThreads(int width, int height, int cpus) {
#if defined(ANDROID)
#if defined(WEBRTC_ANDROID)
if (width * height >= 320 * 180) {
if (cpus >= 4) {
// 3 threads for CPUs with 4 and more cores since most of times only 4
@ -659,7 +660,8 @@ int VP8EncoderImpl::InitAndSetControlSettings() {
// when encoding lower resolution streams. Would it work with the
// multi-res encoding feature?
denoiserState denoiser_state = kDenoiserOnYOnly;
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|| defined(WEBRTC_ANDROID)
denoiser_state = kDenoiserOnYOnly;
#else
denoiser_state = kDenoiserOnAdaptive;
@ -1056,7 +1058,8 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) {
cfg.threads = 1;
cfg.h = cfg.w = 0; // set after decode
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|| defined(WEBRTC_ANDROID)
vpx_codec_flags_t flags = use_postproc_arm_ ? VPX_CODEC_USE_POSTPROC : 0;
#else
vpx_codec_flags_t flags = VPX_CODEC_USE_POSTPROC;
@ -1095,7 +1098,8 @@ int VP8DecoderImpl::Decode(const EncodedImage& input_image,
}
// Post process configurations.
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|| defined(WEBRTC_ANDROID)
if (use_postproc_arm_) {
vp8_postproc_cfg_t ppcfg;
ppcfg.post_proc_flag = VP8_MFQE;