// Copyright 2024 Google LLC
// SPDX-License-Identifier: BSD-2-Clause

#include <cstddef>
#include <cstdint>
#include <iostream>
#include <string>

#include "avif/avif.h"
#include "gtest/gtest.h"
#include "testutil.h"

namespace avif {
namespace {

// Used to pass the data folder path to the GoogleTest suites.
const char* data_path = nullptr;

struct ExpectedImageInfo {
  const char* filename;
  uint32_t width;
  uint32_t height;
  uint8_t depth;
  avifPixelFormat yuv_format;
  avifBool alpha_present;
  avifBool full_range;
  avifColorPrimaries color_primaries;
  avifTransferCharacteristics transfer_characteristics;
  avifMatrixCoefficients matrix_coefficients;
  size_t color_obu_size;
  size_t alpha_obu_size;
};

constexpr ExpectedImageInfo kExpectedImageInfos[] = {
    // index: 0
    {
        "Apple/edge_case_testing/non_compliant/"
        "truncated_elementary_stream.avif",
        1024,
        768,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        122336,
        0,
    },
    // index: 1
    {
        "Apple/edge_case_testing/unknown_properties/free_property.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        2063701,
        0,
    },
    // index: 2
    {
        "Apple/edge_case_testing/unknown_properties/"
        "unknown_nonessential_property.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        2063701,
        0,
    },
    // index: 3
    {
        "Apple/multilayer_examples/animals_00_multilayer_a1lx.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        1999503,
        0,
    },
    // index: 4
    {
        "Apple/multilayer_examples/animals_00_multilayer_a1op.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        1999503,
        0,
    },
    // index: 5
    {
        "Apple/multilayer_examples/animals_00_multilayer_a1op_lsel.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        1999503,
        0,
    },
    // index: 6
    {
        "Apple/multilayer_examples/animals_00_multilayer_grid_a1lx.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        2306164,
        0,
    },
    // index: 7
    {
        "Apple/multilayer_examples/animals_00_multilayer_grid_lsel.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        2306164,
        0,
    },
    // index: 8
    {
        "Apple/multilayer_examples/animals_00_multilayer_lsel.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        1999503,
        0,
    },
    // index: 9
    {
        "Apple/multilayer_examples/animals_00_singlelayer.avif",
        2048,
        1536,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)12,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        2063701,
        0,
    },
    // index: 10
    {
        "Link-U/fox.profile0.10bpc.yuv420.avif",
        1204,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        64098,
        0,
    },
    // index: 11
    {
        "Link-U/fox.profile0.10bpc.yuv420.monochrome.avif",
        1204,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        56116,
        0,
    },
    // index: 12
    {
        "Link-U/fox.profile0.10bpc.yuv420.monochrome.odd-height.avif",
        1204,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55174,
        0,
    },
    // index: 13
    {
        "Link-U/fox.profile0.10bpc.yuv420.monochrome.odd-width.avif",
        1203,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55254,
        0,
    },
    // index: 14
    {
        "Link-U/fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54589,
        0,
    },
    // index: 15
    {
        "Link-U/fox.profile0.10bpc.yuv420.odd-height.avif",
        1204,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        63262,
        0,
    },
    // index: 16
    {
        "Link-U/fox.profile0.10bpc.yuv420.odd-width.avif",
        1203,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        63442,
        0,
    },
    // index: 17
    {
        "Link-U/fox.profile0.10bpc.yuv420.odd-width.odd-height.avif",
        1203,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        62619,
        0,
    },
    // index: 18
    {
        "Link-U/fox.profile0.8bpc.yuv420.avif",
        1204,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        63157,
        0,
    },
    // index: 19
    {
        "Link-U/fox.profile0.8bpc.yuv420.monochrome.avif",
        1204,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55329,
        0,
    },
    // index: 20
    {
        "Link-U/fox.profile0.8bpc.yuv420.monochrome.odd-height.avif",
        1204,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54376,
        0,
    },
    // index: 21
    {
        "Link-U/fox.profile0.8bpc.yuv420.monochrome.odd-width.avif",
        1203,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54460,
        0,
    },
    // index: 22
    {
        "Link-U/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        53836,
        0,
    },
    // index: 23
    {
        "Link-U/fox.profile0.8bpc.yuv420.odd-height.avif",
        1204,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        62451,
        0,
    },
    // index: 24
    {
        "Link-U/fox.profile0.8bpc.yuv420.odd-width.avif",
        1203,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        62535,
        0,
    },
    // index: 25
    {
        "Link-U/fox.profile0.8bpc.yuv420.odd-width.odd-height.avif",
        1203,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        61950,
        0,
    },
    // index: 26
    {
        "Link-U/fox.profile1.10bpc.yuv444.avif",
        1204,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        74745,
        0,
    },
    // index: 27
    {
        "Link-U/fox.profile1.10bpc.yuv444.odd-height.avif",
        1204,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        73212,
        0,
    },
    // index: 28
    {
        "Link-U/fox.profile1.10bpc.yuv444.odd-width.avif",
        1203,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        73266,
        0,
    },
    // index: 29
    {
        "Link-U/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif",
        1203,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        72379,
        0,
    },
    // index: 30
    {
        "Link-U/fox.profile1.8bpc.yuv444.avif",
        1204,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        73902,
        0,
    },
    // index: 31
    {
        "Link-U/fox.profile1.8bpc.yuv444.odd-height.avif",
        1204,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        72478,
        0,
    },
    // index: 32
    {
        "Link-U/fox.profile1.8bpc.yuv444.odd-width.avif",
        1203,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        72769,
        0,
    },
    // index: 33
    {
        "Link-U/fox.profile1.8bpc.yuv444.odd-width.odd-height.avif",
        1203,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        71795,
        0,
    },
    // index: 34
    {
        "Link-U/fox.profile2.10bpc.yuv422.avif",
        1204,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        68524,
        0,
    },
    // index: 35
    {
        "Link-U/fox.profile2.10bpc.yuv422.monochrome.avif",
        1204,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        56116,
        0,
    },
    // index: 36
    {
        "Link-U/fox.profile2.10bpc.yuv422.monochrome.odd-height.avif",
        1204,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55174,
        0,
    },
    // index: 37
    {
        "Link-U/fox.profile2.10bpc.yuv422.monochrome.odd-width.avif",
        1203,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55254,
        0,
    },
    // index: 38
    {
        "Link-U/fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54589,
        0,
    },
    // index: 39
    {
        "Link-U/fox.profile2.10bpc.yuv422.odd-height.avif",
        1204,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        67602,
        0,
    },
    // index: 40
    {
        "Link-U/fox.profile2.10bpc.yuv422.odd-width.avif",
        1203,
        800,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        67803,
        0,
    },
    // index: 41
    {
        "Link-U/fox.profile2.10bpc.yuv422.odd-width.odd-height.avif",
        1203,
        799,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        66794,
        0,
    },
    // index: 42
    {
        "Link-U/fox.profile2.12bpc.yuv420.avif",
        1204,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        64688,
        0,
    },
    // index: 43
    {
        "Link-U/fox.profile2.12bpc.yuv420.monochrome.avif",
        1204,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        56651,
        0,
    },
    // index: 44
    {
        "Link-U/fox.profile2.12bpc.yuv420.monochrome.odd-height.avif",
        1204,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55561,
        0,
    },
    // index: 45
    {
        "Link-U/fox.profile2.12bpc.yuv420.monochrome.odd-width.avif",
        1203,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55679,
        0,
    },
    // index: 46
    {
        "Link-U/fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54936,
        0,
    },
    // index: 47
    {
        "Link-U/fox.profile2.12bpc.yuv420.odd-height.avif",
        1204,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        63714,
        0,
    },
    // index: 48
    {
        "Link-U/fox.profile2.12bpc.yuv420.odd-width.avif",
        1203,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        63791,
        0,
    },
    // index: 49
    {
        "Link-U/fox.profile2.12bpc.yuv420.odd-width.odd-height.avif",
        1203,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        63145,
        0,
    },
    // index: 50
    {
        "Link-U/fox.profile2.12bpc.yuv422.avif",
        1204,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        69054,
        0,
    },
    // index: 51
    {
        "Link-U/fox.profile2.12bpc.yuv422.monochrome.avif",
        1204,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        56651,
        0,
    },
    // index: 52
    {
        "Link-U/fox.profile2.12bpc.yuv422.monochrome.odd-height.avif",
        1204,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55561,
        0,
    },
    // index: 53
    {
        "Link-U/fox.profile2.12bpc.yuv422.monochrome.odd-width.avif",
        1203,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55679,
        0,
    },
    // index: 54
    {
        "Link-U/fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54936,
        0,
    },
    // index: 55
    {
        "Link-U/fox.profile2.12bpc.yuv422.odd-height.avif",
        1204,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        67792,
        0,
    },
    // index: 56
    {
        "Link-U/fox.profile2.12bpc.yuv422.odd-width.avif",
        1203,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        68051,
        0,
    },
    // index: 57
    {
        "Link-U/fox.profile2.12bpc.yuv422.odd-width.odd-height.avif",
        1203,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        67328,
        0,
    },
    // index: 58
    {
        "Link-U/fox.profile2.12bpc.yuv444.avif",
        1204,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        75004,
        0,
    },
    // index: 59
    {
        "Link-U/fox.profile2.12bpc.yuv444.monochrome.avif",
        1204,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        56651,
        0,
    },
    // index: 60
    {
        "Link-U/fox.profile2.12bpc.yuv444.monochrome.odd-height.avif",
        1204,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55561,
        0,
    },
    // index: 61
    {
        "Link-U/fox.profile2.12bpc.yuv444.monochrome.odd-width.avif",
        1203,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55679,
        0,
    },
    // index: 62
    {
        "Link-U/fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54936,
        0,
    },
    // index: 63
    {
        "Link-U/fox.profile2.12bpc.yuv444.odd-height.avif",
        1204,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        73694,
        0,
    },
    // index: 64
    {
        "Link-U/fox.profile2.12bpc.yuv444.odd-width.avif",
        1203,
        800,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        73720,
        0,
    },
    // index: 65
    {
        "Link-U/fox.profile2.12bpc.yuv444.odd-width.odd-height.avif",
        1203,
        799,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        72725,
        0,
    },
    // index: 66
    {
        "Link-U/fox.profile2.8bpc.yuv422.avif",
        1204,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        67538,
        0,
    },
    // index: 67
    {
        "Link-U/fox.profile2.8bpc.yuv422.monochrome.avif",
        1204,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        55329,
        0,
    },
    // index: 68
    {
        "Link-U/fox.profile2.8bpc.yuv422.monochrome.odd-height.avif",
        1204,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54376,
        0,
    },
    // index: 69
    {
        "Link-U/fox.profile2.8bpc.yuv422.monochrome.odd-width.avif",
        1203,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        54460,
        0,
    },
    // index: 70
    {
        "Link-U/fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif",
        1203,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        53836,
        0,
    },
    // index: 71
    {
        "Link-U/fox.profile2.8bpc.yuv422.odd-height.avif",
        1204,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        66814,
        0,
    },
    // index: 72
    {
        "Link-U/fox.profile2.8bpc.yuv422.odd-width.avif",
        1203,
        800,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        66974,
        0,
    },
    // index: 73
    {
        "Link-U/fox.profile2.8bpc.yuv422.odd-width.odd-height.avif",
        1203,
        799,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        66154,
        0,
    },
    // index: 74
    {
        "Link-U/"
        "hato.profile0.10bpc.yuv420.monochrome.no-cdef.no-restoration.avif",
        3082,
        2048,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        178883,
        0,
    },
    // index: 75
    {
        "Link-U/hato.profile0.10bpc.yuv420.no-cdef.no-restoration.avif",
        3082,
        2048,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        208271,
        0,
    },
    // index: 76
    {
        "Link-U/hato.profile0.8bpc.yuv420.monochrome.no-cdef.avif",
        3082,
        2048,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        177474,
        0,
    },
    // index: 77
    {
        "Link-U/hato.profile0.8bpc.yuv420.no-cdef.avif",
        3082,
        2048,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        207414,
        0,
    },
    // index: 78
    {
        "Link-U/"
        "hato.profile2.10bpc.yuv422.monochrome.no-cdef.no-restoration.avif",
        3082,
        2048,
        10,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        178883,
        0,
    },
    // index: 79
    {
        "Link-U/hato.profile2.10bpc.yuv422.no-cdef.no-restoration.avif",
        3082,
        2048,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        225894,
        0,
    },
    // index: 80
    {
        "Link-U/hato.profile2.12bpc.yuv422.monochrome.avif",
        3082,
        2048,
        12,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)9,
        231531,
        0,
    },
    // index: 81
    {
        "Link-U/"
        "hato.profile2.12bpc.yuv422.monochrome.no-cdef.no-restoration.avif",
        3082,
        2048,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        226731,
        0,
    },
    // index: 82
    {
        "Link-U/hato.profile2.12bpc.yuv422.no-cdef.no-restoration.avif",
        3082,
        2048,
        12,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        226731,
        0,
    },
    // index: 83
    {
        "Link-U/hato.profile2.8bpc.yuv422.monochrome.no-cdef.avif",
        3082,
        2048,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        177474,
        0,
    },
    // index: 84
    {
        "Link-U/hato.profile2.8bpc.yuv422.no-cdef.avif",
        3082,
        2048,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        225881,
        0,
    },
    // index: 85
    {
        "Link-U/kimono.avif",
        722,
        1024,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        85120,
        0,
    },
    // index: 86
    {
        "Link-U/kimono.crop.avif",
        722,
        1024,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        85120,
        0,
    },
    // index: 87
    {
        "Link-U/kimono.mirror-horizontal.avif",
        722,
        1024,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        84661,
        0,
    },
    // index: 88
    {
        "Link-U/kimono.mirror-vertical.avif",
        722,
        1024,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        84297,
        0,
    },
    // index: 89
    {
        "Link-U/kimono.mirror-vertical.rotate270.avif",
        1024,
        722,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        85184,
        0,
    },
    // index: 90
    {
        "Link-U/kimono.mirror-vertical.rotate270.crop.avif",
        1024,
        722,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        85184,
        0,
    },
    // index: 91
    {
        "Link-U/kimono.rotate270.avif",
        1024,
        722,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        84551,
        0,
    },
    // index: 92
    {
        "Link-U/kimono.rotate90.avif",
        1024,
        722,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)9,
        84502,
        0,
    },
    // index: 93
    {
        "Microsoft/Chimera_10bit_cropped_to_1920x1008.avif",
        1920,
        1080,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        95279,
        0,
    },
    // index: 94
    {
        "Microsoft/Chimera_10bit_cropped_to_1920x1008_with_HDR_metadata.avif",
        1920,
        1080,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)10,
        95279,
        0,
    },
    // index: 95
    {
        "Microsoft/Chimera_8bit_cropped_480x256.avif",
        480,
        270,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        37860,
        0,
    },
    // index: 96
    {
        "Microsoft/Irvine_CA.avif",
        480,
        640,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        27601,
        0,
    },
    // index: 97
    {
        "Microsoft/Mexico.avif",
        1920,
        1080,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        218726,
        0,
    },
    // index: 98
    {
        "Microsoft/Mexico_YUV444.avif",
        960,
        540,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        158350,
        0,
    },
    // index: 99
    {
        "Microsoft/Monochrome.avif",
        1280,
        720,
        8,
        AVIF_PIXEL_FORMAT_YUV400,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)1,
        (avifMatrixCoefficients)1,
        6979,
        0,
    },
    // index: 100
    {
        "Microsoft/Ronda_rotate90.avif",
        1920,
        1080,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        95912,
        0,
    },
    // index: 101
    {
        "Microsoft/Summer_Nature_4k.avif",
        3840,
        2160,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        279919,
        0,
    },
    // index: 102
    {
        "Microsoft/Summer_in_Tomsk_720p_5x4_grid.avif",
        6400,
        2880,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        1963366,
        0,
    },
    // index: 103
    {
        "Microsoft/Tomsk_with_thumbnails.avif",
        1280,
        720,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        7618,
        0,
    },
    // index: 104
    {
        "Microsoft/bbb_4k.avif",
        3840,
        2160,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        30980,
        0,
    },
    // index: 105
    {
        "Microsoft/bbb_alpha_inverted.avif",
        3840,
        2160,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_TRUE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        4508,
        3202,
    },
    // index: 106
    {
        "Microsoft/kids_720p.avif",
        1280,
        720,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        57105,
        0,
    },
    // index: 107
    {
        "Microsoft/reduced_still_picture_header.avif",
        1280,
        720,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        7618,
        0,
    },
    // index: 108
    {
        "Microsoft/still_picture.avif",
        1280,
        720,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        7624,
        0,
    },
    // index: 109
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-0_lossless.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)0,
        2030306,
        0,
    },
    // index: 110
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-9_yuv420_limited_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        92239,
        0,
    },
    // index: 111
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-9_yuv420_limited_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        32939,
        0,
    },
    // index: 112
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-9_yuv420_limited_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        9547,
        0,
    },
    // index: 113
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-9_yuv444_full_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        129471,
        0,
    },
    // index: 114
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-9_yuv444_full_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        45646,
        0,
    },
    // index: 115
    {
        "Netflix/avif/hdr_cosmos01000_cicp9-16-9_yuv444_full_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        12595,
        0,
    },
    // index: 116
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-0_lossless.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)0,
        2865083,
        0,
    },
    // index: 117
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-9_yuv420_limited_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        260689,
        0,
    },
    // index: 118
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-9_yuv420_limited_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        130393,
        0,
    },
    // index: 119
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-9_yuv420_limited_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        29579,
        0,
    },
    // index: 120
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-9_yuv444_full_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        372069,
        0,
    },
    // index: 121
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-9_yuv444_full_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        173936,
        0,
    },
    // index: 122
    {
        "Netflix/avif/hdr_cosmos01650_cicp9-16-9_yuv444_full_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        39535,
        0,
    },
    // index: 123
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-0_lossless.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)0,
        2164296,
        0,
    },
    // index: 124
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-9_yuv420_limited_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        124229,
        0,
    },
    // index: 125
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-9_yuv420_limited_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        40359,
        0,
    },
    // index: 126
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-9_yuv420_limited_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        7874,
        0,
    },
    // index: 127
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-9_yuv444_full_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        204393,
        0,
    },
    // index: 128
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-9_yuv444_full_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        61973,
        0,
    },
    // index: 129
    {
        "Netflix/avif/hdr_cosmos07296_cicp9-16-9_yuv444_full_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        11224,
        0,
    },
    // index: 130
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-0_lossless.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)0,
        3055111,
        0,
    },
    // index: 131
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-9_yuv420_limited_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        95933,
        0,
    },
    // index: 132
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-9_yuv420_limited_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        47119,
        0,
    },
    // index: 133
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-9_yuv420_limited_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        16529,
        0,
    },
    // index: 134
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-9_yuv444_full_qp10.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        143650,
        0,
    },
    // index: 135
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-9_yuv444_full_qp20.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        66240,
        0,
    },
    // index: 136
    {
        "Netflix/avif/hdr_cosmos12920_cicp9-16-9_yuv444_full_qp40.avif",
        2048,
        858,
        10,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)9,
        (avifTransferCharacteristics)16,
        (avifMatrixCoefficients)9,
        23455,
        0,
    },
    // index: 137
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-0_lossless.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)0,
        1323382,
        0,
    },
    // index: 138
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-6_yuv420_limited_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        91887,
        0,
    },
    // index: 139
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-6_yuv420_limited_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        44338,
        0,
    },
    // index: 140
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-6_yuv420_limited_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        12204,
        0,
    },
    // index: 141
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-6_yuv444_full_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        129688,
        0,
    },
    // index: 142
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-6_yuv444_full_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        61926,
        0,
    },
    // index: 143
    {
        "Netflix/avif/sdr_cosmos01000_cicp1-13-6_yuv444_full_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        16744,
        0,
    },
    // index: 144
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-0_lossless.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)0,
        1734421,
        0,
    },
    // index: 145
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-6_yuv420_limited_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        246525,
        0,
    },
    // index: 146
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-6_yuv420_limited_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        128922,
        0,
    },
    // index: 147
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-6_yuv420_limited_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        39209,
        0,
    },
    // index: 148
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-6_yuv444_full_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        370809,
        0,
    },
    // index: 149
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-6_yuv444_full_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        187912,
        0,
    },
    // index: 150
    {
        "Netflix/avif/sdr_cosmos01650_cicp1-13-6_yuv444_full_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        53041,
        0,
    },
    // index: 151
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-0_lossless.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)0,
        1389248,
        0,
    },
    // index: 152
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-6_yuv420_limited_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        131503,
        0,
    },
    // index: 153
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-6_yuv420_limited_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        62338,
        0,
    },
    // index: 154
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-6_yuv420_limited_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        15027,
        0,
    },
    // index: 155
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-6_yuv444_full_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        282438,
        0,
    },
    // index: 156
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-6_yuv444_full_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        134294,
        0,
    },
    // index: 157
    {
        "Netflix/avif/sdr_cosmos07296_cicp1-13-6_yuv444_full_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        24570,
        0,
    },
    // index: 158
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-0_lossless.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)0,
        2061853,
        0,
    },
    // index: 159
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-6_yuv420_limited_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        153575,
        0,
    },
    // index: 160
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-6_yuv420_limited_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        75234,
        0,
    },
    // index: 161
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-6_yuv420_limited_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        27418,
        0,
    },
    // index: 162
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-6_yuv444_full_qp10.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        285667,
        0,
    },
    // index: 163
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-6_yuv444_full_qp20.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        119878,
        0,
    },
    // index: 164
    {
        "Netflix/avif/sdr_cosmos12920_cicp1-13-6_yuv444_full_qp40.avif",
        2048,
        858,
        8,
        AVIF_PIXEL_FORMAT_YUV444,
        AVIF_FALSE,
        AVIF_TRUE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)6,
        41906,
        0,
    },
    // index: 165
    {
        "Netflix/avis/Chimera-AV1-10bit-480x270.avif",
        480,
        270,
        10,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)2,
        (avifTransferCharacteristics)2,
        (avifMatrixCoefficients)2,
        142540,
        0,
    },
    // index: 166
    {
        "Netflix/avis/alpha_video.avif",
        640,
        480,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_TRUE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        3487,
        4642,
    },
    // index: 167
    {
        "Xiph/abandoned_filmgrain.avif",
        1404,
        936,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        141119,
        0,
    },
    // index: 168
    {
        "Xiph/fruits_2layer_thumbsize.avif",
        1296,
        864,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        35097,
        0,
    },
    // index: 169
    {
        "Xiph/quebec_3layer_op2.avif",
        360,
        182,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        86246,
        0,
    },
    // index: 170
    {
        "Xiph/tiger_3layer_1res.avif",
        1216,
        832,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        70551,
        0,
    },
    // index: 171
    {
        "Xiph/tiger_3layer_3res.avif",
        1216,
        832,
        8,
        AVIF_PIXEL_FORMAT_YUV420,
        AVIF_FALSE,
        AVIF_FALSE,
        (avifColorPrimaries)1,
        (avifTransferCharacteristics)13,
        (avifMatrixCoefficients)1,
        64582,
        0,
    },
};

