all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#39719] FFmpeg library preference for dav1d
@ 2020-02-21 17:34 Leo Famulari
  2020-02-21 17:36 ` [bug#39719] [PATCH] gnu: FFmpeg: Prefer dav1d over libaom Leo Famulari
       [not found] ` <handler.39719.B.158230650117144.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2020-02-21 17:34 UTC (permalink / raw)
  To: 39719

This patch, taken from upstream FFmpeg, reorders the library
dependencies in FFmpeg so that the more performant dav1d is preferred
over libaom.

This patch supersedes <https://bugs.gnu.org/39714>.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#39719] [PATCH] gnu: FFmpeg: Prefer dav1d over libaom.
  2020-02-21 17:34 [bug#39719] FFmpeg library preference for dav1d Leo Famulari
@ 2020-02-21 17:36 ` Leo Famulari
  2020-02-21 17:49   ` Leo Famulari
       [not found] ` <handler.39719.B.158230650117144.ack@debbugs.gnu.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2020-02-21 17:36 UTC (permalink / raw)
  To: 39719

* gnu/packages/patches/ffmpeg-prefer-dav1d.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/video.scm (ffmpeg)[source]: Use it.
---
 gnu/local.mk                                  |  1 +
 .../patches/ffmpeg-prefer-dav1d.patch         | 43 +++++++++++++++++++
 gnu/packages/video.scm                        |  1 +
 3 files changed, 45 insertions(+)
 create mode 100644 gnu/packages/patches/ffmpeg-prefer-dav1d.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index f2289518e5..0ebb0f3463 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -857,6 +857,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/fasthenry-spSolve.patch			\
   %D%/packages/patches/fasthenry-spFactor.patch			\
   %D%/packages/patches/fbreader-curl-7.62.patch		\
+  %D%/packages/patches/ffmpeg-prefer-dav1d.patch		\
   %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch		\
   %D%/packages/patches/fifo-map-remove-catch.hpp.patch		\
   %D%/packages/patches/file-CVE-2018-10360.patch		\
diff --git a/gnu/packages/patches/ffmpeg-prefer-dav1d.patch b/gnu/packages/patches/ffmpeg-prefer-dav1d.patch
new file mode 100644
index 0000000000..95e3712a7f
--- /dev/null
+++ b/gnu/packages/patches/ffmpeg-prefer-dav1d.patch
@@ -0,0 +1,43 @@
+When decoding AV1 files, prefer dav1d over libaom for performance
+reasons.
+
+Patch copied from upstream source repository:
+
+<https://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=commitdiff;h=dc0806dd25882f41f6085c8356712f95fded56c7>
+
+From dc0806dd25882f41f6085c8356712f95fded56c7 Mon Sep 17 00:00:00 2001
+From: James Almer <jamrial@gmail.com>
+Date: Sun, 15 Sep 2019 11:29:56 -0300
+Subject: [PATCH] avcodec/allcodecs: make libdav1d the preferred AV1 decoder
+
+It's considerably faster than libaom in most systems.
+
+Reviewed-by: BBB
+Signed-off-by: James Almer <jamrial@gmail.com>
+---
+ libavcodec/allcodecs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
+index 5130fca026..d5dfba1877 100644
+--- a/libavcodec/allcodecs.c
++++ b/libavcodec/allcodecs.c
+@@ -680,7 +680,6 @@ extern AVCodec ff_pcm_mulaw_at_encoder;
+ extern AVCodec ff_pcm_mulaw_at_decoder;
+ extern AVCodec ff_qdmc_at_decoder;
+ extern AVCodec ff_qdm2_at_decoder;
+-extern AVCodec ff_libaom_av1_decoder;
+ extern AVCodec ff_libaom_av1_encoder;
+ extern AVCodec ff_libaribb24_decoder;
+ extern AVCodec ff_libcelt_decoder;
+@@ -738,6 +737,7 @@ extern AVCodec ff_idf_decoder;
+ /* external libraries, that shouldn't be used by default if one of the
+  * above is available */
+ extern AVCodec ff_h263_v4l2m2m_encoder;
++extern AVCodec ff_libaom_av1_decoder;
+ extern AVCodec ff_libopenh264_encoder;
+ extern AVCodec ff_libopenh264_decoder;
+ extern AVCodec ff_h264_amf_encoder;
+-- 
+2.20.1
+
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index f8c9f9e45a..7150467a99 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -841,6 +841,7 @@ operate properly.")
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
+             (patches (search-patches "ffmpeg-prefer-dav1d.patch"))
              (sha256
               (base32
                "176jn1lcdf0gk7sa5l2mv0faqp5dsqdhx1gqcrgymqhfmdal4xfb"))))
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#39719] [PATCH] gnu: FFmpeg: Prefer dav1d over libaom.
  2020-02-21 17:36 ` [bug#39719] [PATCH] gnu: FFmpeg: Prefer dav1d over libaom Leo Famulari
@ 2020-02-21 17:49   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2020-02-21 17:49 UTC (permalink / raw)
  To: 39719

On Fri, Feb 21, 2020 at 12:36:43PM -0500, Leo Famulari wrote:
> * gnu/packages/patches/ffmpeg-prefer-dav1d.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/video.scm (ffmpeg)[source]: Use it.

This does improve playback for MPV, but VLC is still choosing libaom
somehow. So I think we should make the changes in both #39714 and
#39719.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#39719: Acknowledgement (FFmpeg library preference for dav1d)
       [not found] ` <handler.39719.B.158230650117144.ack@debbugs.gnu.org>
@ 2020-03-20 22:54   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2020-03-20 22:54 UTC (permalink / raw)
  To: 39719-done

I pushed fixes for FFmpeg and VLC as commit
f08040c5f864df1e85573172aa921e42ceef6859.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-20 22:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-21 17:34 [bug#39719] FFmpeg library preference for dav1d Leo Famulari
2020-02-21 17:36 ` [bug#39719] [PATCH] gnu: FFmpeg: Prefer dav1d over libaom Leo Famulari
2020-02-21 17:49   ` Leo Famulari
     [not found] ` <handler.39719.B.158230650117144.ack@debbugs.gnu.org>
2020-03-20 22:54   ` bug#39719: Acknowledgement (FFmpeg library preference for dav1d) Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.