Files
Michael Froman 06e90addc7 Bug 1952339 - Vendor libwebrtc from 995688c8e8
We already cherry-picked this when we vendored f30c044cf9.

Upstream commit: https://webrtc.googlesource.com/src/+/995688c8e85b520d50961486abbe0cc03eae9558
    Revert "more p2p cleanups"

    This reverts commit f30c044cf9bd06f91017c171d98690094ce6d88b.

    Reason for revert: breaks roll to chromium: https://ci.chromium.org/ui/p/chromium/builders/try/mac_chromium_compile_dbg_ng/2290104/overview

    Original change's description:
    > more p2p cleanups
    >
    > Move test code from p2p/base and rtc_base/ into p2p/test/
    > This p2p/base much less crowded and
    > clarifies that the rtc_base/nat* is in fact only test code.
    >
    > BUG=webrtc:0
    >
    > Change-Id: I4d14fae24cb0eff6783962f4b4483b560367ca5d
    > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/378900
    > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
    > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    > Auto-Submit: Jonas Oreland <jonaso@webrtc.org>
    > Cr-Commit-Position: refs/heads/main@{#43995}

    Bug: webrtc:0
    Change-Id: I6c79fa85f53fdb9a1dacbe38911771f9a4289c76
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/379040
    Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
    Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org>
    Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#43999}

Differential Revision: https://phabricator.services.mozilla.com/D244009
2025-03-07 16:59:33 -06:00

66 lines
2.9 KiB
Diff

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;