Commit 96fe68de for libheif
commit 96fe68de26c3be71ab3dd185e044047e0307c105
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Fri Feb 27 09:55:28 2026 +0100
uncv: add support for reading filter-array sequences
diff --git a/libheif/codecs/decoder.cc b/libheif/codecs/decoder.cc
index 4e6f6f54..333cf4bd 100644
--- a/libheif/codecs/decoder.cc
+++ b/libheif/codecs/decoder.cc
@@ -196,7 +196,15 @@ std::shared_ptr<Decoder> Decoder::alloc_for_sequence_sample_description_box(std:
auto ispe = std::make_shared<Box_ispe>();
ispe->set_size(sample_description_box->get_VisualSampleEntry_const().width,
sample_description_box->get_VisualSampleEntry_const().height);
- return std::make_shared<Decoder_uncompressed>(uncC, cmpd, ispe);
+ auto decoder = std::make_shared<Decoder_uncompressed>(uncC, cmpd, ispe);
+ decoder->set_cpat(sample_description_box->get_child_box<Box_cpat>());
+ decoder->set_cmpC(sample_description_box->get_child_box<Box_cmpC>());
+ decoder->set_icef(sample_description_box->get_child_box<Box_icef>());
+ decoder->set_cloc(sample_description_box->get_child_box<Box_cloc>());
+ decoder->set_splz(sample_description_box->get_child_boxes<Box_splz>());
+ decoder->set_sbpm(sample_description_box->get_child_boxes<Box_sbpm>());
+ decoder->set_snuc(sample_description_box->get_child_boxes<Box_snuc>());
+ return decoder;
}
#endif
diff --git a/libheif/codecs/uncompressed/unc_dec.cc b/libheif/codecs/uncompressed/unc_dec.cc
index 194398c7..43a44f1d 100644
--- a/libheif/codecs/uncompressed/unc_dec.cc
+++ b/libheif/codecs/uncompressed/unc_dec.cc
@@ -181,6 +181,13 @@ Decoder_uncompressed::decode_single_frame_from_compressed_data(const struct heif
properties.uncC = m_uncC;
properties.cmpd = m_cmpd;
properties.ispe = m_ispe;
+ properties.cpat = m_cpat;
+ properties.cmpC = m_cmpC;
+ properties.icef = m_icef;
+ properties.splz = m_splz;
+ properties.sbpm = m_sbpm;
+ properties.snuc = m_snuc;
+ properties.cloc = m_cloc;
auto decodeResult = UncompressedImageCodec::decode_uncompressed_image(properties,
get_data_extent(),
diff --git a/libheif/codecs/uncompressed/unc_dec.h b/libheif/codecs/uncompressed/unc_dec.h
index eb4e92fc..33963a98 100644
--- a/libheif/codecs/uncompressed/unc_dec.h
+++ b/libheif/codecs/uncompressed/unc_dec.h
@@ -31,6 +31,13 @@
class Box_uncC;
class Box_cmpd;
+class Box_cpat;
+class Box_cmpC;
+class Box_icef;
+class Box_splz;
+class Box_sbpm;
+class Box_snuc;
+class Box_cloc;
class Decoder_uncompressed : public Decoder
@@ -40,6 +47,14 @@ public:
std::shared_ptr<Box_cmpd> cmpd,
std::shared_ptr<const Box_ispe> ispe);
+ void set_cpat(std::shared_ptr<const Box_cpat> cpat) { m_cpat = std::move(cpat); }
+ void set_cmpC(std::shared_ptr<const Box_cmpC> cmpC) { m_cmpC = std::move(cmpC); }
+ void set_icef(std::shared_ptr<const Box_icef> icef) { m_icef = std::move(icef); }
+ void set_cloc(std::shared_ptr<const Box_cloc> cloc) { m_cloc = std::move(cloc); }
+ void set_splz(std::vector<std::shared_ptr<Box_splz>> splz) { m_splz.assign(splz.begin(), splz.end()); }
+ void set_sbpm(std::vector<std::shared_ptr<Box_sbpm>> sbpm) { m_sbpm.assign(sbpm.begin(), sbpm.end()); }
+ void set_snuc(std::vector<std::shared_ptr<Box_snuc>> snuc) { m_snuc.assign(snuc.begin(), snuc.end()); }
+
heif_compression_format get_compression_format() const override { return heif_compression_uncompressed; }
int get_luma_bits_per_pixel() const override;
@@ -76,6 +91,13 @@ private:
std::shared_ptr<const Box_uncC> m_uncC;
std::shared_ptr<const Box_cmpd> m_cmpd;
std::shared_ptr<const Box_ispe> m_ispe;
+ std::shared_ptr<const Box_cpat> m_cpat;
+ std::shared_ptr<const Box_cmpC> m_cmpC;
+ std::shared_ptr<const Box_icef> m_icef;
+ std::vector<std::shared_ptr<const Box_splz>> m_splz;
+ std::vector<std::shared_ptr<const Box_sbpm>> m_sbpm;
+ std::vector<std::shared_ptr<const Box_snuc>> m_snuc;
+ std::shared_ptr<const Box_cloc> m_cloc;
std::shared_ptr<HeifPixelImage> m_decoded_image;
uintptr_t m_decoded_image_user_data;