File: 0021.patch

package info (click to toggle)
firefox-esr 140.5.0esr-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,538,920 kB
  • sloc: cpp: 7,381,527; javascript: 6,388,905; ansic: 3,710,087; python: 1,393,776; xml: 628,165; asm: 426,916; java: 184,004; sh: 65,744; makefile: 19,302; objc: 13,059; perl: 12,912; yacc: 4,583; cs: 3,846; pascal: 3,352; lex: 1,720; ruby: 1,226; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (65 lines) | stat: -rw-r--r-- 2,976 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Wang Qing <wangqing-hf@loongson.cn>
Date: Wed, 25 Sep 2019 14:15:00 +0000
Subject: Bug 1579834 - [WebRTC] Add mips64 support; r=dminor

Differential Revision: https://phabricator.services.mozilla.com/D45620
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/1387b2c480b55ecca3fbdf62bd7649dafc62438d
---
 modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc | 2 +-
 modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
index 57d2a17833..aa9b20cdf8 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
@@ -47,7 +47,7 @@ const char kVp8PostProcArmFieldTrial[] = "WebRTC-VP8-Postproc-Config-Arm";
 const char kVp8PostProcFieldTrial[] = "WebRTC-VP8-Postproc-Config";
 
 #if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || \
-    defined(WEBRTC_ANDROID)
+    defined(WEBRTC_ANDROID)  || defined(WEBRTC_ARCH_MIPS)
 constexpr bool kIsArm = true;
 #else
 constexpr bool kIsArm = false;
diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
index 8b08272650..542b0ce93e 100644
--- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
+++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
@@ -771,7 +771,7 @@ int LibvpxVp8Encoder::InitEncode(const VideoCodec* inst,
 }
 
 int LibvpxVp8Encoder::GetCpuSpeed(int width, int height) {
-#ifdef MOBILE_ARM
+#if defined(MOBILE_ARM) || defined(WEBRTC_ARCH_MIPS)
   // 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);
@@ -799,6 +799,8 @@ int LibvpxVp8Encoder::GetCpuSpeed(int width, int height) {
 int LibvpxVp8Encoder::NumberOfThreads(int width, int height, int cpus) {
 #if defined(WEBRTC_ANDROID)
   if (android_specific_threading_settings_) {
+#endif
+#if defined(WEBRTC_ANDROID) || defined(WEBRTC_ARCH_MIPS)
     if (width * height >= 320 * 180) {
       if (cpus >= 4) {
         // 3 threads for CPUs with 4 and more cores since most of times only 4
@@ -811,7 +813,9 @@ int LibvpxVp8Encoder::NumberOfThreads(int width, int height, int cpus) {
       }
     }
     return 1;
+#if defined(WEBRTC_ANDROID)
   }
+#endif
 #elif defined(WEBRTC_IOS)
   std::string trial_string =
       env_.field_trials().Lookup(kVP8IosMaxNumberOfThreadFieldTrial);
@@ -869,7 +873,7 @@ int LibvpxVp8Encoder::InitAndSetControlSettings() {
   // 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?
-#ifdef MOBILE_ARM
+#if defined(MOBILE_ARM) || defined(WEBRTC_ARCH_MIPS)
   denoiserState denoiser_state = kDenoiserOnYOnly;
 #else
   denoiserState denoiser_state = kDenoiserOnAdaptive;