public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libheif] f45: skip certain tests when HEVC codec is unavailable
@ 2026-09-02 11:30 Dominik 'Rathann' Mierzejewski
  0 siblings, 0 replies; only message in thread
From: Dominik 'Rathann' Mierzejewski @ 2026-09-02 11:30 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libheif
Branch : f45
Commit : ebbbd5d4462cb2a4783590463d980a6caec35018
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date   : 2026-09-02T12:00:47+02:00
Stats  : +95/-6 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/libheif/c/ebbbd5d4462cb2a4783590463d980a6caec35018?branch=f45

Log:
skip certain tests when HEVC codec is unavailable

---
diff --git a/libheif-no-hevc-tests.patch b/libheif-no-hevc-tests.patch
index 387aff2..857b451 100644
--- a/libheif-no-hevc-tests.patch
+++ b/libheif-no-hevc-tests.patch
@@ -1,17 +1,106 @@
-diff -up libheif-1.16.2/tests/encode.cc.no-hevc libheif-1.16.2/tests/encode.cc
---- libheif-1.16.2/tests/encode.cc.no-hevc	2023-05-22 21:00:47.000000000 +0200
-+++ libheif-1.16.2/tests/encode.cc	2023-09-08 14:22:08.408234336 +0200
-@@ -148,11 +148,13 @@ static void test_ispe_size(heif_compress
+diff -up libheif-1.23.3/tests/clap_decode.cc.orig libheif-1.23.3/tests/clap_decode.cc
+--- libheif-1.23.3/tests/clap_decode.cc.orig	2026-09-01 22:05:35.000000000 +0200
++++ libheif-1.23.3/tests/clap_decode.cc	2026-09-02 11:56:23.864990430 +0200
+@@ -43,7 +43,6 @@ TEST_CASE("decode cropped image within d
+ {
+   const char* files[] = {
+       "clap_cropped.avif",
+-      "clap_cropped.heic",
+       "clap_cropped_irot_imir.avif",
+   };
+ 
+@@ -95,6 +94,9 @@ TEST_CASE("decode cropped image within d
+ 
+ TEST_CASE("decode image with coded frame much larger than ispe")
+ {
++  if (!heif_have_decoder_for_format(heif_compression_HEVC)) {
++     SKIP("HEVC decoder not available, skipping test");
++  }
+   heif_context* ctx = get_context_for_test_file("conformance_window_padding.heic");
+   heif_image_handle* handle = get_primary_image_handle(ctx);
+ 
+diff -up libheif-1.23.3/tests/encode.cc.orig libheif-1.23.3/tests/encode.cc
+--- libheif-1.23.3/tests/encode.cc.orig	2026-09-01 22:05:35.000000000 +0200
++++ libheif-1.23.3/tests/encode.cc	2026-09-02 11:57:20.281362078 +0200
+@@ -143,12 +143,21 @@ static void test_ispe_size(heif_compress
+ 
  
  TEST_CASE( "ispe odd size", "[heif_context]" ) {
++  if (!heif_have_encoder_for_format(heif_compression_HEVC)) {
++     SKIP("HEVC encoder not available, skipping test");
++  }
  
-+#if 0
    // HEVC encoders typically encode with even dimensions only
    test_ispe_size(heif_compression_HEVC, heif_orientation_normal, 121,99, 122,100);
    test_ispe_size(heif_compression_HEVC, heif_orientation_rotate_180, 121,99, 122,100);
    test_ispe_size(heif_compression_HEVC, heif_orientation_rotate_90_cw, 121,99, 122,100);
    test_ispe_size(heif_compression_HEVC, heif_orientation_rotate_90_cw, 120,100, 120,100);
-+#endif
++}
++
++TEST_CASE( "AVIF ispe odd size", "[heif_context]" ) {
++  if (!heif_have_encoder_for_format(heif_compression_AV1)) {
++     SKIP("AV1 encoder not available, skipping test");
++  }
  
    // AVIF encoders typically encode with odd dimensions
    test_ispe_size(heif_compression_AV1, heif_orientation_normal, 121,99, 121,99);
+diff -up libheif-1.23.3/tests/grid_tile_missing.cc.orig libheif-1.23.3/tests/grid_tile_missing.cc
+--- libheif-1.23.3/tests/grid_tile_missing.cc.orig	2026-09-01 22:05:35.000000000 +0200
++++ libheif-1.23.3/tests/grid_tile_missing.cc	2026-09-02 11:31:01.107966197 +0200
+@@ -42,10 +42,10 @@ namespace {
+ std::vector<uint8_t> build_heif_with_missing_grid_tile() {
+   // ftyp: heic / 0 / [mif1, heic]
+   std::vector<uint8_t> ftyp_payload;
+-  append_fourcc(ftyp_payload, "heic");
++  append_fourcc(ftyp_payload, "avif");
+   put_u32_be(ftyp_payload, 0);
+   append_fourcc(ftyp_payload, "mif1");
+-  append_fourcc(ftyp_payload, "heic");
++  append_fourcc(ftyp_payload, "avif");
+   auto ftyp = make_box("ftyp", ftyp_payload);
+ 
+   // hdlr: handler type 'pict' (so the file is treated as an image collection
+@@ -150,10 +150,10 @@ std::vector<uint8_t> build_heif_with_mis
+ // (UBSan).
+ std::vector<uint8_t> build_heif_grid_with_irot270() {
+   std::vector<uint8_t> ftyp_payload;
+-  append_fourcc(ftyp_payload, "heic");
++  append_fourcc(ftyp_payload, "avif");
+   put_u32_be(ftyp_payload, 0);
+   append_fourcc(ftyp_payload, "mif1");
+-  append_fourcc(ftyp_payload, "heic");
++  append_fourcc(ftyp_payload, "avif");
+   auto ftyp = make_box("ftyp", ftyp_payload);
+ 
+   std::vector<uint8_t> hdlr_payload;
+@@ -263,10 +263,10 @@ std::vector<uint8_t> build_heif_grid_wit
+ // tile data unreadable).
+ std::vector<uint8_t> build_heif_grid_with_undecodable_tile() {
+   std::vector<uint8_t> ftyp_payload;
+-  append_fourcc(ftyp_payload, "heic");
++  append_fourcc(ftyp_payload, "avif");
+   put_u32_be(ftyp_payload, 0);
+   append_fourcc(ftyp_payload, "mif1");
+-  append_fourcc(ftyp_payload, "heic");
++  append_fourcc(ftyp_payload, "avif");
+   auto ftyp = make_box("ftyp", ftyp_payload);
+ 
+   std::vector<uint8_t> hdlr_payload;
+@@ -293,7 +293,7 @@ std::vector<uint8_t> build_heif_grid_wit
+   std::vector<uint8_t> infe2_payload;
+   put_u16_be(infe2_payload, 2);
+   put_u16_be(infe2_payload, 0);
+-  append_fourcc(infe2_payload, "hvc1");
++  append_fourcc(infe2_payload, "av01");
+   infe2_payload.push_back(0);
+   auto infe2 = make_box("infe", infe2_payload, /*full=*/true, /*version=*/2);
+ 
+@@ -325,7 +325,7 @@ std::vector<uint8_t> build_heif_grid_wit
+   put_u16_be(hvcC_payload, 0);          // avg_frame_rate
+   hvcC_payload.push_back(0x0F);         // frame_rate/layers/nested + length_size - 1 (=4)
+   hvcC_payload.push_back(0);            // num_of_arrays
+-  auto hvcC = make_box("hvcC", hvcC_payload);
++  auto hvcC = make_box("av1C", hvcC_payload);
+ 
+   std::vector<uint8_t> ipco_payload;
+   append(ipco_payload, ispe);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-02 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 11:30 [rpms/libheif] f45: skip certain tests when HEVC codec is unavailable Dominik 'Rathann' Mierzejewski

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