Use mobile platform settings for VP8 and VP9 decoders on all Android builds.

BUG=b/27877683
R=jackychen@webrtc.org, marpan@google.com, marpan@webrtc.org

Review URL: https://codereview.webrtc.org/1841993005 .

Cr-Commit-Position: refs/heads/master@{#12185}
This commit is contained in:
Alex Glaznev
2016-03-31 14:23:27 -07:00
parent 52dce73fac
commit fecb7c3c50
2 changed files with 9 additions and 6 deletions

View File

@ -617,7 +617,7 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
}
int VP8EncoderImpl::SetCpuSpeed(int width, int height) {
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
// On mobile platform, always set to -12 to leverage between cpu usage
// and video quality.
return -12;
@ -672,7 +672,7 @@ 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)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
denoiser_state = kDenoiserOnYOnly;
#else
denoiser_state = kDenoiserOnAdaptive;
@ -1109,7 +1109,8 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) {
cfg.h = cfg.w = 0; // set after decode
vpx_codec_flags_t flags = 0;
#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64)
#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \
!defined(ANDROID)
flags = VPX_CODEC_USE_POSTPROC;
#ifdef INDEPENDENT_PARTITIONS
flags |= VPX_CODEC_USE_INPUT_PARTITION;
@ -1156,7 +1157,8 @@ int VP8DecoderImpl::Decode(const EncodedImage& input_image,
}
#endif
#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64)
#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \
!defined(ANDROID)
vp8_postproc_cfg_t ppcfg;
// MFQE enabled to reduce key frame popping.
ppcfg.post_proc_flag = VP8_MFQE | VP8_DEBLOCK;

View File

@ -35,7 +35,7 @@ namespace webrtc {
// Only positive speeds, range for real-time coding currently is: 5 - 8.
// Lower means slower/better quality, higher means fastest/lower quality.
int GetCpuSpeed(int width, int height) {
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64)
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
return 8;
#else
// For smaller resolutions, use lower speed setting (get some coding gain at
@ -440,7 +440,8 @@ int VP9EncoderImpl::InitAndSetControlSettings(const VideoCodec* inst) {
// The number tile columns will be capped by the encoder based on image size
// (minimum width of tile column is 256 pixels, maximum is 4096).
vpx_codec_control(encoder_, VP9E_SET_TILE_COLUMNS, (config_->g_threads >> 1));
#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64)
#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \
!defined(ANDROID)
// Note denoiser is still off by default until further testing/optimization,
// i.e., codecSpecific.VP9.denoisingOn == 0.
vpx_codec_control(encoder_, VP9E_SET_NOISE_SENSITIVITY,