Add HEIF (HEIC) and AVIF Ultra HDR multi-format container support (v2.0.0) - #413
Open
DichenZhang1 wants to merge 6 commits into
Open
Add HEIF (HEIC) and AVIF Ultra HDR multi-format container support (v2.0.0)#413DichenZhang1 wants to merge 6 commits into
DichenZhang1 wants to merge 6 commits into
Conversation
- Refactor UltraHDR class hierarchy: * UltraHdr: Common base class for gain map generation, tone mapping math, and metadata handling. * JpegR: Subclass implementing encodeJpegR and decodeJpegR for JPEG containers. * HeifUltraHdr: Subclass implementing encodeHeicUltraHdr and decodeHeicUltraHdr via libheif. * AvifUltraHdr: Subclass implementing encodeAvifUltraHdr and decodeAvifUltraHdr via libheif. - Extend ultrahdr_api.h/cpp with multi-format container support for UHDR_CODEC_HEIF and UHDR_CODEC_AVIF. - Add transparent format-agnostic probing and decoding for JPEG, HEIF, and AVIF streams. - Update Android.bp and CMakeLists.txt with UHDR_ENABLE_HEIF option and libheif dependency.
- Add container sniffing and metadata probing for HEIC and AVIF in uhdr_dec_probe() - Route HEIC and AVIF decode requests in uhdr_decode() to HeifUltraHdr / AvifUltraHdr - Robust NCLX profile and gainmap decode fallback in HeifUltraHdr and AvifUltraHdr - Add format conversion from 32bpp RGBA8888 to 8bpp YCbCr400 in copy_raw_image() - Add comprehensive API tests in ultrahdr_api_test.cpp
…aft repair pipeline - Add .github/workflows/daily-regression.yml for scheduled 02:00 UTC matrix CI - Add scripts/report_regression_issue.py for fingerprint deduplication and bug filing - Add scripts/auto_repair.py for candidate fix verification and draft PR creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This pull request introduces multi-format container support for Ultra HDR v2.0.0, extending
libultrahdrbeyond JPEG to support HEIF/HEIC (.heic) and AVIF (.avif) images with ISO 21496-1 gain map metadata and color profile preservation.Key Architectural Changes
Modular
UltraHdrBase Class Hierarchy:JpegRimplementation by extracting core gain map algorithms into a sharedUltraHdrbase class (ultrahdrcommon.h).JpegR(jpegr.h/jpegr.cpp): JPEG Multi-Picture Format (MPF), EXIF, and XMP encapsulation.HeifUltraHdr(heifultrahdr.h/heifultrahdr.cpp): HEVC bitstream encoding/decoding vialibheifwith ISO 21496-1tmaptone-mapping item references.AvifUltraHdr(avifultrahdr.h/avifultrahdr.cpp): AV1 bitstream encoding/decoding vialibheifwith ISO 21496-1tmapitem references.C-API Multi-Format Extensions:
UHDR_CODEC_HEIFandUHDR_CODEC_AVIFinuhdr_enc_set_output_format().uhdr_dec_probe()with automatic container sniffing (ISO BMFFftypvs JPEG SOI markers) and metadata extraction.uhdr_decode()across JPEG, HEIF, and AVIF streams.Color Space & Gain Map Conversion Robustness:
copy_raw_image()for decoders producing RGB/RGBA chroma formats.Testing, Portability & Documentation:
tests/ultrahdr_api_test.cppcovering all API entry points.docs/api_changes_v1.5_to_v2.0.md..github/workflows/daily-regression.yml), issue deduplication reporter (scripts/report_regression_issue.py), and automated triage candidate fixer (scripts/auto_repair.py).