libvips / libvips/libvips

[Feature Request] Add support for libheif range flag

Open
#3,143 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
11.7k
Forks
797
Avg merge
3d 6h
Merged PRs (30d)
15

Description

I would like to add support to my application for HDR HEIF images using the range flag for AVIF images. It appears libheif already has some support for this here so plumbing the flag through should be pretty straightforward I think.
https://github.com/strukturag/libheif/blob/ea78603d8e47096606813d221725621306789ff2/libheif/plugins/heif_encoder_aom.cc#L939

Netflix added some HDR AVIF images to the AOM repo here:
https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Netflix/avif

They were generated with avifenc using the command:

avifenc -c aom --speed 0 --jobs 12 --depth 10 --ignore-icc --cicp 9/16/9 --range full --yuv 444 --min 40 --max 40 original_hdr_cosmosXXXXX.png hdr_cosmosXXXXX_cicp9-16-9_yuv444_full_qp40.avif

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing libheif's range-flag handling in libheif/plugins/heif_encoder_aom.cc with the libvips HEIF/AVIF encoding path. Reproduce the referenced avifenc command and inspect the Netflix HDR AVIF samples. Done means the range flag can be passed through for AVIF output and HDR samples retain the requested full-range behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.