[FFmpeg-devel] [PATCH]Two patches from github

Carl Eugen Hoyos cehoyos at ag.or.at
Mon May 15 13:40:23 EEST 2017


Hi!

Attached patches have found their way into a github merge request, 
I will commit them if nobody objects.

Carl Eugen
-------------- next part --------------
From 16ea42a6337db216a605cc211df88eb6bb3dfda8 Mon Sep 17 00:00:00 2001
From: Arnav Gupta <championswimmer at gmail.com>
Date: Wed, 10 Feb 2016 05:36:59 +0530
Subject: [PATCH 1/2] libavutil: fix old style function definition warnings

Change-Id: I879cef5a97542bba4a0923a79b94d044d62fcb7d
Signed-off-by: Arnav Gupta <championswimmer at gmail.com>
---
 libavutil/murmur3.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/murmur3.c b/libavutil/murmur3.c
index 4271e01..ef853f4 100644
--- a/libavutil/murmur3.c
+++ b/libavutil/murmur3.c
@@ -60,7 +60,7 @@ static uint64_t inline get_k1(const uint8_t *src)
     return k;
 }
 
-static uint64_t inline get_k2(const uint8_t *src)
+static inline uint64_t get_k2(const uint8_t *src)
 {
     uint64_t k = AV_RL64(src + 8);
     k *= c2;
@@ -69,7 +69,7 @@ static uint64_t inline get_k2(const uint8_t *src)
     return k;
 }
 
-static uint64_t inline update_h1(uint64_t k, uint64_t h1, uint64_t h2)
+static inline uint64_t update_h1(uint64_t k, uint64_t h1, uint64_t h2)
 {
     k ^= h1;
     k = ROT(k, 27);
@@ -79,7 +79,7 @@ static uint64_t inline update_h1(uint64_t k, uint64_t h1, uint64_t h2)
     return k;
 }
 
-static uint64_t inline update_h2(uint64_t k, uint64_t h1, uint64_t h2)
+static inline uint64_t update_h2(uint64_t k, uint64_t h1, uint64_t h2)
 {
     k ^= h2;
     k = ROT(k, 31);
-- 
1.7.10.4

-------------- next part --------------
From 42766f345dbf398716c6fd9072f072f5fa91c940 Mon Sep 17 00:00:00 2001
From: Steve Kondik <steve at cyngn.com>
Date: Tue, 16 Dec 2014 01:37:57 -0800
Subject: [PATCH 2/2] avutil: Use _SC_NPROCESSORS_CONF

 * On most Android devices, CPUs can appear and disappear due to hotplug
   or CPU cluster management. Use the total number of CPUs instead so
   that multithreaded decoding is properly optimized.

Change-Id: I1cbf000a1bda7b3abf0a84e971e752f176857385
---
 libavutil/cpu.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 16e0c92..ab0965b 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -282,6 +282,8 @@ int av_cpu_count(void)
 
     if (sysctl(mib, 2, &nb_cpus, &len, NULL, 0) == -1)
         nb_cpus = 0;
+#elif defined(__ANDROID__) && HAVE_SYSCONF && defined(_SC_NPROCESSORS_CONF)
+    nb_cpus = sysconf(_SC_NPROCESSORS_CONF);
 #elif HAVE_SYSCONF && defined(_SC_NPROC_ONLN)
     nb_cpus = sysconf(_SC_NPROC_ONLN);
 #elif HAVE_SYSCONF && defined(_SC_NPROCESSORS_ONLN)
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list