[gimp/gimp-2-10] HEIF plug-in: ensure max quality for lossless encoding
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] HEIF plug-in: ensure max quality for lossless encoding
- Date: Mon, 18 Jan 2021 11:28:52 +0000 (UTC)
commit 51d8421eaa11cd1d087a66980061d013c3a543af
Author: Daniel Novomesky <dnovomesky gmail com>
Date: Tue Jan 12 12:22:30 2021 +0100
HEIF plug-in: ensure max quality for lossless encoding
There is a possible bug in libheif. Lossless setting is not working
when AVIF is saved via rav1e encoder.
This is a workaround of the problem.
plug-ins/common/file-heif.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c
index 43a7650f67..907e7c9c03 100644
--- a/plug-ins/common/file-heif.c
+++ b/plug-ins/common/file-heif.c
@@ -1536,7 +1536,17 @@ save_image (GFile *file,
return FALSE;
}
- heif_encoder_set_lossy_quality (encoder, params->quality);
+ /* workaround for a bug in libheif when heif_encoder_set_lossless is not working
+ (known problem with encoding via rav1e) */
+ if (params->lossless)
+ {
+ heif_encoder_set_lossy_quality (encoder, 100);
+ }
+ else
+ {
+ heif_encoder_set_lossy_quality (encoder, params->quality);
+ }
+
heif_encoder_set_lossless (encoder, params->lossless);
/* heif_encoder_set_logging_level (encoder, logging_level); */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]