public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/
@ 2020-10-28 12:10 Joonas Niilola
  0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2020-10-28 12:10 UTC (permalink / raw
  To: gentoo-commits

commit:     f7c8575f3eb43887c8081061661c0767d637c155
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Thu Oct 22 10:11:57 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Oct 28 12:09:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7c8575f

media-libs/libheif: ebuild_unused_patches

- Remove unused patch

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-libs/libheif/files/heif_test.go | 155 ----------------------------------
 1 file changed, 155 deletions(-)

diff --git a/media-libs/libheif/files/heif_test.go b/media-libs/libheif/files/heif_test.go
deleted file mode 100644
index 187d773dea6..00000000000
--- a/media-libs/libheif/files/heif_test.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * GO interface to libheif
- * Copyright (c) 2018 struktur AG, Joachim Bauch <bauch@struktur.de>
- *
- * This file is part of heif, an example application using libheif.
- *
- * heif is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * heif is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with heif.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package heif
-
-import (
-	"fmt"
-	"image"
-	"io/ioutil"
-	"os"
-	"path"
-	"testing"
-)
-
-func TestGetVersion(t *testing.T) {
-	version := GetVersion()
-	if version == "" {
-		t.Fatal("Version is missing")
-	}
-}
-
-func CheckHeifImage(t *testing.T, handle *ImageHandle, thumbnail bool) {
-	handle.GetWidth()
-	handle.GetHeight()
-	handle.HasAlphaChannel()
-	handle.HasDepthImage()
-	count := handle.GetNumberOfDepthImages()
-	if ids := handle.GetListOfDepthImageIDs(); len(ids) != count {
-		t.Errorf("Expected %d depth image ids, got %d", count, len(ids))
-	}
-	if !thumbnail {
-		count = handle.GetNumberOfThumbnails()
-		ids := handle.GetListOfThumbnailIDs()
-		if len(ids) != count {
-			t.Errorf("Expected %d thumbnail image ids, got %d", count, len(ids))
-		}
-		for _, id := range ids {
-			if thumb, err := handle.GetThumbnail(id); err != nil {
-				t.Errorf("Could not get thumbnail %d: %s", id, err)
-			} else {
-				CheckHeifImage(t, thumb, true)
-			}
-		}
-	}
-
-	if img, err := handle.DecodeImage(ColorspaceUndefined, ChromaUndefined, nil); err != nil {
-		t.Errorf("Could not decode image: %s", err)
-	} else {
-		img.GetColorspace()
-		img.GetChromaFormat()
-	}
-}
-
-func CheckHeifFile(t *testing.T, ctx *Context) {
-	if count := ctx.GetNumberOfTopLevelImages(); count != 2 {
-		t.Errorf("Expected %d top level images, got %d", 2, count)
-	}
-	if ids := ctx.GetListOfTopLevelImageIDs(); len(ids) != 2 {
-		t.Errorf("Expected %d top level image ids, got %+v", 2, ids)
-	}
-	if _, err := ctx.GetPrimaryImageID(); err != nil {
-		t.Errorf("Expected a primary image, got %s", err)
-	}
-	if handle, err := ctx.GetPrimaryImageHandle(); err != nil {
-		t.Errorf("Could not get primary image handle: %s", err)
-	} else {
-		if !handle.IsPrimaryImage() {
-			t.Error("Expected primary image")
-		}
-		CheckHeifImage(t, handle, false)
-	}
-}
-
-func TestReadFromFile(t *testing.T) {
-	ctx, err := NewContext()
-	if err != nil {
-		t.Fatalf("Can't create context: %s", err)
-	}
-
-	filename := path.Join("..", "..", "examples", "example.heic")
-	if err := ctx.ReadFromFile(filename); err != nil {
-		t.Fatalf("Can't read from %s: %s", filename, err)
-	}
-
-	CheckHeifFile(t, ctx)
-}
-
-func TestReadFromMemory(t *testing.T) {
-	ctx, err := NewContext()
-	if err != nil {
-		t.Fatalf("Can't create context: %s", err)
-	}
-
-	filename := path.Join("..", "..", "examples", "example.heic")
-	data, err := ioutil.ReadFile(filename)
-	if err != nil {
-		t.Fatalf("Can't read file %s: %s", filename, err)
-	}
-	if err := ctx.ReadFromMemory(data); err != nil {
-		t.Fatalf("Can't read from memory: %s", err)
-	}
-	data = nil // Make sure future processing works if "data" is GC'd
-
-	CheckHeifFile(t, ctx)
-}
-
-func TestReadImage(t *testing.T) {
-	filename := path.Join("..", "..", "examples", "example.heic")
-	fp, err := os.Open(filename)
-	if err != nil {
-		t.Fatalf("Could not open %s: %s", filename, err)
-	}
-	defer fp.Close()
-
-	config, format1, err := image.DecodeConfig(fp)
-	if err != nil {
-		t.Fatalf("Could not load image config from %s: %s", filename, err)
-	}
-	if format1 != "heif" {
-		t.Errorf("Expected format heif, got %s", format1)
-	}
-	if _, err := fp.Seek(0, 0); err != nil {
-		t.Fatalf("Could not seek to start of %s: %s", filename, err)
-	}
-
-	img, format2, err := image.Decode(fp)
-	if err != nil {
-		t.Fatalf("Could not load image from %s: %s", filename, err)
-	}
-	if format2 != "heif" {
-		t.Errorf("Expected format heif, got %s", format2)
-	}
-
-	r := img.Bounds()
-	if config.Width != (r.Max.X-r.Min.X) || config.Height != (r.Max.Y-r.Min.Y) {
-		fmt.Printf("Image size %+v does not match config %+v\n", r, config)
-	}
-}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/
@ 2020-11-26  7:53 Joonas Niilola
  0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2020-11-26  7:53 UTC (permalink / raw
  To: gentoo-commits

commit:     aa1f95703f87ee815057070fd66d8a21d5da2c6a
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Wed Nov 25 18:51:05 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 07:29:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa1f9570

media-libs/libheif: remove unused patch

Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Closes: https://github.com/gentoo/gentoo/pull/18404
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-libs/libheif/files/libheif-1.7.0-aom.patch | 46 ------------------------
 1 file changed, 46 deletions(-)

diff --git a/media-libs/libheif/files/libheif-1.7.0-aom.patch b/media-libs/libheif/files/libheif-1.7.0-aom.patch
deleted file mode 100644
index 9dce291f964..00000000000
--- a/media-libs/libheif/files/libheif-1.7.0-aom.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 331dff0ba58d5265ddcdadeaf5a45c1f0698a388 Mon Sep 17 00:00:00 2001
-From: Jakov Smolic <jakov.smolic@sartura.hr>
-Date: Fri, 14 Aug 2020 22:03:25 +0200
-Subject: [PATCH] Fix building against aom 1.0
-
-Taken from upstream commit:
-https://github.com/strukturag/libheif/commit/6768552c0a99bb2957906be0f369850326486a58
-
-Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
----
- libheif/heif_encoder_aom.cc | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/libheif/heif_encoder_aom.cc b/libheif/heif_encoder_aom.cc
-index 9953e34..669a51a 100644
---- a/libheif/heif_encoder_aom.cc
-+++ b/libheif/heif_encoder_aom.cc
-@@ -502,9 +502,11 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
- 
- 
-   // --- configure codec
--
--  unsigned int aomUsage = (encoder->realtime_mode ? AOM_USAGE_REALTIME : AOM_USAGE_GOOD_QUALITY);
--
-+  unsigned int aomUsage = 0;
-+#if defined(AOM_USAGE_REALTIME)
-+  // aom 2.0
-+  aomUsage = (encoder->realtime_mode ? AOM_USAGE_REALTIME : AOM_USAGE_GOOD_QUALITY);
-+#endif
- 
-   aom_codec_enc_cfg_t cfg;
-   aom_codec_err_t res = aom_codec_enc_config_default(encoder->iface, &cfg, aomUsage);
-@@ -540,7 +542,10 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
-   aom_codec_control(&encoder->codec, AOME_SET_CPUUSED, encoder->cpu_used);
- 
-   if (encoder->threads > 1) {
-+#if defined(AV1E_SET_ROW_MT)
-+    // aom 2.0
-     aom_codec_control(&encoder->codec, AV1E_SET_ROW_MT, 1);
-+#endif
-   }
- 
-   // --- encode frame
--- 
-2.26.2
-


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/
@ 2022-11-25 17:49 Conrad Kostecki
  0 siblings, 0 replies; 3+ messages in thread
From: Conrad Kostecki @ 2022-11-25 17:49 UTC (permalink / raw
  To: gentoo-commits

commit:     0cf8f69b26c2a4b19a3657575199ffab7169007c
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Nov 25 15:51:14 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 17:48:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cf8f69b

media-libs/libheif: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/28429
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../libheif/files/libheif-1.12.0-dav1d-1.0.0.patch | 45 ----------------------
 .../libheif/files/libheif-1.12.0-fix-bashism.patch | 37 ------------------
 2 files changed, 82 deletions(-)

diff --git a/media-libs/libheif/files/libheif-1.12.0-dav1d-1.0.0.patch b/media-libs/libheif/files/libheif-1.12.0-dav1d-1.0.0.patch
deleted file mode 100644
index d8eb0a54016b..000000000000
--- a/media-libs/libheif/files/libheif-1.12.0-dav1d-1.0.0.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://bugs.gentoo.org/836205
-https://github.com/strukturag/libheif/commit/0f8496f22d284e1a69df12fe0b72f375aed31315
-
-From 0f8496f22d284e1a69df12fe0b72f375aed31315 Mon Sep 17 00:00:00 2001
-From: Dirk Farin <dirk.farin@gmail.com>
-Date: Tue, 5 Apr 2022 12:17:59 +0200
-Subject: [PATCH] fix dav1d decoding: input stream must be flushed with dav1d
- 1.0.0
-
----
- libheif/heif_decoder_dav1d.cc | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/libheif/heif_decoder_dav1d.cc b/libheif/heif_decoder_dav1d.cc
-index a6c42e4f..ecf7382e 100644
---- a/libheif/heif_decoder_dav1d.cc
-+++ b/libheif/heif_decoder_dav1d.cc
-@@ -163,7 +163,10 @@ struct heif_error dav1d_decode_image(void* decoder_raw, struct heif_image** out_
-   Dav1dPicture frame;
-   memset(&frame, 0, sizeof(Dav1dPicture));
- 
-+  bool flushed = false;
-+
-   for (;;) {
-+
-     int res = dav1d_send_data(decoder->context, &decoder->data);
-     if ((res < 0) && (res != DAV1D_ERR(EAGAIN))) {
-       err = {heif_error_Decoder_plugin_error,
-@@ -173,11 +176,11 @@ struct heif_error dav1d_decode_image(void* decoder_raw, struct heif_image** out_
-     }
- 
-     res = dav1d_get_picture(decoder->context, &frame);
--    if (res == DAV1D_ERR(EAGAIN)) {
--      err = {heif_error_Decoder_plugin_error,
--             heif_suberror_Unspecified,
--             kEmptyString};
--      return err;
-+    if (!flushed && res == DAV1D_ERR(EAGAIN)) {
-+      if (decoder->data.sz == 0) {
-+        flushed = true;
-+      }
-+      continue;
-     }
-     else if (res < 0) {
-       err = {heif_error_Decoder_plugin_error,

diff --git a/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch b/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch
deleted file mode 100644
index 3d4d12495051..000000000000
--- a/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/strukturag/libheif/pull/660
-
-From a50ef159794ff66fc0a03d5269b1c36a000673ea Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Tue, 16 Aug 2022 02:23:13 +0100
-Subject: [PATCH] configure.ac: fix bashism
-
-configure scripts need to be runnable with a POSIX-compliant /bin/sh.
-
-On many (but not all!) systems, /bin/sh is provided by Bash, so errors
-like this aren't spotted. Notably Debian defaults to /bin/sh provided
-by dash which doesn't tolerate such bashisms as '=='.
-
-This retains compatibility with bash.
-
-Fixes errors/warnings like:
-```
-checking for pthread_create in -lpthread... yes
-checking for simple visibility declarations... yes
-/var/tmp/portage/media-libs/libheif-1.12.0-r2/work/libheif-1.12.0/configure: 18821: test: x: unexpected operator
-checking pkg-config is at least version 0.9.0... yes
-checking for aom... yes
-```
-
-Signed-off-by: Sam James <sam@gentoo.org>
---- a/configure.ac
-+++ b/configure.ac
-@@ -85,7 +85,7 @@ AS_IF([test "x$enable_tests" = "xyes"], [
-     HAVE_VISIBILITY=0
-     CFLAG_VISIBILITY=
- ])
--AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" == "x1"])
-+AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" = "x1"])
- 
- AM_CONDITIONAL([HAVE_VISIBILITY], [test "x$HAVE_VISIBILITY" != "x0"])
- if eval "test x$enable_visibility = x" ; then enable_visibility=yes ; fi
-


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

end of thread, other threads:[~2022-11-25 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-25 17:49 [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/ Conrad Kostecki
  -- strict thread matches above, loose matches on Subject: below --
2020-11-26  7:53 Joonas Niilola
2020-10-28 12:10 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox