GNU bug report logs - #47311
[PATCH] gnu: Add libheif.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Mon, 22 Mar 2021 04:33:02 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47311 in the body.
You can then email your comments to 47311 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#47311; Package guix-patches. (Mon, 22 Mar 2021 04:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Mar 2021 04:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH] gnu: Add libheif.
Date: Mon, 22 Mar 2021 01:29:40 -0300
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#47311; Package guix-patches. (Mon, 22 Mar 2021 18:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 47311 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 47311 <at> debbugs.gnu.org
Subject: Re: [bug#47311] [PATCH] gnu: Add libheif.
Date: Mon, 22 Mar 2021 14:01:28 -0400
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.




Information forwarded to guix-patches <at> gnu.org:
bug#47311; Package guix-patches. (Mon, 22 Mar 2021 20:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 47311 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47311 <at> debbugs.gnu.org
Subject: Re: [bug#47311] [PATCH] gnu: Add libheif.
Date: Mon, 22 Mar 2021 17:21:57 -0300
[Message part 1 (text/plain, inline)]
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.

[v2-0001-gnu-Add-libheif.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#47311; Package guix-patches. (Mon, 22 Mar 2021 20:38:02 GMT) Full text and rfc822 format available.

Message #14 received at 47311 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Leo Famulari <leo <at> famulari.name>
Cc: 47311 <at> debbugs.gnu.org
Subject: Re: [bug#47311] [PATCH] gnu: Add libheif.
Date: Mon, 22 Mar 2021 17:35:23 -0300
Oh, and the license is wrong, it's lgpl3+.





Information forwarded to guix-patches <at> gnu.org:
bug#47311; Package guix-patches. (Mon, 22 Mar 2021 21:22:02 GMT) Full text and rfc822 format available.

Message #17 received at 47311 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 47311 <at> debbugs.gnu.org
Subject: Re: [bug#47311] [PATCH] gnu: Add libheif.
Date: Mon, 22 Mar 2021 17:20:58 -0400
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.




Information forwarded to guix-patches <at> gnu.org:
bug#47311; Package guix-patches. (Mon, 22 Mar 2021 21:22:02 GMT) Full text and rfc822 format available.

Message #20 received at 47311 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 47311 <at> debbugs.gnu.org
Subject: Re: [bug#47311] [PATCH] gnu: Add libheif.
Date: Mon, 22 Mar 2021 17:21:08 -0400
On Mon, Mar 22, 2021 at 05:35:23PM -0300, Vinicius Monego wrote:
> Oh, and the license is wrong, it's lgpl3+.

Noted




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Tue, 23 Mar 2021 17:32:01 GMT) Full text and rfc822 format available.

Notification sent to Vinicius Monego <monego <at> posteo.net>:
bug acknowledged by developer. (Tue, 23 Mar 2021 17:32:01 GMT) Full text and rfc822 format available.

Message #25 received at 47311-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 47311-done <at> debbugs.gnu.org
Subject: Re: [bug#47311] [PATCH] gnu: Add libheif.
Date: Tue, 23 Mar 2021 13:30:56 -0400
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!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Apr 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.