Bug 1223312 - Part 2: Disable Noise reduction same as ARM. r=jesup
authorhuangwenjun <huangwenjun-hf@loongson.cn>
Wed, 08 Nov 2017 18:33:00 -0500
changeset 444476 f3a200c2049fffcb9687becad107745bb1216463
parent 444475 7184839aee72a94713d010d9c26a91673630cae9
child 444477 56d0ff94578a9a8a2ebd7132846e2222116d0d9e
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1223312
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1223312 - Part 2: Disable Noise reduction same as ARM. r=jesup
media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
--- a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -602,17 +602,17 @@ int VP8EncoderImpl::InitAndSetControlSet
   // Enable denoising for the highest resolution stream, and for
   // the second highest resolution if we are doing more than 2
   // spatial layers/streams.
   // TODO(holmer): Investigate possibility of adding a libvpx API
   // for getting the denoised frame from the encoder and using that
   // 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(ANDROID) || defined(WEBRTC_ARCH_MIPS)
   denoiser_state = kDenoiserOnYOnly;
 #else
   denoiser_state = kDenoiserOnAdaptive;
 #endif
   vpx_codec_control(&encoders_[0], VP8E_SET_NOISE_SENSITIVITY,
                     codec_.VP8()->denoisingOn ? denoiser_state : kDenoiserOff);
   if (encoders_.size() > 2) {
     vpx_codec_control(
@@ -1028,17 +1028,17 @@ int VP8DecoderImpl::InitDecode(const Vid
   }
   vpx_codec_dec_cfg_t cfg;
   // Setting number of threads to a constant value (1)
   cfg.threads = 1;
   cfg.h = cfg.w = 0;  // set after decode
 
   vpx_codec_flags_t flags = 0;
 #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \
-  !defined(ANDROID)
+  !defined(ANDROID) && !defined(WEBRTC_ARCH_MIPS)
   flags = VPX_CODEC_USE_POSTPROC;
 #endif
 
   if (vpx_codec_dec_init(decoder_, vpx_codec_vp8_dx(), &cfg, flags)) {
     delete decoder_;
     decoder_ = nullptr;
     return WEBRTC_VIDEO_CODEC_MEMORY;
   }
@@ -1069,17 +1069,17 @@ int VP8DecoderImpl::Decode(const Encoded
   if (input_image._buffer == NULL && input_image._length > 0) {
     // Reset to avoid requesting key frames too often.
     if (propagation_cnt_ > 0)
       propagation_cnt_ = 0;
     return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
   }
 
 #if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_ARM64) && \
-  !defined(ANDROID)
+  !defined(ANDROID) && !defined(WEBRTC_ARCH_MIPS)
   vp8_postproc_cfg_t ppcfg;
   // MFQE enabled to reduce key frame popping.
   ppcfg.post_proc_flag = VP8_MFQE | VP8_DEBLOCK;
   // For VGA resolutions and lower, enable the demacroblocker postproc.
   if (last_frame_width_ * last_frame_height_ <= 640 * 360) {
     ppcfg.post_proc_flag |= VP8_DEMACROBLOCK;
   }
   // Strength of deblocking filter. Valid range:[0,16]