unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#47311] [PATCH] gnu: Add libheif.
@ 2021-03-22  4:29 Vinicius Monego
  2021-03-22 18:01 ` Leo Famulari
  2021-03-23 17:30 ` bug#47311: " Leo Famulari
  0 siblings, 2 replies; 7+ messages in thread
From: Vinicius Monego @ 2021-03-22  4:29 UTC (permalink / raw)
  To: 47311; +Cc: Vinicius Monego

* gnu/packages/image.scm (libheif): New variable.
---
 gnu/packages/image.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index de6872b9b2..7a751c1eba 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2164,6 +2164,43 @@ by AOM, including with alpha.")
     (license (list license:bsd-2    ; libavif itself
                    license:expat)))) ; cJSON in the test suite
 
+(define-public libheif
+  (package
+    (name "libheif")
+    (version "1.11.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/strukturag/libheif")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "036n63vlk4sk7y25q2kzyvvw4r5vv323ysbmbrcaprg9hdyjqgf5"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f)) ;no test target although there is a tests folder
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("dav1d" ,dav1d)
+       ("gdk-pixbuf" ,gdk-pixbuf) ;optional
+       ("libaom" ,libaom)
+       ("libde265" ,libde265)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("rav1e" ,rav1e)
+       ("x265" ,x265)))
+    (home-page "https://github.com/strukturag/libheif")
+    (synopsis "HEIF and AVIF file format decoder and encoder")
+    (description
+     "@code{libheif} is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File
+Format) file format decoder and encoder.")
+    (license license:gpl3+)))
+
 (define-public mtpaint
   (package
     (name "mtpaint")
-- 
2.31.0





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

* [bug#47311] [PATCH] gnu: Add libheif.
  2021-03-22  4:29 [bug#47311] [PATCH] gnu: Add libheif Vinicius Monego
@ 2021-03-22 18:01 ` Leo Famulari
  2021-03-22 20:21   ` Vinicius Monego
  2021-03-22 20:35   ` Vinicius Monego
  2021-03-23 17:30 ` bug#47311: " Leo Famulari
  1 sibling, 2 replies; 7+ messages in thread
From: Leo Famulari @ 2021-03-22 18:01 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 47311

On Mon, Mar 22, 2021 at 01:29:40AM -0300, Vinicius Monego wrote:
> * gnu/packages/image.scm (libheif): New variable.

Thanks!
> +    (home-page "https://github.com/strukturag/libheif")

It says that these programs can use libheif:

GIMP
Krita
ImageMagick
digiKam 7.0.0
libvips
Kodi HEIF image decoder plugin

> +    (inputs
> +     `(("dav1d" ,dav1d)
> +       ("gdk-pixbuf" ,gdk-pixbuf) ;optional
> +       ("libaom" ,libaom)
> +       ("libde265" ,libde265)
> +       ("libjpeg" ,libjpeg-turbo)
> +       ("libpng" ,libpng)
> +       ("rav1e" ,rav1e)
> +       ("x265" ,x265)))

I wonder, are both libaom and rav1e mandatory dependencies?

I ask because they offer the same functionality (AV1 encoding), and it's
still a bit tricky to introduce Rust dependencies in Guix. Rav1e is
written in Rust, but we only support Rust on x86_64.




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

* [bug#47311] [PATCH] gnu: Add libheif.
  2021-03-22 18:01 ` Leo Famulari
@ 2021-03-22 20:21   ` Vinicius Monego
  2021-03-22 21:20     ` Leo Famulari
  2021-03-22 20:35   ` Vinicius Monego
  1 sibling, 1 reply; 7+ messages in thread
From: Vinicius Monego @ 2021-03-22 20:21 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47311

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

Em 22/03/2021 15:01, Leo Famulari escreveu:
>> +    (inputs
>> +     `(("dav1d" ,dav1d)
>> +       ("gdk-pixbuf" ,gdk-pixbuf) ;optional
>> +       ("libaom" ,libaom)
>> +       ("libde265" ,libde265)
>> +       ("libjpeg" ,libjpeg-turbo)
>> +       ("libpng" ,libpng)
>> +       ("rav1e" ,rav1e)
>> +       ("x265" ,x265)))
> I wonder, are both libaom and rav1e mandatory dependencies?
>
> I ask because they offer the same functionality (AV1 encoding), and it's
> still a bit tricky to introduce Rust dependencies in Guix. Rav1e is
> written in Rust, but we only support Rust on x86_64.

libaom provides the same functionality of dav1d+rav1e in this case. I 
thought of adding those two because libaom was slower in the early versions.

I attached a v2 with libaom only (to simplify the dependency graph). 
Feel free to choose dav1d+libaom.


[-- Attachment #2: v2-0001-gnu-Add-libheif.patch --]
[-- Type: text/x-patch, Size: 2034 bytes --]

From 453286bbaeef5f025d124fbe81c642623307961a Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Tue, 16 Feb 2021 21:39:26 -0300
Subject: [PATCH v2] gnu: Add libheif.

* gnu/packages/image.scm (libheif): New variable.
---
Removed rav1e and dav1d from inputs.

 gnu/packages/image.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index de6872b9b2..07db67ded1 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2164,6 +2164,41 @@ by AOM, including with alpha.")
     (license (list license:bsd-2    ; libavif itself
                    license:expat)))) ; cJSON in the test suite
 
+(define-public libheif
+  (package
+    (name "libheif")
+    (version "1.11.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/strukturag/libheif")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "036n63vlk4sk7y25q2kzyvvw4r5vv323ysbmbrcaprg9hdyjqgf5"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f)) ;no test target although there is a tests folder
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("gdk-pixbuf" ,gdk-pixbuf) ;optional
+       ("libaom" ,libaom)
+       ("libde265" ,libde265)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("x265" ,x265)))
+    (home-page "https://github.com/strukturag/libheif")
+    (synopsis "HEIF and AVIF file format decoder and encoder")
+    (description
+     "@code{libheif} is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File
+Format) file format decoder and encoder.")
+    (license license:gpl3+)))
+
 (define-public mtpaint
   (package
     (name "mtpaint")
-- 
2.31.0


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

* [bug#47311] [PATCH] gnu: Add libheif.
  2021-03-22 18:01 ` Leo Famulari
  2021-03-22 20:21   ` Vinicius Monego
@ 2021-03-22 20:35   ` Vinicius Monego
  2021-03-22 21:21     ` Leo Famulari
  1 sibling, 1 reply; 7+ messages in thread
From: Vinicius Monego @ 2021-03-22 20:35 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 47311

Oh, and the license is wrong, it's lgpl3+.





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

* [bug#47311] [PATCH] gnu: Add libheif.
  2021-03-22 20:21   ` Vinicius Monego
@ 2021-03-22 21:20     ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2021-03-22 21:20 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 47311

On Mon, Mar 22, 2021 at 05:21:57PM -0300, Vinicius Monego wrote:
> libaom provides the same functionality of dav1d+rav1e in this case. I
> thought of adding those two because libaom was slower in the early versions.

That's true, and libaom is still really slow to encode, although rav1e
is also slow. My impression is that, overall, one should still encode
with libaom, since it gives better results, but my info could be stale.

> I attached a v2 with libaom only (to simplify the dependency graph). Feel
> free to choose dav1d+libaom.

I'll choose dav1d+libaom. Dav1d is focused on reducing the power
required for decoding, which is really important in these early days of
AV1.

I can make those changes locally when pushing later today.




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

* [bug#47311] [PATCH] gnu: Add libheif.
  2021-03-22 20:35   ` Vinicius Monego
@ 2021-03-22 21:21     ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2021-03-22 21:21 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 47311

On Mon, Mar 22, 2021 at 05:35:23PM -0300, Vinicius Monego wrote:
> Oh, and the license is wrong, it's lgpl3+.

Noted




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

* bug#47311: [PATCH] gnu: Add libheif.
  2021-03-22  4:29 [bug#47311] [PATCH] gnu: Add libheif Vinicius Monego
  2021-03-22 18:01 ` Leo Famulari
@ 2021-03-23 17:30 ` Leo Famulari
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2021-03-23 17:30 UTC (permalink / raw)
  To: Vinicius Monego; +Cc: 47311-done

On Mon, Mar 22, 2021 at 01:29:40AM -0300, Vinicius Monego wrote:
> * gnu/packages/image.scm (libheif): New variable.

Pushed as 8fae75a3584c19c9b2c705b49c600c23dccc8799 with the changes we
discussed.

Thanks again!




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

end of thread, other threads:[~2021-03-23 17:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22  4:29 [bug#47311] [PATCH] gnu: Add libheif Vinicius Monego
2021-03-22 18:01 ` Leo Famulari
2021-03-22 20:21   ` Vinicius Monego
2021-03-22 21:20     ` Leo Famulari
2021-03-22 20:35   ` Vinicius Monego
2021-03-22 21:21     ` Leo Famulari
2021-03-23 17:30 ` bug#47311: " Leo Famulari

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).