void VerifyInfo(const ExpectedImageInfo& expected_info,
                const avifImage& image) {
  EXPECT_EQ(image.width, expected_info.width);
  EXPECT_EQ(image.height, expected_info.height);
  EXPECT_EQ(image.depth, expected_info.depth);
  EXPECT_EQ(image.yuvFormat, expected_info.yuv_format);
  EXPECT_EQ(image.yuvRange,
            expected_info.full_range ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED);
  EXPECT_EQ(image.colorPrimaries, expected_info.color_primaries);
  EXPECT_EQ(image.transferCharacteristics,
            expected_info.transfer_characteristics);
  EXPECT_EQ(image.matrixCoefficients, expected_info.matrix_coefficients);
}

using ConformanceTest = ::testing::TestWithParam<ExpectedImageInfo>;

INSTANTIATE_TEST_SUITE_P(Parameterized, ConformanceTest,
                         ::testing::ValuesIn(kExpectedImageInfos));

TEST_P(ConformanceTest, ValidateDecode) {
  if (!testutil::Av1DecoderAvailable()) {
    GTEST_SKIP() << "AV1 Codec unavailable, skip test.";
  }
  DecoderPtr decoder(avifDecoderCreate());
  ASSERT_NE(decoder, nullptr);
  const ExpectedImageInfo& info = GetParam();
  decoder.get()->strictFlags = 0;
  ASSERT_EQ(
      avifDecoderSetIOFile(decoder.get(),
                           (std::string(data_path) + info.filename).c_str()),
      AVIF_RESULT_OK);
  ASSERT_EQ(avifDecoderParse(decoder.get()), AVIF_RESULT_OK);
  VerifyInfo(info, *decoder->image);
  EXPECT_EQ(decoder->alphaPresent, info.alpha_present);

  ASSERT_EQ(avifDecoderNextImage(decoder.get()), AVIF_RESULT_OK);
  // Link-U 422 files have wrong subsampling in the Avif header(decoded one is
  // right).
  if (std::string(info.filename).find("Link-U") == std::string::npos ||
      std::string(info.filename).find("yuv422") == std::string::npos) {
    VerifyInfo(info, *decoder->image);
  }
}

}  // namespace
}  // namespace avif

int main(int argc, char** argv) {
  ::testing::InitGoogleTest(&argc, argv);
  if (argc != 2) {
    std::cerr << "There must be exactly one argument containing the path to "
                 "the test data folder"
              << std::endl;
    return 1;
  }
  avif::data_path = argv[1];
  return RUN_ALL_TESTS();
}
