Skip to content

Commit

Permalink
Add details on some gain map test images. (#2414)
Browse files Browse the repository at this point in the history
  • Loading branch information
maryla-uc authored Aug 28, 2024
1 parent 9c81aa6 commit 4c56ac1
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions tests/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand All @@ -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*'.

Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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.

Expand All @@ -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)
Expand All @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 4c56ac1

Please sign in to comment.