From 4c56ac1c0bfa017d485ab01c3e5cebcd93c8fb55 Mon Sep 17 00:00:00 2001 From: maryla-uc Date: Wed, 28 Aug 2024 14:26:21 +0200 Subject: [PATCH] Add details on some gain map test images. (#2414) --- tests/data/README.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tests/data/README.md b/tests/data/README.md index 824e2e6c3b..73fa12ff75 100644 --- a/tests/data/README.md +++ b/tests/data/README.md @@ -436,7 +436,9 @@ Source: Same pixels as `color_grid_alpha_nogrid.avif` encoded with License: [same as libavif](https://github.com/AOMediaCodec/libavif/blob/main/LICENSE) -Source: Based on paris_exif_xmp_icc.jpg with ICC stripped out and a gain map added. +Source: Based on `paris_exif_xmp_icc.jpg` with ICC stripped out and a gain map added +using Photoshop. + Contains a MPF (Multi-Picture Format) segment with metadata pointing to a second image at offset 33487. The MPF metadata is in little endian order, as signaled by the four bytes 'II*\0'. @@ -461,7 +463,7 @@ at offset 33487. The MPF metadata is in little endian order, as signaled by the License: [same as libavif](https://github.com/AOMediaCodec/libavif/blob/main/LICENSE) -Source: Same as paris_exif_xmp_gainmap_littleendian.jpg but manually edited with +Source: Same as `paris_exif_xmp_gainmap_littleendian.jpg` but manually edited with a hex editor to make the MPF metadata big endian, as signaled by the four bytes 'MM\0*'. @@ -537,7 +539,8 @@ Source: generated with a modified libavif at https://github.com/maryla-uc/libavi by running `./tests/avifgainmaptest --gtest_filter=GainMapTest.CreateGainMapImages ../tests/data/`  Contains a gain map with the `version` field set to 99 in the tmap box. -`minimum_version` and `writer_version` are 0. +Fields `minimum_version` and `writer_version` are 0. +Decoders should ignore the gain map since the `version` is unsupported. ### File [unsupported_gainmap_minimum_version.avif](unsupported_gainmap_minimum_version.avif) @@ -548,8 +551,9 @@ License: [same as libavif](https://github.com/AOMediaCodec/libavif/blob/main/LIC Source: generated with a modified libavif at https://github.com/maryla-uc/libavif/tree/weirdgainmaps by running `./tests/avifgainmaptest --gtest_filter=GainMapTest.CreateGainMapImages ../tests/data/`  -Contains a gain map with the `minimum_version` field set to 99 in the tmap box. -`version` and `writer_version` are 0. +Contains a gain map with the `minimum_version` and `writer_version` fields set to 99 in the tmap box. +Field `version` is 0. +Decoders should ignore the gain map since the `minimum_version` is unsupported. ### File [unsupported_gainmap_writer_version_with_extra_bytes.avif](unsupported_gainmap_writer_version_with_extra_bytes.avif) @@ -561,8 +565,10 @@ Source: generated with a modified libavif at https://github.com/maryla-uc/libavi by running `./tests/avifgainmaptest --gtest_filter=GainMapTest.CreateGainMapImages ../tests/data/`  Contains a gain map with the `writer_version` field set to 99 in the tmap box, -and some extra unexpected bytes at the end of the gain map metadata. +and some extra bytes at the end of the gain map metadata. `version` and `minimum_version` are 0. +Decoders should decode this image including the gain map. The extra bytes should not +cause issues since the `writer_version` is unsupported. ### File [supported_gainmap_writer_version_with_extra_bytes.avif](supported_gainmap_writer_version_with_extra_bytes.avif) @@ -575,6 +581,7 @@ by running `./tests/avifgainmaptest --gtest_filter=GainMapTest.CreateGainMapImag Contains a gain map with some extra unexpected bytes at the end of the gain map metadata. `version`, `minimum_version` and `writer_version` are 0. +Because of the extra bytes despite a supported `writer_version`, this file should be treated as invalid. ### File [seine_hdr_srgb.avif](seine_hdr_srgb.avif) @@ -588,7 +595,7 @@ https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw See also sources/seine.psd -HDR image using the PQ transfer curve. Contains a gain map in +HDR image using the PQ transfer curve. Contains an irrelevant gain map in [Adobe's format](https://helpx.adobe.com/camera-raw/using/gain-map.html) that is not recognized by libavif and ignored by the tests. @@ -610,6 +617,10 @@ License: [same as libavif](https://github.com/AOMediaCodec/libavif/blob/main/LIC Source : same as seine_hdr_srgb but saved with the Rec. 2020 color space in Photoshop (Camera Raw 16.0.1.1683). +HDR image using the PQ transfer curve and Rec. 2020 color space. Contains an irrelevant gain map in +[Adobe's format](https://helpx.adobe.com/camera-raw/using/gain-map.html) that is not recognized by +libavif and ignored by the tests. + ### File [seine_sdr_gainmap_srgb.avif](seine_sdr_gainmap_srgb.avif) ![](seine_sdr_gainmap_srgb.avif) @@ -635,6 +646,7 @@ License: [same as libavif](https://github.com/AOMediaCodec/libavif/blob/main/LIC Source : same as seine_sdr_gainmap_srgb.avif before commit 10b7232 An image with a `tmap` item (i.e. a gain map) but no 'tmap' brand in the `ftyp` box. +The gain map should be ignored by the decoder since the `tmap` brand is missing. ### File [seine_sdr_gainmap_big_srgb.avif](seine_sdr_gainmap_big_srgb.avif) @@ -644,7 +656,7 @@ Source : generated by running `./tests/avifgainmaptest --gtest_filter=GainMapTes after changing `kUpdateTestImages` to true in the `avifgainmaptest.cc`. SDR image with a gain map to allow tone mapping to HDR. The gain map's width and height are doubled compared to the base image. -This is an atypical image just for testing. Typically, the gain map would be either the same size or smaller as the base image. +This is a valid but atypical image for testing. Typically, the gain map would be either the same size or smaller as the base image. ### File [seine_hdr_gainmap_srgb.avif](seine_hdr_gainmap_srgb.avif)