Bug 1880804 [wpt PR 44645] - Implement constructor in RTCEncodedVideoFrame, a=testonly
[gecko.git] / third_party / libwebrtc / moz-patch-stack / 0021.patch
blob3dd0c298a187a31fb0deb500203dc32b40419d64
1 From: Wang Qing <wangqing-hf@loongson.cn>
2 Date: Wed, 25 Sep 2019 14:15:00 +0000
3 Subject: Bug 1579834 - [WebRTC] Add mips64 support; r=dminor
5 Differential Revision: https://phabricator.services.mozilla.com/D45620
6 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/1387b2c480b55ecca3fbdf62bd7649dafc62438d
7 ---
8 modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc | 2 +-
9 modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc | 6 +++---
10 2 files changed, 4 insertions(+), 4 deletions(-)
12 diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
13 index 5afd105949..9b77388f10 100644
14 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
15 +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc
16 @@ -46,7 +46,7 @@ const char kVp8PostProcArmFieldTrial[] = "WebRTC-VP8-Postproc-Config-Arm";
17 const char kVp8PostProcFieldTrial[] = "WebRTC-VP8-Postproc-Config";
19 #if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || \
20 - defined(WEBRTC_ANDROID)
21 + defined(WEBRTC_ANDROID) || defined(WEBRTC_ARCH_MIPS)
22 constexpr bool kIsArm = true;
23 #else
24 constexpr bool kIsArm = false;
25 diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
26 index 52ef6231ea..bff70ed70d 100644
27 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
28 +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc
29 @@ -749,7 +749,7 @@ int LibvpxVp8Encoder::InitEncode(const VideoCodec* inst,
32 int LibvpxVp8Encoder::GetCpuSpeed(int width, int height) {
33 -#ifdef MOBILE_ARM
34 +#if defined(MOBILE_ARM) || defined(WEBRTC_ARCH_MIPS)
35 // On mobile platform, use a lower speed setting for lower resolutions for
36 // CPUs with 4 or more cores.
37 RTC_DCHECK_GT(number_of_cores_, 0);
38 @@ -782,7 +782,7 @@ int LibvpxVp8Encoder::GetCpuSpeed(int width, int height) {
41 int LibvpxVp8Encoder::NumberOfThreads(int width, int height, int cpus) {
42 -#if defined(WEBRTC_ANDROID)
43 +#if defined(WEBRTC_ANDROID) || defined(WEBRTC_ARCH_MIPS)
44 if (width * height >= 320 * 180) {
45 if (cpus >= 4) {
46 // 3 threads for CPUs with 4 and more cores since most of times only 4
47 @@ -854,7 +854,7 @@ int LibvpxVp8Encoder::InitAndSetControlSettings() {
48 // for getting the denoised frame from the encoder and using that
49 // when encoding lower resolution streams. Would it work with the
50 // multi-res encoding feature?
51 -#ifdef MOBILE_ARM
52 +#if defined(MOBILE_ARM) || defined(WEBRTC_ARCH_MIPS)
53 denoiserState denoiser_state = kDenoiserOnYOnly;
54 #else
55 denoiserState denoiser_state = kDenoiserOnAdaptive;