summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-19 22:14:43 +0200
committerGitHub <noreply@github.com>2020-05-19 22:14:43 +0200
commit750b4c3a11e6ed4d92598072899b02c549f17d26 (patch)
tree75e1ec3ab5ecec3a0ec29a176a3b46ef33609b76 /media
parentffb32138cbe23dc275ec409770246739f9678cef (diff)
parent052a035958d43c3fb0a980c0c7a93ad2073afddf (diff)
downloadUXP-750b4c3a11e6ed4d92598072899b02c549f17d26.tar
UXP-750b4c3a11e6ed4d92598072899b02c549f17d26.tar.gz
UXP-750b4c3a11e6ed4d92598072899b02c549f17d26.tar.lz
UXP-750b4c3a11e6ed4d92598072899b02c549f17d26.tar.xz
UXP-750b4c3a11e6ed4d92598072899b02c549f17d26.zip
Merge pull request #1544 from FlyGoat/mips-upstream
Implements initial MIPS Support
Diffstat (limited to 'media')
-rw-r--r--media/mtransport/third_party/nrappkit/src/util/libekr/r_memory.c2
-rw-r--r--media/webrtc/trunk/build/build_config.h14
-rw-r--r--media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc7
3 files changed, 16 insertions, 7 deletions
diff --git a/media/mtransport/third_party/nrappkit/src/util/libekr/r_memory.c b/media/mtransport/third_party/nrappkit/src/util/libekr/r_memory.c
index a5c709d41..e9d001cec 100644
--- a/media/mtransport/third_party/nrappkit/src/util/libekr/r_memory.c
+++ b/media/mtransport/third_party/nrappkit/src/util/libekr/r_memory.c
@@ -51,7 +51,7 @@ typedef struct r_malloc_chunk_ {
#endif
UCHAR type;
UINT4 size;
- UCHAR memory[1];
+ UINT8 memory[1];
} r_malloc_chunk;
#define CHUNK_MEMORY_OFFSET offsetof(struct r_malloc_chunk_, memory)
diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h
index 8966586a7..93a28855b 100644
--- a/media/webrtc/trunk/build/build_config.h
+++ b/media/webrtc/trunk/build/build_config.h
@@ -114,11 +114,6 @@
#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__pnacl__)
#define ARCH_CPU_32_BITS 1
-#elif defined(__MIPSEL__)
-#define ARCH_CPU_MIPS_FAMILY 1
-#define ARCH_CPU_MIPSEL 1
-#define ARCH_CPU_32_BITS 1
-#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__powerpc64__)
#define ARCH_CPU_PPC_FAMILY 1
#define ARCH_CPU_PPC64 1
@@ -140,7 +135,16 @@
#elif defined(__mips__)
#define ARCH_CPU_MIPS_FAMILY 1
#define ARCH_CPU_MIPS 1
+#if defined(__LP64__)
+#define ARCH_CPU_64_BITS 1
+#else
#define ARCH_CPU_32_BITS 1
+#endif
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define ARCH_CPU_LITTLE_ENDIAN 1
+#else
+#define ARCH_CPU_BIG_ENDIAN 1
+#endif
#elif defined(__hppa__)
#define ARCH_CPU_HPPA 1
#define ARCH_CPU_32_BITS 1
diff --git 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
index c48f96db3..b6a9fc596 100644
--- 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
@@ -615,6 +615,11 @@ int VP8EncoderImpl::SetCpuSpeed(int width, int height) {
// On mobile platform, always set to -12 to leverage between cpu usage
// and video quality.
return -12;
+#elif defined(WEBRTC_ARCH_MIPS)
+ // On mips platform, temporarily set to -12 to leverage between cpu usage
+ // and video quality.
+ // TODO: Once improved the coding performance,recover the complexity setting.
+ return -12;
#else
// For non-ARM, increase encoding complexity (i.e., use lower speed setting)
// if resolution is below CIF. Otherwise, keep the default/user setting
@@ -1103,7 +1108,7 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst,
cfg.h = cfg.w = 0; // set after decode
vpx_codec_flags_t flags = 0;
-#ifndef WEBRTC_ARCH_ARM
+#if !defined(WEBRTC_ARCH_ARM) && !defined(WEBRTC_ARCH_MIPS)
flags = VPX_CODEC_USE_POSTPROC;
#ifdef INDEPENDENT_PARTITIONS
flags |= VPX_CODEC_USE_INPUT_PARTITION;