add support for `lhv1` image items (layered HEVC)
Hi,
heif-info utility output:
1.17.6:
MIME type: image/heic
main brand: heis
compatible brands: mif1, heis, avci
Could not read HEIF/AVIF file: Invalid input: Non-existing item ID referenced: 'pitm' box references a non-existing image
1.19.7:
MIME type: image/heic
main brand: heis
compatible brands: mif1, heis, avci
image: 1024x512 (id=20003), primary
colorspace: YCbCr, 4:2:0
bit depth: 8
color profile: no
alpha channel: no
depth channel: no
metadata:
none
transformations:
none
region annotations:
none
properties:
The returned number of images is equal to 1.
The following error is returned on the read attempt in 1.19.7 version:
Failed to read image. Error: Error while loading plugin: No decoding plugin installed for this compression format (11 - 6003)
Local image viewers (FastStone, Irfan, paint .NET, gimp) successfully open this file while some online readers report reading error.
Could you please check the file?
The file multilayer004 contains two images.
The first image is coded with AVC. You need the openh264 plugin to decode it, thus the error message is correct (BTW: gimp is also using libheif, thus it is a misconfiguration of your libheif plugins).
The second image is a layered HEVC (lhv1) which is indeed unsupported. libheif does not return it with libheif-info because it currently does not know that this item is an image.
I'll transform this issue into a reminder issue to add support for lhv1 image items.
Does anything actually make lhv1 files? I realise it is in the Nokia set, but that appears to be hand-crafted.
I've never seen any and already forgot about it. Thus the reminder issue that this thing exists :-) Maybe layered images are used in AVIF. At least it is implemented in libavif (reading only if I see this correctly).