LLVMFuzzerTestOneInput:
   29|  16.4k|{
   30|  16.4k|  auto reader = std::make_shared<StreamReader_memory>(data, size, false);
   31|       |
   32|       |  // --- OSS-Fuzz assumes a bug if the allocated memory exceeds 2560 MB.
   33|       |  //     Set a lower allocation limit to prevent this.
   34|       |
   35|       |  // Use a context for tracking the memory usage and set the reduced limit.
   36|  16.4k|  HeifContext ctx;
   37|  16.4k|  ctx.get_security_limits()->max_total_memory = UINT64_C(2) * 1024 * 1024 * 1024;
   38|       |
   39|  16.4k|  BitstreamRange range(reader, size);
   40|   167k|  for (;;) {
   41|   167k|    std::shared_ptr<Box> box;
   42|   167k|    Error error = Box::read(range, &box, ctx.get_security_limits());
   43|   167k|    if (error != Error::Ok || range.error()) {
  ------------------
  |  Branch (43:9): [True: 16.4k, False: 150k]
  |  Branch (43:31): [True: 0, False: 150k]
  ------------------
   44|  16.4k|      break;
   45|  16.4k|    }
   46|       |
   47|   150k|    box->get_type();
   48|   150k|    box->get_type_string();
   49|   150k|    Indent indent;
   50|   150k|    box->dump(indent);
   51|   150k|  }
   52|       |
   53|  16.4k|  return 0;
   54|  16.4k|}

heif_polarization_angle_is_no_filter:
  581|  11.9k|{
  582|  11.9k|  uint32_t bits;
  583|  11.9k|  memcpy(&bits, &angle, sizeof(bits));
  584|  11.9k|  return bits == 0xFFFFFFFF;
  585|  11.9k|}

_Z30initialize_heif_tai_clock_infoP19heif_tai_clock_info:
   29|  1.47k|{
   30|  1.47k|  taic->version = 1;
   31|  1.47k|  taic->time_uncertainty = heif_tai_clock_info_time_uncertainty_unknown;
  ------------------
  |  |   52|  1.47k|#define heif_tai_clock_info_time_uncertainty_unknown UINT64_C(0xFFFFFFFFFFFFFFFF)
  ------------------
   32|  1.47k|  taic->clock_resolution = 0;
   33|  1.47k|  taic->clock_drift_rate = heif_tai_clock_info_clock_drift_rate_unknown;
  ------------------
  |  |   53|  1.47k|#define heif_tai_clock_info_clock_drift_rate_unknown INT32_C(0x7FFFFFFF)
  ------------------
   34|  1.47k|  taic->clock_type = heif_tai_clock_info_clock_type_unknown;
  ------------------
  |  |   54|  1.47k|#define heif_tai_clock_info_clock_type_unknown 0
  ------------------
   35|  1.47k|}
_Z36initialize_heif_tai_timestamp_packetP25heif_tai_timestamp_packet:
   47|    521|{
   48|    521|  itai->version = 1;
   49|    521|  itai->tai_timestamp = 0;
   50|    521|  itai->synchronization_state = false;
   51|    521|  itai->timestamp_generation_failure = false;
   52|    521|  itai->timestamp_is_modified = false;
   53|    521|}

_ZN19StreamReader_memoryC2EPKhmb:
   78|  16.4k|    : m_length(size)
   79|  16.4k|{
   80|  16.4k|  if (copy) {
  ------------------
  |  Branch (80:7): [True: 0, False: 16.4k]
  ------------------
   81|      0|    m_owned_data = new uint8_t[m_length];
   82|      0|    memcpy(m_owned_data, data, size);
   83|       |
   84|      0|    m_data = m_owned_data;
   85|      0|  }
   86|  16.4k|  else {
   87|  16.4k|    m_data = data;
   88|  16.4k|  }
   89|  16.4k|}
_ZN19StreamReader_memoryD2Ev:
   92|  16.4k|{
   93|  16.4k|  if (m_owned_data) {
  ------------------
  |  Branch (93:7): [True: 0, False: 16.4k]
  ------------------
   94|      0|    delete[] m_owned_data;
   95|      0|  }
   96|  16.4k|}
_ZNK19StreamReader_memory12get_positionEv:
   99|  1.10M|{
  100|  1.10M|  return m_position;
  101|  1.10M|}
_ZN19StreamReader_memory18wait_for_file_sizeEm:
  104|   973k|{
  105|   973k|  return (target_size > m_length) ? grow_status::size_beyond_eof : grow_status::size_reached;
  ------------------
  |  Branch (105:10): [True: 11.3k, False: 962k]
  ------------------
  106|   973k|}
_ZN19StreamReader_memory4readEPvm:
  109|  57.4M|{
  110|  57.4M|  uint64_t end_pos = m_position + size;
  111|  57.4M|  if (end_pos > m_length) {
  ------------------
  |  Branch (111:7): [True: 0, False: 57.4M]
  ------------------
  112|      0|    return false;
  113|      0|  }
  114|       |
  115|  57.4M|  memcpy(data, &m_data[m_position], size);
  116|  57.4M|  m_position += size;
  117|       |
  118|  57.4M|  return true;
  119|  57.4M|}
_ZN19StreamReader_memory4seekEm:
  122|   106k|{
  123|   106k|  if (position > m_length)
  ------------------
  |  Branch (123:7): [True: 0, False: 106k]
  ------------------
  124|      0|    return false;
  125|       |
  126|   106k|  m_position = position;
  127|   106k|  return true;
  128|   106k|}
_ZN14BitstreamRangeC2ENSt3__110shared_ptrI12StreamReaderEEmPS_:
  156|   500k|    : m_istr(std::move(istr)), m_parent_range(parent), m_remaining(length)
  157|   500k|{
  158|   500k|  if (parent) {
  ------------------
  |  Branch (158:7): [True: 484k, False: 16.4k]
  ------------------
  159|   484k|    m_nesting_level = parent->m_nesting_level + 1;
  160|   484k|  }
  161|   500k|}
_ZN14BitstreamRange5read8Ev:
  184|  21.0M|{
  185|  21.0M|  if (!prepare_read(1)) {
  ------------------
  |  Branch (185:7): [True: 151k, False: 20.8M]
  ------------------
  186|   151k|    return 0;
  187|   151k|  }
  188|       |
  189|  20.8M|  uint8_t buf;
  190|       |
  191|  20.8M|  auto istr = get_istream();
  192|  20.8M|  bool success = istr->read((char*) &buf, 1);
  193|       |
  194|  20.8M|  if (!success) {
  ------------------
  |  Branch (194:7): [True: 0, False: 20.8M]
  ------------------
  195|      0|    set_eof_while_reading();
  196|      0|    return 0;
  197|      0|  }
  198|       |
  199|  20.8M|  return buf;
  200|  20.8M|}
_ZN14BitstreamRange6read16Ev:
  204|  8.62M|{
  205|  8.62M|  if (!prepare_read(2)) {
  ------------------
  |  Branch (205:7): [True: 21.8k, False: 8.59M]
  ------------------
  206|  21.8k|    return 0;
  207|  21.8k|  }
  208|       |
  209|  8.59M|  uint8_t buf[2];
  210|       |
  211|  8.59M|  auto istr = get_istream();
  212|  8.59M|  bool success = istr->read((char*) buf, 2);
  213|       |
  214|  8.59M|  if (!success) {
  ------------------
  |  Branch (214:7): [True: 0, False: 8.59M]
  ------------------
  215|      0|    set_eof_while_reading();
  216|      0|    return 0;
  217|      0|  }
  218|       |
  219|  8.59M|  return static_cast<uint16_t>((buf[0] << 8) | (buf[1]));
  220|  8.59M|}
_ZN14BitstreamRange7read16sEv:
  224|   469k|{
  225|   469k|  uint16_t v = read16();
  226|       |
  227|   469k|  if (v & 0x8000) {
  ------------------
  |  Branch (227:7): [True: 97.2k, False: 371k]
  ------------------
  228|  97.2k|    auto val = static_cast<int16_t>((~v) & 0x7fff);
  229|  97.2k|    return static_cast<int16_t>(-val - 1);
  230|  97.2k|  }
  231|   371k|  else {
  232|   371k|    return static_cast<int16_t>(v);
  233|   371k|  }
  234|   469k|}
_ZN14BitstreamRange6read24Ev:
  238|    213|{
  239|    213|  if (!prepare_read(3)) {
  ------------------
  |  Branch (239:7): [True: 0, False: 213]
  ------------------
  240|      0|    return 0;
  241|      0|  }
  242|       |
  243|    213|  uint8_t buf[3];
  244|       |
  245|    213|  auto istr = get_istream();
  246|    213|  bool success = istr->read((char*) buf, 3);
  247|       |
  248|    213|  if (!success) {
  ------------------
  |  Branch (248:7): [True: 0, False: 213]
  ------------------
  249|      0|    set_eof_while_reading();
  250|      0|    return 0;
  251|      0|  }
  252|       |
  253|    213|  return (uint32_t) ((buf[0] << 16) |
  254|    213|                     (buf[1] << 8) |
  255|    213|                     (buf[2]));
  256|    213|}
_ZN14BitstreamRange6read32Ev:
  259|   997M|{
  260|   997M|  if (!prepare_read(4)) {
  ------------------
  |  Branch (260:7): [True: 994M, False: 3.75M]
  ------------------
  261|   994M|    return 0;
  262|   994M|  }
  263|       |
  264|  3.75M|  uint8_t buf[4];
  265|       |
  266|  3.75M|  auto istr = get_istream();
  267|  3.75M|  bool success = istr->read((char*) buf, 4);
  268|       |
  269|  3.75M|  if (!success) {
  ------------------
  |  Branch (269:7): [True: 0, False: 3.75M]
  ------------------
  270|      0|    set_eof_while_reading();
  271|      0|    return 0;
  272|      0|  }
  273|       |
  274|  3.75M|  return four_bytes_to_uint32(buf[0], buf[1], buf[2], buf[3]);
  275|  3.75M|}
_ZN14BitstreamRange9read_uintEi:
  279|  2.01M|{
  280|  2.01M|  switch (len)
  281|  2.01M|  {
  282|  1.78M|    case 8:
  ------------------
  |  Branch (282:5): [True: 1.78M, False: 230k]
  ------------------
  283|  1.78M|      return read8();
  284|  85.1k|    case 16:
  ------------------
  |  Branch (284:5): [True: 85.1k, False: 1.93M]
  ------------------
  285|  85.1k|      return read16();
  286|    213|    case 24:
  ------------------
  |  Branch (286:5): [True: 213, False: 2.01M]
  ------------------
  287|    213|      return read24();
  288|   144k|    case 32:
  ------------------
  |  Branch (288:5): [True: 144k, False: 1.87M]
  ------------------
  289|   144k|      return read32();
  290|    305|    case 64:
  ------------------
  |  Branch (290:5): [True: 305, False: 2.01M]
  ------------------
  291|    305|      return read64();
  292|      0|    default:
  ------------------
  |  Branch (292:5): [True: 0, False: 2.01M]
  ------------------
  293|      0|      assert(false);
  ------------------
  |  Branch (293:7): [Folded, False: 0]
  ------------------
  294|      0|      return 0;
  295|  2.01M|  }
  296|  2.01M|}
_ZN14BitstreamRange7read32sEv:
  300|   295k|{
  301|   295k|  uint32_t v = read32();
  302|       |
  303|   295k|  if (v & 0x80000000) {
  ------------------
  |  Branch (303:7): [True: 71.1k, False: 224k]
  ------------------
  304|  71.1k|    return -static_cast<int32_t>((~v) & 0x7fffffff) -1;
  305|  71.1k|  }
  306|   224k|  else {
  307|   224k|    return static_cast<int32_t>(v);
  308|   224k|  }
  309|   295k|}
_ZN14BitstreamRange6read64Ev:
  313|  3.81k|{
  314|  3.81k|  if (!prepare_read(8)) {
  ------------------
  |  Branch (314:7): [True: 62, False: 3.75k]
  ------------------
  315|     62|    return 0;
  316|     62|  }
  317|       |
  318|  3.75k|  uint8_t buf[8];
  319|       |
  320|  3.75k|  auto istr = get_istream();
  321|  3.75k|  bool success = istr->read((char*) buf, 8);
  322|       |
  323|  3.75k|  if (!success) {
  ------------------
  |  Branch (323:7): [True: 0, False: 3.75k]
  ------------------
  324|      0|    set_eof_while_reading();
  325|      0|    return 0;
  326|      0|  }
  327|       |
  328|  3.75k|  return ((static_cast<uint64_t>(buf[0]) << 56) |
  329|  3.75k|          (static_cast<uint64_t>(buf[1]) << 48) |
  330|  3.75k|          (static_cast<uint64_t>(buf[2]) << 40) |
  331|  3.75k|          (static_cast<uint64_t>(buf[3]) << 32) |
  332|  3.75k|          (static_cast<uint64_t>(buf[4]) << 24) |
  333|  3.75k|          (static_cast<uint64_t>(buf[5]) << 16) |
  334|  3.75k|          (static_cast<uint64_t>(buf[6]) << 8) |
  335|  3.75k|          (static_cast<uint64_t>(buf[7])));
  336|  3.75k|}
_ZN14BitstreamRange7read64sEv:
  340|    195|{
  341|    195|  uint64_t v = read64();
  342|       |
  343|    195|  if (v & 0x8000000000000000) {
  ------------------
  |  Branch (343:7): [True: 43, False: 152]
  ------------------
  344|     43|    return -static_cast<int64_t >((~v) & 0x7fffffffffffffff) -1;
  345|     43|  }
  346|    152|  else {
  347|    152|    return static_cast<int64_t >(v);
  348|    152|  }
  349|    195|}
_ZN14BitstreamRange12read_float32Ev:
  353|   993M|{
  354|   993M|#if __cpp_lib_bit_cast >= 201806L
  355|   993M|  uint32_t i = read32();
  356|   993M|  return std::bit_cast<float>(i); // this works directly on the value layout, thus we do not have to worry about memory layout
  357|       |#else
  358|       |  // compiler too old to support bit_cast
  359|       |
  360|       |  // TODO: I am not sure this works everywhere as there seem to be systems where
  361|       |  //       the float byte order is different from the integer endianness
  362|       |  //       https://en.wikipedia.org/wiki/Endianness#Floating_point
  363|       |  uint32_t i = read32();
  364|       |  float f;
  365|       |  memcpy(&f, &i, sizeof(float));
  366|       |  return f;
  367|       |#endif
  368|   993M|}
_ZN14BitstreamRange11read_stringEv:
  389|  26.4k|{
  390|  26.4k|  std::string str;
  391|       |
  392|       |  // Reading a string when no more data is available, returns an empty string.
  393|       |  // Such a case happens, for example, when reading a 'url' box without content.
  394|  26.4k|  if (eof()) {
  ------------------
  |  Branch (394:7): [True: 5.75k, False: 20.6k]
  ------------------
  395|  5.75k|    return std::string();
  396|  5.75k|  }
  397|       |
  398|  20.6k|  auto istr = get_istream();
  399|       |
  400|  24.0M|  for (;;) {
  401|  24.0M|    if (!prepare_read(1)) {
  ------------------
  |  Branch (401:9): [True: 0, False: 24.0M]
  ------------------
  402|      0|      return std::string();
  403|      0|    }
  404|       |
  405|  24.0M|    char c;
  406|  24.0M|    bool success = istr->read(&c, 1);
  407|       |
  408|  24.0M|    if (!success) {
  ------------------
  |  Branch (408:9): [True: 0, False: 24.0M]
  ------------------
  409|      0|      set_eof_while_reading();
  410|      0|      return std::string();
  411|      0|    }
  412|       |
  413|  24.0M|    if (c == 0 || m_remaining==0) {
  ------------------
  |  Branch (413:9): [True: 20.2k, False: 23.9M]
  |  Branch (413:19): [True: 457, False: 23.9M]
  ------------------
  414|  20.6k|      break;
  415|  20.6k|    }
  416|  23.9M|    else {
  417|  23.9M|      str += (char) c;
  418|  23.9M|    }
  419|  24.0M|  }
  420|       |
  421|  20.6k|  return str;
  422|  20.6k|}
_ZN14BitstreamRange17read_fixed_stringEi:
  426|  1.24k|{
  427|  1.24k|  std::string str;
  428|       |
  429|  1.24k|  if (!prepare_read(len)) {
  ------------------
  |  Branch (429:7): [True: 56, False: 1.18k]
  ------------------
  430|     56|    return std::string();
  431|     56|  }
  432|       |
  433|  1.18k|  auto istr = get_istream();
  434|       |
  435|  1.18k|  uint8_t n;
  436|  1.18k|  bool success = istr->read(&n, 1);
  437|  1.18k|  if (!success || n > len - 1) {
  ------------------
  |  Branch (437:7): [True: 0, False: 1.18k]
  |  Branch (437:19): [True: 405, False: 782]
  ------------------
  438|    405|    return {};
  439|    405|  }
  440|       |
  441|  8.56k|  for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (441:19): [True: 7.78k, False: 782]
  ------------------
  442|  7.78k|    char c;
  443|  7.78k|    success = istr->read(&c, 1);
  444|       |
  445|  7.78k|    if (!success) {
  ------------------
  |  Branch (445:9): [True: 0, False: 7.78k]
  ------------------
  446|      0|      set_eof_while_reading();
  447|      0|      return std::string();
  448|      0|    }
  449|       |
  450|  7.78k|    str += (char) c;
  451|  7.78k|  }
  452|       |
  453|    782|  istr->seek_cur(len-n-1);
  454|       |
  455|    782|  return str;
  456|    782|}
_ZN14BitstreamRange21read_string_until_eofEv:
  460|  2.01k|{
  461|  2.01k|  size_t n = get_remaining_bytes();
  462|       |
  463|  2.01k|  [[maybe_unused]] bool success = prepare_read(n);
  464|  2.01k|  assert(success); // we are reading exactly the rest of the box
  ------------------
  |  Branch (464:3): [True: 2.01k, False: 0]
  ------------------
  465|       |
  466|  2.01k|  std::string str;
  467|  2.01k|  str.resize(n);
  468|  2.01k|  get_istream()->read(str.data(), n);
  469|       |
  470|  2.01k|  return str;
  471|  2.01k|}
_ZN14BitstreamRange4readEPhm:
  475|   177k|{
  476|   177k|  if (!prepare_read(n)) {
  ------------------
  |  Branch (476:7): [True: 74, False: 177k]
  ------------------
  477|     74|    return false;
  478|     74|  }
  479|       |
  480|   177k|  auto istr = get_istream();
  481|   177k|  bool success = istr->read(data, n);
  482|       |
  483|   177k|  if (!success) {
  ------------------
  |  Branch (483:7): [True: 0, False: 177k]
  ------------------
  484|      0|    set_eof_while_reading();
  485|      0|  }
  486|       |
  487|   177k|  return success;
  488|   177k|}
_ZN14BitstreamRange12prepare_readEm:
  492|  1.40G|{
  493|       |  // Note: we do not test for negative nBytes anymore because we now use the unsigned size_t
  494|       |
  495|  1.40G|  if (m_remaining < nBytes) {
  ------------------
  |  Branch (495:7): [True: 994M, False: 412M]
  ------------------
  496|       |    // --- not enough data left in box -> move to end of box and set error flag
  497|       |
  498|   994M|    skip_to_end_of_box();
  499|       |
  500|   994M|    m_error = true;
  501|   994M|    return false;
  502|   994M|  }
  503|   412M|  else {
  504|       |    // --- this is the normal case (m_remaining >= nBytes)
  505|       |
  506|   412M|    if (m_parent_range) {
  ------------------
  |  Branch (506:9): [True: 354M, False: 57.4M]
  ------------------
  507|   354M|      if (!m_parent_range->prepare_read(nBytes)) {
  ------------------
  |  Branch (507:11): [True: 0, False: 354M]
  ------------------
  508|      0|        return false;
  509|      0|      }
  510|   354M|    }
  511|       |
  512|   412M|    m_remaining -= nBytes;
  513|       |
  514|   412M|    return true;
  515|   412M|  }
  516|  1.40G|}
_ZN14BitstreamRange24wait_for_available_bytesEm:
  520|   973k|{
  521|   973k|  int64_t target_size = m_istr->get_position() + nBytes;
  522|       |
  523|   973k|  return m_istr->wait_for_file_size(target_size);
  524|   973k|}
_ZN14BitstreamRange31skip_without_advancing_file_posEm:
  528|   834k|{
  529|   834k|  assert(n <= m_remaining);
  ------------------
  |  Branch (529:3): [True: 834k, False: 0]
  ------------------
  530|       |
  531|   834k|  m_remaining -= n;
  532|       |
  533|   834k|  if (m_parent_range) {
  ------------------
  |  Branch (533:7): [True: 730k, False: 103k]
  ------------------
  534|   730k|    m_parent_range->skip_without_advancing_file_pos(n);
  535|   730k|  }
  536|   834k|}
_ZN9BitReaderC2EPKhm:
  540|  14.5k|  : data_start(buffer),
  541|  14.5k|    data_length(len)
  542|  14.5k|{
  543|  14.5k|  data = buffer;
  544|  14.5k|  bytes_remaining = len;
  545|       |
  546|  14.5k|  nextbits = 0;
  547|  14.5k|  nextbits_cnt = 0;
  548|       |
  549|  14.5k|  refill();
  550|  14.5k|}
_ZN9BitReader8get_bitsEi:
  566|   954k|{
  567|   954k|  assert(n <= 32);
  ------------------
  |  Branch (567:3): [True: 954k, False: 0]
  ------------------
  568|       |
  569|   954k|  if (nextbits_cnt < n) {
  ------------------
  |  Branch (569:7): [True: 114k, False: 839k]
  ------------------
  570|   114k|    refill();
  571|   114k|  }
  572|       |
  573|   954k|  uint64_t val = nextbits;
  574|   954k|  val >>= 64 - n;
  575|       |
  576|   954k|#if AVOID_FUZZER_FALSE_POSITIVE
  577|       |  // Shifting an unsigned integer left such that some MSBs fall out is well defined in C++ despite the fuzzer claiming otherwise.
  578|   954k|  nextbits &= (0xffffffffffffffffULL >> n);
  579|   954k|#endif
  580|       |
  581|   954k|  nextbits <<= n;
  582|   954k|  nextbits_cnt -= n;
  583|       |
  584|   954k|  return static_cast<uint32_t>(val);
  585|   954k|}
_ZN9BitReader9get_bits8Ei:
  589|   179k|{
  590|   179k|  assert(n>0 && n <= 8);
  ------------------
  |  Branch (590:3): [True: 179k, False: 0]
  |  Branch (590:3): [True: 179k, False: 0]
  |  Branch (590:3): [True: 179k, False: 0]
  ------------------
  591|   179k|  return static_cast<uint8_t>(get_bits(n));
  592|   179k|}
_ZN9BitReader10get_bits16Ei:
  595|  76.6k|{
  596|  76.6k|  assert(n>0 && n <= 16);
  ------------------
  |  Branch (596:3): [True: 76.6k, False: 0]
  |  Branch (596:3): [True: 76.6k, False: 0]
  |  Branch (596:3): [True: 76.6k, False: 0]
  ------------------
  597|  76.6k|  return static_cast<uint16_t>(get_bits(n));
  598|  76.6k|}
_ZN9BitReader10get_bits32Ei:
  601|   180k|{
  602|   180k|  assert(n>0 && n <= 32);
  ------------------
  |  Branch (602:3): [True: 180k, False: 0]
  |  Branch (602:3): [True: 180k, False: 0]
  |  Branch (602:3): [True: 180k, False: 0]
  ------------------
  603|   180k|  return static_cast<uint32_t>(get_bits(n));
  604|   180k|}
_ZN9BitReader11get_bits32sEv:
  607|  6.75k|{
  608|  6.75k|  uint32_t bits = get_bits(32);
  609|  6.75k|  return static_cast<int32_t>(bits);
  610|  6.75k|}
_ZN9BitReader8get_flagEv:
  614|   510k|{
  615|   510k|  return (get_bits(1) == 0x01);
  616|   510k|}
_ZN9BitReader10read_bytesEj:
  619|  7.08k|{
  620|       |  // TODO: this implementation isn't very efficient
  621|  7.08k|  std::vector<uint8_t> bytes;
  622|  80.8k|  for (uint32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (622:24): [True: 73.7k, False: 7.08k]
  ------------------
  623|  73.7k|    bytes.push_back(get_bits8(8));
  624|  73.7k|  }
  625|  7.08k|  return bytes;
  626|  7.08k|}
_ZN9BitReader10skip_bytesEj:
  654|  28.3k|{
  655|       |  // This has to run in constant time. The number of bytes to skip is taken directly
  656|       |  // from 32-bit file fields (e.g. the 'uncC' row/tile alignment), so a byte-at-a-time
  657|       |  // loop spins for billions of iterations when a malformed file asks to skip far
  658|       |  // beyond the end of the data. MinimizedImageBox::parse() guards against the same
  659|       |  // failure mode by validating its declared chunk sizes up front.
  660|       |
  661|  28.3k|  uint64_t nBits = uint64_t{nBytes} * 8;
  662|       |
  663|       |  // --- consume the bits that are already buffered in 'nextbits'
  664|       |
  665|  28.3k|  if (nextbits_cnt > 0) {
  ------------------
  |  Branch (665:7): [True: 20.4k, False: 7.88k]
  ------------------
  666|  20.4k|    uint64_t from_buffer = std::min(nBits, static_cast<uint64_t>(nextbits_cnt));
  667|       |
  668|  20.4k|    if (from_buffer >= 64) {
  ------------------
  |  Branch (668:9): [True: 45, False: 20.3k]
  ------------------
  669|     45|      nextbits = 0;
  670|     45|    }
  671|  20.3k|    else {
  672|  20.3k|#if AVOID_FUZZER_FALSE_POSITIVE
  673|  20.3k|      nextbits &= (0xffffffffffffffffULL >> from_buffer);
  674|  20.3k|#endif
  675|  20.3k|      nextbits <<= from_buffer;
  676|  20.3k|    }
  677|       |
  678|  20.4k|    nextbits_cnt -= static_cast<int64_t>(from_buffer);
  679|  20.4k|    nBits -= from_buffer;
  680|  20.4k|  }
  681|       |
  682|  28.3k|  if (nBits == 0) {
  ------------------
  |  Branch (682:7): [True: 20.0k, False: 8.24k]
  ------------------
  683|  20.0k|    return;
  684|  20.0k|  }
  685|       |
  686|       |  // --- skip whole bytes directly in the input buffer, without pushing them
  687|       |  //     through the bit buffer
  688|       |
  689|  8.24k|  uint64_t whole_bytes = nBits / 8;
  690|  8.24k|  int residual_bits = static_cast<int>(nBits % 8);
  691|       |
  692|  8.24k|  if (whole_bytes >= bytes_remaining) {
  ------------------
  |  Branch (692:7): [True: 65, False: 8.17k]
  ------------------
  693|       |    // Skipping past the end of the data. Record the overshoot in 'nextbits_cnt' (which
  694|       |    // thereby goes negative) so that get_current_byte_index() keeps advancing exactly
  695|       |    // as it did with the previous bit-by-bit implementation.
  696|     65|    uint64_t overshoot_bits = (whole_bytes - bytes_remaining) * 8 + static_cast<uint64_t>(residual_bits);
  697|       |
  698|     65|    data += bytes_remaining;
  699|     65|    bytes_remaining = 0;
  700|     65|    nextbits = 0;
  701|     65|    nextbits_cnt -= static_cast<int64_t>(overshoot_bits);
  702|     65|    return;
  703|     65|  }
  704|       |
  705|  8.17k|  data += static_cast<size_t>(whole_bytes);
  706|  8.17k|  bytes_remaining -= static_cast<size_t>(whole_bytes);
  707|  8.17k|  nextbits = 0;
  708|  8.17k|  nextbits_cnt = 0;
  709|       |
  710|  8.17k|  refill();
  711|       |
  712|  8.17k|  if (residual_bits > 0) {
  ------------------
  |  Branch (712:7): [True: 0, False: 8.17k]
  ------------------
  713|      0|    skip_bits(residual_bits);
  714|      0|  }
  715|  8.17k|}
_ZN9BitReader9skip_bitsEi:
  718|  54.7k|{
  719|  54.7k|  if (nextbits_cnt < n) {
  ------------------
  |  Branch (719:7): [True: 17.0k, False: 37.7k]
  ------------------
  720|  17.0k|    refill();
  721|  17.0k|  }
  722|       |
  723|  54.7k|#if AVOID_FUZZER_FALSE_POSITIVE
  724|  54.7k|  nextbits &= (0xffffffffffffffffULL >> n);
  725|  54.7k|#endif
  726|       |
  727|  54.7k|  nextbits <<= n;
  728|  54.7k|  nextbits_cnt -= n;
  729|  54.7k|}
_ZN9BitReader21skip_to_byte_boundaryEv:
  742|  14.5k|{
  743|  14.5k|  int nskip = static_cast<int>(nextbits_cnt & 7);
  744|       |
  745|  14.5k|#if AVOID_FUZZER_FALSE_POSITIVE
  746|  14.5k|  nextbits &= (0xffffffffffffffffULL >> nskip);
  747|  14.5k|#endif
  748|       |
  749|  14.5k|  nextbits <<= nskip;
  750|  14.5k|  nextbits_cnt -= nskip;
  751|  14.5k|}
_ZN9BitReader6refillEv:
  792|   154k|{
  793|       |#if 0
  794|       |  // TODO: activate me once I'm sure this works
  795|       |  while (nextbits_cnt <= 64-8 && bytes_remaining) {
  796|       |    uint64_t newval = *data++;
  797|       |    bytes_remaining--;
  798|       |
  799|       |    nextbits_cnt += 8;
  800|       |    newval <<= 64-nextbits_cnt;
  801|       |    nextbits |= newval;
  802|       |  }
  803|       |#else
  804|   154k|  if (bytes_remaining == 0) {
  ------------------
  |  Branch (804:7): [True: 4.25k, False: 150k]
  ------------------
  805|       |    // Nothing to refill. Returning early also keeps the shift below out of range
  806|       |    // when nextbits_cnt is far negative after skipping past the end of the data.
  807|  4.25k|    return;
  808|  4.25k|  }
  809|       |
  810|   150k|  int64_t shift = 64 - nextbits_cnt;
  811|       |
  812|  1.09M|  while (shift >= 8 && bytes_remaining) {
  ------------------
  |  Branch (812:10): [True: 942k, False: 148k]
  |  Branch (812:24): [True: 940k, False: 1.92k]
  ------------------
  813|   940k|    uint64_t newval = *data++;
  814|   940k|    bytes_remaining--;
  815|       |
  816|   940k|    shift -= 8;
  817|   940k|    newval <<= shift;
  818|   940k|    nextbits |= newval;
  819|   940k|  }
  820|       |
  821|   150k|  nextbits_cnt = 64 - shift;
  822|   150k|#endif
  823|   150k|}

_ZNK14BitstreamRange5errorEv:
  383|  8.74M|  {
  384|  8.74M|    return m_error;
  385|  8.74M|  }
_ZN12StreamReader8seek_curEm:
   62|   106k|  {
   63|   106k|    return seek(get_position() + position_offset);
   64|   106k|  }
_ZN14BitstreamRange19skip_to_end_of_fileEv:
  328|     69|  {
  329|       |    // we do not actually move the file position here (because the stream may still be incomplete),
  330|       |    // but we set all m_remaining to zero
  331|     69|    m_remaining = 0;
  332|       |
  333|     69|    if (m_parent_range) {
  ------------------
  |  Branch (333:9): [True: 61, False: 8]
  ------------------
  334|     61|      m_parent_range->skip_to_end_of_file();
  335|     61|    }
  336|     69|  }
_ZN14BitstreamRange4skipEm:
  339|  23.2k|  {
  340|  23.2k|    size_t actual_skip = std::min(static_cast<size_t>(n), m_remaining);
  341|       |
  342|  23.2k|    if (m_parent_range) {
  ------------------
  |  Branch (342:9): [True: 23.2k, False: 0]
  ------------------
  343|       |      // also advance position in parent range
  344|  23.2k|      m_parent_range->skip_without_advancing_file_pos(actual_skip);
  345|  23.2k|    }
  346|       |
  347|  23.2k|    assert(actual_skip <= static_cast<uint64_t>(std::numeric_limits<int64_t>::max()));
  ------------------
  |  Branch (347:5): [True: 23.2k, False: 0]
  ------------------
  348|       |
  349|  23.2k|    m_istr->seek_cur(static_cast<int64_t>(actual_skip));
  350|  23.2k|    m_remaining -= actual_skip;
  351|  23.2k|  }
_ZN14BitstreamRange18skip_to_end_of_boxEv:
  354|   994M|  {
  355|   994M|    if (m_remaining > 0) {
  ------------------
  |  Branch (355:9): [True: 80.4k, False: 994M]
  ------------------
  356|  80.4k|      if (m_parent_range) {
  ------------------
  |  Branch (356:11): [True: 80.4k, False: 2]
  ------------------
  357|       |        // also advance position in parent range
  358|  80.4k|        m_parent_range->skip_without_advancing_file_pos(m_remaining);
  359|  80.4k|      }
  360|       |
  361|  80.4k|      m_istr->seek_cur(m_remaining);
  362|  80.4k|      m_remaining = 0;
  363|  80.4k|    }
  364|   994M|  }
_ZNK14BitstreamRange3eofEv:
  378|  12.9M|  {
  379|  12.9M|    return m_remaining == 0;
  380|  12.9M|  }
_ZNK14BitstreamRange9get_errorEv:
  388|  2.86M|  {
  389|  2.86M|    if (m_error) {
  ------------------
  |  Branch (389:9): [True: 8.86k, False: 2.85M]
  ------------------
  390|  8.86k|      return Error(heif_error_Invalid_input,
  391|  8.86k|                   heif_suberror_End_of_data);
  392|  8.86k|    }
  393|  2.85M|    else {
  394|  2.85M|      return Error::Ok;
  395|  2.85M|    }
  396|  2.86M|  }
_ZN14BitstreamRange11get_istreamEv:
  398|  33.9M|  std::shared_ptr<StreamReader> get_istream() { return m_istr; }
_ZNK14BitstreamRange17get_nesting_levelEv:
  400|   487k|  int get_nesting_level() const { return m_nesting_level; }
_ZNK14BitstreamRange19get_remaining_bytesEv:
  402|   589k|  size_t get_remaining_bytes() const { return m_remaining; }
_ZNK9BitReader22get_current_byte_indexEv:
  460|  28.3k|  {
  461|       |    // Computed in signed arithmetic: when we skipped past the end of the data,
  462|       |    // nextbits_cnt is negative and the index keeps growing beyond data_length (the
  463|       |    // 'uncC' alignment handling relies on that). Doing the subtraction in size_t
  464|       |    // would convert the negative operand first, which trips the 'integer' sanitizer.
  465|       |    // The result itself is always >= 0.
  466|  28.3k|    int64_t bytes_read = static_cast<int64_t>(data_length - bytes_remaining);
  467|  28.3k|    return static_cast<size_t>(bytes_read - nextbits_cnt / 8);
  468|  28.3k|  }
_ZNK9BitReader18get_bits_remainingEv:
  471|  14.5k|  {
  472|  14.5k|    return ((int64_t) bytes_remaining) * 8 + nextbits_cnt;
  473|  14.5k|  }
_ZN12StreamReaderD2Ev:
   42|  16.4k|  virtual ~StreamReader() = default;

_ZN8FractionC2Eii:
   64|  18.1k|{
   65|       |  // Reduce resolution of fraction until we are in a safe range.
   66|       |  // We need this as adding fractions may lead to very large denominators
   67|       |  // (e.g. 0x10000 * 0x10000 > 0x100000000 -> overflow, leading to integer 0)
   68|       |
   69|  18.1k|  numerator = num;
   70|  18.1k|  denominator = den;
   71|       |
   72|   146k|  while (denominator > MAX_FRACTION_VALUE || denominator < -MAX_FRACTION_VALUE) {
  ------------------
  |  Branch (72:10): [True: 127k, False: 18.1k]
  |  Branch (72:46): [True: 0, False: 18.1k]
  ------------------
   73|   127k|    numerator /= 2;
   74|   127k|    denominator /= 2;
   75|   127k|  }
   76|       |
   77|  42.2k|  while (denominator > 1 && (numerator > MAX_FRACTION_VALUE || numerator < -MAX_FRACTION_VALUE)) {
  ------------------
  |  Branch (77:10): [True: 35.3k, False: 6.92k]
  |  Branch (77:30): [True: 23.8k, False: 11.4k]
  |  Branch (77:64): [True: 238, False: 11.2k]
  ------------------
   78|  24.1k|    numerator /= 2;
   79|  24.1k|    denominator /= 2;
   80|  24.1k|  }
   81|  18.1k|}
_ZN8Fraction11from_signedEll:
   84|  18.8k|{
   85|  18.8k|  if (num < std::numeric_limits<int32_t>::min() || num > std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (85:7): [True: 0, False: 18.8k]
  |  Branch (85:52): [True: 372, False: 18.5k]
  ------------------
   86|  18.5k|      den < std::numeric_limits<int32_t>::min() || den > std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (86:7): [True: 0, False: 18.5k]
  |  Branch (86:52): [True: 372, False: 18.1k]
  ------------------
   87|    744|    return Error(heif_error_Invalid_input,
   88|    744|                 heif_suberror_Invalid_fractional_number,
   89|    744|                 "Fraction value exceeds the supported range");
   90|    744|  }
   91|       |
   92|  18.1k|  Fraction f(static_cast<int32_t>(num), static_cast<int32_t>(den));
   93|  18.1k|  if (!f.is_valid()) {
  ------------------
  |  Branch (93:7): [True: 6.11k, False: 12.0k]
  ------------------
   94|  6.11k|    return Error(heif_error_Invalid_input,
   95|  6.11k|                 heif_suberror_Invalid_fractional_number,
   96|  6.11k|                 "Fraction with zero denominator");
   97|  6.11k|  }
   98|       |
   99|  12.0k|  return f;
  100|  18.1k|}
_ZN8Fraction13from_unsignedEjj:
  103|  9.44k|{
  104|  9.44k|  return from_signed(num, den);
  105|  9.44k|}
_ZNK8Fraction8is_validEv:
  178|  18.1k|{
  179|  18.1k|  return denominator != 0;
  180|  18.1k|}
_ZN9BoxHeaderC2Ev:
  183|  1.10M|BoxHeader::BoxHeader() = default;
_ZNK9BoxHeader8get_typeEv:
  187|   150k|{
  188|   150k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (188:7): [True: 5.02k, False: 145k]
  ------------------
  189|  5.02k|    return m_uuid_type;
  190|  5.02k|  }
  191|   145k|  else {
  192|   145k|    std::vector<uint8_t> type(4);
  193|   145k|    type[0] = static_cast<uint8_t>((m_type >> 24) & 0xFF);
  194|   145k|    type[1] = static_cast<uint8_t>((m_type >> 16) & 0xFF);
  195|   145k|    type[2] = static_cast<uint8_t>((m_type >> 8) & 0xFF);
  196|   145k|    type[3] = static_cast<uint8_t>((m_type >> 0) & 0xFF);
  197|   145k|    return type;
  198|   145k|  }
  199|   150k|}
_ZNK9BoxHeader15get_type_stringEv:
  203|  1.04M|{
  204|  1.04M|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (204:7): [True: 32.0k, False: 1.01M]
  ------------------
  205|       |    // 8-4-4-4-12
  206|       |
  207|  32.0k|    std::ostringstream sstr;
  208|  32.0k|    sstr << std::hex;
  209|  32.0k|    sstr << std::setfill('0');
  210|       |
  211|   544k|    for (int i = 0; i < 16; i++) {
  ------------------
  |  Branch (211:21): [True: 512k, False: 32.0k]
  ------------------
  212|   512k|      if (i == 4 || i == 6 || i == 8 || i == 10) {
  ------------------
  |  Branch (212:11): [True: 32.0k, False: 480k]
  |  Branch (212:21): [True: 32.0k, False: 448k]
  |  Branch (212:31): [True: 32.0k, False: 416k]
  |  Branch (212:41): [True: 32.0k, False: 384k]
  ------------------
  213|   128k|        sstr << '-';
  214|   128k|      }
  215|       |
  216|   512k|      sstr << std::setw(2);
  217|   512k|      sstr << ((int) m_uuid_type[i]);
  218|   512k|    }
  219|       |
  220|  32.0k|    return sstr.str();
  221|  32.0k|  }
  222|  1.01M|  else {
  223|  1.01M|    return fourcc_to_string(m_type);
  224|  1.01M|  }
  225|  1.04M|}
_ZNK9BoxHeader13get_uuid_typeEv:
  229|  41.9k|{
  230|  41.9k|  if (m_type != fourcc("uuid")) {
  ------------------
  |  Branch (230:7): [True: 0, False: 41.9k]
  ------------------
  231|      0|    return {};
  232|      0|  }
  233|       |
  234|  41.9k|  return m_uuid_type;
  235|  41.9k|}
_ZN9BoxHeader13set_uuid_typeERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  239|  2.58k|{
  240|  2.58k|  m_type = fourcc("uuid");
  241|  2.58k|  m_uuid_type = type;
  242|  2.58k|}
_ZN9BoxHeader12parse_headerER14BitstreamRange:
  246|   514k|{
  247|   514k|  StreamReader::grow_status status;
  248|   514k|  status = range.wait_for_available_bytes(8);
  249|   514k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (249:7): [True: 7.98k, False: 506k]
  ------------------
  250|       |    // TODO: return recoverable error at timeout
  251|  7.98k|    return Error(heif_error_Invalid_input,
  252|  7.98k|                 heif_suberror_End_of_data);
  253|  7.98k|  }
  254|       |
  255|   506k|  m_size = range.read32();
  256|   506k|  m_type = range.read32();
  257|       |
  258|   506k|  m_header_size = 8;
  259|       |
  260|   506k|  if (m_size == 1) {
  ------------------
  |  Branch (260:7): [True: 212, False: 506k]
  ------------------
  261|    212|    status = range.wait_for_available_bytes(8);
  262|    212|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (262:9): [True: 2, False: 210]
  ------------------
  263|       |      // TODO: return recoverable error at timeout
  264|      2|      return Error(heif_error_Invalid_input,
  265|      2|                   heif_suberror_End_of_data);
  266|      2|    }
  267|       |
  268|    210|    uint64_t high = range.read32();
  269|    210|    uint64_t low = range.read32();
  270|       |
  271|    210|    m_size = (high << 32) | low;
  272|    210|    m_header_size += 8;
  273|       |
  274|    210|    std::stringstream sstr;
  275|    210|    sstr << "Box size " << m_size << " exceeds security limit.";
  276|       |
  277|    210|    if (m_size > MAX_LARGE_BOX_SIZE) {
  ------------------
  |  Branch (277:9): [True: 11, False: 199]
  ------------------
  278|     11|      return Error(heif_error_Memory_allocation_error,
  279|     11|                   heif_suberror_Security_limit_exceeded,
  280|     11|                   sstr.str());
  281|     11|    }
  282|    210|  }
  283|       |
  284|   506k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (284:7): [True: 15.2k, False: 491k]
  ------------------
  285|  15.2k|    status = range.wait_for_available_bytes(16);
  286|  15.2k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (286:9): [True: 3, False: 15.2k]
  ------------------
  287|       |      // TODO: return recoverable error at timeout
  288|      3|      return Error(heif_error_Invalid_input,
  289|      3|                   heif_suberror_End_of_data);
  290|      3|    }
  291|       |
  292|  15.2k|    if (range.prepare_read(16)) {
  ------------------
  |  Branch (292:9): [True: 15.2k, False: 1]
  ------------------
  293|  15.2k|      m_uuid_type.resize(16);
  294|  15.2k|      bool success = range.get_istream()->read((char*) m_uuid_type.data(), 16);
  295|  15.2k|      assert(success);
  ------------------
  |  Branch (295:7): [True: 15.2k, False: 0]
  ------------------
  296|  15.2k|      (void) success;
  297|  15.2k|    }
  298|       |
  299|  15.2k|    m_header_size += 16;
  300|  15.2k|  }
  301|       |
  302|   506k|  return range.get_error();
  303|   506k|}
_ZNK9BoxHeader4dumpER6Indent:
  408|   395k|{
  409|   395k|  std::ostringstream sstr;
  410|   395k|  sstr << indent << "Box: " << get_type_string();
  411|   395k|  const char* debug_name = debug_box_name();
  412|   395k|  if (debug_name) {
  ------------------
  |  Branch (412:7): [True: 190k, False: 205k]
  ------------------
  413|   190k|    sstr << " ----- (" << debug_name << ")\n";
  414|   190k|  }
  415|   205k|  else {
  416|   205k|    sstr << " -----\n";
  417|   205k|  }
  418|       |
  419|   395k|  sstr << indent << "size: " << get_box_size() << "   (header size: " << get_header_size() << ")\n";
  420|       |
  421|   395k|  return sstr.str();
  422|   395k|}
_ZN3Box5parseER14BitstreamRangePK20heif_security_limits:
  426|  2.33k|{
  427|       |  // skip box
  428|       |
  429|  2.33k|  if (get_box_size() == size_until_end_of_file) {
  ------------------
  |  Branch (429:7): [True: 8, False: 2.33k]
  ------------------
  430|      8|    range.skip_to_end_of_file();
  431|      8|  }
  432|  2.33k|  else {
  433|  2.33k|    uint64_t content_size = get_box_size() - get_header_size();
  434|       |
  435|  2.33k|    assert(MAX_BOX_SIZE <= SIZE_MAX);
  ------------------
  |  Branch (435:5): [True: 2.33k, Folded]
  ------------------
  436|       |
  437|  2.33k|    if (content_size > MAX_BOX_SIZE) {
  ------------------
  |  Branch (437:9): [True: 0, False: 2.33k]
  ------------------
  438|      0|      return Error(heif_error_Invalid_input,
  439|      0|                   heif_suberror_Invalid_box_size);
  440|      0|    }
  441|       |
  442|  2.33k|    if (range.prepare_read(static_cast<size_t>(content_size))) {
  ------------------
  |  Branch (442:9): [True: 2.33k, False: 0]
  ------------------
  443|  2.33k|      range.get_istream()->seek_cur(get_box_size() - get_header_size());
  444|  2.33k|    }
  445|  2.33k|  }
  446|       |
  447|       |  // Note: seekg() clears the eof flag and it will not be set again afterwards,
  448|       |  // hence we have to test for the fail flag.
  449|       |
  450|  2.33k|  return range.get_error();
  451|  2.33k|}
_ZN7FullBox21parse_full_box_headerER14BitstreamRange:
  455|   106k|{
  456|   106k|  uint32_t data = range.read32();
  457|   106k|  m_version = static_cast<uint8_t>(data >> 24);
  458|   106k|  m_flags = data & 0x00FFFFFF;
  459|       |  //m_is_full_box = true;
  460|       |
  461|   106k|  m_header_size += 4;
  462|       |
  463|   106k|  return range.get_error();
  464|   106k|}
_ZN3Box4readER14BitstreamRangePNSt3__110shared_ptrIS_EEPK20heif_security_limits:
  468|   495k|{
  469|   495k|  BoxHeader hdr;
  470|   495k|  Error err = hdr.parse_header(range);
  471|   495k|  if (err) {
  ------------------
  |  Branch (471:7): [True: 8.02k, False: 487k]
  ------------------
  472|  8.02k|    return err;
  473|  8.02k|  }
  474|       |
  475|   487k|  if (range.error()) {
  ------------------
  |  Branch (475:7): [True: 0, False: 487k]
  ------------------
  476|      0|    return range.get_error();
  477|      0|  }
  478|       |
  479|   487k|  result->reset();
  480|       |
  481|   487k|  std::shared_ptr<Box> box;
  482|       |
  483|   487k|  switch (hdr.get_short_type()) {
  484|  11.7k|    case fourcc("ftyp"):
  ------------------
  |  Branch (484:5): [True: 11.7k, False: 475k]
  ------------------
  485|  11.7k|      box = std::make_shared<Box_ftyp>();
  486|  11.7k|      break;
  487|       |
  488|    564|    case fourcc("free"):
  ------------------
  |  Branch (488:5): [True: 564, False: 486k]
  ------------------
  489|    828|    case fourcc("skip"):
  ------------------
  |  Branch (489:5): [True: 264, False: 487k]
  ------------------
  490|    828|      box = std::make_shared<Box_free>();
  491|    828|      break;
  492|       |
  493|  3.27k|    case fourcc("meta"):
  ------------------
  |  Branch (493:5): [True: 3.27k, False: 484k]
  ------------------
  494|  3.27k|      box = std::make_shared<Box_meta>();
  495|  3.27k|      break;
  496|       |
  497|  3.96k|    case fourcc("hdlr"):
  ------------------
  |  Branch (497:5): [True: 3.96k, False: 483k]
  ------------------
  498|  3.96k|      box = std::make_shared<Box_hdlr>();
  499|  3.96k|      break;
  500|       |
  501|  3.67k|    case fourcc("pitm"):
  ------------------
  |  Branch (501:5): [True: 3.67k, False: 483k]
  ------------------
  502|  3.67k|      box = std::make_shared<Box_pitm>();
  503|  3.67k|      break;
  504|       |
  505|  2.12k|    case fourcc("iloc"):
  ------------------
  |  Branch (505:5): [True: 2.12k, False: 485k]
  ------------------
  506|  2.12k|      box = std::make_shared<Box_iloc>();
  507|  2.12k|      break;
  508|       |
  509|  4.17k|    case fourcc("iinf"):
  ------------------
  |  Branch (509:5): [True: 4.17k, False: 483k]
  ------------------
  510|  4.17k|      box = std::make_shared<Box_iinf>();
  511|  4.17k|      break;
  512|       |
  513|  4.74k|    case fourcc("infe"):
  ------------------
  |  Branch (513:5): [True: 4.74k, False: 482k]
  ------------------
  514|  4.74k|      box = std::make_shared<Box_infe>();
  515|  4.74k|      break;
  516|       |
  517|  32.1k|    case fourcc("iprp"):
  ------------------
  |  Branch (517:5): [True: 32.1k, False: 455k]
  ------------------
  518|  32.1k|      box = std::make_shared<Box_iprp>();
  519|  32.1k|      break;
  520|       |
  521|  12.0k|    case fourcc("ipco"):
  ------------------
  |  Branch (521:5): [True: 12.0k, False: 475k]
  ------------------
  522|  12.0k|      box = std::make_shared<Box_ipco>();
  523|  12.0k|      break;
  524|       |
  525|  3.11k|    case fourcc("ipma"):
  ------------------
  |  Branch (525:5): [True: 3.11k, False: 484k]
  ------------------
  526|  3.11k|      box = std::make_shared<Box_ipma>();
  527|  3.11k|      break;
  528|       |
  529|  3.08k|    case fourcc("ispe"):
  ------------------
  |  Branch (529:5): [True: 3.08k, False: 484k]
  ------------------
  530|  3.08k|      box = std::make_shared<Box_ispe>();
  531|  3.08k|      break;
  532|       |
  533|  1.01k|    case fourcc("auxC"):
  ------------------
  |  Branch (533:5): [True: 1.01k, False: 486k]
  ------------------
  534|  1.01k|      box = std::make_shared<Box_auxC>();
  535|  1.01k|      break;
  536|       |
  537|  11.6k|    case fourcc("irot"):
  ------------------
  |  Branch (537:5): [True: 11.6k, False: 475k]
  ------------------
  538|  11.6k|      box = std::make_shared<Box_irot>();
  539|  11.6k|      break;
  540|       |
  541|  2.87k|    case fourcc("imir"):
  ------------------
  |  Branch (541:5): [True: 2.87k, False: 484k]
  ------------------
  542|  2.87k|      box = std::make_shared<Box_imir>();
  543|  2.87k|      break;
  544|       |
  545|  4.72k|    case fourcc("clap"):
  ------------------
  |  Branch (545:5): [True: 4.72k, False: 482k]
  ------------------
  546|  4.72k|      box = std::make_shared<Box_clap>();
  547|  4.72k|      break;
  548|       |
  549|    669|    case fourcc("iscl"):
  ------------------
  |  Branch (549:5): [True: 669, False: 486k]
  ------------------
  550|    669|      box = std::make_shared<Box_iscl>();
  551|    669|      break;
  552|       |
  553|  15.6k|    case fourcc("iref"):
  ------------------
  |  Branch (553:5): [True: 15.6k, False: 471k]
  ------------------
  554|  15.6k|      box = std::make_shared<Box_iref>();
  555|  15.6k|      break;
  556|       |
  557|    713|    case fourcc("rref"):
  ------------------
  |  Branch (557:5): [True: 713, False: 486k]
  ------------------
  558|    713|      box = std::make_shared<Box_rref>();
  559|    713|      break;
  560|       |
  561|  4.75k|    case fourcc("hvcC"):
  ------------------
  |  Branch (561:5): [True: 4.75k, False: 482k]
  ------------------
  562|  4.75k|      box = std::make_shared<Box_hvcC>();
  563|  4.75k|      break;
  564|       |
  565|    161|    case fourcc("hvc1"):
  ------------------
  |  Branch (565:5): [True: 161, False: 487k]
  ------------------
  566|    161|      box = std::make_shared<Box_hvc1>();
  567|    161|      break;
  568|       |
  569|  3.88k|    case fourcc("av1C"):
  ------------------
  |  Branch (569:5): [True: 3.88k, False: 483k]
  ------------------
  570|  3.88k|      box = std::make_shared<Box_av1C>();
  571|  3.88k|      break;
  572|       |
  573|    225|    case fourcc("av01"):
  ------------------
  |  Branch (573:5): [True: 225, False: 487k]
  ------------------
  574|    225|      box = std::make_shared<Box_av01>();
  575|    225|      break;
  576|       |
  577|  2.57k|    case fourcc("vvcC"):
  ------------------
  |  Branch (577:5): [True: 2.57k, False: 484k]
  ------------------
  578|  2.57k|      box = std::make_shared<Box_vvcC>();
  579|  2.57k|      break;
  580|       |
  581|     83|    case fourcc("vvc1"):
  ------------------
  |  Branch (581:5): [True: 83, False: 487k]
  ------------------
  582|     83|      box = std::make_shared<Box_vvc1>();
  583|     83|      break;
  584|       |
  585|  7.26k|    case fourcc("idat"):
  ------------------
  |  Branch (585:5): [True: 7.26k, False: 480k]
  ------------------
  586|  7.26k|      box = std::make_shared<Box_idat>();
  587|  7.26k|      break;
  588|       |
  589|  1.62k|    case fourcc("grpl"):
  ------------------
  |  Branch (589:5): [True: 1.62k, False: 485k]
  ------------------
  590|  1.62k|      box = std::make_shared<Box_grpl>();
  591|  1.62k|      break;
  592|       |
  593|  1.57k|    case fourcc("pymd"):
  ------------------
  |  Branch (593:5): [True: 1.57k, False: 485k]
  ------------------
  594|  1.57k|      box = std::make_shared<Box_pymd>();
  595|  1.57k|      break;
  596|       |
  597|    116|    case fourcc("altr"):
  ------------------
  |  Branch (597:5): [True: 116, False: 487k]
  ------------------
  598|    116|      box = std::make_shared<Box_EntityToGroup>();
  599|    116|      break;
  600|       |
  601|    552|    case fourcc("ster"):
  ------------------
  |  Branch (601:5): [True: 552, False: 486k]
  ------------------
  602|    552|      box = std::make_shared<Box_ster>();
  603|    552|      break;
  604|       |
  605|  7.63k|    case fourcc("dinf"):
  ------------------
  |  Branch (605:5): [True: 7.63k, False: 479k]
  ------------------
  606|  7.63k|      box = std::make_shared<Box_dinf>();
  607|  7.63k|      break;
  608|       |
  609|  1.79k|    case fourcc("dref"):
  ------------------
  |  Branch (609:5): [True: 1.79k, False: 485k]
  ------------------
  610|  1.79k|      box = std::make_shared<Box_dref>();
  611|  1.79k|      break;
  612|       |
  613|  2.61k|    case fourcc("url "):
  ------------------
  |  Branch (613:5): [True: 2.61k, False: 484k]
  ------------------
  614|  2.61k|      box = std::make_shared<Box_url>();
  615|  2.61k|      break;
  616|       |
  617|  10.4k|    case fourcc("colr"):
  ------------------
  |  Branch (617:5): [True: 10.4k, False: 477k]
  ------------------
  618|  10.4k|      box = std::make_shared<Box_colr>();
  619|  10.4k|      break;
  620|       |
  621|  3.67k|    case fourcc("pixi"):
  ------------------
  |  Branch (621:5): [True: 3.67k, False: 483k]
  ------------------
  622|  3.67k|      box = std::make_shared<Box_pixi>();
  623|  3.67k|      break;
  624|       |
  625|  16.0k|    case fourcc("pasp"):
  ------------------
  |  Branch (625:5): [True: 16.0k, False: 471k]
  ------------------
  626|  16.0k|      box = std::make_shared<Box_pasp>();
  627|  16.0k|      break;
  628|       |
  629|  7.72k|    case fourcc("lsel"):
  ------------------
  |  Branch (629:5): [True: 7.72k, False: 479k]
  ------------------
  630|  7.72k|      box = std::make_shared<Box_lsel>();
  631|  7.72k|      break;
  632|       |
  633|  18.6k|    case fourcc("a1op"):
  ------------------
  |  Branch (633:5): [True: 18.6k, False: 468k]
  ------------------
  634|  18.6k|      box = std::make_shared<Box_a1op>();
  635|  18.6k|      break;
  636|       |
  637|  7.01k|    case fourcc("a1lx"):
  ------------------
  |  Branch (637:5): [True: 7.01k, False: 480k]
  ------------------
  638|  7.01k|      box = std::make_shared<Box_a1lx>();
  639|  7.01k|      break;
  640|       |
  641|  1.56k|    case fourcc("clli"):
  ------------------
  |  Branch (641:5): [True: 1.56k, False: 485k]
  ------------------
  642|  1.56k|      box = std::make_shared<Box_clli>();
  643|  1.56k|      break;
  644|       |
  645|  6.25k|    case fourcc("mdcv"):
  ------------------
  |  Branch (645:5): [True: 6.25k, False: 481k]
  ------------------
  646|  6.25k|      box = std::make_shared<Box_mdcv>();
  647|  6.25k|      break;
  648|       |
  649|    730|    case fourcc("amve"):
  ------------------
  |  Branch (649:5): [True: 730, False: 486k]
  ------------------
  650|    730|      box = std::make_shared<Box_amve>();
  651|    730|      break;
  652|       |
  653|    691|    case fourcc("ndwt"):
  ------------------
  |  Branch (653:5): [True: 691, False: 486k]
  ------------------
  654|    691|      box = std::make_shared<Box_ndwt>();
  655|    691|      break;
  656|       |
  657|  1.73k|    case fourcc("cmin"):
  ------------------
  |  Branch (657:5): [True: 1.73k, False: 485k]
  ------------------
  658|  1.73k|      box = std::make_shared<Box_cmin>();
  659|  1.73k|      break;
  660|       |
  661|  2.28k|    case fourcc("cmex"):
  ------------------
  |  Branch (661:5): [True: 2.28k, False: 485k]
  ------------------
  662|  2.28k|      box = std::make_shared<Box_cmex>();
  663|  2.28k|      break;
  664|       |
  665|  1.39k|    case fourcc("udes"):
  ------------------
  |  Branch (665:5): [True: 1.39k, False: 486k]
  ------------------
  666|  1.39k|      box = std::make_shared<Box_udes>();
  667|  1.39k|      break;
  668|       |
  669|  7.57k|    case fourcc("jpgC"):
  ------------------
  |  Branch (669:5): [True: 7.57k, False: 479k]
  ------------------
  670|  7.57k|      box = std::make_shared<Box_jpgC>();
  671|  7.57k|      break;
  672|       |
  673|    119|    case fourcc("mjpg"):
  ------------------
  |  Branch (673:5): [True: 119, False: 487k]
  ------------------
  674|    119|      box = std::make_shared<Box_mjpg>();
  675|    119|      break;
  676|       |
  677|    652|    case fourcc("elng"):
  ------------------
  |  Branch (677:5): [True: 652, False: 486k]
  ------------------
  678|    652|      box = std::make_shared<Box_elng>();
  679|    652|      break;
  680|       |
  681|       |
  682|      0|#if WITH_UNCOMPRESSED_CODEC
  683|  1.24k|    case fourcc("cmpd"):
  ------------------
  |  Branch (683:5): [True: 1.24k, False: 486k]
  ------------------
  684|  1.24k|      box = std::make_shared<Box_cmpd>();
  685|  1.24k|      break;
  686|       |
  687|  4.15k|    case fourcc("uncC"):
  ------------------
  |  Branch (687:5): [True: 4.15k, False: 483k]
  ------------------
  688|  4.15k|      box = std::make_shared<Box_uncC>();
  689|  4.15k|      break;
  690|       |
  691|    661|    case fourcc("cmpC"):
  ------------------
  |  Branch (691:5): [True: 661, False: 486k]
  ------------------
  692|    661|      box = std::make_shared<Box_cmpC>();
  693|    661|      break;
  694|       |
  695|    969|    case fourcc("icef"):
  ------------------
  |  Branch (695:5): [True: 969, False: 486k]
  ------------------
  696|    969|      box = std::make_shared<Box_icef>();
  697|    969|      break;
  698|       |
  699|    884|    case fourcc("cpat"):
  ------------------
  |  Branch (699:5): [True: 884, False: 486k]
  ------------------
  700|    884|      box = std::make_shared<Box_cpat>();
  701|    884|      break;
  702|       |
  703|    453|    case fourcc("splz"):
  ------------------
  |  Branch (703:5): [True: 453, False: 486k]
  ------------------
  704|    453|      box = std::make_shared<Box_splz>();
  705|    453|      break;
  706|       |
  707|    543|    case fourcc("sbpm"):
  ------------------
  |  Branch (707:5): [True: 543, False: 486k]
  ------------------
  708|    543|      box = std::make_shared<Box_sbpm>();
  709|    543|      break;
  710|       |
  711|    325|    case fourcc("snuc"):
  ------------------
  |  Branch (711:5): [True: 325, False: 487k]
  ------------------
  712|    325|      box = std::make_shared<Box_snuc>();
  713|    325|      break;
  714|       |
  715|    206|    case fourcc("cloc"):
  ------------------
  |  Branch (715:5): [True: 206, False: 487k]
  ------------------
  716|    206|      box = std::make_shared<Box_cloc>();
  717|    206|      break;
  718|       |
  719|    517|    case fourcc("uncv"):
  ------------------
  |  Branch (719:5): [True: 517, False: 486k]
  ------------------
  720|    517|      box = std::make_shared<Box_uncv>();
  721|    517|      break;
  722|      0|#endif
  723|       |
  724|       |    // --- JPEG 2000
  725|       |
  726|  7.48k|    case fourcc("j2kH"):
  ------------------
  |  Branch (726:5): [True: 7.48k, False: 479k]
  ------------------
  727|  7.48k|      box = std::make_shared<Box_j2kH>();
  728|  7.48k|      break;
  729|       |
  730|  9.68k|    case fourcc("cdef"):
  ------------------
  |  Branch (730:5): [True: 9.68k, False: 477k]
  ------------------
  731|  9.68k|      box = std::make_shared<Box_cdef>();
  732|  9.68k|      break;
  733|       |
  734|  5.89k|    case fourcc("cmap"):
  ------------------
  |  Branch (734:5): [True: 5.89k, False: 481k]
  ------------------
  735|  5.89k|      box = std::make_shared<Box_cmap>();
  736|  5.89k|      break;
  737|       |
  738|  1.33k|    case fourcc("pclr"):
  ------------------
  |  Branch (738:5): [True: 1.33k, False: 486k]
  ------------------
  739|  1.33k|      box = std::make_shared<Box_pclr>();
  740|  1.33k|      break;
  741|       |
  742|    666|    case fourcc("j2kL"):
  ------------------
  |  Branch (742:5): [True: 666, False: 486k]
  ------------------
  743|    666|      box = std::make_shared<Box_j2kL>();
  744|    666|      break;
  745|       |
  746|     85|    case fourcc("j2ki"):
  ------------------
  |  Branch (746:5): [True: 85, False: 487k]
  ------------------
  747|     85|      box = std::make_shared<Box_j2ki>();
  748|     85|      break;
  749|       |
  750|       |
  751|       |    // --- mski
  752|       |
  753|    580|    case fourcc("mskC"):
  ------------------
  |  Branch (753:5): [True: 580, False: 486k]
  ------------------
  754|    580|      box = std::make_shared<Box_mskC>();
  755|    580|      break;
  756|       |
  757|       |    // --- TAI timestamps
  758|       |
  759|    521|    case fourcc("itai"):
  ------------------
  |  Branch (759:5): [True: 521, False: 486k]
  ------------------
  760|    521|      box = std::make_shared<Box_itai>();
  761|    521|      break;
  762|       |
  763|  1.47k|    case fourcc("taic"):
  ------------------
  |  Branch (763:5): [True: 1.47k, False: 485k]
  ------------------
  764|  1.47k|      box = std::make_shared<Box_taic>();
  765|  1.47k|      break;
  766|       |
  767|       |    // --- AVC (H.264)
  768|       |
  769|  4.66k|    case fourcc("avcC"):
  ------------------
  |  Branch (769:5): [True: 4.66k, False: 482k]
  ------------------
  770|  4.66k|      box = std::make_shared<Box_avcC>();
  771|  4.66k|      break;
  772|       |
  773|     67|    case fourcc("avc1"):
  ------------------
  |  Branch (773:5): [True: 67, False: 487k]
  ------------------
  774|     67|      box = std::make_shared<Box_avc1>();
  775|     67|      break;
  776|       |
  777|      0|#if HEIF_ENABLE_EXPERIMENTAL_FEATURES
  778|  1.84k|    case fourcc("tilC"):
  ------------------
  |  Branch (778:5): [True: 1.84k, False: 485k]
  ------------------
  779|  1.84k|      box = std::make_shared<Box_tilC>();
  780|  1.84k|      break;
  781|      0|#endif
  782|       |
  783|  14.5k|    case fourcc("mini"):
  ------------------
  |  Branch (783:5): [True: 14.5k, False: 472k]
  ------------------
  784|  14.5k|      box = std::make_shared<Box_mini>();
  785|  14.5k|      break;
  786|       |
  787|  2.34k|    case fourcc("mdat"):
  ------------------
  |  Branch (787:5): [True: 2.34k, False: 485k]
  ------------------
  788|       |      // avoid generating a 'Box_other'
  789|  2.34k|      box = std::make_shared<Box>();
  790|  2.34k|      break;
  791|       |
  792|  14.8k|    case fourcc("uuid"):
  ------------------
  |  Branch (792:5): [True: 14.8k, False: 472k]
  ------------------
  793|  14.8k|      if (hdr.get_uuid_type() == std::vector<uint8_t>{0x22, 0xcc, 0x04, 0xc7, 0xd6, 0xd9, 0x4e, 0x07, 0x9d, 0x90, 0x4e, 0xb6, 0xec, 0xba, 0xf3, 0xa3}) {
  ------------------
  |  Branch (793:11): [True: 2.46k, False: 12.3k]
  ------------------
  794|  2.46k|        box = std::make_shared<Box_cmin>();
  795|  2.46k|      }
  796|  12.3k|      else if (hdr.get_uuid_type() == std::vector<uint8_t>{0x43, 0x63, 0xe9, 0x14, 0x5b, 0x7d, 0x4a, 0xab, 0x97, 0xae, 0xbe, 0xa6, 0x98, 0x03, 0xb4, 0x34}) {
  ------------------
  |  Branch (796:16): [True: 4.01k, False: 8.37k]
  ------------------
  797|  4.01k|        box = std::make_shared<Box_cmex>();
  798|  4.01k|      }
  799|  8.37k|      else if (hdr.get_uuid_type() == std::vector<uint8_t>{0x26, 0x1e, 0xf3, 0x74, 0x1d, 0x97, 0x5b, 0xba, 0xac, 0xbd, 0x9d, 0x2c, 0x8e, 0xa7, 0x35, 0x22}) {
  ------------------
  |  Branch (799:16): [True: 2.01k, False: 6.35k]
  ------------------
  800|  2.01k|        box = std::make_shared<Box_gimi_content_id>();
  801|  2.01k|      }
  802|  6.35k|#if WITH_UNCOMPRESSED_CODEC
  803|  6.35k|      else if (hdr.get_uuid_type() == std::vector<uint8_t>{0x9d, 0xb9, 0xdd, 0x6e, 0x37, 0x3c, 0x5a, 0x4e, 0x81, 0x10, 0x21, 0xfc, 0x83, 0xa9, 0x11, 0xfd}) {
  ------------------
  |  Branch (803:16): [True: 572, False: 5.78k]
  ------------------
  804|    572|        box = std::make_shared<Box_gimi_component_content_ids>();
  805|    572|      }
  806|  5.78k|#endif
  807|  5.78k|      else {
  808|  5.78k|        box = std::make_shared<Box_other>(hdr.get_short_type());
  809|  5.78k|      }
  810|  14.8k|      break;
  811|       |
  812|       |    // --- sequences
  813|       |
  814|    409|    case fourcc("moov"):
  ------------------
  |  Branch (814:5): [True: 409, False: 487k]
  ------------------
  815|    409|      box = std::make_shared<Box_moov>();
  816|    409|      break;
  817|       |
  818|  1.70k|    case fourcc("mvhd"):
  ------------------
  |  Branch (818:5): [True: 1.70k, False: 485k]
  ------------------
  819|  1.70k|      box = std::make_shared<Box_mvhd>();
  820|  1.70k|      break;
  821|       |
  822|    373|    case fourcc("trak"):
  ------------------
  |  Branch (822:5): [True: 373, False: 487k]
  ------------------
  823|    373|      box = std::make_shared<Box_trak>();
  824|    373|      break;
  825|       |
  826|  1.32k|    case fourcc("tkhd"):
  ------------------
  |  Branch (826:5): [True: 1.32k, False: 486k]
  ------------------
  827|  1.32k|      box = std::make_shared<Box_tkhd>();
  828|  1.32k|      break;
  829|       |
  830|    102|    case fourcc("mdia"):
  ------------------
  |  Branch (830:5): [True: 102, False: 487k]
  ------------------
  831|    102|      box = std::make_shared<Box_mdia>();
  832|    102|      break;
  833|       |
  834|    662|    case fourcc("mdhd"):
  ------------------
  |  Branch (834:5): [True: 662, False: 486k]
  ------------------
  835|    662|      box = std::make_shared<Box_mdhd>();
  836|    662|      break;
  837|       |
  838|    546|    case fourcc("minf"):
  ------------------
  |  Branch (838:5): [True: 546, False: 486k]
  ------------------
  839|    546|      box = std::make_shared<Box_minf>();
  840|    546|      break;
  841|       |
  842|    567|    case fourcc("vmhd"):
  ------------------
  |  Branch (842:5): [True: 567, False: 486k]
  ------------------
  843|    567|      box = std::make_shared<Box_vmhd>();
  844|    567|      break;
  845|       |
  846|    606|    case fourcc("stbl"):
  ------------------
  |  Branch (846:5): [True: 606, False: 486k]
  ------------------
  847|    606|      box = std::make_shared<Box_stbl>();
  848|    606|      break;
  849|       |
  850|  1.39k|    case fourcc("stsd"):
  ------------------
  |  Branch (850:5): [True: 1.39k, False: 486k]
  ------------------
  851|  1.39k|      box = std::make_shared<Box_stsd>();
  852|  1.39k|      break;
  853|       |
  854|    413|    case fourcc("stts"):
  ------------------
  |  Branch (854:5): [True: 413, False: 487k]
  ------------------
  855|    413|      box = std::make_shared<Box_stts>();
  856|    413|      break;
  857|       |
  858|  1.01k|    case fourcc("ctts"):
  ------------------
  |  Branch (858:5): [True: 1.01k, False: 486k]
  ------------------
  859|  1.01k|      box = std::make_shared<Box_ctts>();
  860|  1.01k|      break;
  861|       |
  862|    404|    case fourcc("stsc"):
  ------------------
  |  Branch (862:5): [True: 404, False: 487k]
  ------------------
  863|    404|      box = std::make_shared<Box_stsc>();
  864|    404|      break;
  865|       |
  866|    702|    case fourcc("stco"):
  ------------------
  |  Branch (866:5): [True: 702, False: 486k]
  ------------------
  867|    702|      box = std::make_shared<Box_stco>();
  868|    702|      break;
  869|       |
  870|  1.17k|    case fourcc("stsz"):
  ------------------
  |  Branch (870:5): [True: 1.17k, False: 486k]
  ------------------
  871|  1.17k|      box = std::make_shared<Box_stsz>();
  872|  1.17k|      break;
  873|       |
  874|    445|    case fourcc("stss"):
  ------------------
  |  Branch (874:5): [True: 445, False: 486k]
  ------------------
  875|    445|      box = std::make_shared<Box_stss>();
  876|    445|      break;
  877|       |
  878|    555|    case fourcc("ccst"):
  ------------------
  |  Branch (878:5): [True: 555, False: 486k]
  ------------------
  879|    555|      box = std::make_shared<Box_ccst>();
  880|    555|      break;
  881|       |
  882|  1.90k|    case fourcc("auxi"):
  ------------------
  |  Branch (882:5): [True: 1.90k, False: 485k]
  ------------------
  883|  1.90k|      box = std::make_shared<Box_auxi>();
  884|  1.90k|      break;
  885|       |
  886|    639|    case fourcc("edts"):
  ------------------
  |  Branch (886:5): [True: 639, False: 486k]
  ------------------
  887|    639|      box = std::make_shared<Box_edts>();
  888|    639|      break;
  889|       |
  890|  1.23k|    case fourcc("elst"):
  ------------------
  |  Branch (890:5): [True: 1.23k, False: 486k]
  ------------------
  891|  1.23k|      box = std::make_shared<Box_elst>();
  892|  1.23k|      break;
  893|       |
  894|    796|    case fourcc("sbgp"):
  ------------------
  |  Branch (894:5): [True: 796, False: 486k]
  ------------------
  895|    796|      box = std::make_shared<Box_sbgp>();
  896|    796|      break;
  897|       |
  898|  1.31k|    case fourcc("sgpd"):
  ------------------
  |  Branch (898:5): [True: 1.31k, False: 486k]
  ------------------
  899|  1.31k|      box = std::make_shared<Box_sgpd>();
  900|  1.31k|      break;
  901|       |
  902|    628|    case fourcc("btrt"):
  ------------------
  |  Branch (902:5): [True: 628, False: 486k]
  ------------------
  903|    628|      box = std::make_shared<Box_btrt>();
  904|    628|      break;
  905|       |
  906|  1.03k|    case fourcc("saiz"):
  ------------------
  |  Branch (906:5): [True: 1.03k, False: 486k]
  ------------------
  907|  1.03k|      box = std::make_shared<Box_saiz>();
  908|  1.03k|      break;
  909|       |
  910|  1.80k|    case fourcc("saio"):
  ------------------
  |  Branch (910:5): [True: 1.80k, False: 485k]
  ------------------
  911|  1.80k|      box = std::make_shared<Box_saio>();
  912|  1.80k|      break;
  913|       |
  914|  1.25k|    case fourcc("urim"):
  ------------------
  |  Branch (914:5): [True: 1.25k, False: 486k]
  ------------------
  915|  1.25k|      box = std::make_shared<Box_URIMetaSampleEntry>();
  916|  1.25k|      break;
  917|       |
  918|    794|    case fourcc("uri "):
  ------------------
  |  Branch (918:5): [True: 794, False: 486k]
  ------------------
  919|    794|      box = std::make_shared<Box_uri>();
  920|    794|      break;
  921|       |
  922|    560|    case fourcc("nmhd"):
  ------------------
  |  Branch (922:5): [True: 560, False: 486k]
  ------------------
  923|    560|      box = std::make_shared<Box_nmhd>();
  924|    560|      break;
  925|       |
  926|  1.03k|    case fourcc("tref"):
  ------------------
  |  Branch (926:5): [True: 1.03k, False: 486k]
  ------------------
  927|  1.03k|      box = std::make_shared<Box_tref>();
  928|  1.03k|      break;
  929|       |
  930|    556|    case fourcc("sdtp"):
  ------------------
  |  Branch (930:5): [True: 556, False: 486k]
  ------------------
  931|    556|      box = std::make_shared<Box_sdtp>();
  932|    556|      break;
  933|       |
  934|       |    // OMAF
  935|  1.01k|    case fourcc("prfr"):
  ------------------
  |  Branch (935:5): [True: 1.01k, False: 486k]
  ------------------
  936|  1.01k|      box = std::make_shared<Box_prfr>();
  937|  1.01k|      break;
  938|       |
  939|   140k|    default:
  ------------------
  |  Branch (939:5): [True: 140k, False: 346k]
  ------------------
  940|   140k|      box = std::make_shared<Box_other>(hdr.get_short_type());
  941|   140k|      break;
  942|   487k|  }
  943|       |
  944|   487k|  box->set_short_header(hdr);
  945|       |
  946|   487k|  box->m_debug_box_type = hdr.get_type_string(); // only for debugging
  947|       |
  948|       |
  949|   487k|  if (range.get_nesting_level() > MAX_BOX_NESTING_LEVEL) {
  ------------------
  |  Branch (949:7): [True: 2, False: 487k]
  ------------------
  950|      2|    return Error(heif_error_Memory_allocation_error,
  951|      2|                 heif_suberror_Security_limit_exceeded,
  952|      2|                 "Security limit for maximum nesting of boxes has been exceeded");
  953|      2|  }
  954|       |
  955|   487k|  if (hdr.has_fixed_box_size()) {
  ------------------
  |  Branch (955:7): [True: 429k, False: 57.5k]
  ------------------
  956|       |    // Sanity checks
  957|   429k|    if (hdr.get_box_size() < hdr.get_header_size()) {
  ------------------
  |  Branch (957:9): [True: 33, False: 429k]
  ------------------
  958|     33|      std::stringstream sstr;
  959|     33|      sstr << "Box size (" << hdr.get_box_size() << " bytes) smaller than header size ("
  960|     33|           << hdr.get_header_size() << " bytes)";
  961|       |
  962|     33|      return {heif_error_Invalid_input,
  963|     33|              heif_suberror_Invalid_box_size,
  964|     33|              sstr.str()};
  965|     33|    }
  966|       |
  967|       |    // this is >= 0 because of above condition
  968|   429k|    auto nBytes = static_cast<uint64_t>(hdr.get_box_size() - hdr.get_header_size());
  969|   429k|    if (nBytes > SIZE_MAX) {
  ------------------
  |  Branch (969:9): [True: 0, False: 429k]
  ------------------
  970|      0|      return {heif_error_Memory_allocation_error,
  971|      0|              heif_suberror_Invalid_box_size,
  972|      0|              "Box size too large"};
  973|      0|    }
  974|       |
  975|       |    // Security check: make sure that box size does not exceed int64 size.
  976|       |
  977|   429k|    if (hdr.get_box_size() > (uint64_t) std::numeric_limits<int64_t>::max()) {
  ------------------
  |  Branch (977:9): [True: 0, False: 429k]
  ------------------
  978|      0|      return {heif_error_Invalid_input,
  979|      0|              heif_suberror_Invalid_box_size};
  980|      0|    }
  981|       |
  982|       |    // --- wait for data to arrive
  983|       |
  984|   429k|    auto status = range.wait_for_available_bytes(static_cast<size_t>(nBytes));
  985|   429k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (985:9): [True: 3.32k, False: 426k]
  ------------------
  986|       |      // TODO: return recoverable error at timeout
  987|  3.32k|      return {heif_error_Invalid_input,
  988|  3.32k|              heif_suberror_End_of_data};
  989|  3.32k|    }
  990|   429k|  }
  991|       |
  992|   484k|  auto box_size = static_cast<int64_t>(hdr.get_box_size());
  993|   484k|  int64_t box_size_without_header = hdr.has_fixed_box_size() ? (box_size - hdr.get_header_size()) : (int64_t)range.get_remaining_bytes();
  ------------------
  |  Branch (993:37): [True: 426k, False: 57.5k]
  ------------------
  994|       |
  995|       |  // Box size may not be larger than remaining bytes in parent box.
  996|       |
  997|   484k|  if ((int64_t)range.get_remaining_bytes() < box_size_without_header) {
  ------------------
  |  Branch (997:7): [True: 2, False: 484k]
  ------------------
  998|      2|    return {heif_error_Invalid_input,
  999|      2|            heif_suberror_Invalid_box_size};
 1000|      2|  }
 1001|       |
 1002|       |
 1003|       |  // Create child bitstream range and read box from that range.
 1004|       |
 1005|   484k|  BitstreamRange boxrange(range.get_istream(),
 1006|   484k|                          box_size_without_header,
 1007|   484k|                          &range);
 1008|       |
 1009|   484k|  err = box->parse(boxrange, limits);
 1010|   484k|  boxrange.skip_to_end_of_box();
 1011|       |
 1012|   484k|  if (err == Error::Ok) {
  ------------------
  |  Branch (1012:7): [True: 464k, False: 19.1k]
  ------------------
 1013|   464k|    *result = std::move(box);
 1014|   464k|  }
 1015|  19.1k|  else {
 1016|  19.1k|    parse_error_fatality fatality = box->get_parse_error_fatality();
 1017|       |
 1018|  19.1k|    box = std::make_shared<Box_Error>(box->get_short_type(), err, fatality);
 1019|       |
 1020|       |    // We return a Box_Error that represents the parse error.
 1021|  19.1k|    *result = std::move(box);
 1022|  19.1k|  }
 1023|       |
 1024|   484k|  return err;
 1025|   484k|}
_ZNK3Box4dumpER6Indent:
 1029|   263k|{
 1030|   263k|  std::ostringstream sstr;
 1031|       |
 1032|   263k|  sstr << BoxHeader::dump(indent);
 1033|       |
 1034|   263k|  return sstr.str();
 1035|   263k|}
_ZNK7FullBox4dumpER6Indent:
 1039|  21.8k|{
 1040|  21.8k|  std::ostringstream sstr;
 1041|       |
 1042|  21.8k|  sstr << Box::dump(indent);
 1043|       |
 1044|  21.8k|  sstr << indent << "version: " << ((int) m_version) << "\n"
 1045|  21.8k|       << indent << "flags: " << std::hex << m_flags << "\n";
 1046|       |
 1047|  21.8k|  return sstr.str();
 1048|  21.8k|}
_ZN3Box13read_childrenER14BitstreamRangejPK20heif_security_limits:
 1109|  75.2k|{
 1110|  75.2k|  uint32_t count = 0;
 1111|       |
 1112|   394k|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (1112:10): [True: 324k, False: 69.4k]
  |  Branch (1112:26): [True: 324k, False: 0]
  ------------------
 1113|   324k|    std::shared_ptr<Box> box;
 1114|   324k|    Error error = Box::read(range, &box, limits);
 1115|   324k|    if (error != Error::Ok && (!box || box->get_parse_error_fatality() == parse_error_fatality::fatal)) {
  ------------------
  |  Branch (1115:9): [True: 13.9k, False: 310k]
  |  Branch (1115:32): [True: 325, False: 13.6k]
  |  Branch (1115:40): [True: 2.31k, False: 11.3k]
  ------------------
 1116|  2.63k|      return error;
 1117|  2.63k|    }
 1118|       |
 1119|   322k|    if (max_number == READ_CHILDREN_ALL) {
  ------------------
  |  Branch (1119:9): [True: 127k, False: 194k]
  ------------------
 1120|   127k|      uint32_t max_children;
 1121|   127k|      if (get_short_type() == fourcc("iinf")) {
  ------------------
  |  Branch (1121:11): [True: 3.05k, False: 124k]
  ------------------
 1122|  3.05k|        max_children = limits->max_items;
 1123|  3.05k|      }
 1124|   124k|      else {
 1125|   124k|        max_children = limits->max_children_per_box;
 1126|   124k|      }
 1127|       |
 1128|   127k|      if (max_children && m_children.size() > max_children) {
  ------------------
  |  Branch (1128:11): [True: 127k, False: 0]
  |  Branch (1128:27): [True: 58, False: 127k]
  ------------------
 1129|     58|        std::stringstream sstr;
 1130|     58|        sstr << "Maximum number of child boxes (" << max_children << ") in '" << get_type_string() << "' box exceeded.";
 1131|       |
 1132|       |        // Sanity check.
 1133|     58|        return Error(heif_error_Memory_allocation_error,
 1134|     58|                     heif_suberror_Security_limit_exceeded,
 1135|     58|                     sstr.str());
 1136|     58|      }
 1137|   127k|    }
 1138|       |
 1139|   321k|    m_children.push_back(std::move(box));
 1140|       |
 1141|       |
 1142|       |    // count the new child and end reading new children when we reached the expected number
 1143|       |
 1144|   321k|    count++;
 1145|       |
 1146|   321k|    if (max_number != READ_CHILDREN_ALL &&
  ------------------
  |  Branch (1146:9): [True: 194k, False: 127k]
  ------------------
 1147|   194k|        count == max_number) {
  ------------------
  |  Branch (1147:9): [True: 3.07k, False: 191k]
  ------------------
 1148|  3.07k|      break;
 1149|  3.07k|    }
 1150|   321k|  }
 1151|       |
 1152|  72.5k|  return range.get_error();
 1153|  75.2k|}
_ZNK3Box13dump_childrenER6Indentb:
 1170|  69.7k|{
 1171|  69.7k|  std::ostringstream sstr;
 1172|       |
 1173|  69.7k|  bool first = true;
 1174|  69.7k|  int idx=1;
 1175|       |
 1176|  69.7k|  indent++;
 1177|   249k|  for (const auto& childBox : m_children) {
  ------------------
  |  Branch (1177:29): [True: 249k, False: 69.7k]
  ------------------
 1178|   249k|    if (first) {
  ------------------
  |  Branch (1178:9): [True: 57.5k, False: 192k]
  ------------------
 1179|  57.5k|      first = false;
 1180|  57.5k|    }
 1181|   192k|    else {
 1182|   192k|      sstr << indent << "\n";
 1183|   192k|    }
 1184|       |
 1185|   249k|    if (with_index) {
  ------------------
  |  Branch (1185:9): [True: 29.8k, False: 219k]
  ------------------
 1186|  29.8k|      sstr << indent << "index: " << idx << "\n";
 1187|  29.8k|      idx++;
 1188|  29.8k|    }
 1189|       |
 1190|   249k|    sstr << childBox->dump(indent);
 1191|   249k|  }
 1192|  69.7k|  indent--;
 1193|       |
 1194|  69.7k|  return sstr.str();
 1195|  69.7k|}
_ZN9Box_other5parseER14BitstreamRangePK20heif_security_limits:
 1219|   143k|{
 1220|   143k|  if (has_fixed_box_size()) {
  ------------------
  |  Branch (1220:7): [True: 137k, False: 5.85k]
  ------------------
 1221|   137k|    size_t len;
 1222|   137k|    if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1222:9): [True: 137k, False: 0]
  ------------------
 1223|   137k|      auto len64 = get_box_size() - get_header_size();
 1224|   137k|      if (len64 > MAX_BOX_SIZE) {
  ------------------
  |  Branch (1224:11): [True: 0, False: 137k]
  ------------------
 1225|      0|        return {heif_error_Invalid_input,
 1226|      0|                heif_suberror_Security_limit_exceeded,
 1227|      0|                "Box size too large"};
 1228|      0|      }
 1229|       |
 1230|   137k|      len = static_cast<size_t>(len64);
 1231|       |
 1232|   137k|      m_data.resize(len);
 1233|   137k|      range.read(m_data.data(), len);
 1234|   137k|    }
 1235|      0|    else {
 1236|      0|      return {heif_error_Invalid_input,
 1237|      0|              heif_suberror_Invalid_box_size};
 1238|      0|    }
 1239|   137k|  }
 1240|  5.85k|  else {
 1241|       |    // TODO: boxes until end of file (we will probably never need this)
 1242|  5.85k|  }
 1243|       |
 1244|   143k|  return range.get_error();
 1245|   143k|}
_ZNK9Box_other4dumpER6Indent:
 1265|   119k|{
 1266|   119k|  std::ostringstream sstr;
 1267|       |
 1268|   119k|  sstr << BoxHeader::dump(indent);
 1269|       |
 1270|       |  // --- show raw box content
 1271|       |
 1272|   119k|  size_t len = 0;
 1273|   119k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1273:7): [True: 114k, False: 5.15k]
  ------------------
 1274|       |    // We can cast because if it does not fit, it would fail during parsing.
 1275|   114k|    len = static_cast<size_t>(get_box_size() - get_header_size());
 1276|   114k|  }
 1277|  5.15k|  else {
 1278|  5.15k|    sstr << indent << "invalid box size " << get_box_size() << " (smaller than header)\n";
 1279|  5.15k|    return sstr.str();
 1280|  5.15k|  }
 1281|       |
 1282|   114k|  sstr << write_raw_data_as_hex(m_data.data(), len,
 1283|   114k|                                indent.get_string() + "data: ",
 1284|   114k|                                indent.get_string() + "      ");
 1285|       |
 1286|   114k|  return sstr.str();
 1287|   119k|}
_ZNK9Box_Error4dumpER6Indent:
 1291|  6.08k|{
 1292|  6.08k|  std::ostringstream sstr;
 1293|  6.08k|  sstr << indent << '\'' << fourcc_to_string(m_box_type_with_parse_error) << "' parse error: " << m_error.message << "\n";
 1294|  6.08k|  sstr << indent << "fatality: ";
 1295|  6.08k|  switch (m_fatality) {
  ------------------
  |  Branch (1295:11): [True: 6.08k, False: 0]
  ------------------
 1296|      0|    case parse_error_fatality::fatal: sstr << "fatal\n"; break;
  ------------------
  |  Branch (1296:5): [True: 0, False: 6.08k]
  ------------------
 1297|  2.30k|    case parse_error_fatality::ignorable: sstr << "ignorable\n"; break;
  ------------------
  |  Branch (1297:5): [True: 2.30k, False: 3.77k]
  ------------------
 1298|  3.77k|    case parse_error_fatality::optional: sstr << "optional\n"; break;
  ------------------
  |  Branch (1298:5): [True: 3.77k, False: 2.30k]
  ------------------
 1299|  6.08k|  }
 1300|       |
 1301|  6.08k|  return sstr.str();
 1302|  6.08k|}
_ZNK9Box_Error24get_parse_error_fatalityEv:
 1305|  13.6k|{
 1306|  13.6k|  return m_fatality;
 1307|  13.6k|}
_ZN8Box_ftyp5parseER14BitstreamRangePK20heif_security_limits:
 1311|  11.7k|{
 1312|  11.7k|  m_major_brand = range.read32();
 1313|  11.7k|  m_minor_version = range.read32();
 1314|       |
 1315|  11.7k|  uint64_t box_size = get_box_size();
 1316|  11.7k|  if (box_size < 8 || box_size - 8 < get_header_size()) {
  ------------------
  |  Branch (1316:7): [True: 4, False: 11.7k]
  |  Branch (1316:23): [True: 5, False: 11.7k]
  ------------------
 1317|       |    // Sanity check.
 1318|      9|    return Error(heif_error_Invalid_input,
 1319|      9|                 heif_suberror_Invalid_box_size,
 1320|      9|                 "ftyp box too small (less than 8 bytes)");
 1321|      9|  }
 1322|       |
 1323|  11.7k|  uint64_t n_minor_brands = (get_box_size() - get_header_size() - 8) / 4;
 1324|       |
 1325|  11.7k|  if (limits->max_number_of_file_brands && n_minor_brands > limits->max_number_of_file_brands) {
  ------------------
  |  Branch (1325:7): [True: 11.7k, False: 0]
  |  Branch (1325:44): [True: 8, False: 11.7k]
  ------------------
 1326|      8|    return {
 1327|      8|      heif_error_Memory_allocation_error,
 1328|      8|      heif_suberror_Security_limit_exceeded,
 1329|      8|      "Number of minor brands in file exceeds security limit"
 1330|      8|    };
 1331|      8|  }
 1332|       |
 1333|  51.0k|  for (uint64_t i = 0; i < n_minor_brands && !range.error(); i++) {
  ------------------
  |  Branch (1333:24): [True: 39.2k, False: 11.7k]
  |  Branch (1333:46): [True: 39.2k, False: 0]
  ------------------
 1334|  39.2k|    m_compatible_brands.push_back(range.read32());
 1335|  39.2k|  }
 1336|       |
 1337|  11.7k|  return range.get_error();
 1338|  11.7k|}
_ZNK8Box_ftyp4dumpER6Indent:
 1351|  10.3k|{
 1352|  10.3k|  std::ostringstream sstr;
 1353|       |
 1354|  10.3k|  sstr << BoxHeader::dump(indent);
 1355|       |
 1356|  10.3k|  sstr << indent << "major brand: " << fourcc_to_string(m_major_brand) << "\n"
 1357|  10.3k|       << indent << "minor version: ";
 1358|  10.3k|  if (m_minor_version < ('A' << 24)) {
  ------------------
  |  Branch (1358:7): [True: 8.92k, False: 1.46k]
  ------------------
 1359|       |    // This is probably a version number
 1360|  8.92k|    sstr << m_minor_version;
 1361|  8.92k|  } else {
 1362|       |    // probably a 4CC, as used for mif3
 1363|  1.46k|    sstr << fourcc_to_string(m_minor_version);
 1364|  1.46k|  }
 1365|  10.3k|  sstr << "\n" << indent << "compatible brands: ";
 1366|       |
 1367|  10.3k|  bool first = true;
 1368|  34.3k|  for (uint32_t brand : m_compatible_brands) {
  ------------------
  |  Branch (1368:23): [True: 34.3k, False: 10.3k]
  ------------------
 1369|  34.3k|    if (first) { first = false; }
  ------------------
  |  Branch (1369:9): [True: 9.97k, False: 24.3k]
  ------------------
 1370|  24.3k|    else { sstr << ','; }
 1371|       |
 1372|  34.3k|    sstr << fourcc_to_string(brand);
 1373|  34.3k|  }
 1374|  10.3k|  sstr << "\n";
 1375|       |
 1376|  10.3k|  return sstr.str();
 1377|  10.3k|}
_ZN8Box_free5parseER14BitstreamRangePK20heif_security_limits:
 1406|    824|{
 1407|    824|  range.skip_to_end_of_box();
 1408|    824|  return range.get_error();
 1409|    824|}
_ZNK8Box_free4dumpER6Indent:
 1413|    670|{
 1414|    670|  std::ostringstream sstr;
 1415|    670|  sstr << BoxHeader::dump(indent);
 1416|    670|  return sstr.str();
 1417|    670|}
_ZN8Box_meta5parseER14BitstreamRangePK20heif_security_limits:
 1429|  3.27k|{
 1430|  3.27k|  parse_full_box_header(range);
 1431|       |
 1432|  3.27k|  if (get_version() != 0) {
  ------------------
  |  Branch (1432:7): [True: 6, False: 3.26k]
  ------------------
 1433|      6|    return unsupported_version_error("meta");
 1434|      6|  }
 1435|       |
 1436|       |  /*
 1437|       |  uint64_t boxSizeLimit;
 1438|       |  if (get_box_size() == BoxHeader::size_until_end_of_file) {
 1439|       |    boxSizeLimit = sizeLimit;
 1440|       |  }
 1441|       |  else {
 1442|       |    boxSizeLimit = get_box_size() - get_header_size();
 1443|       |  }
 1444|       |  */
 1445|       |
 1446|  3.26k|  return read_children(range, READ_CHILDREN_ALL, limits);
 1447|  3.27k|}
_ZNK8Box_meta4dumpER6Indent:
 1451|  2.86k|{
 1452|  2.86k|  std::ostringstream sstr;
 1453|  2.86k|  sstr << Box::dump(indent);
 1454|  2.86k|  sstr << dump_children(indent);
 1455|       |
 1456|  2.86k|  return sstr.str();
 1457|  2.86k|}
_ZNK7FullBox25unsupported_version_errorEPKc:
 1461|  1.95k|{
 1462|  1.95k|  std::stringstream sstr;
 1463|  1.95k|  sstr << box << " box data version " << ((int) m_version) << " is not implemented yet";
 1464|       |
 1465|  1.95k|  return {heif_error_Unsupported_feature,
 1466|  1.95k|          heif_suberror_Unsupported_data_version,
 1467|  1.95k|          sstr.str()};
 1468|  1.95k|}
_ZN8Box_hdlr5parseER14BitstreamRangePK20heif_security_limits:
 1472|  3.96k|{
 1473|  3.96k|  parse_full_box_header(range);
 1474|       |
 1475|  3.96k|  if (get_version() != 0) {
  ------------------
  |  Branch (1475:7): [True: 2, False: 3.95k]
  ------------------
 1476|      2|    return unsupported_version_error("hdlr");
 1477|      2|  }
 1478|       |
 1479|  3.95k|  m_pre_defined = range.read32();
 1480|  3.95k|  m_handler_type = range.read32();
 1481|       |
 1482|  15.8k|  for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1482:19): [True: 11.8k, False: 3.95k]
  ------------------
 1483|  11.8k|    m_reserved[i] = range.read32();
 1484|  11.8k|  }
 1485|       |
 1486|  3.95k|  m_name = range.read_string();
 1487|       |
 1488|  3.95k|  return range.get_error();
 1489|  3.96k|}
_ZNK8Box_hdlr4dumpER6Indent:
 1493|  2.72k|{
 1494|  2.72k|  std::ostringstream sstr;
 1495|  2.72k|  sstr << Box::dump(indent);
 1496|  2.72k|  sstr << indent << "pre_defined: " << m_pre_defined << "\n"
 1497|  2.72k|       << indent << "handler_type: " << fourcc_to_string(m_handler_type) << "\n"
 1498|  2.72k|       << indent << "name: " << m_name << "\n";
 1499|       |
 1500|  2.72k|  return sstr.str();
 1501|  2.72k|}
_ZN8Box_pitm5parseER14BitstreamRangePK20heif_security_limits:
 1524|  3.67k|{
 1525|  3.67k|  parse_full_box_header(range);
 1526|       |
 1527|  3.67k|  if (get_version() > 1) {
  ------------------
  |  Branch (1527:7): [True: 1, False: 3.67k]
  ------------------
 1528|      1|    return unsupported_version_error("pitm");
 1529|      1|  }
 1530|       |
 1531|       |
 1532|  3.67k|  if (get_version() == 0) {
  ------------------
  |  Branch (1532:7): [True: 3.40k, False: 268]
  ------------------
 1533|  3.40k|    m_item_ID = range.read16();
 1534|  3.40k|  }
 1535|    268|  else {
 1536|    268|    m_item_ID = range.read32();
 1537|    268|  }
 1538|       |
 1539|  3.67k|  return range.get_error();
 1540|  3.67k|}
_ZNK8Box_pitm4dumpER6Indent:
 1544|  3.38k|{
 1545|  3.38k|  std::ostringstream sstr;
 1546|  3.38k|  sstr << Box::dump(indent);
 1547|  3.38k|  sstr << indent << "item_ID: " << m_item_ID << "\n";
 1548|       |
 1549|  3.38k|  return sstr.str();
 1550|  3.38k|}
_ZN8Box_iloc5parseER14BitstreamRangePK20heif_security_limits:
 1583|  2.12k|{
 1584|  2.12k|  parse_full_box_header(range);
 1585|       |
 1586|  2.12k|  if (get_version() > 2) {
  ------------------
  |  Branch (1586:7): [True: 1, False: 2.12k]
  ------------------
 1587|      1|    return unsupported_version_error("iloc");
 1588|      1|  }
 1589|       |
 1590|  2.12k|  const int version = get_version();
 1591|       |
 1592|  2.12k|  uint16_t values4 = range.read16();
 1593|       |
 1594|  2.12k|  int offset_size = (values4 >> 12) & 0xF;
 1595|  2.12k|  int length_size = (values4 >> 8) & 0xF;
 1596|  2.12k|  int base_offset_size = (values4 >> 4) & 0xF;
 1597|  2.12k|  int index_size = 0;
 1598|       |
 1599|  2.12k|  if (version == 1 || version == 2) {
  ------------------
  |  Branch (1599:7): [True: 247, False: 1.87k]
  |  Branch (1599:23): [True: 279, False: 1.59k]
  ------------------
 1600|    526|    index_size = (values4 & 0xF);
 1601|    526|  }
 1602|       |
 1603|  2.12k|  uint32_t item_count = 0;
 1604|  2.12k|  if (version < 2) {
  ------------------
  |  Branch (1604:7): [True: 1.84k, False: 279]
  ------------------
 1605|  1.84k|    item_count = range.read16();
 1606|  1.84k|  }
 1607|    279|  else if (version == 2) {
  ------------------
  |  Branch (1607:12): [True: 279, False: 0]
  ------------------
 1608|    279|    item_count = range.read32();
 1609|    279|  }
 1610|       |
 1611|       |  // Sanity check. (This might be obsolete now as we check for range.error() below).
 1612|  2.12k|  if (limits->max_items && item_count > limits->max_items) {
  ------------------
  |  Branch (1612:7): [True: 2.12k, False: 0]
  |  Branch (1612:28): [True: 53, False: 2.07k]
  ------------------
 1613|     53|    std::stringstream sstr;
 1614|     53|    sstr << "iloc box contains " << item_count << " items, which exceeds the security limit of "
 1615|     53|         << limits->max_items << " items.";
 1616|       |
 1617|     53|    return Error(heif_error_Memory_allocation_error,
 1618|     53|                 heif_suberror_Security_limit_exceeded,
 1619|     53|                 sstr.str());
 1620|     53|  }
 1621|       |
 1622|  8.15k|  for (uint32_t i = 0; i < item_count; i++) {
  ------------------
  |  Branch (1622:24): [True: 6.25k, False: 1.90k]
  ------------------
 1623|  6.25k|    Item item;
 1624|       |
 1625|  6.25k|    if (range.eof()) {
  ------------------
  |  Branch (1625:9): [True: 93, False: 6.15k]
  ------------------
 1626|     93|      std::stringstream sstr;
 1627|     93|      sstr << "iloc box should contain " << item_count << " items, but we can only read " << i << " items.";
 1628|       |
 1629|     93|      return {heif_error_Invalid_input,
 1630|     93|              heif_suberror_End_of_data,
 1631|     93|              sstr.str()};
 1632|     93|    }
 1633|       |
 1634|  6.15k|    if (version < 2) {
  ------------------
  |  Branch (1634:9): [True: 5.91k, False: 245]
  ------------------
 1635|  5.91k|      item.item_ID = range.read16();
 1636|  5.91k|    }
 1637|    245|    else if (version == 2) {
  ------------------
  |  Branch (1637:14): [True: 245, False: 0]
  ------------------
 1638|    245|      item.item_ID = range.read32();
 1639|    245|    }
 1640|       |
 1641|  6.15k|    if (version >= 1) {
  ------------------
  |  Branch (1641:9): [True: 737, False: 5.42k]
  ------------------
 1642|    737|      values4 = range.read16();
 1643|    737|      item.construction_method = (values4 & 0xF);
 1644|    737|    }
 1645|       |
 1646|  6.15k|    item.data_reference_index = range.read16();
 1647|       |
 1648|  6.15k|    item.base_offset = 0;
 1649|  6.15k|    if (base_offset_size == 4) {
  ------------------
  |  Branch (1649:9): [True: 1.26k, False: 4.89k]
  ------------------
 1650|  1.26k|      item.base_offset = range.read32();
 1651|  1.26k|    }
 1652|  4.89k|    else if (base_offset_size == 8) {
  ------------------
  |  Branch (1652:14): [True: 205, False: 4.68k]
  ------------------
 1653|    205|      item.base_offset = ((uint64_t) range.read32()) << 32;
 1654|    205|      item.base_offset |= range.read32();
 1655|    205|    }
 1656|       |
 1657|  6.15k|    uint16_t extent_count = range.read16();
 1658|       |
 1659|       |    // Sanity check.
 1660|  6.15k|    auto max_iloc_extents = limits->max_iloc_extents_per_item;
 1661|  6.15k|    if (max_iloc_extents && extent_count > max_iloc_extents) {
  ------------------
  |  Branch (1661:9): [True: 6.15k, False: 0]
  |  Branch (1661:29): [True: 33, False: 6.12k]
  ------------------
 1662|     33|      std::stringstream sstr;
 1663|     33|      sstr << "Number of extents in iloc box (" << extent_count << ") exceeds security limit ("
 1664|     33|           << max_iloc_extents << ")\n";
 1665|       |
 1666|     33|      return Error(heif_error_Memory_allocation_error,
 1667|     33|                   heif_suberror_Security_limit_exceeded,
 1668|     33|                   sstr.str());
 1669|     33|    }
 1670|       |
 1671|  20.2k|    for (int e = 0; e < extent_count; e++) {
  ------------------
  |  Branch (1671:21): [True: 14.1k, False: 6.08k]
  ------------------
 1672|  14.1k|      Extent extent;
 1673|       |
 1674|  14.1k|      if (range.eof()) {
  ------------------
  |  Branch (1674:11): [True: 40, False: 14.0k]
  ------------------
 1675|     40|        std::stringstream sstr;
 1676|     40|        sstr << "iloc item should contain " << extent_count << " extents, but we can only read " << e << " extents.";
 1677|       |
 1678|     40|        return {heif_error_Invalid_input,
 1679|     40|                heif_suberror_End_of_data,
 1680|     40|                sstr.str()};
 1681|     40|      }
 1682|       |
 1683|  14.0k|      if ((version == 1 || version == 2) && index_size > 0) {
  ------------------
  |  Branch (1683:12): [True: 1.77k, False: 12.2k]
  |  Branch (1683:28): [True: 359, False: 11.9k]
  |  Branch (1683:45): [True: 1.63k, False: 504]
  ------------------
 1684|  1.63k|        if (index_size == 4) {
  ------------------
  |  Branch (1684:13): [True: 398, False: 1.23k]
  ------------------
 1685|    398|          extent.index = range.read32();
 1686|    398|        }
 1687|  1.23k|        else if (index_size == 8) {
  ------------------
  |  Branch (1687:18): [True: 320, False: 913]
  ------------------
 1688|    320|          extent.index = ((uint64_t) range.read32()) << 32;
 1689|    320|          extent.index |= range.read32();
 1690|    320|        }
 1691|  1.63k|      }
 1692|       |
 1693|  14.0k|      extent.offset = 0;
 1694|  14.0k|      if (offset_size == 4) {
  ------------------
  |  Branch (1694:11): [True: 1.26k, False: 12.8k]
  ------------------
 1695|  1.26k|        extent.offset = range.read32();
 1696|  1.26k|      }
 1697|  12.8k|      else if (offset_size == 8) {
  ------------------
  |  Branch (1697:16): [True: 243, False: 12.5k]
  ------------------
 1698|    243|        extent.offset = ((uint64_t) range.read32()) << 32;
 1699|    243|        extent.offset |= range.read32();
 1700|    243|      }
 1701|       |
 1702|       |
 1703|  14.0k|      extent.length = 0;
 1704|  14.0k|      if (length_size == 4) {
  ------------------
  |  Branch (1704:11): [True: 1.18k, False: 12.8k]
  ------------------
 1705|  1.18k|        extent.length = range.read32();
 1706|  1.18k|      }
 1707|  12.8k|      else if (length_size == 8) {
  ------------------
  |  Branch (1707:16): [True: 325, False: 12.5k]
  ------------------
 1708|    325|        extent.length = ((uint64_t) range.read32()) << 32;
 1709|    325|        extent.length |= range.read32();
 1710|    325|      }
 1711|       |
 1712|  14.0k|      item.extents.push_back(extent);
 1713|  14.0k|    }
 1714|       |
 1715|  6.08k|    if (!range.error()) {
  ------------------
  |  Branch (1715:9): [True: 6.00k, False: 85]
  ------------------
 1716|  6.00k|      m_items.push_back(item);
 1717|  6.00k|    }
 1718|  6.08k|  }
 1719|       |
 1720|  1.90k|  return range.get_error();
 1721|  2.07k|}
_ZN8Box_ilocC2Ev:
 1725|  2.12k|{
 1726|  2.12k|  set_short_type(fourcc("iloc"));
 1727|       |
 1728|  2.12k|  set_use_tmp_file(false);
 1729|  2.12k|}
_ZN8Box_ilocD2Ev:
 1733|  2.12k|{
 1734|  2.12k|  if (m_use_tmpfile) {
  ------------------
  |  Branch (1734:7): [True: 0, False: 2.12k]
  ------------------
 1735|      0|    unlink(m_tmp_filename);
 1736|      0|  }
 1737|  2.12k|}
_ZN8Box_iloc16set_use_tmp_fileEb:
 1741|  2.12k|{
 1742|  2.12k|  m_use_tmpfile = flag;
 1743|  2.12k|  if (flag) {
  ------------------
  |  Branch (1743:7): [True: 0, False: 2.12k]
  ------------------
 1744|      0|#if !defined(_WIN32)
 1745|      0|    strcpy(m_tmp_filename, "/tmp/libheif-XXXXXX");
 1746|      0|    m_tmpfile_fd = mkstemp(m_tmp_filename);
 1747|       |#else
 1748|       |    // TODO Currently unused code. Implement when needed.
 1749|       |    assert(false);
 1750|       |#  if 0
 1751|       |    char tmpname[L_tmpnam_s];
 1752|       |    // TODO: check return value (errno_t)
 1753|       |    tmpnam_s(tmpname, L_tmpnam_s);
 1754|       |    _sopen_s(&m_tmpfile_fd, tmpname, _O_CREAT | _O_TEMPORARY | _O_TRUNC | _O_RDWR, _SH_DENYRW, _S_IREAD | _S_IWRITE);
 1755|       |#  endif
 1756|       |#endif
 1757|      0|  }
 1758|  2.12k|}
_ZNK8Box_iloc4dumpER6Indent:
 1762|  1.85k|{
 1763|  1.85k|  std::ostringstream sstr;
 1764|  1.85k|  sstr << Box::dump(indent);
 1765|       |
 1766|  3.11k|  for (const Item& item : m_items) {
  ------------------
  |  Branch (1766:25): [True: 3.11k, False: 1.85k]
  ------------------
 1767|  3.11k|    sstr << indent << "item ID: " << item.item_ID << "\n"
 1768|  3.11k|         << indent << "  construction method: " << ((int) item.construction_method) << "\n"
 1769|  3.11k|         << indent << "  data_reference_index: " << std::hex
 1770|  3.11k|         << item.data_reference_index << std::dec << "\n"
 1771|  3.11k|         << indent << "  base_offset: " << item.base_offset << "\n";
 1772|       |
 1773|  3.11k|    sstr << indent << "  extents: ";
 1774|  7.71k|    for (const Extent& extent : item.extents) {
  ------------------
  |  Branch (1774:31): [True: 7.71k, False: 3.11k]
  ------------------
 1775|  7.71k|      sstr << extent.offset << "," << extent.length;
 1776|  7.71k|      if (extent.index != 0) {
  ------------------
  |  Branch (1776:11): [True: 414, False: 7.29k]
  ------------------
 1777|    414|        sstr << ";index=" << extent.index;
 1778|    414|      }
 1779|  7.71k|      sstr << " ";
 1780|  7.71k|    }
 1781|  3.11k|    sstr << "\n";
 1782|  3.11k|  }
 1783|       |
 1784|  1.85k|  return sstr.str();
 1785|  1.85k|}
_ZN8Box_infe5parseER14BitstreamRangePK20heif_security_limits:
 2445|  4.73k|{
 2446|  4.73k|  parse_full_box_header(range);
 2447|       |
 2448|       |  // only versions 2,3 are required by HEIF
 2449|  4.73k|  if (get_version() > 3) {
  ------------------
  |  Branch (2449:7): [True: 5, False: 4.72k]
  ------------------
 2450|      5|    return unsupported_version_error("infe");
 2451|      5|  }
 2452|       |
 2453|  4.72k|  if (get_version() <= 1) {
  ------------------
  |  Branch (2453:7): [True: 317, False: 4.41k]
  ------------------
 2454|    317|    m_item_ID = range.read16();
 2455|    317|    m_item_protection_index = range.read16();
 2456|       |
 2457|    317|    m_item_name = range.read_string();
 2458|    317|    m_content_type = range.read_string();
 2459|    317|    m_content_encoding = range.read_string();
 2460|    317|  }
 2461|       |
 2462|  4.72k|  m_item_type_4cc = 0;
 2463|       |
 2464|  4.72k|  if (get_version() >= 2) {
  ------------------
  |  Branch (2464:7): [True: 4.41k, False: 317]
  ------------------
 2465|  4.41k|    m_hidden_item = (get_flags() & 1);
 2466|       |
 2467|  4.41k|    if (get_version() == 2) {
  ------------------
  |  Branch (2467:9): [True: 4.06k, False: 346]
  ------------------
 2468|  4.06k|      m_item_ID = range.read16();
 2469|  4.06k|    }
 2470|    346|    else {
 2471|    346|      m_item_ID = range.read32();
 2472|    346|    }
 2473|       |
 2474|  4.41k|    m_item_protection_index = range.read16();
 2475|  4.41k|    m_item_type_4cc = range.read32();
 2476|       |
 2477|  4.41k|    m_item_name = range.read_string();
 2478|  4.41k|    if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2478:9): [True: 355, False: 4.05k]
  ------------------
 2479|    355|      m_content_type = range.read_string();
 2480|    355|      m_content_encoding = range.read_string();
 2481|    355|    }
 2482|  4.05k|    else if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2482:14): [True: 733, False: 3.32k]
  ------------------
 2483|    733|      m_item_uri_type = range.read_string();
 2484|    733|    }
 2485|  4.41k|  }
 2486|       |
 2487|  4.72k|  return range.get_error();
 2488|  4.73k|}
_ZNK8Box_infe4dumpER6Indent:
 2566|  4.17k|{
 2567|  4.17k|  std::ostringstream sstr;
 2568|  4.17k|  sstr << Box::dump(indent);
 2569|       |
 2570|  4.17k|  sstr << indent << "item_ID: " << m_item_ID << "\n"
 2571|  4.17k|       << indent << "item_protection_index: " << m_item_protection_index << "\n"
 2572|  4.17k|       << indent << "item_type: " << fourcc_to_string(m_item_type_4cc) << "\n"
 2573|  4.17k|       << indent << "item_name: " << m_item_name << "\n";
 2574|       |
 2575|  4.17k|  if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2575:7): [True: 219, False: 3.95k]
  ------------------
 2576|    219|    sstr << indent << "content_type: " << m_content_type << "\n"
 2577|    219|         << indent << "content_encoding: " << m_content_encoding << "\n";
 2578|    219|  }
 2579|       |
 2580|  4.17k|  if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2580:7): [True: 622, False: 3.54k]
  ------------------
 2581|    622|    sstr << indent << "item uri type: " << m_item_uri_type << "\n";
 2582|    622|  }
 2583|       |
 2584|  4.17k|  sstr << indent << "hidden item: " << std::boolalpha << m_hidden_item << "\n";
 2585|       |
 2586|  4.17k|  return sstr.str();
 2587|  4.17k|}
_ZN8Box_iinf5parseER14BitstreamRangePK20heif_security_limits:
 2591|  4.17k|{
 2592|  4.17k|  parse_full_box_header(range);
 2593|       |
 2594|       |  // TODO: there are several images in circulation that have an iinf version=2. We should not enforce this with a hard error.
 2595|  4.17k|  if (false && get_version() > 1) {
  ------------------
  |  Branch (2595:7): [Folded, False: 4.17k]
  |  Branch (2595:16): [True: 0, False: 0]
  ------------------
 2596|      0|    return unsupported_version_error("iinf");
 2597|      0|  }
 2598|       |
 2599|  4.17k|  int nEntries_size = (get_version() > 0) ? 4 : 2;
  ------------------
  |  Branch (2599:23): [True: 886, False: 3.28k]
  ------------------
 2600|       |
 2601|  4.17k|  uint32_t item_count;
 2602|  4.17k|  if (nEntries_size == 2) {
  ------------------
  |  Branch (2602:7): [True: 3.28k, False: 886]
  ------------------
 2603|  3.28k|    item_count = range.read16();
 2604|  3.28k|  }
 2605|    886|  else {
 2606|    886|    item_count = range.read32();
 2607|    886|  }
 2608|       |
 2609|  4.17k|  if (item_count == 0) {
  ------------------
  |  Branch (2609:7): [True: 463, False: 3.71k]
  ------------------
 2610|    463|    return Error::Ok;
 2611|    463|  }
 2612|       |
 2613|  3.71k|  return read_children(range, item_count, limits);
 2614|  4.17k|}
_ZNK8Box_iinf4dumpER6Indent:
 2618|  3.83k|{
 2619|  3.83k|  std::ostringstream sstr;
 2620|  3.83k|  sstr << Box::dump(indent);
 2621|       |
 2622|  3.83k|  sstr << dump_children(indent);
 2623|       |
 2624|  3.83k|  return sstr.str();
 2625|  3.83k|}
_ZN8Box_iprp5parseER14BitstreamRangePK20heif_security_limits:
 2629|  32.1k|{
 2630|       |  //parse_full_box_header(range);
 2631|       |
 2632|  32.1k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2633|  32.1k|}
_ZNK8Box_iprp4dumpER6Indent:
 2665|  30.4k|{
 2666|  30.4k|  std::ostringstream sstr;
 2667|  30.4k|  sstr << Box::dump(indent);
 2668|       |
 2669|  30.4k|  sstr << dump_children(indent);
 2670|       |
 2671|  30.4k|  return sstr.str();
 2672|  30.4k|}
_ZN8Box_ipco5parseER14BitstreamRangePK20heif_security_limits:
 2687|  12.0k|{
 2688|       |  //parse_full_box_header(range);
 2689|       |
 2690|  12.0k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2691|  12.0k|}
_ZNK8Box_ipco4dumpER6Indent:
 2695|  10.7k|{
 2696|  10.7k|  std::ostringstream sstr;
 2697|  10.7k|  sstr << Box::dump(indent);
 2698|       |
 2699|  10.7k|  sstr << dump_children(indent, true);
 2700|       |
 2701|  10.7k|  return sstr.str();
 2702|  10.7k|}
_ZN8Box_pixi5parseER14BitstreamRangePK20heif_security_limits:
 2706|  3.67k|{
 2707|  3.67k|  parse_full_box_header(range);
 2708|       |
 2709|  3.67k|  if (get_version() != 0) {
  ------------------
  |  Branch (2709:7): [True: 241, False: 3.43k]
  ------------------
 2710|    241|    return unsupported_version_error("pixi");
 2711|    241|  }
 2712|       |
 2713|  3.43k|  StreamReader::grow_status status;
 2714|  3.43k|  uint8_t num_channels = range.read8();
 2715|  3.43k|  status = range.wait_for_available_bytes(num_channels);
 2716|  3.43k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (2716:7): [True: 26, False: 3.40k]
  ------------------
 2717|       |    // TODO: return recoverable error at timeout
 2718|     26|    return Error(heif_error_Invalid_input,
 2719|     26|                 heif_suberror_End_of_data);
 2720|     26|  }
 2721|       |
 2722|  3.40k|  m_bits_per_channel.resize(num_channels);
 2723|  22.2k|  for (int i = 0; i < num_channels; i++) {
  ------------------
  |  Branch (2723:19): [True: 18.8k, False: 3.40k]
  ------------------
 2724|  18.8k|    m_bits_per_channel[i] = range.read8();
 2725|  18.8k|  }
 2726|       |
 2727|  3.40k|  return range.get_error();
 2728|  3.43k|}
_ZNK8Box_pixi4dumpER6Indent:
 2732|  2.40k|{
 2733|  2.40k|  std::ostringstream sstr;
 2734|  2.40k|  sstr << Box::dump(indent);
 2735|       |
 2736|  2.40k|  sstr << indent << "bits_per_channel: ";
 2737|       |
 2738|  9.63k|  for (size_t i = 0; i < m_bits_per_channel.size(); i++) {
  ------------------
  |  Branch (2738:22): [True: 7.23k, False: 2.40k]
  ------------------
 2739|  7.23k|    if (i > 0) sstr << ",";
  ------------------
  |  Branch (2739:9): [True: 5.11k, False: 2.12k]
  ------------------
 2740|  7.23k|    sstr << ((int) m_bits_per_channel[i]);
 2741|  7.23k|  }
 2742|       |
 2743|  2.40k|  sstr << "\n";
 2744|       |
 2745|  2.40k|  return sstr.str();
 2746|  2.40k|}
_ZN8Box_pasp5parseER14BitstreamRangePK20heif_security_limits:
 2771|  16.0k|{
 2772|       |  //parse_full_box_header(range);
 2773|       |
 2774|  16.0k|  hSpacing = range.read32();
 2775|  16.0k|  vSpacing = range.read32();
 2776|       |
 2777|  16.0k|  return range.get_error();
 2778|  16.0k|}
_ZNK8Box_pasp4dumpER6Indent:
 2782|  13.2k|{
 2783|  13.2k|  std::ostringstream sstr;
 2784|  13.2k|  sstr << Box::dump(indent);
 2785|       |
 2786|  13.2k|  sstr << indent << "hSpacing: " << hSpacing << "\n";
 2787|  13.2k|  sstr << indent << "vSpacing: " << vSpacing << "\n";
 2788|       |
 2789|  13.2k|  return sstr.str();
 2790|  13.2k|}
_ZN8Box_lsel5parseER14BitstreamRangePK20heif_security_limits:
 2807|  7.72k|{
 2808|  7.72k|  layer_id = range.read16();
 2809|       |
 2810|  7.72k|  return range.get_error();
 2811|  7.72k|}
_ZNK8Box_lsel4dumpER6Indent:
 2815|  6.49k|{
 2816|  6.49k|  std::ostringstream sstr;
 2817|  6.49k|  sstr << Box::dump(indent);
 2818|       |
 2819|  6.49k|  sstr << indent << "layer_id: " << layer_id << "\n";
 2820|       |
 2821|  6.49k|  return sstr.str();
 2822|  6.49k|}
_ZN8Box_clli5parseER14BitstreamRangePK20heif_security_limits:
 2838|  1.55k|{
 2839|       |  //parse_full_box_header(range);
 2840|       |
 2841|  1.55k|  clli.max_content_light_level = range.read16();
 2842|  1.55k|  clli.max_pic_average_light_level = range.read16();
 2843|       |
 2844|  1.55k|  return range.get_error();
 2845|  1.55k|}
_ZNK8Box_clli4dumpER6Indent:
 2849|  1.29k|{
 2850|  1.29k|  std::ostringstream sstr;
 2851|  1.29k|  sstr << Box::dump(indent);
 2852|       |
 2853|  1.29k|  sstr << indent << "max_content_light_level: " << clli.max_content_light_level << "\n";
 2854|  1.29k|  sstr << indent << "max_pic_average_light_level: " << clli.max_pic_average_light_level << "\n";
 2855|       |
 2856|  1.29k|  return sstr.str();
 2857|  1.29k|}
_ZN8Box_mdcvC2Ev:
 2874|  12.3k|{
 2875|  12.3k|  set_short_type(fourcc("mdcv"));
 2876|       |
 2877|  12.3k|  memset(&mdcv, 0, sizeof(heif_mastering_display_colour_volume));
 2878|  12.3k|}
_ZN8Box_mdcv5parseER14BitstreamRangePK20heif_security_limits:
 2882|  6.25k|{
 2883|       |  //parse_full_box_header(range);
 2884|       |
 2885|  25.0k|  for (int c = 0; c < 3; c++) {
  ------------------
  |  Branch (2885:19): [True: 18.7k, False: 6.25k]
  ------------------
 2886|  18.7k|    mdcv.display_primaries_x[c] = range.read16();
 2887|  18.7k|    mdcv.display_primaries_y[c] = range.read16();
 2888|  18.7k|  }
 2889|       |
 2890|  6.25k|  mdcv.white_point_x = range.read16();
 2891|  6.25k|  mdcv.white_point_y = range.read16();
 2892|  6.25k|  mdcv.max_display_mastering_luminance = range.read32();
 2893|  6.25k|  mdcv.min_display_mastering_luminance = range.read32();
 2894|       |
 2895|  6.25k|  return range.get_error();
 2896|  6.25k|}
_ZNK8Box_mdcv4dumpER6Indent:
 2900|  5.71k|{
 2901|  5.71k|  std::ostringstream sstr;
 2902|  5.71k|  sstr << Box::dump(indent);
 2903|       |
 2904|  5.71k|  sstr << indent << "display_primaries (x,y): ";
 2905|  5.71k|  sstr << "(" << mdcv.display_primaries_x[0] << ";" << mdcv.display_primaries_y[0] << "), ";
 2906|  5.71k|  sstr << "(" << mdcv.display_primaries_x[1] << ";" << mdcv.display_primaries_y[1] << "), ";
 2907|  5.71k|  sstr << "(" << mdcv.display_primaries_x[2] << ";" << mdcv.display_primaries_y[2] << ")\n";
 2908|       |
 2909|  5.71k|  sstr << indent << "white point (x,y): (" << mdcv.white_point_x << ";" << mdcv.white_point_y << ")\n";
 2910|  5.71k|  sstr << indent << "max display mastering luminance: " << mdcv.max_display_mastering_luminance << "\n";
 2911|  5.71k|  sstr << indent << "min display mastering luminance: " << mdcv.min_display_mastering_luminance << "\n";
 2912|       |
 2913|  5.71k|  return sstr.str();
 2914|  5.71k|}
_ZN8Box_amveC2Ev:
 2938|  7.77k|{
 2939|  7.77k|  set_short_type(fourcc("amve"));
 2940|       |
 2941|       |  // These values are not valid.
 2942|  7.77k|  amve.ambient_illumination = 0;
 2943|  7.77k|  amve.ambient_light_x = 0;
 2944|  7.77k|  amve.ambient_light_y = 0;
 2945|  7.77k|}
_ZN8Box_amve5parseER14BitstreamRangePK20heif_security_limits:
 2948|    729|{
 2949|    729|  amve.ambient_illumination = range.read32();
 2950|    729|  amve.ambient_light_x = range.read16();
 2951|    729|  amve.ambient_light_y = range.read16();
 2952|       |
 2953|    729|  return range.get_error();
 2954|    729|}
_ZNK8Box_amve4dumpER6Indent:
 2958|    221|{
 2959|    221|  std::ostringstream sstr;
 2960|    221|  sstr << Box::dump(indent);
 2961|       |
 2962|    221|  sstr << indent << "ambient_illumination: " << amve.ambient_illumination << "\n";
 2963|    221|  sstr << indent << "ambient_light_x: " << amve.ambient_light_x << "\n";
 2964|    221|  sstr << indent << "ambient_light_y: " << amve.ambient_light_y << "\n";
 2965|       |
 2966|    221|  return sstr.str();
 2967|    221|}
_ZN8Box_ndwt5parseER14BitstreamRangePK20heif_security_limits:
 2985|    686|{
 2986|    686|  parse_full_box_header(range);
 2987|       |
 2988|    686|  if (get_version() != 0) {
  ------------------
  |  Branch (2988:7): [True: 70, False: 616]
  ------------------
 2989|     70|    return unsupported_version_error("ndwt");
 2990|     70|  }
 2991|       |
 2992|    616|  m_diffuse_white_luminance = range.read32();
 2993|       |
 2994|    616|  return range.get_error();
 2995|    686|}
_ZNK8Box_ndwt4dumpER6Indent:
 2999|    533|{
 3000|    533|  std::ostringstream sstr;
 3001|    533|  sstr << Box::dump(indent);
 3002|       |
 3003|    533|  sstr << indent << "diffuse_white_luminance: " << m_diffuse_white_luminance << "\n";
 3004|       |
 3005|    533|  return sstr.str();
 3006|    533|}
_ZN8Box_cclvC2Ev:
 3022|  10.9k|{
 3023|  10.9k|  set_short_type(fourcc("cclv"));
 3024|       |
 3025|  10.9k|  m_ccv_primaries_valid = false;
 3026|  10.9k|}
_ZN8Box_cclv13set_primariesEiiiiii:
 3030|  1.12k|{
 3031|  1.12k|  m_ccv_primaries_valid = true;
 3032|  1.12k|  m_ccv_primaries_x[0] = x0;
 3033|  1.12k|  m_ccv_primaries_y[0] = y0;
 3034|  1.12k|  m_ccv_primaries_x[1] = x1;
 3035|  1.12k|  m_ccv_primaries_y[1] = y1;
 3036|  1.12k|  m_ccv_primaries_x[2] = x2;
 3037|  1.12k|  m_ccv_primaries_y[2] = y2;
 3038|  1.12k|}
_ZN8Box_ispe5parseER14BitstreamRangePK20heif_security_limits:
 3222|  3.08k|{
 3223|  3.08k|  parse_full_box_header(range);
 3224|       |
 3225|  3.08k|  if (get_version() != 0) {
  ------------------
  |  Branch (3225:7): [True: 6, False: 3.08k]
  ------------------
 3226|      6|    return unsupported_version_error("ispe");
 3227|      6|  }
 3228|       |
 3229|  3.08k|  m_image_width = range.read32();
 3230|  3.08k|  m_image_height = range.read32();
 3231|       |
 3232|  3.08k|  return range.get_error();
 3233|  3.08k|}
_ZNK8Box_ispe4dumpER6Indent:
 3237|  2.57k|{
 3238|  2.57k|  std::ostringstream sstr;
 3239|  2.57k|  sstr << Box::dump(indent);
 3240|       |
 3241|  2.57k|  sstr << indent << "image width: " << m_image_width << "\n"
 3242|  2.57k|       << indent << "image height: " << m_image_height << "\n";
 3243|       |
 3244|  2.57k|  return sstr.str();
 3245|  2.57k|}
_ZN8Box_ipma5parseER14BitstreamRangePK20heif_security_limits:
 3274|  3.11k|{
 3275|  3.11k|  parse_full_box_header(range);
 3276|       |
 3277|       |  // TODO: is there any specification of allowed values for the ipma version in the HEIF standards?
 3278|       |
 3279|  3.11k|  if (get_version() > 1) {
  ------------------
  |  Branch (3279:7): [True: 1, False: 3.11k]
  ------------------
 3280|      1|    return unsupported_version_error("ipma");
 3281|      1|  }
 3282|       |
 3283|  3.11k|  uint32_t entry_cnt = range.read32();
 3284|       |
 3285|  3.11k|  if (limits->max_items && entry_cnt > limits->max_items) {
  ------------------
  |  Branch (3285:7): [True: 3.11k, False: 0]
  |  Branch (3285:28): [True: 27, False: 3.08k]
  ------------------
 3286|     27|    std::stringstream sstr;
 3287|     27|    sstr << "ipma box wants to define properties for " << entry_cnt
 3288|     27|         << " items, but the security limit has been set to " << limits->max_items << " items";
 3289|     27|    return {heif_error_Invalid_input,
 3290|     27|            heif_suberror_Security_limit_exceeded,
 3291|     27|            sstr.str()};
 3292|     27|  }
 3293|       |
 3294|  22.1k|  for (uint32_t i = 0; i < entry_cnt && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (3294:24): [True: 19.4k, False: 2.76k]
  |  Branch (3294:41): [True: 19.3k, False: 54]
  |  Branch (3294:59): [True: 19.0k, False: 267]
  ------------------
 3295|  19.0k|    Entry entry;
 3296|  19.0k|    if (get_version() < 1) {
  ------------------
  |  Branch (3296:9): [True: 12.6k, False: 6.42k]
  ------------------
 3297|  12.6k|      entry.item_ID = range.read16();
 3298|  12.6k|    }
 3299|  6.42k|    else {
 3300|  6.42k|      entry.item_ID = range.read32();
 3301|  6.42k|    }
 3302|       |
 3303|  19.0k|    int assoc_cnt = range.read8();
 3304|  1.13M|    for (int k = 0; k < assoc_cnt; k++) {
  ------------------
  |  Branch (3304:21): [True: 1.11M, False: 19.0k]
  ------------------
 3305|  1.11M|      PropertyAssociation association{};
 3306|       |
 3307|  1.11M|      uint16_t index;
 3308|  1.11M|      if (get_flags() & 1) {
  ------------------
  |  Branch (3308:11): [True: 896, False: 1.11M]
  ------------------
 3309|    896|        index = range.read16();
 3310|    896|        association.essential = !!(index & 0x8000);
 3311|    896|        association.property_index = (index & 0x7fff);
 3312|    896|      }
 3313|  1.11M|      else {
 3314|  1.11M|        index = range.read8();
 3315|  1.11M|        association.essential = !!(index & 0x80);
 3316|  1.11M|        association.property_index = (index & 0x7f);
 3317|  1.11M|      }
 3318|       |
 3319|  1.11M|      entry.associations.push_back(association);
 3320|  1.11M|    }
 3321|       |
 3322|  19.0k|    m_entries.push_back(entry);
 3323|  19.0k|  }
 3324|       |
 3325|  3.08k|  return range.get_error();
 3326|  3.11k|}
_ZNK8Box_ipma4dumpER6Indent:
 3390|  2.74k|{
 3391|  2.74k|  std::ostringstream sstr;
 3392|  2.74k|  sstr << Box::dump(indent);
 3393|       |
 3394|  17.9k|  for (const Entry& entry : m_entries) {
  ------------------
  |  Branch (3394:27): [True: 17.9k, False: 2.74k]
  ------------------
 3395|  17.9k|    sstr << indent << "associations for item ID: " << entry.item_ID << "\n";
 3396|  17.9k|    indent++;
 3397|  1.11M|    for (const auto& assoc : entry.associations) {
  ------------------
  |  Branch (3397:28): [True: 1.11M, False: 17.9k]
  ------------------
 3398|  1.11M|      sstr << indent << "property index: " << assoc.property_index
 3399|  1.11M|           << " (essential: " << std::boolalpha << assoc.essential << ")\n";
 3400|  1.11M|    }
 3401|  17.9k|    indent--;
 3402|  17.9k|  }
 3403|       |
 3404|  2.74k|  return sstr.str();
 3405|  2.74k|}
_ZN8Box_auxC5parseER14BitstreamRangePK20heif_security_limits:
 3500|  1.01k|{
 3501|  1.01k|  parse_full_box_header(range);
 3502|       |
 3503|  1.01k|  if (get_version() != 0) {
  ------------------
  |  Branch (3503:7): [True: 6, False: 1.00k]
  ------------------
 3504|      6|    return unsupported_version_error("auxC");
 3505|      6|  }
 3506|       |
 3507|  1.00k|  m_aux_type = range.read_string();
 3508|       |
 3509|  4.86M|  while (!range.eof()) {
  ------------------
  |  Branch (3509:10): [True: 4.86M, False: 1.00k]
  ------------------
 3510|  4.86M|    m_aux_subtypes.push_back(range.read8());
 3511|  4.86M|  }
 3512|       |
 3513|  1.00k|  return range.get_error();
 3514|  1.01k|}
_ZNK8Box_auxC4dumpER6Indent:
 3534|    748|{
 3535|    748|  std::ostringstream sstr;
 3536|    748|  sstr << Box::dump(indent);
 3537|       |
 3538|    748|  sstr << indent << "aux type: " << m_aux_type << "\n"
 3539|    748|       << indent << "aux subtypes: ";
 3540|  4.86M|  for (uint8_t subtype : m_aux_subtypes) {
  ------------------
  |  Branch (3540:24): [True: 4.86M, False: 748]
  ------------------
 3541|  4.86M|    sstr << std::hex << std::setw(2) << std::setfill('0') << ((int) subtype) << " ";
 3542|  4.86M|  }
 3543|       |
 3544|    748|  sstr << "\n";
 3545|       |
 3546|    748|  return sstr.str();
 3547|    748|}
_ZN8Box_irot5parseER14BitstreamRangePK20heif_security_limits:
 3551|  11.6k|{
 3552|       |  //parse_full_box_header(range);
 3553|       |
 3554|  11.6k|  uint16_t rotation = range.read8();
 3555|  11.6k|  rotation &= 0x03;
 3556|       |
 3557|  11.6k|  m_rotation = rotation * 90;
 3558|       |
 3559|  11.6k|  return range.get_error();
 3560|  11.6k|}
_ZNK8Box_irot4dumpER6Indent:
 3576|  7.82k|{
 3577|  7.82k|  std::ostringstream sstr;
 3578|  7.82k|  sstr << Box::dump(indent);
 3579|       |
 3580|  7.82k|  sstr << indent << "rotation: " << m_rotation << " degrees (CCW)\n";
 3581|       |
 3582|  7.82k|  return sstr.str();
 3583|  7.82k|}
_ZN8Box_imir5parseER14BitstreamRangePK20heif_security_limits:
 3587|  2.87k|{
 3588|       |  //parse_full_box_header(range);
 3589|       |
 3590|  2.87k|  uint8_t axis = range.read8();
 3591|  2.87k|  if (axis & 1) {
  ------------------
  |  Branch (3591:7): [True: 122, False: 2.75k]
  ------------------
 3592|    122|    m_axis = heif_transform_mirror_direction_horizontal;
 3593|    122|  }
 3594|  2.75k|  else {
 3595|  2.75k|    m_axis = heif_transform_mirror_direction_vertical;
 3596|  2.75k|  }
 3597|       |
 3598|  2.87k|  return range.get_error();
 3599|  2.87k|}
_ZNK8Box_imir4dumpER6Indent:
 3615|  2.02k|{
 3616|  2.02k|  std::ostringstream sstr;
 3617|  2.02k|  sstr << Box::dump(indent);
 3618|       |
 3619|  2.02k|  sstr << indent << "mirror direction: ";
 3620|  2.02k|  switch (m_axis) {
  ------------------
  |  Branch (3620:11): [True: 2.02k, False: 0]
  ------------------
 3621|  1.89k|    case heif_transform_mirror_direction_vertical:
  ------------------
  |  Branch (3621:5): [True: 1.89k, False: 122]
  ------------------
 3622|  1.89k|      sstr << "vertical\n";
 3623|  1.89k|      break;
 3624|    122|    case heif_transform_mirror_direction_horizontal:
  ------------------
  |  Branch (3624:5): [True: 122, False: 1.89k]
  ------------------
 3625|    122|      sstr << "horizontal\n";
 3626|    122|      break;
 3627|      0|    case heif_transform_mirror_direction_invalid:
  ------------------
  |  Branch (3627:5): [True: 0, False: 2.02k]
  ------------------
 3628|      0|      sstr << "invalid\n";
 3629|      0|      break;
 3630|  2.02k|  }
 3631|       |
 3632|  2.02k|  return sstr.str();
 3633|  2.02k|}
_ZN8Box_iscl5parseER14BitstreamRangePK20heif_security_limits:
 3637|    663|{
 3638|    663|  parse_full_box_header(range);
 3639|       |
 3640|    663|  if (get_version() != 0) {
  ------------------
  |  Branch (3640:7): [True: 78, False: 585]
  ------------------
 3641|     78|    return unsupported_version_error("iscl");
 3642|     78|  }
 3643|       |
 3644|    585|  m_target_width_numerator = range.read16();
 3645|    585|  m_target_width_denominator = range.read16();
 3646|    585|  m_target_height_numerator = range.read16();
 3647|    585|  m_target_height_denominator = range.read16();
 3648|       |
 3649|    585|  if (m_target_width_numerator == 0 || m_target_width_denominator == 0 ||
  ------------------
  |  Branch (3649:7): [True: 47, False: 538]
  |  Branch (3649:40): [True: 80, False: 458]
  ------------------
 3650|    458|      m_target_height_numerator == 0 || m_target_height_denominator == 0) {
  ------------------
  |  Branch (3650:7): [True: 47, False: 411]
  |  Branch (3650:41): [True: 31, False: 380]
  ------------------
 3651|    205|    return {heif_error_Invalid_input,
 3652|    205|            heif_suberror_Invalid_fractional_number,
 3653|    205|            "iscl property has zero numerator or denominator"};
 3654|    205|  }
 3655|       |
 3656|    380|  return range.get_error();
 3657|    585|}
_ZNK8Box_iscl4dumpER6Indent:
 3676|    341|{
 3677|    341|  std::ostringstream sstr;
 3678|    341|  sstr << FullBox::dump(indent);
 3679|       |
 3680|    341|  sstr << indent << "horizontal scaling factor: " << m_target_width_numerator << " / " << m_target_width_denominator << "\n";
 3681|    341|  sstr << indent << "vertical scaling factor:   " << m_target_height_numerator << " / " << m_target_height_denominator << "\n";
 3682|       |
 3683|    341|  return sstr.str();
 3684|    341|}
_ZN8Box_clap5parseER14BitstreamRangePK20heif_security_limits:
 3688|  4.72k|{
 3689|       |  //parse_full_box_header(range);
 3690|       |
 3691|  4.72k|  uint32_t clean_aperture_width_num = range.read32();
 3692|  4.72k|  uint32_t clean_aperture_width_den = range.read32();
 3693|  4.72k|  uint32_t clean_aperture_height_num = range.read32();
 3694|  4.72k|  uint32_t clean_aperture_height_den = range.read32();
 3695|       |
 3696|       |  // Note: in the standard document 14496-12(2015), it says that the offset values should also be unsigned integers,
 3697|       |  // but this is obviously an error. Even the accompanying standard text says that offsets may be negative.
 3698|  4.72k|  int32_t horizontal_offset_num = (int32_t) range.read32();
 3699|  4.72k|  uint32_t horizontal_offset_den = (uint32_t) range.read32();
 3700|  4.72k|  int32_t vertical_offset_num = (int32_t) range.read32();
 3701|  4.72k|  uint32_t vertical_offset_den = (uint32_t) range.read32();
 3702|       |
 3703|       |  // The checked Fraction construction rejects values outside the int32_t range and
 3704|       |  // zero denominators.
 3705|  4.72k|  auto clean_aperture_width = Fraction::from_unsigned(clean_aperture_width_num, clean_aperture_width_den);
 3706|  4.72k|  auto clean_aperture_height = Fraction::from_unsigned(clean_aperture_height_num, clean_aperture_height_den);
 3707|  4.72k|  auto horizontal_offset = Fraction::from_signed(horizontal_offset_num, horizontal_offset_den);
 3708|  4.72k|  auto vertical_offset = Fraction::from_signed(vertical_offset_num, vertical_offset_den);
 3709|       |
 3710|  4.72k|  for (const Result<Fraction>* f : {&clean_aperture_width, &clean_aperture_height,
  ------------------
  |  Branch (3710:34): [True: 15.3k, False: 554]
  ------------------
 3711|  15.3k|                                    &horizontal_offset, &vertical_offset}) {
 3712|  15.3k|    if (!*f) {
  ------------------
  |  Branch (3712:9): [True: 4.16k, False: 11.2k]
  ------------------
 3713|  4.16k|      return f->error();
 3714|  4.16k|    }
 3715|  15.3k|  }
 3716|       |
 3717|    554|  m_clean_aperture_width = *clean_aperture_width;
 3718|    554|  m_clean_aperture_height = *clean_aperture_height;
 3719|    554|  m_horizontal_offset = *horizontal_offset;
 3720|    554|  m_vertical_offset = *vertical_offset;
 3721|       |
 3722|    554|  return range.get_error();
 3723|  4.72k|}
_ZNK8Box_clap4dumpER6Indent:
 3746|    376|{
 3747|    376|  std::ostringstream sstr;
 3748|    376|  sstr << Box::dump(indent);
 3749|       |
 3750|    376|  sstr << indent << "clean_aperture: " << m_clean_aperture_width.numerator
 3751|    376|       << "/" << m_clean_aperture_width.denominator << " x "
 3752|    376|       << m_clean_aperture_height.numerator << "/"
 3753|    376|       << m_clean_aperture_height.denominator << "\n";
 3754|    376|  sstr << indent << "offset: " << m_horizontal_offset.numerator << "/"
 3755|    376|       << m_horizontal_offset.denominator << " ; "
 3756|    376|       << m_vertical_offset.numerator << "/"
 3757|    376|       << m_vertical_offset.denominator << "\n";
 3758|       |
 3759|    376|  return sstr.str();
 3760|    376|}
_ZN8Box_iref5parseER14BitstreamRangePK20heif_security_limits:
 3859|  15.6k|{
 3860|  15.6k|  parse_full_box_header(range);
 3861|       |
 3862|  15.6k|  if (get_version() > 1) {
  ------------------
  |  Branch (3862:7): [True: 6, False: 15.6k]
  ------------------
 3863|      6|    return unsupported_version_error("iref");
 3864|      6|  }
 3865|       |
 3866|  31.9k|  while (!range.eof()) {
  ------------------
  |  Branch (3866:10): [True: 16.4k, False: 15.5k]
  ------------------
 3867|  16.4k|    Reference ref;
 3868|       |
 3869|  16.4k|    Error err = ref.header.parse_header(range);
 3870|  16.4k|    if (err != Error::Ok) {
  ------------------
  |  Branch (3870:9): [True: 8, False: 16.4k]
  ------------------
 3871|      8|      return err;
 3872|      8|    }
 3873|       |
 3874|  16.4k|    int read_len = (get_version() == 0) ? 16 : 32;
  ------------------
  |  Branch (3874:20): [True: 15.7k, False: 638]
  ------------------
 3875|       |
 3876|  16.4k|    ref.from_item_ID = static_cast<uint32_t>(range.read_uint(read_len));
 3877|  16.4k|    uint16_t nRefs = range.read16();
 3878|       |
 3879|  16.4k|    if (nRefs==0) {
  ------------------
  |  Branch (3879:9): [True: 6, False: 16.3k]
  ------------------
 3880|      6|      return {heif_error_Invalid_input,
 3881|      6|              heif_suberror_Unspecified,
 3882|      6|              "Input file has an 'iref' box with no references."};
 3883|      6|    }
 3884|       |
 3885|  16.3k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (3885:9): [True: 16.3k, False: 0]
  |  Branch (3885:30): [True: 17, False: 16.3k]
  ------------------
 3886|     17|      std::stringstream sstr;
 3887|     17|      sstr << "Number of references in iref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 3888|       |
 3889|     17|      return {heif_error_Invalid_input,
 3890|     17|              heif_suberror_Security_limit_exceeded,
 3891|     17|              sstr.str()};
 3892|     17|    }
 3893|       |
 3894|   229k|    for (int i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (3894:21): [True: 212k, False: 16.3k]
  ------------------
 3895|   212k|      if (range.eof()) {
  ------------------
  |  Branch (3895:11): [True: 32, False: 212k]
  ------------------
 3896|     32|        std::stringstream sstr;
 3897|     32|        sstr << "iref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 3898|       |
 3899|     32|        return {heif_error_Invalid_input,
 3900|     32|                heif_suberror_End_of_data,
 3901|     32|                sstr.str()};
 3902|     32|      }
 3903|       |
 3904|   212k|      ref.to_item_ID.push_back(static_cast<uint32_t>(range.read_uint(read_len)));
 3905|   212k|    }
 3906|       |
 3907|  16.3k|    m_references.push_back(ref);
 3908|  16.3k|  }
 3909|       |
 3910|       |
 3911|       |  // --- check for duplicate references
 3912|       |
 3913|  15.5k|  if (auto error = check_for_double_references()) {
  ------------------
  |  Branch (3913:12): [True: 45, False: 15.5k]
  ------------------
 3914|     45|    return error;
 3915|     45|  }
 3916|       |
 3917|       |
 3918|       |#if 0
 3919|       |  // Note: This input sanity check first did not work as expected.
 3920|       |  // Its idea was to prevent infinite recursions while decoding when the input file
 3921|       |  // contains cyclic references. However, apparently there are cases where cyclic
 3922|       |  // references are actually allowed, like with images that have premultiplied alpha channels:
 3923|       |  // | Box: iref -----
 3924|       |  // | size: 40   (header size: 12)
 3925|       |  // | reference with type 'auxl' from ID: 2 to IDs: 1
 3926|       |  // | reference with type 'prem' from ID: 1 to IDs: 2
 3927|       |  //
 3928|       |  // We now test for cyclic references during the image decoding.
 3929|       |  // We pass down the item IDs that have already been seen during the decoding process.
 3930|       |  // If we try to decode an image IDs that has already been seen previously, we throw an error.
 3931|       |  // The advantage is that the error only occurs when we are trying to decode the faulty image.
 3932|       |
 3933|       |  // --- check for cyclic references
 3934|       |
 3935|       |  for (const auto& ref : m_references) {
 3936|       |    if (ref.header.get_short_type() != fourcc("dimg") &&
 3937|       |        ref.header.get_short_type() != fourcc("auxl")) {
 3938|       |      continue;
 3939|       |    }
 3940|       |
 3941|       |    std::set<heif_item_id> reached_ids; // IDs that we have already reached in the DAG
 3942|       |    std::set<heif_item_id> todo;    // IDs that still need to be followed
 3943|       |
 3944|       |    bool reverse = (ref.header.get_short_type() != fourcc("auxl"));
 3945|       |
 3946|       |    if (!reverse) {
 3947|       |      todo.insert(ref.from_item_ID);  // start at base item
 3948|       |    }
 3949|       |    else {
 3950|       |      if (ref.to_item_ID.empty()) {
 3951|       |        continue;
 3952|       |      }
 3953|       |
 3954|       |      // TODO: what if aux image is assigned to multiple images?
 3955|       |      todo.insert(ref.to_item_ID[0]);  // start at base item
 3956|       |    }
 3957|       |
 3958|       |    while (!todo.empty()) {
 3959|       |      // transfer ID into set of reached IDs
 3960|       |      auto id = *todo.begin();
 3961|       |      todo.erase(id);
 3962|       |      reached_ids.insert(id);
 3963|       |
 3964|       |      // if this ID refers to another 'iref', follow it
 3965|       |
 3966|       |      for (const auto& succ_ref : m_references) {
 3967|       |        if (succ_ref.header.get_short_type() != fourcc("dimg") &&
 3968|       |            succ_ref.header.get_short_type() != fourcc("auxl")) {
 3969|       |          continue;
 3970|       |        }
 3971|       |
 3972|       |        heif_item_id from;
 3973|       |        std::vector<heif_item_id> to;
 3974|       |
 3975|       |        if (succ_ref.header.get_short_type() == fourcc("auxl")) {
 3976|       |          if (succ_ref.to_item_ID.empty()) {
 3977|       |            continue;
 3978|       |          }
 3979|       |
 3980|       |          from = succ_ref.to_item_ID[0];
 3981|       |          to = {succ_ref.from_item_ID};
 3982|       |        }
 3983|       |        else {
 3984|       |          from = succ_ref.from_item_ID;
 3985|       |          to = succ_ref.to_item_ID;
 3986|       |        }
 3987|       |
 3988|       |        if (from == id) {
 3989|       |
 3990|       |          // Check whether any successor IDs has been visited yet, which would be an error.
 3991|       |          // Otherwise, put that ID into the 'todo' set.
 3992|       |
 3993|       |          for (const auto& succ_ref_id : to) {
 3994|       |            if (reached_ids.find(succ_ref_id) != reached_ids.end()) {
 3995|       |              return Error(heif_error_Invalid_input,
 3996|       |                           heif_suberror_Unspecified,
 3997|       |                           "'iref' has cyclic references");
 3998|       |            }
 3999|       |
 4000|       |            todo.insert(succ_ref_id);
 4001|       |          }
 4002|       |        }
 4003|       |      }
 4004|       |    }
 4005|       |  }
 4006|       |#endif
 4007|       |
 4008|  15.5k|  return range.get_error();
 4009|  15.5k|}
_ZNK8Box_iref27check_for_double_referencesEv:
 4013|  15.5k|{
 4014|  15.5k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (4014:24): [True: 15.3k, False: 15.5k]
  ------------------
 4015|  15.3k|    std::set<heif_item_id> to_ids;
 4016|  66.1k|    for (const auto to_id : ref.to_item_ID) {
  ------------------
  |  Branch (4016:27): [True: 66.1k, False: 15.3k]
  ------------------
 4017|  66.1k|      if (to_ids.find(to_id) == to_ids.end()) {
  ------------------
  |  Branch (4017:11): [True: 66.1k, False: 45]
  ------------------
 4018|  66.1k|        to_ids.insert(to_id);
 4019|  66.1k|      }
 4020|     45|      else {
 4021|     45|        return {heif_error_Invalid_input,
 4022|     45|                heif_suberror_Unspecified,
 4023|     45|                "'iref' has double references"};
 4024|     45|      }
 4025|  66.1k|    }
 4026|  15.3k|  }
 4027|       |
 4028|  15.5k|  return Error::Ok;
 4029|  15.5k|}
_ZNK8Box_iref4dumpER6Indent:
 4086|  13.3k|{
 4087|  13.3k|  std::ostringstream sstr;
 4088|  13.3k|  sstr << Box::dump(indent);
 4089|       |
 4090|  13.3k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (4090:24): [True: 13.0k, False: 13.3k]
  ------------------
 4091|  13.0k|    sstr << indent << "reference with type '" << ref.header.get_type_string() << "'"
 4092|  13.0k|         << " from ID: " << ref.from_item_ID
 4093|  13.0k|         << " to IDs: ";
 4094|  51.4k|    for (uint32_t id : ref.to_item_ID) {
  ------------------
  |  Branch (4094:22): [True: 51.4k, False: 13.0k]
  ------------------
 4095|  51.4k|      sstr << id << " ";
 4096|  51.4k|    }
 4097|  13.0k|    sstr << "\n";
 4098|  13.0k|  }
 4099|       |
 4100|  13.3k|  return sstr.str();
 4101|  13.3k|}
_ZN8Box_rref5parseER14BitstreamRangePK20heif_security_limits:
 4172|    709|{
 4173|    709|  parse_full_box_header(range);
 4174|       |
 4175|    709|  if (get_version() > 1) {
  ------------------
  |  Branch (4175:7): [True: 6, False: 703]
  ------------------
 4176|      6|    return unsupported_version_error("rref");
 4177|      6|  }
 4178|       |
 4179|    703|  size_t remainingBytes = range.get_remaining_bytes();
 4180|       |
 4181|       |  // The number of reference types should be stored in uint(8), but the
 4182|       |  // common test images C043, C044 store them as uint(32).
 4183|       |  // Let us detect this case by the number of data bytes in this box.
 4184|    703|  bool cnt_as_uint32 = (remainingBytes > 0 && remainingBytes % 4 == 0);
  ------------------
  |  Branch (4184:25): [True: 699, False: 4]
  |  Branch (4184:47): [True: 439, False: 260]
  ------------------
 4185|       |
 4186|    703|  uint8_t nRefTypes;
 4187|    703|  if (cnt_as_uint32) {
  ------------------
  |  Branch (4187:7): [True: 439, False: 264]
  ------------------
 4188|       |    // fix broken C043, C044 files
 4189|       |    // TODO: remove me when the files have been corrected as the above check can misfire when there is extra padding
 4190|    439|    nRefTypes = (uint8_t)range.read32();
 4191|    439|  }
 4192|    264|  else {
 4193|    264|    nRefTypes = range.read8();
 4194|    264|  }
 4195|       |
 4196|  3.85k|  for (uint8_t i = 0; i < nRefTypes; i++) {
  ------------------
  |  Branch (4196:23): [True: 3.18k, False: 675]
  ------------------
 4197|  3.18k|    uint32_t refType = range.read32();
 4198|       |
 4199|  3.18k|    if (range.error()) {
  ------------------
  |  Branch (4199:9): [True: 28, False: 3.15k]
  ------------------
 4200|     28|      std::stringstream sstr;
 4201|     28|      sstr << "rref box should contain " << ((int)nRefTypes) << " reference types, but we can only read " << m_reference_types.size() << " reference types.";
 4202|       |
 4203|     28|      return {
 4204|     28|        heif_error_Invalid_input,
 4205|     28|        heif_suberror_End_of_data,
 4206|     28|        sstr.str()
 4207|     28|      };
 4208|     28|    }
 4209|       |
 4210|  3.15k|    m_reference_types.push_back(refType);
 4211|  3.15k|  }
 4212|       |
 4213|    675|  return range.get_error();
 4214|    703|}
_ZNK8Box_rref4dumpER6Indent:
 4299|    669|{
 4300|    669|  std::ostringstream sstr;
 4301|    669|  sstr << Box::dump(indent);
 4302|       |
 4303|    669|  sstr << indent << "reference types: ";
 4304|  2.92k|  for (size_t i = 0; i < m_reference_types.size(); i++) {
  ------------------
  |  Branch (4304:22): [True: 2.25k, False: 669]
  ------------------
 4305|  2.25k|    if (i > 0) sstr << ", ";
  ------------------
  |  Branch (4305:9): [True: 2.03k, False: 214]
  ------------------
 4306|  2.25k|    sstr << fourcc_to_string(m_reference_types[i]);
 4307|  2.25k|  }
 4308|    669|  sstr << "\n";
 4309|       |
 4310|    669|  return sstr.str();
 4311|    669|}
_ZN8Box_idat5parseER14BitstreamRangePK20heif_security_limits:
 4315|  7.25k|{
 4316|       |  //parse_full_box_header(range);
 4317|       |
 4318|  7.25k|  m_data_start_pos = range.get_istream()->get_position();
 4319|       |
 4320|  7.25k|  return range.get_error();
 4321|  7.25k|}
_ZNK8Box_idat4dumpER6Indent:
 4337|  5.98k|{
 4338|  5.98k|  std::ostringstream sstr;
 4339|  5.98k|  sstr << Box::dump(indent);
 4340|       |
 4341|  5.98k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (4341:7): [True: 5.50k, False: 487]
  ------------------
 4342|  5.50k|    sstr << indent << "number of data bytes: " << get_box_size() - get_header_size() << "\n";
 4343|  5.50k|  } else {
 4344|    487|     sstr << indent << "number of data bytes is invalid\n";
 4345|    487|  }
 4346|       |
 4347|  5.98k|  return sstr.str();
 4348|  5.98k|}
_ZN8Box_grpl5parseER14BitstreamRangePK20heif_security_limits:
 4411|  1.62k|{
 4412|       |  //parse_full_box_header(range);
 4413|       |
 4414|  1.62k|  return read_children(range, READ_CHILDREN_ALL, limits); // should we pass the parsing context 'grpl' or are the box types unique?
 4415|  1.62k|}
_ZNK8Box_grpl4dumpER6Indent:
 4419|  1.30k|{
 4420|  1.30k|  std::ostringstream sstr;
 4421|  1.30k|  sstr << Box::dump(indent);
 4422|  1.30k|  sstr << dump_children(indent);
 4423|  1.30k|  return sstr.str();
 4424|  1.30k|}
_ZN17Box_EntityToGroup5parseER14BitstreamRangePK20heif_security_limits:
 4428|  2.23k|{
 4429|  2.23k|  Error err = parse_full_box_header(range);
 4430|  2.23k|  if (err != Error::Ok) {
  ------------------
  |  Branch (4430:7): [True: 133, False: 2.10k]
  ------------------
 4431|    133|    return err;
 4432|    133|  }
 4433|       |
 4434|  2.10k|  group_id = range.read32();
 4435|  2.10k|  uint32_t nEntities = range.read32();
 4436|       |
 4437|  2.10k|  if (nEntities > range.get_remaining_bytes() / 4) {
  ------------------
  |  Branch (4437:7): [True: 91, False: 2.01k]
  ------------------
 4438|     91|    std::stringstream sstr;
 4439|     91|    size_t maxEntries = range.get_remaining_bytes() / 4;
 4440|     91|    sstr << "entity group box should contain " << nEntities << " entities, but we can only read " << maxEntries << " entities.";
 4441|       |
 4442|     91|    return {heif_error_Invalid_input,
 4443|     91|            heif_suberror_End_of_data,
 4444|     91|            sstr.str()};
 4445|     91|  }
 4446|       |
 4447|  2.01k|  if (limits->max_size_entity_group && nEntities > limits->max_size_entity_group) {
  ------------------
  |  Branch (4447:7): [True: 2.01k, False: 0]
  |  Branch (4447:40): [True: 37, False: 1.97k]
  ------------------
 4448|     37|    std::stringstream sstr;
 4449|     37|    sstr << "entity group box contains " << nEntities << " entities, but the security limit is set to " << limits->max_size_entity_group << " entities.";
 4450|       |
 4451|     37|    return {heif_error_Invalid_input,
 4452|     37|            heif_suberror_Security_limit_exceeded,
 4453|     37|            sstr.str()};
 4454|     37|  }
 4455|       |
 4456|  1.97k|  entity_ids.resize(nEntities);
 4457|  5.33k|  for (uint32_t i = 0; i < nEntities; i++) {
  ------------------
  |  Branch (4457:24): [True: 3.36k, False: 1.97k]
  ------------------
 4458|  3.36k|    entity_ids[i] = range.read32();
 4459|  3.36k|  }
 4460|       |
 4461|  1.97k|  return Error::Ok;
 4462|  2.01k|}
_ZNK17Box_EntityToGroup4dumpER6Indent:
 4491|  1.23k|{
 4492|  1.23k|  std::ostringstream sstr;
 4493|  1.23k|  sstr << Box::dump(indent);
 4494|       |
 4495|  1.23k|  sstr << indent << "group id: " << group_id << "\n"
 4496|  1.23k|       << indent << "entity IDs: ";
 4497|       |
 4498|  1.23k|  bool first = true;
 4499|  2.01k|  for (uint32_t id : entity_ids) {
  ------------------
  |  Branch (4499:20): [True: 2.01k, False: 1.23k]
  ------------------
 4500|  2.01k|    if (first) {
  ------------------
  |  Branch (4500:9): [True: 519, False: 1.49k]
  ------------------
 4501|    519|      first = false;
 4502|    519|    }
 4503|  1.49k|    else {
 4504|  1.49k|      sstr << ' ';
 4505|  1.49k|    }
 4506|       |
 4507|  2.01k|    sstr << id;
 4508|  2.01k|  }
 4509|       |
 4510|  1.23k|  sstr << "\n";
 4511|       |
 4512|  1.23k|  return sstr.str();
 4513|  1.23k|}
_ZN8Box_ster5parseER14BitstreamRangePK20heif_security_limits:
 4517|    549|{
 4518|    549|  Error err = Box_EntityToGroup::parse(range, limits);
 4519|    549|  if (err) {
  ------------------
  |  Branch (4519:7): [True: 7, False: 542]
  ------------------
 4520|      7|    return err;
 4521|      7|  }
 4522|       |
 4523|    542|  if (entity_ids.size() != 2) {
  ------------------
  |  Branch (4523:7): [True: 3, False: 539]
  ------------------
 4524|      3|    return {heif_error_Invalid_input,
 4525|      3|            heif_suberror_Invalid_box_size,
 4526|      3|            "'ster' entity group does not exists of exactly two images"};
 4527|      3|  }
 4528|       |
 4529|    539|  return Error::Ok;
 4530|    542|}
_ZNK8Box_ster4dumpER6Indent:
 4534|    481|{
 4535|    481|  std::ostringstream sstr;
 4536|    481|  sstr << Box::dump(indent);
 4537|       |
 4538|    481|  sstr << indent << "group id: " << group_id << "\n"
 4539|    481|       << indent << "left image ID: " << entity_ids[0] << "\n"
 4540|    481|       << indent << "right image ID: " << entity_ids[1] << "\n";
 4541|       |
 4542|    481|  return sstr.str();
 4543|    481|}
_ZN8Box_pymd5parseER14BitstreamRangePK20heif_security_limits:
 4548|  1.57k|{
 4549|  1.57k|  Error err = Box_EntityToGroup::parse(range, limits);
 4550|  1.57k|  if (err) {
  ------------------
  |  Branch (4550:7): [True: 248, False: 1.32k]
  ------------------
 4551|    248|    return err;
 4552|    248|  }
 4553|       |
 4554|  1.32k|  tile_size_x = range.read16();
 4555|  1.32k|  tile_size_y = range.read16();
 4556|       |
 4557|  3.48k|  for (size_t i = 0; i < entity_ids.size(); i++) {
  ------------------
  |  Branch (4557:22): [True: 2.15k, False: 1.32k]
  ------------------
 4558|  2.15k|    LayerInfo layer{};
 4559|  2.15k|    layer.layer_binning = range.read16();
 4560|  2.15k|    layer.tiles_in_layer_row_minus1 = range.read16();
 4561|  2.15k|    layer.tiles_in_layer_column_minus1 = range.read16();
 4562|       |
 4563|  2.15k|    m_layer_infos.push_back(layer);
 4564|  2.15k|  }
 4565|       |
 4566|  1.32k|  return Error::Ok;
 4567|  1.57k|}
_ZNK8Box_pymd4dumpER6Indent:
 4594|  1.16k|{
 4595|  1.16k|  std::ostringstream sstr;
 4596|  1.16k|  sstr << Box_EntityToGroup::dump(indent);
 4597|       |
 4598|  1.16k|  sstr << indent << "tile size: " << tile_size_x << "x" << tile_size_y << "\n";
 4599|       |
 4600|  1.16k|  int layerNr = 0;
 4601|  1.96k|  for (const auto& layer : m_layer_infos) {
  ------------------
  |  Branch (4601:26): [True: 1.96k, False: 1.16k]
  ------------------
 4602|  1.96k|    sstr << indent << "layer " << layerNr << ":\n"
 4603|  1.96k|         << indent << "| binning: " << layer.layer_binning << "\n"
 4604|  1.96k|         << indent << "| tiles: " << (layer.tiles_in_layer_row_minus1 + 1) << "x" << (layer.tiles_in_layer_column_minus1 + 1) << "\n";
 4605|       |
 4606|  1.96k|    layerNr++;
 4607|  1.96k|  }
 4608|       |
 4609|  1.16k|  return sstr.str();
 4610|  1.16k|}
_ZN8Box_dinf5parseER14BitstreamRangePK20heif_security_limits:
 4614|  7.63k|{
 4615|       |  //parse_full_box_header(range);
 4616|       |
 4617|  7.63k|  return read_children(range, READ_CHILDREN_ALL, limits);
 4618|  7.63k|}
_ZNK8Box_dinf4dumpER6Indent:
 4622|  6.88k|{
 4623|  6.88k|  std::ostringstream sstr;
 4624|  6.88k|  sstr << Box::dump(indent);
 4625|  6.88k|  sstr << dump_children(indent);
 4626|       |
 4627|  6.88k|  return sstr.str();
 4628|  6.88k|}
_ZN8Box_dref5parseER14BitstreamRangePK20heif_security_limits:
 4632|  1.78k|{
 4633|  1.78k|  parse_full_box_header(range);
 4634|       |
 4635|  1.78k|  if (get_version() != 0) {
  ------------------
  |  Branch (4635:7): [True: 8, False: 1.77k]
  ------------------
 4636|      8|    return unsupported_version_error("dref");
 4637|      8|  }
 4638|       |
 4639|  1.77k|  uint32_t nEntities = range.read32();
 4640|       |
 4641|       |  /*
 4642|       |  for (int i=0;i<nEntities;i++) {
 4643|       |    if (range.eof()) {
 4644|       |      break;
 4645|       |    }
 4646|       |  }
 4647|       |  */
 4648|       |
 4649|  1.77k|  if (nEntities > (uint32_t)std::numeric_limits<int>::max()) {
  ------------------
  |  Branch (4649:7): [True: 11, False: 1.76k]
  ------------------
 4650|     11|    return Error(heif_error_Memory_allocation_error,
 4651|     11|                 heif_suberror_Security_limit_exceeded,
 4652|     11|                 "Too many entities in dref box.");
 4653|     11|  }
 4654|       |
 4655|  1.76k|  Error err = read_children(range, (int)nEntities, limits);
 4656|  1.76k|  if (err) {
  ------------------
  |  Branch (4656:7): [True: 87, False: 1.68k]
  ------------------
 4657|     87|    return err;
 4658|     87|  }
 4659|       |
 4660|  1.68k|  if (m_children.size() != nEntities) {
  ------------------
  |  Branch (4660:7): [True: 1.39k, False: 290]
  ------------------
 4661|       |    // TODO return Error(
 4662|  1.39k|  }
 4663|       |
 4664|  1.68k|  return err;
 4665|  1.76k|}
_ZNK8Box_dref4dumpER6Indent:
 4689|  1.66k|{
 4690|  1.66k|  std::ostringstream sstr;
 4691|  1.66k|  sstr << Box::dump(indent);
 4692|  1.66k|  sstr << dump_children(indent);
 4693|       |
 4694|  1.66k|  return sstr.str();
 4695|  1.66k|}
_ZN7Box_url5parseER14BitstreamRangePK20heif_security_limits:
 4699|  2.61k|{
 4700|  2.61k|  parse_full_box_header(range);
 4701|       |
 4702|  2.61k|  if (get_version() > 0) {
  ------------------
  |  Branch (4702:7): [True: 5, False: 2.60k]
  ------------------
 4703|      5|    return unsupported_version_error("url");
 4704|      5|  }
 4705|       |
 4706|  2.60k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4706:7): [True: 1.88k, False: 716]
  ------------------
 4707|       |    // data in same file
 4708|  1.88k|    m_location.clear();
 4709|  1.88k|  }
 4710|    716|  else {
 4711|    716|    m_location = range.read_string();
 4712|    716|  }
 4713|       |
 4714|  2.60k|  return range.get_error();
 4715|  2.61k|}
_ZNK7Box_url4dumpER6Indent:
 4736|  2.51k|{
 4737|  2.51k|  std::ostringstream sstr;
 4738|  2.51k|  sstr << Box::dump(indent);
 4739|       |  //sstr << dump_children(indent);
 4740|       |
 4741|  2.51k|  sstr << indent << "location: " << m_location << "\n";
 4742|       |
 4743|  2.51k|  return sstr.str();
 4744|  2.51k|}
_ZN8Box_udes5parseER14BitstreamRangePK20heif_security_limits:
 4748|  1.39k|{
 4749|  1.39k|  parse_full_box_header(range);
 4750|       |
 4751|  1.39k|  if (get_version() > 0) {
  ------------------
  |  Branch (4751:7): [True: 125, False: 1.26k]
  ------------------
 4752|    125|    return unsupported_version_error("udes");
 4753|    125|  }
 4754|       |
 4755|  1.26k|  m_lang = range.read_string();
 4756|  1.26k|  m_name = range.read_string();
 4757|  1.26k|  m_description = range.read_string();
 4758|  1.26k|  m_tags = range.read_string();
 4759|  1.26k|  return range.get_error();
 4760|  1.39k|}
_ZNK8Box_udes4dumpER6Indent:
 4763|  1.08k|{
 4764|  1.08k|  std::ostringstream sstr;
 4765|  1.08k|  sstr << Box::dump(indent);
 4766|  1.08k|  sstr << indent << "lang: " << m_lang << "\n";
 4767|  1.08k|  sstr << indent << "name: " << m_name << "\n";
 4768|  1.08k|  sstr << indent << "description: " << m_description << "\n";
 4769|  1.08k|  sstr << indent << "tags: " << m_tags << "\n";
 4770|  1.08k|  return sstr.str();
 4771|  1.08k|}
_ZNK8Box_cmin4dumpER6Indent:
 4819|  2.61k|{
 4820|  2.61k|  std::ostringstream sstr;
 4821|  2.61k|  sstr << Box::dump(indent);
 4822|  2.61k|  sstr << indent << "principal-point: " << m_matrix.principal_point_x << ", " << m_matrix.principal_point_y << "\n";
 4823|  2.61k|  if (m_matrix.is_anisotropic) {
  ------------------
  |  Branch (4823:7): [True: 427, False: 2.19k]
  ------------------
 4824|    427|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << ", " << m_matrix.focal_length_y << "\n";
 4825|    427|    sstr << indent << "skew: " << m_matrix.skew << "\n";
 4826|    427|  }
 4827|  2.19k|  else {
 4828|  2.19k|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << "\n";
 4829|  2.19k|    sstr << indent << "no skew\n";
 4830|  2.19k|  }
 4831|       |
 4832|  2.61k|  return sstr.str();
 4833|  2.61k|}
_ZN8Box_cmin5parseER14BitstreamRangePK20heif_security_limits:
 4837|  4.20k|{
 4838|  4.20k|  parse_full_box_header(range);
 4839|       |
 4840|  4.20k|  if (get_version() > 0) {
  ------------------
  |  Branch (4840:7): [True: 241, False: 3.96k]
  ------------------
 4841|    241|    return unsupported_version_error("cmin");
 4842|    241|  }
 4843|       |
 4844|  3.96k|  m_denominatorShift = (get_flags() & 0x1F00) >> 8;
 4845|  3.96k|  uint32_t denominator = (1U << m_denominatorShift);
 4846|       |
 4847|  3.96k|  m_matrix.focal_length_x = range.read32s() / (double)denominator;
 4848|  3.96k|  m_matrix.principal_point_x = range.read32s() / (double)denominator;
 4849|  3.96k|  m_matrix.principal_point_y = range.read32s() / (double)denominator;
 4850|       |
 4851|  3.96k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4851:7): [True: 567, False: 3.39k]
  ------------------
 4852|    567|    m_skewDenominatorShift = ((get_flags()) & 0x1F0000) >> 16;
 4853|    567|    uint32_t skewDenominator = (1U << m_skewDenominatorShift);
 4854|       |
 4855|    567|    m_matrix.focal_length_y = range.read32s() / (double)denominator;
 4856|    567|    m_matrix.skew = range.read32s() / (double)skewDenominator;
 4857|       |
 4858|    567|    m_matrix.is_anisotropic = true;
 4859|    567|  }
 4860|  3.39k|  else {
 4861|  3.39k|    m_matrix.is_anisotropic = false;
 4862|  3.39k|    m_matrix.focal_length_y = 0;
 4863|  3.39k|    m_matrix.skew = 0;
 4864|  3.39k|  }
 4865|  3.96k|  return range.get_error();
 4866|  4.20k|}
_ZN8Box_cmex5parseER14BitstreamRangePK20heif_security_limits:
 5024|  6.29k|{
 5025|  6.29k|  parse_full_box_header(range);
 5026|       |
 5027|  6.29k|  if (get_version() > 0) {
  ------------------
  |  Branch (5027:7): [True: 949, False: 5.34k]
  ------------------
 5028|    949|    return unsupported_version_error("cmex");
 5029|    949|  }
 5030|       |
 5031|  5.34k|  m_matrix = ExtrinsicMatrix{};
 5032|       |
 5033|  5.34k|  if (get_flags() & pos_x_present) {
  ------------------
  |  Branch (5033:7): [True: 4.06k, False: 1.28k]
  ------------------
 5034|  4.06k|    m_has_pos_x = true;
 5035|  4.06k|    m_matrix.pos_x = range.read32s();
 5036|  4.06k|  }
 5037|       |
 5038|  5.34k|  if (get_flags() & pos_y_present) {
  ------------------
  |  Branch (5038:7): [True: 4.49k, False: 849]
  ------------------
 5039|  4.49k|    m_has_pos_y = true;
 5040|  4.49k|    m_matrix.pos_y = range.read32s();
 5041|  4.49k|  }
 5042|       |
 5043|  5.34k|  if (get_flags() & pos_z_present) {
  ------------------
  |  Branch (5043:7): [True: 724, False: 4.62k]
  ------------------
 5044|    724|    m_has_pos_z = true;
 5045|    724|    m_matrix.pos_z = range.read32s();
 5046|    724|  }
 5047|       |
 5048|  5.34k|  if (get_flags() & orientation_present) {
  ------------------
  |  Branch (5048:7): [True: 1.41k, False: 3.93k]
  ------------------
 5049|  1.41k|    m_has_orientation = true;
 5050|       |
 5051|  1.41k|    if (get_version() == 0) {
  ------------------
  |  Branch (5051:9): [True: 1.41k, False: 0]
  ------------------
 5052|  1.41k|      bool use32bit = (get_flags() & rot_large_field_size);
 5053|  1.41k|      int32_t quat_x = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (5053:24): [True: 549, False: 867]
  ------------------
 5054|  1.41k|      int32_t quat_y = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (5054:24): [True: 549, False: 867]
  ------------------
 5055|  1.41k|      int32_t quat_z = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (5055:24): [True: 549, False: 867]
  ------------------
 5056|       |
 5057|  1.41k|      uint32_t div = 1U << (14 + (use32bit ? 16 : 0));
  ------------------
  |  Branch (5057:35): [True: 549, False: 867]
  ------------------
 5058|       |
 5059|  1.41k|      m_matrix.rotation_as_quaternions = true;
 5060|  1.41k|      m_matrix.quaternion_x = quat_x / (double)div;
 5061|  1.41k|      m_matrix.quaternion_y = quat_y / (double)div;
 5062|  1.41k|      m_matrix.quaternion_z = quat_z / (double)div;
 5063|       |
 5064|  1.41k|      double q_sum = (m_matrix.quaternion_x * m_matrix.quaternion_x +
 5065|  1.41k|                      m_matrix.quaternion_y * m_matrix.quaternion_y +
 5066|  1.41k|                      m_matrix.quaternion_z * m_matrix.quaternion_z);
 5067|       |
 5068|  1.41k|      if (q_sum > 1.0) {
  ------------------
  |  Branch (5068:11): [True: 313, False: 1.10k]
  ------------------
 5069|    313|        return Error(heif_error_Invalid_input,
 5070|    313|                     heif_suberror_Unspecified,
 5071|    313|                     "Invalid quaternion in extrinsic rotation matrix");
 5072|    313|      }
 5073|       |
 5074|  1.10k|      m_matrix.quaternion_w = sqrt(1 - q_sum);
 5075|       |
 5076|  1.10k|    } else if (get_version() == 1) {
  ------------------
  |  Branch (5076:16): [True: 0, False: 0]
  ------------------
 5077|      0|      uint32_t div = 1<<16;
 5078|      0|      m_matrix.rotation_yaw = range.read32s() / (double)div;
 5079|      0|      m_matrix.rotation_pitch = range.read32s() / (double)div;
 5080|      0|      m_matrix.rotation_roll = range.read32s() / (double)div;
 5081|      0|    }
 5082|  1.41k|  }
 5083|       |
 5084|  5.03k|  if (get_flags() & id_present) {
  ------------------
  |  Branch (5084:7): [True: 4.07k, False: 965]
  ------------------
 5085|  4.07k|    m_has_world_coordinate_system_id = true;
 5086|  4.07k|    m_matrix.world_coordinate_system_id = range.read32();
 5087|  4.07k|  }
 5088|       |
 5089|  5.03k|  return range.get_error();
 5090|  5.34k|}
_ZNK8Box_cmex4dumpER6Indent:
 5094|  3.50k|{
 5095|  3.50k|  std::ostringstream sstr;
 5096|  3.50k|  sstr << Box::dump(indent);
 5097|  3.50k|  sstr << indent << "camera position (um): ";
 5098|  3.50k|  sstr << m_matrix.pos_x << " ; ";
 5099|  3.50k|  sstr << m_matrix.pos_y << " ; ";
 5100|  3.50k|  sstr << m_matrix.pos_z << "\n";
 5101|       |
 5102|  3.50k|  sstr << indent << "orientation ";
 5103|  3.50k|  if (m_matrix.rotation_as_quaternions) {
  ------------------
  |  Branch (5103:7): [True: 3.50k, False: 0]
  ------------------
 5104|  3.50k|    sstr << "(quaterion)\n";
 5105|  3.50k|    sstr << indent << "  q = ["
 5106|  3.50k|         << m_matrix.quaternion_x << ";"
 5107|  3.50k|         << m_matrix.quaternion_y << ";"
 5108|  3.50k|         << m_matrix.quaternion_z << ";"
 5109|  3.50k|         << m_matrix.quaternion_w << "]\n";
 5110|  3.50k|  }
 5111|      0|  else {
 5112|      0|    sstr << "(angles)\n";
 5113|      0|    sstr << indent << "  yaw:   " << m_matrix.rotation_yaw << "\n";
 5114|      0|    sstr << indent << "  pitch: " << m_matrix.rotation_pitch << "\n";
 5115|      0|    sstr << indent << "  roll:  " << m_matrix.rotation_roll << "\n";
 5116|      0|  }
 5117|       |
 5118|  3.50k|  sstr << indent << "world coordinate system id: " << m_matrix.world_coordinate_system_id << "\n";
 5119|       |
 5120|  3.50k|  return sstr.str();
 5121|  3.50k|}
_ZN8Box_taic4dumpERK19heif_tai_clock_infoR6Indent:
 5261|  1.36k|{
 5262|  1.36k|  std::ostringstream sstr;
 5263|  1.36k|  sstr << indent << "time_uncertainty: ";
 5264|  1.36k|  if (info.time_uncertainty == heif_tai_clock_info_time_uncertainty_unknown) {
  ------------------
  |  |   52|  1.36k|#define heif_tai_clock_info_time_uncertainty_unknown UINT64_C(0xFFFFFFFFFFFFFFFF)
  ------------------
  |  Branch (5264:7): [True: 351, False: 1.01k]
  ------------------
 5265|    351|    sstr << "unknown\n";
 5266|    351|  }
 5267|  1.01k|  else {
 5268|  1.01k|    sstr << info.time_uncertainty << "\n";
 5269|  1.01k|  }
 5270|  1.36k|  sstr << indent << "clock_resolution: " << info.clock_resolution << "\n";
 5271|  1.36k|  sstr << indent << "clock_drift_rate: ";
 5272|  1.36k|  if (info.clock_drift_rate == heif_tai_clock_info_clock_drift_rate_unknown) {
  ------------------
  |  |   53|  1.36k|#define heif_tai_clock_info_clock_drift_rate_unknown INT32_C(0x7FFFFFFF)
  ------------------
  |  Branch (5272:7): [True: 194, False: 1.17k]
  ------------------
 5273|    194|    sstr << "undefined\n";
 5274|    194|  }
 5275|  1.17k|  else {
 5276|  1.17k|    sstr << info.clock_drift_rate << "\n";
 5277|  1.17k|  }
 5278|       |
 5279|  1.36k|  sstr << indent << "clock_type: " << int(info.clock_type) << " ";
 5280|  1.36k|  switch (info.clock_type) {
 5281|    728|    case heif_tai_clock_info_clock_type_unknown: sstr << "(unknown)\n"; break;
  ------------------
  |  |   54|    728|#define heif_tai_clock_info_clock_type_unknown 0
  ------------------
  |  Branch (5281:5): [True: 728, False: 637]
  ------------------
 5282|     28|    case heif_tai_clock_info_clock_type_synchronized_to_atomic_source: sstr << "(synchronized to atomic source)\n"; break;
  ------------------
  |  |   56|     28|#define heif_tai_clock_info_clock_type_synchronized_to_atomic_source 2
  ------------------
  |  Branch (5282:5): [True: 28, False: 1.33k]
  ------------------
 5283|     42|    case heif_tai_clock_info_clock_type_not_synchronized_to_atomic_source: sstr << "(not synchronized to atomic source)\n"; break;
  ------------------
  |  |   55|     42|#define heif_tai_clock_info_clock_type_not_synchronized_to_atomic_source 1
  ------------------
  |  Branch (5283:5): [True: 42, False: 1.32k]
  ------------------
 5284|    567|    default: sstr << "(illegal value)\n"; break;;
  ------------------
  |  Branch (5284:5): [True: 567, False: 798]
  ------------------
 5285|  1.36k|  }
 5286|  1.36k|  return sstr.str();
 5287|  1.36k|}
_ZNK8Box_taic4dumpER6Indent:
 5290|  1.36k|std::string Box_taic::dump(Indent& indent) const {
 5291|  1.36k|  std::ostringstream sstr;
 5292|  1.36k|  sstr << Box::dump(indent);
 5293|  1.36k|  sstr << dump(m_info, indent);
 5294|       |
 5295|  1.36k|  return sstr.str();
 5296|  1.36k|}
_ZN8Box_taic5parseER14BitstreamRangePK20heif_security_limits:
 5310|  1.47k|Error Box_taic::parse(BitstreamRange& range, const heif_security_limits*) {
 5311|  1.47k|  parse_full_box_header(range);
 5312|       |
 5313|  1.47k|  m_info.time_uncertainty = range.read64();
 5314|  1.47k|  m_info.clock_resolution = range.read32();
 5315|       |
 5316|  1.47k|  m_info.clock_drift_rate = range.read32s();
 5317|  1.47k|  m_info.clock_type = range.read8() >> 6;
 5318|  1.47k|  return range.get_error();
 5319|  1.47k|}
_ZNK8Box_itai4dumpER6Indent:
 5343|    501|std::string Box_itai::dump(Indent& indent) const {
 5344|    501|  std::ostringstream sstr;
 5345|    501|  sstr << Box::dump(indent);
 5346|    501|  sstr << indent << "tai_timestamp: " << m_timestamp.tai_timestamp << "\n";
 5347|    501|  sstr << indent << "synchronization_state: " << int(m_timestamp.synchronization_state) << "\n";
 5348|    501|  sstr << indent << "timestamp_generation_failure: " << int(m_timestamp.timestamp_generation_failure) << "\n";
 5349|    501|  sstr << indent << "timestamp_is_modified: " << int(m_timestamp.timestamp_is_modified) << "\n";
 5350|    501|  return sstr.str();
 5351|    501|}
_ZN8Box_itai5parseER14BitstreamRangePK20heif_security_limits:
 5438|    518|Error Box_itai::parse(BitstreamRange& range, const heif_security_limits*) {
 5439|    518|  parse_full_box_header(range);
 5440|       |
 5441|    518|  m_timestamp.version = 1;
 5442|    518|  m_timestamp.tai_timestamp = range.read64();
 5443|       |
 5444|    518|  uint8_t status_bits = range.read8();
 5445|       |
 5446|    518|  m_timestamp.synchronization_state = !!(status_bits & 0x80);
 5447|    518|  m_timestamp.timestamp_generation_failure = !!(status_bits & 0x40);
 5448|    518|  m_timestamp.timestamp_is_modified = !!(status_bits & 0x20);
 5449|       |
 5450|    518|  return range.get_error();
 5451|    518|}
_ZN8Box_elng5parseER14BitstreamRangePK20heif_security_limits:
 5454|    651|{
 5455|    651|  parse_full_box_header(range);
 5456|       |
 5457|    651|  if (get_version() > 0) {
  ------------------
  |  Branch (5457:7): [True: 41, False: 610]
  ------------------
 5458|     41|    return unsupported_version_error("elng");
 5459|     41|  }
 5460|       |
 5461|    610|  m_lang = range.read_string();
 5462|    610|  return range.get_error();
 5463|    651|}
_ZNK8Box_elng4dumpER6Indent:
 5466|    571|{
 5467|    571|  std::ostringstream sstr;
 5468|    571|  sstr << Box::dump(indent);
 5469|    571|  sstr << indent << "extended_language: " << m_lang << "\n";
 5470|    571|  return sstr.str();
 5471|    571|}
_ZN19Box_gimi_content_id5parseER14BitstreamRangePK20heif_security_limits:
 5483|  2.01k|{
 5484|  2.01k|  m_content_id = range.read_string_until_eof();
 5485|       |
 5486|  2.01k|  return range.get_error();
 5487|  2.01k|}
_ZNK19Box_gimi_content_id4dumpER6Indent:
 5503|  1.98k|{
 5504|  1.98k|  std::ostringstream sstr;
 5505|  1.98k|  sstr << Box::dump(indent);
 5506|       |
 5507|  1.98k|  sstr << indent << "content ID: " << m_content_id << "\n";
 5508|       |
 5509|  1.98k|  return sstr.str();
 5510|  1.98k|}

_ZNK9BoxHeader12get_box_sizeEv:
  124|  2.74M|  uint64_t get_box_size() const { return m_size; }
_ZNK9BoxHeader18has_fixed_box_sizeEv:
  126|  1.13M|  bool has_fixed_box_size() const { return m_size != 0; }
_ZNK9BoxHeader15get_header_sizeEv:
  128|  2.24M|  uint32_t get_header_size() const { return m_header_size; }
_ZNK9BoxHeader14get_short_typeEv:
  130|   783k|  uint32_t get_short_type() const { return m_type; }
_ZNK9BoxHeader14debug_box_nameEv:
  136|   205k|  virtual const char* debug_box_name() const { return nullptr; }
_ZN9BoxHeader14set_short_typeEj:
  138|   575k|  void set_short_type(uint32_t type) { m_type = type; }
_ZN3Box16set_short_headerERK9BoxHeader:
  188|   487k|  {
  189|   487k|    *(BoxHeader*) this = hdr;
  190|   487k|  }
_ZN3Box19set_output_positionEm:
  267|  16.4k|  void set_output_position(uint64_t pos) { m_output_position = pos; }
_ZNK3Box24get_parse_error_fatalityEv:
  269|  7.49k|  virtual parse_error_fatality get_parse_error_fatality() const { return parse_error_fatality::fatal; }
_ZNK7FullBox11get_versionEv:
  327|   651k|  uint8_t get_version() const { return m_version; }
_ZNK7FullBox9get_flagsEv:
  331|  1.17M|  uint32_t get_flags() const { return m_flags; }
_ZN7FullBox9set_flagsEj:
  333|  5.06k|  void set_flags(uint32_t flags) { m_flags = flags; }
_ZN9Box_otherC2Ej:
  355|   146k|  {
  356|   146k|    set_short_type(short_type);
  357|   146k|  }
_ZN9Box_ErrorC2Ej5Error20parse_error_fatality:
  379|  19.1k|  {
  380|  19.1k|    set_short_type(fourcc("ERR "));
  381|       |
  382|  19.1k|    m_box_type_with_parse_error = box4cc;
  383|  19.1k|    m_error = std::move(err);
  384|  19.1k|    m_fatality = fatality;
  385|  19.1k|  }
_ZN8Box_ftypC2Ev:
  410|  44.6k|  {
  411|  44.6k|    set_short_type(fourcc("ftyp"));
  412|  44.6k|  }
_ZNK8Box_ftyp14debug_box_nameEv:
  416|  10.3k|  const char* debug_box_name() const override { return "File Type"; }
_ZN8Box_freeC2Ev:
  450|    828|  {
  451|    828|    set_short_type(fourcc("free"));
  452|    828|  }
_ZNK8Box_free14debug_box_nameEv:
  456|    670|  const char* debug_box_name() const override { return "Free Space"; }
_ZN8Box_metaC2Ev:
  469|  3.27k|  {
  470|  3.27k|    set_short_type(fourcc("meta"));
  471|  3.27k|  }
_ZNK8Box_meta14debug_box_nameEv:
  475|  2.86k|  const char* debug_box_name() const override { return "Metadata"; }
_ZN8Box_hdlrC2Ev:
  486|  3.96k|  {
  487|  3.96k|    set_short_type(fourcc("hdlr"));
  488|  3.96k|  }
_ZNK8Box_hdlr14debug_box_nameEv:
  492|  2.72k|  const char* debug_box_name() const override { return "Handler Reference"; }
_ZN8Box_pitmC2Ev:
  517|  3.67k|  {
  518|  3.67k|    set_short_type(fourcc("pitm"));
  519|  3.67k|  }
_ZNK8Box_pitm14debug_box_nameEv:
  523|  3.38k|  const char* debug_box_name() const override { return "Primary Item"; }
_ZNK8Box_iloc14debug_box_nameEv:
  552|  1.85k|  const char* debug_box_name() const override { return "Item Location"; }
_ZN8Box_infeC2Ev:
  647|  4.74k|  {
  648|  4.74k|    set_short_type(fourcc("infe"));
  649|  4.74k|  }
_ZNK8Box_infe14debug_box_nameEv:
  653|  4.17k|  const char* debug_box_name() const override { return "Item Info Entry"; }
_ZN8Box_iinfC2Ev:
  709|  4.17k|  {
  710|  4.17k|    set_short_type(fourcc("iinf"));
  711|  4.17k|  }
_ZNK8Box_iinf14debug_box_nameEv:
  715|  3.83k|  const char* debug_box_name() const override { return "Item Information"; }
_ZN8Box_iprpC2Ev:
  733|  32.1k|  {
  734|  32.1k|    set_short_type(fourcc("iprp"));
  735|  32.1k|  }
_ZNK8Box_iprp14debug_box_nameEv:
  739|  30.4k|  const char* debug_box_name() const override { return "Item Properties"; }
_ZN8Box_ipcoC2Ev:
  750|  12.0k|  {
  751|  12.0k|    set_short_type(fourcc("ipco"));
  752|  12.0k|  }
_ZNK8Box_ipco14debug_box_nameEv:
  770|  10.7k|  const char* debug_box_name() const override { return "Item Property Container"; }
_ZN8Box_ispeC2Ev:
  781|  3.08k|  {
  782|  3.08k|    set_short_type(fourcc("ispe"));
  783|  3.08k|  }
_ZNK8Box_ispe14debug_box_nameEv:
  797|  2.57k|  const char* debug_box_name() const override { return "Image Spatial Extents"; }
_ZN8Box_ipmaC2Ev:
  819|  3.11k|  {
  820|  3.11k|    set_short_type(fourcc("ipma"));
  821|  3.11k|  }
_ZNK8Box_ipma14debug_box_nameEv:
  825|  2.74k|  const char* debug_box_name() const override { return "Item Property Association"; }
_ZN8Box_auxCC2Ev:
  866|  1.01k|  {
  867|  1.01k|    set_short_type(fourcc("auxC"));
  868|  1.01k|  }
_ZNK8Box_auxC14debug_box_nameEv:
  880|    748|  const char* debug_box_name() const override { return "Image Properties for Auxiliary Images"; }
_ZN8Box_irotC2Ev:
  897|  11.6k|  {
  898|  11.6k|    set_short_type(fourcc("irot"));
  899|  11.6k|  }
_ZNK8Box_irot14debug_box_nameEv:
  907|  7.82k|  const char* debug_box_name() const override { return "Image Rotation"; }
_ZNK8Box_irot24get_parse_error_fatalityEv:
  914|     70|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_imirC2Ev:
  930|  2.87k|  {
  931|  2.87k|    set_short_type(fourcc("imir"));
  932|  2.87k|  }
_ZNK8Box_imir14debug_box_nameEv:
  944|  2.02k|  const char* debug_box_name() const override { return "Image Mirroring"; }
_ZNK8Box_imir24get_parse_error_fatalityEv:
  946|    628|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_isclC2Ev:
  962|    669|  {
  963|    669|    set_short_type(fourcc("iscl"));
  964|    669|  }
_ZNK8Box_iscl14debug_box_nameEv:
  985|    341|  const char* debug_box_name() const override { return "Image Scaling"; }
_ZNK8Box_iscl24get_parse_error_fatalityEv:
  987|    283|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_clapC2Ev:
 1006|  4.72k|  {
 1007|  4.72k|    set_short_type(fourcc("clap"));
 1008|  4.72k|  }
_ZNK8Box_clap14debug_box_nameEv:
 1016|    376|  const char* debug_box_name() const override { return "Clean Aperture"; }
_ZNK8Box_clap24get_parse_error_fatalityEv:
 1044|  4.16k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_irefC2Ev:
 1063|  15.6k|  {
 1064|  15.6k|    set_short_type(fourcc("iref"));
 1065|  15.6k|  }
_ZNK8Box_iref14debug_box_nameEv:
 1078|  13.3k|  const char* debug_box_name() const override { return "Item Reference"; }
_ZN8Box_rrefC2Ev:
 1108|    713|  {
 1109|    713|    set_short_type(fourcc("rref"));
 1110|    713|  }
_ZNK8Box_rref14debug_box_nameEv:
 1116|    669|  const char* debug_box_name() const override { return "Required Reference Types"; }
_ZNK8Box_idat14debug_box_nameEv:
 1141|  5.98k|  const char* debug_box_name() const override { return "Item Data"; }
_ZN8Box_grplC2Ev:
 1174|  1.62k|  {
 1175|  1.62k|    set_short_type(fourcc("grpl"));
 1176|  1.62k|  }
_ZNK8Box_grpl14debug_box_nameEv:
 1180|  1.30k|  const char* debug_box_name() const override { return "Groups List"; }
_ZN8Box_sterC2Ev:
 1216|    552|  {
 1217|    552|    set_short_type(fourcc("ster"));
 1218|    552|  }
_ZNK8Box_ster14debug_box_nameEv:
 1222|    481|  const char* debug_box_name() const override { return "Stereo pair"; }
_ZN8Box_pymdC2Ev:
 1237|  1.57k|  {
 1238|  1.57k|    set_short_type(fourcc("pymd"));
 1239|  1.57k|  }
_ZNK8Box_pymd14debug_box_nameEv:
 1243|  1.16k|  const char* debug_box_name() const override { return "Image pyramid group"; }
_ZNK8Box_pymd24get_parse_error_fatalityEv:
 1266|    248|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_dinfC2Ev:
 1284|  7.63k|  {
 1285|  7.63k|    set_short_type(fourcc("dinf"));
 1286|  7.63k|  }
_ZNK8Box_dinf14debug_box_nameEv:
 1290|  6.88k|  const char* debug_box_name() const override { return "Data Information"; }
_ZN8Box_drefC2Ev:
 1301|  1.79k|  {
 1302|  1.79k|    set_short_type(fourcc("dref"));
 1303|  1.79k|  }
_ZNK8Box_dref14debug_box_nameEv:
 1307|  1.66k|  const char* debug_box_name() const override { return "Data Reference"; }
_ZN7Box_urlC2Ev:
 1320|  2.61k|  {
 1321|  2.61k|    set_short_type(fourcc("url "));
 1322|  2.61k|    set_flags(1);
 1323|  2.61k|  }
_ZNK7Box_url14debug_box_nameEv:
 1327|  2.51k|  const char* debug_box_name() const override { return "Data Entry URL"; }
_ZN8Box_pixiC2Ev:
 1347|  3.67k|  {
 1348|  3.67k|    set_short_type(fourcc("pixi"));
 1349|  3.67k|  }
_ZNK8Box_pixi14debug_box_nameEv:
 1368|  2.40k|  const char* debug_box_name() const override { return "Pixel Information"; }
_ZNK8Box_pixi24get_parse_error_fatalityEv:
 1372|    722|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_paspC2Ev:
 1386|  16.0k|  {
 1387|  16.0k|    set_short_type(fourcc("pasp"));
 1388|  16.0k|  }
_ZNK8Box_pasp14debug_box_nameEv:
 1395|  13.2k|  const char* debug_box_name() const override { return "Pixel Aspect Ratio"; }
_ZNK8Box_pasp24get_parse_error_fatalityEv:
 1399|    554|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_lselC2Ev:
 1410|  7.72k|  {
 1411|  7.72k|    set_short_type(fourcc("lsel"));
 1412|  7.72k|  }
_ZNK8Box_lsel14debug_box_nameEv:
 1418|  6.49k|  const char* debug_box_name() const override { return "Layer Selection"; }
_ZNK8Box_lsel24get_parse_error_fatalityEv:
 1422|    356|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_clliC2Ev:
 1433|  15.8k|  {
 1434|  15.8k|    set_short_type(fourcc("clli"));
 1435|       |
 1436|  15.8k|    clli.max_content_light_level = 0;
 1437|  15.8k|    clli.max_pic_average_light_level = 0;
 1438|  15.8k|  }
_ZNK8Box_clli14debug_box_nameEv:
 1444|  1.29k|  const char* debug_box_name() const override { return "Content Light Level Information"; }
_ZNK8Box_clli24get_parse_error_fatalityEv:
 1448|     98|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_mdcv14debug_box_nameEv:
 1464|  5.71k|  const char* debug_box_name() const override { return "Master Display Colour Volume"; }
_ZNK8Box_mdcv24get_parse_error_fatalityEv:
 1468|    505|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_amve14debug_box_nameEv:
 1484|    221|  const char* debug_box_name() const override { return "Ambient Viewing Environment"; }
_ZNK8Box_amve24get_parse_error_fatalityEv:
 1488|    402|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_ndwtC2Ev:
 1499|  10.8k|  {
 1500|  10.8k|    set_short_type(fourcc("ndwt"));
 1501|  10.8k|  }
_ZNK8Box_ndwt27get_diffuse_white_luminanceEv:
 1505|  5.78k|  uint32_t get_diffuse_white_luminance() const { return m_diffuse_white_luminance; }
_ZN8Box_ndwt27set_diffuse_white_luminanceEj:
 1507|  10.1k|  void set_diffuse_white_luminance(uint32_t luminance) { m_diffuse_white_luminance = luminance; }
_ZNK8Box_ndwt14debug_box_nameEv:
 1511|    533|  const char* debug_box_name() const override { return "Nominal Diffuse White"; }
_ZNK8Box_ndwt24get_parse_error_fatalityEv:
 1515|     74|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_cclv23ccv_primaries_are_validEv:
 1530|  12.9k|  bool ccv_primaries_are_valid() const { return m_ccv_primaries_valid; }
_ZNK8Box_cclv18get_ccv_primary_x0Ev:
 1531|    783|  int32_t get_ccv_primary_x0() const { return m_ccv_primaries_x[0]; }
_ZNK8Box_cclv18get_ccv_primary_y0Ev:
 1532|    783|  int32_t get_ccv_primary_y0() const { return m_ccv_primaries_y[0]; }
_ZNK8Box_cclv18get_ccv_primary_x1Ev:
 1533|    783|  int32_t get_ccv_primary_x1() const { return m_ccv_primaries_x[1]; }
_ZNK8Box_cclv18get_ccv_primary_y1Ev:
 1534|    783|  int32_t get_ccv_primary_y1() const { return m_ccv_primaries_y[1]; }
_ZNK8Box_cclv18get_ccv_primary_x2Ev:
 1535|    783|  int32_t get_ccv_primary_x2() const { return m_ccv_primaries_x[2]; }
_ZNK8Box_cclv18get_ccv_primary_y2Ev:
 1536|    783|  int32_t get_ccv_primary_y2() const { return m_ccv_primaries_y[2]; }
_ZNK8Box_cclv22min_luminance_is_validEv:
 1539|  12.9k|  bool min_luminance_is_valid() const { return m_ccv_min_luminance_value.has_value(); }
_ZNK8Box_cclv17get_min_luminanceEv:
 1540|  1.10k|  uint32_t get_min_luminance() const { return *m_ccv_min_luminance_value; }
_ZN8Box_cclv17set_min_luminanceEj:
 1541|  1.43k|  void set_min_luminance(uint32_t luminance) { m_ccv_min_luminance_value = luminance; }
_ZNK8Box_cclv22max_luminance_is_validEv:
 1543|  12.9k|  bool max_luminance_is_valid() const { return m_ccv_max_luminance_value.has_value(); }
_ZNK8Box_cclv17get_max_luminanceEv:
 1544|  2.53k|  uint32_t get_max_luminance() const { return *m_ccv_max_luminance_value; }
_ZN8Box_cclv17set_max_luminanceEj:
 1545|  4.10k|  void set_max_luminance(uint32_t luminance) { m_ccv_max_luminance_value = luminance; }
_ZNK8Box_cclv22avg_luminance_is_validEv:
 1547|  12.9k|  bool avg_luminance_is_valid() const { return m_ccv_avg_luminance_value.has_value(); }
_ZNK8Box_cclv17get_avg_luminanceEv:
 1548|  1.07k|  uint32_t get_avg_luminance() const { return *m_ccv_avg_luminance_value; }
_ZN8Box_cclv17set_avg_luminanceEj:
 1549|  1.37k|  void set_avg_luminance(uint32_t luminance) { m_ccv_avg_luminance_value = luminance; }
_ZN8Box_cminC2Ev:
 1577|  4.20k|  {
 1578|  4.20k|    set_short_type(fourcc("cmin"));
 1579|  4.20k|  }
_ZNK8Box_cmin14debug_box_nameEv:
 1634|  2.61k|  const char* debug_box_name() const override { return "Camera Intrinsic Matrix"; }
_ZNK8Box_cmin24get_parse_error_fatalityEv:
 1640|  1.04k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_cmexC2Ev:
 1659|  6.30k|  {
 1660|  6.30k|    set_short_type(fourcc("cmex"));
 1661|  6.30k|  }
_ZNK8Box_cmex14debug_box_nameEv:
 1691|  3.50k|  const char* debug_box_name() const override { return "Camera Extrinsic Matrix"; }
_ZNK8Box_cmex24get_parse_error_fatalityEv:
 1697|  2.04k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_udesC2Ev:
 1739|  1.39k|  {
 1740|  1.39k|    set_short_type(fourcc("udes"));
 1741|  1.39k|  }
_ZNK8Box_udes14debug_box_nameEv:
 1745|  1.08k|  const char* debug_box_name() const override { return "User Description"; }
_ZNK8Box_udes24get_parse_error_fatalityEv:
 1811|    203|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_taicC2Ev:
 1832|  1.47k|  {
 1833|  1.47k|    set_short_type(fourcc("taic"));
 1834|  1.47k|    initialize_heif_tai_clock_info(&m_info);
 1835|  1.47k|  }
_ZNK8Box_taic14debug_box_nameEv:
 1841|  1.36k|  const char* debug_box_name() const override { return "TAI Clock Information"; }
_ZN8Box_itaiC2Ev:
 1912|    521|  {
 1913|    521|    set_short_type(fourcc("itai"));
 1914|    521|    initialize_heif_tai_timestamp_packet(&m_timestamp);
 1915|    521|  }
_ZNK8Box_itai14debug_box_nameEv:
 1919|    501|  const char* debug_box_name() const override { return "Item TAI Timestamp"; }
_ZN19Box_gimi_content_idC2Ev:
 1977|  2.01k|  {
 1978|  2.01k|    set_uuid_type(std::vector<uint8_t>{0x26, 0x1e, 0xf3, 0x74, 0x1d, 0x97, 0x5b, 0xba, 0xac, 0xbd, 0x9d, 0x2c, 0x8e, 0xa7, 0x35, 0x22});
 1979|  2.01k|  }
_ZNK19Box_gimi_content_id14debug_box_nameEv:
 1987|  1.98k|  const char* debug_box_name() const override { return "GIMI Content ID"; }
_ZN8Box_elngC2Ev:
 2020|    652|  {
 2021|    652|    set_short_type(fourcc("elng"));
 2022|    652|  }
_ZNK8Box_elng14debug_box_nameEv:
 2026|    571|  const char* debug_box_name() const override { return "Extended language"; }
_ZNK8Box_elng24get_parse_error_fatalityEv:
 2046|     44|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN9BoxHeaderD2Ev:
  120|  1.12M|  virtual ~BoxHeader() = default;
_ZN3BoxC2Ev:
  185|   588k|  Box() = default;
_ZN8FractionC2Ev:
   66|  18.9k|  Fraction() = default;

_ZN8Box_avcC5parseER14BitstreamRangePK20heif_security_limits:
   35|  4.66k|{
   36|  4.66k|  m_configuration.configuration_version = range.read8();
   37|  4.66k|  m_configuration.AVCProfileIndication = range.read8();
   38|  4.66k|  m_configuration.profile_compatibility = range.read8();
   39|  4.66k|  m_configuration.AVCLevelIndication = range.read8();
   40|  4.66k|  uint8_t lengthSizeMinusOneWithReserved = range.read8();
   41|  4.66k|  m_configuration.lengthSize =
   42|  4.66k|      (lengthSizeMinusOneWithReserved & 0b00000011) + 1;
   43|       |
   44|  4.66k|  uint8_t numOfSequenceParameterSets = (range.read8() & 0b00011111);
   45|  7.27k|  for (int i = 0; i < numOfSequenceParameterSets; i++) {
  ------------------
  |  Branch (45:19): [True: 2.61k, False: 4.66k]
  ------------------
   46|  2.61k|    uint16_t sequenceParameterSetLength = range.read16();
   47|  2.61k|    std::vector<uint8_t> sps(sequenceParameterSetLength);
   48|  2.61k|    range.read(sps.data(), sps.size());
   49|  2.61k|    m_sps.push_back(sps);
   50|  2.61k|  }
   51|       |
   52|  4.66k|  uint8_t numOfPictureParameterSets = range.read8();
   53|  8.90k|  for (int i = 0; i < numOfPictureParameterSets; i++) {
  ------------------
  |  Branch (53:19): [True: 4.24k, False: 4.66k]
  ------------------
   54|  4.24k|    uint16_t pictureParameterSetLength = range.read16();
   55|  4.24k|    std::vector<uint8_t> pps(pictureParameterSetLength);
   56|  4.24k|    range.read(pps.data(), pps.size());
   57|  4.24k|    m_pps.push_back(pps);
   58|  4.24k|  }
   59|       |
   60|       |  // See ISO/IEC 14496-15 2017 Section 5.3.3.1.2
   61|  4.66k|  if (range.get_remaining_bytes() > 0) {
  ------------------
  |  Branch (61:7): [True: 1.65k, False: 3.00k]
  ------------------
   62|  1.65k|    if ((m_configuration.AVCProfileIndication != 66) &&
  ------------------
  |  Branch (62:9): [True: 1.51k, False: 144]
  ------------------
   63|  1.51k|        (m_configuration.AVCProfileIndication != 77) &&
  ------------------
  |  Branch (63:9): [True: 1.29k, False: 222]
  ------------------
   64|  1.29k|        (m_configuration.AVCProfileIndication != 88)) {
  ------------------
  |  Branch (64:9): [True: 1.18k, False: 111]
  ------------------
   65|  1.18k|      m_configuration.chroma_format = (heif_chroma) (range.read8() & 0b00000011);
   66|  1.18k|      m_configuration.bit_depth_luma = 8 + (range.read8() & 0b00000111);
   67|  1.18k|      m_configuration.bit_depth_chroma = 8 + (range.read8() & 0b00000111);
   68|  1.18k|      uint8_t numOfSequenceParameterSetExt = range.read8();
   69|  7.33k|      for (int i = 0; i < numOfSequenceParameterSetExt; i++) {
  ------------------
  |  Branch (69:23): [True: 6.15k, False: 1.18k]
  ------------------
   70|  6.15k|        uint16_t sequenceParameterSetExtLength = range.read16();
   71|  6.15k|        std::vector<uint8_t> sps_ext(sequenceParameterSetExtLength);
   72|  6.15k|        range.read(sps_ext.data(), sps_ext.size());
   73|  6.15k|        m_sps_ext.push_back(sps_ext);
   74|  6.15k|      }
   75|  1.18k|    }
   76|  1.65k|  }
   77|       |
   78|  4.66k|  return range.get_error();
   79|  4.66k|}
_ZNK8Box_avcC4dumpER6Indent:
  170|  4.33k|{
  171|  4.33k|  std::ostringstream sstr;
  172|  4.33k|  sstr << Box::dump(indent);
  173|  4.33k|  sstr << indent << "configuration_version: " << ((int) m_configuration.configuration_version) << "\n"
  174|  4.33k|      << indent << "AVCProfileIndication: " << ((int) m_configuration.AVCProfileIndication) << " (" << profileIndicationAsText() << ")\n"
  175|  4.33k|      << indent << "profile_compatibility: " << ((int) m_configuration.profile_compatibility) << "\n"
  176|  4.33k|      << indent << "AVCLevelIndication: " << ((int) m_configuration.AVCLevelIndication) << "\n"
  177|  4.33k|      << indent << "Chroma format: ";
  178|       |
  179|  4.33k|  switch (m_configuration.chroma_format) {
  180|  1.01k|    case heif_chroma_monochrome:
  ------------------
  |  |   75|  1.01k|#define heif_chroma_monochrome heif_chroma_planar
  ------------------
  |  Branch (180:5): [True: 1.01k, False: 3.32k]
  ------------------
  181|  1.01k|      sstr << "4:0:0\n";
  182|  1.01k|      break;
  183|  3.24k|    case heif_chroma_420:
  ------------------
  |  Branch (183:5): [True: 3.24k, False: 1.08k]
  ------------------
  184|  3.24k|      sstr << "4:2:0\n";
  185|  3.24k|      break;
  186|     31|    case heif_chroma_422:
  ------------------
  |  Branch (186:5): [True: 31, False: 4.30k]
  ------------------
  187|     31|      sstr << "4:2:2\n";
  188|     31|      break;
  189|     47|    case heif_chroma_444:
  ------------------
  |  Branch (189:5): [True: 47, False: 4.28k]
  ------------------
  190|     47|      sstr << "4:4:4\n";
  191|     47|      break;
  192|      0|    default:
  ------------------
  |  Branch (192:5): [True: 0, False: 4.33k]
  ------------------
  193|      0|      sstr << "unsupported\n";
  194|      0|      break;
  195|  4.33k|  }
  196|       |
  197|  4.33k|  sstr << indent << "Bit depth luma: " << ((int) m_configuration.bit_depth_luma) << "\n"
  198|  4.33k|      << indent << "Bit depth chroma: " << ((int) m_configuration.bit_depth_chroma) << "\n";
  199|       |
  200|  4.33k|  for (const auto& sps : m_sps) {
  ------------------
  |  Branch (200:24): [True: 1.94k, False: 4.33k]
  ------------------
  201|  1.94k|    sstr << indent << "SPS: ";
  202|   619k|    for (uint8_t b : sps) {
  ------------------
  |  Branch (202:20): [True: 619k, False: 1.94k]
  ------------------
  203|   619k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  204|   619k|    }
  205|  1.94k|    sstr << "\n";
  206|  1.94k|    sstr << std::dec;
  207|  1.94k|  }
  208|       |
  209|  4.33k|  for (const auto& spsext : m_sps_ext) {
  ------------------
  |  Branch (209:27): [True: 2.75k, False: 4.33k]
  ------------------
  210|  2.75k|    sstr << indent << "SPS-EXT: ";
  211|  5.86k|    for (uint8_t b : spsext) {
  ------------------
  |  Branch (211:20): [True: 5.86k, False: 2.75k]
  ------------------
  212|  5.86k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  213|  5.86k|    }
  214|  2.75k|    sstr << "\n";
  215|  2.75k|    sstr << std::dec;
  216|  2.75k|  }
  217|       |
  218|  4.33k|  for (const auto& pps : m_pps) {
  ------------------
  |  Branch (218:24): [True: 2.04k, False: 4.33k]
  ------------------
  219|  2.04k|    sstr << indent << "PPS: ";
  220|   310k|    for (uint8_t b : pps) {
  ------------------
  |  Branch (220:20): [True: 310k, False: 2.04k]
  ------------------
  221|   310k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  222|   310k|    }
  223|  2.04k|    sstr << "\n";
  224|  2.04k|    sstr << std::dec;
  225|  2.04k|  }
  226|       |
  227|  4.33k|  return sstr.str();
  228|  4.33k|}
_ZNK8Box_avcC23profileIndicationAsTextEv:
  231|  4.33k|{
  232|       |  // See ISO/IEC 14496-10:2022 Annex A
  233|  4.33k|  switch (m_configuration.AVCProfileIndication) {
  234|    486|    case 44:
  ------------------
  |  Branch (234:5): [True: 486, False: 3.84k]
  ------------------
  235|    486|      return "CALVC 4:4:4";
  236|    393|    case 66:
  ------------------
  |  Branch (236:5): [True: 393, False: 3.94k]
  ------------------
  237|    393|      return "Constrained Baseline";
  238|  2.04k|    case 77:
  ------------------
  |  Branch (238:5): [True: 2.04k, False: 2.29k]
  ------------------
  239|  2.04k|      return "Main";
  240|    425|    case 88:
  ------------------
  |  Branch (240:5): [True: 425, False: 3.90k]
  ------------------
  241|    425|      return "Extended";
  242|    162|    case 100:
  ------------------
  |  Branch (242:5): [True: 162, False: 4.17k]
  ------------------
  243|    162|      return "High variant";
  244|     72|    case 110:
  ------------------
  |  Branch (244:5): [True: 72, False: 4.26k]
  ------------------
  245|     72|      return "High 10";
  246|    201|    case 122:
  ------------------
  |  Branch (246:5): [True: 201, False: 4.13k]
  ------------------
  247|    201|      return "High 4:2:2";
  248|    212|    case 244:
  ------------------
  |  Branch (248:5): [True: 212, False: 4.12k]
  ------------------
  249|    212|      return "High 4:4:4";
  250|    340|    default:
  ------------------
  |  Branch (250:5): [True: 340, False: 3.99k]
  ------------------
  251|    340|      return "Unknown";
  252|  4.33k|  }
  253|  4.33k|}

_ZN8Box_avcCC2Ev:
   36|  4.66k|  Box_avcC() { set_short_type(fourcc("avcC")); }
_ZN8Box_avc1C2Ev:
  111|     67|  {
  112|     67|    set_short_type(fourcc("avc1"));
  113|     67|  }

_ZN8Box_av1C5parseER14BitstreamRangePK20heif_security_limits:
   37|  3.88k|{
   38|       |  //parse_full_box_header(range);
   39|       |
   40|  3.88k|  if (!has_fixed_box_size()) {
  ------------------
  |  Branch (40:7): [True: 1, False: 3.88k]
  ------------------
   41|       |    // Note: in theory, it is allowed to have an av1C box with unspecified size (until the end of the file),
   42|       |    // but that would be very uncommon and give us problems in the calculation of `configOBUs_bytes` below.
   43|       |    // It's better to error on this case than to open a DoS vulnerability.
   44|      1|    return Error{heif_error_Invalid_input, heif_suberror_Unspecified, "av1C with unspecified box size"};
   45|      1|  }
   46|       |
   47|  3.88k|  uint8_t byte;
   48|       |
   49|  3.88k|  auto& c = m_configuration; // abbreviation
   50|       |
   51|  3.88k|  byte = range.read8();
   52|  3.88k|  if ((byte & 0x80) == 0) {
  ------------------
  |  Branch (52:7): [True: 1.67k, False: 2.20k]
  ------------------
   53|       |    // error: marker bit not set
   54|  1.67k|  }
   55|       |
   56|  3.88k|  c.version = byte & 0x7F;
   57|       |
   58|  3.88k|  byte = range.read8();
   59|  3.88k|  c.seq_profile = (byte >> 5) & 0x7;
   60|  3.88k|  c.seq_level_idx_0 = byte & 0x1f;
   61|       |
   62|  3.88k|  byte = range.read8();
   63|  3.88k|  c.seq_tier_0 = (byte >> 7) & 1;
   64|  3.88k|  c.high_bitdepth = (byte >> 6) & 1;
   65|  3.88k|  c.twelve_bit = (byte >> 5) & 1;
   66|  3.88k|  c.monochrome = (byte >> 4) & 1;
   67|  3.88k|  c.chroma_subsampling_x = (byte >> 3) & 1;
   68|  3.88k|  c.chroma_subsampling_y = (byte >> 2) & 1;
   69|  3.88k|  c.chroma_sample_position = byte & 3;
   70|       |
   71|  3.88k|  byte = range.read8();
   72|  3.88k|  c.initial_presentation_delay_present = (byte >> 4) & 1;
   73|  3.88k|  if (c.initial_presentation_delay_present) {
  ------------------
  |  Branch (73:7): [True: 332, False: 3.55k]
  ------------------
   74|    332|    c.initial_presentation_delay_minus_one = byte & 0x0F;
   75|    332|  }
   76|       |
   77|  3.88k|  const size_t configOBUs_bytes = range.get_remaining_bytes();
   78|  3.88k|  m_config_OBUs.resize(configOBUs_bytes);
   79|       |
   80|  3.88k|  if (!range.read(m_config_OBUs.data(), configOBUs_bytes)) {
  ------------------
  |  Branch (80:7): [True: 0, False: 3.88k]
  ------------------
   81|       |    // error
   82|      0|  }
   83|       |
   84|  3.88k|  return range.get_error();
   85|  3.88k|}
_ZNK8Box_av1C4dumpER6Indent:
  116|  3.50k|{
  117|  3.50k|  std::ostringstream sstr;
  118|  3.50k|  sstr << Box::dump(indent);
  119|       |
  120|  3.50k|  const auto& c = m_configuration; // abbreviation
  121|       |
  122|  3.50k|  sstr << indent << "version: " << ((int) c.version) << "\n"
  123|  3.50k|       << indent << "seq_profile: " << ((int) c.seq_profile) << "\n"
  124|  3.50k|       << indent << "seq_level_idx_0: " << ((int) c.seq_level_idx_0) << "\n"
  125|  3.50k|       << indent << "high_bitdepth: " << ((int) c.high_bitdepth) << "\n"
  126|  3.50k|       << indent << "twelve_bit: " << ((int) c.twelve_bit) << "\n"
  127|  3.50k|       << indent << "monochrome: " << ((int) c.monochrome) << "\n"
  128|  3.50k|       << indent << "chroma_subsampling_x: " << ((int) c.chroma_subsampling_x) << "\n"
  129|  3.50k|       << indent << "chroma_subsampling_y: " << ((int) c.chroma_subsampling_y) << "\n"
  130|  3.50k|       << indent << "chroma_sample_position: " << ((int) c.chroma_sample_position) << "\n"
  131|  3.50k|       << indent << "initial_presentation_delay: ";
  132|       |
  133|  3.50k|  if (c.initial_presentation_delay_present) {
  ------------------
  |  Branch (133:7): [True: 321, False: 3.18k]
  ------------------
  134|    321|    sstr << c.initial_presentation_delay_minus_one + 1 << "\n";
  135|    321|  }
  136|  3.18k|  else {
  137|  3.18k|    sstr << "not present\n";
  138|  3.18k|  }
  139|       |
  140|  3.50k|  sstr << indent << "config OBUs:";
  141|   211k|  for (size_t i = 0; i < m_config_OBUs.size(); i++) {
  ------------------
  |  Branch (141:22): [True: 208k, False: 3.50k]
  ------------------
  142|   208k|    sstr << " " << std::hex << std::setfill('0') << std::setw(2)
  143|   208k|         << ((int) m_config_OBUs[i]);
  144|   208k|  }
  145|  3.50k|  sstr << std::dec << "\n";
  146|       |
  147|  3.50k|  return sstr.str();
  148|  3.50k|}
_ZN8Box_a1op5parseER14BitstreamRangePK20heif_security_limits:
  194|  18.6k|{
  195|  18.6k|  op_index = range.read8();
  196|       |
  197|  18.6k|  return range.get_error();
  198|  18.6k|}
_ZNK8Box_a1op4dumpER6Indent:
  202|  13.6k|{
  203|  13.6k|  std::ostringstream sstr;
  204|  13.6k|  sstr << Box::dump(indent);
  205|       |
  206|  13.6k|  sstr << indent << "op-index: " << ((int) op_index) << "\n";
  207|       |
  208|  13.6k|  return sstr.str();
  209|  13.6k|}
_ZN8Box_a1lx5parseER14BitstreamRangePK20heif_security_limits:
  225|  7.01k|{
  226|  7.01k|  uint8_t flags = range.read8();
  227|       |
  228|  28.0k|  for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (228:19): [True: 21.0k, False: 7.01k]
  ------------------
  229|  21.0k|    if (flags & 1) {
  ------------------
  |  Branch (229:9): [True: 2.25k, False: 18.7k]
  ------------------
  230|  2.25k|      layer_size[i] = range.read32();
  231|  2.25k|    }
  232|  18.7k|    else {
  233|  18.7k|      layer_size[i] = range.read16();
  234|  18.7k|    }
  235|  21.0k|  }
  236|       |
  237|  7.01k|  return range.get_error();
  238|  7.01k|}
_ZNK8Box_a1lx4dumpER6Indent:
  242|  5.70k|{
  243|  5.70k|  std::ostringstream sstr;
  244|  5.70k|  sstr << Box::dump(indent);
  245|       |
  246|  5.70k|  sstr << indent << "layer-sizes: [" << layer_size[0] << "," << layer_size[1] << "," << layer_size[2] << "]\n";
  247|       |
  248|  5.70k|  return sstr.str();
  249|  5.70k|}

_ZN8Box_av1CC2Ev:
   45|  3.88k|  {
   46|  3.88k|    set_short_type(fourcc("av1C"));
   47|  3.88k|  }
_ZN8Box_av01C2Ev:
  122|    225|  {
  123|    225|    set_short_type(fourcc("av01"));
  124|    225|  }
_ZN8Box_a1opC2Ev:
  131|  18.6k|  {
  132|  18.6k|    set_short_type(fourcc("a1op"));
  133|  18.6k|  }
_ZN8Box_a1lxC2Ev:
  150|  7.01k|  {
  151|  7.01k|    set_short_type(fourcc("a1lx"));
  152|  7.01k|  }

_ZN30HEVCDecoderConfigurationRecord5parseER14BitstreamRangePK20heif_security_limits:
   38|  4.74k|{
   39|  4.74k|  uint8_t byte;
   40|       |
   41|  4.74k|  configuration_version = range.read8();
   42|  4.74k|  byte = range.read8();
   43|  4.74k|  general_profile_space = (byte >> 6) & 3;
   44|  4.74k|  general_tier_flag = (byte >> 5) & 1;
   45|  4.74k|  general_profile_idc = (byte & 0x1F);
   46|       |
   47|  4.74k|  general_profile_compatibility_flags = range.read32();
   48|       |
   49|  33.2k|  for (int i = 0; i < 6; i++) {
  ------------------
  |  Branch (49:19): [True: 28.4k, False: 4.74k]
  ------------------
   50|  28.4k|    byte = range.read8();
   51|       |
   52|   256k|    for (int b = 0; b < 8; b++) {
  ------------------
  |  Branch (52:21): [True: 227k, False: 28.4k]
  ------------------
   53|   227k|      general_constraint_indicator_flags[i * 8 + b] = (byte >> (7 - b)) & 1;
   54|   227k|    }
   55|  28.4k|  }
   56|       |
   57|  4.74k|  general_level_idc = range.read8();
   58|  4.74k|  min_spatial_segmentation_idc = range.read16() & 0x0FFF;
   59|  4.74k|  parallelism_type = range.read8() & 0x03;
   60|  4.74k|  chroma_format = range.read8() & 0x03;
   61|  4.74k|  bit_depth_luma = static_cast<uint8_t>((range.read8() & 0x07) + 8);
   62|  4.74k|  bit_depth_chroma = static_cast<uint8_t>((range.read8() & 0x07) + 8);
   63|  4.74k|  avg_frame_rate = range.read16();
   64|       |
   65|  4.74k|  byte = range.read8();
   66|  4.74k|  constant_frame_rate = (byte >> 6) & 0x03;
   67|  4.74k|  num_temporal_layers = (byte >> 3) & 0x07;
   68|  4.74k|  temporal_id_nested = (byte >> 2) & 1;
   69|       |
   70|  4.74k|  m_length_size = static_cast<uint8_t>((byte & 0x03) + 1);
   71|       |
   72|  4.74k|  int nArrays = range.read8();
   73|       |
   74|  9.40k|  for (int i = 0; i < nArrays && !range.error(); i++) {
  ------------------
  |  Branch (74:19): [True: 4.73k, False: 4.66k]
  |  Branch (74:34): [True: 4.65k, False: 79]
  ------------------
   75|  4.65k|    byte = range.read8();
   76|       |
   77|  4.65k|    NalArray array;
   78|       |
   79|  4.65k|    array.m_array_completeness = (byte >> 6) & 1;
   80|  4.65k|    array.m_NAL_unit_type = (byte & 0x3F);
   81|       |
   82|  4.65k|    int nUnits = range.read16();
   83|  34.0k|    for (int u = 0; u < nUnits && !range.error(); u++) {
  ------------------
  |  Branch (83:21): [True: 29.4k, False: 4.60k]
  |  Branch (83:35): [True: 29.3k, False: 53]
  ------------------
   84|       |
   85|  29.3k|      std::vector<uint8_t> nal_unit;
   86|  29.3k|      int size = range.read16();
   87|  29.3k|      if (!size) {
  ------------------
  |  Branch (87:11): [True: 2.40k, False: 26.9k]
  ------------------
   88|       |        // Ignore empty NAL units.
   89|  2.40k|        continue;
   90|  2.40k|      }
   91|       |
   92|  26.9k|      if (range.prepare_read(size)) {
  ------------------
  |  Branch (92:11): [True: 26.9k, False: 35]
  ------------------
   93|  26.9k|        nal_unit.resize(size);
   94|  26.9k|        bool success = range.get_istream()->read((char*) nal_unit.data(), size);
   95|  26.9k|        if (!success) {
  ------------------
  |  Branch (95:13): [True: 0, False: 26.9k]
  ------------------
   96|      0|          return Error{heif_error_Invalid_input, heif_suberror_End_of_data, "error while reading hvcC box"};
   97|      0|        }
   98|  26.9k|      }
   99|       |
  100|  26.9k|      array.m_nal_units.push_back(std::move(nal_unit));
  101|  26.9k|    }
  102|       |
  103|  4.65k|    m_nal_array.push_back(std::move(array));
  104|  4.65k|  }
  105|       |
  106|  4.74k|  range.skip_to_end_of_box();
  107|       |
  108|  4.74k|  return range.get_error();
  109|  4.74k|}
_ZN8Box_hvcC5parseER14BitstreamRangePK20heif_security_limits:
  195|  4.74k|{
  196|  4.74k|  return m_configuration.parse(range, limits);
  197|  4.74k|}
_ZNK8Box_hvcC4dumpER6Indent:
  201|  3.80k|{
  202|  3.80k|  std::ostringstream sstr;
  203|  3.80k|  sstr << Box::dump(indent);
  204|       |
  205|  3.80k|  const auto& c = m_configuration; // abbreviation
  206|       |
  207|  3.80k|  sstr << indent << "configuration_version: " << ((int) c.configuration_version) << "\n"
  208|  3.80k|       << indent << "general_profile_space: " << ((int) c.general_profile_space) << "\n"
  209|  3.80k|       << indent << "general_tier_flag: " << c.general_tier_flag << "\n"
  210|  3.80k|       << indent << "general_profile_idc: " << ((int) c.general_profile_idc) << "\n";
  211|       |
  212|  3.80k|  sstr << indent << "general_profile_compatibility_flags: ";
  213|   125k|  for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (213:19): [True: 121k, False: 3.80k]
  ------------------
  214|   121k|    sstr << ((c.general_profile_compatibility_flags >> (31 - i)) & 1);
  215|   121k|    if ((i % 8) == 7) sstr << ' ';
  ------------------
  |  Branch (215:9): [True: 15.2k, False: 106k]
  ------------------
  216|   106k|    else if ((i % 4) == 3) sstr << '.';
  ------------------
  |  Branch (216:14): [True: 15.2k, False: 91.3k]
  ------------------
  217|   121k|  }
  218|  3.80k|  sstr << "\n";
  219|       |
  220|  3.80k|  sstr << indent << "general_constraint_indicator_flags: ";
  221|  3.80k|  int cnt = 0;
  222|   186k|  for (int i = 0; i < HEVCDecoderConfigurationRecord::NUM_CONSTRAINT_INDICATOR_FLAGS; i++) {
  ------------------
  |  Branch (222:19): [True: 182k, False: 3.80k]
  ------------------
  223|   182k|    bool b = c.general_constraint_indicator_flags[i];
  224|       |
  225|   182k|    sstr << (b ? 1 : 0);
  ------------------
  |  Branch (225:14): [True: 77.8k, False: 104k]
  ------------------
  226|   182k|    cnt++;
  227|   182k|    if ((cnt % 8) == 0)
  ------------------
  |  Branch (227:9): [True: 22.8k, False: 159k]
  ------------------
  228|  22.8k|      sstr << ' ';
  229|   182k|  }
  230|  3.80k|  sstr << "\n";
  231|       |
  232|  3.80k|  sstr << indent << "general_level_idc: " << ((int) c.general_level_idc) << "\n"
  233|  3.80k|       << indent << "min_spatial_segmentation_idc: " << c.min_spatial_segmentation_idc << "\n"
  234|  3.80k|       << indent << "parallelism_type: " << ((int) c.parallelism_type) << "\n"
  235|  3.80k|       << indent << "chroma_format: ";
  236|       |
  237|  3.80k|  switch (c.chroma_format) {
  238|  1.92k|    case 0:
  ------------------
  |  Branch (238:5): [True: 1.92k, False: 1.87k]
  ------------------
  239|  1.92k|      sstr << "monochrome";
  240|  1.92k|      break;
  241|     54|    case 1:
  ------------------
  |  Branch (241:5): [True: 54, False: 3.75k]
  ------------------
  242|     54|      sstr << "4:2:0";
  243|     54|      break;
  244|    501|    case 2:
  ------------------
  |  Branch (244:5): [True: 501, False: 3.30k]
  ------------------
  245|    501|      sstr << "4:2:2";
  246|    501|      break;
  247|  1.32k|    case 3:
  ------------------
  |  Branch (247:5): [True: 1.32k, False: 2.48k]
  ------------------
  248|  1.32k|      sstr << "4:4:4";
  249|  1.32k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 3.80k]
  ------------------
  251|      0|      sstr << ((int) c.chroma_format);
  252|      0|      break;
  253|  3.80k|  }
  254|       |
  255|  3.80k|  sstr << "\n"
  256|  3.80k|       << indent << "bit_depth_luma: " << ((int) c.bit_depth_luma) << "\n"
  257|  3.80k|       << indent << "bit_depth_chroma: " << ((int) c.bit_depth_chroma) << "\n"
  258|  3.80k|       << indent << "avg_frame_rate: " << c.avg_frame_rate << "\n"
  259|  3.80k|       << indent << "constant_frame_rate: " << ((int) c.constant_frame_rate) << "\n"
  260|  3.80k|       << indent << "num_temporal_layers: " << ((int) c.num_temporal_layers) << "\n"
  261|  3.80k|       << indent << "temporal_id_nested: " << ((int) c.temporal_id_nested) << "\n"
  262|  3.80k|       << indent << "length_size: " << ((int) c.m_length_size) << "\n";
  263|       |
  264|  3.82k|  for (const auto& array : c.m_nal_array) {
  ------------------
  |  Branch (264:26): [True: 3.82k, False: 3.80k]
  ------------------
  265|  3.82k|    sstr << indent << "<array>\n";
  266|       |
  267|  3.82k|    indent++;
  268|  3.82k|    sstr << indent << "array_completeness: " << ((int) array.m_array_completeness) << "\n"
  269|  3.82k|         << indent << "NAL_unit_type: " << ((int) array.m_NAL_unit_type) << "\n";
  270|       |
  271|  3.82k|    for (const auto& unit : array.m_nal_units) {
  ------------------
  |  Branch (271:27): [True: 603, False: 3.82k]
  ------------------
  272|       |      //sstr << "  unit with " << unit.size() << " bytes of data\n";
  273|    603|      sstr << indent;
  274|   878k|      for (uint8_t b : unit) {
  ------------------
  |  Branch (274:22): [True: 878k, False: 603]
  ------------------
  275|   878k|        sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  276|   878k|      }
  277|    603|      sstr << "\n";
  278|    603|      sstr << std::dec;
  279|    603|    }
  280|       |
  281|  3.82k|    indent--;
  282|  3.82k|  }
  283|       |
  284|  3.80k|  return sstr.str();
  285|  3.80k|}

_ZN8Box_hvcCC2Ev:
   97|  4.75k|  {
   98|  4.75k|    set_short_type(fourcc("hvcC"));
   99|  4.75k|  }
_ZN8Box_hvc1C2Ev:
  138|    161|  {
  139|    161|    set_short_type(fourcc("hvc1"));
  140|    161|  }
_ZNK8Box_hvcC14debug_box_nameEv:
  106|  3.80k|  const char* debug_box_name() const override { return "HEVC Configuration Item"; }

_ZN8Box_cdef5parseER14BitstreamRangePK20heif_security_limits:
   33|  9.68k|{
   34|  9.68k|  uint16_t channel_count = range.read16();
   35|       |
   36|  9.68k|  if (limits->max_components && channel_count > limits->max_components) {
  ------------------
  |  Branch (36:7): [True: 9.68k, False: 0]
  |  Branch (36:33): [True: 10, False: 9.67k]
  ------------------
   37|     10|    std::stringstream sstr;
   38|     10|    sstr << "cdef box wants to define " << channel_count << " JPEG-2000 channels, but the security limit is set to "
   39|     10|         << limits->max_components << " components";
   40|     10|    return {heif_error_Invalid_input,
   41|     10|            heif_suberror_Security_limit_exceeded,
   42|     10|            sstr.str()};
   43|     10|  }
   44|       |
   45|  9.67k|  if (channel_count > range.get_remaining_bytes() / 6) {
  ------------------
  |  Branch (45:7): [True: 11, False: 9.65k]
  ------------------
   46|     11|    std::stringstream sstr;
   47|     11|    sstr << "cdef box wants to define " << channel_count << " JPEG-2000 channels, but file only contains "
   48|     11|         << range.get_remaining_bytes() / 6 << " components";
   49|     11|    return {heif_error_Invalid_input,
   50|     11|            heif_suberror_End_of_data,
   51|     11|            sstr.str()};
   52|     11|  }
   53|       |
   54|  9.65k|  m_channels.resize(channel_count);
   55|       |
   56|  18.7k|  for (uint16_t i = 0; i < channel_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (56:24): [True: 9.12k, False: 9.65k]
  |  Branch (56:45): [True: 9.12k, False: 0]
  |  Branch (56:63): [True: 9.12k, False: 0]
  ------------------
   57|  9.12k|    Channel channel;
   58|  9.12k|    channel.channel_index = range.read16();
   59|  9.12k|    channel.channel_type = range.read16();
   60|  9.12k|    channel.channel_association = range.read16();
   61|  9.12k|    m_channels[i] = channel;
   62|  9.12k|  }
   63|       |
   64|  9.65k|  return range.get_error();
   65|  9.67k|}
_ZNK8Box_cdef4dumpER6Indent:
   68|  8.42k|{
   69|  8.42k|  std::ostringstream sstr;
   70|  8.42k|  sstr << Box::dump(indent);
   71|       |
   72|  8.73k|  for (const auto& channel : m_channels) {
  ------------------
  |  Branch (72:28): [True: 8.73k, False: 8.42k]
  ------------------
   73|  8.73k|    sstr << indent << "channel_index: " << channel.channel_index
   74|  8.73k|         << ", channel_type: " << channel.channel_type
   75|  8.73k|         << ", channel_association: " << channel.channel_association << "\n";
   76|  8.73k|  }
   77|       |
   78|  8.42k|  return sstr.str();
   79|  8.42k|}
_ZN8Box_cmap5parseER14BitstreamRangePK20heif_security_limits:
  136|  5.89k|{
  137|  5.97M|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (137:10): [True: 5.97M, False: 5.89k]
  |  Branch (137:26): [True: 5.97M, False: 0]
  ------------------
  138|  5.97M|    Component component;
  139|  5.97M|    component.component_index = range.read16();
  140|  5.97M|    component.mapping_type = range.read8();
  141|  5.97M|    component.palette_colour = range.read8();
  142|  5.97M|    m_components.push_back(component);
  143|  5.97M|  }
  144|       |
  145|  5.89k|  return range.get_error();
  146|  5.89k|}
_ZNK8Box_cmap4dumpER6Indent:
  150|  3.36k|{
  151|  3.36k|  std::ostringstream sstr;
  152|  3.36k|  sstr << Box::dump(indent);
  153|       |
  154|  5.78M|  for (const auto& component : m_components) {
  ------------------
  |  Branch (154:30): [True: 5.78M, False: 3.36k]
  ------------------
  155|  5.78M|    sstr << indent << "component_index: " << component.component_index
  156|  5.78M|         << ", mapping_type: " << (int) (component.mapping_type)
  157|  5.78M|         << ", palette_colour: " << (int) (component.palette_colour) << "\n";
  158|  5.78M|  }
  159|       |
  160|  3.36k|  return sstr.str();
  161|  3.36k|}
_ZN8Box_pclr5parseER14BitstreamRangePK20heif_security_limits:
  181|  1.32k|{
  182|  1.32k|  uint16_t num_entries = range.read16();
  183|  1.32k|  uint8_t num_palette_columns = range.read8();
  184|  5.51k|  for (uint8_t i = 0; i < num_palette_columns; i++) {
  ------------------
  |  Branch (184:23): [True: 4.19k, False: 1.31k]
  ------------------
  185|  4.19k|    uint8_t bit_depth = range.read8();
  186|  4.19k|    if (bit_depth & 0x80) {
  ------------------
  |  Branch (186:9): [True: 7, False: 4.19k]
  ------------------
  187|      7|      return Error(heif_error_Unsupported_feature,
  188|      7|                   heif_suberror_Unsupported_data_version,
  189|      7|                   "pclr with signed data is not supported");
  190|      7|    }
  191|  4.19k|    if (bit_depth > 16) {
  ------------------
  |  Branch (191:9): [True: 4, False: 4.18k]
  ------------------
  192|      4|      return Error(heif_error_Unsupported_feature,
  193|      4|                   heif_suberror_Unsupported_data_version,
  194|      4|                   "pclr more than 16 bits per channel is not supported");
  195|      4|    }
  196|  4.18k|    m_bitDepths.push_back(bit_depth);
  197|  4.18k|  }
  198|       |  // Number of bytes each palette entry occupies in the box. Used to bound
  199|       |  // num_entries by the data actually present, so a small header cannot force
  200|       |  // a large allocation (analogous to the 'cdef'/'j2kL' checks).
  201|  1.31k|  size_t bytes_per_entry = 0;
  202|  4.18k|  for (uint8_t bd : m_bitDepths) {
  ------------------
  |  Branch (202:19): [True: 4.18k, False: 1.31k]
  ------------------
  203|  4.18k|    bytes_per_entry += (bd <= 8) ? 1 : 2;
  ------------------
  |  Branch (203:24): [True: 3.38k, False: 806]
  ------------------
  204|  4.18k|  }
  205|       |
  206|  1.31k|  if (bytes_per_entry != 0 &&
  ------------------
  |  Branch (206:7): [True: 211, False: 1.10k]
  ------------------
  207|    211|      num_entries > range.get_remaining_bytes() / bytes_per_entry) {
  ------------------
  |  Branch (207:7): [True: 23, False: 188]
  ------------------
  208|     23|    return Error(heif_error_Invalid_input,
  209|     23|                 heif_suberror_End_of_data,
  210|     23|                 "pclr box declares more entries than the box contains");
  211|     23|  }
  212|       |
  213|  1.85M|  for (uint16_t j = 0; j < num_entries; j++) {
  ------------------
  |  Branch (213:24): [True: 1.85M, False: 1.29k]
  ------------------
  214|  1.85M|    PaletteEntry entry;
  215|  1.85M|    for (size_t i = 0; i < m_bitDepths.size(); i++) {
  ------------------
  |  Branch (215:24): [True: 2.30k, False: 1.85M]
  ------------------
  216|  2.30k|      if (m_bitDepths[i] <= 8) {
  ------------------
  |  Branch (216:11): [True: 1.59k, False: 709]
  ------------------
  217|  1.59k|        entry.columns.push_back(range.read8());
  218|  1.59k|      }
  219|    709|      else {
  220|    709|        entry.columns.push_back(range.read16());
  221|    709|      }
  222|  2.30k|    }
  223|  1.85M|    m_entries.push_back(std::move(entry));
  224|  1.85M|  }
  225|       |
  226|  1.29k|  return range.get_error();
  227|  1.31k|}
_ZNK8Box_pclr4dumpER6Indent:
  231|  1.20k|{
  232|  1.20k|  std::ostringstream sstr;
  233|  1.20k|  sstr << Box::dump(indent);
  234|       |
  235|  1.20k|  sstr << indent << "NE: " << m_entries.size();
  236|  1.20k|  sstr << ", NPC: " << (int) get_num_columns();
  237|  1.20k|  sstr << ", B: ";
  238|  1.74k|  for (uint8_t b : m_bitDepths) {
  ------------------
  |  Branch (238:18): [True: 1.74k, False: 1.20k]
  ------------------
  239|  1.74k|    sstr << (int) b << ", ";
  240|  1.74k|  }
  241|       |  // TODO: maybe dump entries too?
  242|  1.20k|  sstr << "\n";
  243|       |
  244|  1.20k|  return sstr.str();
  245|  1.20k|}
_ZN8Box_j2kL5parseER14BitstreamRangePK20heif_security_limits:
  288|    665|{
  289|    665|  uint16_t layer_count = range.read16();
  290|       |
  291|    665|  if (layer_count > range.get_remaining_bytes() / (2+1+2)) {
  ------------------
  |  Branch (291:7): [True: 5, False: 660]
  ------------------
  292|      5|    std::stringstream sstr;
  293|      5|    sstr << "j2kL box wants to define " << layer_count << "JPEG-2000 layers, but the box only contains "
  294|      5|         << range.get_remaining_bytes() / (2 + 1 + 2) << " layers entries";
  295|      5|    return {heif_error_Invalid_input,
  296|      5|            heif_suberror_End_of_data,
  297|      5|            sstr.str()};
  298|      5|  }
  299|       |
  300|    660|  m_layers.resize(layer_count);
  301|       |
  302|   801k|  for (int i = 0; i < layer_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (302:19): [True: 800k, False: 660]
  |  Branch (302:38): [True: 800k, False: 0]
  |  Branch (302:56): [True: 800k, False: 0]
  ------------------
  303|   800k|    Layer layer;
  304|   800k|    layer.layer_id = range.read16();
  305|   800k|    layer.discard_levels = range.read8();
  306|   800k|    layer.decode_layers = range.read16();
  307|   800k|    m_layers[i] = layer;
  308|   800k|  }
  309|       |
  310|    660|  if (range.get_error()) {
  ------------------
  |  Branch (310:7): [True: 3, False: 657]
  ------------------
  311|      3|    m_layers.clear();
  312|      3|  }
  313|       |
  314|    660|  return range.get_error();
  315|    665|}
_ZNK8Box_j2kL4dumpER6Indent:
  318|    560|{
  319|    560|  std::ostringstream sstr;
  320|    560|  sstr << Box::dump(indent);
  321|       |
  322|   800k|  for (const auto& layer : m_layers) {
  ------------------
  |  Branch (322:26): [True: 800k, False: 560]
  ------------------
  323|   800k|    sstr << indent << "layer_id: " << layer.layer_id
  324|   800k|         << ", discard_levels: " << (int) (layer.discard_levels)
  325|   800k|         << ", decode_layers: " << layer.decode_layers << "\n";
  326|   800k|  }
  327|       |
  328|    560|  return sstr.str();
  329|    560|}
_ZN8Box_j2kH5parseER14BitstreamRangePK20heif_security_limits:
  350|  7.48k|{
  351|  7.48k|  return read_children(range, READ_CHILDREN_ALL, limits);
  352|  7.48k|}
_ZNK8Box_j2kH4dumpER6Indent:
  355|  6.71k|{
  356|  6.71k|  std::ostringstream sstr;
  357|  6.71k|  sstr << Box::dump(indent);
  358|       |
  359|  6.71k|  sstr << dump_children(indent);
  360|       |
  361|  6.71k|  return sstr.str();
  362|  6.71k|}

_ZN8Box_j2kHC2Ev:
  314|  7.48k|    Box_j2kH() { set_short_type(fourcc("j2kH")); }
_ZN8Box_cdefC2Ev:
   57|  9.68k|    Box_cdef() { set_short_type(fourcc("cdef")); }
_ZN8Box_cmapC2Ev:
  141|  5.89k|    Box_cmap() { set_short_type(fourcc("cmap")); }
_ZN8Box_pclrC2Ev:
  186|  1.33k|    {
  187|  1.33k|        set_short_type(fourcc("pclr"));
  188|  1.33k|    }
_ZN8Box_j2kLC2Ev:
  269|    666|    Box_j2kL() { set_short_type(fourcc("j2kL")); }
_ZN8Box_j2kiC2Ev:
  527|     85|  {
  528|     85|    set_short_type(fourcc("j2ki"));
  529|     85|  }
_ZNK8Box_pclr15get_num_columnsEv:
  227|  1.20k|    {
  228|  1.20k|        return (uint8_t)(m_bitDepths.size());
  229|  1.20k|    }

_ZNK8Box_jpgC4dumpER6Indent:
   42|  7.00k|{
   43|  7.00k|  std::ostringstream sstr;
   44|  7.00k|  sstr << Box::dump(indent);
   45|       |
   46|  7.00k|  sstr << indent << "num bytes: " << m_data.size() << "\n";
   47|       |
   48|  7.00k|  return sstr.str();
   49|  7.00k|}
_ZN8Box_jpgC5parseER14BitstreamRangePK20heif_security_limits:
   65|  7.57k|{
   66|  7.57k|  if (!has_fixed_box_size()) {
  ------------------
  |  Branch (66:7): [True: 1, False: 7.57k]
  ------------------
   67|      1|    return Error{heif_error_Unsupported_feature, heif_suberror_Unspecified, "jpgC with unspecified size are not supported"};
   68|      1|  }
   69|       |
   70|  7.57k|  size_t nBytes = range.get_remaining_bytes();
   71|  7.57k|  if (limits->max_memory_block_size && nBytes > limits->max_memory_block_size) {
  ------------------
  |  Branch (71:7): [True: 7.57k, False: 0]
  |  Branch (71:40): [True: 0, False: 7.57k]
  ------------------
   72|      0|    return Error{heif_error_Invalid_input, heif_suberror_Unspecified, "jpgC block exceeds maximum size"};
   73|      0|  }
   74|       |
   75|  7.57k|  m_data.resize(nBytes);
   76|  7.57k|  range.read(m_data.data(), nBytes);
   77|  7.57k|  return range.get_error();
   78|  7.57k|}

_ZN8Box_jpgCC2Ev:
   36|  7.57k|  {
   37|  7.57k|    set_short_type(fourcc("jpgC"));
   38|  7.57k|  }
_ZN8Box_mjpgC2Ev:
   60|    119|  {
   61|    119|    set_short_type(fourcc("mjpg"));
   62|    119|  }

_Z25is_valid_component_formath:
   43|  2.48k|{
   44|  2.48k|  return format <= component_format_max_valid;
   45|  2.48k|}
_Z24is_valid_interleave_modeh:
   62|    569|{
   63|    569|  return interleave <= interleave_mode_max_valid;
   64|    569|}
_Z22is_valid_sampling_modeh:
   83|    570|{
   84|    570|  return sampling <= sampling_mode_max_valid;
   85|    570|}
_Z28is_predefined_component_typet:
   96|  7.55k|{
   97|       |  // check whether the component type can be mapped to heif_uncompressed_component_type and we have a name defined for
   98|       |  // it in sNames_uncompressed_component_type.
   99|  7.55k|  return type <= heif_cmpd_component_type_max_valid;
  ------------------
  |  |   29|  7.55k|#define heif_cmpd_component_type_max_valid heif_cmpd_component_type_key_black
  ------------------
  100|  7.55k|}
_ZN8Box_cmpd5parseER14BitstreamRangePK20heif_security_limits:
  144|  1.24k|{
  145|  1.24k|  uint32_t component_count = range.read32();
  146|       |
  147|  1.24k|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (147:7): [True: 1.24k, False: 0]
  |  Branch (147:33): [True: 48, False: 1.19k]
  ------------------
  148|     48|    std::stringstream sstr;
  149|     48|    sstr << "cmpd box should contain " << component_count << " components, but security limit is set to "
  150|     48|         << limits->max_components << " components";
  151|       |
  152|     48|    return {heif_error_Invalid_input,
  153|     48|            heif_suberror_Security_limit_exceeded,
  154|     48|            sstr.str()
  155|     48|    };
  156|     48|  }
  157|       |
  158|  11.3k|  for (unsigned int i = 0; i < component_count ; i++) {
  ------------------
  |  Branch (158:28): [True: 10.2k, False: 1.13k]
  ------------------
  159|  10.2k|    if (range.eof()) {
  ------------------
  |  Branch (159:9): [True: 57, False: 10.1k]
  ------------------
  160|     57|      std::stringstream sstr;
  161|     57|      sstr << "cmpd box should contain " << component_count << " components, but box only contained "
  162|     57|           << i << " components";
  163|       |
  164|     57|      return {heif_error_Invalid_input,
  165|     57|              heif_suberror_End_of_data,
  166|     57|              sstr.str()
  167|     57|      };
  168|     57|    }
  169|       |
  170|  10.1k|    Component component;
  171|  10.1k|    component.component_type = range.read16();
  172|  10.1k|    if (component.component_type >= 0x8000) {
  ------------------
  |  Branch (172:9): [True: 1.77k, False: 8.41k]
  ------------------
  173|  1.77k|      component.component_type_uri = range.read_string();
  174|  1.77k|    }
  175|  8.41k|    else {
  176|  8.41k|      component.component_type_uri = std::string();
  177|  8.41k|    }
  178|  10.1k|    m_components.push_back(component);
  179|  10.1k|  }
  180|       |
  181|  1.13k|  return range.get_error();
  182|  1.19k|}
_ZN8Box_cmpd9Component23get_component_type_nameEt:
  185|  7.55k|{
  186|  7.55k|  std::stringstream sstr;
  187|       |
  188|  7.55k|  if (is_predefined_component_type(component_type)) {
  ------------------
  |  Branch (188:7): [True: 3.14k, False: 4.41k]
  ------------------
  189|  3.14k|    sstr << get_name(heif_cmpd_component_type(component_type), sNames_uncompressed_component_type) << "\n";
  190|  3.14k|  }
  191|  4.41k|  else {
  192|  4.41k|    sstr << "0x" << std::hex << component_type << std::dec << "\n";
  193|  4.41k|  }
  194|       |
  195|  7.55k|  return sstr.str();
  196|  7.55k|}
_ZNK8Box_cmpd4dumpER6Indent:
  207|    834|{
  208|    834|  std::ostringstream sstr;
  209|    834|  sstr << Box::dump(indent);
  210|       |
  211|  7.55k|  for (const auto& component : m_components) {
  ------------------
  |  Branch (211:30): [True: 7.55k, False: 834]
  ------------------
  212|  7.55k|    sstr << indent << "component_type: " << component.get_component_type_name();
  213|       |
  214|  7.55k|    if (component.component_type >= 0x8000) {
  ------------------
  |  Branch (214:9): [True: 1.14k, False: 6.40k]
  ------------------
  215|  1.14k|      sstr << indent << "| component_type_uri: " << component.component_type_uri << "\n";
  216|  1.14k|    }
  217|  7.55k|  }
  218|       |
  219|    834|  return sstr.str();
  220|    834|}
_ZN8Box_uncC5parseER14BitstreamRangePK20heif_security_limits:
  240|  4.14k|{
  241|  4.14k|  parse_full_box_header(range);
  242|       |
  243|  4.14k|  m_profile = range.read32();
  244|       |
  245|  4.14k|  if (get_version() == 1) {
  ------------------
  |  Branch (245:7): [True: 2.47k, False: 1.66k]
  ------------------
  246|  2.47k|    switch (m_profile) {
  247|     97|      case fourcc("rgb3"):
  ------------------
  |  Branch (247:7): [True: 97, False: 2.38k]
  ------------------
  248|    167|      case fourcc("rgba"):
  ------------------
  |  Branch (248:7): [True: 70, False: 2.40k]
  ------------------
  249|    276|      case fourcc("abgr"):
  ------------------
  |  Branch (249:7): [True: 109, False: 2.37k]
  ------------------
  250|    345|      case fourcc("2vuy"):
  ------------------
  |  Branch (250:7): [True: 69, False: 2.41k]
  ------------------
  251|    971|      case fourcc("yuv2"):
  ------------------
  |  Branch (251:7): [True: 626, False: 1.85k]
  ------------------
  252|  1.01k|      case fourcc("yvyu"):
  ------------------
  |  Branch (252:7): [True: 47, False: 2.43k]
  ------------------
  253|  1.15k|      case fourcc("vyuy"):
  ------------------
  |  Branch (253:7): [True: 133, False: 2.34k]
  ------------------
  254|  1.25k|      case fourcc("yuv1"):
  ------------------
  |  Branch (254:7): [True: 102, False: 2.37k]
  ------------------
  255|  1.32k|      case fourcc("v308"):
  ------------------
  |  Branch (255:7): [True: 72, False: 2.40k]
  ------------------
  256|  1.39k|      case fourcc("v408"):
  ------------------
  |  Branch (256:7): [True: 66, False: 2.41k]
  ------------------
  257|  1.45k|      case fourcc("y210"):
  ------------------
  |  Branch (257:7): [True: 68, False: 2.41k]
  ------------------
  258|  1.46k|      case fourcc("v410"):
  ------------------
  |  Branch (258:7): [True: 10, False: 2.46k]
  ------------------
  259|  1.48k|      case fourcc("v210"):
  ------------------
  |  Branch (259:7): [True: 18, False: 2.46k]
  ------------------
  260|  1.68k|      case fourcc("i420"):
  ------------------
  |  Branch (260:7): [True: 202, False: 2.27k]
  ------------------
  261|  1.69k|      case fourcc("nv12"):
  ------------------
  |  Branch (261:7): [True: 10, False: 2.46k]
  ------------------
  262|  1.77k|      case fourcc("nv21"):
  ------------------
  |  Branch (262:7): [True: 80, False: 2.39k]
  ------------------
  263|  1.85k|      case fourcc("yu22"):
  ------------------
  |  Branch (263:7): [True: 77, False: 2.40k]
  ------------------
  264|  1.91k|      case fourcc("yv22"):
  ------------------
  |  Branch (264:7): [True: 61, False: 2.41k]
  ------------------
  265|  1.98k|      case fourcc("yv20"):
  ------------------
  |  Branch (265:7): [True: 72, False: 2.40k]
  ------------------
  266|  1.98k|        break;
  267|    490|      default:
  ------------------
  |  Branch (267:7): [True: 490, False: 1.98k]
  ------------------
  268|    490|        return Error{heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Unknown uncC v1 profile"};
  269|  2.47k|    }
  270|  2.47k|  } else if (get_version() == 0) {
  ------------------
  |  Branch (270:14): [True: 626, False: 1.04k]
  ------------------
  271|       |
  272|    626|    uint32_t component_count = range.read32();
  273|       |
  274|    626|    if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (274:9): [True: 626, False: 0]
  |  Branch (274:35): [True: 48, False: 578]
  ------------------
  275|     48|      std::stringstream sstr;
  276|     48|      sstr << "Number of image components (" << component_count << ") exceeds security limit ("
  277|     48|           << limits->max_components << ")";
  278|       |
  279|     48|      return {heif_error_Invalid_input,
  280|     48|              heif_suberror_Security_limit_exceeded,
  281|     48|              sstr.str()};
  282|     48|    }
  283|       |
  284|  3.05k|    for (uint32_t i = 0; i < component_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (284:26): [True: 2.51k, False: 536]
  |  Branch (284:49): [True: 2.49k, False: 22]
  |  Branch (284:67): [True: 2.48k, False: 12]
  ------------------
  285|  2.48k|      Component component;
  286|  2.48k|      component.component_index = range.read16();
  287|  2.48k|      component.component_bit_depth = uint16_t(range.read8() + 1);
  288|  2.48k|      component.component_format = range.read8();
  289|  2.48k|      component.component_align_size = range.read8();
  290|  2.48k|      m_components.push_back(component);
  291|       |
  292|  2.48k|      if (!is_valid_component_format(component.component_format)) {
  ------------------
  |  Branch (292:11): [True: 7, False: 2.47k]
  ------------------
  293|      7|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid component format"};
  294|      7|      }
  295|       |
  296|       |      // When component_align_size != 0, the component is padded up to that many bytes.
  297|       |      // It therefore must be large enough to hold the component's bit depth; otherwise
  298|       |      // the decoder computes a negative pad-bits count and shifts by a negative amount.
  299|  2.47k|      if (component.component_align_size != 0 &&
  ------------------
  |  Branch (299:11): [True: 664, False: 1.81k]
  ------------------
  300|    664|          uint32_t(component.component_align_size) * 8 < component.component_bit_depth) {
  ------------------
  |  Branch (300:11): [True: 1, False: 663]
  ------------------
  301|      1|        std::stringstream sstr;
  302|      1|        sstr << "Component alignment (" << int(component.component_align_size)
  303|      1|             << " bytes) is too small for component bit depth (" << component.component_bit_depth << " bits)";
  304|      1|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, sstr.str()};
  305|      1|      }
  306|  2.47k|    }
  307|       |
  308|    570|    m_sampling_type = range.read8();
  309|    570|    if (!is_valid_sampling_mode(m_sampling_type)) {
  ------------------
  |  Branch (309:9): [True: 1, False: 569]
  ------------------
  310|      1|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid sampling mode"};
  311|      1|    }
  312|       |
  313|    569|    m_interleave_type = range.read8();
  314|    569|    if (!is_valid_interleave_mode(m_interleave_type)) {
  ------------------
  |  Branch (314:9): [True: 1, False: 568]
  ------------------
  315|      1|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid interleave mode"};
  316|      1|    }
  317|       |
  318|    568|    m_block_size = range.read8();
  319|       |
  320|    568|    uint8_t flags = range.read8();
  321|    568|    m_components_little_endian = !!(flags & 0x80);
  322|    568|    m_block_pad_lsb = !!(flags & 0x40);
  323|    568|    m_block_little_endian = !!(flags & 0x20);
  324|    568|    m_block_reversed = !!(flags & 0x10);
  325|    568|    m_pad_unknown = !!(flags & 0x08);
  326|       |
  327|    568|    m_pixel_size = range.read32();
  328|       |
  329|    568|    if (limits->version >= 4 &&
  ------------------
  |  Branch (329:9): [True: 568, False: 0]
  ------------------
  330|    568|        limits->max_iso23001_17_pixel_size_bytes != 0 &&
  ------------------
  |  Branch (330:9): [True: 568, False: 0]
  ------------------
  331|    568|        m_pixel_size > limits->max_iso23001_17_pixel_size_bytes) {
  ------------------
  |  Branch (331:9): [True: 30, False: 538]
  ------------------
  332|     30|      std::stringstream sstr;
  333|     30|      sstr << "uncC pixel_size (" << m_pixel_size << " bytes) exceeds security limit of "
  334|     30|           << limits->max_iso23001_17_pixel_size_bytes << " bytes";
  335|     30|      return {heif_error_Memory_allocation_error,
  336|     30|              heif_suberror_Security_limit_exceeded,
  337|     30|              sstr.str()};
  338|     30|    }
  339|       |
  340|    538|    m_row_align_size = range.read32();
  341|       |
  342|    538|    m_tile_align_size = range.read32();
  343|       |
  344|    538|    uint32_t num_tile_cols_minus_one = range.read32();
  345|    538|    uint32_t num_tile_rows_minus_one = range.read32();
  346|       |
  347|       |    // The field is stored as `count - 1`, so 0xFFFFFFFF would mean 2^32 tiles,
  348|       |    // which we cannot represent in our uint32 m_num_tile_cols/rows. Reject this
  349|       |    // before the security-limit check so that disabling the security limit does
  350|       |    // not silently turn this into a divide-by-zero in get_heif_image_tiling().
  351|    538|    if (num_tile_cols_minus_one == 0xFFFFFFFF || num_tile_rows_minus_one == 0xFFFFFFFF) {
  ------------------
  |  Branch (351:9): [True: 1, False: 537]
  |  Branch (351:50): [True: 2, False: 535]
  ------------------
  352|      3|      return {heif_error_Unsupported_feature,
  353|      3|              heif_suberror_Invalid_parameter_value,
  354|      3|              "uncC num_tile_cols/rows_minus_one of 0xFFFFFFFF (2^32 tiles) exceeds the supported range"};
  355|      3|    }
  356|       |
  357|    535|    if (limits->max_number_of_tiles &&
  ------------------
  |  Branch (357:9): [True: 535, False: 0]
  ------------------
  358|    535|        static_cast<uint64_t>(num_tile_cols_minus_one) + 1 > limits->max_number_of_tiles / (static_cast<uint64_t>(num_tile_rows_minus_one) + 1)) {
  ------------------
  |  Branch (358:9): [True: 37, False: 498]
  ------------------
  359|     37|      std::stringstream sstr;
  360|     37|      sstr << "Tiling size "
  361|     37|           << ((uint64_t)num_tile_cols_minus_one + 1) << " x " << ((uint64_t)num_tile_rows_minus_one + 1)
  362|     37|           << " exceeds the maximum allowed number " << limits->max_number_of_tiles << " set as security limit";
  363|     37|      return {heif_error_Memory_allocation_error,
  364|     37|              heif_suberror_Security_limit_exceeded,
  365|     37|              sstr.str()};
  366|     37|    }
  367|       |
  368|    498|    m_num_tile_cols = num_tile_cols_minus_one + 1;
  369|    498|    m_num_tile_rows = num_tile_rows_minus_one + 1;
  370|    498|  }
  371|       |
  372|  3.52k|  return range.get_error();
  373|  4.14k|}
_ZNK8Box_uncC4dumpER6Indent:
  378|  2.94k|{
  379|  2.94k|  std::ostringstream sstr;
  380|  2.94k|  sstr << Box::dump(indent);
  381|       |
  382|  2.94k|  sstr << indent << "profile: " << m_profile;
  383|  2.94k|  if (m_profile != 0) {
  ------------------
  |  Branch (383:7): [True: 2.36k, False: 580]
  ------------------
  384|  2.36k|    sstr << " (" << fourcc_to_string(m_profile) << ")";
  385|  2.36k|  }
  386|  2.94k|  sstr << "\n";
  387|  2.94k|  if (get_version() == 0) {
  ------------------
  |  Branch (387:7): [True: 454, False: 2.49k]
  ------------------
  388|  1.41k|    for (const auto& component : m_components) {
  ------------------
  |  Branch (388:32): [True: 1.41k, False: 454]
  ------------------
  389|  1.41k|      sstr << indent << "component_index: " << component.component_index << "\n";
  390|  1.41k|      indent++;
  391|  1.41k|      sstr << indent << "component_bit_depth: " << (int) component.component_bit_depth << "\n";
  392|  1.41k|      sstr << indent << "component_format: " << get_name(heif_uncompressed_component_format(component.component_format), sNames_uncompressed_component_format) << "\n";
  393|  1.41k|      sstr << indent << "component_align_size: " << (int) component.component_align_size << "\n";
  394|  1.41k|      indent--;
  395|  1.41k|    }
  396|       |
  397|    454|    sstr << indent << "sampling_type: " << get_name(heif_uncompressed_sampling_mode(m_sampling_type), sNames_uncompressed_sampling_mode) << "\n";
  398|       |
  399|    454|    sstr << indent << "interleave_type: " << get_name(heif_uncompressed_interleave_mode(m_interleave_type), sNames_uncompressed_interleave_mode) << "\n";
  400|       |
  401|    454|    sstr << indent << "block_size: " << (int) m_block_size << "\n";
  402|       |
  403|    454|    sstr << indent << "components_little_endian: " << m_components_little_endian << "\n";
  404|    454|    sstr << indent << "block_pad_lsb: " << m_block_pad_lsb << "\n";
  405|    454|    sstr << indent << "block_little_endian: " << m_block_little_endian << "\n";
  406|    454|    sstr << indent << "block_reversed: " << m_block_reversed << "\n";
  407|    454|    sstr << indent << "pad_unknown: " << m_pad_unknown << "\n";
  408|       |
  409|    454|    sstr << indent << "pixel_size: " << m_pixel_size << "\n";
  410|       |
  411|    454|    sstr << indent << "row_align_size: " << m_row_align_size << "\n";
  412|       |
  413|    454|    sstr << indent << "tile_align_size: " << m_tile_align_size << "\n";
  414|       |
  415|    454|    sstr << indent << "num_tile_cols: " << m_num_tile_cols << "\n";
  416|       |
  417|    454|    sstr << indent << "num_tile_rows: " << m_num_tile_rows << "\n";
  418|    454|  }
  419|  2.94k|  return sstr.str();
  420|  2.94k|}
_ZN8Box_cmpC5parseER14BitstreamRangePK20heif_security_limits:
  750|    657|{
  751|    657|  parse_full_box_header(range);
  752|       |
  753|    657|  if (get_version() != 0) {
  ------------------
  |  Branch (753:7): [True: 4, False: 653]
  ------------------
  754|      4|    return unsupported_version_error("cmpC");
  755|      4|  }
  756|       |
  757|    653|  m_compression_type = range.read32();
  758|       |
  759|    653|  uint8_t unit_type = range.read8();
  760|    653|  if (unit_type > heif_cmpC_compressed_unit_type_image_pixel) {
  ------------------
  |  Branch (760:7): [True: 6, False: 647]
  ------------------
  761|      6|    return {heif_error_Invalid_input,
  762|      6|            heif_suberror_Unsupported_parameter,
  763|      6|            "Unsupported cmpC compressed unit type"};
  764|    647|  };
  765|       |
  766|    647|  m_compressed_unit_type = static_cast<heif_cmpC_compressed_unit_type>(unit_type);
  767|       |
  768|    647|  return range.get_error();
  769|    653|}
_ZNK8Box_cmpC4dumpER6Indent:
  773|    518|{
  774|    518|  std::ostringstream sstr;
  775|    518|  sstr << Box::dump(indent);
  776|    518|  sstr << indent << "compression_type: " << fourcc_to_string(m_compression_type) << "\n";
  777|    518|  sstr << indent << "compressed_entity_type: " << (int)m_compressed_unit_type << "\n";
  778|    518|  return sstr.str();
  779|    518|}
_ZN8Box_icef5parseER14BitstreamRangePK20heif_security_limits:
  798|    964|{
  799|    964|  parse_full_box_header(range);
  800|       |
  801|    964|  if (get_version() != 0) {
  ------------------
  |  Branch (801:7): [True: 6, False: 958]
  ------------------
  802|      6|    return unsupported_version_error("icef");
  803|      6|  }
  804|    958|  uint8_t codes = range.read8();
  805|    958|  uint8_t unit_offset_code = (codes & 0b11100000) >> 5;
  806|    958|  uint8_t unit_size_code = (codes & 0b00011100) >> 2;
  807|    958|  uint32_t num_compressed_units = range.read32();
  808|    958|  uint64_t implied_offset = 0;
  809|       |
  810|    958|  if (unit_offset_code > 4) {
  ------------------
  |  Branch (810:7): [True: 4, False: 954]
  ------------------
  811|      4|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit offset code"};
  812|      4|  }
  813|       |
  814|    954|  if (unit_size_code > 4) {
  ------------------
  |  Branch (814:7): [True: 6, False: 948]
  ------------------
  815|      6|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit size code"};
  816|      6|  }
  817|       |
  818|       |  // --- precompute fields lengths
  819|       |
  820|    948|  uint8_t unit_offset_bits = unit_offset_bits_table[unit_offset_code];
  821|    948|  uint8_t unit_size_bits = unit_size_bits_table[unit_size_code];
  822|       |
  823|       |  // --- check if box is large enough for all the data
  824|       |
  825|       |  // range.get_remaining_bytes() is bounded by the real file size: Box::read() rejects any box whose
  826|       |  // declared size exceeds either the bytes actually available in the file (wait_for_available_bytes())
  827|       |  // or the parent box's remaining bytes. So this check already prevents an unbounded allocation:
  828|       |  // num_compressed_units cannot exceed the bytes present in the file.
  829|       |  // It is, however, not sufficient on its own. With unit_offset_code==0 and unit_size_code==0 a unit
  830|       |  // occupies only 1 byte in the file but allocates a 16-byte CompressedUnitInfo, a ~16x amplification
  831|       |  // that bypasses the configured memory budget. The alloc() below therefore additionally enforces the
  832|       |  // security limits (mirroring Box_snuc).
  833|       |
  834|    948|  uint64_t data_size_bytes = static_cast<uint64_t>(num_compressed_units) * (unit_offset_bits + unit_size_bits) / 8;
  835|    948|  if (data_size_bytes > range.get_remaining_bytes()) {
  ------------------
  |  Branch (835:7): [True: 47, False: 901]
  ------------------
  836|     47|    uint64_t contained_units = range.get_remaining_bytes() / ((unit_offset_bits + unit_size_bits) * 8);
  837|     47|    std::stringstream sstr;
  838|     47|    sstr << "icef box declares " << num_compressed_units << " units, but only " << contained_units
  839|     47|         << " were contained in the file";
  840|     47|    return {heif_error_Invalid_input,
  841|     47|            heif_suberror_End_of_data,
  842|     47|            sstr.str()};
  843|     47|  }
  844|       |
  845|       |  // --- read box content
  846|       |
  847|    901|  if (auto err = m_memory_handle.alloc(num_compressed_units, sizeof(CompressedUnitInfo),
  ------------------
  |  Branch (847:12): [True: 0, False: 901]
  ------------------
  848|    901|                                       limits, "icef box compressed unit infos")) {
  849|      0|    return err;
  850|      0|  }
  851|       |
  852|    901|  m_unit_infos.resize(num_compressed_units);
  853|       |
  854|  1.79M|  for (uint32_t r = 0; r < num_compressed_units; r++) {
  ------------------
  |  Branch (854:24): [True: 1.78M, False: 891]
  ------------------
  855|  1.78M|    CompressedUnitInfo unitInfo;
  856|  1.78M|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (856:9): [True: 1.78M, False: 469]
  ------------------
  857|  1.78M|      unitInfo.unit_offset = implied_offset;
  858|  1.78M|    } else {
  859|    469|      unitInfo.unit_offset = range.read_uint(unit_offset_bits);
  860|    469|    }
  861|       |
  862|  1.78M|    unitInfo.unit_size = range.read_uint(unit_size_bits);
  863|       |
  864|       |    // Reject unit_offset + unit_size wrapping past the 64 bit range.
  865|  1.78M|    if (unitInfo.unit_size >= UINT64_MAX - unitInfo.unit_offset) {
  ------------------
  |  Branch (865:9): [True: 10, False: 1.78M]
  ------------------
  866|     10|      return {heif_error_Invalid_input,
  867|     10|              heif_suberror_Invalid_parameter_value,
  868|     10|              "icef unit offset + size exceeds 64 bit range"};
  869|     10|    }
  870|       |
  871|       |    // implied_offset is only used as unit_offset when unit_offset_code==0.
  872|       |    // Accumulating it for other offset codes would be unused and could overflow, so only do it if needed.
  873|  1.78M|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (873:9): [True: 1.78M, False: 467]
  ------------------
  874|  1.78M|      implied_offset += unitInfo.unit_size;
  875|  1.78M|    }
  876|       |
  877|  1.78M|    if (range.get_error() != Error::Ok) {
  ------------------
  |  Branch (877:9): [True: 0, False: 1.78M]
  ------------------
  878|      0|      return range.get_error();
  879|      0|    }
  880|       |
  881|  1.78M|    m_unit_infos[r] = unitInfo;
  882|  1.78M|  }
  883|       |
  884|    891|  return range.get_error();
  885|    901|}
_ZNK8Box_icef4dumpER6Indent:
  889|    729|{
  890|    729|  std::ostringstream sstr;
  891|    729|  sstr << Box::dump(indent);
  892|    729|  sstr << indent << "num_compressed_units: " << m_unit_infos.size() << "\n";
  893|  1.78M|  for (CompressedUnitInfo unit_info: m_unit_infos) {
  ------------------
  |  Branch (893:36): [True: 1.78M, False: 729]
  ------------------
  894|  1.78M|    sstr << indent << "unit_offset: " << unit_info.unit_offset << ", unit_size: " << unit_info.unit_size << "\n";
  895|  1.78M|  }
  896|    729|  return sstr.str();
  897|    729|}
_ZN8Box_cpat5parseER14BitstreamRangePK20heif_security_limits:
 1014|    879|{
 1015|    879|  parse_full_box_header(range);
 1016|       |
 1017|    879|  if (get_version() != 0) {
  ------------------
  |  Branch (1017:7): [True: 1, False: 878]
  ------------------
 1018|      1|    return unsupported_version_error("cpat");
 1019|      1|  }
 1020|       |
 1021|    878|  m_pattern.pattern_width = range.read16();
 1022|    878|  m_pattern.pattern_height = range.read16();
 1023|       |
 1024|    878|  if (m_pattern.pattern_width == 0 || m_pattern.pattern_height == 0) {
  ------------------
  |  Branch (1024:7): [True: 5, False: 873]
  |  Branch (1024:39): [True: 11, False: 862]
  ------------------
 1025|     16|    return {heif_error_Invalid_input,
 1026|     16|            heif_suberror_Invalid_parameter_value,
 1027|     16|            "Zero Bayer pattern size."};
 1028|     16|  }
 1029|       |
 1030|    862|  auto max_bayer_pattern_size = limits->max_bayer_pattern_pixels;
 1031|    862|  if (max_bayer_pattern_size && m_pattern.pattern_height > max_bayer_pattern_size / m_pattern.pattern_width) {
  ------------------
  |  Branch (1031:7): [True: 862, False: 0]
  |  Branch (1031:33): [True: 7, False: 855]
  ------------------
 1032|      7|    return {heif_error_Invalid_input,
 1033|      7|            heif_suberror_Security_limit_exceeded,
 1034|      7|            "Maximum Bayer pattern size exceeded."};
 1035|      7|  }
 1036|       |
 1037|    855|  size_t num_pixels = size_t{m_pattern.pattern_width} * m_pattern.pattern_height;
 1038|    855|  m_pattern.pixels.resize(num_pixels);
 1039|       |
 1040|  5.44k|  for (size_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1040:22): [True: 4.59k, False: 855]
  ------------------
 1041|  4.59k|    BayerPatternPixelCmpd pixel{};
 1042|  4.59k|    pixel.cmpd_index = range.read32();
 1043|  4.59k|    pixel.component_gain = range.read_float32();
 1044|  4.59k|    m_pattern.pixels[i] = pixel;
 1045|  4.59k|  }
 1046|       |
 1047|    855|  return range.get_error();
 1048|    862|}
_ZNK8Box_cpat4dumpER6Indent:
 1052|    693|{
 1053|    693|  std::ostringstream sstr;
 1054|       |
 1055|    693|  sstr << FullBox::dump(indent);
 1056|    693|  sstr << indent << "pattern_width: " << get_pattern_width() << "\n";
 1057|    693|  sstr << indent << "pattern_height: " << get_pattern_height() << "\n";
 1058|       |
 1059|  3.02k|  for (const auto& pixel : m_pattern.pixels) {
  ------------------
  |  Branch (1059:26): [True: 3.02k, False: 693]
  ------------------
 1060|  3.02k|    sstr << indent << "component index: " << pixel.cmpd_index << ", gain: " << pixel.component_gain << "\n";
 1061|  3.02k|  }
 1062|    693|  return sstr.str();
 1063|    693|}
_ZN8Box_splz5parseER14BitstreamRangePK20heif_security_limits:
 1091|    446|{
 1092|    446|  parse_full_box_header(range);
 1093|       |
 1094|    446|  if (get_version() != 0) {
  ------------------
  |  Branch (1094:7): [True: 1, False: 445]
  ------------------
 1095|      1|    return unsupported_version_error("splz");
 1096|      1|  }
 1097|       |
 1098|    445|  uint32_t component_count = range.read32();
 1099|    445|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (1099:7): [True: 445, False: 0]
  |  Branch (1099:33): [True: 50, False: 395]
  ------------------
 1100|     50|    return {heif_error_Invalid_input,
 1101|     50|            heif_suberror_Security_limit_exceeded,
 1102|     50|            "Number of components in splz box exceeds the security limits."};
 1103|     50|  }
 1104|       |
 1105|    395|  m_pattern.component_ids.resize(component_count);
 1106|  1.98k|  for (uint32_t i = 0; i < component_count; i++) {
  ------------------
  |  Branch (1106:24): [True: 1.59k, False: 395]
  ------------------
 1107|  1.59k|    m_pattern.component_ids[i] = range.read32();
 1108|  1.59k|  }
 1109|       |
 1110|    395|  m_pattern.pattern_width = range.read16();
 1111|    395|  m_pattern.pattern_height = range.read16();
 1112|       |
 1113|    395|  if (m_pattern.pattern_width == 0 || m_pattern.pattern_height == 0) {
  ------------------
  |  Branch (1113:7): [True: 13, False: 382]
  |  Branch (1113:39): [True: 1, False: 381]
  ------------------
 1114|     14|    return {heif_error_Invalid_input,
 1115|     14|            heif_suberror_Invalid_parameter_value,
 1116|     14|            "Zero polarization pattern size."};
 1117|     14|  }
 1118|       |
 1119|    381|  auto max_pattern_size = limits->max_bayer_pattern_pixels;
 1120|    381|  if (max_pattern_size && m_pattern.pattern_height > max_pattern_size / m_pattern.pattern_width) {
  ------------------
  |  Branch (1120:7): [True: 381, False: 0]
  |  Branch (1120:27): [True: 1, False: 380]
  ------------------
 1121|      1|    return {heif_error_Invalid_input,
 1122|      1|            heif_suberror_Security_limit_exceeded,
 1123|      1|            "Maximum polarization pattern size exceeded."};
 1124|      1|  }
 1125|       |
 1126|    380|  size_t num_pixels = size_t{m_pattern.pattern_width} * m_pattern.pattern_height;
 1127|    380|  m_pattern.polarization_angles.resize(num_pixels);
 1128|       |
 1129|  13.3k|  for (size_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1129:22): [True: 12.9k, False: 380]
  ------------------
 1130|  12.9k|    m_pattern.polarization_angles[i] = range.read_float32();
 1131|  12.9k|  }
 1132|       |
 1133|    380|  return range.get_error();
 1134|    381|}
_ZNK8Box_splz4dumpER6Indent:
 1138|    345|{
 1139|    345|  std::ostringstream sstr;
 1140|       |
 1141|    345|  sstr << FullBox::dump(indent);
 1142|       |
 1143|    345|  sstr << indent << "component_count: " << m_pattern.component_ids.size() << "\n";
 1144|  1.17k|  for (size_t i = 0; i < m_pattern.component_ids.size(); i++) {
  ------------------
  |  Branch (1144:22): [True: 829, False: 345]
  ------------------
 1145|    829|    sstr << indent << "  component_index[" << i << "]: " << m_pattern.component_ids[i] << "\n";
 1146|    829|  }
 1147|       |
 1148|    345|  sstr << indent << "pattern_width: " << m_pattern.pattern_width << "\n";
 1149|    345|  sstr << indent << "pattern_height: " << m_pattern.pattern_height << "\n";
 1150|       |
 1151|  4.47k|  for (uint16_t y = 0; y < m_pattern.pattern_height; y++) {
  ------------------
  |  Branch (1151:24): [True: 4.13k, False: 345]
  ------------------
 1152|  16.0k|    for (uint16_t x = 0; x < m_pattern.pattern_width; x++) {
  ------------------
  |  Branch (1152:26): [True: 11.9k, False: 4.13k]
  ------------------
 1153|  11.9k|      float angle = m_pattern.polarization_angles[y * m_pattern.pattern_width + x];
 1154|  11.9k|      if (heif_polarization_angle_is_no_filter(angle)) {
  ------------------
  |  Branch (1154:11): [True: 970, False: 10.9k]
  ------------------
 1155|    970|        sstr << indent << "  [" << x << "," << y << "]: no filter\n";
 1156|    970|      }
 1157|  10.9k|      else {
 1158|  10.9k|        sstr << indent << "  [" << x << "," << y << "]: " << angle << " degrees\n";
 1159|  10.9k|      }
 1160|  11.9k|    }
 1161|  4.13k|  }
 1162|       |
 1163|    345|  return sstr.str();
 1164|    345|}
_ZN8Box_sbpm5parseER14BitstreamRangePK20heif_security_limits:
 1196|    539|{
 1197|    539|  parse_full_box_header(range);
 1198|       |
 1199|    539|  if (get_version() != 0) {
  ------------------
  |  Branch (1199:7): [True: 8, False: 531]
  ------------------
 1200|      8|    return unsupported_version_error("sbpm");
 1201|      8|  }
 1202|       |
 1203|    531|  uint32_t component_count = range.read32();
 1204|       |
 1205|    531|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (1205:7): [True: 531, False: 0]
  |  Branch (1205:33): [True: 43, False: 488]
  ------------------
 1206|     43|    return {heif_error_Invalid_input,
 1207|     43|            heif_suberror_Security_limit_exceeded,
 1208|     43|            "sbpm component_count exceeds security limit."};
 1209|     43|  }
 1210|       |
 1211|    488|  m_map.component_ids.resize(component_count);
 1212|  2.18k|  for (uint32_t i = 0; i < component_count; i++) {
  ------------------
  |  Branch (1212:24): [True: 1.70k, False: 488]
  ------------------
 1213|  1.70k|    m_map.component_ids[i] = range.read32();
 1214|  1.70k|  }
 1215|       |
 1216|    488|  uint8_t flags = range.read8();
 1217|    488|  m_map.correction_applied = !!(flags & 0x80);
 1218|       |
 1219|    488|  uint32_t num_bad_rows = range.read32();
 1220|    488|  uint32_t num_bad_cols = range.read32();
 1221|    488|  uint32_t num_bad_pixels = range.read32();
 1222|       |
 1223|       |  // Security check: limit total number of entries
 1224|    488|  uint64_t total_entries = static_cast<uint64_t>(num_bad_rows) + num_bad_cols + num_bad_pixels;
 1225|    488|  if (limits->max_bad_pixels && total_entries > limits->max_bad_pixels) {
  ------------------
  |  Branch (1225:7): [True: 488, False: 0]
  |  Branch (1225:33): [True: 5, False: 483]
  ------------------
 1226|      5|    return {heif_error_Invalid_input,
 1227|      5|            heif_suberror_Security_limit_exceeded,
 1228|      5|            "sbpm total bad pixel entries exceed security limit."};
 1229|      5|  }
 1230|       |
 1231|    483|  m_map.bad_rows.resize(num_bad_rows);
 1232|  5.59k|  for (uint32_t i = 0; i < num_bad_rows; i++) {
  ------------------
  |  Branch (1232:24): [True: 5.11k, False: 483]
  ------------------
 1233|  5.11k|    m_map.bad_rows[i] = range.read32();
 1234|  5.11k|  }
 1235|       |
 1236|    483|  m_map.bad_columns.resize(num_bad_cols);
 1237|  5.97k|  for (uint32_t i = 0; i < num_bad_cols; i++) {
  ------------------
  |  Branch (1237:24): [True: 5.49k, False: 483]
  ------------------
 1238|  5.49k|    m_map.bad_columns[i] = range.read32();
 1239|  5.49k|  }
 1240|       |
 1241|    483|  m_map.bad_pixels.resize(num_bad_pixels);
 1242|  3.96k|  for (uint32_t i = 0; i < num_bad_pixels; i++) {
  ------------------
  |  Branch (1242:24): [True: 3.47k, False: 483]
  ------------------
 1243|  3.47k|    m_map.bad_pixels[i].row = range.read32();
 1244|  3.47k|    m_map.bad_pixels[i].column = range.read32();
 1245|  3.47k|  }
 1246|       |
 1247|    483|  return range.get_error();
 1248|    488|}
_ZNK8Box_sbpm4dumpER6Indent:
 1252|    385|{
 1253|    385|  std::ostringstream sstr;
 1254|       |
 1255|    385|  sstr << FullBox::dump(indent);
 1256|       |
 1257|    385|  sstr << indent << "component_count: " << m_map.component_ids.size() << "\n";
 1258|  1.10k|  for (size_t i = 0; i < m_map.component_ids.size(); i++) {
  ------------------
  |  Branch (1258:22): [True: 722, False: 385]
  ------------------
 1259|    722|    sstr << indent << "  component_index[" << i << "]: " << m_map.component_ids[i] << "\n";
 1260|    722|  }
 1261|       |
 1262|    385|  sstr << indent << "correction_applied: " << m_map.correction_applied << "\n";
 1263|       |
 1264|    385|  sstr << indent << "num_bad_rows: " << m_map.bad_rows.size() << "\n";
 1265|  1.53k|  for (size_t i = 0; i < m_map.bad_rows.size(); i++) {
  ------------------
  |  Branch (1265:22): [True: 1.15k, False: 385]
  ------------------
 1266|  1.15k|    sstr << indent << "  bad_row[" << i << "]: " << m_map.bad_rows[i] << "\n";
 1267|  1.15k|  }
 1268|       |
 1269|    385|  sstr << indent << "num_bad_columns: " << m_map.bad_columns.size() << "\n";
 1270|  2.82k|  for (size_t i = 0; i < m_map.bad_columns.size(); i++) {
  ------------------
  |  Branch (1270:22): [True: 2.44k, False: 385]
  ------------------
 1271|  2.44k|    sstr << indent << "  bad_column[" << i << "]: " << m_map.bad_columns[i] << "\n";
 1272|  2.44k|  }
 1273|       |
 1274|    385|  sstr << indent << "num_bad_pixels: " << m_map.bad_pixels.size() << "\n";
 1275|  1.45k|  for (size_t i = 0; i < m_map.bad_pixels.size(); i++) {
  ------------------
  |  Branch (1275:22): [True: 1.07k, False: 385]
  ------------------
 1276|  1.07k|    sstr << indent << "  bad_pixel[" << i << "]: row=" << m_map.bad_pixels[i].row
 1277|  1.07k|         << ", column=" << m_map.bad_pixels[i].column << "\n";
 1278|  1.07k|  }
 1279|       |
 1280|    385|  return sstr.str();
 1281|    385|}
_ZN8Box_snuc5parseER14BitstreamRangePK20heif_security_limits:
 1320|    323|{
 1321|    323|  parse_full_box_header(range);
 1322|       |
 1323|    323|  if (get_version() != 0) {
  ------------------
  |  Branch (1323:7): [True: 1, False: 322]
  ------------------
 1324|      1|    return unsupported_version_error("snuc");
 1325|      1|  }
 1326|       |
 1327|    322|  uint32_t component_count = range.read32();
 1328|       |
 1329|    322|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (1329:7): [True: 322, False: 0]
  |  Branch (1329:33): [True: 1, False: 321]
  ------------------
 1330|      1|    return {heif_error_Invalid_input,
 1331|      1|            heif_suberror_Security_limit_exceeded,
 1332|      1|            "snuc component_count exceeds security limit."};
 1333|      1|  }
 1334|       |
 1335|    321|  m_nuc.component_ids.resize(component_count);
 1336|  3.21k|  for (uint32_t i = 0; i < component_count; i++) {
  ------------------
  |  Branch (1336:24): [True: 2.89k, False: 321]
  ------------------
 1337|  2.89k|    m_nuc.component_ids[i] = range.read32();
 1338|  2.89k|  }
 1339|       |
 1340|    321|  uint8_t flags = range.read8();
 1341|    321|  m_nuc.nuc_is_applied = !!(flags & 0x80);
 1342|       |
 1343|    321|  m_nuc.image_width = range.read32();
 1344|    321|  m_nuc.image_height = range.read32();
 1345|       |
 1346|    321|  if (m_nuc.image_width == 0 || m_nuc.image_height == 0) {
  ------------------
  |  Branch (1346:7): [True: 16, False: 305]
  |  Branch (1346:33): [True: 21, False: 284]
  ------------------
 1347|     37|    return {heif_error_Invalid_input,
 1348|     37|            heif_suberror_Invalid_parameter_value,
 1349|     37|            "snuc image width and height must be non-zero."};
 1350|     37|  }
 1351|       |
 1352|    284|  uint64_t num_pixels = static_cast<uint64_t>(m_nuc.image_width) * m_nuc.image_height;
 1353|       |
 1354|    284|  if (limits->max_image_size_pixels && num_pixels > limits->max_image_size_pixels) {
  ------------------
  |  Branch (1354:7): [True: 284, False: 0]
  |  Branch (1354:40): [True: 88, False: 196]
  ------------------
 1355|     88|    return {heif_error_Invalid_input,
 1356|     88|            heif_suberror_Security_limit_exceeded,
 1357|     88|            "snuc image dimensions exceed security limit."};
 1358|     88|  }
 1359|       |
 1360|    196|  Error err = m_memory_handle.alloc(num_pixels, 2 * sizeof(float), limits, "snuc box");
 1361|    196|  if (err) {
  ------------------
  |  Branch (1361:7): [True: 8, False: 188]
  ------------------
 1362|      8|    return err;
 1363|      8|  }
 1364|       |
 1365|    188|  m_nuc.nuc_gains.resize(num_pixels);
 1366|   496M|  for (uint64_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1366:24): [True: 496M, False: 188]
  ------------------
 1367|   496M|    m_nuc.nuc_gains[i] = range.read_float32();
 1368|   496M|  }
 1369|       |
 1370|    188|  m_nuc.nuc_offsets.resize(num_pixels);
 1371|   496M|  for (uint64_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1371:24): [True: 496M, False: 188]
  ------------------
 1372|   496M|    m_nuc.nuc_offsets[i] = range.read_float32();
 1373|   496M|  }
 1374|       |
 1375|    188|  return range.get_error();
 1376|    196|}
_ZNK8Box_snuc4dumpER6Indent:
 1380|    128|{
 1381|    128|  std::ostringstream sstr;
 1382|       |
 1383|    128|  sstr << FullBox::dump(indent);
 1384|       |
 1385|    128|  sstr << indent << "component_count: " << m_nuc.component_ids.size() << "\n";
 1386|  1.58k|  for (size_t i = 0; i < m_nuc.component_ids.size(); i++) {
  ------------------
  |  Branch (1386:22): [True: 1.46k, False: 128]
  ------------------
 1387|  1.46k|    sstr << indent << "  component_index[" << i << "]: " << m_nuc.component_ids[i] << "\n";
 1388|  1.46k|  }
 1389|       |
 1390|    128|  sstr << indent << "nuc_is_applied: " << m_nuc.nuc_is_applied << "\n";
 1391|    128|  sstr << indent << "image_width: " << m_nuc.image_width << "\n";
 1392|    128|  sstr << indent << "image_height: " << m_nuc.image_height << "\n";
 1393|       |
 1394|    128|  uint64_t num_pixels = static_cast<uint64_t>(m_nuc.image_width) * m_nuc.image_height;
 1395|    128|  sstr << indent << "nuc_gains: " << num_pixels << " values\n";
 1396|    128|  sstr << indent << "nuc_offsets: " << num_pixels << " values\n";
 1397|       |
 1398|    128|  return sstr.str();
 1399|    128|}
_ZN8Box_cloc5parseER14BitstreamRangePK20heif_security_limits:
 1432|    203|{
 1433|    203|  parse_full_box_header(range);
 1434|       |
 1435|    203|  if (get_version() != 0) {
  ------------------
  |  Branch (1435:7): [True: 9, False: 194]
  ------------------
 1436|      9|    return unsupported_version_error("cloc");
 1437|      9|  }
 1438|       |
 1439|    194|  m_chroma_location = range.read8();
 1440|       |
 1441|    194|  if (m_chroma_location > 6) {
  ------------------
  |  Branch (1441:7): [True: 4, False: 190]
  ------------------
 1442|      4|    return {heif_error_Invalid_input,
 1443|      4|            heif_suberror_Invalid_parameter_value,
 1444|      4|            "cloc chroma_location value out of range (must be 0-6)."};
 1445|      4|  }
 1446|       |
 1447|    190|  return range.get_error();
 1448|    194|}
_ZNK8Box_cloc4dumpER6Indent:
 1452|    170|{
 1453|    170|  std::ostringstream sstr;
 1454|       |
 1455|    170|  sstr << FullBox::dump(indent);
 1456|       |
 1457|    170|  static const char* location_names[] = {
 1458|    170|    "h=0,   v=0.5",   // 0
 1459|    170|    "h=0.5, v=0.5",   // 1
 1460|    170|    "h=0,   v=0",     // 2
 1461|    170|    "h=0.5, v=0",     // 3
 1462|    170|    "h=0,   v=1",     // 4
 1463|    170|    "h=0.5, v=1",     // 5
 1464|    170|    "Cr:0,0 / Cb:1,0" // 6
 1465|    170|  };
 1466|       |
 1467|    170|  sstr << indent << "chroma_location: " << static_cast<int>(m_chroma_location);
 1468|    170|  if (m_chroma_location <= 6) {
  ------------------
  |  Branch (1468:7): [True: 170, False: 0]
  ------------------
 1469|    170|    sstr << " (" << location_names[m_chroma_location] << ")";
 1470|    170|  }
 1471|    170|  sstr << "\n";
 1472|       |
 1473|    170|  return sstr.str();
 1474|    170|}
_ZN30Box_gimi_component_content_ids5parseER14BitstreamRangePK20heif_security_limits:
 1490|    570|{
 1491|    570|  uint32_t number_of_components = range.read32();
 1492|       |
 1493|    570|  if (limits->max_components && number_of_components > limits->max_components) {
  ------------------
  |  Branch (1493:7): [True: 570, False: 0]
  |  Branch (1493:33): [True: 94, False: 476]
  ------------------
 1494|     94|    std::stringstream sstr;
 1495|     94|    sstr << "GIMI component content IDs box contains " << number_of_components
 1496|     94|         << " components, but security limit is set to " << limits->max_components << " components";
 1497|     94|    return {heif_error_Invalid_input,
 1498|     94|            heif_suberror_Security_limit_exceeded,
 1499|     94|            sstr.str()};
 1500|     94|  }
 1501|       |
 1502|  4.28k|  for (uint32_t i = 0; i < number_of_components; i++) {
  ------------------
  |  Branch (1502:24): [True: 3.88k, False: 399]
  ------------------
 1503|  3.88k|    if (range.eof()) {
  ------------------
  |  Branch (1503:9): [True: 77, False: 3.81k]
  ------------------
 1504|     77|      return {heif_error_Invalid_input,
 1505|     77|              heif_suberror_End_of_data,
 1506|     77|              "Not enough data for all component content IDs"};
 1507|     77|    }
 1508|  3.81k|    m_content_ids.push_back(range.read_string());
 1509|  3.81k|  }
 1510|       |
 1511|    399|  return range.get_error();
 1512|    476|}
_ZNK30Box_gimi_component_content_ids4dumpER6Indent:
 1532|    379|{
 1533|    379|  std::ostringstream sstr;
 1534|    379|  sstr << Box::dump(indent);
 1535|       |
 1536|  3.23k|  for (size_t i = 0; i < m_content_ids.size(); i++) {
  ------------------
  |  Branch (1536:22): [True: 2.85k, False: 379]
  ------------------
 1537|  2.85k|    sstr << indent << "[" << i << "] content ID: " << m_content_ids[i] << "\n";
 1538|  2.85k|  }
 1539|       |
 1540|    379|  return sstr.str();
 1541|    379|}
_Z8get_nameI24heif_cmpd_component_typeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|  3.14k|{
  124|  3.14k|  auto iter = table.find(val);
  125|  3.14k|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 3.14k]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|  3.14k|  else {
  129|  3.14k|    return iter->second;
  130|  3.14k|  }
  131|  3.14k|}
_Z8get_nameI34heif_uncompressed_component_formatEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|  1.41k|{
  124|  1.41k|  auto iter = table.find(val);
  125|  1.41k|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 1.41k]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|  1.41k|  else {
  129|  1.41k|    return iter->second;
  130|  1.41k|  }
  131|  1.41k|}
_Z8get_nameI31heif_uncompressed_sampling_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|    454|{
  124|    454|  auto iter = table.find(val);
  125|    454|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 454]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    454|  else {
  129|    454|    return iter->second;
  130|    454|  }
  131|    454|}
_Z8get_nameI33heif_uncompressed_interleave_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|    454|{
  124|    454|  auto iter = table.find(val);
  125|    454|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 454]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    454|  else {
  129|    454|    return iter->second;
  130|    454|  }
  131|    454|}

_ZN8Box_cmpdC2Ev:
   45|  1.24k|  {
   46|  1.24k|    set_short_type(fourcc("cmpd"));
   47|  1.24k|  }
_ZN8Box_uncCC2Ev:
   90|  4.15k|  Box_uncC() {
   91|  4.15k|    set_short_type(fourcc("uncC"));
   92|  4.15k|  }
_ZN8Box_cmpCC2Ev:
  270|    661|  {
  271|    661|    set_short_type(fourcc("cmpC"));
  272|    661|  }
_ZN8Box_icefC2Ev:
  304|    969|  {
  305|    969|    set_short_type(fourcc("icef"));
  306|    969|  }
_ZN8Box_cpatC2Ev:
  359|    884|  {
  360|    884|    set_short_type(fourcc("cpat"));
  361|    884|  }
_ZN8Box_splzC2Ev:
  394|    453|  Box_splz() { set_short_type(fourcc("splz")); }
_ZN8Box_sbpmC2Ev:
  423|    543|  Box_sbpm() { set_short_type(fourcc("sbpm")); }
_ZN8Box_snucC2Ev:
  449|    325|  Box_snuc() { set_short_type(fourcc("snuc")); }
_ZN8Box_clocC2Ev:
  475|    206|  Box_cloc() { set_short_type(fourcc("cloc")); }
_ZN8Box_uncvC2Ev:
  498|    517|  {
  499|    517|    set_short_type(fourcc("uncv"));
  500|    517|  }
_ZN30Box_gimi_component_content_idsC2Ev:
  516|    572|  {
  517|    572|    set_uuid_type(std::vector<uint8_t>{0x9d, 0xb9, 0xdd, 0x6e, 0x37, 0x3c, 0x5a, 0x4e,
  518|    572|                                       0x81, 0x10, 0x21, 0xfc, 0x83, 0xa9, 0x11, 0xfd});
  519|    572|  }
_ZNK8Box_cmpd9Component23get_component_type_nameEv:
   60|  7.55k|    std::string get_component_type_name() const { return get_component_type_name(component_type); }
_ZNK8Box_cpat17get_pattern_widthEv:
  363|    693|  uint16_t get_pattern_width() const { return m_pattern.pattern_width; }
_ZNK8Box_cpat18get_pattern_heightEv:
  365|    693|  uint16_t get_pattern_height() const { return m_pattern.pattern_height; }
_ZNK30Box_gimi_component_content_ids14debug_box_nameEv:
  527|    379|  const char* debug_box_name() const override { return "GIMI Component Content IDs"; }
_ZNK30Box_gimi_component_content_ids24get_parse_error_fatalityEv:
  533|    172|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }

_ZN8Box_vvcC5parseER14BitstreamRangePK20heif_security_limits:
   34|  2.57k|{
   35|  2.57k|  parse_full_box_header(range);
   36|       |
   37|  2.57k|  uint8_t byte;
   38|       |
   39|  2.57k|  auto& c = m_configuration; // abbreviation
   40|       |
   41|  2.57k|  byte = range.read8();
   42|       |
   43|  2.57k|  c.LengthSizeMinusOne = (byte >> 1) & 3;
   44|  2.57k|  c.ptl_present_flag = !!(byte & 1);
   45|       |
   46|  2.57k|  if (c.ptl_present_flag) {
  ------------------
  |  Branch (46:7): [True: 2.57k, False: 4]
  ------------------
   47|  2.57k|    uint16_t word = range.read16();
   48|  2.57k|    c.ols_idx = (word >> 7) & 0x1FF;
   49|  2.57k|    c.num_sublayers = (word >> 4) & 0x07;
   50|  2.57k|    c.constant_frame_rate = (word >> 2) & 0x03;
   51|  2.57k|    c.chroma_format_idc = word & 0x03;
   52|       |
   53|  2.57k|    byte = range.read8();
   54|  2.57k|    c.bit_depth_minus8 = (byte >> 5) & 0x07;
   55|       |
   56|       |    // VvcPTLRecord
   57|       |
   58|  2.57k|    auto& ptl = c.native_ptl; // abbreviation
   59|       |
   60|  2.57k|    byte = range.read8();
   61|  2.57k|    ptl.num_bytes_constraint_info = byte & 0x3f;
   62|       |
   63|  2.57k|    if (ptl.num_bytes_constraint_info == 0) {
  ------------------
  |  Branch (63:9): [True: 1, False: 2.56k]
  ------------------
   64|      1|      return {heif_error_Invalid_input,
   65|      1|              heif_suberror_Invalid_parameter_value,
   66|      1|              "vvcC with num_bytes_constraint_info==0 is not allowed."};
   67|      1|    }
   68|       |
   69|  2.56k|    byte = range.read8();
   70|  2.56k|    ptl.general_profile_idc = (byte >> 1) & 0x7f;
   71|  2.56k|    ptl.general_tier_flag = (byte & 1);
   72|       |
   73|  2.56k|    ptl.general_level_idc = range.read8();
   74|       |
   75|  15.4k|    for (int i = 0; i < ptl.num_bytes_constraint_info; i++) {
  ------------------
  |  Branch (75:21): [True: 12.9k, False: 2.56k]
  ------------------
   76|  12.9k|      byte = range.read8();
   77|  12.9k|      if (i == 0) {
  ------------------
  |  Branch (77:11): [True: 2.56k, False: 10.3k]
  ------------------
   78|  2.56k|        ptl.ptl_frame_only_constraint_flag = (byte >> 7) & 1;
   79|  2.56k|        ptl.ptl_multi_layer_enabled_flag = (byte >> 6) & 1;
   80|  2.56k|        byte &= 0x3f;
   81|  2.56k|      }
   82|       |
   83|  12.9k|      ptl.general_constraint_info.push_back(byte);
   84|  12.9k|    }
   85|       |
   86|  2.56k|    if (c.num_sublayers > 1) {
  ------------------
  |  Branch (86:9): [True: 992, False: 1.57k]
  ------------------
   87|    992|      ptl.ptl_sublayer_level_present_flag.resize(c.num_sublayers - 1);
   88|       |
   89|    992|      byte = range.read8();
   90|    992|      uint8_t mask = 0x80;
   91|       |
   92|  6.72k|      for (int i = c.num_sublayers - 2; i >= 0; i--) {
  ------------------
  |  Branch (92:41): [True: 5.73k, False: 992]
  ------------------
   93|  5.73k|        ptl.ptl_sublayer_level_present_flag[i] = !!(byte & mask);
   94|  5.73k|        mask >>= 1;
   95|  5.73k|      }
   96|    992|    }
   97|       |
   98|  2.56k|    ptl.sublayer_level_idc.resize(c.num_sublayers);
   99|  2.56k|    if (c.num_sublayers > 0) {
  ------------------
  |  Branch (99:9): [True: 1.08k, False: 1.48k]
  ------------------
  100|  1.08k|      ptl.sublayer_level_idc[c.num_sublayers - 1] = ptl.general_level_idc;
  101|       |
  102|  6.81k|      for (int i = c.num_sublayers - 2; i >= 0; i--) {
  ------------------
  |  Branch (102:41): [True: 5.73k, False: 1.08k]
  ------------------
  103|  5.73k|        if (ptl.ptl_sublayer_level_present_flag[i]) {
  ------------------
  |  Branch (103:13): [True: 2.37k, False: 3.35k]
  ------------------
  104|  2.37k|          ptl.sublayer_level_idc[i] = range.read8();
  105|  2.37k|        }
  106|  3.35k|        else {
  107|  3.35k|          ptl.sublayer_level_idc[i] = ptl.sublayer_level_idc[i + 1];
  108|  3.35k|        }
  109|  5.73k|      }
  110|  1.08k|    }
  111|       |
  112|  2.56k|    uint8_t ptl_num_sub_profiles = range.read8();
  113|  6.35k|    for (int j=0; j < ptl_num_sub_profiles; j++) {
  ------------------
  |  Branch (113:19): [True: 3.78k, False: 2.56k]
  ------------------
  114|  3.78k|      ptl.general_sub_profile_idc.push_back(range.read32());
  115|  3.78k|    }
  116|       |
  117|       |
  118|       |    // remaining fields
  119|       |
  120|  2.56k|    c.max_picture_width = range.read16();
  121|  2.56k|    c.max_picture_height = range.read16();
  122|  2.56k|    c.avg_frame_rate = range.read16();
  123|  2.56k|  }
  124|      4|  else {
  125|      4|    return Error{
  126|      4|      heif_error_Unsupported_feature,
  127|      4|      heif_suberror_Unspecified,
  128|      4|      "Reading vvcC configuration with ptl_present_flag=0 is not supported."
  129|      4|    };
  130|      4|  }
  131|       |
  132|       |  // read NAL arrays
  133|       |
  134|  2.56k|  int nArrays = range.read8();
  135|       |
  136|  7.15k|  for (int i = 0; i < nArrays && !range.error(); i++) {
  ------------------
  |  Branch (136:19): [True: 4.63k, False: 2.51k]
  |  Branch (136:34): [True: 4.58k, False: 56]
  ------------------
  137|  4.58k|    byte = range.read8();
  138|       |
  139|  4.58k|    NalArray array;
  140|       |
  141|  4.58k|    array.m_array_completeness = (byte >> 7) & 1;
  142|  4.58k|    array.m_NAL_unit_type = (byte & 0x3F);
  143|       |
  144|  4.58k|    int nUnits = range.read16();
  145|   188k|    for (int u = 0; u < nUnits && !range.error(); u++) {
  ------------------
  |  Branch (145:21): [True: 184k, False: 4.53k]
  |  Branch (145:35): [True: 184k, False: 46]
  ------------------
  146|       |
  147|   184k|      std::vector<uint8_t> nal_unit;
  148|   184k|      int size = range.read16();
  149|   184k|      if (!size) {
  ------------------
  |  Branch (149:11): [True: 173k, False: 11.1k]
  ------------------
  150|       |        // Ignore empty NAL units.
  151|   173k|        continue;
  152|   173k|      }
  153|       |
  154|  11.1k|      if (range.prepare_read(size)) {
  ------------------
  |  Branch (154:11): [True: 11.1k, False: 27]
  ------------------
  155|  11.1k|        nal_unit.resize(size);
  156|  11.1k|        bool success = range.get_istream()->read((char*) nal_unit.data(), size);
  157|  11.1k|        if (!success) {
  ------------------
  |  Branch (157:13): [True: 0, False: 11.1k]
  ------------------
  158|      0|          return Error{heif_error_Invalid_input, heif_suberror_End_of_data, "error while reading hvcC box"};
  159|      0|        }
  160|  11.1k|      }
  161|       |
  162|  11.1k|      array.m_nal_units.push_back(std::move(nal_unit));
  163|  11.1k|    }
  164|       |
  165|  4.58k|    m_nal_array.push_back(std::move(array));
  166|  4.58k|  }
  167|       |
  168|  2.56k|  return range.get_error();
  169|  2.56k|}
_Z8NAL_nameh:
  354|  3.74k|{
  355|  3.74k|  switch (nal_type) {
  356|     93|    case 12: return "OPI";
  ------------------
  |  Branch (356:5): [True: 93, False: 3.64k]
  ------------------
  357|      9|    case 13: return "DCI";
  ------------------
  |  Branch (357:5): [True: 9, False: 3.73k]
  ------------------
  358|      6|    case 14: return "VPS";
  ------------------
  |  Branch (358:5): [True: 6, False: 3.73k]
  ------------------
  359|     84|    case 15: return "SPS";
  ------------------
  |  Branch (359:5): [True: 84, False: 3.65k]
  ------------------
  360|     24|    case 16: return "PPS";
  ------------------
  |  Branch (360:5): [True: 24, False: 3.71k]
  ------------------
  361|     14|    case 17: return "PREFIX_APS";
  ------------------
  |  Branch (361:5): [True: 14, False: 3.72k]
  ------------------
  362|    155|    case 18: return "SUFFIX_APS";
  ------------------
  |  Branch (362:5): [True: 155, False: 3.58k]
  ------------------
  363|      8|    case 19: return "PH";
  ------------------
  |  Branch (363:5): [True: 8, False: 3.73k]
  ------------------
  364|  3.34k|    default: return "?";
  ------------------
  |  Branch (364:5): [True: 3.34k, False: 393]
  ------------------
  365|  3.74k|  }
  366|  3.74k|}
_ZNK8Box_vvcC4dumpER6Indent:
  370|  2.26k|{
  371|  2.26k|  std::ostringstream sstr;
  372|  2.26k|  sstr << FullBox::dump(indent);
  373|       |
  374|  2.26k|  const auto& c = m_configuration; // abbreviation
  375|       |
  376|  2.26k|  sstr << indent << "NAL length size: " << ((int) c.LengthSizeMinusOne + 1) << "\n";
  377|  2.26k|  if (c.ptl_present_flag) {
  ------------------
  |  Branch (377:7): [True: 2.26k, False: 0]
  ------------------
  378|  2.26k|    const auto& ptl = c.native_ptl;
  379|  2.26k|    sstr << indent << "ols-index: " << c.ols_idx << "\n"
  380|  2.26k|         << indent << "num sublayers: " << ((int) c.num_sublayers) << "\n"
  381|  2.26k|         << indent << "constant frame rate: " << (c.constant_frame_rate == 1 ? "constant" : (c.constant_frame_rate == 2 ? "multi-layer" : "unknown")) << "\n"
  ------------------
  |  Branch (381:51): [True: 1.23k, False: 1.03k]
  |  Branch (381:94): [True: 66, False: 967]
  ------------------
  382|  2.26k|         << indent << "chroma-format: " << vvc_chroma_names[c.chroma_format_idc] << "\n"
  383|  2.26k|         << indent << "bit-depth: " << ((int) c.bit_depth_minus8 + 8) << "\n"
  384|  2.26k|         << indent << "max picture width:  " << c.max_picture_width << "\n"
  385|  2.26k|         << indent << "max picture height: " << c.max_picture_height << "\n";
  386|       |
  387|  2.26k|    sstr << indent << "general profile: " << ((int)ptl.general_profile_idc) << "\n"
  388|  2.26k|         << indent << "tier flag: " << ((int)ptl.general_tier_flag) << "\n"
  389|  2.26k|         << indent << "general level:" << ((int)ptl.general_level_idc) << "\n"
  390|  2.26k|         << indent << "ptl frame only constraint flag: " << ((int)ptl.ptl_frame_only_constraint_flag) << "\n"
  391|  2.26k|         << indent << "ptl multi layer enabled flag: " << ((int)ptl.ptl_multi_layer_enabled_flag) << "\n";
  392|  2.26k|  }
  393|       |
  394|       |
  395|  2.26k|  sstr << indent << "num of arrays: " << m_nal_array.size() << "\n";
  396|       |
  397|  2.26k|  sstr << indent << "config NALs:\n";
  398|  3.74k|  for (const auto& nal_array : m_nal_array) {
  ------------------
  |  Branch (398:30): [True: 3.74k, False: 2.26k]
  ------------------
  399|  3.74k|    indent++;
  400|  3.74k|    sstr << indent << "NAL type: " << ((int)nal_array.m_NAL_unit_type) << " (" << NAL_name(nal_array.m_NAL_unit_type) << ")\n";
  401|  3.74k|    sstr << indent << "array completeness: " << ((int)nal_array.m_array_completeness) << "\n";
  402|       |
  403|  3.74k|    for (const auto& nal : nal_array.m_nal_units) {
  ------------------
  |  Branch (403:26): [True: 2.99k, False: 3.74k]
  ------------------
  404|  2.99k|      indent++;
  405|  2.99k|      std::string ind = indent.get_string();
  406|  2.99k|      sstr << write_raw_data_as_hex(nal.data(), nal.size(), ind, ind);
  407|  2.99k|      indent--;
  408|  2.99k|    }
  409|  3.74k|    indent--;
  410|  3.74k|  }
  411|       |
  412|  2.26k|  return sstr.str();
  413|  2.26k|}

_ZN8Box_vvcCC2Ev:
   36|  2.57k|  {
   37|  2.57k|    set_short_type(fourcc("vvcC"));
   38|  2.57k|  }
_ZN8Box_vvc1C2Ev:
  115|     83|  {
  116|     83|    set_short_type(fourcc("vvc1"));
  117|     83|  }

_Z16fourcc_to_stringj:
  159|  1.10M|{
  160|  1.10M|  std::string str("    ");
  161|  1.10M|  str[0] = static_cast<char>((code >> 24) & 0xFF);
  162|  1.10M|  str[1] = static_cast<char>((code >> 16) & 0xFF);
  163|  1.10M|  str[2] = static_cast<char>((code >> 8) & 0xFF);
  164|  1.10M|  str[3] = static_cast<char>((code >> 0) & 0xFF);
  165|       |
  166|  1.10M|  return str;
  167|  1.10M|}

_Z20four_bytes_to_uint32hhhh:
   39|  6.12M|{
   40|  6.12M|  return (static_cast<uint32_t>(msb << 24) |
   41|  6.12M|          static_cast<uint32_t>(b << 16) |
   42|  6.12M|          static_cast<uint32_t>(c << 8) |
   43|  6.12M|          static_cast<uint32_t>(lsb));
   44|  6.12M|}
_Z6fourccPKc:
   53|  2.36M|{
   54|  2.36M|  return four_bytes_to_uint32(static_cast<uint8_t>(id[0]),
   55|  2.36M|                              static_cast<uint8_t>(id[1]),
   56|  2.36M|                              static_cast<uint8_t>(id[2]),
   57|  2.36M|                              static_cast<uint8_t>(id[3]));
   58|  2.36M|}

_ZN11HeifContextC2Ev:
  164|  16.4k|    : m_limits(initial_security_limits()),
  165|  16.4k|      m_memory_tracker(&m_limits)
  166|  16.4k|{
  167|       |  // m_limits must be fully initialized above before its address is passed to the memory tracker.
  168|       |  // (m_limits is declared before m_memory_tracker in context.h, so it is constructed first.)
  169|       |
  170|  16.4k|  reset_to_empty_heif();
  171|  16.4k|}
_ZN11HeifContextD2Ev:
  175|  16.4k|{
  176|       |  // Break circular references between Images (when a faulty input image has circular image references)
  177|  16.4k|  for (auto& it : m_all_images) {
  ------------------
  |  Branch (177:17): [True: 0, False: 16.4k]
  ------------------
  178|      0|    std::shared_ptr<ImageItem> image = it.second;
  179|      0|    image->clear();
  180|      0|  }
  181|  16.4k|}
_ZN11HeifContext19reset_to_empty_heifEv:
  290|  16.4k|{
  291|  16.4k|  m_heif_file = std::make_shared<HeifFile>();
  292|  16.4k|  m_heif_file->set_security_limits(&m_limits);
  293|  16.4k|  m_heif_file->new_empty_file();
  294|       |
  295|  16.4k|  m_all_images.clear();
  296|  16.4k|  m_top_level_images.clear();
  297|  16.4k|  m_primary_image.reset();
  298|  16.4k|}
context.cc:_ZL23initial_security_limitsv:
  150|  16.4k|{
  151|  16.4k|  const char* security_limits_variable = getenv("LIBHEIF_SECURITY_LIMITS");
  152|       |
  153|  16.4k|  if (security_limits_variable && (strcmp(security_limits_variable, "off") == 0 ||
  ------------------
  |  Branch (153:7): [True: 0, False: 16.4k]
  |  Branch (153:36): [True: 0, False: 0]
  ------------------
  154|      0|                                   strcmp(security_limits_variable, "OFF") == 0)) {
  ------------------
  |  Branch (154:36): [True: 0, False: 0]
  ------------------
  155|      0|    return disabled_security_limits;
  156|      0|  }
  157|  16.4k|  else {
  158|  16.4k|    return global_security_limits;
  159|  16.4k|  }
  160|  16.4k|}

_ZN11HeifContext19get_security_limitsEv:
   81|   183k|  [[nodiscard]] heif_security_limits* get_security_limits() { return &m_limits; }

_ZN5ErrorC2Ev:
   58|  35.5k|Error::Error() = default;
_ZN5ErrorC2E15heif_error_code18heif_suberror_codeRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   64|  33.0k|    : error_code(c),
   65|  33.0k|      sub_error_code(sc),
   66|  33.0k|      message(msg)
   67|  33.0k|{
   68|  33.0k|}

_ZNK5ErrorneERKS_:
  103|  2.30M|  bool operator!=(const Error& other) const { return !(*this == other); }
_ZNK5ErroreqERKS_:
  101|  2.78M|  bool operator==(const Error& other) const { return error_code == other.error_code; }
_ZNK5ErrorcvbEv:
  117|   689k|  explicit operator bool() const { return error_code != heif_error_Ok; }
_ZN6ResultI8FractionEC2ERK5Error:
  141|  6.85k|  Result(const Error& e) : m_data(e) {}
_ZN6ResultI8FractionEC2ES0_:
  139|  12.0k|  Result(T v) : m_data(std::move(v)) {}
_ZNK6ResultI8FractionEcvbEv:
  147|  21.7k|  explicit operator bool() const { return std::holds_alternative<T>(m_data); }
_ZNK6ResultI8FractionE5errorEv:
  171|  4.16k|  {
  172|  4.16k|    if (*this) {
  ------------------
  |  Branch (172:9): [True: 0, False: 4.16k]
  ------------------
  173|      0|      return Error::Ok;
  174|      0|    }
  175|       |
  176|  4.16k|    return std::get<Error>(m_data);
  177|  4.16k|  }
_ZN6ResultI8FractionEdeEv:
  160|  2.21k|  {
  161|  2.21k|    assert(*this);
  ------------------
  |  Branch (161:5): [True: 2.21k, False: 0]
  ------------------
  162|  2.21k|    return std::get<T>(m_data);
  163|  2.21k|  }
_ZN11ErrorBufferC2Ev:
   52|  16.4k|  ErrorBuffer() = default;

_ZN8HeifFileC2Ev:
   66|  16.4k|{
   67|  16.4k|  m_file_layout = std::make_shared<FileLayout>();
   68|  16.4k|}
_ZN8HeifFileD2Ev:
   70|  16.4k|HeifFile::~HeifFile() = default;
_ZN8HeifFile14new_empty_fileEv:
  167|  16.4k|{
  168|       |  //m_input_stream.reset();
  169|  16.4k|  m_top_level_boxes.clear();
  170|       |
  171|  16.4k|  m_ftyp_box = std::make_shared<Box_ftyp>();
  172|  16.4k|  m_top_level_boxes.push_back(m_ftyp_box);
  173|  16.4k|}

_ZN8HeifFile19set_security_limitsEPK20heif_security_limits:
   69|  16.4k|  void set_security_limits(const heif_security_limits* limits) { m_limits = limits; }

_ZN10FileLayoutC2Ev:
   27|  16.4k|{
   28|  16.4k|  auto ftyp = std::make_shared<Box_ftyp>();
   29|  16.4k|  ftyp->set_output_position(0);
   30|  16.4k|  m_boxes.push_back(ftyp);
   31|       |
   32|       |  // TODO: these variables are not used yet
   33|  16.4k|  (void)m_writeMode;
   34|  16.4k|  (void)m_file_size;
   35|  16.4k|}

_ZN8Box_mskC5parseER14BitstreamRangePK20heif_security_limits:
   37|    578|{
   38|    578|  parse_full_box_header(range);
   39|    578|  m_bits_per_pixel = range.read8();
   40|    578|  return range.get_error();
   41|    578|}
_ZNK8Box_mskC4dumpER6Indent:
   44|    568|{
   45|    568|  std::ostringstream sstr;
   46|    568|  sstr << Box::dump(indent);
   47|    568|  sstr << indent << "bits_per_pixel: " << ((int)m_bits_per_pixel) << "\n";
   48|    568|  return sstr.str();
   49|    568|}

_ZN8Box_mskCC2Ev:
   50|    580|  {
   51|    580|    set_short_type(fourcc("mskC"));
   52|    580|  }

_ZN8Box_tilC32init_heif_tiled_image_parametersER27heif_tiled_image_parameters:
  115|  1.84k|{
  116|  1.84k|  params.version = 1;
  117|       |
  118|  1.84k|  params.image_width = 0;
  119|  1.84k|  params.image_height = 0;
  120|  1.84k|  params.tile_width = 0;
  121|  1.84k|  params.tile_height = 0;
  122|  1.84k|  params.compression_format_fourcc = 0;
  123|  1.84k|  params.offset_field_length = 40;
  124|  1.84k|  params.size_field_length = 24;
  125|  1.84k|  params.number_of_extra_dimensions = 0;
  126|       |
  127|  14.7k|  for (uint32_t& dim : params.extra_dimensions) {
  ------------------
  |  Branch (127:22): [True: 14.7k, False: 1.84k]
  ------------------
  128|  14.7k|    dim = 0;
  129|  14.7k|  }
  130|       |
  131|  1.84k|  params.tiles_are_sequential = false;
  132|  1.84k|}
_ZNK8Box_tilC4dumpER6Indent:
  222|  1.10k|{
  223|  1.10k|  std::ostringstream sstr;
  224|       |
  225|  1.10k|  sstr << BoxHeader::dump(indent);
  226|       |
  227|  1.10k|  sstr << indent << "version: " << ((int) get_version()) << "\n"
  228|       |       //<< indent << "image size: " << m_parameters.image_width << "x" << m_parameters.image_height << "\n"
  229|  1.10k|       << indent << "tile size: " << m_parameters.tile_width << "x" << m_parameters.tile_height << "\n"
  230|  1.10k|       << indent << "compression: " << fourcc_to_string(m_parameters.compression_format_fourcc) << "\n"
  231|  1.10k|       << indent << "tiles are sequential: " << (m_parameters.tiles_are_sequential ? "yes" : "no") << "\n"
  ------------------
  |  Branch (231:50): [True: 95, False: 1.01k]
  ------------------
  232|  1.10k|       << indent << "offset field length: " << ((int) m_parameters.offset_field_length) << " bits\n"
  233|  1.10k|       << indent << "size field length: " << ((int) m_parameters.size_field_length) << " bits\n"
  234|  1.10k|       << indent << "number of extra dimensions: " << ((int) m_parameters.number_of_extra_dimensions) << "\n";
  235|       |
  236|  1.10k|  sstr << indent << "tile properties:\n"
  237|  1.10k|       << dump_children(indent, true);
  238|       |
  239|  1.10k|  return sstr.str();
  240|       |
  241|  1.10k|}
_ZN8Box_tilC5parseER14BitstreamRangePK20heif_security_limits:
  245|  1.83k|{
  246|  1.83k|  parse_full_box_header(range);
  247|       |
  248|       |  // Note: actually, we should allow 0 only, but there are a few images around that use version 1.
  249|  1.83k|  if (get_version() > 1) {
  ------------------
  |  Branch (249:7): [True: 9, False: 1.82k]
  ------------------
  250|      9|    std::stringstream sstr;
  251|      9|    sstr << "'tili' image version " << ((int) get_version()) << " is not implemented yet";
  252|       |
  253|      9|    return {heif_error_Unsupported_feature,
  254|      9|            heif_suberror_Unsupported_data_version,
  255|      9|            sstr.str()};
  256|      9|  }
  257|       |
  258|  1.82k|  m_parameters.version = get_version();
  259|       |
  260|  1.82k|  uint32_t flags = get_flags();
  261|       |
  262|  1.82k|  switch (flags & 0x03) {
  ------------------
  |  Branch (262:11): [True: 1.82k, False: 0]
  ------------------
  263|  1.15k|    case 0:
  ------------------
  |  Branch (263:5): [True: 1.15k, False: 675]
  ------------------
  264|  1.15k|      m_parameters.offset_field_length = 32;
  265|  1.15k|      break;
  266|     64|    case 1:
  ------------------
  |  Branch (266:5): [True: 64, False: 1.76k]
  ------------------
  267|     64|      m_parameters.offset_field_length = 40;
  268|     64|      break;
  269|    318|    case 2:
  ------------------
  |  Branch (269:5): [True: 318, False: 1.51k]
  ------------------
  270|    318|      m_parameters.offset_field_length = 48;
  271|    318|      break;
  272|    293|    case 3:
  ------------------
  |  Branch (272:5): [True: 293, False: 1.53k]
  ------------------
  273|    293|      m_parameters.offset_field_length = 64;
  274|    293|      break;
  275|  1.82k|  }
  276|       |
  277|  1.82k|  switch (flags & 0x0c) {
  ------------------
  |  Branch (277:11): [True: 1.82k, False: 0]
  ------------------
  278|    580|    case 0x00:
  ------------------
  |  Branch (278:5): [True: 580, False: 1.24k]
  ------------------
  279|    580|      m_parameters.size_field_length = 0;
  280|    580|      break;
  281|     89|    case 0x04:
  ------------------
  |  Branch (281:5): [True: 89, False: 1.74k]
  ------------------
  282|     89|      m_parameters.size_field_length = 24;
  283|     89|      break;
  284|    984|    case 0x08:
  ------------------
  |  Branch (284:5): [True: 984, False: 845]
  ------------------
  285|    984|      m_parameters.size_field_length = 32;
  286|    984|      break;
  287|    176|    case 0x0c:
  ------------------
  |  Branch (287:5): [True: 176, False: 1.65k]
  ------------------
  288|    176|      m_parameters.size_field_length = 64;
  289|    176|      break;
  290|  1.82k|  }
  291|       |
  292|  1.82k|  m_parameters.tiles_are_sequential = !!(flags & 0x10);
  293|       |
  294|       |
  295|  1.82k|  m_parameters.tile_width = range.read32();
  296|  1.82k|  m_parameters.tile_height = range.read32();
  297|  1.82k|  m_parameters.compression_format_fourcc = range.read32();
  298|       |
  299|  1.82k|  if (m_parameters.tile_width == 0 || m_parameters.tile_height == 0) {
  ------------------
  |  Branch (299:7): [True: 5, False: 1.82k]
  |  Branch (299:39): [True: 13, False: 1.81k]
  ------------------
  300|     18|    return {heif_error_Invalid_input,
  301|     18|            heif_suberror_Unspecified,
  302|     18|            "Tile with zero width or height."};
  303|     18|  }
  304|       |
  305|       |
  306|       |  // --- extra dimensions
  307|       |
  308|  1.81k|  m_parameters.number_of_extra_dimensions = range.read8();
  309|       |
  310|  2.63k|  for (int i = 0; i < m_parameters.number_of_extra_dimensions; i++) {
  ------------------
  |  Branch (310:19): [True: 888, False: 1.74k]
  ------------------
  311|    888|    uint32_t size = range.read32();
  312|       |
  313|    888|    if (size == 0) {
  ------------------
  |  Branch (313:9): [True: 62, False: 826]
  ------------------
  314|     62|      return {heif_error_Invalid_input,
  315|     62|              heif_suberror_Unspecified,
  316|     62|              "'tili' extra dimension may not be zero."};
  317|     62|    }
  318|       |
  319|    826|    if (i < 8) {
  ------------------
  |  Branch (319:9): [True: 454, False: 372]
  ------------------
  320|    454|      m_parameters.extra_dimensions[i] = size;
  321|    454|    }
  322|    372|    else {
  323|       |      // TODO: error: too many dimensions (not supported)
  324|    372|    }
  325|    826|  }
  326|       |
  327|       |  // --- read tile properties
  328|       |
  329|       |  // Check version for backwards compatibility with old format.
  330|       |  // TODO: remove when spec is final and old test images have been converted
  331|  1.74k|  if (get_version() == 0) {
  ------------------
  |  Branch (331:7): [True: 386, False: 1.36k]
  ------------------
  332|    386|    uint8_t num_properties = range.read8();
  333|       |
  334|    386|    Error error = read_children(range, num_properties, limits);
  335|    386|    if (error) {
  ------------------
  |  Branch (335:9): [True: 86, False: 300]
  ------------------
  336|     86|      return error;
  337|     86|    }
  338|    386|  }
  339|       |
  340|  1.66k|  return range.get_error();
  341|  1.74k|}

_ZN8Box_tilCC2Ev:
   54|  1.84k|  {
   55|  1.84k|    set_short_type(fourcc("tilC"));
   56|       |
   57|  1.84k|    init_heif_tiled_image_parameters(m_parameters);
   58|  1.84k|  }

_ZNK6Indent10get_stringEv:
   27|  31.2M|{
   28|  31.2M|  std::stringstream sstr;
   29|       |
   30|   304M|  for (int i = 0; i < get_indent(); i++) {
  ------------------
  |  Branch (30:19): [True: 272M, False: 31.2M]
  ------------------
   31|   272M|    sstr << "| ";
   32|   272M|  }
   33|       |
   34|  31.2M|  return sstr.str();
   35|  31.2M|}
_Z21write_raw_data_as_hexPKhmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   41|   117k|{
   42|   117k|  std::stringstream sstr;
   43|       |
   44|   117k|  sstr << std::hex << std::setfill('0');
   45|       |
   46|  9.98M|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (46:22): [True: 9.87M, False: 117k]
  ------------------
   47|  9.87M|    if (i % 16 == 0) {
  ------------------
  |  Branch (47:9): [True: 660k, False: 9.21M]
  ------------------
   48|       |      // start of line
   49|       |
   50|   660k|      if (i == 0) {
  ------------------
  |  Branch (50:11): [True: 80.1k, False: 580k]
  ------------------
   51|  80.1k|        sstr << firstLineIndent;
   52|  80.1k|      }
   53|   580k|      else {
   54|   580k|        sstr << remainingLinesIndent;
   55|   580k|      }
   56|   660k|      sstr << std::setw(4) << i << ": "; // address
   57|   660k|    }
   58|  9.21M|    else if (i % 16 == 8) {
  ------------------
  |  Branch (58:14): [True: 603k, False: 8.60M]
  ------------------
   59|       |      // space in middle
   60|   603k|      sstr << "  ";
   61|   603k|    }
   62|  8.60M|    else {
   63|       |      // space between bytes
   64|  8.60M|      sstr << " ";
   65|  8.60M|    }
   66|       |
   67|  9.87M|    sstr << std::setw(2) << ((int) data[i]);
   68|       |
   69|  9.87M|    if (i % 16 == 15 || i == len - 1) {
  ------------------
  |  Branch (69:9): [True: 586k, False: 9.28M]
  |  Branch (69:25): [True: 74.2k, False: 9.21M]
  ------------------
   70|   660k|      sstr << "\n";
   71|   660k|    }
   72|  9.87M|  }
   73|       |
   74|   117k|  return sstr.str();
   75|   117k|}

_ZN6IndentC2Ev:
   37|   150k|  Indent() = default;
_ZNK6Indent10get_indentEv:
   39|   304M|  int get_indent() const { return m_indent; }
_ZN6IndentppEi:
   41|   101k|  void operator++(int) { m_indent++; }
_ZN6IndentmmEi:
   44|   101k|  {
   45|   101k|    m_indent--;
   46|   101k|    if (m_indent < 0) m_indent = 0;
  ------------------
  |  Branch (46:9): [True: 0, False: 101k]
  ------------------
   47|   101k|  }
_ZlsRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEERK6Indent:
   57|  30.9M|{
   58|  30.9M|  ostr << indent.get_string();
   59|  30.9M|  return ostr;
   60|  30.9M|}

_ZN8Box_mini5parseER14BitstreamRangePK20heif_security_limits:
   42|  14.5k|{
   43|  14.5k|  uint64_t start_offset = range.get_istream()->get_position();
   44|  14.5k|  std::size_t length = range.get_remaining_bytes();
   45|       |
   46|       |  // Register the payload allocation with the total-memory tracker (also
   47|       |  // checks against max_memory_block_size). The buffer is local to parse(),
   48|       |  // so use a scoped handle that releases the budget when parse() returns.
   49|  14.5k|  MemoryHandle mini_data_handle;
   50|  14.5k|  if (auto err = mini_data_handle.alloc(length, limits, "MinimizedImageBox payload")) {
  ------------------
  |  Branch (50:12): [True: 0, False: 14.5k]
  ------------------
   51|      0|    return err;
   52|      0|  }
   53|       |
   54|  14.5k|  std::vector<uint8_t> mini_data(length);
   55|  14.5k|  if (!range.read(mini_data.data(), mini_data.size())) {
  ------------------
  |  Branch (55:7): [True: 0, False: 14.5k]
  ------------------
   56|      0|    return range.get_error();
   57|      0|  }
   58|       |
   59|  14.5k|  BitReader bits(mini_data.data(), mini_data.size());
   60|       |
   61|  14.5k|  m_version = bits.get_bits8(2);
   62|  14.5k|  m_explicit_codec_types_flag = bits.get_flag();
   63|  14.5k|  m_float_flag = bits.get_flag();
   64|  14.5k|  m_full_range_flag = bits.get_flag();
   65|  14.5k|  m_alpha_flag = bits.get_flag();
   66|  14.5k|  m_explicit_cicp_flag = bits.get_flag();
   67|  14.5k|  m_hdr_flag = bits.get_flag();
   68|  14.5k|  m_icc_flag = bits.get_flag();
   69|  14.5k|  m_exif_flag = bits.get_flag();
   70|  14.5k|  m_xmp_flag = bits.get_flag();
   71|  14.5k|  m_chroma_subsampling = bits.get_bits8(2);
   72|  14.5k|  m_orientation = bits.get_bits8(3) + 1;
   73|       |
   74|  14.5k|  bool large_dimensions_flag = bits.get_flag();
   75|       |  // large_dimensions_flag = !large_dimensions_flag;  // HACK to get old behavior
   76|  14.5k|  m_width = 1 + bits.get_bits32(large_dimensions_flag ? 15 : 7);
  ------------------
  |  Branch (76:33): [True: 5.98k, False: 8.52k]
  ------------------
   77|  14.5k|  m_height = 1 + bits.get_bits32(large_dimensions_flag ? 15 : 7);
  ------------------
  |  Branch (77:34): [True: 5.98k, False: 8.52k]
  ------------------
   78|       |
   79|  14.5k|  if ((m_chroma_subsampling == 1) || (m_chroma_subsampling == 2))
  ------------------
  |  Branch (79:7): [True: 411, False: 14.1k]
  |  Branch (79:38): [True: 9.09k, False: 5.00k]
  ------------------
   80|  9.51k|  {
   81|  9.51k|    m_chroma_is_horizontally_centered = bits.get_flag();
   82|  9.51k|  }
   83|  14.5k|  if (m_chroma_subsampling == 1)
  ------------------
  |  Branch (83:7): [True: 411, False: 14.1k]
  ------------------
   84|    411|  {
   85|    411|    m_chroma_is_vertically_centered = bits.get_flag();
   86|    411|  }
   87|       |
   88|  14.5k|  bool high_bit_depth_flag = false;
   89|  14.5k|  if (m_float_flag)
  ------------------
  |  Branch (89:7): [True: 1.40k, False: 13.1k]
  ------------------
   90|  1.40k|  {
   91|  1.40k|    uint8_t bit_depth_log2 = bits.get_bits8(2) + 4; // [4;6] (7 is reserved)
   92|  1.40k|    if (bit_depth_log2 > 6) {
  ------------------
  |  Branch (92:9): [True: 3, False: 1.40k]
  ------------------
   93|      3|      return {heif_error_Invalid_input,
   94|      3|              heif_suberror_Invalid_mini_box,
   95|      3|              "Reserved float bit_depth_log2 value 7 in MinimizedImageBox"};
   96|      3|    }
   97|  1.40k|    m_bit_depth = (uint8_t)powl(2, (bit_depth_log2)); // [16,32,64]
   98|  1.40k|  }
   99|  13.1k|  else
  100|  13.1k|  {
  101|  13.1k|    high_bit_depth_flag = bits.get_flag();
  102|  13.1k|    if (high_bit_depth_flag)
  ------------------
  |  Branch (102:9): [True: 6.35k, False: 6.75k]
  ------------------
  103|  6.35k|    {
  104|  6.35k|      m_bit_depth = bits.get_bits8(3) + 9; // [9;16]
  105|  6.35k|    }
  106|  13.1k|  }
  107|       |
  108|  14.5k|  if (m_alpha_flag)
  ------------------
  |  Branch (108:7): [True: 3.29k, False: 11.2k]
  ------------------
  109|  3.29k|  {
  110|  3.29k|    m_alpha_is_premultiplied = bits.get_flag();
  111|  3.29k|  }
  112|       |
  113|  14.5k|  if (m_explicit_cicp_flag)
  ------------------
  |  Branch (113:7): [True: 5.89k, False: 8.61k]
  ------------------
  114|  5.89k|  {
  115|       |    // Per ISO/IEC 23008-12 Annex O.3.2, matrix_coefficients is always
  116|       |    // present (8 bits) when explicit_cicp_flag is set, irrespective of
  117|       |    // chroma_subsampling. The chroma_subsampling==0 ⇒ MC=2 default is
  118|       |    // only used in the non-explicit branch (Table O.3, row 1).
  119|  5.89k|    m_colour_primaries = bits.get_bits8(8);
  120|  5.89k|    m_transfer_characteristics = bits.get_bits8(8);
  121|  5.89k|    m_matrix_coefficients = bits.get_bits8(8);
  122|  5.89k|  }
  123|  8.61k|  else
  124|  8.61k|  {
  125|  8.61k|    m_colour_primaries = m_icc_flag ? 2 : 1;
  ------------------
  |  Branch (125:26): [True: 1.40k, False: 7.20k]
  ------------------
  126|  8.61k|    m_transfer_characteristics = m_icc_flag ? 2 : 13;
  ------------------
  |  Branch (126:34): [True: 1.40k, False: 7.20k]
  ------------------
  127|  8.61k|    m_matrix_coefficients = (m_chroma_subsampling == 0) ? 2 : 6;
  ------------------
  |  Branch (127:29): [True: 1.85k, False: 6.76k]
  ------------------
  128|  8.61k|  }
  129|       |
  130|  14.5k|  if (m_explicit_codec_types_flag)
  ------------------
  |  Branch (130:7): [True: 6.71k, False: 7.79k]
  ------------------
  131|  6.71k|  {
  132|  6.71k|    m_infe_type = bits.get_bits32(32);
  133|  6.71k|    m_codec_config_type = bits.get_bits32(32);
  134|  6.71k|  }
  135|       |
  136|  14.5k|  if (m_hdr_flag)
  ------------------
  |  Branch (136:7): [True: 13.5k, False: 986]
  ------------------
  137|  13.5k|  {
  138|  13.5k|    m_gainmap_flag = bits.get_flag();
  139|  13.5k|    if (m_gainmap_flag)
  ------------------
  |  Branch (139:9): [True: 10.9k, False: 2.54k]
  ------------------
  140|  10.9k|    {
  141|  10.9k|      bool gainmap_dimension_same_as_main_item_flag = bits.get_flag();
  142|  10.9k|      if (gainmap_dimension_same_as_main_item_flag) {
  ------------------
  |  Branch (142:11): [True: 5.34k, False: 5.63k]
  ------------------
  143|  5.34k|        m_gainmap_width = m_width;
  144|  5.34k|        m_gainmap_height = m_height;
  145|  5.34k|      }
  146|  5.63k|      else {
  147|  5.63k|        m_gainmap_width = bits.get_bits32(large_dimensions_flag ? 15 : 7) + 1;
  ------------------
  |  Branch (147:43): [True: 1.04k, False: 4.58k]
  ------------------
  148|  5.63k|        m_gainmap_height = bits.get_bits32(large_dimensions_flag ? 15 : 7) + 1;
  ------------------
  |  Branch (148:44): [True: 1.04k, False: 4.58k]
  ------------------
  149|  5.63k|      }
  150|       |
  151|  10.9k|      m_gainmap_matrix_coefficients = bits.get_bits8(8);
  152|  10.9k|      m_gainmap_full_range_flag = bits.get_flag();
  153|  10.9k|      m_gainmap_chroma_subsampling = bits.get_bits8(2);
  154|  10.9k|      if ((m_gainmap_chroma_subsampling == 1) || (m_gainmap_chroma_subsampling == 2))
  ------------------
  |  Branch (154:11): [True: 6.19k, False: 4.78k]
  |  Branch (154:50): [True: 3.61k, False: 1.17k]
  ------------------
  155|  9.80k|      {
  156|  9.80k|        m_gainmap_chroma_is_horizontally_centred = bits.get_flag();
  157|  9.80k|      }
  158|  10.9k|      if (m_gainmap_chroma_subsampling == 1)
  ------------------
  |  Branch (158:11): [True: 6.19k, False: 4.78k]
  ------------------
  159|  6.19k|      {
  160|  6.19k|        m_gainmap_chroma_is_vertically_centred = bits.get_flag();
  161|  6.19k|      }
  162|       |
  163|  10.9k|      m_gainmap_float_flag = bits.get_flag();
  164|       |
  165|  10.9k|      bool gainmap_high_bit_depth_flag = false;
  166|  10.9k|      if (m_gainmap_float_flag)
  ------------------
  |  Branch (166:11): [True: 2.18k, False: 8.79k]
  ------------------
  167|  2.18k|      {
  168|  2.18k|        uint8_t bit_depth_log2 = bits.get_bits8(2) + 4;
  169|  2.18k|        if (bit_depth_log2 > 6) {
  ------------------
  |  Branch (169:13): [True: 5, False: 2.17k]
  ------------------
  170|      5|          return {heif_error_Invalid_input,
  171|      5|                  heif_suberror_Invalid_mini_box,
  172|      5|                  "Reserved float gainmap bit_depth_log2 value 7 in MinimizedImageBox"};
  173|      5|        }
  174|  2.17k|        m_gainmap_bit_depth = (uint8_t)powl(2, (bit_depth_log2));
  175|  2.17k|      }
  176|  8.79k|      else
  177|  8.79k|      {
  178|  8.79k|        gainmap_high_bit_depth_flag = bits.get_flag();
  179|  8.79k|        if (gainmap_high_bit_depth_flag)
  ------------------
  |  Branch (179:13): [True: 439, False: 8.35k]
  ------------------
  180|    439|        {
  181|    439|          m_gainmap_bit_depth = 9 + bits.get_bits8(3);
  182|    439|        }
  183|  8.79k|      }
  184|       |
  185|  10.9k|      m_tmap_icc_flag = bits.get_flag();
  186|  10.9k|      m_tmap_explicit_cicp_flag = bits.get_flag();
  187|  10.9k|      if (m_tmap_explicit_cicp_flag)
  ------------------
  |  Branch (187:11): [True: 4.11k, False: 6.85k]
  ------------------
  188|  4.11k|      {
  189|  4.11k|        m_tmap_colour_primaries = bits.get_bits8(8);
  190|  4.11k|        m_tmap_transfer_characteristics = bits.get_bits8(8);
  191|  4.11k|        m_tmap_matrix_coefficients = bits.get_bits8(8);
  192|  4.11k|        m_tmap_full_range_flag = bits.get_flag();
  193|  4.11k|      }
  194|  6.85k|      else
  195|  6.85k|      {
  196|  6.85k|        m_tmap_colour_primaries = 1;
  197|  6.85k|        m_tmap_transfer_characteristics = 13;
  198|  6.85k|        m_tmap_matrix_coefficients = 6;
  199|  6.85k|        m_tmap_full_range_flag = true;
  200|  6.85k|      }
  201|  10.9k|    }
  202|       |
  203|  13.5k|    bool clli_flag = bits.get_flag();
  204|  13.5k|    bool mdcv_flag = bits.get_flag();
  205|  13.5k|    bool cclv_flag = bits.get_flag();
  206|  13.5k|    bool amve_flag = bits.get_flag();
  207|  13.5k|    m_reve_flag = bits.get_flag();
  208|  13.5k|    bool ndwt_flag = bits.get_flag();
  209|       |
  210|  13.5k|    if (clli_flag)
  ------------------
  |  Branch (210:9): [True: 6.72k, False: 6.79k]
  ------------------
  211|  6.72k|    {
  212|  6.72k|      m_clli = std::make_shared<Box_clli>();
  213|  6.72k|      m_clli->clli.max_content_light_level = bits.get_bits16(16);
  214|  6.72k|      m_clli->clli.max_pic_average_light_level = bits.get_bits16(16);
  215|  6.72k|    }
  216|       |
  217|  13.5k|    if (mdcv_flag)
  ------------------
  |  Branch (217:9): [True: 1.45k, False: 12.0k]
  ------------------
  218|  1.45k|    {
  219|  1.45k|      m_mdcv = std::make_shared<Box_mdcv>();
  220|  5.83k|      for (int c = 0; c < 3; c++)
  ------------------
  |  Branch (220:23): [True: 4.37k, False: 1.45k]
  ------------------
  221|  4.37k|      {
  222|  4.37k|        m_mdcv->mdcv.display_primaries_x[c] = bits.get_bits16(16);
  223|  4.37k|        m_mdcv->mdcv.display_primaries_y[c] = bits.get_bits16(16);
  224|  4.37k|      }
  225|       |
  226|  1.45k|      m_mdcv->mdcv.white_point_x = bits.get_bits16(16);
  227|  1.45k|      m_mdcv->mdcv.white_point_y = bits.get_bits16(16);
  228|  1.45k|      m_mdcv->mdcv.max_display_mastering_luminance = bits.get_bits32(32);
  229|  1.45k|      m_mdcv->mdcv.min_display_mastering_luminance = bits.get_bits32(32);
  230|  1.45k|    }
  231|       |
  232|  13.5k|    if (cclv_flag)
  ------------------
  |  Branch (232:9): [True: 3.80k, False: 9.71k]
  ------------------
  233|  3.80k|    {
  234|  3.80k|      m_cclv = std::make_shared<Box_cclv>();
  235|  3.80k|      bits.skip_bits(2);
  236|  3.80k|      bool ccv_primaries_present_flag = bits.get_flag();
  237|  3.80k|      bool ccv_min_luminance_value_present_flag = bits.get_flag();
  238|  3.80k|      bool ccv_max_luminance_value_present_flag = bits.get_flag();
  239|  3.80k|      bool ccv_avg_luminance_value_present_flag = bits.get_flag();
  240|  3.80k|      bits.skip_bits(2);
  241|  3.80k|      if (ccv_primaries_present_flag)
  ------------------
  |  Branch (241:11): [True: 532, False: 3.27k]
  ------------------
  242|    532|      {
  243|    532|        int32_t x0 = bits.get_bits32s();
  244|    532|        int32_t y0 = bits.get_bits32s();
  245|    532|        int32_t x1 = bits.get_bits32s();
  246|    532|        int32_t y1 = bits.get_bits32s();
  247|    532|        int32_t x2 = bits.get_bits32s();
  248|    532|        int32_t y2 = bits.get_bits32s();
  249|    532|        m_cclv->set_primaries(x0, y0, x1, y1, x2, y2);
  250|    532|      }
  251|  3.80k|      if (ccv_min_luminance_value_present_flag)
  ------------------
  |  Branch (251:11): [True: 582, False: 3.22k]
  ------------------
  252|    582|      {
  253|    582|        m_cclv->set_min_luminance(bits.get_bits32(32));
  254|    582|      }
  255|  3.80k|      if (ccv_max_luminance_value_present_flag)
  ------------------
  |  Branch (255:11): [True: 3.24k, False: 561]
  ------------------
  256|  3.24k|      {
  257|  3.24k|        m_cclv->set_max_luminance(bits.get_bits32(32));
  258|  3.24k|      }
  259|  3.80k|      if (ccv_avg_luminance_value_present_flag)
  ------------------
  |  Branch (259:11): [True: 528, False: 3.27k]
  ------------------
  260|    528|      {
  261|    528|        m_cclv->set_avg_luminance(bits.get_bits32(32));
  262|    528|      }
  263|  3.80k|    }
  264|       |
  265|  13.5k|    if (amve_flag)
  ------------------
  |  Branch (265:9): [True: 572, False: 12.9k]
  ------------------
  266|    572|    {
  267|    572|      m_amve = std::make_shared<Box_amve>();
  268|    572|      m_amve->amve.ambient_illumination = bits.get_bits32(32);
  269|    572|      m_amve->amve.ambient_light_x = bits.get_bits16(16);
  270|    572|      m_amve->amve.ambient_light_y = bits.get_bits16(16);
  271|    572|    }
  272|       |
  273|  13.5k|    if (m_reve_flag)
  ------------------
  |  Branch (273:9): [True: 3.88k, False: 9.63k]
  ------------------
  274|  3.88k|    {
  275|       |      // TODO: ReferenceViewingEnvironment isn't published yet
  276|  3.88k|      bits.skip_bits(32);
  277|  3.88k|      bits.skip_bits(16);
  278|  3.88k|      bits.skip_bits(16);
  279|  3.88k|      bits.skip_bits(32);
  280|  3.88k|      bits.skip_bits(16);
  281|  3.88k|      bits.skip_bits(16);
  282|  3.88k|    }
  283|       |
  284|  13.5k|    if (ndwt_flag)
  ------------------
  |  Branch (284:9): [True: 6.86k, False: 6.65k]
  ------------------
  285|  6.86k|    {
  286|  6.86k|      m_ndwt = std::make_shared<Box_ndwt>();
  287|  6.86k|      m_ndwt->set_diffuse_white_luminance(bits.get_bits32(32));
  288|  6.86k|    }
  289|       |
  290|  13.5k|    if (m_gainmap_flag)
  ------------------
  |  Branch (290:9): [True: 10.9k, False: 2.54k]
  ------------------
  291|  10.9k|    {
  292|  10.9k|      bool tmap_clli_flag = bits.get_flag();
  293|  10.9k|      bool tmap_mdcv_flag = bits.get_flag();
  294|  10.9k|      bool tmap_cclv_flag = bits.get_flag();
  295|  10.9k|      bool tmap_amve_flag = bits.get_flag();
  296|  10.9k|      m_tmap_reve_flag = bits.get_flag();
  297|  10.9k|      bool tmap_ndwt_flag = bits.get_flag();
  298|       |
  299|  10.9k|      if (tmap_clli_flag)
  ------------------
  |  Branch (299:11): [True: 7.60k, False: 3.36k]
  ------------------
  300|  7.60k|      {
  301|  7.60k|        m_tmap_clli = std::make_shared<Box_clli>();
  302|  7.60k|        m_tmap_clli->clli.max_content_light_level = (uint16_t)bits.get_bits32(16);
  303|  7.60k|        m_tmap_clli->clli.max_pic_average_light_level = (uint16_t)bits.get_bits32(16);
  304|  7.60k|      }
  305|       |
  306|  10.9k|      if (tmap_mdcv_flag)
  ------------------
  |  Branch (306:11): [True: 4.67k, False: 6.29k]
  ------------------
  307|  4.67k|      {
  308|  4.67k|        m_tmap_mdcv = std::make_shared<Box_mdcv>();
  309|  18.7k|        for (int c = 0; c < 3; c++)
  ------------------
  |  Branch (309:25): [True: 14.0k, False: 4.67k]
  ------------------
  310|  14.0k|        {
  311|  14.0k|          m_tmap_mdcv->mdcv.display_primaries_x[c] = bits.get_bits16(16);
  312|  14.0k|          m_tmap_mdcv->mdcv.display_primaries_y[c] = bits.get_bits16(16);
  313|  14.0k|        }
  314|       |
  315|  4.67k|        m_tmap_mdcv->mdcv.white_point_x = bits.get_bits16(16);
  316|  4.67k|        m_tmap_mdcv->mdcv.white_point_y = bits.get_bits16(16);
  317|  4.67k|        m_tmap_mdcv->mdcv.max_display_mastering_luminance = bits.get_bits32(32);
  318|  4.67k|        m_tmap_mdcv->mdcv.min_display_mastering_luminance = bits.get_bits32(32);
  319|  4.67k|      }
  320|       |
  321|  10.9k|      if (tmap_cclv_flag)
  ------------------
  |  Branch (321:11): [True: 7.18k, False: 3.78k]
  ------------------
  322|  7.18k|      {
  323|  7.18k|        m_tmap_cclv = std::make_shared<Box_cclv>();
  324|  7.18k|        bits.skip_bits(2); // skip ccv_cancel_flag and ccv_persistence_flag
  325|  7.18k|        bool ccv_primaries_present_flag = bits.get_flag();
  326|  7.18k|        bool ccv_min_luminance_value_present_flag = bits.get_flag();
  327|  7.18k|        bool ccv_max_luminance_value_present_flag = bits.get_flag();
  328|  7.18k|        bool ccv_avg_luminance_value_present_flag = bits.get_flag();
  329|  7.18k|        bits.skip_bits(2);
  330|  7.18k|        if (ccv_primaries_present_flag)
  ------------------
  |  Branch (330:13): [True: 593, False: 6.59k]
  ------------------
  331|    593|        {
  332|    593|          int32_t x0 = bits.get_bits32s();
  333|    593|          int32_t y0 = bits.get_bits32s();
  334|    593|          int32_t x1 = bits.get_bits32s();
  335|    593|          int32_t y1 = bits.get_bits32s();
  336|    593|          int32_t x2 = bits.get_bits32s();
  337|    593|          int32_t y2 = bits.get_bits32s();
  338|    593|          m_tmap_cclv->set_primaries(x0, y0, x1, y1, x2, y2);
  339|    593|        }
  340|  7.18k|        if (ccv_min_luminance_value_present_flag)
  ------------------
  |  Branch (340:13): [True: 855, False: 6.32k]
  ------------------
  341|    855|        {
  342|    855|          m_tmap_cclv->set_min_luminance(bits.get_bits32(32));
  343|    855|        }
  344|  7.18k|        if (ccv_max_luminance_value_present_flag)
  ------------------
  |  Branch (344:13): [True: 867, False: 6.31k]
  ------------------
  345|    867|        {
  346|    867|          m_tmap_cclv->set_max_luminance(bits.get_bits32(32));
  347|    867|        }
  348|  7.18k|        if (ccv_avg_luminance_value_present_flag)
  ------------------
  |  Branch (348:13): [True: 849, False: 6.33k]
  ------------------
  349|    849|        {
  350|    849|          m_tmap_cclv->set_avg_luminance(bits.get_bits32(32));
  351|    849|        }
  352|  7.18k|      }
  353|       |
  354|  10.9k|      if (tmap_amve_flag)
  ------------------
  |  Branch (354:11): [True: 6.47k, False: 4.49k]
  ------------------
  355|  6.47k|      {
  356|  6.47k|        m_tmap_amve = std::make_shared<Box_amve>();
  357|  6.47k|        m_tmap_amve->amve.ambient_illumination = bits.get_bits32(32);
  358|  6.47k|        m_tmap_amve->amve.ambient_light_x = bits.get_bits16(16);
  359|  6.47k|        m_tmap_amve->amve.ambient_light_y = bits.get_bits16(16);
  360|  6.47k|      }
  361|       |
  362|  10.9k|      if (m_tmap_reve_flag)
  ------------------
  |  Branch (362:11): [True: 1.57k, False: 9.39k]
  ------------------
  363|  1.57k|      {
  364|       |        // TODO: ReferenceViewingEnvironment isn't published yet
  365|  1.57k|        bits.skip_bits(32);
  366|  1.57k|        bits.skip_bits(16);
  367|  1.57k|        bits.skip_bits(16);
  368|  1.57k|        bits.skip_bits(32);
  369|  1.57k|        bits.skip_bits(16);
  370|  1.57k|        bits.skip_bits(16);
  371|  1.57k|      }
  372|       |
  373|  10.9k|      if (tmap_ndwt_flag)
  ------------------
  |  Branch (373:11): [True: 3.32k, False: 7.64k]
  ------------------
  374|  3.32k|      {
  375|  3.32k|        m_tmap_ndwt = std::make_shared<Box_ndwt>();
  376|  3.32k|        m_tmap_ndwt->set_diffuse_white_luminance(bits.get_bits32(32));
  377|  3.32k|      }
  378|  10.9k|    }
  379|  13.5k|  }
  380|       |
  381|       |  // Chunk sizes
  382|  14.5k|  bool large_metadata_flag = false;
  383|  14.5k|  if (m_icc_flag || m_exif_flag || m_xmp_flag || (m_hdr_flag && m_gainmap_flag))
  ------------------
  |  Branch (383:7): [True: 5.24k, False: 9.26k]
  |  Branch (383:21): [True: 1.05k, False: 8.20k]
  |  Branch (383:36): [True: 4.19k, False: 4.01k]
  |  Branch (383:51): [True: 3.45k, False: 564]
  |  Branch (383:65): [True: 2.44k, False: 1.00k]
  ------------------
  384|  12.9k|  {
  385|  12.9k|    large_metadata_flag = bits.get_flag();
  386|  12.9k|  }
  387|       |
  388|  14.5k|  bool large_codec_config_flag = bits.get_flag();
  389|  14.5k|  bool large_item_data_flag = bits.get_flag();
  390|       |
  391|  14.5k|  uint32_t icc_data_size = 0;
  392|  14.5k|  if (m_icc_flag)
  ------------------
  |  Branch (392:7): [True: 5.24k, False: 9.26k]
  ------------------
  393|  5.24k|  {
  394|  5.24k|    icc_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (394:37): [True: 15, False: 5.22k]
  ------------------
  395|  5.24k|  }
  396|       |
  397|  14.5k|  uint32_t tmap_icc_data_size = 0;
  398|  14.5k|  if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag)
  ------------------
  |  Branch (398:7): [True: 13.5k, False: 986]
  |  Branch (398:21): [True: 10.9k, False: 2.54k]
  |  Branch (398:39): [True: 1.09k, False: 9.87k]
  ------------------
  399|  1.09k|  {
  400|  1.09k|    tmap_icc_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (400:42): [True: 538, False: 556]
  ------------------
  401|  1.09k|  }
  402|       |
  403|  14.5k|  uint32_t gainmap_metadata_size = 0;
  404|  14.5k|  if (m_hdr_flag && m_gainmap_flag)
  ------------------
  |  Branch (404:7): [True: 13.5k, False: 986]
  |  Branch (404:21): [True: 10.9k, False: 2.54k]
  ------------------
  405|  10.9k|  {
  406|  10.9k|    gainmap_metadata_size = bits.get_bits32(large_metadata_flag ? 20 : 10);
  ------------------
  |  Branch (406:45): [True: 551, False: 10.4k]
  ------------------
  407|  10.9k|  }
  408|       |
  409|  14.5k|  if (m_hdr_flag && m_gainmap_flag)
  ------------------
  |  Branch (409:7): [True: 13.5k, False: 986]
  |  Branch (409:21): [True: 10.9k, False: 2.54k]
  ------------------
  410|  10.9k|  {
  411|  10.9k|    m_gainmap_item_data_size = bits.get_bits32(large_item_data_flag ? 28 : 15);
  ------------------
  |  Branch (411:48): [True: 26, False: 10.9k]
  ------------------
  412|  10.9k|  }
  413|       |
  414|  14.5k|  uint32_t gainmap_item_codec_config_size = 0;
  415|  14.5k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0)
  ------------------
  |  Branch (415:7): [True: 13.5k, False: 986]
  |  Branch (415:21): [True: 10.9k, False: 2.54k]
  |  Branch (415:39): [True: 448, False: 10.5k]
  ------------------
  416|    448|  {
  417|    448|    gainmap_item_codec_config_size = bits.get_bits32(large_codec_config_flag ? 12 : 3);
  ------------------
  |  Branch (417:54): [True: 28, False: 420]
  ------------------
  418|    448|  }
  419|       |
  420|  14.5k|  uint32_t main_item_codec_config_size = bits.get_bits32(large_codec_config_flag ? 12 : 3);
  ------------------
  |  Branch (420:58): [True: 645, False: 13.8k]
  ------------------
  421|  14.5k|  m_main_item_data_size = bits.get_bits32(large_item_data_flag ? 28 : 15) + 1;
  ------------------
  |  Branch (421:43): [True: 95, False: 14.4k]
  ------------------
  422|       |
  423|  14.5k|  if (m_alpha_flag)
  ------------------
  |  Branch (423:7): [True: 3.29k, False: 11.2k]
  ------------------
  424|  3.29k|  {
  425|  3.29k|    m_alpha_item_data_size = bits.get_bits32(large_item_data_flag ? 28 : 15);
  ------------------
  |  Branch (425:46): [True: 35, False: 3.26k]
  ------------------
  426|  3.29k|  }
  427|       |
  428|  14.5k|  uint32_t alpha_item_codec_config_size = 0;
  429|  14.5k|  if (m_alpha_flag && m_alpha_item_data_size > 0)
  ------------------
  |  Branch (429:7): [True: 3.29k, False: 11.2k]
  |  Branch (429:23): [True: 336, False: 2.95k]
  ------------------
  430|    336|  {
  431|    336|    alpha_item_codec_config_size = bits.get_bits32(large_codec_config_flag ? 12 : 3);
  ------------------
  |  Branch (431:52): [True: 22, False: 314]
  ------------------
  432|    336|  }
  433|       |
  434|  14.5k|  if (m_exif_flag || m_xmp_flag)
  ------------------
  |  Branch (434:7): [True: 4.58k, False: 9.92k]
  |  Branch (434:22): [True: 4.80k, False: 5.11k]
  ------------------
  435|  9.38k|  {
  436|  9.38k|    m_exif_xmp_compressed_flag = bits.get_flag();
  437|  9.38k|  }
  438|       |
  439|  14.5k|  if (m_exif_flag)
  ------------------
  |  Branch (439:7): [True: 4.58k, False: 9.92k]
  ------------------
  440|  4.58k|  {
  441|  4.58k|    m_exif_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (441:40): [True: 11, False: 4.57k]
  ------------------
  442|  4.58k|  }
  443|  14.5k|  if (m_xmp_flag)
  ------------------
  |  Branch (443:7): [True: 9.15k, False: 5.34k]
  ------------------
  444|  9.15k|  {
  445|  9.15k|    m_xmp_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (445:39): [True: 549, False: 8.60k]
  ------------------
  446|  9.15k|  }
  447|       |
  448|  14.5k|  bits.skip_to_byte_boundary();
  449|       |
  450|       |  // Validate that the declared chunk sizes don't exceed the remaining payload.
  451|       |  // Without this, a malformed mini box with 28-bit *_item_data_size fields set
  452|       |  // near 2^28 makes skip_bytes/read_bytes loop hundreds of millions of times
  453|       |  // past EOF, eventually triggering signed-int overflow in BitReader::refill().
  454|  14.5k|  {
  455|  14.5k|    uint64_t required_bytes = (uint64_t) main_item_codec_config_size + m_main_item_data_size;
  456|  14.5k|    if (m_alpha_flag && m_alpha_item_data_size > 0) {
  ------------------
  |  Branch (456:9): [True: 3.29k, False: 11.2k]
  |  Branch (456:25): [True: 336, False: 2.95k]
  ------------------
  457|    336|      required_bytes += alpha_item_codec_config_size;
  458|    336|      required_bytes += m_alpha_item_data_size;
  459|    336|    }
  460|  14.5k|    if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0) {
  ------------------
  |  Branch (460:9): [True: 13.5k, False: 986]
  |  Branch (460:23): [True: 10.9k, False: 2.54k]
  |  Branch (460:41): [True: 448, False: 10.5k]
  ------------------
  461|    448|      required_bytes += gainmap_item_codec_config_size;
  462|    448|      required_bytes += m_gainmap_item_data_size;
  463|    448|    }
  464|  14.5k|    if (m_icc_flag) required_bytes += icc_data_size;
  ------------------
  |  Branch (464:9): [True: 5.24k, False: 9.26k]
  ------------------
  465|  14.5k|    if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag) required_bytes += tmap_icc_data_size;
  ------------------
  |  Branch (465:9): [True: 13.5k, False: 986]
  |  Branch (465:23): [True: 10.9k, False: 2.54k]
  |  Branch (465:41): [True: 1.09k, False: 9.87k]
  ------------------
  466|  14.5k|    if (m_hdr_flag && m_gainmap_flag) required_bytes += gainmap_metadata_size;
  ------------------
  |  Branch (466:9): [True: 13.5k, False: 986]
  |  Branch (466:23): [True: 10.9k, False: 2.54k]
  ------------------
  467|  14.5k|    if (m_exif_flag) required_bytes += m_exif_data_size;
  ------------------
  |  Branch (467:9): [True: 4.58k, False: 9.92k]
  ------------------
  468|  14.5k|    if (m_xmp_flag) required_bytes += m_xmp_data_size;
  ------------------
  |  Branch (468:9): [True: 9.15k, False: 5.34k]
  ------------------
  469|       |
  470|  14.5k|    int64_t remaining_bits = bits.get_bits_remaining();
  471|  14.5k|    if (remaining_bits < 0 || required_bytes > (uint64_t) remaining_bits / 8) {
  ------------------
  |  Branch (471:9): [True: 260, False: 14.2k]
  |  Branch (471:31): [True: 115, False: 14.1k]
  ------------------
  472|    375|      return {heif_error_Invalid_input,
  473|    375|              heif_suberror_Invalid_mini_box,
  474|    375|              "Declared chunk sizes in MinimizedImageBox exceed available payload."};
  475|    375|    }
  476|  14.5k|  }
  477|       |
  478|       |  // Enforce the color-profile size limit on embedded ICC blobs, matching
  479|       |  // the check applied to regular 'colr' boxes in nclx.cc.
  480|  14.1k|  if (limits && limits->max_color_profile_size) {
  ------------------
  |  Branch (480:7): [True: 14.1k, False: 0]
  |  Branch (480:17): [True: 14.1k, False: 0]
  ------------------
  481|  14.1k|    if (m_icc_flag && icc_data_size > limits->max_color_profile_size) {
  ------------------
  |  Branch (481:9): [True: 5.15k, False: 8.97k]
  |  Branch (481:23): [True: 0, False: 5.15k]
  ------------------
  482|      0|      return {heif_error_Invalid_input,
  483|      0|              heif_suberror_Security_limit_exceeded,
  484|      0|              "ICC color profile in MinimizedImageBox exceeds maximum supported size"};
  485|      0|    }
  486|  14.1k|    if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag &&
  ------------------
  |  Branch (486:9): [True: 13.2k, False: 896]
  |  Branch (486:23): [True: 10.8k, False: 2.40k]
  |  Branch (486:41): [True: 1.03k, False: 9.79k]
  ------------------
  487|  1.03k|        tmap_icc_data_size > limits->max_color_profile_size) {
  ------------------
  |  Branch (487:9): [True: 0, False: 1.03k]
  ------------------
  488|      0|      return {heif_error_Invalid_input,
  489|      0|              heif_suberror_Security_limit_exceeded,
  490|      0|              "Tone-map ICC color profile in MinimizedImageBox exceeds maximum supported size"};
  491|      0|    }
  492|  14.1k|  }
  493|       |
  494|  14.1k|  if (main_item_codec_config_size > 0)
  ------------------
  |  Branch (494:7): [True: 294, False: 13.8k]
  ------------------
  495|    294|  {
  496|    294|    m_main_item_codec_config = bits.read_bytes(main_item_codec_config_size);
  497|    294|  }
  498|       |
  499|       |  // Chunks
  500|  14.1k|  if (m_alpha_flag && m_alpha_item_data_size > 0) {
  ------------------
  |  Branch (500:7): [True: 3.16k, False: 10.9k]
  |  Branch (500:23): [True: 286, False: 2.87k]
  ------------------
  501|    286|    if (alpha_item_codec_config_size == 0) {
  ------------------
  |  Branch (501:9): [True: 135, False: 151]
  ------------------
  502|    135|      m_alpha_item_codec_config = m_main_item_codec_config;
  503|    135|    }
  504|    151|    else {
  505|       |      // TODO: should we have a flag indicating that we have explicit config for alpha?
  506|    151|      m_alpha_item_codec_config = bits.read_bytes(alpha_item_codec_config_size);
  507|    151|    }
  508|    286|  }
  509|       |
  510|  14.1k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0)
  ------------------
  |  Branch (510:7): [True: 13.2k, False: 896]
  |  Branch (510:21): [True: 10.8k, False: 2.40k]
  |  Branch (510:39): [True: 400, False: 10.4k]
  ------------------
  511|    400|  {
  512|    400|    if (gainmap_item_codec_config_size == 0) {
  ------------------
  |  Branch (512:9): [True: 124, False: 276]
  ------------------
  513|    124|      m_gainmap_item_codec_config = m_main_item_codec_config;
  514|    124|    }
  515|    276|    else {
  516|       |      // TODO: should we have a flag indicating that we have explicit config for the gain map?
  517|    276|      m_gainmap_item_codec_config = bits.read_bytes(gainmap_item_codec_config_size);
  518|    276|    }
  519|    400|  }
  520|       |
  521|  14.1k|  if (m_icc_flag)
  ------------------
  |  Branch (521:7): [True: 5.15k, False: 8.97k]
  ------------------
  522|  5.15k|  {
  523|  5.15k|    m_icc_data = bits.read_bytes(icc_data_size);
  524|  5.15k|  }
  525|       |
  526|  14.1k|  if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag)
  ------------------
  |  Branch (526:7): [True: 13.2k, False: 896]
  |  Branch (526:21): [True: 10.8k, False: 2.40k]
  |  Branch (526:39): [True: 1.03k, False: 9.79k]
  ------------------
  527|  1.03k|  {
  528|  1.03k|    m_tmap_icc_data = bits.read_bytes(tmap_icc_data_size);
  529|  1.03k|  }
  530|       |
  531|  14.1k|  if (m_hdr_flag && m_gainmap_flag && gainmap_metadata_size > 0)
  ------------------
  |  Branch (531:7): [True: 13.2k, False: 896]
  |  Branch (531:21): [True: 10.8k, False: 2.40k]
  |  Branch (531:39): [True: 174, False: 10.6k]
  ------------------
  532|    174|  {
  533|    174|    m_gainmap_metadata = bits.read_bytes(gainmap_metadata_size);
  534|    174|  }
  535|       |
  536|  14.1k|  if (m_alpha_flag && m_alpha_item_data_size > 0)
  ------------------
  |  Branch (536:7): [True: 3.16k, False: 10.9k]
  |  Branch (536:23): [True: 286, False: 2.87k]
  ------------------
  537|    286|  {
  538|    286|    m_alpha_item_data_offset = bits.get_current_byte_index() + start_offset;
  539|    286|    bits.skip_bytes(m_alpha_item_data_size);
  540|    286|  }
  541|  14.1k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0)
  ------------------
  |  Branch (541:7): [True: 13.2k, False: 896]
  |  Branch (541:21): [True: 10.8k, False: 2.40k]
  |  Branch (541:39): [True: 400, False: 10.4k]
  ------------------
  542|    400|  {
  543|    400|    m_gainmap_item_data_offset = bits.get_current_byte_index() + start_offset;
  544|    400|    bits.skip_bytes(m_gainmap_item_data_size);
  545|    400|  }
  546|       |
  547|  14.1k|  m_main_item_data_offset = bits.get_current_byte_index() + start_offset;
  548|  14.1k|  bits.skip_bytes(m_main_item_data_size);
  549|       |
  550|  14.1k|  if (m_exif_flag)
  ------------------
  |  Branch (550:7): [True: 4.49k, False: 9.63k]
  ------------------
  551|  4.49k|  {
  552|  4.49k|    m_exif_item_data_offset = bits.get_current_byte_index() + start_offset;
  553|  4.49k|    bits.skip_bytes(m_exif_data_size);
  554|  4.49k|  }
  555|  14.1k|  if (m_xmp_flag)
  ------------------
  |  Branch (555:7): [True: 9.01k, False: 5.11k]
  ------------------
  556|  9.01k|  {
  557|  9.01k|    m_xmp_item_data_offset = bits.get_current_byte_index() + start_offset;
  558|  9.01k|    bits.skip_bytes(m_xmp_data_size);
  559|  9.01k|  }
  560|       |
  561|  14.1k|  return range.get_error();
  562|  14.1k|}
_ZNK8Box_mini4dumpER6Indent:
  565|  9.93k|{
  566|  9.93k|  std::ostringstream sstr;
  567|  9.93k|  sstr << Box::dump(indent);
  568|  9.93k|  sstr << indent << "version: " << (int)m_version << "\n";
  569|       |
  570|  9.93k|  sstr << indent << "explicit_codec_types_flag: " << m_explicit_codec_types_flag << "\n";
  571|  9.93k|  sstr << indent << "float_flag: " << m_float_flag << "\n";
  572|  9.93k|  sstr << indent << "full_range_flag: " << m_full_range_flag << "\n";
  573|  9.93k|  sstr << indent << "alpha_flag: " << m_alpha_flag << "\n";
  574|  9.93k|  sstr << indent << "explicit_cicp_flag: " << m_explicit_cicp_flag << "\n";
  575|  9.93k|  sstr << indent << "hdr_flag: " << m_hdr_flag << "\n";
  576|  9.93k|  sstr << indent << "icc_flag: " << m_icc_flag << "\n";
  577|  9.93k|  sstr << indent << "exif_flag: " << m_exif_flag << "\n";
  578|  9.93k|  sstr << indent << "xmp_flag: " << m_xmp_flag << "\n";
  579|       |
  580|  9.93k|  sstr << indent << "chroma_subsampling: " << (int)m_chroma_subsampling << "\n";
  581|  9.93k|  sstr << indent << "orientation: " << (int)m_orientation << "\n";
  582|       |
  583|  9.93k|  sstr << indent << "width: " << m_width << "\n";
  584|  9.93k|  sstr << indent << "height: " << m_height << "\n";
  585|       |
  586|  9.93k|  if ((m_chroma_subsampling == 1) || (m_chroma_subsampling == 2))
  ------------------
  |  Branch (586:7): [True: 361, False: 9.57k]
  |  Branch (586:38): [True: 5.76k, False: 3.80k]
  ------------------
  587|  6.12k|  {
  588|  6.12k|    sstr << indent << "chroma_is_horizontally_centered: " << m_chroma_is_horizontally_centered << "\n";
  589|  6.12k|  }
  590|  9.93k|  if (m_chroma_subsampling == 1)
  ------------------
  |  Branch (590:7): [True: 361, False: 9.57k]
  ------------------
  591|    361|  {
  592|    361|    sstr << indent << "chroma_is_vertically_centered: " << m_chroma_is_vertically_centered << "\n";
  593|    361|  }
  594|       |
  595|  9.93k|  sstr << "bit_depth: " << (int)m_bit_depth << "\n";
  596|       |
  597|  9.93k|  if (m_alpha_flag)
  ------------------
  |  Branch (597:7): [True: 3.04k, False: 6.88k]
  ------------------
  598|  3.04k|  {
  599|  3.04k|    sstr << "alpha_is_premultiplied: " << m_alpha_is_premultiplied << "\n";
  600|  3.04k|  }
  601|       |
  602|  9.93k|  sstr << "colour_primaries: " << (int)m_colour_primaries << "\n";
  603|  9.93k|  sstr << "transfer_characteristics: " << (int)m_transfer_characteristics << "\n";
  604|  9.93k|  sstr << "matrix_coefficients: " << (int)m_matrix_coefficients << "\n";
  605|       |
  606|  9.93k|  if (m_explicit_codec_types_flag)
  ------------------
  |  Branch (606:7): [True: 4.64k, False: 5.29k]
  ------------------
  607|  4.64k|  {
  608|  4.64k|    sstr << "infe_type: " << fourcc_to_string(m_infe_type) << " (" << m_infe_type << ")" << "\n";
  609|  4.64k|    sstr << "codec_config_type: " << fourcc_to_string(m_codec_config_type) << " (" << m_codec_config_type << ")" << "\n";
  610|  4.64k|  }
  611|       |
  612|  9.93k|  if (m_hdr_flag)
  ------------------
  |  Branch (612:7): [True: 9.03k, False: 896]
  ------------------
  613|  9.03k|  {
  614|  9.03k|    sstr << indent << "gainmap_flag: " << m_gainmap_flag << "\n";
  615|  9.03k|    if (m_gainmap_flag)
  ------------------
  |  Branch (615:9): [True: 6.94k, False: 2.09k]
  ------------------
  616|  6.94k|    {
  617|  6.94k|      sstr << indent << "gainmap_width: " << m_gainmap_width << "\n";
  618|  6.94k|      sstr << indent << "gainmap_height: " << m_gainmap_height << "\n";
  619|  6.94k|      sstr << indent << "gainmap_matrix_coefficients: " << (int)m_gainmap_matrix_coefficients << "\n";
  620|  6.94k|      sstr << indent << "gainmap_full_range_flag: " << m_gainmap_full_range_flag << "\n";
  621|  6.94k|      sstr << indent << "gainmap_chroma_subsampling: " << (int)m_gainmap_chroma_subsampling << "\n";
  622|  6.94k|      if ((m_gainmap_chroma_subsampling == 1) || (m_gainmap_chroma_subsampling == 2))
  ------------------
  |  Branch (622:11): [True: 3.71k, False: 3.23k]
  |  Branch (622:50): [True: 2.21k, False: 1.02k]
  ------------------
  623|  5.92k|      {
  624|  5.92k|        sstr << indent << "gainmap_chroma_is_horizontally_centred: " << m_gainmap_chroma_is_horizontally_centred << "\n";
  625|  5.92k|      }
  626|  6.94k|      if (m_gainmap_chroma_subsampling == 1)
  ------------------
  |  Branch (626:11): [True: 3.71k, False: 3.23k]
  ------------------
  627|  3.71k|      {
  628|  3.71k|        sstr << indent << "gainmap_chroma_is_vertically_centred: " << m_gainmap_chroma_is_vertically_centred << "\n";
  629|  3.71k|      }
  630|  6.94k|      sstr << indent << "gainmap_float_flag: " << m_gainmap_float_flag << "\n";
  631|  6.94k|      sstr << "gainmap_bit_depth: " << (int)m_gainmap_bit_depth << "\n";
  632|  6.94k|      sstr << indent << "tmap_icc_flag: " << m_tmap_icc_flag << "\n";
  633|  6.94k|      sstr << indent << "tmap_explicit_cicp_flag: " << m_tmap_explicit_cicp_flag << "\n";
  634|  6.94k|      if (m_tmap_explicit_cicp_flag)
  ------------------
  |  Branch (634:11): [True: 2.37k, False: 4.56k]
  ------------------
  635|  2.37k|      {
  636|  2.37k|        sstr << "tmap_colour_primaries: " << (int)m_tmap_colour_primaries << "\n";
  637|  2.37k|        sstr << "tmap_transfer_characteristics: " << (int)m_tmap_transfer_characteristics << "\n";
  638|  2.37k|        sstr << "tmap_matrix_coefficients: " << (int)m_tmap_matrix_coefficients << "\n";
  639|  2.37k|        sstr << "tmap_full_range_flag: " << m_tmap_full_range_flag << "\n";
  640|  2.37k|      }
  641|  6.94k|    }
  642|       |
  643|  9.03k|    if (m_clli)
  ------------------
  |  Branch (643:9): [True: 4.06k, False: 4.97k]
  ------------------
  644|  4.06k|    {
  645|  4.06k|      sstr << indent << "ccli.max_content_light_level: " << m_clli->clli.max_content_light_level << "\n";
  646|  4.06k|      sstr << indent << "ccli.max_pic_average_light_level: " << m_clli->clli.max_pic_average_light_level << "\n";
  647|  4.06k|    }
  648|  4.97k|    else {
  649|  4.97k|      sstr << indent << "clli: ---\n";
  650|  4.97k|    }
  651|       |
  652|  9.03k|    if (m_mdcv)
  ------------------
  |  Branch (652:9): [True: 975, False: 8.06k]
  ------------------
  653|    975|    {
  654|    975|      sstr << indent << "mdcv.display_primaries (x,y): ";
  655|    975|      sstr << "(" << m_mdcv->mdcv.display_primaries_x[0] << ";" << m_mdcv->mdcv.display_primaries_y[0] << "), ";
  656|    975|      sstr << "(" << m_mdcv->mdcv.display_primaries_x[1] << ";" << m_mdcv->mdcv.display_primaries_y[1] << "), ";
  657|    975|      sstr << "(" << m_mdcv->mdcv.display_primaries_x[2] << ";" << m_mdcv->mdcv.display_primaries_y[2] << ")\n";
  658|       |
  659|    975|      sstr << indent << "mdcv.white point (x,y): (" << m_mdcv->mdcv.white_point_x << ";" << m_mdcv->mdcv.white_point_y << ")\n";
  660|    975|      sstr << indent << "mdcv.max display mastering luminance: " << m_mdcv->mdcv.max_display_mastering_luminance << "\n";
  661|    975|      sstr << indent << "mdcv.min display mastering luminance: " << m_mdcv->mdcv.min_display_mastering_luminance << "\n";
  662|    975|    }
  663|  8.06k|    else {
  664|  8.06k|      sstr << indent << "mdcv: ---\n";
  665|  8.06k|    }
  666|       |
  667|  9.03k|    if (m_cclv)
  ------------------
  |  Branch (667:9): [True: 2.27k, False: 6.76k]
  ------------------
  668|  2.27k|    {
  669|  2.27k|      sstr << indent << "cclv.ccv_primaries_present_flag: " << m_cclv->ccv_primaries_are_valid() << "\n";
  670|  2.27k|      sstr << indent << "cclv.ccv_min_luminance_value_present_flag: " << m_cclv->min_luminance_is_valid() << "\n";
  671|  2.27k|      sstr << indent << "cclv.ccv_max_luminance_value_present_flag: " << m_cclv->max_luminance_is_valid() << "\n";
  672|  2.27k|      sstr << indent << "cclv.ccv_avg_luminance_value_present_flag: " << m_cclv->avg_luminance_is_valid() << "\n";
  673|  2.27k|      if (m_cclv->ccv_primaries_are_valid())
  ------------------
  |  Branch (673:11): [True: 321, False: 1.94k]
  ------------------
  674|    321|      {
  675|    321|        sstr << indent << "cclv.ccv_primaries (x,y): ";
  676|    321|        sstr << "(" << m_cclv->get_ccv_primary_x0() << ";" << m_cclv->get_ccv_primary_y0() << "), ";
  677|    321|        sstr << "(" << m_cclv->get_ccv_primary_x1() << ";" << m_cclv->get_ccv_primary_y1() << "), ";
  678|    321|        sstr << "(" << m_cclv->get_ccv_primary_x2() << ";" << m_cclv->get_ccv_primary_y2() << ")\n";
  679|    321|      }
  680|  2.27k|      if (m_cclv->min_luminance_is_valid())
  ------------------
  |  Branch (680:11): [True: 387, False: 1.88k]
  ------------------
  681|    387|      {
  682|    387|        sstr << indent << "cclv.ccv_min_luminance_value: " << m_cclv->get_min_luminance() << "\n";
  683|    387|      }
  684|  2.27k|      if (m_cclv->max_luminance_is_valid())
  ------------------
  |  Branch (684:11): [True: 1.81k, False: 452]
  ------------------
  685|  1.81k|      {
  686|  1.81k|        sstr << indent << "cclv.ccv_max_luminance_value: " << m_cclv->get_max_luminance() << "\n";
  687|  1.81k|      }
  688|  2.27k|      if (m_cclv->avg_luminance_is_valid())
  ------------------
  |  Branch (688:11): [True: 365, False: 1.90k]
  ------------------
  689|    365|      {
  690|    365|        sstr << indent << "cclv.ccv_avg_luminance_value: " << m_cclv->get_avg_luminance() << "\n";
  691|    365|      }
  692|  2.27k|    }
  693|  6.76k|    else {
  694|  6.76k|      sstr << indent << "cclv: ---\n";
  695|  6.76k|    }
  696|       |
  697|  9.03k|    if (m_amve)
  ------------------
  |  Branch (697:9): [True: 365, False: 8.67k]
  ------------------
  698|    365|    {
  699|    365|      sstr << indent << "amve.ambient_illumination: " << m_amve->amve.ambient_illumination << "\n";
  700|    365|      sstr << indent << "amve.ambient_light_x: " << m_amve->amve.ambient_light_x << "\n";
  701|    365|      sstr << indent << "amve.ambient_light_y: " << m_amve->amve.ambient_light_y << "\n";
  702|    365|    }
  703|  8.67k|    else {
  704|  8.67k|      sstr << indent << "amve: ---\n";
  705|  8.67k|    }
  706|       |
  707|  9.03k|    sstr << indent << "reve_flag: " << m_reve_flag << "\n";
  708|       |
  709|  9.03k|    if (m_reve_flag)
  ------------------
  |  Branch (709:9): [True: 2.17k, False: 6.86k]
  ------------------
  710|  2.17k|    {
  711|       |      // TODO - this isn't published yet
  712|  2.17k|    }
  713|  9.03k|    if (m_ndwt)
  ------------------
  |  Branch (713:9): [True: 3.93k, False: 5.10k]
  ------------------
  714|  3.93k|    {
  715|  3.93k|      sstr << indent << "ndwt.diffuse_white_luminance: " << m_ndwt->get_diffuse_white_luminance() << "\n";
  716|  3.93k|    }
  717|  5.10k|    else {
  718|  5.10k|      sstr << indent << "ndwt: ---\n";
  719|  5.10k|    }
  720|       |
  721|  9.03k|    if (m_gainmap_flag)
  ------------------
  |  Branch (721:9): [True: 6.94k, False: 2.09k]
  ------------------
  722|  6.94k|    {
  723|  6.94k|      if (m_tmap_clli)
  ------------------
  |  Branch (723:11): [True: 4.13k, False: 2.81k]
  ------------------
  724|  4.13k|      {
  725|  4.13k|        sstr << indent << "tmap_clli.max_content_light_level: " << m_tmap_clli->clli.max_content_light_level << "\n";
  726|  4.13k|        sstr << indent << "tmap_clli.max_pic_average_light_level: " << m_tmap_clli->clli.max_pic_average_light_level << "\n";
  727|  4.13k|      }
  728|  2.81k|      else {
  729|  2.81k|        sstr << indent << "tmap_clli: ---\n";
  730|  2.81k|      }
  731|       |
  732|  6.94k|      if (m_tmap_mdcv)
  ------------------
  |  Branch (732:11): [True: 2.54k, False: 4.40k]
  ------------------
  733|  2.54k|      {
  734|  2.54k|        sstr << indent << "tmap_mdcv.display_primaries (x,y): ";
  735|  2.54k|        sstr << "(" << m_tmap_mdcv->mdcv.display_primaries_x[0] << ";" << m_tmap_mdcv->mdcv.display_primaries_y[0] << "), ";
  736|  2.54k|        sstr << "(" << m_tmap_mdcv->mdcv.display_primaries_x[1] << ";" << m_tmap_mdcv->mdcv.display_primaries_y[1] << "), ";
  737|  2.54k|        sstr << "(" << m_tmap_mdcv->mdcv.display_primaries_x[2] << ";" << m_tmap_mdcv->mdcv.display_primaries_y[2] << ")\n";
  738|       |
  739|  2.54k|        sstr << indent << "tmap_mdcv.white point (x,y): (" << m_tmap_mdcv->mdcv.white_point_x << ";" << m_tmap_mdcv->mdcv.white_point_y << ")\n";
  740|  2.54k|        sstr << indent << "tmap_mdcv.max display mastering luminance: " << m_tmap_mdcv->mdcv.max_display_mastering_luminance << "\n";
  741|  2.54k|        sstr << indent << "tmap_mdcv.min display mastering luminance: " << m_tmap_mdcv->mdcv.min_display_mastering_luminance << "\n";
  742|  2.54k|      }
  743|  4.40k|      else {
  744|  4.40k|        sstr << indent << "tmap_mdcv: ---\n";
  745|  4.40k|      }
  746|       |
  747|  6.94k|      if (m_tmap_cclv)
  ------------------
  |  Branch (747:11): [True: 4.18k, False: 2.76k]
  ------------------
  748|  4.18k|      {
  749|  4.18k|        sstr << indent << "tmap_cclv.ccv_primaries_present_flag: " << m_tmap_cclv->ccv_primaries_are_valid() << "\n";
  750|  4.18k|        sstr << indent << "tmap_cclv.ccv_min_luminance_value_present_flag: " << m_tmap_cclv->min_luminance_is_valid() << "\n";
  751|  4.18k|        sstr << indent << "tmap_cclv.ccv_max_luminance_value_present_flag: " << m_tmap_cclv->max_luminance_is_valid() << "\n";
  752|  4.18k|        sstr << indent << "tmap_cclv.ccv_avg_luminance_value_present_flag: " << m_tmap_cclv->avg_luminance_is_valid() << "\n";
  753|  4.18k|        if (m_tmap_cclv->ccv_primaries_are_valid())
  ------------------
  |  Branch (753:13): [True: 462, False: 3.72k]
  ------------------
  754|    462|        {
  755|    462|          sstr << indent << "tmap_cclv.ccv_primaries (x,y): ";
  756|    462|          sstr << "(" << m_tmap_cclv->get_ccv_primary_x0() << ";" << m_tmap_cclv->get_ccv_primary_y0() << "), ";
  757|    462|          sstr << "(" << m_tmap_cclv->get_ccv_primary_x1() << ";" << m_tmap_cclv->get_ccv_primary_y1() << "), ";
  758|    462|          sstr << "(" << m_tmap_cclv->get_ccv_primary_x2() << ";" << m_tmap_cclv->get_ccv_primary_y2() << ")\n";
  759|    462|        }
  760|  4.18k|        if (m_tmap_cclv->min_luminance_is_valid())
  ------------------
  |  Branch (760:13): [True: 717, False: 3.46k]
  ------------------
  761|    717|        {
  762|    717|          sstr << indent << "tmap_cclv.ccv_min_luminance_value: " << m_tmap_cclv->get_min_luminance() << "\n";
  763|    717|        }
  764|  4.18k|        if (m_tmap_cclv->max_luminance_is_valid())
  ------------------
  |  Branch (764:13): [True: 720, False: 3.46k]
  ------------------
  765|    720|        {
  766|    720|          sstr << indent << "tmap_cclv.ccv_max_luminance_value: " << m_tmap_cclv->get_max_luminance() << "\n";
  767|    720|        }
  768|  4.18k|        if (m_tmap_cclv->avg_luminance_is_valid())
  ------------------
  |  Branch (768:13): [True: 706, False: 3.47k]
  ------------------
  769|    706|        {
  770|    706|          sstr << indent << "tmap_cclv.ccv_avg_luminance_value: " << m_tmap_cclv->get_avg_luminance() << "\n";
  771|    706|        }
  772|  4.18k|      }
  773|  2.76k|      else {
  774|  2.76k|        sstr << indent << "tmap_cclv: ---\n";
  775|  2.76k|      }
  776|       |
  777|  6.94k|      if (m_tmap_amve)
  ------------------
  |  Branch (777:11): [True: 3.59k, False: 3.34k]
  ------------------
  778|  3.59k|      {
  779|  3.59k|        sstr << indent << "tmap_amve.ambient_illumination: " << m_tmap_amve->amve.ambient_illumination << "\n";
  780|  3.59k|        sstr << indent << "tmap_amve.ambient_light_x: " << m_tmap_amve->amve.ambient_light_x << "\n";
  781|  3.59k|        sstr << indent << "tmap_amve.ambient_light_y: " << m_tmap_amve->amve.ambient_light_y << "\n";
  782|  3.59k|      }
  783|  3.34k|      else {
  784|  3.34k|        sstr << indent << "tmap_amve: ---\n";
  785|  3.34k|      }
  786|       |
  787|  6.94k|      sstr << indent << "tmap_reve_flag: " << m_tmap_reve_flag << "\n";
  788|       |
  789|  6.94k|      if (m_tmap_reve_flag)
  ------------------
  |  Branch (789:11): [True: 883, False: 6.06k]
  ------------------
  790|    883|      {
  791|       |        // TODO - this isn't published yet
  792|    883|      }
  793|  6.94k|      if (m_tmap_ndwt)
  ------------------
  |  Branch (793:11): [True: 1.85k, False: 5.09k]
  ------------------
  794|  1.85k|      {
  795|  1.85k|        sstr << indent << "tmap_ndwt.diffuse_white_luminance: " << m_tmap_ndwt->get_diffuse_white_luminance() << "\n";
  796|  1.85k|      }
  797|  5.09k|      else {
  798|  5.09k|        sstr << indent << "tmap_ndwt: ---\n";
  799|  5.09k|      }
  800|  6.94k|    }
  801|  9.03k|  }
  802|       |
  803|  9.93k|  if (m_alpha_flag && (m_alpha_item_data_size > 0) && (m_alpha_item_codec_config.size() > 0))
  ------------------
  |  Branch (803:7): [True: 3.04k, False: 6.88k]
  |  Branch (803:23): [True: 284, False: 2.76k]
  |  Branch (803:55): [True: 164, False: 120]
  ------------------
  804|    164|  {
  805|    164|    sstr << "alpha_item_code_config size: " << m_alpha_item_codec_config.size() << "\n";
  806|    164|  }
  807|  9.93k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_codec_config.size() > 0)
  ------------------
  |  Branch (807:7): [True: 9.03k, False: 896]
  |  Branch (807:21): [True: 6.94k, False: 2.09k]
  |  Branch (807:39): [True: 268, False: 6.67k]
  ------------------
  808|    268|  {
  809|    268|    sstr << "gainmap_item_codec_config size: " << m_gainmap_item_codec_config.size() << "\n";
  810|    268|  }
  811|  9.93k|  if (m_main_item_codec_config.size() > 0)
  ------------------
  |  Branch (811:7): [True: 283, False: 9.65k]
  ------------------
  812|    283|  {
  813|    283|    sstr << "main_item_code_config size: " << m_main_item_codec_config.size() << "\n";
  814|    283|  }
  815|       |
  816|  9.93k|  if (m_icc_flag)
  ------------------
  |  Branch (816:7): [True: 3.56k, False: 6.37k]
  ------------------
  817|  3.56k|  {
  818|  3.56k|    sstr << "icc_data size: " << m_icc_data.size() << "\n";
  819|  3.56k|  }
  820|  9.93k|  if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag)
  ------------------
  |  Branch (820:7): [True: 9.03k, False: 896]
  |  Branch (820:21): [True: 6.94k, False: 2.09k]
  |  Branch (820:39): [True: 776, False: 6.17k]
  ------------------
  821|    776|  {
  822|    776|    sstr << "tmap_icc_data size: " << m_tmap_icc_data.size() << "\n";
  823|    776|  }
  824|  9.93k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_metadata.size() > 0)
  ------------------
  |  Branch (824:7): [True: 9.03k, False: 896]
  |  Branch (824:21): [True: 6.94k, False: 2.09k]
  |  Branch (824:39): [True: 169, False: 6.77k]
  ------------------
  825|    169|  {
  826|    169|    sstr << "gainmap_metadata size: " << m_gainmap_metadata.size() << "\n";
  827|    169|  }
  828|       |
  829|  9.93k|  if (m_alpha_flag && (m_alpha_item_data_size > 0))
  ------------------
  |  Branch (829:7): [True: 3.04k, False: 6.88k]
  |  Branch (829:23): [True: 284, False: 2.76k]
  ------------------
  830|    284|  {
  831|    284|    sstr << "alpha_item_data offset: " << m_alpha_item_data_offset << ", size: " << m_alpha_item_data_size << "\n";
  832|    284|  }
  833|  9.93k|  if (m_hdr_flag && m_gainmap_flag && (m_gainmap_item_data_size > 0))
  ------------------
  |  Branch (833:7): [True: 9.03k, False: 896]
  |  Branch (833:21): [True: 6.94k, False: 2.09k]
  |  Branch (833:39): [True: 385, False: 6.56k]
  ------------------
  834|    385|  {
  835|    385|    sstr << "gainmap_item_data offset: " << m_gainmap_item_data_offset << ", size: " << m_gainmap_item_data_size << "\n";
  836|    385|  }
  837|       |
  838|  9.93k|  sstr << "main_item_data offset: " << m_main_item_data_offset << ", size: " << m_main_item_data_size << "\n";
  839|       |
  840|  9.93k|  if (m_exif_flag)
  ------------------
  |  Branch (840:7): [True: 3.13k, False: 6.79k]
  ------------------
  841|  3.13k|  {
  842|  3.13k|    sstr << "exif_data offset: " << m_exif_item_data_offset << ", size: " << m_exif_data_size << "\n";
  843|  3.13k|  }
  844|  9.93k|  if (m_xmp_flag)
  ------------------
  |  Branch (844:7): [True: 5.83k, False: 4.09k]
  ------------------
  845|  5.83k|  {
  846|  5.83k|    sstr << "xmp_data offset: " << m_xmp_item_data_offset << ", size: " << m_xmp_data_size << "\n";
  847|  5.83k|  }
  848|  9.93k|  return sstr.str();
  849|  9.93k|}

_ZN8Box_miniC2Ev:
   36|  14.5k|  {
   37|  14.5k|    set_short_type(fourcc("mini"));
   38|  14.5k|  }

_ZN18color_profile_nclx5parseER14BitstreamRange:
  223|    485|{
  224|    485|  StreamReader::grow_status status;
  225|    485|  status = range.wait_for_available_bytes(7);
  226|    485|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (226:7): [True: 3, False: 482]
  ------------------
  227|       |    // TODO: return recoverable error at timeout
  228|      3|    return Error(heif_error_Invalid_input,
  229|      3|                 heif_suberror_End_of_data);
  230|      3|  }
  231|       |
  232|    482|  m_profile.m_colour_primaries = range.read16();
  233|    482|  m_profile.m_transfer_characteristics = range.read16();
  234|    482|  m_profile.m_matrix_coefficients = range.read16();
  235|    482|  m_profile.m_full_range_flag = (range.read8() & 0x80 ? true : false);
  ------------------
  |  Branch (235:34): [True: 75, False: 407]
  ------------------
  236|       |
  237|    482|  return Error::Ok;
  238|    485|}
_ZN18color_profile_nclx10parse_nclcER14BitstreamRange:
  241|    118|{
  242|    118|  StreamReader::grow_status status;
  243|    118|  status = range.wait_for_available_bytes(6);
  244|    118|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (244:7): [True: 1, False: 117]
  ------------------
  245|       |    // TODO: return recoverable error at timeout
  246|      1|    return Error(heif_error_Invalid_input,
  247|      1|                 heif_suberror_End_of_data);
  248|      1|  }
  249|       |
  250|    117|  m_profile.m_colour_primaries = range.read16();
  251|    117|  m_profile.m_transfer_characteristics = range.read16();
  252|    117|  m_profile.m_matrix_coefficients = range.read16();
  253|       |
  254|       |  // use full range for RGB, limited range otherwise
  255|    117|  m_profile.m_full_range_flag = (m_profile.m_matrix_coefficients == 0);
  256|       |
  257|    117|  return Error::Ok;
  258|    118|}
_ZN12nclx_profile17set_sRGB_defaultsEv:
  315|    603|{
  316|       |  // sRGB defaults
  317|    603|  m_colour_primaries = 1;
  318|    603|  m_transfer_characteristics = 13;
  319|    603|  m_matrix_coefficients = 6;
  320|    603|  m_full_range_flag = true;
  321|    603|}
_ZN8Box_colr5parseER14BitstreamRangePK20heif_security_limits:
  385|  10.4k|{
  386|  10.4k|  StreamReader::grow_status status;
  387|  10.4k|  uint32_t colour_type = range.read32();
  388|       |
  389|  10.4k|  if (colour_type == fourcc("nclx")) {
  ------------------
  |  Branch (389:7): [True: 485, False: 9.94k]
  ------------------
  390|    485|    auto color_profile = std::make_shared<color_profile_nclx>();
  391|    485|    m_color_profile = color_profile;
  392|    485|    Error err = color_profile->parse(range);
  393|    485|    if (err) {
  ------------------
  |  Branch (393:9): [True: 3, False: 482]
  ------------------
  394|      3|      return err;
  395|      3|    }
  396|    485|  }
  397|  9.94k|  else if (colour_type == fourcc("nclc")) {
  ------------------
  |  Branch (397:12): [True: 118, False: 9.83k]
  ------------------
  398|    118|    auto color_profile = std::make_shared<color_profile_nclx>();
  399|    118|    m_color_profile = color_profile;
  400|    118|    Error err = color_profile->parse_nclc(range);
  401|    118|    if (err) {
  ------------------
  |  Branch (401:9): [True: 1, False: 117]
  ------------------
  402|      1|      return err;
  403|      1|    }
  404|    118|  }
  405|  9.83k|  else if (colour_type == fourcc("prof") ||
  ------------------
  |  Branch (405:12): [True: 2.04k, False: 7.78k]
  ------------------
  406|  9.71k|           colour_type == fourcc("rICC")) {
  ------------------
  |  Branch (406:12): [True: 7.66k, False: 120]
  ------------------
  407|  9.71k|    if (!has_fixed_box_size()) {
  ------------------
  |  Branch (407:9): [True: 2, False: 9.70k]
  ------------------
  408|      2|      return Error(heif_error_Unsupported_feature, heif_suberror_Unspecified, "colr boxes with undefined box size are not supported");
  409|      2|    }
  410|       |
  411|  9.70k|    uint64_t profile_size_64 = get_box_size() - get_header_size() - 4;
  412|  9.70k|    if (limits->max_color_profile_size && profile_size_64 > limits->max_color_profile_size) {
  ------------------
  |  Branch (412:9): [True: 9.70k, False: 0]
  |  Branch (412:43): [True: 0, False: 9.70k]
  ------------------
  413|      0|      return Error(heif_error_Invalid_input, heif_suberror_Security_limit_exceeded, "Color profile exceeds maximum supported size");
  414|      0|    }
  415|       |
  416|  9.70k|    size_t profile_size = static_cast<size_t>(profile_size_64);
  417|       |
  418|  9.70k|    status = range.wait_for_available_bytes(profile_size);
  419|  9.70k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (419:9): [True: 0, False: 9.70k]
  ------------------
  420|       |      // TODO: return recoverable error at timeout
  421|      0|      return Error(heif_error_Invalid_input,
  422|      0|                   heif_suberror_End_of_data);
  423|      0|    }
  424|       |
  425|  9.70k|    std::vector<uint8_t> rawData(profile_size);
  426|  79.8k|    for (size_t i = 0; i < profile_size; i++) {
  ------------------
  |  Branch (426:24): [True: 70.1k, False: 9.70k]
  ------------------
  427|  70.1k|      rawData[i] = range.read8();
  428|  70.1k|    }
  429|       |
  430|  9.70k|    m_color_profile = std::make_shared<color_profile_raw>(colour_type, rawData);
  431|  9.70k|  }
  432|    120|  else {
  433|    120|    return Error(heif_error_Invalid_input,
  434|    120|                 heif_suberror_Unknown_color_profile_type);
  435|    120|  }
  436|       |
  437|  10.3k|  return range.get_error();
  438|  10.4k|}
_ZNK8Box_colr4dumpER6Indent:
  442|  8.00k|{
  443|  8.00k|  std::ostringstream sstr;
  444|  8.00k|  sstr << Box::dump(indent);
  445|       |
  446|  8.00k|  if (m_color_profile) {
  ------------------
  |  Branch (446:7): [True: 8.00k, False: 0]
  ------------------
  447|  8.00k|    sstr << indent << "colour_type: " << fourcc_to_string(get_color_profile_type()) << "\n";
  448|  8.00k|    sstr << m_color_profile->dump(indent);
  449|  8.00k|  }
  450|      0|  else {
  451|      0|    sstr << indent << "colour_type: ---\n";
  452|      0|    sstr << "no color profile\n";
  453|      0|  }
  454|       |
  455|  8.00k|  return sstr.str();
  456|  8.00k|}
_ZNK17color_profile_raw4dumpER6Indent:
  460|  7.52k|{
  461|  7.52k|  std::ostringstream sstr;
  462|  7.52k|  sstr << indent << "profile size: " << m_data.size() << "\n";
  463|  7.52k|  return sstr.str();
  464|  7.52k|}
_ZNK18color_profile_nclx4dumpER6Indent:
  468|    479|{
  469|    479|  std::ostringstream sstr;
  470|    479|  sstr << indent << "colour_primaries: " << m_profile.m_colour_primaries << "\n"
  471|    479|       << indent << "transfer_characteristics: " << m_profile.m_transfer_characteristics << "\n"
  472|    479|       << indent << "matrix_coefficients: " << m_profile.m_matrix_coefficients << "\n"
  473|    479|       << indent << "full_range_flag: " << m_profile.m_full_range_flag << "\n";
  474|    479|  return sstr.str();
  475|    479|}

_ZN17color_profile_rawC2EjRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  105|  9.70k|      : m_type(type), m_data(data) {}
_ZNK17color_profile_raw8get_typeEv:
  107|  7.52k|  uint32_t get_type() const override { return m_type; }
_ZN18color_profile_nclxC2Ev:
  175|    603|  color_profile_nclx() { m_profile.set_sRGB_defaults(); }
_ZNK18color_profile_nclx8get_typeEv:
  184|    479|  uint32_t get_type() const override { return fourcc("nclx"); }
_ZN8Box_colrC2Ev:
  205|  10.4k|  {
  206|  10.4k|    set_short_type(fourcc("colr"));
  207|  10.4k|  }
_ZNK8Box_colr22get_color_profile_typeEv:
  211|  8.00k|  uint32_t get_color_profile_type() const { return m_color_profile->get_type(); }
_ZN13color_profileD2Ev:
   92|  10.3k|  virtual ~color_profile() = default;

_ZN8Box_prfr5parseER14BitstreamRangePK20heif_security_limits:
   29|  1.01k|{
   30|  1.01k|  parse_full_box_header(range);
   31|       |
   32|  1.01k|  if (get_version() > 0) {
  ------------------
  |  Branch (32:7): [True: 50, False: 964]
  ------------------
   33|     50|    return unsupported_version_error("prfr");
   34|     50|  }
   35|       |
   36|    964|  uint8_t projection_type = (range.read8() & 0x1F);
   37|    964|  m_projection = static_cast<heif_omaf_image_projection>(projection_type);
   38|    964|  return range.get_error();
   39|  1.01k|}
_ZNK8Box_prfr4dumpER6Indent:
   42|    940|{
   43|    940|  std::ostringstream sstr;
   44|    940|  sstr << Box::dump(indent);
   45|    940|  sstr << indent << "projection_type: ";
   46|    940|  switch (m_projection) {
   47|     47|    case heif_omaf_image_projection_equirectangular:
  ------------------
  |  Branch (47:5): [True: 47, False: 893]
  ------------------
   48|     47|      sstr << "equirectangular\n";
   49|     47|      break;
   50|    309|    case heif_omaf_image_projection_cube_map:
  ------------------
  |  Branch (50:5): [True: 309, False: 631]
  ------------------
   51|    309|      sstr << "cube-map\n";
   52|    309|      break;
   53|    584|    default:
  ------------------
  |  Branch (53:5): [True: 584, False: 356]
  ------------------
   54|    584|      sstr << "unknown (" << m_projection << ")\n";
   55|    584|      break;
   56|    940|  }
   57|    940|  return sstr.str();
   58|    940|}

_ZN8Box_prfrC2Ev:
   37|  1.01k|  {
   38|  1.01k|    set_short_type(fourcc("prfr"));
   39|  1.01k|  }
_ZNK8Box_prfr14debug_box_nameEv:
   47|    940|  const char* debug_box_name() const override { return "Projection Format"; }
_ZNK8Box_prfr24get_parse_error_fatalityEv:
   49|     52|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }

_Z24register_default_pluginsv:
  149|      2|{
  150|       |#if HAVE_WEBCODECS
  151|       |  register_decoder(get_decoder_plugin_webcodecs());
  152|       |#endif
  153|       |
  154|      2|#if HAVE_LIBDE265
  155|      2|  register_decoder(get_decoder_plugin_libde265());
  156|      2|#endif
  157|       |
  158|      2|#if HAVE_X265
  159|      2|  register_encoder(get_encoder_plugin_x265());
  160|      2|#endif
  161|       |
  162|       |#if HAVE_KVAZAAR
  163|       |  register_encoder(get_encoder_plugin_kvazaar());
  164|       |#endif
  165|       |
  166|       |#if HAVE_UVG266
  167|       |  register_encoder(get_encoder_plugin_uvg266());
  168|       |#endif
  169|       |
  170|      2|#if HAVE_VVENC
  171|      2|  register_encoder(get_encoder_plugin_vvenc());
  172|      2|#endif
  173|       |
  174|      2|#if HAVE_VVDEC
  175|      2|  register_decoder(get_decoder_plugin_vvdec());
  176|      2|#endif
  177|       |
  178|      2|#if HAVE_AOM_ENCODER
  179|      2|  register_encoder(get_encoder_plugin_aom());
  180|      2|#endif
  181|       |
  182|      2|#if HAVE_AOM_DECODER
  183|      2|  register_decoder(get_decoder_plugin_aom());
  184|      2|#endif
  185|       |
  186|       |#if HAVE_RAV1E
  187|       |  register_encoder(get_encoder_plugin_rav1e());
  188|       |#endif
  189|       |
  190|      2|#if HAVE_DAV1D
  191|      2|  register_decoder(get_decoder_plugin_dav1d());
  192|      2|#endif
  193|       |
  194|      2|#if HAVE_SvtEnc
  195|      2|  register_encoder(get_encoder_plugin_svt());
  196|      2|#endif
  197|       |
  198|       |#if HAVE_FFMPEG_DECODER
  199|       |  register_decoder(get_decoder_plugin_ffmpeg());
  200|       |#endif
  201|       |
  202|      2|#if HAVE_JPEG_DECODER
  203|      2|  register_decoder(get_decoder_plugin_jpeg());
  204|      2|#endif
  205|       |
  206|      2|#if HAVE_JPEG_ENCODER
  207|      2|  register_encoder(get_encoder_plugin_jpeg());
  208|      2|#endif
  209|       |
  210|      2|#if HAVE_OPENJPEG_ENCODER
  211|      2|  register_encoder(get_encoder_plugin_openjpeg());
  212|      2|#endif
  213|       |
  214|      2|#if HAVE_OPENJPEG_DECODER
  215|      2|  register_decoder(get_decoder_plugin_openjpeg());
  216|      2|#endif
  217|       |
  218|      2|#if HAVE_OPENJPH_ENCODER
  219|      2|  register_encoder(get_encoder_plugin_openjph());
  220|      2|#endif
  221|       |
  222|      2|#if HAVE_OpenH264_DECODER
  223|      2|  register_decoder(get_decoder_plugin_openh264());
  224|      2|#endif
  225|       |
  226|      2|#if HAVE_X264
  227|      2|  register_encoder(get_encoder_plugin_x264());
  228|      2|#endif
  229|       |
  230|      2|#if WITH_UNCOMPRESSED_CODEC
  231|      2|  register_encoder(get_encoder_plugin_uncompressed());
  232|      2|  register_decoder(get_decoder_plugin_uncompressed());
  233|      2|#endif
  234|       |
  235|      2|  register_encoder(get_encoder_plugin_mask());
  236|      2|}
_Z16register_decoderPK19heif_decoder_plugin:
  240|     16|{
  241|     16|  if (decoder_plugin->init_plugin) {
  ------------------
  |  Branch (241:7): [True: 14, False: 2]
  ------------------
  242|     14|    (*decoder_plugin->init_plugin)();
  243|     14|  }
  244|       |
  245|     16|  s_decoder_plugins.insert(decoder_plugin);
  246|     16|}
_Z16register_encoderPK19heif_encoder_plugin:
  292|     20|{
  293|     20|  if (encoder_plugin->init_plugin) {
  ------------------
  |  Branch (293:7): [True: 20, False: 0]
  ------------------
  294|     20|    (*encoder_plugin->init_plugin)();
  295|     20|  }
  296|       |
  297|     20|  auto descriptor = std::unique_ptr<heif_encoder_descriptor>(new heif_encoder_descriptor);
  298|     20|  descriptor->plugin = encoder_plugin;
  299|       |
  300|     20|  s_encoder_descriptors.insert(std::move(descriptor));
  301|     20|}
_ZN24Register_Default_PluginsC2Ev:
  142|      2|  {
  143|      2|    register_default_plugins();
  144|      2|  }

_ZNK33encoder_descriptor_priority_orderclERKNSt3__110unique_ptrI23heif_encoder_descriptorNS0_14default_deleteIS2_EEEES7_:
   50|     50|  {
   51|     50|    return a->plugin->priority > b->plugin->priority;  // highest priority first
   52|     50|  }

_Z22get_decoder_plugin_aomv:
  436|      2|{
  437|      2|  return &decoder_aom;
  438|      2|}
decoder_aom.cc:_ZL15aom_init_pluginv:
   88|      2|{
   89|      2|}

_Z24get_decoder_plugin_dav1dv:
  447|      2|{
  448|      2|  return &decoder_dav1d;
  449|      2|}
decoder_dav1d.cc:_ZL17dav1d_init_pluginv:
   71|      2|{
   72|      2|}

_Z23get_decoder_plugin_jpegv:
  495|      2|{
  496|      2|  return &decoder_jpeg;
  497|      2|}
decoder_jpeg.cc:_ZL16jpeg_init_pluginv:
   70|      2|{
   71|      2|}

_Z27get_decoder_plugin_libde265v:
  523|      2|{
  524|      2|  return &decoder_libde265;
  525|      2|}
decoder_libde265.cc:_ZL20libde265_init_pluginv:
   67|      2|{
   68|      2|  de265_init();
   69|      2|}

_Z27get_decoder_plugin_openh264v:
  471|      2|{
  472|      2|  return &decoder_openh264;
  473|      2|}
decoder_openh264.cc:_ZL20openh264_init_pluginv:
   95|      2|{
   96|      2|}

_Z27get_decoder_plugin_openjpegv:
  550|      2|{
  551|      2|  return &decoder_openjpeg;
  552|      2|}
decoder_openjpeg.cc:_ZL20openjpeg_init_pluginv:
   60|      2|{
   61|      2|}

_Z31get_decoder_plugin_uncompressedv:
   71|      2|{
   72|      2|  return &decoder_uncompressed;
   73|      2|}

_Z24get_decoder_plugin_vvdecv:
  438|      2|{
  439|      2|  return &decoder_vvdec;
  440|      2|}
decoder_vvdec.cc:_ZL17vvdec_init_pluginv:
   84|      2|{
   85|      2|}

_Z22get_encoder_plugin_aomv:
 1517|      2|{
 1518|      2|  return &encoder_plugin_aom;
 1519|      2|}
encoder_aom.cc:_ZL15aom_init_pluginv:
  451|      2|{
  452|      2|  aom_init_parameters();
  453|      2|}
encoder_aom.cc:_ZL19aom_init_parametersv:
  265|      2|{
  266|      2|  heif_encoder_parameter* p = aom_encoder_params;
  267|      2|  const heif_encoder_parameter** d = aom_encoder_parameter_ptrs;
  268|      2|  int i = 0;
  269|       |
  270|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (270:3): [True: 2, False: 0]
  ------------------
  271|      2|  p->version = 2;
  272|      2|  p->name = kParam_realtime;
  273|      2|  p->type = heif_encoder_parameter_type_boolean;
  274|      2|  p->boolean.default_value = false;
  275|      2|  p->has_default = true;
  276|      2|  d[i++] = p++;
  277|       |
  278|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (278:3): [True: 2, False: 0]
  ------------------
  279|      2|  p->version = 2;
  280|      2|  p->name = kParam_speed;
  281|      2|  p->type = heif_encoder_parameter_type_integer;
  282|      2|  p->integer.default_value = 6;
  283|      2|  p->has_default = true;
  284|      2|  p->integer.have_minimum_maximum = true;
  285|      2|  p->integer.minimum = 0;
  286|      2|  if (aom_codec_version_major() >= 3) {
  ------------------
  |  Branch (286:7): [True: 2, False: 0]
  ------------------
  287|      2|    p->integer.maximum = 9;
  288|      2|  }
  289|      0|  else {
  290|      0|    p->integer.maximum = 8;
  291|      0|  }
  292|      2|  p->integer.valid_values = NULL;
  293|      2|  p->integer.num_valid_values = 0;
  294|      2|  d[i++] = p++;
  295|       |
  296|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (296:3): [True: 2, False: 0]
  ------------------
  297|      2|  p->version = 2;
  298|      2|  p->name = kParam_threads;
  299|      2|  p->type = heif_encoder_parameter_type_integer;
  300|      2|  p->has_default = true;
  301|      2|  p->integer.have_minimum_maximum = true;
  302|      2|  p->integer.minimum = 1;
  303|      2|  p->integer.maximum = 64;
  304|      2|  int threads = static_cast<int>(std::thread::hardware_concurrency());
  305|      2|  if (threads == 0) {
  ------------------
  |  Branch (305:7): [True: 0, False: 2]
  ------------------
  306|       |    // Could not autodetect, use previous default value.
  307|      0|    threads = 4;
  308|      0|  }
  309|      2|  threads = std::min(threads, p->integer.maximum);
  310|      2|  p->integer.default_value = threads;
  311|      2|  p->integer.valid_values = NULL;
  312|      2|  p->integer.num_valid_values = 0;
  313|      2|  d[i++] = p++;
  314|       |
  315|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (315:3): [True: 2, False: 0]
  ------------------
  316|      2|  p->version = 2;
  317|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  318|      2|  p->type = heif_encoder_parameter_type_integer;
  319|      2|  p->integer.default_value = 50;
  320|      2|  p->has_default = true;
  321|      2|  p->integer.have_minimum_maximum = true;
  322|      2|  p->integer.minimum = 0;
  323|      2|  p->integer.maximum = 100;
  324|      2|  p->integer.valid_values = NULL;
  325|      2|  p->integer.num_valid_values = 0;
  326|      2|  d[i++] = p++;
  327|       |
  328|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (328:3): [True: 2, False: 0]
  ------------------
  329|      2|  p->version = 2;
  330|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  331|      2|  p->type = heif_encoder_parameter_type_boolean;
  332|      2|  p->boolean.default_value = false;
  333|      2|  p->has_default = true;
  334|      2|  d[i++] = p++;
  335|       |
  336|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (336:3): [True: 2, False: 0]
  ------------------
  337|      2|  p->version = 2;
  338|      2|  p->name = kParam_chroma;
  339|      2|  p->type = heif_encoder_parameter_type_string;
  340|      2|  p->string.default_value = "420";
  341|      2|  p->has_default = true;
  342|      2|  p->string.valid_values = kParam_chroma_valid_values;
  343|      2|  d[i++] = p++;
  344|       |
  345|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (345:3): [True: 2, False: 0]
  ------------------
  346|      2|  p->version = 2;
  347|      2|  p->name = kParam_tune;
  348|      2|  p->type = heif_encoder_parameter_type_string;
  349|      2|  p->string.default_value = "auto";
  350|      2|  p->has_default = true;
  351|      2|  p->string.valid_values = kParam_tune_valid_values;
  352|      2|  d[i++] = p++;
  353|       |
  354|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (354:3): [True: 2, False: 0]
  ------------------
  355|      2|  p->version = 2;
  356|      2|  p->name = kParam_min_q;
  357|      2|  p->type = heif_encoder_parameter_type_integer;
  358|      2|  p->integer.default_value = 0;
  359|      2|  p->has_default = true;
  360|      2|  p->integer.have_minimum_maximum = true;
  361|      2|  p->integer.minimum = 0;
  362|      2|  p->integer.maximum = 63;
  363|      2|  p->integer.valid_values = NULL;
  364|      2|  p->integer.num_valid_values = 0;
  365|      2|  d[i++] = p++;
  366|       |
  367|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (367:3): [True: 2, False: 0]
  ------------------
  368|      2|  p->version = 2;
  369|      2|  p->name = kParam_max_q;
  370|      2|  p->type = heif_encoder_parameter_type_integer;
  371|      2|  p->integer.default_value = 63;
  372|      2|  p->has_default = true;
  373|      2|  p->integer.have_minimum_maximum = true;
  374|      2|  p->integer.minimum = 0;
  375|      2|  p->integer.maximum = 63;
  376|      2|  p->integer.valid_values = NULL;
  377|      2|  p->integer.num_valid_values = 0;
  378|      2|  d[i++] = p++;
  379|       |
  380|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (380:3): [True: 2, False: 0]
  ------------------
  381|      2|  p->version = 2;
  382|      2|  p->name = kParam_alpha_quality;
  383|      2|  p->type = heif_encoder_parameter_type_integer;
  384|      2|  p->has_default = false;
  385|      2|  p->integer.have_minimum_maximum = true;
  386|      2|  p->integer.minimum = 0;
  387|      2|  p->integer.maximum = 100;
  388|      2|  p->integer.valid_values = NULL;
  389|      2|  p->integer.num_valid_values = 0;
  390|      2|  d[i++] = p++;
  391|       |
  392|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (392:3): [True: 2, False: 0]
  ------------------
  393|      2|  p->version = 2;
  394|      2|  p->name = kParam_alpha_min_q;
  395|      2|  p->type = heif_encoder_parameter_type_integer;
  396|      2|  p->has_default = false;
  397|      2|  p->integer.have_minimum_maximum = true;
  398|      2|  p->integer.minimum = 0;
  399|      2|  p->integer.maximum = 63;
  400|      2|  p->integer.valid_values = NULL;
  401|      2|  p->integer.num_valid_values = 0;
  402|      2|  d[i++] = p++;
  403|       |
  404|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (404:3): [True: 2, False: 0]
  ------------------
  405|      2|  p->version = 2;
  406|      2|  p->name = kParam_alpha_max_q;
  407|      2|  p->type = heif_encoder_parameter_type_integer;
  408|      2|  p->has_default = false;
  409|      2|  p->integer.have_minimum_maximum = true;
  410|      2|  p->integer.minimum = 0;
  411|      2|  p->integer.maximum = 63;
  412|      2|  p->integer.valid_values = NULL;
  413|      2|  p->integer.num_valid_values = 0;
  414|      2|  d[i++] = p++;
  415|       |
  416|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (416:3): [True: 2, False: 0]
  ------------------
  417|      2|  p->version = 2;
  418|      2|  p->name = kParam_lossless_alpha;
  419|      2|  p->type = heif_encoder_parameter_type_boolean;
  420|      2|  p->boolean.default_value = false;
  421|      2|  p->has_default = true;
  422|      2|  d[i++] = p++;
  423|       |
  424|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (424:3): [True: 2, False: 0]
  ------------------
  425|      2|  p->version = 2;
  426|      2|  p->name = kParam_auto_tiles;
  427|      2|  p->type = heif_encoder_parameter_type_boolean;
  428|      2|  p->boolean.default_value = false;
  429|      2|  p->has_default = true;
  430|      2|  d[i++] = p++;
  431|       |
  432|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (432:3): [True: 2, False: 0]
  ------------------
  433|      2|  p->version = 2;
  434|      2|  p->name = kParam_enable_intra_block_copy;
  435|      2|  p->type = heif_encoder_parameter_type_boolean;
  436|      2|  p->boolean.default_value = true;
  437|      2|  p->has_default = true;
  438|      2|  d[i++] = p++;
  439|       |
  440|      2|  assert(i < MAX_NPARAMETERS + 1);
  ------------------
  |  Branch (440:3): [True: 2, False: 0]
  ------------------
  441|      2|  d[i++] = nullptr;
  442|      2|}

_Z23get_encoder_plugin_jpegv:
  522|      2|{
  523|      2|  return &encoder_plugin_jpeg;
  524|      2|}
encoder_jpeg.cc:_ZL16jpeg_init_pluginv:
  117|      2|{
  118|      2|  jpeg_init_parameters();
  119|      2|}
encoder_jpeg.cc:_ZL20jpeg_init_parametersv:
   79|      2|{
   80|      2|  heif_encoder_parameter* p = jpeg_encoder_params;
   81|      2|  const heif_encoder_parameter** d = jpeg_encoder_parameter_ptrs;
   82|      2|  int i = 0;
   83|       |
   84|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (84:3): [True: 2, False: 0]
  ------------------
   85|      2|  p->version = 2;
   86|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
   87|      2|  p->type = heif_encoder_parameter_type_integer;
   88|      2|  p->integer.default_value = 50;
   89|      2|  p->has_default = true;
   90|      2|  p->integer.have_minimum_maximum = true;
   91|      2|  p->integer.minimum = 0;
   92|      2|  p->integer.maximum = 100;
   93|      2|  p->integer.valid_values = NULL;
   94|      2|  p->integer.num_valid_values = 0;
   95|      2|  d[i++] = p++;
   96|       |
   97|       |  /*
   98|       |  assert(i < MAX_NPARAMETERS);
   99|       |  p->version = 2;
  100|       |  p->name = heif_encoder_parameter_name_lossless;
  101|       |  p->type = heif_encoder_parameter_type_boolean;
  102|       |  p->boolean.default_value = false;
  103|       |  p->has_default = true;
  104|       |  d[i++] = p++;
  105|       |*/
  106|       |
  107|      2|  d[i++] = nullptr;
  108|      2|}

_Z23get_encoder_plugin_maskv:
  293|      2|{
  294|      2|  return &encoder_plugin_mask;
  295|      2|}
encoder_mask.cc:_ZL16mask_init_pluginv:
   80|      2|{
   81|      2|  mask_init_parameters();
   82|      2|}
encoder_mask.cc:_ZL20mask_init_parametersv:
   56|      2|{
   57|      2|  heif_encoder_parameter* p = mask_encoder_params;
   58|      2|  const heif_encoder_parameter** d = mask_encoder_parameter_ptrs;
   59|      2|  int i = 0;
   60|       |
   61|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (61:3): [True: 2, False: 0]
  ------------------
   62|      2|  p->version = 2;
   63|      2|  p->name = kParam_interleave;
   64|      2|  p->type = heif_encoder_parameter_type_string;
   65|      2|  p->string.default_value = "planar";
   66|      2|  p->has_default = true;
   67|      2|  d[i++] = p++;
   68|       |
   69|      2|  assert(i < MAX_NPARAMETERS + 1);
  ------------------
  |  Branch (69:3): [True: 2, False: 0]
  ------------------
   70|      2|  d[i++] = nullptr;
   71|      2|}

_Z15opj_init_pluginv:
  112|      2|{
  113|      2|  opj_init_parameters();
  114|      2|}
_Z27get_encoder_plugin_openjpegv:
  680|      2|{
  681|      2|  return &encoder_plugin_openjpeg;
  682|      2|}
encoder_openjpeg.cc:_ZL19opj_init_parametersv:
   94|      2|{
   95|      2|  heif_encoder_parameter* p = opj_encoder_params;
   96|      2|  const heif_encoder_parameter** d = opj_encoder_parameter_ptrs;
   97|      2|  int i = 0;
   98|       |
   99|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (99:3): [True: 2, False: 0]
  ------------------
  100|      2|  p->version = 2;
  101|      2|  p->name = kParam_chroma;
  102|      2|  p->type = heif_encoder_parameter_type_string;
  103|       |  //p->string.default_value = "420";
  104|      2|  p->has_default = false;
  105|      2|  p->string.valid_values = kParam_chroma_valid_values;
  106|      2|  d[i++] = p++;
  107|       |
  108|      2|  d[i++] = nullptr;
  109|      2|}

_Z16ojph_init_pluginv:
  231|      2|{
  232|      2|  ojph_init_encoder_parameters();
  233|      2|}
_Z26get_encoder_plugin_openjphv:
  935|      2|{
  936|      2|  return &encoder_plugin_openjph;
  937|      2|}
encoder_openjph.cc:_ZL28ojph_init_encoder_parametersv:
  134|      2|{
  135|      2|  heif_encoder_parameter* p = ojph_encoder_params;
  136|      2|  const heif_encoder_parameter** d = ojph_encoder_parameter_ptrs;
  137|      2|  int i = 0;
  138|       |
  139|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (139:3): [True: 2, False: 0]
  ------------------
  140|      2|  p->version = 2;
  141|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  142|      2|  p->type = heif_encoder_parameter_type_boolean;
  143|      2|  p->boolean.default_value = false;
  144|      2|  p->has_default = true;
  145|      2|  d[i++] = p++;
  146|       |
  147|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (147:3): [True: 2, False: 0]
  ------------------
  148|      2|  p->version = 2;
  149|      2|  p->name = kParam_chroma;
  150|      2|  p->type = heif_encoder_parameter_type_string;
  151|      2|  p->string.default_value = "444";
  152|      2|  p->has_default = true;
  153|      2|  p->string.valid_values = kParam_chroma_valid_values;
  154|      2|  d[i++] = p++;
  155|       |
  156|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (156:3): [True: 2, False: 0]
  ------------------
  157|      2|  p->version = 2;
  158|      2|  p->name = kParam_num_decompositions;
  159|      2|  p->type = heif_encoder_parameter_type_integer;
  160|      2|  p->integer.default_value = 5;
  161|      2|  p->integer.have_minimum_maximum = true;
  162|      2|  p->integer.minimum = NUM_DECOMPOSITIONS_MIN;
  163|      2|  p->integer.maximum = NUM_DECOMPOSITIONS_MAX;
  164|      2|  p->integer.valid_values = NULL;
  165|      2|  p->integer.num_valid_values = 0;
  166|      2|  p->has_default = true;
  167|      2|  d[i++] = p++;
  168|       |
  169|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (169:3): [True: 2, False: 0]
  ------------------
  170|      2|  p->version = 2;
  171|      2|  p->name = kParam_progression_order;
  172|      2|  p->type = heif_encoder_parameter_type_string;
  173|      2|  p->string.default_value = "RPCL";
  174|      2|  p->has_default = true;
  175|      2|  p->string.valid_values = kParam_progression_order_valid_values;
  176|      2|  d[i++] = p++;
  177|       |
  178|       |#if OPENJPH_MAJOR_VERSION > 1 || OPENJPH_MINOR_VERSION > 10
  179|       |  assert(i < MAX_NPARAMETERS);
  180|       |  p->version = 2;
  181|       |  p->name = kParam_tlm_marker;
  182|       |  p->type = heif_encoder_parameter_type_boolean;
  183|       |  p->boolean.default_value = false;
  184|       |  p->has_default = true;
  185|       |  d[i++] = p++;
  186|       |#endif
  187|       |
  188|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (188:3): [True: 2, False: 0]
  ------------------
  189|      2|  p->version = 2;
  190|      2|  p->name = kParam_codestream_comment;
  191|      2|  p->type = heif_encoder_parameter_type_string;
  192|      2|  p->string.default_value = nullptr;
  193|      2|  p->has_default = false;
  194|      2|  p->string.valid_values = nullptr;
  195|      2|  d[i++] = p++;
  196|       |
  197|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (197:3): [True: 2, False: 0]
  ------------------
  198|      2|  p->version = 2;
  199|      2|  p->name = kParam_tile_size;
  200|      2|  p->type = heif_encoder_parameter_type_string;
  201|      2|  p->string.default_value = "0,0";
  202|      2|  p->has_default = true;
  203|      2|  p->string.valid_values = nullptr;
  204|      2|  d[i++] = p++;
  205|       |
  206|       |#if OPENJPH_MAJOR_VERSION > 1 || OPENJPH_MINOR_VERSION > 11
  207|       |  assert(i < MAX_NPARAMETERS);
  208|       |  p->version = 2;
  209|       |  p->name = kParam_tilepart_division;
  210|       |  p->type = heif_encoder_parameter_type_string;
  211|       |  p->string.default_value = "none";
  212|       |  p->has_default = true;
  213|       |  p->string.valid_values = kParam_tilepart_division_valid_values;
  214|       |  d[i++] = p++;
  215|       |#endif
  216|       |
  217|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (217:3): [True: 2, False: 0]
  ------------------
  218|      2|  p->version = 2;
  219|      2|  p->name = kParam_block_dimensions;
  220|      2|  p->type = heif_encoder_parameter_type_string;
  221|      2|  p->string.default_value = "64,64";
  222|      2|  p->has_default = true;
  223|      2|  p->string.valid_values = nullptr;
  224|      2|  d[i++] = p++;
  225|       |
  226|      2|  d[i++] = nullptr;
  227|      2|}

_Z22get_encoder_plugin_svtv:
 1317|      2|{
 1318|      2|  return &encoder_plugin_svt;
 1319|      2|}
encoder_svt.cc:_ZL15svt_init_pluginv:
  332|      2|{
  333|      2|  svt_init_parameters();
  334|      2|}
encoder_svt.cc:_ZL19svt_init_parametersv:
  184|      2|{
  185|      2|  heif_encoder_parameter* p = svt_encoder_params;
  186|      2|  const heif_encoder_parameter** d = svt_encoder_parameter_ptrs;
  187|      2|  int i = 0;
  188|       |
  189|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (189:3): [True: 2, False: 0]
  ------------------
  190|      2|  p->version = 2;
  191|      2|  p->name = kParam_speed;
  192|      2|  p->type = heif_encoder_parameter_type_integer;
  193|      2|  p->integer.default_value = 12;
  194|      2|  p->has_default = true;
  195|      2|  p->integer.have_minimum_maximum = true;
  196|      2|  p->integer.minimum = 0;
  197|      2|  p->integer.maximum = 13;
  198|      2|  p->integer.valid_values = nullptr;
  199|      2|  p->integer.num_valid_values = 0;
  200|      2|  d[i++] = p++;
  201|       |
  202|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (202:3): [True: 2, False: 0]
  ------------------
  203|      2|  p->version = 2;
  204|      2|  p->name = kParam_threads;
  205|      2|  p->type = heif_encoder_parameter_type_integer;
  206|      2|  p->integer.default_value = 4;
  207|      2|  p->has_default = true;
  208|      2|  p->integer.have_minimum_maximum = true;
  209|      2|  p->integer.minimum = 1;
  210|      2|  p->integer.maximum = 16;
  211|      2|  p->integer.valid_values = nullptr;
  212|      2|  p->integer.num_valid_values = 0;
  213|      2|  d[i++] = p++;
  214|       |
  215|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (215:3): [True: 2, False: 0]
  ------------------
  216|      2|  p->version = 2;
  217|      2|  p->name = "tile-rows";
  218|      2|  p->type = heif_encoder_parameter_type_integer;
  219|      2|  p->integer.default_value = 4;
  220|      2|  p->has_default = true;
  221|      2|  p->integer.have_minimum_maximum = false;
  222|      2|  p->integer.valid_values = valid_tile_num_values;
  223|      2|  p->integer.num_valid_values = 7;
  224|      2|  d[i++] = p++;
  225|       |
  226|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (226:3): [True: 2, False: 0]
  ------------------
  227|      2|  p->version = 2;
  228|      2|  p->name = "tile-cols";
  229|      2|  p->type = heif_encoder_parameter_type_integer;
  230|      2|  p->integer.default_value = 4;
  231|      2|  p->has_default = true;
  232|      2|  p->integer.have_minimum_maximum = false;
  233|      2|  p->integer.valid_values = valid_tile_num_values;
  234|      2|  p->integer.num_valid_values = 7;
  235|      2|  d[i++] = p++;
  236|       |
  237|       |
  238|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (238:3): [True: 2, False: 0]
  ------------------
  239|      2|  p->version = 2;
  240|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  241|      2|  p->type = heif_encoder_parameter_type_integer;
  242|      2|  p->integer.default_value = 50;
  243|      2|  p->has_default = true;
  244|      2|  p->integer.have_minimum_maximum = true;
  245|      2|  p->integer.minimum = 0;
  246|      2|  p->integer.maximum = 100;
  247|      2|  p->integer.valid_values = NULL;
  248|      2|  p->integer.num_valid_values = 0;
  249|      2|  d[i++] = p++;
  250|       |
  251|      2|#if SVT_AV1_CHECK_VERSION(3, 0, 0)
  252|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (252:3): [True: 2, False: 0]
  ------------------
  253|      2|  p->version = 2;
  254|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  255|      2|  p->type = heif_encoder_parameter_type_boolean;
  256|      2|  p->boolean.default_value = false;
  257|      2|  p->has_default = true;
  258|      2|  d[i++] = p++;
  259|      2|#endif
  260|       |
  261|       |#if 0
  262|       |  assert(i < MAX_NPARAMETERS);
  263|       |  p->version = 2;
  264|       |  p->name = kParam_chroma;
  265|       |  p->type = heif_encoder_parameter_type_string;
  266|       |  p->string.default_value = "420";
  267|       |  p->has_default = true;
  268|       |  p->string.valid_values = kParam_chroma_valid_values;
  269|       |  d[i++] = p++;
  270|       |#endif
  271|       |
  272|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (272:3): [True: 2, False: 0]
  ------------------
  273|      2|  p->version = 2;
  274|      2|  p->name = kParam_qp;
  275|      2|  p->type = heif_encoder_parameter_type_integer;
  276|      2|  p->integer.default_value = 50;
  277|      2|  p->has_default = false;
  278|      2|  p->integer.have_minimum_maximum = true;
  279|      2|  p->integer.minimum = 0;
  280|      2|  p->integer.maximum = 63;
  281|      2|  p->integer.valid_values = nullptr;
  282|      2|  p->integer.num_valid_values = 0;
  283|      2|  d[i++] = p++;
  284|       |
  285|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (285:3): [True: 2, False: 0]
  ------------------
  286|      2|  p->version = 2;
  287|      2|  p->name = kParam_min_q;
  288|      2|  p->type = heif_encoder_parameter_type_integer;
  289|      2|  p->integer.default_value = 0;
  290|      2|  p->has_default = true;
  291|      2|  p->integer.have_minimum_maximum = true;
  292|      2|  p->integer.minimum = 0;
  293|      2|  p->integer.maximum = 63;
  294|      2|  p->integer.valid_values = nullptr;
  295|      2|  p->integer.num_valid_values = 0;
  296|      2|  d[i++] = p++;
  297|       |
  298|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (298:3): [True: 2, False: 0]
  ------------------
  299|      2|  p->version = 2;
  300|      2|  p->name = kParam_max_q;
  301|      2|  p->type = heif_encoder_parameter_type_integer;
  302|      2|  p->integer.default_value = 63;
  303|      2|  p->has_default = true;
  304|      2|  p->integer.have_minimum_maximum = true;
  305|      2|  p->integer.minimum = 0;
  306|      2|  p->integer.maximum = 63;
  307|      2|  p->integer.valid_values = nullptr;
  308|      2|  p->integer.num_valid_values = 0;
  309|      2|  d[i++] = p++;
  310|       |
  311|      2|#if SVT_AV1_CHECK_VERSION(0, 9, 1)
  312|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (312:3): [True: 2, False: 0]
  ------------------
  313|      2|  p->version = 2;
  314|      2|  p->name = kParam_tune;
  315|      2|  p->type = heif_encoder_parameter_type_string;
  316|      2|  p->string.default_value = "psnr";
  317|      2|  p->has_default = true;
  318|      2|  p->string.valid_values = kParam_tune_valid_values;
  319|      2|  d[i++] = p++;
  320|      2|#endif
  321|       |
  322|      2|  d[i++] = nullptr;
  323|      2|}

_Z31get_encoder_plugin_uncompressedv:
  359|      2|{
  360|      2|  return &encoder_plugin_uncompressed;
  361|      2|}
encoder_uncompressed.cc:_ZL24uncompressed_init_pluginv:
   80|      2|{
   81|      2|  uncompressed_init_parameters();
   82|      2|}
encoder_uncompressed.cc:_ZL28uncompressed_init_parametersv:
   56|      2|{
   57|      2|  heif_encoder_parameter* p = uncompressed_encoder_params;
   58|      2|  const heif_encoder_parameter** d = uncompressed_encoder_parameter_ptrs;
   59|      2|  int i = 0;
   60|       |
   61|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (61:3): [True: 2, False: 0]
  ------------------
   62|      2|  p->version = 2;
   63|      2|  p->name = kParam_interleave;
   64|      2|  p->type = heif_encoder_parameter_type_string;
   65|      2|  p->string.default_value = "planar";
   66|      2|  p->has_default = true;
   67|      2|  d[i++] = p++;
   68|       |
   69|      2|  assert(i < MAX_NPARAMETERS + 1);
  ------------------
  |  Branch (69:3): [True: 2, False: 0]
  ------------------
   70|      2|  d[i++] = nullptr;
   71|      2|}

_Z24get_encoder_plugin_vvencv:
  882|      2|{
  883|      2|  return &encoder_plugin_vvenc;
  884|      2|}
encoder_vvenc.cc:_ZL17vvenc_init_pluginv:
  138|      2|{
  139|      2|  vvenc_init_parameters();
  140|      2|}
encoder_vvenc.cc:_ZL21vvenc_init_parametersv:
  101|      2|{
  102|      2|  heif_encoder_parameter* p = vvenc_encoder_params;
  103|      2|  const heif_encoder_parameter** d = vvenc_encoder_parameter_ptrs;
  104|      2|  int i = 0;
  105|       |
  106|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (106:3): [True: 2, False: 0]
  ------------------
  107|      2|  p->version = 2;
  108|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  109|      2|  p->type = heif_encoder_parameter_type_integer;
  110|      2|  p->integer.default_value = 50;
  111|      2|  p->has_default = true;
  112|      2|  p->integer.have_minimum_maximum = true;
  113|      2|  p->integer.minimum = 0;
  114|      2|  p->integer.maximum = 100;
  115|      2|  p->integer.valid_values = NULL;
  116|      2|  p->integer.num_valid_values = 0;
  117|      2|  d[i++] = p++;
  118|       |
  119|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (119:3): [True: 2, False: 0]
  ------------------
  120|      2|  p->version = 2;
  121|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  122|      2|  p->type = heif_encoder_parameter_type_boolean;
  123|      2|  p->boolean.default_value = false;
  124|      2|  p->has_default = true;
  125|      2|  d[i++] = p++;
  126|       |
  127|      2|  d[i++] = nullptr;
  128|      2|}

_Z23get_encoder_plugin_x264v:
 1227|      2|{
 1228|      2|  return &encoder_plugin_x264;
 1229|      2|}
encoder_x264.cc:_ZL16x264_init_pluginv:
  368|      2|{
  369|      2|  x264_init_parameters();
  370|      2|}
encoder_x264.cc:_ZL20x264_init_parametersv:
  278|      2|{
  279|      2|  heif_encoder_parameter* p = x264_encoder_params;
  280|      2|  const heif_encoder_parameter** d = x264_encoder_parameter_ptrs;
  281|      2|  int i = 0;
  282|       |
  283|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (283:3): [True: 2, False: 0]
  ------------------
  284|      2|  p->version = 2;
  285|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  286|      2|  p->type = heif_encoder_parameter_type_integer;
  287|      2|  p->integer.default_value = 50;
  288|      2|  p->has_default = true;
  289|      2|  p->integer.have_minimum_maximum = true;
  290|      2|  p->integer.minimum = 0;
  291|      2|  p->integer.maximum = 100;
  292|      2|  p->integer.valid_values = NULL;
  293|      2|  p->integer.num_valid_values = 0;
  294|      2|  d[i++] = p++;
  295|       |
  296|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (296:3): [True: 2, False: 0]
  ------------------
  297|      2|  p->version = 2;
  298|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  299|      2|  p->type = heif_encoder_parameter_type_boolean;
  300|      2|  p->boolean.default_value = false;
  301|      2|  p->has_default = true;
  302|      2|  d[i++] = p++;
  303|       |
  304|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (304:3): [True: 2, False: 0]
  ------------------
  305|      2|  p->version = 2;
  306|      2|  p->name = kParam_preset;
  307|      2|  p->type = heif_encoder_parameter_type_string;
  308|      2|  p->string.default_value = "slow";  // increases computation time
  309|      2|  p->has_default = true;
  310|      2|  p->string.valid_values = kParam_preset_valid_values;
  311|      2|  d[i++] = p++;
  312|       |
  313|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (313:3): [True: 2, False: 0]
  ------------------
  314|      2|  p->version = 2;
  315|      2|  p->name = kParam_tune;
  316|      2|  p->type = heif_encoder_parameter_type_string;
  317|      2|  p->string.default_value = "ssim";
  318|      2|  p->has_default = true;
  319|      2|  p->string.valid_values = kParam_tune_valid_values;
  320|      2|  d[i++] = p++;
  321|       |
  322|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (322:3): [True: 2, False: 0]
  ------------------
  323|      2|  p->version = 2;
  324|      2|  p->name = kParam_TU_intra_depth;
  325|      2|  p->type = heif_encoder_parameter_type_integer;
  326|      2|  p->integer.default_value = 2;  // increases computation time
  327|      2|  p->has_default = true;
  328|      2|  p->integer.have_minimum_maximum = true;
  329|      2|  p->integer.minimum = 1;
  330|      2|  p->integer.maximum = 4;
  331|      2|  p->integer.valid_values = NULL;
  332|      2|  p->integer.num_valid_values = 0;
  333|      2|  d[i++] = p++;
  334|       |
  335|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (335:3): [True: 2, False: 0]
  ------------------
  336|      2|  p->version = 2;
  337|      2|  p->name = kParam_complexity;
  338|      2|  p->type = heif_encoder_parameter_type_integer;
  339|      2|  p->integer.default_value = 50;
  340|      2|  p->has_default = false;
  341|      2|  p->integer.have_minimum_maximum = true;
  342|      2|  p->integer.minimum = 0;
  343|      2|  p->integer.maximum = 100;
  344|      2|  p->integer.valid_values = NULL;
  345|      2|  p->integer.num_valid_values = 0;
  346|      2|  d[i++] = p++;
  347|       |
  348|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (348:3): [True: 2, False: 0]
  ------------------
  349|      2|  p->version = 2;
  350|      2|  p->name = kParam_chroma;
  351|      2|  p->type = heif_encoder_parameter_type_string;
  352|      2|  p->string.default_value = "420";
  353|      2|  p->has_default = true;
  354|      2|  p->string.valid_values = kParam_chroma_valid_values;
  355|      2|  d[i++] = p++;
  356|       |
  357|      2|  d[i++] = nullptr;
  358|      2|}

_Z23get_encoder_plugin_x265v:
 1308|      2|{
 1309|      2|  return &encoder_plugin_x265;
 1310|      2|}
encoder_x265.cc:_ZL16x265_init_pluginv:
  310|      2|{
  311|      2|  x265_init_parameters();
  312|      2|}
encoder_x265.cc:_ZL20x265_init_parametersv:
  220|      2|{
  221|      2|  heif_encoder_parameter* p = x265_encoder_params;
  222|      2|  const heif_encoder_parameter** d = x265_encoder_parameter_ptrs;
  223|      2|  int i = 0;
  224|       |
  225|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (225:3): [True: 2, False: 0]
  ------------------
  226|      2|  p->version = 2;
  227|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  228|      2|  p->type = heif_encoder_parameter_type_integer;
  229|      2|  p->integer.default_value = 50;
  230|      2|  p->has_default = true;
  231|      2|  p->integer.have_minimum_maximum = true;
  232|      2|  p->integer.minimum = 0;
  233|      2|  p->integer.maximum = 100;
  234|      2|  p->integer.valid_values = NULL;
  235|      2|  p->integer.num_valid_values = 0;
  236|      2|  d[i++] = p++;
  237|       |
  238|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (238:3): [True: 2, False: 0]
  ------------------
  239|      2|  p->version = 2;
  240|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  241|      2|  p->type = heif_encoder_parameter_type_boolean;
  242|      2|  p->boolean.default_value = false;
  243|      2|  p->has_default = true;
  244|      2|  d[i++] = p++;
  245|       |
  246|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (246:3): [True: 2, False: 0]
  ------------------
  247|      2|  p->version = 2;
  248|      2|  p->name = kParam_preset;
  249|      2|  p->type = heif_encoder_parameter_type_string;
  250|      2|  p->string.default_value = "slow";  // increases computation time
  251|      2|  p->has_default = true;
  252|      2|  p->string.valid_values = kParam_preset_valid_values;
  253|      2|  d[i++] = p++;
  254|       |
  255|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (255:3): [True: 2, False: 0]
  ------------------
  256|      2|  p->version = 2;
  257|      2|  p->name = kParam_tune;
  258|      2|  p->type = heif_encoder_parameter_type_string;
  259|      2|  p->string.default_value = "ssim";
  260|      2|  p->has_default = true;
  261|      2|  p->string.valid_values = kParam_tune_valid_values;
  262|      2|  d[i++] = p++;
  263|       |
  264|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (264:3): [True: 2, False: 0]
  ------------------
  265|      2|  p->version = 2;
  266|      2|  p->name = kParam_TU_intra_depth;
  267|      2|  p->type = heif_encoder_parameter_type_integer;
  268|      2|  p->integer.default_value = 2;  // increases computation time
  269|      2|  p->has_default = true;
  270|      2|  p->integer.have_minimum_maximum = true;
  271|      2|  p->integer.minimum = 1;
  272|      2|  p->integer.maximum = 4;
  273|      2|  p->integer.valid_values = NULL;
  274|      2|  p->integer.num_valid_values = 0;
  275|      2|  d[i++] = p++;
  276|       |
  277|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (277:3): [True: 2, False: 0]
  ------------------
  278|      2|  p->version = 2;
  279|      2|  p->name = kParam_complexity;
  280|      2|  p->type = heif_encoder_parameter_type_integer;
  281|      2|  p->integer.default_value = 50;
  282|      2|  p->has_default = false;
  283|      2|  p->integer.have_minimum_maximum = true;
  284|      2|  p->integer.minimum = 0;
  285|      2|  p->integer.maximum = 100;
  286|      2|  p->integer.valid_values = NULL;
  287|      2|  p->integer.num_valid_values = 0;
  288|      2|  d[i++] = p++;
  289|       |
  290|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (290:3): [True: 2, False: 0]
  ------------------
  291|      2|  p->version = 2;
  292|      2|  p->name = kParam_chroma;
  293|      2|  p->type = heif_encoder_parameter_type_string;
  294|      2|  p->string.default_value = "420";
  295|      2|  p->has_default = true;
  296|      2|  p->string.valid_values = kParam_chroma_valid_values;
  297|      2|  d[i++] = p++;
  298|       |
  299|      2|  d[i++] = nullptr;
  300|      2|}

_Z22get_memory_usage_mutexv:
  162|  79.2k|{
  163|  79.2k|  static std::mutex sMutex;
  164|  79.2k|  return sMutex;
  165|  79.2k|}
_ZN18TotalMemoryTrackerC2EPK20heif_security_limits:
  170|  16.4k|{
  171|  16.4k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  172|       |
  173|  16.4k|  sMemoryUsage[limits] = {};
  174|  16.4k|  m_limits_context = limits;
  175|  16.4k|}
_ZN18TotalMemoryTrackerD2Ev:
  178|  16.4k|{
  179|  16.4k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  180|  16.4k|  sMemoryUsage.erase(m_limits_context);
  181|  16.4k|}
_ZN12MemoryHandle5allocEmmPK20heif_security_limitsPKc:
  202|  7.52k|{
  203|  7.52k|  if (element_size != 0 && count > SIZE_MAX / element_size) {
  ------------------
  |  Branch (203:7): [True: 7.52k, False: 0]
  |  Branch (203:28): [True: 0, False: 7.52k]
  ------------------
  204|      0|    std::stringstream sstr;
  205|      0|    if (reason_description) {
  ------------------
  |  Branch (205:9): [True: 0, False: 0]
  ------------------
  206|      0|      sstr << "Allocation size overflow computing " << count << " * " << element_size
  207|      0|           << " for " << reason_description;
  208|      0|    }
  209|      0|    else {
  210|      0|      sstr << "Allocation size overflow computing " << count << " * " << element_size;
  211|      0|    }
  212|      0|    return {heif_error_Memory_allocation_error,
  213|      0|            heif_suberror_Security_limit_exceeded,
  214|      0|            sstr.str()};
  215|      0|  }
  216|  7.52k|  return alloc(count * element_size, limits_context, reason_description);
  217|  7.52k|}
_ZN12MemoryHandle5allocEmPK20heif_security_limitsPKc:
  222|  23.2k|{
  223|       |  // --- check whether limits are exceeded
  224|       |
  225|  23.2k|  if (!limits_context) {
  ------------------
  |  Branch (225:7): [True: 0, False: 23.2k]
  ------------------
  226|      0|    return Error::Ok;
  227|      0|  }
  228|       |
  229|       |  // check against maximum memory block size
  230|       |
  231|  23.2k|  if (limits_context->max_memory_block_size != 0 &&
  ------------------
  |  Branch (231:7): [True: 23.2k, False: 0]
  ------------------
  232|  23.2k|      memory_amount > limits_context->max_memory_block_size) {
  ------------------
  |  Branch (232:7): [True: 44, False: 23.2k]
  ------------------
  233|     44|    std::stringstream sstr;
  234|       |
  235|     44|    if (reason_description) {
  ------------------
  |  Branch (235:9): [True: 44, False: 0]
  ------------------
  236|     44|      sstr << "Allocating " << memory_amount << " bytes for " << reason_description <<" exceeds the security limit of "
  237|     44|           << limits_context->max_memory_block_size << " bytes";
  238|     44|    }
  239|      0|    else {
  240|      0|      sstr << "Allocating " << memory_amount << " bytes exceeds the security limit of "
  241|      0|           << limits_context->max_memory_block_size << " bytes";
  242|      0|    }
  243|       |
  244|     44|    return {heif_error_Memory_allocation_error,
  245|     44|            heif_suberror_Security_limit_exceeded,
  246|     44|            sstr.str()};
  247|     44|  }
  248|       |
  249|       |  // Resolve to the registered (root) context for total-memory accounting.
  250|       |  // The passed-in limits may be a stack-local derived copy (e.g. tightened for
  251|       |  // ispe) whose `parent` points back to the registered context.
  252|  23.2k|  const heif_security_limits* root_limits = limits_context;
  253|  23.2k|  while (root_limits->version >= 4 && root_limits->parent) {
  ------------------
  |  Branch (253:10): [True: 23.2k, False: 0]
  |  Branch (253:39): [True: 0, False: 23.2k]
  ------------------
  254|      0|    root_limits = root_limits->parent;
  255|      0|  }
  256|       |
  257|       |  // we allow several allocations on the same handle, but they have to be for the same registered context
  258|  23.2k|  if (m_limits_context) {
  ------------------
  |  Branch (258:7): [True: 0, False: 23.2k]
  ------------------
  259|      0|    assert(m_limits_context == root_limits);
  ------------------
  |  Branch (259:5): [True: 0, False: 0]
  ------------------
  260|      0|  }
  261|       |
  262|  23.2k|  if (root_limits == &global_security_limits ||
  ------------------
  |  Branch (262:7): [True: 0, False: 23.2k]
  ------------------
  263|  23.2k|      root_limits == &disabled_security_limits) {
  ------------------
  |  Branch (263:7): [True: 0, False: 23.2k]
  ------------------
  264|      0|    return Error::Ok;
  265|      0|  }
  266|       |
  267|  23.2k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  268|  23.2k|  auto it = sMemoryUsage.find(root_limits);
  269|  23.2k|  if (it == sMemoryUsage.end()) {
  ------------------
  |  Branch (269:7): [True: 0, False: 23.2k]
  ------------------
  270|       |    // Unregistered limits context with no resolvable parent — total-memory
  271|       |    // tracking is not available, but the per-block check above still applies.
  272|      0|    return Error::Ok;
  273|      0|  }
  274|       |
  275|       |  // check against maximum total memory usage
  276|       |
  277|  23.2k|  if (limits_context->max_total_memory != 0 &&
  ------------------
  |  Branch (277:7): [True: 23.2k, False: 0]
  ------------------
  278|  23.2k|      it->second.total_memory_usage + memory_amount > limits_context->max_total_memory) {
  ------------------
  |  Branch (278:7): [True: 26, False: 23.1k]
  ------------------
  279|     26|    std::stringstream sstr;
  280|       |
  281|     26|    if (reason_description) {
  ------------------
  |  Branch (281:9): [True: 26, False: 0]
  ------------------
  282|     26|      sstr << "Memory usage of " << it->second.total_memory_usage + memory_amount
  283|     26|           << " bytes for " << reason_description << " exceeds the security limit of "
  284|     26|           << limits_context->max_total_memory << " bytes of total memory usage";
  285|     26|    }
  286|      0|    else {
  287|      0|      sstr << "Memory usage of " << it->second.total_memory_usage + memory_amount
  288|      0|           << " bytes exceeds the security limit of "
  289|      0|           << limits_context->max_total_memory << " bytes of total memory usage";
  290|      0|    }
  291|       |
  292|     26|    return {heif_error_Memory_allocation_error,
  293|     26|            heif_suberror_Security_limit_exceeded,
  294|     26|            sstr.str()};
  295|     26|  }
  296|       |
  297|       |
  298|       |  // --- register memory usage
  299|       |
  300|  23.1k|  m_limits_context = root_limits;
  301|  23.1k|  m_memory_amount += memory_amount;
  302|       |
  303|  23.1k|  it->second.total_memory_usage += memory_amount;
  304|       |
  305|       |  // remember maximum memory usage (for informational purpose)
  306|  23.1k|  if (it->second.total_memory_usage > it->second.max_memory_usage) {
  ------------------
  |  Branch (306:7): [True: 3.28k, False: 19.9k]
  ------------------
  307|  3.28k|    it->second.max_memory_usage = it->second.total_memory_usage;
  308|  3.28k|  }
  309|       |
  310|  23.1k|  return Error::Ok;
  311|  23.2k|}
_ZN12MemoryHandle4freeEv:
  315|  24.9k|{
  316|  24.9k|  if (m_limits_context) {
  ------------------
  |  Branch (316:7): [True: 23.1k, False: 1.70k]
  ------------------
  317|  23.1k|    std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  318|       |
  319|  23.1k|    auto it = sMemoryUsage.find(m_limits_context);
  320|  23.1k|    if (it != sMemoryUsage.end()) {
  ------------------
  |  Branch (320:9): [True: 23.1k, False: 0]
  ------------------
  321|  23.1k|      it->second.total_memory_usage -= m_memory_amount;
  322|  23.1k|    }
  323|       |
  324|  23.1k|    m_limits_context = nullptr;
  325|  23.1k|    m_memory_amount = 0;
  326|  23.1k|  }
  327|  24.9k|}

_ZN12MemoryHandleD2Ev:
  147|  24.9k|  ~MemoryHandle() { free(); }
_ZN12MemoryHandleC2Ev:
  146|  24.9k|  MemoryHandle() = default;

_ZN13Box_container5parseER14BitstreamRangePK20heif_security_limits:
   30|  2.66k|{
   31|  2.66k|  return read_children(range, READ_CHILDREN_ALL, limits);
   32|  2.66k|}
_ZNK13Box_container4dumpER6Indent:
   36|  2.30k|{
   37|  2.30k|  std::ostringstream sstr;
   38|  2.30k|  sstr << Box::dump(indent);
   39|  2.30k|  sstr << dump_children(indent);
   40|       |
   41|  2.30k|  return sstr.str();
   42|  2.30k|}
_ZNK8Box_mvhd18get_matrix_elementEi:
   46|  13.2k|{
   47|  13.2k|  if (idx == 8) {
  ------------------
  |  Branch (47:7): [True: 1.47k, False: 11.7k]
  ------------------
   48|  1.47k|    return 1.0;
   49|  1.47k|  }
   50|       |
   51|  11.7k|  return m_matrix[idx] / double(0x10000);
   52|  13.2k|}
_ZN8Box_mvhd5parseER14BitstreamRangePK20heif_security_limits:
   56|  1.70k|{
   57|  1.70k|  parse_full_box_header(range);
   58|       |
   59|  1.70k|  if (get_version() > 1) {
  ------------------
  |  Branch (59:7): [True: 1, False: 1.70k]
  ------------------
   60|      1|    return unsupported_version_error("mvhd");
   61|      1|  }
   62|       |
   63|  1.70k|  if (get_version() == 1) {
  ------------------
  |  Branch (63:7): [True: 110, False: 1.59k]
  ------------------
   64|    110|    m_creation_time = range.read64();
   65|    110|    m_modification_time = range.read64();
   66|    110|    m_timescale = range.read32();
   67|    110|    m_duration = range.read64();
   68|    110|  }
   69|  1.59k|  else {
   70|       |    // version==0
   71|  1.59k|    m_creation_time = range.read32();
   72|  1.59k|    m_modification_time = range.read32();
   73|  1.59k|    m_timescale = range.read32();
   74|  1.59k|    m_duration = range.read32();
   75|  1.59k|  }
   76|       |
   77|  1.70k|  m_rate = range.read32();
   78|  1.70k|  m_volume = range.read16();
   79|  1.70k|  range.skip(2);
   80|  1.70k|  range.skip(8);
   81|  15.3k|  for (uint32_t& m : m_matrix) {
  ------------------
  |  Branch (81:20): [True: 15.3k, False: 1.70k]
  ------------------
   82|  15.3k|    m = range.read32();
   83|  15.3k|  }
   84|  11.9k|  for (int i = 0; i < 6; i++) {
  ------------------
  |  Branch (84:19): [True: 10.2k, False: 1.70k]
  ------------------
   85|  10.2k|    range.skip(4);
   86|  10.2k|  }
   87|       |
   88|  1.70k|  m_next_track_ID = range.read32();
   89|       |
   90|  1.70k|  return range.get_error();
   91|  1.70k|}
_ZNK8Box_mvhd4dumpER6Indent:
   95|  1.47k|{
   96|  1.47k|  std::ostringstream sstr;
   97|  1.47k|  sstr << FullBox::dump(indent);
   98|  1.47k|  sstr << indent << "creation time:     " << m_creation_time << "\n"
   99|  1.47k|      << indent << "modification time: " << m_modification_time << "\n"
  100|  1.47k|      << indent << "timescale: " << m_timescale << "\n"
  101|  1.47k|      << indent << "duration: " << m_duration << "\n";
  102|  1.47k|  sstr << indent << "rate: " << get_rate() << "\n"
  103|  1.47k|      << indent << "volume: " << get_volume() << "\n"
  104|  1.47k|      << indent << "matrix:\n";
  105|  5.89k|  for (int y = 0; y < 3; y++) {
  ------------------
  |  Branch (105:19): [True: 4.41k, False: 1.47k]
  ------------------
  106|  4.41k|    sstr << indent << "  ";
  107|  17.6k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (107:21): [True: 13.2k, False: 4.41k]
  ------------------
  108|  13.2k|      sstr << get_matrix_element(i + 3 * y) << " ";
  109|  13.2k|    }
  110|  4.41k|    sstr << "\n";
  111|  4.41k|  }
  112|  1.47k|  sstr << indent << "next_track_ID: " << m_next_track_ID << "\n";
  113|       |
  114|  1.47k|  return sstr.str();
  115|  1.47k|}
_ZNK8Box_tkhd18get_matrix_elementEi:
  170|  11.4k|{
  171|  11.4k|  if (idx == 8) {
  ------------------
  |  Branch (171:7): [True: 1.26k, False: 10.1k]
  ------------------
  172|  1.26k|    return 1.0;
  173|  1.26k|  }
  174|       |
  175|  10.1k|  return m_matrix[idx] / double(0x10000);
  176|  11.4k|}
_ZN8Box_tkhd5parseER14BitstreamRangePK20heif_security_limits:
  180|  1.32k|{
  181|  1.32k|  parse_full_box_header(range);
  182|       |
  183|  1.32k|  if (get_version() > 1) {
  ------------------
  |  Branch (183:7): [True: 2, False: 1.32k]
  ------------------
  184|      2|    return unsupported_version_error("tkhd");
  185|      2|  }
  186|       |
  187|  1.32k|  if (get_version() == 1) {
  ------------------
  |  Branch (187:7): [True: 52, False: 1.27k]
  ------------------
  188|     52|    m_creation_time = range.read64();
  189|     52|    m_modification_time = range.read64();
  190|     52|    m_track_id = range.read32();
  191|     52|    range.skip(4);
  192|     52|    m_duration = range.read64();
  193|     52|  }
  194|  1.27k|  else {
  195|       |    // version==0
  196|  1.27k|    m_creation_time = range.read32();
  197|  1.27k|    m_modification_time = range.read32();
  198|  1.27k|    m_track_id = range.read32();
  199|  1.27k|    range.skip(4);
  200|  1.27k|    m_duration = range.read32();
  201|  1.27k|  }
  202|       |
  203|  1.32k|  range.skip(8);
  204|  1.32k|  m_layer = range.read16();
  205|  1.32k|  m_alternate_group = range.read16();
  206|  1.32k|  m_volume = range.read16();
  207|  1.32k|  range.skip(2);
  208|  11.9k|  for (uint32_t& m : m_matrix) {
  ------------------
  |  Branch (208:20): [True: 11.9k, False: 1.32k]
  ------------------
  209|  11.9k|    m = range.read32();
  210|  11.9k|  }
  211|       |
  212|  1.32k|  m_width = range.read32();
  213|  1.32k|  m_height = range.read32();
  214|       |
  215|  1.32k|  return range.get_error();
  216|  1.32k|}
_ZNK8Box_tkhd4dumpER6Indent:
  220|  1.26k|{
  221|  1.26k|  std::ostringstream sstr;
  222|  1.26k|  sstr << FullBox::dump(indent);
  223|  1.26k|  sstr << indent << "track enabled: " << ((get_flags() & Track_enabled) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (223:43): [True: 294, False: 974]
  ------------------
  224|  1.26k|       << indent << "track in movie: " << ((get_flags() & Track_in_movie) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (224:44): [True: 313, False: 955]
  ------------------
  225|  1.26k|       << indent << "track in preview: " << ((get_flags() & Track_in_preview) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (225:46): [True: 314, False: 954]
  ------------------
  226|  1.26k|       << indent << "track size is aspect ratio: " << ((get_flags() & Track_size_is_aspect_ratio) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (226:56): [True: 287, False: 981]
  ------------------
  227|  1.26k|  sstr << indent << "creation time:     " << m_creation_time << "\n"
  228|  1.26k|      << indent << "modification time: " << m_modification_time << "\n"
  229|  1.26k|      << indent << "track ID: " << m_track_id << "\n"
  230|  1.26k|      << indent << "duration: " << m_duration << "\n";
  231|  1.26k|  sstr << indent << "layer: " << m_layer << "\n"
  232|  1.26k|      << indent << "alternate_group: " << m_alternate_group << "\n"
  233|  1.26k|      << indent << "volume: " << get_volume() << "\n"
  234|  1.26k|      << indent << "matrix:\n";
  235|  5.07k|  for (int y = 0; y < 3; y++) {
  ------------------
  |  Branch (235:19): [True: 3.80k, False: 1.26k]
  ------------------
  236|  3.80k|    sstr << indent << "  ";
  237|  15.2k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (237:21): [True: 11.4k, False: 3.80k]
  ------------------
  238|  11.4k|      sstr << get_matrix_element(i + 3 * y) << " ";
  239|  11.4k|    }
  240|  3.80k|    sstr << "\n";
  241|  3.80k|  }
  242|       |
  243|  1.26k|  sstr << indent << "width: " << get_width() << "\n"
  244|  1.26k|      << indent << "height: " << get_height() << "\n";
  245|       |
  246|  1.26k|  return sstr.str();
  247|  1.26k|}
_ZN8Box_mdhd5parseER14BitstreamRangePK20heif_security_limits:
  302|    659|{
  303|    659|  parse_full_box_header(range);
  304|       |
  305|    659|  if (get_version() > 1) {
  ------------------
  |  Branch (305:7): [True: 4, False: 655]
  ------------------
  306|      4|    return unsupported_version_error("mdhd");
  307|      4|  }
  308|       |
  309|    655|  if (get_version() == 1) {
  ------------------
  |  Branch (309:7): [True: 83, False: 572]
  ------------------
  310|     83|    m_creation_time = range.read64();
  311|     83|    m_modification_time = range.read64();
  312|     83|    m_timescale = range.read32();
  313|     83|    m_duration = range.read64();
  314|     83|  }
  315|    572|  else {
  316|       |    // version==0
  317|    572|    m_creation_time = range.read32();
  318|    572|    m_modification_time = range.read32();
  319|    572|    m_timescale = range.read32();
  320|    572|    m_duration = range.read32();
  321|    572|  }
  322|       |
  323|    655|  uint16_t language_packed = range.read16();
  324|    655|  m_language[0] = ((language_packed >> 10) & 0x1F) + 0x60;
  325|    655|  m_language[1] = ((language_packed >> 5) & 0x1F) + 0x60;
  326|    655|  m_language[2] = ((language_packed >> 0) & 0x1F) + 0x60;
  327|    655|  m_language[3] = 0;
  328|       |
  329|    655|  range.skip(2);
  330|       |
  331|    655|  return range.get_error();
  332|    659|}
_ZNK8Box_mdhd4dumpER6Indent:
  336|    622|{
  337|    622|  std::ostringstream sstr;
  338|    622|  sstr << FullBox::dump(indent);
  339|    622|  sstr << indent << "creation time:     " << m_creation_time << "\n"
  340|    622|      << indent << "modification time: " << m_modification_time << "\n"
  341|    622|      << indent << "timescale: " << m_timescale << "\n"
  342|    622|      << indent << "duration: " << m_duration << "\n";
  343|    622|  sstr << indent << "language: " << m_language << "\n";
  344|       |
  345|    622|  return sstr.str();
  346|    622|}
_ZN8Box_vmhd5parseER14BitstreamRangePK20heif_security_limits:
  394|    563|{
  395|    563|  parse_full_box_header(range);
  396|       |
  397|    563|  if (get_version() > 0) {
  ------------------
  |  Branch (397:7): [True: 3, False: 560]
  ------------------
  398|      3|    return unsupported_version_error("vmhd");
  399|      3|  }
  400|       |
  401|    560|  m_graphics_mode = range.read16();
  402|  1.68k|  for (uint16_t& c : m_op_color) {
  ------------------
  |  Branch (402:20): [True: 1.68k, False: 560]
  ------------------
  403|  1.68k|    c = range.read16();
  404|  1.68k|  }
  405|       |
  406|    560|  return range.get_error();
  407|    563|}
_ZNK8Box_vmhd4dumpER6Indent:
  411|    459|{
  412|    459|  std::ostringstream sstr;
  413|    459|  sstr << FullBox::dump(indent);
  414|    459|  sstr << indent << "graphics mode: " << m_graphics_mode;
  415|    459|  if (m_graphics_mode == 0) {
  ------------------
  |  Branch (415:7): [True: 273, False: 186]
  ------------------
  416|    273|    sstr << " (copy)";
  417|    273|  }
  418|    459|  sstr << "\n"
  419|    459|       << indent << "op color: " << m_op_color[0] << "; " << m_op_color[1] << "; " << m_op_color[2] << "\n";
  420|       |
  421|    459|  return sstr.str();
  422|    459|}
_ZN8Box_nmhd5parseER14BitstreamRangePK20heif_security_limits:
  441|    558|{
  442|    558|  parse_full_box_header(range);
  443|       |
  444|    558|  if (get_version() > 0) {
  ------------------
  |  Branch (444:7): [True: 1, False: 557]
  ------------------
  445|      1|    return unsupported_version_error("nmhd");
  446|      1|  }
  447|       |
  448|    557|  return range.get_error();
  449|    558|}
_ZNK8Box_nmhd4dumpER6Indent:
  453|    511|{
  454|    511|  std::ostringstream sstr;
  455|    511|  sstr << FullBox::dump(indent);
  456|       |
  457|    511|  return sstr.str();
  458|    511|}
_ZN8Box_stsd5parseER14BitstreamRangePK20heif_security_limits:
  472|  1.39k|{
  473|  1.39k|  parse_full_box_header(range);
  474|       |
  475|  1.39k|  if (get_version() > 0) {
  ------------------
  |  Branch (475:7): [True: 8, False: 1.38k]
  ------------------
  476|      8|    return unsupported_version_error("stsd");
  477|      8|  }
  478|       |
  479|  1.38k|  uint32_t entry_count = range.read32();
  480|       |
  481|  1.38k|  if (limits->max_sample_description_box_entries &&
  ------------------
  |  Branch (481:7): [True: 1.38k, False: 0]
  ------------------
  482|  1.38k|      entry_count > limits->max_sample_description_box_entries) {
  ------------------
  |  Branch (482:7): [True: 52, False: 1.33k]
  ------------------
  483|     52|    std::stringstream sstr;
  484|     52|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample description items exceeds the security limit of "
  485|     52|         << limits->max_sample_description_box_entries << " items";
  486|       |
  487|     52|    return {heif_error_Memory_allocation_error,
  488|     52|            heif_suberror_Security_limit_exceeded,
  489|     52|            sstr.str()};
  490|       |
  491|     52|  }
  492|       |
  493|  4.95k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (493:24): [True: 3.77k, False: 1.18k]
  ------------------
  494|  3.77k|    std::shared_ptr<Box> entrybox;
  495|  3.77k|    Error err = Box::read(range, &entrybox, limits);
  496|  3.77k|    if (err) {
  ------------------
  |  Branch (496:9): [True: 149, False: 3.62k]
  ------------------
  497|    149|      return err;
  498|    149|    }
  499|       |
  500|       |#if 0
  501|       |    auto visualSampleEntry_box = std::dynamic_pointer_cast<Box_VisualSampleEntry>(entrybox);
  502|       |    if (!visualSampleEntry_box) {
  503|       |      return Error{heif_error_Invalid_input,
  504|       |                   heif_suberror_Unspecified,
  505|       |                   "Invalid or unknown VisualSampleEntry in stsd box."};
  506|       |    }
  507|       |#endif
  508|       |
  509|  3.62k|    m_sample_entries.push_back(entrybox);
  510|  3.62k|  }
  511|       |
  512|  1.18k|  return range.get_error();
  513|  1.33k|}
_ZNK8Box_stsd4dumpER6Indent:
  517|    920|{
  518|    920|  std::ostringstream sstr;
  519|    920|  sstr << FullBox::dump(indent);
  520|  2.52k|  for (size_t i = 0; i < m_sample_entries.size(); i++) {
  ------------------
  |  Branch (520:22): [True: 1.60k, False: 920]
  ------------------
  521|  1.60k|    sstr << indent << "[" << i << "]\n";
  522|  1.60k|    indent++;
  523|  1.60k|    sstr << m_sample_entries[i]->dump(indent);
  524|  1.60k|    indent--;
  525|  1.60k|  }
  526|       |
  527|    920|  return sstr.str();
  528|    920|}
_ZN8Box_stts5parseER14BitstreamRangePK20heif_security_limits:
  547|    409|{
  548|    409|  parse_full_box_header(range);
  549|       |
  550|    409|  if (get_version() > 0) {
  ------------------
  |  Branch (550:7): [True: 8, False: 401]
  ------------------
  551|      8|    return unsupported_version_error("stts");
  552|      8|  }
  553|       |
  554|    401|  uint32_t entry_count = range.read32();
  555|       |
  556|    401|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (556:7): [True: 401, False: 0]
  |  Branch (556:42): [True: 42, False: 359]
  ------------------
  557|     42|    return {
  558|     42|      heif_error_Memory_allocation_error,
  559|     42|      heif_suberror_Security_limit_exceeded,
  560|     42|      "Security limit for maximum number of sequence frames exceeded"
  561|     42|    };
  562|     42|  }
  563|       |
  564|    359|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(TimeToSample),
  ------------------
  |  Branch (564:12): [True: 0, False: 359]
  ------------------
  565|    359|                                       limits, "the 'stts' table")) {
  566|      0|    return err;
  567|      0|  }
  568|       |
  569|    359|  m_entries.resize(entry_count);
  570|       |
  571|   216k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (571:24): [True: 216k, False: 306]
  ------------------
  572|   216k|    if (range.eof()) {
  ------------------
  |  Branch (572:9): [True: 53, False: 215k]
  ------------------
  573|     53|      std::stringstream sstr;
  574|     53|      sstr << "stts box should contain " << entry_count << " entries, but box only contained "
  575|     53|          << i << " entries";
  576|       |
  577|     53|      return {
  578|     53|        heif_error_Invalid_input,
  579|     53|        heif_suberror_End_of_data,
  580|     53|        sstr.str()
  581|     53|      };
  582|     53|    }
  583|       |
  584|   215k|    TimeToSample entry{};
  585|   215k|    entry.sample_count = range.read32();
  586|   215k|    entry.sample_delta = range.read32();
  587|   215k|    m_entries[i] = entry;
  588|   215k|  }
  589|       |
  590|       |  // The run-lengths describe the samples of the track, so their sum is the track's
  591|       |  // sample count: a 32-bit quantity that 'stsz' caps at max_sequence_frames. Nothing
  592|       |  // above bounds the sum, so an oversized table would wrap get_number_of_samples()
  593|       |  // and could thereby slip past the consistency check against 'stsz'.
  594|    306|  {
  595|    306|    uint64_t total_samples = 0;
  596|   195k|    for (const auto& entry : m_entries) {
  ------------------
  |  Branch (596:28): [True: 195k, False: 306]
  ------------------
  597|   195k|      total_samples += entry.sample_count;
  598|   195k|    }
  599|       |
  600|    306|    uint64_t max_samples = (limits->max_sequence_frames > 0
  ------------------
  |  Branch (600:29): [True: 306, False: 0]
  ------------------
  601|    306|                            ? limits->max_sequence_frames
  602|    306|                            : uint64_t{0xFFFFFFFF});
  603|       |
  604|    306|    if (total_samples > max_samples) {
  ------------------
  |  Branch (604:9): [True: 49, False: 257]
  ------------------
  605|     49|      return {
  606|     49|        heif_error_Memory_allocation_error,
  607|     49|        heif_suberror_Security_limit_exceeded,
  608|     49|        "Security limit for maximum number of sequence frames exceeded"
  609|     49|      };
  610|     49|    }
  611|    306|  }
  612|       |
  613|       |  // Precompute the prefix sum of sample_count for O(log entries) lookups in
  614|       |  // get_sample_duration(). Safe as uint32 because the total was just checked to
  615|       |  // be <= max_samples <= 0xFFFFFFFF.
  616|    257|  {
  617|    257|    uint32_t running = 0;
  618|  1.00k|    for (auto& entry : m_entries) {
  ------------------
  |  Branch (618:22): [True: 1.00k, False: 257]
  ------------------
  619|  1.00k|      running += entry.sample_count;
  620|  1.00k|      entry.cumulative_sample_count = running;
  621|  1.00k|    }
  622|    257|  }
  623|       |
  624|    257|  return range.get_error();
  625|    306|}
_ZNK8Box_stts4dumpER6Indent:
  629|    245|{
  630|    245|  std::ostringstream sstr;
  631|    245|  sstr << FullBox::dump(indent);
  632|  1.07k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (632:22): [True: 830, False: 245]
  ------------------
  633|    830|    sstr << indent << "[" << i << "] : cnt=" << m_entries[i].sample_count << ", delta=" << m_entries[i].sample_delta << "\n";
  634|    830|  }
  635|       |
  636|    245|  return sstr.str();
  637|    245|}
_ZN8Box_ctts5parseER14BitstreamRangePK20heif_security_limits:
  726|  1.00k|{
  727|  1.00k|  parse_full_box_header(range);
  728|       |
  729|  1.00k|  uint8_t version = get_version();
  730|       |
  731|  1.00k|  if (version > 1) {
  ------------------
  |  Branch (731:7): [True: 1, False: 1.00k]
  ------------------
  732|      1|    return unsupported_version_error("ctts");
  733|      1|  }
  734|       |
  735|  1.00k|  uint32_t entry_count = range.read32();
  736|       |
  737|  1.00k|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (737:7): [True: 1.00k, False: 0]
  |  Branch (737:42): [True: 27, False: 977]
  ------------------
  738|     27|    return {
  739|     27|      heif_error_Memory_allocation_error,
  740|     27|      heif_suberror_Security_limit_exceeded,
  741|     27|      "Security limit for maximum number of sequence frames exceeded"
  742|     27|    };
  743|     27|  }
  744|       |
  745|    977|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(OffsetToSample),
  ------------------
  |  Branch (745:12): [True: 0, False: 977]
  ------------------
  746|    977|                                       limits, "the 'ctts' table")) {
  747|      0|    return err;
  748|      0|  }
  749|       |
  750|    977|  m_entries.resize(entry_count);
  751|       |
  752|  43.0k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (752:24): [True: 42.0k, False: 935]
  ------------------
  753|  42.0k|    if (range.eof()) {
  ------------------
  |  Branch (753:9): [True: 42, False: 42.0k]
  ------------------
  754|     42|      std::stringstream sstr;
  755|     42|      sstr << "ctts box should contain " << entry_count << " entries, but box only contained "
  756|     42|          << i << " entries";
  757|       |
  758|     42|      return {
  759|     42|        heif_error_Invalid_input,
  760|     42|        heif_suberror_End_of_data,
  761|     42|        sstr.str()
  762|     42|      };
  763|     42|    }
  764|       |
  765|  42.0k|    OffsetToSample entry{};
  766|  42.0k|    entry.sample_count = range.read32();
  767|  42.0k|    if (version == 0) {
  ------------------
  |  Branch (767:9): [True: 4.83k, False: 37.2k]
  ------------------
  768|  4.83k|      uint32_t offset = range.read32();
  769|       |#if 0
  770|       |      // TODO: I disabled this because I found several files that seem to
  771|       |      //       have wrong data. Since we are not using the 'ctts' data anyway,
  772|       |      //       let's not care about it now.
  773|       |
  774|       |      if (offset > INT32_MAX) {
  775|       |        return {
  776|       |          heif_error_Unsupported_feature,
  777|       |          heif_suberror_Unsupported_parameter,
  778|       |          "We don't support offsets > 0x7fff in 'ctts' box."
  779|       |        };
  780|       |      }
  781|       |#endif
  782|       |
  783|  4.83k|      entry.sample_offset = static_cast<int32_t>(offset);
  784|  4.83k|    }
  785|  37.2k|    else if (version == 1) {
  ------------------
  |  Branch (785:14): [True: 37.2k, False: 0]
  ------------------
  786|  37.2k|      entry.sample_offset = range.read32s();
  787|  37.2k|    }
  788|      0|    else {
  789|      0|      assert(false);
  ------------------
  |  Branch (789:7): [Folded, False: 0]
  ------------------
  790|      0|    }
  791|       |
  792|  42.0k|    m_entries[i] = entry;
  793|  42.0k|  }
  794|       |
  795|       |  // The run-lengths describe the samples of the track, so their sum is the track's
  796|       |  // sample count: a 32-bit quantity that 'stsz' caps at max_sequence_frames. Nothing
  797|       |  // above bounds the sum, so an oversized table would wrap get_number_of_samples()
  798|       |  // and could thereby slip past the consistency check against 'stsz'.
  799|    935|  {
  800|    935|    uint64_t total_samples = 0;
  801|  41.6k|    for (const auto& entry : m_entries) {
  ------------------
  |  Branch (801:28): [True: 41.6k, False: 935]
  ------------------
  802|  41.6k|      total_samples += entry.sample_count;
  803|  41.6k|    }
  804|       |
  805|    935|    uint64_t max_samples = (limits->max_sequence_frames > 0
  ------------------
  |  Branch (805:29): [True: 935, False: 0]
  ------------------
  806|    935|                            ? limits->max_sequence_frames
  807|    935|                            : uint64_t{0xFFFFFFFF});
  808|       |
  809|    935|    if (total_samples > max_samples) {
  ------------------
  |  Branch (809:9): [True: 62, False: 873]
  ------------------
  810|     62|      return {
  811|     62|        heif_error_Memory_allocation_error,
  812|     62|        heif_suberror_Security_limit_exceeded,
  813|     62|        "Security limit for maximum number of sequence frames exceeded"
  814|     62|      };
  815|     62|    }
  816|    935|  }
  817|       |
  818|    873|  return range.get_error();
  819|    935|}
_ZNK8Box_ctts4dumpER6Indent:
  823|    645|{
  824|    645|  std::ostringstream sstr;
  825|    645|  sstr << FullBox::dump(indent);
  826|  4.24k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (826:22): [True: 3.59k, False: 645]
  ------------------
  827|  3.59k|    sstr << indent << "[" << i << "] : cnt=" << m_entries[i].sample_count << ", offset=" << m_entries[i].sample_offset << "\n";
  828|  3.59k|  }
  829|       |
  830|    645|  return sstr.str();
  831|    645|}
_ZN8Box_stsc5parseER14BitstreamRangePK20heif_security_limits:
  927|    400|{
  928|    400|  parse_full_box_header(range);
  929|       |
  930|    400|  if (get_version() > 0) {
  ------------------
  |  Branch (930:7): [True: 7, False: 393]
  ------------------
  931|      7|    return unsupported_version_error("stsc");
  932|      7|  }
  933|       |
  934|    393|  uint32_t entry_count = range.read32();
  935|    393|  if (entry_count == 0) {
  ------------------
  |  Branch (935:7): [True: 1, False: 392]
  ------------------
  936|      1|    return {
  937|      1|      heif_error_Invalid_input,
  938|      1|      heif_suberror_Unspecified,
  939|      1|      "'stsc' box with zero entries."};
  940|      1|  }
  941|       |
  942|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
  943|    392|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (943:7): [True: 392, False: 0]
  |  Branch (943:42): [True: 33, False: 359]
  ------------------
  944|     33|    return {
  945|     33|      heif_error_Invalid_input,
  946|     33|      heif_suberror_Unspecified,
  947|     33|      "Number of chunks in `stsc` box exceeds security limits of maximum number of frames."};
  948|     33|  }
  949|       |
  950|       |
  951|    359|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(SampleToChunk),
  ------------------
  |  Branch (951:12): [True: 0, False: 359]
  ------------------
  952|    359|                                       limits, "the 'stsc' table")) {
  953|      0|    return err;
  954|      0|  }
  955|       |
  956|    359|  m_entries.resize(entry_count);
  957|       |
  958|  1.25k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (958:24): [True: 1.05k, False: 203]
  ------------------
  959|  1.05k|    SampleToChunk entry{};
  960|  1.05k|    entry.first_chunk = range.read32();
  961|  1.05k|    entry.samples_per_chunk = range.read32();
  962|  1.05k|    entry.sample_description_index = range.read32();
  963|       |
  964|  1.05k|    if (entry.samples_per_chunk == 0) {
  ------------------
  |  Branch (964:9): [True: 52, False: 998]
  ------------------
  965|     52|      return {
  966|     52|        heif_error_Invalid_input,
  967|     52|        heif_suberror_Unspecified,
  968|     52|        "'stsc' box with zero samples per chunk entry."};
  969|     52|    }
  970|       |
  971|    998|    if (entry.sample_description_index == 0) {
  ------------------
  |  Branch (971:9): [True: 43, False: 955]
  ------------------
  972|     43|      return {
  973|     43|      heif_error_Invalid_input,
  974|     43|      heif_suberror_Unspecified,
  975|     43|      "'sample_description_index' in 'stsc' must not be 0."};
  976|     43|    }
  977|       |
  978|    955|    if (limits->max_sequence_frames > 0 && entry.samples_per_chunk > limits->max_sequence_frames) {
  ------------------
  |  Branch (978:9): [True: 955, False: 0]
  |  Branch (978:44): [True: 61, False: 894]
  ------------------
  979|     61|      return {
  980|     61|        heif_error_Invalid_input,
  981|     61|        heif_suberror_Unspecified,
  982|     61|        "Number of chunk samples in `stsc` box exceeds security limits of maximum number of frames."};
  983|     61|    }
  984|       |
  985|    894|    m_entries[i] = entry;
  986|    894|  }
  987|       |
  988|    203|  return range.get_error();
  989|    359|}
_ZNK8Box_stsc4dumpER6Indent:
  993|    153|{
  994|    153|  std::ostringstream sstr;
  995|    153|  sstr << FullBox::dump(indent);
  996|    793|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (996:22): [True: 640, False: 153]
  ------------------
  997|    640|    sstr << indent << "[" << i << "]\n"
  998|    640|        << indent << "  first chunk: " << m_entries[i].first_chunk << "\n"
  999|    640|        << indent << "  samples per chunk: " << m_entries[i].samples_per_chunk << "\n"
 1000|    640|        << indent << "  sample description index: " << m_entries[i].sample_description_index << "\n";
 1001|    640|  }
 1002|       |
 1003|    153|  return sstr.str();
 1004|    153|}
_ZN8Box_stco5parseER14BitstreamRangePK20heif_security_limits:
 1056|    695|{
 1057|    695|  parse_full_box_header(range);
 1058|       |
 1059|    695|  if (get_version() > 0) {
  ------------------
  |  Branch (1059:7): [True: 8, False: 687]
  ------------------
 1060|      8|    return unsupported_version_error("stco");
 1061|      8|  }
 1062|       |
 1063|    687|  uint32_t entry_count = range.read32();
 1064|       |
 1065|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
 1066|    687|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (1066:7): [True: 687, False: 0]
  |  Branch (1066:42): [True: 37, False: 650]
  ------------------
 1067|     37|    return {
 1068|     37|      heif_error_Invalid_input,
 1069|     37|      heif_suberror_Unspecified,
 1070|     37|      "Number of chunks in 'stco' box exceeds security limits of maximum number of frames."
 1071|     37|    };
 1072|     37|  }
 1073|       |
 1074|       |  // check required memory
 1075|       |
 1076|    650|  uint64_t mem_size = static_cast<uint64_t>(entry_count) * sizeof(uint32_t);
 1077|    650|  if (auto err = m_memory_handle.alloc(mem_size,
  ------------------
  |  Branch (1077:12): [True: 0, False: 650]
  ------------------
 1078|    650|                                       limits, "the 'stco' table")) {
 1079|      0|    return err;
 1080|      0|  }
 1081|       |
 1082|   143k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1082:24): [True: 142k, False: 622]
  ------------------
 1083|   142k|    m_offsets.push_back(range.read32());
 1084|       |
 1085|   142k|    if (range.error()) {
  ------------------
  |  Branch (1085:9): [True: 28, False: 142k]
  ------------------
 1086|     28|      return range.get_error();
 1087|     28|    }
 1088|   142k|  }
 1089|       |
 1090|    622|  return range.get_error();
 1091|    650|}
_ZNK8Box_stco4dumpER6Indent:
 1095|    620|{
 1096|    620|  std::ostringstream sstr;
 1097|    620|  sstr << FullBox::dump(indent);
 1098|   142k|  for (size_t i = 0; i < m_offsets.size(); i++) {
  ------------------
  |  Branch (1098:22): [True: 142k, False: 620]
  ------------------
 1099|   142k|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_offsets[i] << std::dec << "\n";
 1100|   142k|  }
 1101|       |
 1102|    620|  return sstr.str();
 1103|    620|}
_ZN8Box_stsz5parseER14BitstreamRangePK20heif_security_limits:
 1145|  1.17k|{
 1146|  1.17k|  parse_full_box_header(range);
 1147|       |
 1148|  1.17k|  if (get_version() > 0) {
  ------------------
  |  Branch (1148:7): [True: 7, False: 1.16k]
  ------------------
 1149|      7|    return unsupported_version_error("stsz");
 1150|      7|  }
 1151|       |
 1152|  1.16k|  m_fixed_sample_size = range.read32();
 1153|  1.16k|  m_sample_count = range.read32();
 1154|       |
 1155|  1.16k|  if (limits->max_sequence_frames > 0 && m_sample_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (1155:7): [True: 1.16k, False: 0]
  |  Branch (1155:42): [True: 5, False: 1.15k]
  ------------------
 1156|      5|    return {
 1157|      5|      heif_error_Memory_allocation_error,
 1158|      5|      heif_suberror_Security_limit_exceeded,
 1159|      5|      "Security limit for maximum number of sequence frames exceeded"
 1160|      5|    };
 1161|      5|  }
 1162|       |
 1163|  1.15k|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1163:7): [True: 794, False: 365]
  ------------------
 1164|       |    // check required memory
 1165|       |
 1166|    794|    if (auto err = m_memory_handle.alloc(m_sample_count, sizeof(uint32_t),
  ------------------
  |  Branch (1166:14): [True: 0, False: 794]
  ------------------
 1167|    794|                                         limits, "the 'stsz' table")) {
 1168|      0|      return err;
 1169|      0|    }
 1170|       |
 1171|   112k|    for (uint32_t i = 0; i < m_sample_count; i++) {
  ------------------
  |  Branch (1171:26): [True: 111k, False: 755]
  ------------------
 1172|   111k|      if (range.eof()) {
  ------------------
  |  Branch (1172:11): [True: 20, False: 111k]
  ------------------
 1173|     20|        std::stringstream sstr;
 1174|     20|        sstr << "stsz box should contain " << m_sample_count << " entries, but box only contained "
 1175|     20|            << i << " entries";
 1176|       |
 1177|     20|        return {
 1178|     20|          heif_error_Invalid_input,
 1179|     20|          heif_suberror_End_of_data,
 1180|     20|          sstr.str()
 1181|     20|        };
 1182|     20|      }
 1183|       |
 1184|   111k|      m_sample_sizes.push_back(range.read32());
 1185|       |
 1186|   111k|      if (range.error()) {
  ------------------
  |  Branch (1186:11): [True: 19, False: 111k]
  ------------------
 1187|     19|        return range.get_error();
 1188|     19|      }
 1189|   111k|    }
 1190|    794|  }
 1191|       |
 1192|  1.12k|  return range.get_error();
 1193|  1.15k|}
_ZNK8Box_stsz4dumpER6Indent:
 1197|  1.06k|{
 1198|  1.06k|  std::ostringstream sstr;
 1199|  1.06k|  sstr << FullBox::dump(indent);
 1200|  1.06k|  sstr << indent << "sample count: " << m_sample_count << "\n";
 1201|  1.06k|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1201:7): [True: 735, False: 329]
  ------------------
 1202|   112k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1202:24): [True: 111k, False: 735]
  ------------------
 1203|   111k|      sstr << indent << "[" << i << "] : " << m_sample_sizes[i] << "\n";
 1204|   111k|    }
 1205|    735|  }
 1206|    329|  else {
 1207|    329|    sstr << indent << "fixed sample size: " << m_fixed_sample_size << "\n";
 1208|    329|  }
 1209|       |
 1210|  1.06k|  return sstr.str();
 1211|  1.06k|}
_ZN8Box_stss5parseER14BitstreamRangePK20heif_security_limits:
 1263|    443|{
 1264|    443|  parse_full_box_header(range);
 1265|       |
 1266|    443|  if (get_version() > 0) {
  ------------------
  |  Branch (1266:7): [True: 8, False: 435]
  ------------------
 1267|      8|    return unsupported_version_error("stss");
 1268|      8|  }
 1269|       |
 1270|    435|  uint32_t sample_count = range.read32();
 1271|       |
 1272|       |  // check required memory
 1273|       |
 1274|    435|  if (auto err = m_memory_handle.alloc(sample_count, sizeof(uint32_t),
  ------------------
  |  Branch (1274:12): [True: 54, False: 381]
  ------------------
 1275|    435|                                       limits, "the 'stss' table")) {
 1276|     54|    return err;
 1277|     54|  }
 1278|       |
 1279|   339k|  for (uint32_t i = 0; i < sample_count; i++) {
  ------------------
  |  Branch (1279:24): [True: 339k, False: 343]
  ------------------
 1280|   339k|    m_sync_samples.push_back(range.read32());
 1281|       |
 1282|   339k|    if (range.error()) {
  ------------------
  |  Branch (1282:9): [True: 38, False: 339k]
  ------------------
 1283|     38|      return range.get_error();
 1284|     38|    }
 1285|   339k|  }
 1286|       |
 1287|    343|  return range.get_error();
 1288|    381|}
_ZNK8Box_stss4dumpER6Indent:
 1292|    340|{
 1293|    340|  std::ostringstream sstr;
 1294|    340|  sstr << FullBox::dump(indent);
 1295|   339k|  for (size_t i = 0; i < m_sync_samples.size(); i++) {
  ------------------
  |  Branch (1295:22): [True: 339k, False: 340]
  ------------------
 1296|   339k|    sstr << indent << "[" << i << "] : " << m_sync_samples[i] << "\n";
 1297|   339k|  }
 1298|       |
 1299|    340|  return sstr.str();
 1300|    340|}
_ZN17VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1330|  1.24k|{
 1331|  1.24k|  (void)limits;
 1332|       |
 1333|  1.24k|  range.skip(6);
 1334|  1.24k|  data_reference_index = range.read16();
 1335|       |
 1336|  1.24k|  pre_defined = range.read16();
 1337|  1.24k|  range.skip(2);
 1338|  3.72k|  for (uint32_t& p : pre_defined2) {
  ------------------
  |  Branch (1338:20): [True: 3.72k, False: 1.24k]
  ------------------
 1339|  3.72k|    p = range.read32();
 1340|  3.72k|  }
 1341|  1.24k|  width = range.read16();
 1342|  1.24k|  height = range.read16();
 1343|  1.24k|  horizresolution = range.read32();
 1344|  1.24k|  vertresolution = range.read32();
 1345|  1.24k|  range.skip(4);
 1346|  1.24k|  frame_count = range.read16();
 1347|  1.24k|  compressorname = range.read_fixed_string(32);
 1348|  1.24k|  depth = range.read16();
 1349|  1.24k|  pre_defined3 = range.read16s();
 1350|       |
 1351|       |  // other boxes from derived specifications
 1352|       |  //std::shared_ptr<Box_clap> clap; // optional // TODO
 1353|       |  //std::shared_ptr<Box_pixi> pixi; // optional // TODO
 1354|       |
 1355|  1.24k|  return Error::Ok;
 1356|  1.24k|}
_ZNK17VisualSampleEntry4dumpER6Indent:
 1386|    793|{
 1387|    793|  std::stringstream sstr;
 1388|    793|  sstr << indent << "data reference index: " << data_reference_index << "\n"
 1389|    793|       << indent << "width: " << width << "\n"
 1390|    793|       << indent << "height: " << height << "\n"
 1391|    793|       << indent << "horiz. resolution: " << get_horizontal_resolution() << "\n"
 1392|    793|       << indent << "vert. resolution: " << get_vertical_resolution() << "\n"
 1393|    793|       << indent << "frame count: " << frame_count << "\n"
 1394|    793|       << indent << "compressorname: " << compressorname << "\n"
 1395|    793|       << indent << "depth: " << depth << "\n";
 1396|       |
 1397|    793|  return sstr.str();
 1398|    793|}
_ZNK22Box_URIMetaSampleEntry4dumpER6Indent:
 1418|  1.10k|{
 1419|  1.10k|  std::stringstream sstr;
 1420|  1.10k|  sstr << Box::dump(indent);
 1421|  1.10k|  sstr << indent << "data reference index: " << data_reference_index << "\n";
 1422|  1.10k|  sstr << dump_children(indent);
 1423|  1.10k|  return sstr.str();
 1424|  1.10k|}
_ZN22Box_URIMetaSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1428|  1.25k|{
 1429|  1.25k|  range.skip(6);
 1430|  1.25k|  data_reference_index = range.read16();
 1431|       |
 1432|  1.25k|  Error err = read_children(range, READ_CHILDREN_ALL, limits);
 1433|  1.25k|  if (err) {
  ------------------
  |  Branch (1433:7): [True: 92, False: 1.16k]
  ------------------
 1434|     92|    return err;
 1435|     92|  }
 1436|       |
 1437|  1.16k|  return Error::Ok;
 1438|  1.25k|}
_ZN7Box_uri5parseER14BitstreamRangePK20heif_security_limits:
 1442|    792|{
 1443|    792|  parse_full_box_header(range);
 1444|       |
 1445|    792|  if (get_version() > 0) {
  ------------------
  |  Branch (1445:7): [True: 4, False: 788]
  ------------------
 1446|      4|    return unsupported_version_error("uri ");
 1447|      4|  }
 1448|       |
 1449|    788|  m_uri = range.read_string();
 1450|       |
 1451|    788|  return range.get_error();
 1452|    792|}
_ZNK7Box_uri4dumpER6Indent:
 1456|    597|{
 1457|    597|  std::ostringstream sstr;
 1458|    597|  sstr << FullBox::dump(indent);
 1459|    597|  sstr << indent << "uri: " << m_uri << "\n";
 1460|       |
 1461|    597|  return sstr.str();
 1462|    597|}
_ZN8Box_ccst5parseER14BitstreamRangePK20heif_security_limits:
 1479|    553|{
 1480|    553|  parse_full_box_header(range);
 1481|       |
 1482|    553|  if (get_version() > 0) {
  ------------------
  |  Branch (1482:7): [True: 6, False: 547]
  ------------------
 1483|      6|    return unsupported_version_error("ccst");
 1484|      6|  }
 1485|       |
 1486|    547|  uint32_t bits = range.read32();
 1487|       |
 1488|    547|  auto& constraints = m_codingConstraints;
 1489|       |
 1490|    547|  constraints.all_ref_pics_intra = (bits & 0x80000000) != 0;
 1491|    547|  constraints.intra_pred_used = (bits & 0x40000000) != 0;
 1492|    547|  constraints.max_ref_per_pic = (bits >> 26) & 0x0F;
 1493|       |
 1494|    547|  return range.get_error();
 1495|    553|}
_ZNK8Box_ccst4dumpER6Indent:
 1499|    451|{
 1500|    451|  const auto& constraints = m_codingConstraints;
 1501|       |
 1502|    451|  std::ostringstream sstr;
 1503|    451|  sstr << FullBox::dump(indent);
 1504|    451|  sstr << indent << "all ref pics intra: " << std::boolalpha <<constraints.all_ref_pics_intra << "\n"
 1505|    451|       << indent << "intra pred used: " << constraints.intra_pred_used << "\n"
 1506|    451|       << indent << "max ref per pic: " << ((int) constraints.max_ref_per_pic) << "\n";
 1507|       |
 1508|    451|  return sstr.str();
 1509|    451|}
_ZN8Box_auxi5parseER14BitstreamRangePK20heif_security_limits:
 1539|  1.90k|{
 1540|  1.90k|  parse_full_box_header(range);
 1541|       |
 1542|  1.90k|  if (get_version() > 0) {
  ------------------
  |  Branch (1542:7): [True: 3, False: 1.90k]
  ------------------
 1543|      3|    return unsupported_version_error("auxi");
 1544|      3|  }
 1545|       |
 1546|  1.90k|  m_aux_track_type = range.read_string();
 1547|       |
 1548|  1.90k|  return range.get_error();
 1549|  1.90k|}
_ZNK8Box_auxi4dumpER6Indent:
 1553|  1.59k|{
 1554|  1.59k|  std::ostringstream sstr;
 1555|  1.59k|  sstr << FullBox::dump(indent);
 1556|  1.59k|  sstr << indent << "aux track info type: " << m_aux_track_type << "\n";
 1557|       |
 1558|  1.59k|  return sstr.str();
 1559|  1.59k|}
_ZNK21Box_VisualSampleEntry4dumpER6Indent:
 1592|    793|{
 1593|    793|  std::stringstream sstr;
 1594|    793|  sstr << Box::dump(indent);
 1595|    793|  sstr << m_visualSampleEntry.dump(indent);
 1596|    793|  sstr << dump_children(indent);
 1597|    793|  return sstr.str();
 1598|    793|}
_ZN21Box_VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1602|  1.24k|{
 1603|  1.24k|  auto err = m_visualSampleEntry.parse(range, limits);
 1604|  1.24k|  if (err) {
  ------------------
  |  Branch (1604:7): [True: 0, False: 1.24k]
  ------------------
 1605|      0|    return err;
 1606|      0|  }
 1607|       |
 1608|  1.24k|  err = read_children(range, READ_CHILDREN_ALL, limits);
 1609|  1.24k|  if (err) {
  ------------------
  |  Branch (1609:7): [True: 448, False: 795]
  ------------------
 1610|    448|    return err;
 1611|    448|  }
 1612|       |
 1613|    795|  return Error::Ok;
 1614|  1.24k|}
_ZNK8Box_sbgp4dumpER6Indent:
 1618|    697|{
 1619|    697|  std::stringstream sstr;
 1620|    697|  sstr << FullBox::dump(indent);
 1621|    697|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1622|       |
 1623|    697|  if (m_grouping_type_parameter) {
  ------------------
  |  Branch (1623:7): [True: 569, False: 128]
  ------------------
 1624|    569|    sstr << indent << "grouping_type_parameter: " << *m_grouping_type_parameter << "\n";
 1625|    569|  }
 1626|       |
 1627|    697|  uint32_t total_samples = 0;
 1628|  2.08k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (1628:22): [True: 1.38k, False: 697]
  ------------------
 1629|  1.38k|    sstr << indent << "[" << std::setw(2) << (i + 1) << "] : " << std::setw(3) << m_entries[i].sample_count << "x " << m_entries[i].group_description_index << "\n";
 1630|  1.38k|    total_samples += m_entries[i].sample_count;
 1631|  1.38k|  }
 1632|    697|  sstr << indent << "total samples: " << total_samples << "\n";
 1633|       |
 1634|    697|  return sstr.str();
 1635|    697|}
_ZN8Box_sbgp5parseER14BitstreamRangePK20heif_security_limits:
 1677|    786|{
 1678|    786|  parse_full_box_header(range);
 1679|       |
 1680|    786|  if (get_version() > 1) {
  ------------------
  |  Branch (1680:7): [True: 1, False: 785]
  ------------------
 1681|      1|    return unsupported_version_error("sbgp");
 1682|      1|  }
 1683|       |
 1684|    785|  m_grouping_type = range.read32();
 1685|       |
 1686|    785|  if (get_version() == 1) {
  ------------------
  |  Branch (1686:7): [True: 607, False: 178]
  ------------------
 1687|    607|    m_grouping_type_parameter = range.read32();
 1688|    607|  }
 1689|       |
 1690|    785|  uint32_t count = range.read32();
 1691|    785|  if (auto err = m_memory_handle.alloc(count, sizeof(Entry),
  ------------------
  |  Branch (1691:12): [True: 8, False: 777]
  ------------------
 1692|    785|                                       limits, "the 'sample to group' table")) {
 1693|      8|    return err;
 1694|      8|  }
 1695|       |
 1696|  2.64k|  for (uint32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1696:24): [True: 1.91k, False: 733]
  ------------------
 1697|  1.91k|    Entry e{};
 1698|  1.91k|    e.sample_count = range.read32();
 1699|  1.91k|    e.group_description_index = range.read32();
 1700|  1.91k|    m_entries.push_back(e);
 1701|  1.91k|    if (range.error()) {
  ------------------
  |  Branch (1701:9): [True: 44, False: 1.86k]
  ------------------
 1702|     44|      return range.get_error();
 1703|     44|    }
 1704|  1.91k|  }
 1705|       |
 1706|    733|  return range.get_error();
 1707|    777|}
_ZNK21SampleGroupEntry_refs4dumpEv:
 1711|   141k|{
 1712|   141k|  std::stringstream sstr;
 1713|   141k|  if (m_sample_id==0) {
  ------------------
  |  Branch (1713:7): [True: 134k, False: 6.55k]
  ------------------
 1714|   134k|    sstr << "0 (non-ref) refs =";
 1715|   134k|  }
 1716|  6.55k|  else {
 1717|  6.55k|    sstr << m_sample_id << " refs =";
 1718|  6.55k|  }
 1719|   465k|  for (uint32_t ref : m_direct_reference_sample_id) {
  ------------------
  |  Branch (1719:21): [True: 465k, False: 141k]
  ------------------
 1720|   465k|    sstr << ' ' << ref;
 1721|   465k|  }
 1722|       |
 1723|   141k|  return sstr.str();
 1724|   141k|}
_ZN21SampleGroupEntry_refs5parseER14BitstreamRangePK20heif_security_limits:
 1732|   141k|{
 1733|   141k|  m_sample_id = range.read32();
 1734|   141k|  uint8_t cnt = range.read8();
 1735|   606k|  for (uint8_t i = 0; i < cnt; i++) {
  ------------------
  |  Branch (1735:23): [True: 465k, False: 141k]
  ------------------
 1736|   465k|    m_direct_reference_sample_id.push_back(range.read32());
 1737|   465k|  }
 1738|       |
 1739|   141k|  return Error::Ok;
 1740|   141k|}
_ZNK8Box_sgpd4dumpER6Indent:
 1761|  1.24k|{
 1762|  1.24k|  std::stringstream sstr;
 1763|  1.24k|  sstr << FullBox::dump(indent);
 1764|       |
 1765|  1.24k|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1766|  1.24k|  if (m_default_length) {
  ------------------
  |  Branch (1766:7): [True: 440, False: 808]
  ------------------
 1767|    440|    sstr << indent << "default_length: " << *m_default_length << "\n";
 1768|    440|  }
 1769|  1.24k|  if (m_default_sample_description_index) {
  ------------------
  |  Branch (1769:7): [True: 408, False: 840]
  ------------------
 1770|    408|    sstr << indent << "default_sample_description_index: " << *m_default_sample_description_index << "\n";
 1771|    408|  }
 1772|       |
 1773|   142k|  for (size_t i=0; i<m_entries.size(); i++) {
  ------------------
  |  Branch (1773:20): [True: 141k, False: 1.24k]
  ------------------
 1774|   141k|    sstr << indent << "[" << (i+1) << "] : ";
 1775|   141k|    if (m_entries[i].sample_group_entry) {
  ------------------
  |  Branch (1775:9): [True: 141k, False: 0]
  ------------------
 1776|   141k|      sstr << m_entries[i].sample_group_entry->dump() << "\n";
 1777|   141k|    }
 1778|      0|    else {
 1779|      0|      sstr << "empty (description_length=" << m_entries[i].description_length << ")\n";
 1780|      0|    }
 1781|   141k|  }
 1782|       |
 1783|  1.24k|  return sstr.str();
 1784|  1.24k|}
_ZN8Box_sgpd5parseER14BitstreamRangePK20heif_security_limits:
 1794|  1.31k|{
 1795|  1.31k|  parse_full_box_header(range);
 1796|       |
 1797|  1.31k|  m_grouping_type = range.read32();
 1798|       |
 1799|       |  // Readers are expected to ignore sgpd boxes with grouping_types they don't
 1800|       |  // understand. Skip parsing of unknown types to avoid allocating Entry objects
 1801|       |  // for entries whose payload we wouldn't read anyway (and which, with
 1802|       |  // version==1 + default_length!=0 or version>=2, would consume zero bytes per
 1803|       |  // iteration and allow unbounded allocation from a tiny box).
 1804|  1.31k|  if (m_grouping_type != fourcc("refs")) {
  ------------------
  |  Branch (1804:7): [True: 314, False: 996]
  ------------------
 1805|    314|    return Error::Ok;
 1806|    314|  }
 1807|       |
 1808|    996|  if (get_version() == 1) {
  ------------------
  |  Branch (1808:7): [True: 465, False: 531]
  ------------------
 1809|    465|    m_default_length = range.read32();
 1810|    465|  }
 1811|       |
 1812|    996|  if (get_version() >= 2) {
  ------------------
  |  Branch (1812:7): [True: 417, False: 579]
  ------------------
 1813|    417|    m_default_sample_description_index = range.read32();
 1814|    417|  }
 1815|       |
 1816|    996|  uint32_t entry_count = range.read32();
 1817|       |
 1818|    996|  if (limits->max_sample_group_description_box_entries &&
  ------------------
  |  Branch (1818:7): [True: 996, False: 0]
  ------------------
 1819|    996|      entry_count > limits->max_sample_group_description_box_entries) {
  ------------------
  |  Branch (1819:7): [True: 42, False: 954]
  ------------------
 1820|     42|    std::stringstream sstr;
 1821|     42|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample group description items exceeds the security limit of "
 1822|     42|         << limits->max_sample_group_description_box_entries << " items";
 1823|       |
 1824|     42|    return {heif_error_Memory_allocation_error,
 1825|     42|            heif_suberror_Security_limit_exceeded,
 1826|     42|            sstr.str()};
 1827|       |
 1828|     42|  }
 1829|       |
 1830|    954|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(Entry),
  ------------------
  |  Branch (1830:12): [True: 0, False: 954]
  ------------------
 1831|    954|                                       limits, "the 'sgpd' table")) {
 1832|      0|    return err;
 1833|      0|  }
 1834|       |
 1835|   142k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1835:24): [True: 141k, False: 954]
  ------------------
 1836|   141k|    Entry entry;
 1837|       |
 1838|   141k|    if (get_version() == 1) {
  ------------------
  |  Branch (1838:9): [True: 31.9k, False: 109k]
  ------------------
 1839|  31.9k|      if (*m_default_length == 0) {
  ------------------
  |  Branch (1839:11): [True: 697, False: 31.2k]
  ------------------
 1840|    697|        entry.description_length = range.read32();
 1841|    697|      }
 1842|  31.9k|    }
 1843|       |
 1844|   141k|    switch (m_grouping_type) {
 1845|   141k|      case fourcc("refs"): {
  ------------------
  |  Branch (1845:7): [True: 141k, False: 0]
  ------------------
 1846|   141k|        entry.sample_group_entry = std::make_shared<SampleGroupEntry_refs>();
 1847|   141k|        Error err = entry.sample_group_entry->parse(range, limits);
 1848|   141k|        if (err) {
  ------------------
  |  Branch (1848:13): [True: 0, False: 141k]
  ------------------
 1849|      0|          return err;
 1850|      0|        }
 1851|       |
 1852|   141k|        break;
 1853|   141k|      }
 1854|       |
 1855|   141k|      default:
  ------------------
  |  Branch (1855:7): [True: 0, False: 141k]
  ------------------
 1856|      0|        break;
 1857|   141k|    }
 1858|       |
 1859|   141k|    m_entries.emplace_back(std::move(entry));
 1860|   141k|  }
 1861|       |
 1862|    954|  return Error::Ok;
 1863|    954|}
_ZNK8Box_btrt4dumpER6Indent:
 1867|    621|{
 1868|    621|  std::stringstream sstr;
 1869|    621|  sstr << FullBox::dump(indent);
 1870|       |
 1871|    621|  sstr << indent << "bufferSizeDB: " << m_bufferSizeDB << " bytes\n";
 1872|    621|  sstr << indent << "max bitrate: " << m_maxBitrate << " bits/sec\n";
 1873|    621|  sstr << indent << "avg bitrate: " << m_avgBitrate << " bits/sec\n";
 1874|       |
 1875|    621|  return sstr.str();
 1876|    621|}
_ZN8Box_btrt5parseER14BitstreamRangePK20heif_security_limits:
 1894|    627|{
 1895|    627|  m_bufferSizeDB = range.read32();
 1896|    627|  m_maxBitrate = range.read32();
 1897|    627|  m_avgBitrate = range.read32();
 1898|       |
 1899|    627|  return Error::Ok;
 1900|    627|}
_ZNK8Box_saiz4dumpER6Indent:
 1965|    886|{
 1966|    886|  std::stringstream sstr;
 1967|    886|  sstr << FullBox::dump(indent);
 1968|       |
 1969|    886|  sstr << indent << "aux_info_type: ";
 1970|    886|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (1970:7): [True: 427, False: 459]
  ------------------
 1971|    427|    sstr << "0\n";
 1972|    427|  }
 1973|    459|  else {
 1974|    459|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 1975|    459|  }
 1976|       |
 1977|    886|  sstr << indent << "aux_info_type_parameter: ";
 1978|    886|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (1978:7): [True: 430, False: 456]
  ------------------
 1979|    430|    sstr << "0\n";
 1980|    430|  }
 1981|    456|  else {
 1982|    456|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 1983|    456|  }
 1984|       |
 1985|    886|  sstr << indent << "default sample size: ";
 1986|    886|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1986:7): [True: 478, False: 408]
  ------------------
 1987|    478|    sstr << "0 (variable)\n";
 1988|    478|  }
 1989|    408|  else {
 1990|    408|    sstr << ((int)m_default_sample_info_size) << "\n";
 1991|    408|  }
 1992|       |
 1993|    886|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1993:7): [True: 478, False: 408]
  ------------------
 1994|   111k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1994:24): [True: 110k, False: 478]
  ------------------
 1995|   110k|      sstr << indent << "[" << i << "] : " << ((int) m_sample_sizes[i]) << "\n";
 1996|   110k|    }
 1997|    478|  }
 1998|       |
 1999|    886|  return sstr.str();
 2000|    886|}
_ZN8Box_saiz5parseER14BitstreamRangePK20heif_security_limits:
 2039|  1.03k|{
 2040|  1.03k|  parse_full_box_header(range);
 2041|       |
 2042|  1.03k|  if (get_flags() & 1) {
  ------------------
  |  Branch (2042:7): [True: 469, False: 562]
  ------------------
 2043|    469|    m_aux_info_type = range.read32();
 2044|    469|    m_aux_info_type_parameter = range.read32();
 2045|    469|  }
 2046|       |
 2047|  1.03k|  m_default_sample_info_size = range.read8();
 2048|  1.03k|  m_num_samples = range.read32();
 2049|       |
 2050|  1.03k|  if (limits && limits->max_sequence_frames > 0 && m_num_samples > limits->max_sequence_frames) {
  ------------------
  |  Branch (2050:7): [True: 1.03k, False: 0]
  |  Branch (2050:17): [True: 1.03k, False: 0]
  |  Branch (2050:52): [True: 37, False: 994]
  ------------------
 2051|     37|    return {
 2052|     37|      heif_error_Memory_allocation_error,
 2053|     37|      heif_suberror_Security_limit_exceeded,
 2054|     37|      "Number of 'saiz' samples exceeds the maximum number of sequence frames."
 2055|     37|    };
 2056|     37|  }
 2057|       |
 2058|    994|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (2058:7): [True: 577, False: 417]
  ------------------
 2059|       |    // check required memory
 2060|       |
 2061|    577|    uint64_t mem_size = m_num_samples;
 2062|    577|    if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'sample aux info sizes' (saiz) table")) {
  ------------------
  |  Branch (2062:14): [True: 0, False: 577]
  ------------------
 2063|      0|      return err;
 2064|      0|    }
 2065|       |
 2066|       |    // read whole table at once
 2067|       |
 2068|    577|    m_sample_sizes.resize(m_num_samples);
 2069|    577|    range.read(m_sample_sizes.data(), m_num_samples);
 2070|    577|  }
 2071|       |
 2072|    994|  return range.get_error();
 2073|    994|}
_ZNK8Box_saio4dumpER6Indent:
 2110|  1.61k|{
 2111|  1.61k|  std::stringstream sstr;
 2112|  1.61k|  sstr << FullBox::dump(indent);
 2113|       |
 2114|  1.61k|  sstr << indent << "aux_info_type: ";
 2115|  1.61k|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (2115:7): [True: 1.01k, False: 595]
  ------------------
 2116|  1.01k|    sstr << "0\n";
 2117|  1.01k|  }
 2118|    595|  else {
 2119|    595|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 2120|    595|  }
 2121|       |
 2122|  1.61k|  sstr << indent << "aux_info_type_parameter: ";
 2123|  1.61k|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (2123:7): [True: 914, False: 696]
  ------------------
 2124|    914|    sstr << "0\n";
 2125|    914|  }
 2126|    696|  else {
 2127|    696|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 2128|    696|  }
 2129|       |
 2130|   112k|  for (size_t i = 0; i < m_chunk_offset.size(); i++) {
  ------------------
  |  Branch (2130:22): [True: 110k, False: 1.61k]
  ------------------
 2131|   110k|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_chunk_offset[i] << "\n";
 2132|   110k|  }
 2133|       |
 2134|  1.61k|  return sstr.str();
 2135|  1.61k|}
_ZN8Box_saio5parseER14BitstreamRangePK20heif_security_limits:
 2191|  1.79k|{
 2192|  1.79k|  parse_full_box_header(range);
 2193|       |
 2194|  1.79k|  if (get_flags() & 1) {
  ------------------
  |  Branch (2194:7): [True: 916, False: 883]
  ------------------
 2195|    916|    m_aux_info_type = range.read32();
 2196|    916|    m_aux_info_type_parameter = range.read32();
 2197|    916|  }
 2198|       |
 2199|  1.79k|  uint32_t num_chunks = range.read32();
 2200|       |
 2201|       |  // We have no explicit maximum on the number of chunks.
 2202|       |  // Use the maximum number of frames as an upper limit.
 2203|  1.79k|  if (limits && limits->max_sequence_frames > 0 && num_chunks > limits->max_sequence_frames) {
  ------------------
  |  Branch (2203:7): [True: 1.79k, False: 0]
  |  Branch (2203:17): [True: 1.79k, False: 0]
  |  Branch (2203:52): [True: 35, False: 1.76k]
  ------------------
 2204|     35|    return {
 2205|     35|      heif_error_Memory_allocation_error,
 2206|     35|      heif_suberror_Security_limit_exceeded,
 2207|     35|      "Number of 'saio' chunks exceeds the maximum number of sequence frames."
 2208|     35|    };
 2209|     35|  }
 2210|       |
 2211|  1.76k|  if (auto err = m_memory_handle.alloc(num_chunks, sizeof(uint64_t),
  ------------------
  |  Branch (2211:12): [True: 0, False: 1.76k]
  ------------------
 2212|  1.76k|                                       limits, "the 'saio' table")) {
 2213|      0|    return err;
 2214|      0|  }
 2215|       |
 2216|  1.76k|  m_chunk_offset.resize(num_chunks);
 2217|       |
 2218|   112k|  for (uint32_t i = 0; i < num_chunks; i++) {
  ------------------
  |  Branch (2218:24): [True: 111k, False: 1.70k]
  ------------------
 2219|   111k|    uint64_t offset;
 2220|   111k|    if (get_version() == 1) {
  ------------------
  |  Branch (2220:9): [True: 396, False: 110k]
  ------------------
 2221|    396|      offset = range.read64();
 2222|    396|    }
 2223|   110k|    else {
 2224|   110k|      offset = range.read32();
 2225|   110k|    }
 2226|       |
 2227|   111k|    m_chunk_offset[i] = offset;
 2228|       |
 2229|   111k|    if (range.error()) {
  ------------------
  |  Branch (2229:9): [True: 56, False: 111k]
  ------------------
 2230|     56|      return range.get_error();
 2231|     56|    }
 2232|   111k|  }
 2233|       |
 2234|  1.70k|  return Error::Ok;
 2235|  1.76k|}
_ZNK8Box_sdtp4dumpER6Indent:
 2239|    492|{
 2240|    492|  std::stringstream sstr;
 2241|    492|  sstr << FullBox::dump(indent);
 2242|       |
 2243|    492|  assert(m_sample_information.size() <= UINT32_MAX);
  ------------------
  |  Branch (2243:3): [True: 492, False: 0]
  ------------------
 2244|       |
 2245|  4.56M|  for (uint32_t i = 0; i < static_cast<uint32_t>(m_sample_information.size()); i++) {
  ------------------
  |  Branch (2245:24): [True: 4.56M, False: 492]
  ------------------
 2246|  4.56M|    const char* spaces = "            ";
 2247|  4.56M|    int nSpaces = 6;
 2248|  4.56M|    int k = i;
 2249|  23.6M|    while (k >= 10 && nSpaces < 12) {
  ------------------
  |  Branch (2249:12): [True: 19.0M, False: 4.56M]
  |  Branch (2249:23): [True: 19.0M, False: 0]
  ------------------
 2250|  19.0M|      k /= 10;
 2251|  19.0M|      nSpaces++;
 2252|  19.0M|    }
 2253|       |
 2254|  4.56M|    spaces = spaces + 12 - nSpaces;
 2255|       |
 2256|  4.56M|    sstr << indent << "[" << i << "] : is_leading=" << (int) get_is_leading(i) << "\n"
 2257|  4.56M|        << indent << spaces << "depends_on=" << (int) get_depends_on(i) << "\n"
 2258|  4.56M|        << indent << spaces << "is_depended_on=" << (int) get_is_depended_on(i) << "\n"
 2259|  4.56M|        << indent << spaces << "has_redundancy=" << (int) get_has_redundancy(i) << "\n";
 2260|  4.56M|  }
 2261|       |
 2262|    492|  return sstr.str();
 2263|    492|}
_ZN8Box_sdtp5parseER14BitstreamRangePK20heif_security_limits:
 2267|    555|{
 2268|    555|  parse_full_box_header(range);
 2269|       |
 2270|       |  // We have no easy way to get the number of samples from 'saiz' or 'stz2' as specified
 2271|       |  // in the standard. Instead, we read until the end of the box.
 2272|    555|  size_t nSamples = range.get_remaining_bytes();
 2273|       |
 2274|    555|  m_sample_information.resize(nSamples);
 2275|    555|  range.read(m_sample_information.data(), nSamples);
 2276|       |
 2277|    555|  return Error::Ok;
 2278|    555|}
_ZN8Box_tref5parseER14BitstreamRangePK20heif_security_limits:
 2282|  1.03k|{
 2283|  3.37k|  while (!range.eof()) {
  ------------------
  |  Branch (2283:10): [True: 2.49k, False: 878]
  ------------------
 2284|  2.49k|    BoxHeader header;
 2285|  2.49k|    Error err = header.parse_header(range);
 2286|  2.49k|    if (err != Error::Ok) {
  ------------------
  |  Branch (2286:9): [True: 6, False: 2.49k]
  ------------------
 2287|      6|      return err;
 2288|      6|    }
 2289|       |
 2290|  2.49k|    if (header.get_box_size() < header.get_header_size()) {
  ------------------
  |  Branch (2290:9): [True: 1, False: 2.48k]
  ------------------
 2291|      1|      return {heif_error_Invalid_input,
 2292|      1|              heif_suberror_Unspecified,
 2293|      1|              "Invalid box size (smaller than header)"};
 2294|      1|    }
 2295|       |
 2296|  2.48k|    uint64_t dataSize = (header.get_box_size() - header.get_header_size());
 2297|       |
 2298|  2.48k|    if (dataSize % 4 != 0 || dataSize < 4) {
  ------------------
  |  Branch (2298:9): [True: 24, False: 2.46k]
  |  Branch (2298:30): [True: 1, False: 2.46k]
  ------------------
 2299|     25|      return {heif_error_Invalid_input,
 2300|     25|              heif_suberror_Unspecified,
 2301|     25|              "Input file has a 'tref' TrackReferenceTypeBox with invalid size."};
 2302|     25|    }
 2303|       |
 2304|  2.46k|    uint64_t nRefs = dataSize / 4;
 2305|       |
 2306|  2.46k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (2306:9): [True: 2.46k, False: 0]
  |  Branch (2306:30): [True: 99, False: 2.36k]
  ------------------
 2307|     99|      std::stringstream sstr;
 2308|     99|      sstr << "Number of references in tref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 2309|       |
 2310|     99|      return {heif_error_Invalid_input,
 2311|     99|              heif_suberror_Security_limit_exceeded,
 2312|     99|              sstr.str()};
 2313|     99|    }
 2314|       |
 2315|  2.36k|    Reference ref;
 2316|  2.36k|    ref.reference_type = header.get_short_type();
 2317|       |
 2318|  10.1k|    for (uint64_t i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (2318:26): [True: 7.81k, False: 2.34k]
  ------------------
 2319|  7.81k|      if (range.eof()) {
  ------------------
  |  Branch (2319:11): [True: 24, False: 7.78k]
  ------------------
 2320|     24|        std::stringstream sstr;
 2321|     24|        sstr << "tref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 2322|       |
 2323|     24|        return {heif_error_Invalid_input,
 2324|     24|                heif_suberror_End_of_data,
 2325|     24|                sstr.str()};
 2326|     24|      }
 2327|       |
 2328|  7.78k|      ref.to_track_id.push_back(static_cast<uint32_t>(range.read32()));
 2329|  7.78k|    }
 2330|       |
 2331|  2.34k|    m_references.push_back(ref);
 2332|  2.34k|  }
 2333|       |
 2334|       |
 2335|       |  // --- check for duplicate references
 2336|       |
 2337|    878|  if (auto error = check_for_double_references()) {
  ------------------
  |  Branch (2337:12): [True: 9, False: 869]
  ------------------
 2338|      9|    return error;
 2339|      9|  }
 2340|       |
 2341|    869|  return range.get_error();
 2342|    878|}
_ZNK8Box_tref27check_for_double_referencesEv:
 2346|    878|{
 2347|  2.17k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2347:24): [True: 2.17k, False: 869]
  ------------------
 2348|  2.17k|    std::set<uint32_t> to_ids;
 2349|  7.14k|    for (const auto to_id : ref.to_track_id) {
  ------------------
  |  Branch (2349:27): [True: 7.14k, False: 2.16k]
  ------------------
 2350|  7.14k|      if (to_ids.find(to_id) == to_ids.end()) {
  ------------------
  |  Branch (2350:11): [True: 7.13k, False: 9]
  ------------------
 2351|  7.13k|        to_ids.insert(to_id);
 2352|  7.13k|      }
 2353|      9|      else {
 2354|      9|        return {heif_error_Invalid_input,
 2355|      9|                heif_suberror_Unspecified,
 2356|      9|                "'tref' has double references"};
 2357|      9|      }
 2358|  7.14k|    }
 2359|  2.17k|  }
 2360|       |
 2361|    869|  return Error::Ok;
 2362|    878|}
_ZNK8Box_tref4dumpER6Indent:
 2392|    723|{
 2393|    723|  std::ostringstream sstr;
 2394|    723|  sstr << Box::dump(indent);
 2395|       |
 2396|  2.00k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2396:24): [True: 2.00k, False: 723]
  ------------------
 2397|  2.00k|    sstr << indent << "reference with type '" << fourcc_to_string(ref.reference_type) << "'"
 2398|  2.00k|         << " to track IDs: ";
 2399|  6.23k|    for (uint32_t id : ref.to_track_id) {
  ------------------
  |  Branch (2399:22): [True: 6.23k, False: 2.00k]
  ------------------
 2400|  6.23k|      sstr << id << " ";
 2401|  6.23k|    }
 2402|  2.00k|    sstr << "\n";
 2403|  2.00k|  }
 2404|       |
 2405|    723|  return sstr.str();
 2406|    723|}
_ZN8Box_elst5parseER14BitstreamRangePK20heif_security_limits:
 2463|  1.22k|{
 2464|  1.22k|  Error err = parse_full_box_header(range);
 2465|  1.22k|  if (err != Error::Ok) {
  ------------------
  |  Branch (2465:7): [True: 2, False: 1.22k]
  ------------------
 2466|      2|    return err;
 2467|      2|  }
 2468|       |
 2469|  1.22k|  if (get_version() > 1) {
  ------------------
  |  Branch (2469:7): [True: 7, False: 1.22k]
  ------------------
 2470|      7|    return unsupported_version_error("edts");
 2471|      7|  }
 2472|       |
 2473|  1.22k|  uint32_t nEntries = range.read32();
 2474|  1.22k|  m_entries.clear();
 2475|       |
 2476|   233k|  for (uint64_t i = 0; i < nEntries; i++) {
  ------------------
  |  Branch (2476:24): [True: 232k, False: 1.14k]
  ------------------
 2477|   232k|    if (range.eof()) {
  ------------------
  |  Branch (2477:9): [True: 73, False: 232k]
  ------------------
 2478|     73|      std::stringstream sstr;
 2479|     73|      sstr << "edts box should contain " << nEntries << " entries, but we can only read " << i << " entries.";
 2480|       |
 2481|     73|      return {heif_error_Invalid_input,
 2482|     73|              heif_suberror_End_of_data,
 2483|     73|              sstr.str()};
 2484|     73|    }
 2485|       |
 2486|   232k|    Entry entry{};
 2487|   232k|    if (get_version() == 1) {
  ------------------
  |  Branch (2487:9): [True: 195, False: 232k]
  ------------------
 2488|    195|      entry.segment_duration = range.read64();
 2489|    195|      entry.media_time = range.read64s();
 2490|    195|    }
 2491|   232k|    else {
 2492|   232k|      entry.segment_duration = range.read32();
 2493|   232k|      entry.media_time = range.read32s();
 2494|   232k|    }
 2495|       |
 2496|   232k|    entry.media_rate_integer = range.read16s();
 2497|   232k|    entry.media_rate_fraction = range.read16s();
 2498|       |
 2499|   232k|    m_entries.push_back(entry);
 2500|   232k|  }
 2501|       |
 2502|  1.14k|  return range.get_error();
 2503|  1.22k|}
_ZNK8Box_elst4dumpER6Indent:
 2543|  1.03k|{
 2544|  1.03k|  std::ostringstream sstr;
 2545|  1.03k|  sstr << FullBox::dump(indent);
 2546|       |
 2547|  1.03k|  sstr << indent << "repeat list: " << ((get_flags() & Flags::Repeat_EditList) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (2547:41): [True: 154, False: 881]
  ------------------
 2548|       |
 2549|  45.7k|  for (const auto& entry : m_entries) {
  ------------------
  |  Branch (2549:26): [True: 45.7k, False: 1.03k]
  ------------------
 2550|  45.7k|    sstr << indent << "segment duration: " << entry.segment_duration << "\n";
 2551|  45.7k|    sstr << indent << "media time: " << entry.media_time << "\n";
 2552|  45.7k|    sstr << indent << "media rate integer: " << entry.media_rate_integer << "\n";
 2553|  45.7k|    sstr << indent << "media rate fraction: " << entry.media_rate_fraction << "\n";
 2554|  45.7k|  }
 2555|       |
 2556|  1.03k|  return sstr.str();
 2557|  1.03k|}

_ZN13Box_containerC2EPKc:
   37|  2.67k|  {
   38|  2.67k|    set_short_type(fourcc(type));
   39|  2.67k|  }
_ZN8Box_moovC2Ev:
   51|    409|  Box_moov() : Box_container("moov") {}
_ZNK8Box_moov14debug_box_nameEv:
   53|    384|  const char* debug_box_name() const override { return "Movie"; }
_ZN8Box_mvhdC2Ev:
   61|  1.70k|  {
   62|  1.70k|    set_short_type(fourcc("mvhd"));
   63|  1.70k|  }
_ZNK8Box_mvhd14debug_box_nameEv:
   67|  1.47k|  const char* debug_box_name() const override { return "Movie Header"; }
_ZNK8Box_mvhd8get_rateEv:
   73|  1.47k|  double get_rate() const { return m_rate / double(0x10000); }
_ZNK8Box_mvhd10get_volumeEv:
   75|  1.47k|  float get_volume() const { return float(m_volume) / float(0x100); }
_ZN8Box_trakC2Ev:
  121|    373|  Box_trak() : Box_container("trak") {}
_ZNK8Box_trak14debug_box_nameEv:
  123|    331|  const char* debug_box_name() const override { return "Track"; }
_ZN8Box_tkhdC2Ev:
  131|  1.32k|  {
  132|  1.32k|    set_short_type(fourcc("tkhd"));
  133|       |
  134|       |    // set default flags according to ISO 14496-12
  135|  1.32k|    set_flags(Track_enabled | Track_in_movie | Track_in_preview);
  136|  1.32k|  }
_ZNK8Box_tkhd14debug_box_nameEv:
  147|  1.26k|  const char* debug_box_name() const override { return "Track Header"; }
_ZNK8Box_tkhd10get_volumeEv:
  153|  1.26k|  float get_volume() const { return float(m_volume) / float(0x100); }
_ZNK8Box_tkhd9get_widthEv:
  157|  1.26k|  double get_width() const { return float(m_width) / double(0x10000); }
_ZNK8Box_tkhd10get_heightEv:
  159|  1.26k|  double get_height() const { return float(m_height) / double(0x10000); }
_ZN8Box_mdiaC2Ev:
  198|    102|  Box_mdia() : Box_container("mdia") {}
_ZNK8Box_mdia14debug_box_nameEv:
  200|     76|  const char* debug_box_name() const override { return "Media"; }
_ZN8Box_mdhdC2Ev:
  208|    662|  {
  209|    662|    set_short_type(fourcc("mdhd"));
  210|    662|  }
_ZNK8Box_mdhd14debug_box_nameEv:
  214|    622|  const char* debug_box_name() const override { return "Media Header"; }
_ZN8Box_minfC2Ev:
  246|    546|  Box_minf() : Box_container("minf") {}
_ZNK8Box_minf14debug_box_nameEv:
  248|    444|  const char* debug_box_name() const override { return "Media Information"; }
_ZN8Box_vmhdC2Ev:
  256|    567|  {
  257|    567|    set_short_type(fourcc("vmhd"));
  258|    567|    set_flags(1);
  259|    567|  }
_ZNK8Box_vmhd14debug_box_nameEv:
  263|    459|  const char* debug_box_name() const override { return "Video Media Header"; }
_ZN8Box_nmhdC2Ev:
  280|    560|  {
  281|    560|    set_short_type(fourcc("nmhd"));
  282|    560|    set_flags(1);
  283|    560|  }
_ZNK8Box_nmhd14debug_box_nameEv:
  287|    511|  const char* debug_box_name() const override { return "Null Media Header"; }
_ZN8Box_stblC2Ev:
  299|    606|  Box_stbl() : Box_container("stbl") {}
_ZNK8Box_stbl14debug_box_nameEv:
  301|    495|  const char* debug_box_name() const override { return "Sample Table"; }
_ZN8Box_stsdC2Ev:
  309|  1.39k|  {
  310|  1.39k|    set_short_type(fourcc("stsd"));
  311|  1.39k|  }
_ZNK8Box_stsd14debug_box_nameEv:
  315|    920|  const char* debug_box_name() const override { return "Sample Description"; }
_ZN8Box_sttsC2Ev:
  347|    413|  {
  348|    413|    set_short_type(fourcc("stts"));
  349|    413|  }
_ZNK8Box_stts14debug_box_nameEv:
  353|    245|  const char* debug_box_name() const override { return "Decoding Time to Sample"; }
_ZN8Box_cttsC2Ev:
  393|  1.01k|  {
  394|  1.01k|    set_short_type(fourcc("ctts"));
  395|  1.01k|  }
_ZNK8Box_ctts14debug_box_nameEv:
  399|    645|  const char* debug_box_name() const override { return "Composition Time to Sample"; }
_ZN8Box_stscC2Ev:
  433|    404|  {
  434|    404|    set_short_type(fourcc("stsc"));
  435|    404|  }
_ZNK8Box_stsc14debug_box_nameEv:
  439|    153|  const char* debug_box_name() const override { return "Sample to Chunk"; }
_ZN8Box_stcoC2Ev:
  477|    702|  {
  478|    702|    set_short_type(fourcc("stco"));
  479|    702|  }
_ZNK8Box_stco14debug_box_nameEv:
  483|    620|  const char* debug_box_name() const override { return "Sample Offset"; }
_ZN8Box_stszC2Ev:
  510|  1.17k|  {
  511|  1.17k|    set_short_type(fourcc("stsz"));
  512|  1.17k|  }
_ZNK8Box_stsz14debug_box_nameEv:
  516|  1.06k|  const char* debug_box_name() const override { return "Sample Size"; }
_ZN8Box_stssC2Ev:
  545|    445|  {
  546|    445|    set_short_type(fourcc("stss"));
  547|    445|  }
_ZNK8Box_stss14debug_box_nameEv:
  551|    340|  const char* debug_box_name() const override { return "Sync Sample"; }
_ZN8Box_ccstC2Ev:
  584|    555|  {
  585|    555|    set_short_type(fourcc("ccst"));
  586|    555|  }
_ZNK8Box_ccst14debug_box_nameEv:
  590|    451|  const char* debug_box_name() const override { return "Coding Constraints"; }
_ZN8Box_auxiC2Ev:
  609|  1.90k|  {
  610|  1.90k|    set_short_type(fourcc("auxi"));
  611|  1.90k|  }
_ZNK8Box_auxi14debug_box_nameEv:
  615|  1.59k|  const char* debug_box_name() const override { return "Auxiliary Info Type"; }
_ZNK17VisualSampleEntry25get_horizontal_resolutionEv:
  654|    793|  double get_horizontal_resolution() const { return horizresolution / double(0x10000); }
_ZNK17VisualSampleEntry23get_vertical_resolutionEv:
  656|    793|  double get_vertical_resolution() const { return vertresolution / double(0x10000); }
_ZN22Box_URIMetaSampleEntryC2Ev:
  687|  1.25k|  {
  688|  1.25k|    set_short_type(fourcc("urim"));
  689|  1.25k|  }
_ZNK22Box_URIMetaSampleEntry14debug_box_nameEv:
  695|  1.10k|  const char* debug_box_name() const override { return "URI Meta Sample Entry"; }
_ZN7Box_uriC2Ev:
  710|    794|  {
  711|    794|    set_short_type(fourcc("uri "));
  712|    794|  }
_ZNK7Box_uri14debug_box_nameEv:
  722|    597|  const char* debug_box_name() const override { return "URI"; }
_ZN8Box_sbgpC2Ev:
  736|    796|  {
  737|    796|    set_short_type(fourcc("sbgp"));
  738|    796|  }
_ZNK8Box_sbgp14debug_box_nameEv:
  744|    697|  const char* debug_box_name() const override { return "Sample to Group"; }
_ZN8Box_sgpdC2Ev:
  797|  1.31k|  {
  798|  1.31k|    set_short_type(fourcc("sgpd"));
  799|  1.31k|  }
_ZNK8Box_sgpd14debug_box_nameEv:
  805|  1.24k|  const char* debug_box_name() const override { return "Sample Group Description"; }
_ZN8Box_btrtC2Ev:
  830|    628|  {
  831|    628|    set_short_type(fourcc("btrt"));
  832|    628|  }
_ZNK8Box_btrt14debug_box_nameEv:
  836|    621|  const char* debug_box_name() const override { return "Bitrate"; }
_ZN8Box_saizC2Ev:
  853|  1.03k|  {
  854|  1.03k|    set_short_type(fourcc("saiz"));
  855|  1.03k|  }
_ZNK8Box_saiz14debug_box_nameEv:
  875|    886|  const char* debug_box_name() const override { return "Sample Auxiliary Information Sizes"; }
_ZN8Box_saioC2Ev:
  896|  1.80k|  {
  897|  1.80k|    set_short_type(fourcc("saio"));
  898|  1.80k|  }
_ZNK8Box_saio14debug_box_nameEv:
  915|  1.61k|  const char* debug_box_name() const override { return "Sample Auxiliary Information Offsets"; }
_ZN8Box_sdtpC2Ev:
  941|    556|  {
  942|    556|    set_short_type(fourcc("sdtp"));
  943|    556|  }
_ZNK8Box_sdtp14debug_box_nameEv:
  947|    492|  const char* debug_box_name() const override { return "Independent and Disposable Samples"; }
_ZNK8Box_sdtp14get_is_leadingEj:
  951|  4.56M|  uint8_t get_is_leading(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 6) & 3; }
_ZNK8Box_sdtp14get_depends_onEj:
  953|  4.56M|  uint8_t get_depends_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 4) & 3; }
_ZNK8Box_sdtp18get_is_depended_onEj:
  955|  4.56M|  uint8_t get_is_depended_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 2) & 3; }
_ZNK8Box_sdtp18get_has_redundancyEj:
  957|  4.56M|  uint8_t get_has_redundancy(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx]) & 3; }
_ZN8Box_trefC2Ev:
  971|  1.03k|  {
  972|  1.03k|    set_short_type(fourcc("tref"));
  973|  1.03k|  }
_ZNK8Box_tref14debug_box_nameEv:
  982|    723|  const char* debug_box_name() const override { return "Track Reference"; }
_ZN8Box_edtsC2Ev:
 1009|    639|  Box_edts() : Box_container("edts") {}
_ZNK8Box_edts14debug_box_nameEv:
 1011|    575|  const char* debug_box_name() const override { return "Edit List Container"; }
_ZN8Box_elstC2Ev:
 1019|  1.23k|  {
 1020|  1.23k|    set_short_type(fourcc("elst"));
 1021|  1.23k|  }
_ZNK8Box_elst14debug_box_nameEv:
 1029|  1.03k|  const char* debug_box_name() const override { return "Edit List"; }
_ZN16SampleGroupEntryD2Ev:
  768|   141k|  virtual ~SampleGroupEntry() = default;

aom_codec_version:
   25|      2|int aom_codec_version(void) { return VERSION_PACKED; }
  ------------------
  |  |   17|      2|  ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH))
  |  |  ------------------
  |  |  |  |   12|      2|#define VERSION_MAJOR 3
  |  |  ------------------
  |  |                 ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH))
  |  |  ------------------
  |  |  |  |   13|      2|#define VERSION_MINOR 2
  |  |  ------------------
  |  |                 ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH))
  |  |  ------------------
  |  |  |  |   14|      2|#define VERSION_PATCH 0
  |  |  ------------------
  ------------------

de265_init:
  210|      2|{
  211|      2|  std::lock_guard<std::mutex> lock(de265_init_mutex());
  212|       |
  213|      2|  de265_init_count++;
  214|       |
  215|      2|  if (de265_init_count > 1) {
  ------------------
  |  Branch (215:7): [True: 0, False: 2]
  ------------------
  216|       |    // we are not the first -> already initialized
  217|       |
  218|      0|    return DE265_OK;
  219|      0|  }
  220|       |
  221|       |
  222|       |  // do initializations
  223|       |
  224|      2|  init_scan_orders();
  225|      2|  pps_scan_cache_init();
  226|       |
  227|      2|  if (!alloc_and_init_significant_coeff_ctxIdx_lookupTable()) {
  ------------------
  |  Branch (227:7): [True: 0, False: 2]
  ------------------
  228|      0|    pps_scan_cache_free();
  229|      0|    de265_init_count--;
  230|      0|    return DE265_ERROR_LIBRARY_INITIALIZATION_FAILED;
  231|      0|  }
  232|       |
  233|      2|  return DE265_OK;
  234|      2|}
de265.cc:_ZL16de265_init_mutexv:
  203|      2|{
  204|      2|  static std::mutex de265_init_mutex;
  205|      2|  return de265_init_mutex;
  206|      2|}

_Z19pps_scan_cache_initv:
  677|      2|{
  678|      2|  if (!g_pps_scan_cache.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (678:7): [True: 2, False: 0]
  ------------------
  679|      2|    g_pps_scan_cache.store(new pps_scan_cache(), std::memory_order_release);
  680|      2|  }
  681|      2|}

_Z14get_scan_orderii:
   81|     48|{
   82|     48|  switch (scanIdx) {
   83|     16|  case 0: return scan_d[log2BlockSize];
  ------------------
  |  Branch (83:3): [True: 16, False: 32]
  ------------------
   84|     16|  case 1: return scan_h[log2BlockSize];
  ------------------
  |  Branch (84:3): [True: 16, False: 32]
  ------------------
   85|     16|  case 2: return scan_v[log2BlockSize];
  ------------------
  |  Branch (85:3): [True: 16, False: 32]
  ------------------
   86|      0|  default: return 0; // should never happen
  ------------------
  |  Branch (86:3): [True: 0, False: 48]
  ------------------
   87|     48|  }
   88|     48|}
_Z16init_scan_ordersv:
  131|      2|{
  132|     12|  for (int log2size=1;log2size<=5;log2size++)
  ------------------
  |  Branch (132:23): [True: 10, False: 2]
  ------------------
  133|     10|    {
  134|     10|      init_scan_h(scan_h[log2size], 1<<log2size);
  135|     10|      init_scan_v(scan_v[log2size], 1<<log2size);
  136|     10|      init_scan_d(scan_d[log2size], 1<<log2size);
  137|     10|    }
  138|       |
  139|     10|  for (int log2size=2;log2size<=5;log2size++)
  ------------------
  |  Branch (139:23): [True: 8, False: 2]
  ------------------
  140|     32|    for (int scanIdx=0;scanIdx<3;scanIdx++)
  ------------------
  |  Branch (140:24): [True: 24, False: 8]
  ------------------
  141|     24|      fill_scan_pos_table(scanpos[scanIdx][log2size], scanIdx, log2size);
  142|      2|}
scan.cc:_ZL11init_scan_hP8positioni:
   35|     10|{
   36|     10|  int i=0;
   37|    134|  for (int y=0;y<blkSize;y++)
  ------------------
  |  Branch (37:16): [True: 124, False: 10]
  ------------------
   38|  2.85k|    for (int x=0;x<blkSize;x++)
  ------------------
  |  Branch (38:18): [True: 2.72k, False: 124]
  ------------------
   39|  2.72k|      {
   40|  2.72k|        scan[i].x = x;
   41|  2.72k|        scan[i].y = y;
   42|  2.72k|        i++;
   43|  2.72k|      }
   44|     10|}
scan.cc:_ZL11init_scan_vP8positioni:
   47|     10|{
   48|     10|  int i=0;
   49|    134|  for (int x=0;x<blkSize;x++)
  ------------------
  |  Branch (49:16): [True: 124, False: 10]
  ------------------
   50|  2.85k|    for (int y=0;y<blkSize;y++)
  ------------------
  |  Branch (50:18): [True: 2.72k, False: 124]
  ------------------
   51|  2.72k|      {
   52|  2.72k|        scan[i].x = x;
   53|  2.72k|        scan[i].y = y;
   54|  2.72k|        i++;
   55|  2.72k|      }
   56|     10|}
scan.cc:_ZL11init_scan_dP8positioni:
   59|     10|{
   60|     10|  int i=0;
   61|     10|  int x=0,y=0;
   62|       |
   63|    238|  do {
   64|  5.57k|    while (y>=0) {
  ------------------
  |  Branch (64:12): [True: 5.33k, False: 238]
  ------------------
   65|  5.33k|      if (x<blkSize && y<blkSize) {
  ------------------
  |  Branch (65:11): [True: 4.03k, False: 1.30k]
  |  Branch (65:24): [True: 2.72k, False: 1.30k]
  ------------------
   66|  2.72k|        scan[i].x = x;
   67|  2.72k|        scan[i].y = y;
   68|  2.72k|        i++;
   69|  2.72k|      }
   70|  5.33k|      y--;
   71|  5.33k|      x++;
   72|  5.33k|    }
   73|       |
   74|    238|    y=x;
   75|    238|    x=0;
   76|    238|  } while (i < blkSize*blkSize);
  ------------------
  |  Branch (76:12): [True: 228, False: 10]
  ------------------
   77|     10|}
scan.cc:_ZL19fill_scan_pos_tableP13scan_positionii:
  109|     24|{
  110|     24|  int numSubBlocks = (1<<(log2TrafoSize-2)) * (1<<(log2TrafoSize-2));
  111|     24|  int blkSize = 1 << log2TrafoSize;
  112|       |
  113|     24|  const position* ScanOrderSub = get_scan_order(log2TrafoSize-2, scanIdx);
  114|     24|  const position* ScanOrderPos = get_scan_order(2, scanIdx);
  115|       |
  116|    534|  for (int sb = 0; sb < numSubBlocks; sb++)
  ------------------
  |  Branch (116:20): [True: 510, False: 24]
  ------------------
  117|    510|    {
  118|    510|      position S = ScanOrderSub[sb];
  119|  8.67k|      for (int sp = 0; sp < 16; sp++)
  ------------------
  |  Branch (119:24): [True: 8.16k, False: 510]
  ------------------
  120|  8.16k|        {
  121|  8.16k|          int xC = (S.x<<2) + ScanOrderPos[sp].x;
  122|  8.16k|          int yC = (S.y<<2) + ScanOrderPos[sp].y;
  123|  8.16k|          pos[yC * blkSize + xC].subBlock = sb;
  124|  8.16k|          pos[yC * blkSize + xC].scanPos  = sp;
  125|  8.16k|        }
  126|    510|    }
  127|     24|}

_Z51alloc_and_init_significant_coeff_ctxIdx_lookupTablev:
 1996|      2|{
 1997|      2|  int tableSize = 4 * 4 * (2) + 8 * 8 * (2 * 2 * 4) + 16 * 16 * (2 * 4) + 32 * 32 * (2 * 4);
 1998|       |
 1999|      2|  uint8_t* p = (uint8_t*) malloc(tableSize);
 2000|      2|  if (p == nullptr) {
  ------------------
  |  Branch (2000:7): [True: 0, False: 2]
  ------------------
 2001|      0|    return false;
 2002|      0|  }
 2003|       |
 2004|      2|  memset(p, 0xFF, tableSize); // just for debugging
 2005|       |
 2006|       |
 2007|       |  // --- Set pointers to memory areas. Note that some parameters share the same memory. ---
 2008|       |
 2009|       |  // 4x4
 2010|       |
 2011|      6|  for (int cIdx = 0; cIdx < 2; cIdx++) {
  ------------------
  |  Branch (2011:22): [True: 4, False: 2]
  ------------------
 2012|     12|    for (int scanIdx = 0; scanIdx < 2; scanIdx++)
  ------------------
  |  Branch (2012:27): [True: 8, False: 4]
  ------------------
 2013|     40|      for (int prevCsbf = 0; prevCsbf < 4; prevCsbf++)
  ------------------
  |  Branch (2013:30): [True: 32, False: 8]
  ------------------
 2014|     32|        ctxIdxLookup[0][cIdx][scanIdx][prevCsbf] = p;
 2015|       |
 2016|      4|    p += 4 * 4;
 2017|      4|  }
 2018|       |
 2019|       |  // 8x8
 2020|       |
 2021|      6|  for (int cIdx = 0; cIdx < 2; cIdx++)
  ------------------
  |  Branch (2021:22): [True: 4, False: 2]
  ------------------
 2022|     12|    for (int scanIdx = 0; scanIdx < 2; scanIdx++)
  ------------------
  |  Branch (2022:27): [True: 8, False: 4]
  ------------------
 2023|     40|      for (int prevCsbf = 0; prevCsbf < 4; prevCsbf++) {
  ------------------
  |  Branch (2023:30): [True: 32, False: 8]
  ------------------
 2024|     32|        ctxIdxLookup[1][cIdx][scanIdx][prevCsbf] = p;
 2025|     32|        p += 8 * 8;
 2026|     32|      }
 2027|       |
 2028|       |  // 16x16
 2029|       |
 2030|      6|  for (int cIdx = 0; cIdx < 2; cIdx++)
  ------------------
  |  Branch (2030:22): [True: 4, False: 2]
  ------------------
 2031|     20|    for (int prevCsbf = 0; prevCsbf < 4; prevCsbf++) {
  ------------------
  |  Branch (2031:28): [True: 16, False: 4]
  ------------------
 2032|     48|      for (int scanIdx = 0; scanIdx < 2; scanIdx++) {
  ------------------
  |  Branch (2032:29): [True: 32, False: 16]
  ------------------
 2033|     32|        ctxIdxLookup[2][cIdx][scanIdx][prevCsbf] = p;
 2034|     32|      }
 2035|       |
 2036|     16|      p += 16 * 16;
 2037|     16|    }
 2038|       |
 2039|       |  // 32x32
 2040|       |
 2041|      6|  for (int cIdx = 0; cIdx < 2; cIdx++)
  ------------------
  |  Branch (2041:22): [True: 4, False: 2]
  ------------------
 2042|     20|    for (int prevCsbf = 0; prevCsbf < 4; prevCsbf++) {
  ------------------
  |  Branch (2042:28): [True: 16, False: 4]
  ------------------
 2043|     48|      for (int scanIdx = 0; scanIdx < 2; scanIdx++) {
  ------------------
  |  Branch (2043:29): [True: 32, False: 16]
  ------------------
 2044|     32|        ctxIdxLookup[3][cIdx][scanIdx][prevCsbf] = p;
 2045|     32|      }
 2046|       |
 2047|     16|      p += 32 * 32;
 2048|     16|    }
 2049|       |
 2050|       |
 2051|       |  // --- precompute ctxIdx tables ---
 2052|       |
 2053|     10|  for (int log2w = 2; log2w <= 5; log2w++)
  ------------------
  |  Branch (2053:23): [True: 8, False: 2]
  ------------------
 2054|     24|    for (int cIdx = 0; cIdx < 2; cIdx++)
  ------------------
  |  Branch (2054:24): [True: 16, False: 8]
  ------------------
 2055|     48|      for (int scanIdx = 0; scanIdx < 2; scanIdx++)
  ------------------
  |  Branch (2055:29): [True: 32, False: 16]
  ------------------
 2056|    160|        for (int prevCsbf = 0; prevCsbf < 4; prevCsbf++) {
  ------------------
  |  Branch (2056:32): [True: 128, False: 32]
  ------------------
 2057|  2.04k|          for (int yC = 0; yC < (1 << log2w); yC++)
  ------------------
  |  Branch (2057:28): [True: 1.92k, False: 128]
  ------------------
 2058|  45.4k|            for (int xC = 0; xC < (1 << log2w); xC++) {
  ------------------
  |  Branch (2058:30): [True: 43.5k, False: 1.92k]
  ------------------
 2059|  43.5k|              int w = 1 << log2w;
 2060|  43.5k|              int sbWidth = w >> 2;
 2061|       |
 2062|  43.5k|              int sigCtx;
 2063|       |
 2064|       |              // if log2TrafoSize==2
 2065|  43.5k|              if (sbWidth == 1) {
  ------------------
  |  Branch (2065:19): [True: 512, False: 43.0k]
  ------------------
 2066|    512|                sigCtx = ctxIdxMap[(yC << 2) + xC];
 2067|    512|              }
 2068|  43.0k|              else if (xC + yC == 0) {
  ------------------
  |  Branch (2068:24): [True: 96, False: 42.9k]
  ------------------
 2069|     96|                sigCtx = 0;
 2070|     96|              }
 2071|  42.9k|              else {
 2072|  42.9k|                int xS = xC >> 2;
 2073|  42.9k|                int yS = yC >> 2;
 2074|       |                /*
 2075|       |                  int prevCsbf = 0;
 2076|       |
 2077|       |                  if (xS < sbWidth-1) { prevCsbf += coded_sub_block_flag[xS+1  +yS*sbWidth];    }
 2078|       |                  if (yS < sbWidth-1) { prevCsbf += coded_sub_block_flag[xS+(1+yS)*sbWidth]<<1; }
 2079|       |                */
 2080|  42.9k|                int xP = xC & 3;
 2081|  42.9k|                int yP = yC & 3;
 2082|       |
 2083|       |                //logtrace(LogSlice,"posInSubset: %d,%d\n",xP,yP);
 2084|       |                //logtrace(LogSlice,"prevCsbf: %d\n",prevCsbf);
 2085|       |
 2086|  42.9k|                switch (prevCsbf) {
 2087|  10.7k|                  case 0:
  ------------------
  |  Branch (2087:19): [True: 10.7k, False: 32.1k]
  ------------------
 2088|  10.7k|                    sigCtx = (xP + yP >= 3) ? 0 : (xP + yP > 0) ? 1 : 2;
  ------------------
  |  Branch (2088:30): [True: 6.72k, False: 4.00k]
  |  Branch (2088:51): [True: 3.36k, False: 648]
  ------------------
 2089|  10.7k|                    break;
 2090|  10.7k|                  case 1:
  ------------------
  |  Branch (2090:19): [True: 10.7k, False: 32.1k]
  ------------------
 2091|  10.7k|                    sigCtx = (yP == 0) ? 2 : (yP == 1) ? 1 : 0;
  ------------------
  |  Branch (2091:30): [True: 2.66k, False: 8.06k]
  |  Branch (2091:46): [True: 2.68k, False: 5.37k]
  ------------------
 2092|  10.7k|                    break;
 2093|  10.7k|                  case 2:
  ------------------
  |  Branch (2093:19): [True: 10.7k, False: 32.1k]
  ------------------
 2094|  10.7k|                    sigCtx = (xP == 0) ? 2 : (xP == 1) ? 1 : 0;
  ------------------
  |  Branch (2094:30): [True: 2.66k, False: 8.06k]
  |  Branch (2094:46): [True: 2.68k, False: 5.37k]
  ------------------
 2095|  10.7k|                    break;
 2096|  10.7k|                  default:
  ------------------
  |  Branch (2096:19): [True: 10.7k, False: 32.1k]
  ------------------
 2097|  10.7k|                    sigCtx = 2;
 2098|  10.7k|                    break;
 2099|  42.9k|                }
 2100|       |
 2101|       |                //logtrace(LogSlice,"a) sigCtx=%d\n",sigCtx);
 2102|       |
 2103|  42.9k|                if (cIdx == 0) {
  ------------------
  |  Branch (2103:21): [True: 21.4k, False: 21.4k]
  ------------------
 2104|  21.4k|                  if (xS + yS > 0) sigCtx += 3;
  ------------------
  |  Branch (2104:23): [True: 20.7k, False: 720]
  ------------------
 2105|       |
 2106|       |                  //logtrace(LogSlice,"b) sigCtx=%d\n",sigCtx);
 2107|       |
 2108|       |                  // if log2TrafoSize==3
 2109|  21.4k|                  if (sbWidth == 2) {
  ------------------
  |  Branch (2109:23): [True: 1.00k, False: 20.4k]
  ------------------
 2110|       |                    // 8x8 block
 2111|  1.00k|                    sigCtx += (scanIdx == 0) ? 9 : 15;
  ------------------
  |  Branch (2111:31): [True: 504, False: 504]
  ------------------
 2112|  1.00k|                  }
 2113|  20.4k|                  else {
 2114|  20.4k|                    sigCtx += 21;
 2115|  20.4k|                  }
 2116|       |
 2117|       |                  //logtrace(LogSlice,"c) sigCtx=%d\n",sigCtx);
 2118|  21.4k|                }
 2119|  21.4k|                else {
 2120|       |                  // if log2TrafoSize==3
 2121|  21.4k|                  if (sbWidth == 2) {
  ------------------
  |  Branch (2121:23): [True: 1.00k, False: 20.4k]
  ------------------
 2122|       |                    // 8x8 block
 2123|  1.00k|                    sigCtx += 9;
 2124|  1.00k|                  }
 2125|  20.4k|                  else {
 2126|  20.4k|                    sigCtx += 12;
 2127|  20.4k|                  }
 2128|  21.4k|                }
 2129|  42.9k|              }
 2130|       |
 2131|  43.5k|              int ctxIdxInc;
 2132|  43.5k|              if (cIdx == 0) { ctxIdxInc = sigCtx; }
  ------------------
  |  Branch (2132:19): [True: 21.7k, False: 21.7k]
  ------------------
 2133|  21.7k|              else { ctxIdxInc = 27 + sigCtx; }
 2134|       |
 2135|  43.5k|              if (ctxIdxLookup[log2w - 2][cIdx][scanIdx][prevCsbf][xC + (yC << log2w)] != 0xFF) {
  ------------------
  |  Branch (2135:19): [True: 20.9k, False: 22.5k]
  ------------------
 2136|  20.9k|                assert(ctxIdxLookup[log2w-2][cIdx][scanIdx][prevCsbf][xC+(yC<<log2w)] == ctxIdxInc);
  ------------------
  |  Branch (2136:17): [True: 20.9k, False: 0]
  ------------------
 2137|  20.9k|              }
 2138|       |
 2139|  43.5k|              ctxIdxLookup[log2w - 2][cIdx][scanIdx][prevCsbf][xC + (yC << log2w)] = ctxIdxInc;
 2140|       |
 2141|       |              //NOTE: when using this option, we have to include all three scanIdx in the table
 2142|       |              //ctxIdxLookup[log2w-2][cIdx][scanIdx][prevCsbf][s] = ctxIdxInc;
 2143|  43.5k|            }
 2144|    128|        }
 2145|       |
 2146|      2|  return true;
 2147|      2|}

ojph_block_common.cpp:_ZN4ojph5localL15vlc_init_tablesEv:
  125|      2|    {
  126|      2|      const bool debug = false; //useful for checking 
  127|       |
  128|       |      //Data in the table is arranged in this format (taken from the standard)
  129|       |      // c_q is the context for a quad
  130|       |      // rho is the significance pattern for a quad
  131|       |      // u_off indicate if u value is 0 (u_off is 0), or communicated
  132|       |      // e_k, e_1 EMB patterns
  133|       |      // cwd VLC codeword
  134|       |      // cwd VLC codeword length
  135|      2|      struct vlc_src_table { int c_q, rho, u_off, e_k, e_1, cwd, cwd_len; };
  136|       |      // initial quad rows
  137|      2|      vlc_src_table tbl0[] = {
  138|      2|    #include "table0.h"
  ------------------
  |  |    1|      2|{0, 0x1, 0x0, 0x0, 0x0, 0x06, 4},
  |  |    2|      2|{0, 0x1, 0x1, 0x1, 0x1, 0x3F, 7},
  |  |    3|      2|{0, 0x2, 0x0, 0x0, 0x0, 0x00, 3},
  |  |    4|      2|{0, 0x2, 0x1, 0x2, 0x2, 0x7F, 7},
  |  |    5|      2|{0, 0x3, 0x0, 0x0, 0x0, 0x11, 5},
  |  |    6|      2|{0, 0x3, 0x1, 0x2, 0x2, 0x5F, 7},
  |  |    7|      2|{0, 0x3, 0x1, 0x3, 0x1, 0x1F, 7},
  |  |    8|      2|{0, 0x4, 0x0, 0x0, 0x0, 0x02, 3},
  |  |    9|      2|{0, 0x4, 0x1, 0x4, 0x4, 0x13, 6},
  |  |   10|      2|{0, 0x5, 0x0, 0x0, 0x0, 0x0E, 5},
  |  |   11|      2|{0, 0x5, 0x1, 0x4, 0x4, 0x23, 6},
  |  |   12|      2|{0, 0x5, 0x1, 0x5, 0x1, 0x0F, 7},
  |  |   13|      2|{0, 0x6, 0x0, 0x0, 0x0, 0x03, 6},
  |  |   14|      2|{0, 0x6, 0x1, 0x0, 0x0, 0x6F, 7},
  |  |   15|      2|{0, 0x7, 0x0, 0x0, 0x0, 0x2F, 7},
  |  |   16|      2|{0, 0x7, 0x1, 0x2, 0x2, 0x4F, 7},
  |  |   17|      2|{0, 0x7, 0x1, 0x2, 0x0, 0x0D, 6},
  |  |   18|      2|{0, 0x8, 0x0, 0x0, 0x0, 0x04, 3},
  |  |   19|      2|{0, 0x8, 0x1, 0x8, 0x8, 0x3D, 6},
  |  |   20|      2|{0, 0x9, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |   21|      2|{0, 0x9, 0x1, 0x0, 0x0, 0x2D, 6},
  |  |   22|      2|{0, 0xA, 0x0, 0x0, 0x0, 0x01, 5},
  |  |   23|      2|{0, 0xA, 0x1, 0x8, 0x8, 0x35, 6},
  |  |   24|      2|{0, 0xA, 0x1, 0xA, 0x2, 0x77, 7},
  |  |   25|      2|{0, 0xB, 0x0, 0x0, 0x0, 0x37, 7},
  |  |   26|      2|{0, 0xB, 0x1, 0x1, 0x1, 0x57, 7},
  |  |   27|      2|{0, 0xB, 0x1, 0x1, 0x0, 0x09, 6},
  |  |   28|      2|{0, 0xC, 0x0, 0x0, 0x0, 0x1E, 5},
  |  |   29|      2|{0, 0xC, 0x1, 0xC, 0xC, 0x17, 7},
  |  |   30|      2|{0, 0xC, 0x1, 0xC, 0x4, 0x15, 6},
  |  |   31|      2|{0, 0xC, 0x1, 0xC, 0x8, 0x25, 6},
  |  |   32|      2|{0, 0xD, 0x0, 0x0, 0x0, 0x67, 7},
  |  |   33|      2|{0, 0xD, 0x1, 0x1, 0x1, 0x27, 7},
  |  |   34|      2|{0, 0xD, 0x1, 0x5, 0x4, 0x47, 7},
  |  |   35|      2|{0, 0xD, 0x1, 0xD, 0x8, 0x07, 7},
  |  |   36|      2|{0, 0xE, 0x0, 0x0, 0x0, 0x7B, 7},
  |  |   37|      2|{0, 0xE, 0x1, 0x2, 0x2, 0x4B, 7},
  |  |   38|      2|{0, 0xE, 0x1, 0xA, 0x8, 0x05, 6},
  |  |   39|      2|{0, 0xE, 0x1, 0xE, 0x4, 0x3B, 7},
  |  |   40|      2|{0, 0xF, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |   41|      2|{0, 0xF, 0x1, 0x9, 0x9, 0x1B, 7},
  |  |   42|      2|{0, 0xF, 0x1, 0xB, 0xA, 0x6B, 7},
  |  |   43|      2|{0, 0xF, 0x1, 0xF, 0xC, 0x2B, 7},
  |  |   44|      2|{0, 0xF, 0x1, 0xF, 0x8, 0x39, 6},
  |  |   45|      2|{0, 0xF, 0x1, 0xE, 0x6, 0x73, 7},
  |  |   46|      2|{0, 0xF, 0x1, 0xE, 0x2, 0x19, 6},
  |  |   47|      2|{0, 0xF, 0x1, 0xF, 0x5, 0x0B, 7},
  |  |   48|      2|{0, 0xF, 0x1, 0xF, 0x4, 0x29, 6},
  |  |   49|      2|{0, 0xF, 0x1, 0xF, 0x1, 0x33, 7},
  |  |   50|      2|{1, 0x0, 0x0, 0x0, 0x0, 0x00, 2},
  |  |   51|      2|{1, 0x1, 0x0, 0x0, 0x0, 0x0E, 4},
  |  |   52|      2|{1, 0x1, 0x1, 0x1, 0x1, 0x1F, 7},
  |  |   53|      2|{1, 0x2, 0x0, 0x0, 0x0, 0x06, 4},
  |  |   54|      2|{1, 0x2, 0x1, 0x2, 0x2, 0x3B, 6},
  |  |   55|      2|{1, 0x3, 0x0, 0x0, 0x0, 0x1B, 6},
  |  |   56|      2|{1, 0x3, 0x1, 0x0, 0x0, 0x3D, 6},
  |  |   57|      2|{1, 0x4, 0x0, 0x0, 0x0, 0x0A, 4},
  |  |   58|      2|{1, 0x4, 0x1, 0x4, 0x4, 0x2B, 6},
  |  |   59|      2|{1, 0x5, 0x0, 0x0, 0x0, 0x0B, 6},
  |  |   60|      2|{1, 0x5, 0x1, 0x4, 0x4, 0x33, 6},
  |  |   61|      2|{1, 0x5, 0x1, 0x5, 0x1, 0x7F, 7},
  |  |   62|      2|{1, 0x6, 0x0, 0x0, 0x0, 0x13, 6},
  |  |   63|      2|{1, 0x6, 0x1, 0x0, 0x0, 0x23, 6},
  |  |   64|      2|{1, 0x7, 0x0, 0x0, 0x0, 0x3F, 7},
  |  |   65|      2|{1, 0x7, 0x1, 0x2, 0x2, 0x5F, 7},
  |  |   66|      2|{1, 0x7, 0x1, 0x2, 0x0, 0x03, 6},
  |  |   67|      2|{1, 0x8, 0x0, 0x0, 0x0, 0x02, 4},
  |  |   68|      2|{1, 0x8, 0x1, 0x8, 0x8, 0x1D, 6},
  |  |   69|      2|{1, 0x9, 0x0, 0x0, 0x0, 0x2D, 6},
  |  |   70|      2|{1, 0x9, 0x1, 0x0, 0x0, 0x0D, 6},
  |  |   71|      2|{1, 0xA, 0x0, 0x0, 0x0, 0x35, 6},
  |  |   72|      2|{1, 0xA, 0x1, 0x8, 0x8, 0x15, 6},
  |  |   73|      2|{1, 0xA, 0x1, 0xA, 0x2, 0x6F, 7},
  |  |   74|      2|{1, 0xB, 0x0, 0x0, 0x0, 0x2F, 7},
  |  |   75|      2|{1, 0xB, 0x1, 0x1, 0x1, 0x4F, 7},
  |  |   76|      2|{1, 0xB, 0x1, 0x1, 0x0, 0x11, 6},
  |  |   77|      2|{1, 0xC, 0x0, 0x0, 0x0, 0x01, 5},
  |  |   78|      2|{1, 0xC, 0x1, 0x8, 0x8, 0x25, 6},
  |  |   79|      2|{1, 0xC, 0x1, 0xC, 0x4, 0x05, 6},
  |  |   80|      2|{1, 0xD, 0x0, 0x0, 0x0, 0x0F, 7},
  |  |   81|      2|{1, 0xD, 0x1, 0x1, 0x1, 0x17, 7},
  |  |   82|      2|{1, 0xD, 0x1, 0x5, 0x4, 0x39, 6},
  |  |   83|      2|{1, 0xD, 0x1, 0xD, 0x8, 0x77, 7},
  |  |   84|      2|{1, 0xE, 0x0, 0x0, 0x0, 0x37, 7},
  |  |   85|      2|{1, 0xE, 0x1, 0x2, 0x2, 0x57, 7},
  |  |   86|      2|{1, 0xE, 0x1, 0xA, 0x8, 0x19, 6},
  |  |   87|      2|{1, 0xE, 0x1, 0xE, 0x4, 0x67, 7},
  |  |   88|      2|{1, 0xF, 0x0, 0x0, 0x0, 0x07, 7},
  |  |   89|      2|{1, 0xF, 0x1, 0xB, 0x8, 0x29, 6},
  |  |   90|      2|{1, 0xF, 0x1, 0x8, 0x8, 0x27, 7},
  |  |   91|      2|{1, 0xF, 0x1, 0xA, 0x2, 0x09, 6},
  |  |   92|      2|{1, 0xF, 0x1, 0xE, 0x4, 0x31, 6},
  |  |   93|      2|{1, 0xF, 0x1, 0xF, 0x1, 0x47, 7},
  |  |   94|      2|{2, 0x0, 0x0, 0x0, 0x0, 0x00, 2},
  |  |   95|      2|{2, 0x1, 0x0, 0x0, 0x0, 0x0E, 4},
  |  |   96|      2|{2, 0x1, 0x1, 0x1, 0x1, 0x1B, 6},
  |  |   97|      2|{2, 0x2, 0x0, 0x0, 0x0, 0x06, 4},
  |  |   98|      2|{2, 0x2, 0x1, 0x2, 0x2, 0x3F, 7},
  |  |   99|      2|{2, 0x3, 0x0, 0x0, 0x0, 0x2B, 6},
  |  |  100|      2|{2, 0x3, 0x1, 0x1, 0x1, 0x33, 6},
  |  |  101|      2|{2, 0x3, 0x1, 0x3, 0x2, 0x7F, 7},
  |  |  102|      2|{2, 0x4, 0x0, 0x0, 0x0, 0x0A, 4},
  |  |  103|      2|{2, 0x4, 0x1, 0x4, 0x4, 0x0B, 6},
  |  |  104|      2|{2, 0x5, 0x0, 0x0, 0x0, 0x01, 5},
  |  |  105|      2|{2, 0x5, 0x1, 0x5, 0x5, 0x2F, 7},
  |  |  106|      2|{2, 0x5, 0x1, 0x5, 0x1, 0x13, 6},
  |  |  107|      2|{2, 0x5, 0x1, 0x5, 0x4, 0x23, 6},
  |  |  108|      2|{2, 0x6, 0x0, 0x0, 0x0, 0x03, 6},
  |  |  109|      2|{2, 0x6, 0x1, 0x0, 0x0, 0x5F, 7},
  |  |  110|      2|{2, 0x7, 0x0, 0x0, 0x0, 0x1F, 7},
  |  |  111|      2|{2, 0x7, 0x1, 0x2, 0x2, 0x6F, 7},
  |  |  112|      2|{2, 0x7, 0x1, 0x3, 0x1, 0x11, 6},
  |  |  113|      2|{2, 0x7, 0x1, 0x7, 0x4, 0x37, 7},
  |  |  114|      2|{2, 0x8, 0x0, 0x0, 0x0, 0x02, 4},
  |  |  115|      2|{2, 0x8, 0x1, 0x8, 0x8, 0x4F, 7},
  |  |  116|      2|{2, 0x9, 0x0, 0x0, 0x0, 0x3D, 6},
  |  |  117|      2|{2, 0x9, 0x1, 0x0, 0x0, 0x1D, 6},
  |  |  118|      2|{2, 0xA, 0x0, 0x0, 0x0, 0x2D, 6},
  |  |  119|      2|{2, 0xA, 0x1, 0x0, 0x0, 0x0D, 6},
  |  |  120|      2|{2, 0xB, 0x0, 0x0, 0x0, 0x0F, 7},
  |  |  121|      2|{2, 0xB, 0x1, 0x2, 0x2, 0x77, 7},
  |  |  122|      2|{2, 0xB, 0x1, 0x2, 0x0, 0x35, 6},
  |  |  123|      2|{2, 0xC, 0x0, 0x0, 0x0, 0x15, 6},
  |  |  124|      2|{2, 0xC, 0x1, 0x4, 0x4, 0x25, 6},
  |  |  125|      2|{2, 0xC, 0x1, 0xC, 0x8, 0x57, 7},
  |  |  126|      2|{2, 0xD, 0x0, 0x0, 0x0, 0x17, 7},
  |  |  127|      2|{2, 0xD, 0x1, 0x8, 0x8, 0x05, 6},
  |  |  128|      2|{2, 0xD, 0x1, 0xC, 0x4, 0x39, 6},
  |  |  129|      2|{2, 0xD, 0x1, 0xD, 0x1, 0x67, 7},
  |  |  130|      2|{2, 0xE, 0x0, 0x0, 0x0, 0x27, 7},
  |  |  131|      2|{2, 0xE, 0x1, 0x2, 0x2, 0x7B, 7},
  |  |  132|      2|{2, 0xE, 0x1, 0x2, 0x0, 0x19, 6},
  |  |  133|      2|{2, 0xF, 0x0, 0x0, 0x0, 0x47, 7},
  |  |  134|      2|{2, 0xF, 0x1, 0xF, 0x1, 0x29, 6},
  |  |  135|      2|{2, 0xF, 0x1, 0x1, 0x1, 0x09, 6},
  |  |  136|      2|{2, 0xF, 0x1, 0x3, 0x2, 0x07, 7},
  |  |  137|      2|{2, 0xF, 0x1, 0x7, 0x4, 0x31, 6},
  |  |  138|      2|{2, 0xF, 0x1, 0xF, 0x8, 0x3B, 7},
  |  |  139|      2|{3, 0x0, 0x0, 0x0, 0x0, 0x00, 3},
  |  |  140|      2|{3, 0x1, 0x0, 0x0, 0x0, 0x04, 4},
  |  |  141|      2|{3, 0x1, 0x1, 0x1, 0x1, 0x3D, 6},
  |  |  142|      2|{3, 0x2, 0x0, 0x0, 0x0, 0x0C, 5},
  |  |  143|      2|{3, 0x2, 0x1, 0x2, 0x2, 0x4F, 7},
  |  |  144|      2|{3, 0x3, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |  145|      2|{3, 0x3, 0x1, 0x1, 0x1, 0x05, 6},
  |  |  146|      2|{3, 0x3, 0x1, 0x3, 0x2, 0x7F, 7},
  |  |  147|      2|{3, 0x4, 0x0, 0x0, 0x0, 0x16, 5},
  |  |  148|      2|{3, 0x4, 0x1, 0x4, 0x4, 0x2D, 6},
  |  |  149|      2|{3, 0x5, 0x0, 0x0, 0x0, 0x06, 5},
  |  |  150|      2|{3, 0x5, 0x1, 0x5, 0x5, 0x1A, 5},
  |  |  151|      2|{3, 0x5, 0x1, 0x5, 0x1, 0x0D, 6},
  |  |  152|      2|{3, 0x5, 0x1, 0x5, 0x4, 0x35, 6},
  |  |  153|      2|{3, 0x6, 0x0, 0x0, 0x0, 0x3F, 7},
  |  |  154|      2|{3, 0x6, 0x1, 0x4, 0x4, 0x5F, 7},
  |  |  155|      2|{3, 0x6, 0x1, 0x6, 0x2, 0x1F, 7},
  |  |  156|      2|{3, 0x7, 0x0, 0x0, 0x0, 0x6F, 7},
  |  |  157|      2|{3, 0x7, 0x1, 0x6, 0x6, 0x2F, 7},
  |  |  158|      2|{3, 0x7, 0x1, 0x6, 0x4, 0x15, 6},
  |  |  159|      2|{3, 0x7, 0x1, 0x7, 0x3, 0x77, 7},
  |  |  160|      2|{3, 0x7, 0x1, 0x7, 0x1, 0x25, 6},
  |  |  161|      2|{3, 0x7, 0x1, 0x7, 0x2, 0x0F, 7},
  |  |  162|      2|{3, 0x8, 0x0, 0x0, 0x0, 0x0A, 5},
  |  |  163|      2|{3, 0x8, 0x1, 0x8, 0x8, 0x07, 7},
  |  |  164|      2|{3, 0x9, 0x0, 0x0, 0x0, 0x39, 6},
  |  |  165|      2|{3, 0x9, 0x1, 0x1, 0x1, 0x37, 7},
  |  |  166|      2|{3, 0x9, 0x1, 0x9, 0x8, 0x57, 7},
  |  |  167|      2|{3, 0xA, 0x0, 0x0, 0x0, 0x19, 6},
  |  |  168|      2|{3, 0xA, 0x1, 0x8, 0x8, 0x29, 6},
  |  |  169|      2|{3, 0xA, 0x1, 0xA, 0x2, 0x17, 7},
  |  |  170|      2|{3, 0xB, 0x0, 0x0, 0x0, 0x67, 7},
  |  |  171|      2|{3, 0xB, 0x1, 0xB, 0x1, 0x27, 7},
  |  |  172|      2|{3, 0xB, 0x1, 0x1, 0x1, 0x47, 7},
  |  |  173|      2|{3, 0xB, 0x1, 0x3, 0x2, 0x09, 6},
  |  |  174|      2|{3, 0xB, 0x1, 0xB, 0x8, 0x7B, 7},
  |  |  175|      2|{3, 0xC, 0x0, 0x0, 0x0, 0x31, 6},
  |  |  176|      2|{3, 0xC, 0x1, 0x4, 0x4, 0x11, 6},
  |  |  177|      2|{3, 0xC, 0x1, 0xC, 0x8, 0x3B, 7},
  |  |  178|      2|{3, 0xD, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |  179|      2|{3, 0xD, 0x1, 0x9, 0x9, 0x1B, 7},
  |  |  180|      2|{3, 0xD, 0x1, 0xD, 0x5, 0x2B, 7},
  |  |  181|      2|{3, 0xD, 0x1, 0xD, 0x1, 0x21, 6},
  |  |  182|      2|{3, 0xD, 0x1, 0xD, 0xC, 0x6B, 7},
  |  |  183|      2|{3, 0xD, 0x1, 0xD, 0x4, 0x01, 6},
  |  |  184|      2|{3, 0xD, 0x1, 0xD, 0x8, 0x4B, 7},
  |  |  185|      2|{3, 0xE, 0x0, 0x0, 0x0, 0x0B, 7},
  |  |  186|      2|{3, 0xE, 0x1, 0xE, 0x4, 0x73, 7},
  |  |  187|      2|{3, 0xE, 0x1, 0x4, 0x4, 0x13, 7},
  |  |  188|      2|{3, 0xE, 0x1, 0xC, 0x8, 0x3E, 6},
  |  |  189|      2|{3, 0xE, 0x1, 0xE, 0x2, 0x33, 7},
  |  |  190|      2|{3, 0xF, 0x0, 0x0, 0x0, 0x53, 7},
  |  |  191|      2|{3, 0xF, 0x1, 0xA, 0xA, 0x0E, 6},
  |  |  192|      2|{3, 0xF, 0x1, 0xB, 0x9, 0x63, 7},
  |  |  193|      2|{3, 0xF, 0x1, 0xF, 0xC, 0x03, 7},
  |  |  194|      2|{3, 0xF, 0x1, 0xF, 0x8, 0x12, 5},
  |  |  195|      2|{3, 0xF, 0x1, 0xE, 0x6, 0x23, 7},
  |  |  196|      2|{3, 0xF, 0x1, 0xF, 0x5, 0x1E, 6},
  |  |  197|      2|{3, 0xF, 0x1, 0xF, 0x4, 0x02, 5},
  |  |  198|      2|{3, 0xF, 0x1, 0xF, 0x3, 0x43, 7},
  |  |  199|      2|{3, 0xF, 0x1, 0xF, 0x1, 0x1C, 5},
  |  |  200|      2|{3, 0xF, 0x1, 0xF, 0x2, 0x2E, 6},
  |  |  201|      2|{4, 0x0, 0x0, 0x0, 0x0, 0x00, 2},
  |  |  202|      2|{4, 0x1, 0x0, 0x0, 0x0, 0x0E, 4},
  |  |  203|      2|{4, 0x1, 0x1, 0x1, 0x1, 0x3F, 7},
  |  |  204|      2|{4, 0x2, 0x0, 0x0, 0x0, 0x06, 4},
  |  |  205|      2|{4, 0x2, 0x1, 0x2, 0x2, 0x1B, 6},
  |  |  206|      2|{4, 0x3, 0x0, 0x0, 0x0, 0x2B, 6},
  |  |  207|      2|{4, 0x3, 0x1, 0x2, 0x2, 0x3D, 6},
  |  |  208|      2|{4, 0x3, 0x1, 0x3, 0x1, 0x7F, 7},
  |  |  209|      2|{4, 0x4, 0x0, 0x0, 0x0, 0x0A, 4},
  |  |  210|      2|{4, 0x4, 0x1, 0x4, 0x4, 0x5F, 7},
  |  |  211|      2|{4, 0x5, 0x0, 0x0, 0x0, 0x0B, 6},
  |  |  212|      2|{4, 0x5, 0x1, 0x0, 0x0, 0x33, 6},
  |  |  213|      2|{4, 0x6, 0x0, 0x0, 0x0, 0x13, 6},
  |  |  214|      2|{4, 0x6, 0x1, 0x0, 0x0, 0x23, 6},
  |  |  215|      2|{4, 0x7, 0x0, 0x0, 0x0, 0x1F, 7},
  |  |  216|      2|{4, 0x7, 0x1, 0x4, 0x4, 0x6F, 7},
  |  |  217|      2|{4, 0x7, 0x1, 0x4, 0x0, 0x03, 6},
  |  |  218|      2|{4, 0x8, 0x0, 0x0, 0x0, 0x02, 4},
  |  |  219|      2|{4, 0x8, 0x1, 0x8, 0x8, 0x1D, 6},
  |  |  220|      2|{4, 0x9, 0x0, 0x0, 0x0, 0x11, 6},
  |  |  221|      2|{4, 0x9, 0x1, 0x0, 0x0, 0x77, 7},
  |  |  222|      2|{4, 0xA, 0x0, 0x0, 0x0, 0x01, 5},
  |  |  223|      2|{4, 0xA, 0x1, 0xA, 0xA, 0x2F, 7},
  |  |  224|      2|{4, 0xA, 0x1, 0xA, 0x2, 0x2D, 6},
  |  |  225|      2|{4, 0xA, 0x1, 0xA, 0x8, 0x0D, 6},
  |  |  226|      2|{4, 0xB, 0x0, 0x0, 0x0, 0x4F, 7},
  |  |  227|      2|{4, 0xB, 0x1, 0xB, 0x2, 0x0F, 7},
  |  |  228|      2|{4, 0xB, 0x1, 0x0, 0x0, 0x35, 6},
  |  |  229|      2|{4, 0xC, 0x0, 0x0, 0x0, 0x15, 6},
  |  |  230|      2|{4, 0xC, 0x1, 0x8, 0x8, 0x25, 6},
  |  |  231|      2|{4, 0xC, 0x1, 0xC, 0x4, 0x37, 7},
  |  |  232|      2|{4, 0xD, 0x0, 0x0, 0x0, 0x57, 7},
  |  |  233|      2|{4, 0xD, 0x1, 0x1, 0x1, 0x07, 7},
  |  |  234|      2|{4, 0xD, 0x1, 0x1, 0x0, 0x05, 6},
  |  |  235|      2|{4, 0xE, 0x0, 0x0, 0x0, 0x17, 7},
  |  |  236|      2|{4, 0xE, 0x1, 0x4, 0x4, 0x39, 6},
  |  |  237|      2|{4, 0xE, 0x1, 0xC, 0x8, 0x19, 6},
  |  |  238|      2|{4, 0xE, 0x1, 0xE, 0x2, 0x67, 7},
  |  |  239|      2|{4, 0xF, 0x0, 0x0, 0x0, 0x27, 7},
  |  |  240|      2|{4, 0xF, 0x1, 0x9, 0x9, 0x47, 7},
  |  |  241|      2|{4, 0xF, 0x1, 0x9, 0x1, 0x29, 6},
  |  |  242|      2|{4, 0xF, 0x1, 0x7, 0x6, 0x7B, 7},
  |  |  243|      2|{4, 0xF, 0x1, 0x7, 0x2, 0x09, 6},
  |  |  244|      2|{4, 0xF, 0x1, 0xB, 0x8, 0x31, 6},
  |  |  245|      2|{4, 0xF, 0x1, 0xF, 0x4, 0x3B, 7},
  |  |  246|      2|{5, 0x0, 0x0, 0x0, 0x0, 0x00, 3},
  |  |  247|      2|{5, 0x1, 0x0, 0x0, 0x0, 0x1A, 5},
  |  |  248|      2|{5, 0x1, 0x1, 0x1, 0x1, 0x7F, 7},
  |  |  249|      2|{5, 0x2, 0x0, 0x0, 0x0, 0x0A, 5},
  |  |  250|      2|{5, 0x2, 0x1, 0x2, 0x2, 0x1D, 6},
  |  |  251|      2|{5, 0x3, 0x0, 0x0, 0x0, 0x2D, 6},
  |  |  252|      2|{5, 0x3, 0x1, 0x3, 0x3, 0x5F, 7},
  |  |  253|      2|{5, 0x3, 0x1, 0x3, 0x2, 0x39, 6},
  |  |  254|      2|{5, 0x3, 0x1, 0x3, 0x1, 0x3F, 7},
  |  |  255|      2|{5, 0x4, 0x0, 0x0, 0x0, 0x12, 5},
  |  |  256|      2|{5, 0x4, 0x1, 0x4, 0x4, 0x1F, 7},
  |  |  257|      2|{5, 0x5, 0x0, 0x0, 0x0, 0x0D, 6},
  |  |  258|      2|{5, 0x5, 0x1, 0x4, 0x4, 0x35, 6},
  |  |  259|      2|{5, 0x5, 0x1, 0x5, 0x1, 0x6F, 7},
  |  |  260|      2|{5, 0x6, 0x0, 0x0, 0x0, 0x15, 6},
  |  |  261|      2|{5, 0x6, 0x1, 0x2, 0x2, 0x25, 6},
  |  |  262|      2|{5, 0x6, 0x1, 0x6, 0x4, 0x2F, 7},
  |  |  263|      2|{5, 0x7, 0x0, 0x0, 0x0, 0x4F, 7},
  |  |  264|      2|{5, 0x7, 0x1, 0x6, 0x6, 0x57, 7},
  |  |  265|      2|{5, 0x7, 0x1, 0x6, 0x4, 0x05, 6},
  |  |  266|      2|{5, 0x7, 0x1, 0x7, 0x3, 0x0F, 7},
  |  |  267|      2|{5, 0x7, 0x1, 0x7, 0x2, 0x77, 7},
  |  |  268|      2|{5, 0x7, 0x1, 0x7, 0x1, 0x37, 7},
  |  |  269|      2|{5, 0x8, 0x0, 0x0, 0x0, 0x02, 5},
  |  |  270|      2|{5, 0x8, 0x1, 0x8, 0x8, 0x19, 6},
  |  |  271|      2|{5, 0x9, 0x0, 0x0, 0x0, 0x26, 6},
  |  |  272|      2|{5, 0x9, 0x1, 0x8, 0x8, 0x17, 7},
  |  |  273|      2|{5, 0x9, 0x1, 0x9, 0x1, 0x67, 7},
  |  |  274|      2|{5, 0xA, 0x0, 0x0, 0x0, 0x1C, 5},
  |  |  275|      2|{5, 0xA, 0x1, 0xA, 0xA, 0x29, 6},
  |  |  276|      2|{5, 0xA, 0x1, 0xA, 0x2, 0x09, 6},
  |  |  277|      2|{5, 0xA, 0x1, 0xA, 0x8, 0x31, 6},
  |  |  278|      2|{5, 0xB, 0x0, 0x0, 0x0, 0x27, 7},
  |  |  279|      2|{5, 0xB, 0x1, 0x9, 0x9, 0x07, 7},
  |  |  280|      2|{5, 0xB, 0x1, 0x9, 0x8, 0x11, 6},
  |  |  281|      2|{5, 0xB, 0x1, 0xB, 0x3, 0x47, 7},
  |  |  282|      2|{5, 0xB, 0x1, 0xB, 0x2, 0x21, 6},
  |  |  283|      2|{5, 0xB, 0x1, 0xB, 0x1, 0x7B, 7},
  |  |  284|      2|{5, 0xC, 0x0, 0x0, 0x0, 0x01, 6},
  |  |  285|      2|{5, 0xC, 0x1, 0x8, 0x8, 0x3E, 6},
  |  |  286|      2|{5, 0xC, 0x1, 0xC, 0x4, 0x3B, 7},
  |  |  287|      2|{5, 0xD, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |  288|      2|{5, 0xD, 0x1, 0x9, 0x9, 0x6B, 7},
  |  |  289|      2|{5, 0xD, 0x1, 0x9, 0x8, 0x1E, 6},
  |  |  290|      2|{5, 0xD, 0x1, 0xD, 0x5, 0x1B, 7},
  |  |  291|      2|{5, 0xD, 0x1, 0xD, 0x4, 0x2E, 6},
  |  |  292|      2|{5, 0xD, 0x1, 0xD, 0x1, 0x2B, 7},
  |  |  293|      2|{5, 0xE, 0x0, 0x0, 0x0, 0x4B, 7},
  |  |  294|      2|{5, 0xE, 0x1, 0x6, 0x6, 0x0B, 7},
  |  |  295|      2|{5, 0xE, 0x1, 0xE, 0xA, 0x33, 7},
  |  |  296|      2|{5, 0xE, 0x1, 0xE, 0x2, 0x0E, 6},
  |  |  297|      2|{5, 0xE, 0x1, 0xE, 0xC, 0x73, 7},
  |  |  298|      2|{5, 0xE, 0x1, 0xE, 0x8, 0x36, 6},
  |  |  299|      2|{5, 0xE, 0x1, 0xE, 0x4, 0x53, 7},
  |  |  300|      2|{5, 0xF, 0x0, 0x0, 0x0, 0x13, 7},
  |  |  301|      2|{5, 0xF, 0x1, 0x7, 0x7, 0x43, 7},
  |  |  302|      2|{5, 0xF, 0x1, 0x7, 0x6, 0x16, 6},
  |  |  303|      2|{5, 0xF, 0x1, 0x7, 0x5, 0x63, 7},
  |  |  304|      2|{5, 0xF, 0x1, 0xF, 0xC, 0x23, 7},
  |  |  305|      2|{5, 0xF, 0x1, 0xF, 0x4, 0x0C, 5},
  |  |  306|      2|{5, 0xF, 0x1, 0xD, 0x9, 0x03, 7},
  |  |  307|      2|{5, 0xF, 0x1, 0xF, 0xA, 0x3D, 7},
  |  |  308|      2|{5, 0xF, 0x1, 0xF, 0x8, 0x14, 5},
  |  |  309|      2|{5, 0xF, 0x1, 0xF, 0x3, 0x7D, 7},
  |  |  310|      2|{5, 0xF, 0x1, 0xF, 0x2, 0x04, 5},
  |  |  311|      2|{5, 0xF, 0x1, 0xF, 0x1, 0x06, 6},
  |  |  312|      2|{6, 0x0, 0x0, 0x0, 0x0, 0x00, 3},
  |  |  313|      2|{6, 0x1, 0x0, 0x0, 0x0, 0x04, 4},
  |  |  314|      2|{6, 0x1, 0x1, 0x1, 0x1, 0x03, 6},
  |  |  315|      2|{6, 0x2, 0x0, 0x0, 0x0, 0x0C, 5},
  |  |  316|      2|{6, 0x2, 0x1, 0x2, 0x2, 0x0D, 6},
  |  |  317|      2|{6, 0x3, 0x0, 0x0, 0x0, 0x1A, 5},
  |  |  318|      2|{6, 0x3, 0x1, 0x3, 0x3, 0x3D, 6},
  |  |  319|      2|{6, 0x3, 0x1, 0x3, 0x1, 0x1D, 6},
  |  |  320|      2|{6, 0x3, 0x1, 0x3, 0x2, 0x2D, 6},
  |  |  321|      2|{6, 0x4, 0x0, 0x0, 0x0, 0x0A, 5},
  |  |  322|      2|{6, 0x4, 0x1, 0x4, 0x4, 0x3F, 7},
  |  |  323|      2|{6, 0x5, 0x0, 0x0, 0x0, 0x35, 6},
  |  |  324|      2|{6, 0x5, 0x1, 0x1, 0x1, 0x15, 6},
  |  |  325|      2|{6, 0x5, 0x1, 0x5, 0x4, 0x7F, 7},
  |  |  326|      2|{6, 0x6, 0x0, 0x0, 0x0, 0x25, 6},
  |  |  327|      2|{6, 0x6, 0x1, 0x2, 0x2, 0x5F, 7},
  |  |  328|      2|{6, 0x6, 0x1, 0x6, 0x4, 0x1F, 7},
  |  |  329|      2|{6, 0x7, 0x0, 0x0, 0x0, 0x6F, 7},
  |  |  330|      2|{6, 0x7, 0x1, 0x6, 0x6, 0x4F, 7},
  |  |  331|      2|{6, 0x7, 0x1, 0x6, 0x4, 0x05, 6},
  |  |  332|      2|{6, 0x7, 0x1, 0x7, 0x3, 0x2F, 7},
  |  |  333|      2|{6, 0x7, 0x1, 0x7, 0x1, 0x36, 6},
  |  |  334|      2|{6, 0x7, 0x1, 0x7, 0x2, 0x77, 7},
  |  |  335|      2|{6, 0x8, 0x0, 0x0, 0x0, 0x12, 5},
  |  |  336|      2|{6, 0x8, 0x1, 0x8, 0x8, 0x0F, 7},
  |  |  337|      2|{6, 0x9, 0x0, 0x0, 0x0, 0x39, 6},
  |  |  338|      2|{6, 0x9, 0x1, 0x1, 0x1, 0x37, 7},
  |  |  339|      2|{6, 0x9, 0x1, 0x9, 0x8, 0x57, 7},
  |  |  340|      2|{6, 0xA, 0x0, 0x0, 0x0, 0x19, 6},
  |  |  341|      2|{6, 0xA, 0x1, 0x2, 0x2, 0x29, 6},
  |  |  342|      2|{6, 0xA, 0x1, 0xA, 0x8, 0x17, 7},
  |  |  343|      2|{6, 0xB, 0x0, 0x0, 0x0, 0x67, 7},
  |  |  344|      2|{6, 0xB, 0x1, 0x9, 0x9, 0x47, 7},
  |  |  345|      2|{6, 0xB, 0x1, 0x9, 0x1, 0x09, 6},
  |  |  346|      2|{6, 0xB, 0x1, 0xB, 0xA, 0x27, 7},
  |  |  347|      2|{6, 0xB, 0x1, 0xB, 0x2, 0x31, 6},
  |  |  348|      2|{6, 0xB, 0x1, 0xB, 0x8, 0x7B, 7},
  |  |  349|      2|{6, 0xC, 0x0, 0x0, 0x0, 0x11, 6},
  |  |  350|      2|{6, 0xC, 0x1, 0xC, 0xC, 0x07, 7},
  |  |  351|      2|{6, 0xC, 0x1, 0xC, 0x8, 0x21, 6},
  |  |  352|      2|{6, 0xC, 0x1, 0xC, 0x4, 0x3B, 7},
  |  |  353|      2|{6, 0xD, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |  354|      2|{6, 0xD, 0x1, 0x5, 0x5, 0x33, 7},
  |  |  355|      2|{6, 0xD, 0x1, 0x5, 0x4, 0x01, 6},
  |  |  356|      2|{6, 0xD, 0x1, 0xC, 0x8, 0x1B, 7},
  |  |  357|      2|{6, 0xD, 0x1, 0xD, 0x1, 0x6B, 7},
  |  |  358|      2|{6, 0xE, 0x0, 0x0, 0x0, 0x2B, 7},
  |  |  359|      2|{6, 0xE, 0x1, 0xE, 0x2, 0x4B, 7},
  |  |  360|      2|{6, 0xE, 0x1, 0x2, 0x2, 0x0B, 7},
  |  |  361|      2|{6, 0xE, 0x1, 0xE, 0xC, 0x73, 7},
  |  |  362|      2|{6, 0xE, 0x1, 0xE, 0x8, 0x3E, 6},
  |  |  363|      2|{6, 0xE, 0x1, 0xE, 0x4, 0x53, 7},
  |  |  364|      2|{6, 0xF, 0x0, 0x0, 0x0, 0x13, 7},
  |  |  365|      2|{6, 0xF, 0x1, 0x6, 0x6, 0x1E, 6},
  |  |  366|      2|{6, 0xF, 0x1, 0xE, 0xA, 0x2E, 6},
  |  |  367|      2|{6, 0xF, 0x1, 0xF, 0x3, 0x0E, 6},
  |  |  368|      2|{6, 0xF, 0x1, 0xF, 0x2, 0x02, 5},
  |  |  369|      2|{6, 0xF, 0x1, 0xB, 0x9, 0x63, 7},
  |  |  370|      2|{6, 0xF, 0x1, 0xF, 0xC, 0x16, 6},
  |  |  371|      2|{6, 0xF, 0x1, 0xF, 0x8, 0x06, 6},
  |  |  372|      2|{6, 0xF, 0x1, 0xF, 0x5, 0x23, 7},
  |  |  373|      2|{6, 0xF, 0x1, 0xF, 0x1, 0x1C, 5},
  |  |  374|      2|{6, 0xF, 0x1, 0xF, 0x4, 0x26, 6},
  |  |  375|      2|{7, 0x0, 0x0, 0x0, 0x0, 0x12, 5},
  |  |  376|      2|{7, 0x1, 0x0, 0x0, 0x0, 0x05, 6},
  |  |  377|      2|{7, 0x1, 0x1, 0x1, 0x1, 0x7F, 7},
  |  |  378|      2|{7, 0x2, 0x0, 0x0, 0x0, 0x39, 6},
  |  |  379|      2|{7, 0x2, 0x1, 0x2, 0x2, 0x3F, 7},
  |  |  380|      2|{7, 0x3, 0x0, 0x0, 0x0, 0x5F, 7},
  |  |  381|      2|{7, 0x3, 0x1, 0x3, 0x3, 0x1F, 7},
  |  |  382|      2|{7, 0x3, 0x1, 0x3, 0x2, 0x6F, 7},
  |  |  383|      2|{7, 0x3, 0x1, 0x3, 0x1, 0x2F, 7},
  |  |  384|      2|{7, 0x4, 0x0, 0x0, 0x0, 0x4F, 7},
  |  |  385|      2|{7, 0x4, 0x1, 0x4, 0x4, 0x0F, 7},
  |  |  386|      2|{7, 0x5, 0x0, 0x0, 0x0, 0x57, 7},
  |  |  387|      2|{7, 0x5, 0x1, 0x1, 0x1, 0x19, 6},
  |  |  388|      2|{7, 0x5, 0x1, 0x5, 0x4, 0x77, 7},
  |  |  389|      2|{7, 0x6, 0x0, 0x0, 0x0, 0x37, 7},
  |  |  390|      2|{7, 0x6, 0x1, 0x0, 0x0, 0x29, 6},
  |  |  391|      2|{7, 0x7, 0x0, 0x0, 0x0, 0x17, 7},
  |  |  392|      2|{7, 0x7, 0x1, 0x6, 0x6, 0x67, 7},
  |  |  393|      2|{7, 0x7, 0x1, 0x7, 0x3, 0x27, 7},
  |  |  394|      2|{7, 0x7, 0x1, 0x7, 0x2, 0x47, 7},
  |  |  395|      2|{7, 0x7, 0x1, 0x7, 0x5, 0x1B, 7},
  |  |  396|      2|{7, 0x7, 0x1, 0x7, 0x1, 0x09, 6},
  |  |  397|      2|{7, 0x7, 0x1, 0x7, 0x4, 0x07, 7},
  |  |  398|      2|{7, 0x8, 0x0, 0x0, 0x0, 0x7B, 7},
  |  |  399|      2|{7, 0x8, 0x1, 0x8, 0x8, 0x3B, 7},
  |  |  400|      2|{7, 0x9, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |  401|      2|{7, 0x9, 0x1, 0x0, 0x0, 0x31, 6},
  |  |  402|      2|{7, 0xA, 0x0, 0x0, 0x0, 0x53, 7},
  |  |  403|      2|{7, 0xA, 0x1, 0x2, 0x2, 0x11, 6},
  |  |  404|      2|{7, 0xA, 0x1, 0xA, 0x8, 0x6B, 7},
  |  |  405|      2|{7, 0xB, 0x0, 0x0, 0x0, 0x2B, 7},
  |  |  406|      2|{7, 0xB, 0x1, 0x9, 0x9, 0x4B, 7},
  |  |  407|      2|{7, 0xB, 0x1, 0xB, 0x3, 0x0B, 7},
  |  |  408|      2|{7, 0xB, 0x1, 0xB, 0x1, 0x73, 7},
  |  |  409|      2|{7, 0xB, 0x1, 0xB, 0xA, 0x33, 7},
  |  |  410|      2|{7, 0xB, 0x1, 0xB, 0x2, 0x21, 6},
  |  |  411|      2|{7, 0xB, 0x1, 0xB, 0x8, 0x13, 7},
  |  |  412|      2|{7, 0xC, 0x0, 0x0, 0x0, 0x63, 7},
  |  |  413|      2|{7, 0xC, 0x1, 0x8, 0x8, 0x23, 7},
  |  |  414|      2|{7, 0xC, 0x1, 0xC, 0x4, 0x43, 7},
  |  |  415|      2|{7, 0xD, 0x0, 0x0, 0x0, 0x03, 7},
  |  |  416|      2|{7, 0xD, 0x1, 0x9, 0x9, 0x7D, 7},
  |  |  417|      2|{7, 0xD, 0x1, 0xD, 0x5, 0x5D, 7},
  |  |  418|      2|{7, 0xD, 0x1, 0xD, 0x1, 0x01, 6},
  |  |  419|      2|{7, 0xD, 0x1, 0xD, 0xC, 0x3D, 7},
  |  |  420|      2|{7, 0xD, 0x1, 0xD, 0x4, 0x3E, 6},
  |  |  421|      2|{7, 0xD, 0x1, 0xD, 0x8, 0x1D, 7},
  |  |  422|      2|{7, 0xE, 0x0, 0x0, 0x0, 0x6D, 7},
  |  |  423|      2|{7, 0xE, 0x1, 0x6, 0x6, 0x2D, 7},
  |  |  424|      2|{7, 0xE, 0x1, 0xE, 0xA, 0x0D, 7},
  |  |  425|      2|{7, 0xE, 0x1, 0xE, 0x2, 0x1E, 6},
  |  |  426|      2|{7, 0xE, 0x1, 0xE, 0xC, 0x4D, 7},
  |  |  427|      2|{7, 0xE, 0x1, 0xE, 0x8, 0x0E, 6},
  |  |  428|      2|{7, 0xE, 0x1, 0xE, 0x4, 0x75, 7},
  |  |  429|      2|{7, 0xF, 0x0, 0x0, 0x0, 0x15, 7},
  |  |  430|      2|{7, 0xF, 0x1, 0xF, 0xF, 0x06, 5},
  |  |  431|      2|{7, 0xF, 0x1, 0xF, 0xD, 0x35, 7},
  |  |  432|      2|{7, 0xF, 0x1, 0xF, 0x7, 0x55, 7},
  |  |  433|      2|{7, 0xF, 0x1, 0xF, 0x5, 0x1A, 5},
  |  |  434|      2|{7, 0xF, 0x1, 0xF, 0xB, 0x25, 7},
  |  |  435|      2|{7, 0xF, 0x1, 0xF, 0x3, 0x0A, 5},
  |  |  436|      2|{7, 0xF, 0x1, 0xF, 0x9, 0x2E, 6},
  |  |  437|      2|{7, 0xF, 0x1, 0xF, 0x1, 0x00, 4},
  |  |  438|      2|{7, 0xF, 0x1, 0xF, 0xE, 0x65, 7},
  |  |  439|      2|{7, 0xF, 0x1, 0xF, 0x6, 0x36, 6},
  |  |  440|      2|{7, 0xF, 0x1, 0xF, 0xA, 0x02, 5},
  |  |  441|      2|{7, 0xF, 0x1, 0xF, 0x2, 0x0C, 4},
  |  |  442|      2|{7, 0xF, 0x1, 0xF, 0xC, 0x16, 6},
  |  |  443|      2|{7, 0xF, 0x1, 0xF, 0x8, 0x04, 4},
  |  |  444|      2|{7, 0xF, 0x1, 0xF, 0x4, 0x08, 4}
  ------------------
  139|      2|      };
  140|       |      // number of entries in the table
  141|      2|      size_t tbl0_size = sizeof(tbl0) / sizeof(vlc_src_table); 
  142|       |
  143|       |      // nono-initial quad rows
  144|      2|      vlc_src_table tbl1[] = {
  145|      2|    #include "table1.h"
  ------------------
  |  |    1|      2|{0, 0x1, 0x0, 0x0, 0x0, 0x00, 3},
  |  |    2|      2|{0, 0x1, 0x1, 0x1, 0x1, 0x27, 6},
  |  |    3|      2|{0, 0x2, 0x0, 0x0, 0x0, 0x06, 3},
  |  |    4|      2|{0, 0x2, 0x1, 0x2, 0x2, 0x17, 6},
  |  |    5|      2|{0, 0x3, 0x0, 0x0, 0x0, 0x0D, 5},
  |  |    6|      2|{0, 0x3, 0x1, 0x0, 0x0, 0x3B, 6},
  |  |    7|      2|{0, 0x4, 0x0, 0x0, 0x0, 0x02, 3},
  |  |    8|      2|{0, 0x4, 0x1, 0x4, 0x4, 0x07, 6},
  |  |    9|      2|{0, 0x5, 0x0, 0x0, 0x0, 0x15, 5},
  |  |   10|      2|{0, 0x5, 0x1, 0x0, 0x0, 0x2B, 6},
  |  |   11|      2|{0, 0x6, 0x0, 0x0, 0x0, 0x01, 5},
  |  |   12|      2|{0, 0x6, 0x1, 0x0, 0x0, 0x7F, 7},
  |  |   13|      2|{0, 0x7, 0x0, 0x0, 0x0, 0x1F, 7},
  |  |   14|      2|{0, 0x7, 0x1, 0x0, 0x0, 0x1B, 6},
  |  |   15|      2|{0, 0x8, 0x0, 0x0, 0x0, 0x04, 3},
  |  |   16|      2|{0, 0x8, 0x1, 0x8, 0x8, 0x05, 5},
  |  |   17|      2|{0, 0x9, 0x0, 0x0, 0x0, 0x19, 5},
  |  |   18|      2|{0, 0x9, 0x1, 0x0, 0x0, 0x13, 6},
  |  |   19|      2|{0, 0xA, 0x0, 0x0, 0x0, 0x09, 5},
  |  |   20|      2|{0, 0xA, 0x1, 0x8, 0x8, 0x0B, 6},
  |  |   21|      2|{0, 0xA, 0x1, 0xA, 0x2, 0x3F, 7},
  |  |   22|      2|{0, 0xB, 0x0, 0x0, 0x0, 0x5F, 7},
  |  |   23|      2|{0, 0xB, 0x1, 0x0, 0x0, 0x33, 6},
  |  |   24|      2|{0, 0xC, 0x0, 0x0, 0x0, 0x11, 5},
  |  |   25|      2|{0, 0xC, 0x1, 0x8, 0x8, 0x23, 6},
  |  |   26|      2|{0, 0xC, 0x1, 0xC, 0x4, 0x6F, 7},
  |  |   27|      2|{0, 0xD, 0x0, 0x0, 0x0, 0x0F, 7},
  |  |   28|      2|{0, 0xD, 0x1, 0x0, 0x0, 0x03, 6},
  |  |   29|      2|{0, 0xE, 0x0, 0x0, 0x0, 0x2F, 7},
  |  |   30|      2|{0, 0xE, 0x1, 0x4, 0x4, 0x4F, 7},
  |  |   31|      2|{0, 0xE, 0x1, 0x4, 0x0, 0x3D, 6},
  |  |   32|      2|{0, 0xF, 0x0, 0x0, 0x0, 0x77, 7},
  |  |   33|      2|{0, 0xF, 0x1, 0x1, 0x1, 0x37, 7},
  |  |   34|      2|{0, 0xF, 0x1, 0x1, 0x0, 0x1D, 6},
  |  |   35|      2|{1, 0x0, 0x0, 0x0, 0x0, 0x00, 1},
  |  |   36|      2|{1, 0x1, 0x0, 0x0, 0x0, 0x05, 4},
  |  |   37|      2|{1, 0x1, 0x1, 0x1, 0x1, 0x7F, 7},
  |  |   38|      2|{1, 0x2, 0x0, 0x0, 0x0, 0x09, 4},
  |  |   39|      2|{1, 0x2, 0x1, 0x2, 0x2, 0x1F, 7},
  |  |   40|      2|{1, 0x3, 0x0, 0x0, 0x0, 0x1D, 5},
  |  |   41|      2|{1, 0x3, 0x1, 0x1, 0x1, 0x3F, 7},
  |  |   42|      2|{1, 0x3, 0x1, 0x3, 0x2, 0x5F, 7},
  |  |   43|      2|{1, 0x4, 0x0, 0x0, 0x0, 0x0D, 5},
  |  |   44|      2|{1, 0x4, 0x1, 0x4, 0x4, 0x37, 7},
  |  |   45|      2|{1, 0x5, 0x0, 0x0, 0x0, 0x03, 6},
  |  |   46|      2|{1, 0x5, 0x1, 0x0, 0x0, 0x6F, 7},
  |  |   47|      2|{1, 0x6, 0x0, 0x0, 0x0, 0x2F, 7},
  |  |   48|      2|{1, 0x6, 0x1, 0x0, 0x0, 0x4F, 7},
  |  |   49|      2|{1, 0x7, 0x0, 0x0, 0x0, 0x0F, 7},
  |  |   50|      2|{1, 0x7, 0x1, 0x0, 0x0, 0x77, 7},
  |  |   51|      2|{1, 0x8, 0x0, 0x0, 0x0, 0x01, 4},
  |  |   52|      2|{1, 0x8, 0x1, 0x8, 0x8, 0x17, 7},
  |  |   53|      2|{1, 0x9, 0x0, 0x0, 0x0, 0x0B, 6},
  |  |   54|      2|{1, 0x9, 0x1, 0x0, 0x0, 0x57, 7},
  |  |   55|      2|{1, 0xA, 0x0, 0x0, 0x0, 0x33, 6},
  |  |   56|      2|{1, 0xA, 0x1, 0x0, 0x0, 0x67, 7},
  |  |   57|      2|{1, 0xB, 0x0, 0x0, 0x0, 0x27, 7},
  |  |   58|      2|{1, 0xB, 0x1, 0x0, 0x0, 0x2B, 7},
  |  |   59|      2|{1, 0xC, 0x0, 0x0, 0x0, 0x13, 6},
  |  |   60|      2|{1, 0xC, 0x1, 0x0, 0x0, 0x47, 7},
  |  |   61|      2|{1, 0xD, 0x0, 0x0, 0x0, 0x07, 7},
  |  |   62|      2|{1, 0xD, 0x1, 0x0, 0x0, 0x7B, 7},
  |  |   63|      2|{1, 0xE, 0x0, 0x0, 0x0, 0x3B, 7},
  |  |   64|      2|{1, 0xE, 0x1, 0x0, 0x0, 0x5B, 7},
  |  |   65|      2|{1, 0xF, 0x0, 0x0, 0x0, 0x1B, 7},
  |  |   66|      2|{1, 0xF, 0x1, 0x4, 0x4, 0x6B, 7},
  |  |   67|      2|{1, 0xF, 0x1, 0x4, 0x0, 0x23, 6},
  |  |   68|      2|{2, 0x0, 0x0, 0x0, 0x0, 0x00, 1},
  |  |   69|      2|{2, 0x1, 0x0, 0x0, 0x0, 0x09, 4},
  |  |   70|      2|{2, 0x1, 0x1, 0x1, 0x1, 0x7F, 7},
  |  |   71|      2|{2, 0x2, 0x0, 0x0, 0x0, 0x01, 4},
  |  |   72|      2|{2, 0x2, 0x1, 0x2, 0x2, 0x23, 6},
  |  |   73|      2|{2, 0x3, 0x0, 0x0, 0x0, 0x3D, 6},
  |  |   74|      2|{2, 0x3, 0x1, 0x2, 0x2, 0x3F, 7},
  |  |   75|      2|{2, 0x3, 0x1, 0x3, 0x1, 0x1F, 7},
  |  |   76|      2|{2, 0x4, 0x0, 0x0, 0x0, 0x15, 5},
  |  |   77|      2|{2, 0x4, 0x1, 0x4, 0x4, 0x5F, 7},
  |  |   78|      2|{2, 0x5, 0x0, 0x0, 0x0, 0x03, 6},
  |  |   79|      2|{2, 0x5, 0x1, 0x0, 0x0, 0x6F, 7},
  |  |   80|      2|{2, 0x6, 0x0, 0x0, 0x0, 0x2F, 7},
  |  |   81|      2|{2, 0x6, 0x1, 0x0, 0x0, 0x4F, 7},
  |  |   82|      2|{2, 0x7, 0x0, 0x0, 0x0, 0x0F, 7},
  |  |   83|      2|{2, 0x7, 0x1, 0x0, 0x0, 0x17, 7},
  |  |   84|      2|{2, 0x8, 0x0, 0x0, 0x0, 0x05, 5},
  |  |   85|      2|{2, 0x8, 0x1, 0x8, 0x8, 0x77, 7},
  |  |   86|      2|{2, 0x9, 0x0, 0x0, 0x0, 0x37, 7},
  |  |   87|      2|{2, 0x9, 0x1, 0x0, 0x0, 0x57, 7},
  |  |   88|      2|{2, 0xA, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |   89|      2|{2, 0xA, 0x1, 0xA, 0xA, 0x7B, 7},
  |  |   90|      2|{2, 0xA, 0x1, 0xA, 0x2, 0x2D, 6},
  |  |   91|      2|{2, 0xA, 0x1, 0xA, 0x8, 0x67, 7},
  |  |   92|      2|{2, 0xB, 0x0, 0x0, 0x0, 0x27, 7},
  |  |   93|      2|{2, 0xB, 0x1, 0xB, 0x2, 0x47, 7},
  |  |   94|      2|{2, 0xB, 0x1, 0x0, 0x0, 0x07, 7},
  |  |   95|      2|{2, 0xC, 0x0, 0x0, 0x0, 0x0D, 6},
  |  |   96|      2|{2, 0xC, 0x1, 0x0, 0x0, 0x3B, 7},
  |  |   97|      2|{2, 0xD, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |   98|      2|{2, 0xD, 0x1, 0x0, 0x0, 0x1B, 7},
  |  |   99|      2|{2, 0xE, 0x0, 0x0, 0x0, 0x6B, 7},
  |  |  100|      2|{2, 0xE, 0x1, 0x4, 0x4, 0x2B, 7},
  |  |  101|      2|{2, 0xE, 0x1, 0x4, 0x0, 0x4B, 7},
  |  |  102|      2|{2, 0xF, 0x0, 0x0, 0x0, 0x0B, 7},
  |  |  103|      2|{2, 0xF, 0x1, 0x4, 0x4, 0x73, 7},
  |  |  104|      2|{2, 0xF, 0x1, 0x5, 0x1, 0x33, 7},
  |  |  105|      2|{2, 0xF, 0x1, 0x7, 0x2, 0x53, 7},
  |  |  106|      2|{2, 0xF, 0x1, 0xF, 0x8, 0x13, 7},
  |  |  107|      2|{3, 0x0, 0x0, 0x0, 0x0, 0x00, 2},
  |  |  108|      2|{3, 0x1, 0x0, 0x0, 0x0, 0x0A, 4},
  |  |  109|      2|{3, 0x1, 0x1, 0x1, 0x1, 0x0B, 6},
  |  |  110|      2|{3, 0x2, 0x0, 0x0, 0x0, 0x02, 4},
  |  |  111|      2|{3, 0x2, 0x1, 0x2, 0x2, 0x23, 6},
  |  |  112|      2|{3, 0x3, 0x0, 0x0, 0x0, 0x0E, 5},
  |  |  113|      2|{3, 0x3, 0x1, 0x3, 0x3, 0x7F, 7},
  |  |  114|      2|{3, 0x3, 0x1, 0x3, 0x2, 0x33, 6},
  |  |  115|      2|{3, 0x3, 0x1, 0x3, 0x1, 0x13, 6},
  |  |  116|      2|{3, 0x4, 0x0, 0x0, 0x0, 0x16, 5},
  |  |  117|      2|{3, 0x4, 0x1, 0x4, 0x4, 0x3F, 7},
  |  |  118|      2|{3, 0x5, 0x0, 0x0, 0x0, 0x03, 6},
  |  |  119|      2|{3, 0x5, 0x1, 0x1, 0x1, 0x3D, 6},
  |  |  120|      2|{3, 0x5, 0x1, 0x5, 0x4, 0x1F, 7},
  |  |  121|      2|{3, 0x6, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |  122|      2|{3, 0x6, 0x1, 0x0, 0x0, 0x5F, 7},
  |  |  123|      2|{3, 0x7, 0x0, 0x0, 0x0, 0x2D, 6},
  |  |  124|      2|{3, 0x7, 0x1, 0x4, 0x4, 0x2F, 7},
  |  |  125|      2|{3, 0x7, 0x1, 0x5, 0x1, 0x1E, 6},
  |  |  126|      2|{3, 0x7, 0x1, 0x7, 0x2, 0x6F, 7},
  |  |  127|      2|{3, 0x8, 0x0, 0x0, 0x0, 0x06, 5},
  |  |  128|      2|{3, 0x8, 0x1, 0x8, 0x8, 0x4F, 7},
  |  |  129|      2|{3, 0x9, 0x0, 0x0, 0x0, 0x0D, 6},
  |  |  130|      2|{3, 0x9, 0x1, 0x0, 0x0, 0x35, 6},
  |  |  131|      2|{3, 0xA, 0x0, 0x0, 0x0, 0x15, 6},
  |  |  132|      2|{3, 0xA, 0x1, 0x2, 0x2, 0x25, 6},
  |  |  133|      2|{3, 0xA, 0x1, 0xA, 0x8, 0x0F, 7},
  |  |  134|      2|{3, 0xB, 0x0, 0x0, 0x0, 0x05, 6},
  |  |  135|      2|{3, 0xB, 0x1, 0x8, 0x8, 0x39, 6},
  |  |  136|      2|{3, 0xB, 0x1, 0xB, 0x3, 0x17, 7},
  |  |  137|      2|{3, 0xB, 0x1, 0xB, 0x2, 0x19, 6},
  |  |  138|      2|{3, 0xB, 0x1, 0xB, 0x1, 0x77, 7},
  |  |  139|      2|{3, 0xC, 0x0, 0x0, 0x0, 0x29, 6},
  |  |  140|      2|{3, 0xC, 0x1, 0x0, 0x0, 0x09, 6},
  |  |  141|      2|{3, 0xD, 0x0, 0x0, 0x0, 0x37, 7},
  |  |  142|      2|{3, 0xD, 0x1, 0x4, 0x4, 0x57, 7},
  |  |  143|      2|{3, 0xD, 0x1, 0x4, 0x0, 0x31, 6},
  |  |  144|      2|{3, 0xE, 0x0, 0x0, 0x0, 0x67, 7},
  |  |  145|      2|{3, 0xE, 0x1, 0x4, 0x4, 0x27, 7},
  |  |  146|      2|{3, 0xE, 0x1, 0xC, 0x8, 0x47, 7},
  |  |  147|      2|{3, 0xE, 0x1, 0xE, 0x2, 0x6B, 7},
  |  |  148|      2|{3, 0xF, 0x0, 0x0, 0x0, 0x11, 6},
  |  |  149|      2|{3, 0xF, 0x1, 0x6, 0x6, 0x07, 7},
  |  |  150|      2|{3, 0xF, 0x1, 0x7, 0x3, 0x7B, 7},
  |  |  151|      2|{3, 0xF, 0x1, 0xF, 0xA, 0x3B, 7},
  |  |  152|      2|{3, 0xF, 0x1, 0xF, 0x2, 0x21, 6},
  |  |  153|      2|{3, 0xF, 0x1, 0xF, 0x8, 0x01, 6},
  |  |  154|      2|{3, 0xF, 0x1, 0xA, 0x8, 0x5B, 7},
  |  |  155|      2|{3, 0xF, 0x1, 0xF, 0x5, 0x1B, 7},
  |  |  156|      2|{3, 0xF, 0x1, 0xF, 0x1, 0x3E, 6},
  |  |  157|      2|{3, 0xF, 0x1, 0xF, 0x4, 0x2B, 7},
  |  |  158|      2|{4, 0x0, 0x0, 0x0, 0x0, 0x00, 1},
  |  |  159|      2|{4, 0x1, 0x0, 0x0, 0x0, 0x0D, 5},
  |  |  160|      2|{4, 0x1, 0x1, 0x1, 0x1, 0x7F, 7},
  |  |  161|      2|{4, 0x2, 0x0, 0x0, 0x0, 0x15, 5},
  |  |  162|      2|{4, 0x2, 0x1, 0x2, 0x2, 0x3F, 7},
  |  |  163|      2|{4, 0x3, 0x0, 0x0, 0x0, 0x5F, 7},
  |  |  164|      2|{4, 0x3, 0x1, 0x0, 0x0, 0x6F, 7},
  |  |  165|      2|{4, 0x4, 0x0, 0x0, 0x0, 0x09, 4},
  |  |  166|      2|{4, 0x4, 0x1, 0x4, 0x4, 0x23, 6},
  |  |  167|      2|{4, 0x5, 0x0, 0x0, 0x0, 0x33, 6},
  |  |  168|      2|{4, 0x5, 0x1, 0x0, 0x0, 0x1F, 7},
  |  |  169|      2|{4, 0x6, 0x0, 0x0, 0x0, 0x13, 6},
  |  |  170|      2|{4, 0x6, 0x1, 0x0, 0x0, 0x2F, 7},
  |  |  171|      2|{4, 0x7, 0x0, 0x0, 0x0, 0x4F, 7},
  |  |  172|      2|{4, 0x7, 0x1, 0x0, 0x0, 0x57, 7},
  |  |  173|      2|{4, 0x8, 0x0, 0x0, 0x0, 0x01, 4},
  |  |  174|      2|{4, 0x8, 0x1, 0x8, 0x8, 0x0F, 7},
  |  |  175|      2|{4, 0x9, 0x0, 0x0, 0x0, 0x77, 7},
  |  |  176|      2|{4, 0x9, 0x1, 0x0, 0x0, 0x37, 7},
  |  |  177|      2|{4, 0xA, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |  178|      2|{4, 0xA, 0x1, 0x0, 0x0, 0x17, 7},
  |  |  179|      2|{4, 0xB, 0x0, 0x0, 0x0, 0x67, 7},
  |  |  180|      2|{4, 0xB, 0x1, 0x0, 0x0, 0x6B, 7},
  |  |  181|      2|{4, 0xC, 0x0, 0x0, 0x0, 0x05, 5},
  |  |  182|      2|{4, 0xC, 0x1, 0xC, 0xC, 0x27, 7},
  |  |  183|      2|{4, 0xC, 0x1, 0xC, 0x8, 0x47, 7},
  |  |  184|      2|{4, 0xC, 0x1, 0xC, 0x4, 0x07, 7},
  |  |  185|      2|{4, 0xD, 0x0, 0x0, 0x0, 0x7B, 7},
  |  |  186|      2|{4, 0xD, 0x1, 0x0, 0x0, 0x3B, 7},
  |  |  187|      2|{4, 0xE, 0x0, 0x0, 0x0, 0x5B, 7},
  |  |  188|      2|{4, 0xE, 0x1, 0x2, 0x2, 0x1B, 7},
  |  |  189|      2|{4, 0xE, 0x1, 0x2, 0x0, 0x03, 6},
  |  |  190|      2|{4, 0xF, 0x0, 0x0, 0x0, 0x2B, 7},
  |  |  191|      2|{4, 0xF, 0x1, 0x1, 0x1, 0x4B, 7},
  |  |  192|      2|{4, 0xF, 0x1, 0x3, 0x2, 0x0B, 7},
  |  |  193|      2|{4, 0xF, 0x1, 0x3, 0x0, 0x3D, 6},
  |  |  194|      2|{5, 0x0, 0x0, 0x0, 0x0, 0x00, 2},
  |  |  195|      2|{5, 0x1, 0x0, 0x0, 0x0, 0x1E, 5},
  |  |  196|      2|{5, 0x1, 0x1, 0x1, 0x1, 0x3B, 6},
  |  |  197|      2|{5, 0x2, 0x0, 0x0, 0x0, 0x0A, 5},
  |  |  198|      2|{5, 0x2, 0x1, 0x2, 0x2, 0x3F, 7},
  |  |  199|      2|{5, 0x3, 0x0, 0x0, 0x0, 0x1B, 6},
  |  |  200|      2|{5, 0x3, 0x1, 0x0, 0x0, 0x0B, 6},
  |  |  201|      2|{5, 0x4, 0x0, 0x0, 0x0, 0x02, 4},
  |  |  202|      2|{5, 0x4, 0x1, 0x4, 0x4, 0x2B, 6},
  |  |  203|      2|{5, 0x5, 0x0, 0x0, 0x0, 0x0E, 5},
  |  |  204|      2|{5, 0x5, 0x1, 0x4, 0x4, 0x33, 6},
  |  |  205|      2|{5, 0x5, 0x1, 0x5, 0x1, 0x7F, 7},
  |  |  206|      2|{5, 0x6, 0x0, 0x0, 0x0, 0x13, 6},
  |  |  207|      2|{5, 0x6, 0x1, 0x0, 0x0, 0x6F, 7},
  |  |  208|      2|{5, 0x7, 0x0, 0x0, 0x0, 0x23, 6},
  |  |  209|      2|{5, 0x7, 0x1, 0x2, 0x2, 0x5F, 7},
  |  |  210|      2|{5, 0x7, 0x1, 0x2, 0x0, 0x15, 6},
  |  |  211|      2|{5, 0x8, 0x0, 0x0, 0x0, 0x16, 5},
  |  |  212|      2|{5, 0x8, 0x1, 0x8, 0x8, 0x03, 6},
  |  |  213|      2|{5, 0x9, 0x0, 0x0, 0x0, 0x3D, 6},
  |  |  214|      2|{5, 0x9, 0x1, 0x0, 0x0, 0x1F, 7},
  |  |  215|      2|{5, 0xA, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |  216|      2|{5, 0xA, 0x1, 0x0, 0x0, 0x2D, 6},
  |  |  217|      2|{5, 0xB, 0x0, 0x0, 0x0, 0x0D, 6},
  |  |  218|      2|{5, 0xB, 0x1, 0x1, 0x1, 0x4F, 7},
  |  |  219|      2|{5, 0xB, 0x1, 0x1, 0x0, 0x35, 6},
  |  |  220|      2|{5, 0xC, 0x0, 0x0, 0x0, 0x06, 5},
  |  |  221|      2|{5, 0xC, 0x1, 0x4, 0x4, 0x25, 6},
  |  |  222|      2|{5, 0xC, 0x1, 0xC, 0x8, 0x2F, 7},
  |  |  223|      2|{5, 0xD, 0x0, 0x0, 0x0, 0x05, 6},
  |  |  224|      2|{5, 0xD, 0x1, 0x1, 0x1, 0x77, 7},
  |  |  225|      2|{5, 0xD, 0x1, 0x5, 0x4, 0x39, 6},
  |  |  226|      2|{5, 0xD, 0x1, 0xD, 0x8, 0x0F, 7},
  |  |  227|      2|{5, 0xE, 0x0, 0x0, 0x0, 0x19, 6},
  |  |  228|      2|{5, 0xE, 0x1, 0x2, 0x2, 0x57, 7},
  |  |  229|      2|{5, 0xE, 0x1, 0xA, 0x8, 0x01, 6},
  |  |  230|      2|{5, 0xE, 0x1, 0xE, 0x4, 0x37, 7},
  |  |  231|      2|{5, 0xF, 0x0, 0x0, 0x0, 0x1A, 5},
  |  |  232|      2|{5, 0xF, 0x1, 0x9, 0x9, 0x17, 7},
  |  |  233|      2|{5, 0xF, 0x1, 0xD, 0x5, 0x67, 7},
  |  |  234|      2|{5, 0xF, 0x1, 0xF, 0x3, 0x07, 7},
  |  |  235|      2|{5, 0xF, 0x1, 0xF, 0x1, 0x29, 6},
  |  |  236|      2|{5, 0xF, 0x1, 0x7, 0x6, 0x27, 7},
  |  |  237|      2|{5, 0xF, 0x1, 0xF, 0xC, 0x09, 6},
  |  |  238|      2|{5, 0xF, 0x1, 0xF, 0x4, 0x31, 6},
  |  |  239|      2|{5, 0xF, 0x1, 0xF, 0xA, 0x47, 7},
  |  |  240|      2|{5, 0xF, 0x1, 0xF, 0x8, 0x11, 6},
  |  |  241|      2|{5, 0xF, 0x1, 0xF, 0x2, 0x21, 6},
  |  |  242|      2|{6, 0x0, 0x0, 0x0, 0x0, 0x00, 3},
  |  |  243|      2|{6, 0x1, 0x0, 0x0, 0x0, 0x02, 4},
  |  |  244|      2|{6, 0x1, 0x1, 0x1, 0x1, 0x03, 6},
  |  |  245|      2|{6, 0x2, 0x0, 0x0, 0x0, 0x0C, 4},
  |  |  246|      2|{6, 0x2, 0x1, 0x2, 0x2, 0x3D, 6},
  |  |  247|      2|{6, 0x3, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |  248|      2|{6, 0x3, 0x1, 0x2, 0x2, 0x0D, 6},
  |  |  249|      2|{6, 0x3, 0x1, 0x3, 0x1, 0x7F, 7},
  |  |  250|      2|{6, 0x4, 0x0, 0x0, 0x0, 0x04, 4},
  |  |  251|      2|{6, 0x4, 0x1, 0x4, 0x4, 0x2D, 6},
  |  |  252|      2|{6, 0x5, 0x0, 0x0, 0x0, 0x0A, 5},
  |  |  253|      2|{6, 0x5, 0x1, 0x4, 0x4, 0x35, 6},
  |  |  254|      2|{6, 0x5, 0x1, 0x5, 0x1, 0x2F, 7},
  |  |  255|      2|{6, 0x6, 0x0, 0x0, 0x0, 0x15, 6},
  |  |  256|      2|{6, 0x6, 0x1, 0x2, 0x2, 0x3F, 7},
  |  |  257|      2|{6, 0x6, 0x1, 0x6, 0x4, 0x5F, 7},
  |  |  258|      2|{6, 0x7, 0x0, 0x0, 0x0, 0x25, 6},
  |  |  259|      2|{6, 0x7, 0x1, 0x2, 0x2, 0x29, 6},
  |  |  260|      2|{6, 0x7, 0x1, 0x3, 0x1, 0x1F, 7},
  |  |  261|      2|{6, 0x7, 0x1, 0x7, 0x4, 0x6F, 7},
  |  |  262|      2|{6, 0x8, 0x0, 0x0, 0x0, 0x16, 5},
  |  |  263|      2|{6, 0x8, 0x1, 0x8, 0x8, 0x05, 6},
  |  |  264|      2|{6, 0x9, 0x0, 0x0, 0x0, 0x39, 6},
  |  |  265|      2|{6, 0x9, 0x1, 0x0, 0x0, 0x19, 6},
  |  |  266|      2|{6, 0xA, 0x0, 0x0, 0x0, 0x06, 5},
  |  |  267|      2|{6, 0xA, 0x1, 0xA, 0xA, 0x0F, 7},
  |  |  268|      2|{6, 0xA, 0x1, 0xA, 0x2, 0x09, 6},
  |  |  269|      2|{6, 0xA, 0x1, 0xA, 0x8, 0x4F, 7},
  |  |  270|      2|{6, 0xB, 0x0, 0x0, 0x0, 0x0E, 6},
  |  |  271|      2|{6, 0xB, 0x1, 0xB, 0x2, 0x77, 7},
  |  |  272|      2|{6, 0xB, 0x1, 0x2, 0x2, 0x37, 7},
  |  |  273|      2|{6, 0xB, 0x1, 0xA, 0x8, 0x57, 7},
  |  |  274|      2|{6, 0xB, 0x1, 0xB, 0x1, 0x47, 7},
  |  |  275|      2|{6, 0xC, 0x0, 0x0, 0x0, 0x1A, 5},
  |  |  276|      2|{6, 0xC, 0x1, 0xC, 0xC, 0x17, 7},
  |  |  277|      2|{6, 0xC, 0x1, 0xC, 0x8, 0x67, 7},
  |  |  278|      2|{6, 0xC, 0x1, 0xC, 0x4, 0x27, 7},
  |  |  279|      2|{6, 0xD, 0x0, 0x0, 0x0, 0x31, 6},
  |  |  280|      2|{6, 0xD, 0x1, 0xD, 0x4, 0x07, 7},
  |  |  281|      2|{6, 0xD, 0x1, 0x4, 0x4, 0x7B, 7},
  |  |  282|      2|{6, 0xD, 0x1, 0xC, 0x8, 0x3B, 7},
  |  |  283|      2|{6, 0xD, 0x1, 0xD, 0x1, 0x2B, 7},
  |  |  284|      2|{6, 0xE, 0x0, 0x0, 0x0, 0x11, 6},
  |  |  285|      2|{6, 0xE, 0x1, 0xE, 0x4, 0x5B, 7},
  |  |  286|      2|{6, 0xE, 0x1, 0x4, 0x4, 0x1B, 7},
  |  |  287|      2|{6, 0xE, 0x1, 0xE, 0xA, 0x6B, 7},
  |  |  288|      2|{6, 0xE, 0x1, 0xE, 0x8, 0x21, 6},
  |  |  289|      2|{6, 0xE, 0x1, 0xE, 0x2, 0x33, 7},
  |  |  290|      2|{6, 0xF, 0x0, 0x0, 0x0, 0x01, 6},
  |  |  291|      2|{6, 0xF, 0x1, 0x3, 0x3, 0x4B, 7},
  |  |  292|      2|{6, 0xF, 0x1, 0x7, 0x6, 0x0B, 7},
  |  |  293|      2|{6, 0xF, 0x1, 0xF, 0xA, 0x73, 7},
  |  |  294|      2|{6, 0xF, 0x1, 0xF, 0x2, 0x3E, 6},
  |  |  295|      2|{6, 0xF, 0x1, 0xB, 0x9, 0x53, 7},
  |  |  296|      2|{6, 0xF, 0x1, 0xF, 0xC, 0x63, 7},
  |  |  297|      2|{6, 0xF, 0x1, 0xF, 0x8, 0x1E, 6},
  |  |  298|      2|{6, 0xF, 0x1, 0xF, 0x5, 0x13, 7},
  |  |  299|      2|{6, 0xF, 0x1, 0xF, 0x4, 0x2E, 6},
  |  |  300|      2|{6, 0xF, 0x1, 0xF, 0x1, 0x23, 7},
  |  |  301|      2|{7, 0x0, 0x0, 0x0, 0x0, 0x04, 4},
  |  |  302|      2|{7, 0x1, 0x0, 0x0, 0x0, 0x33, 6},
  |  |  303|      2|{7, 0x1, 0x1, 0x1, 0x1, 0x13, 6},
  |  |  304|      2|{7, 0x2, 0x0, 0x0, 0x0, 0x23, 6},
  |  |  305|      2|{7, 0x2, 0x1, 0x2, 0x2, 0x7F, 7},
  |  |  306|      2|{7, 0x3, 0x0, 0x0, 0x0, 0x03, 6},
  |  |  307|      2|{7, 0x3, 0x1, 0x1, 0x1, 0x3F, 7},
  |  |  308|      2|{7, 0x3, 0x1, 0x3, 0x2, 0x6F, 7},
  |  |  309|      2|{7, 0x4, 0x0, 0x0, 0x0, 0x2D, 6},
  |  |  310|      2|{7, 0x4, 0x1, 0x4, 0x4, 0x5F, 7},
  |  |  311|      2|{7, 0x5, 0x0, 0x0, 0x0, 0x16, 5},
  |  |  312|      2|{7, 0x5, 0x1, 0x1, 0x1, 0x3D, 6},
  |  |  313|      2|{7, 0x5, 0x1, 0x5, 0x4, 0x1F, 7},
  |  |  314|      2|{7, 0x6, 0x0, 0x0, 0x0, 0x1D, 6},
  |  |  315|      2|{7, 0x6, 0x1, 0x0, 0x0, 0x77, 7},
  |  |  316|      2|{7, 0x7, 0x0, 0x0, 0x0, 0x06, 5},
  |  |  317|      2|{7, 0x7, 0x1, 0x7, 0x4, 0x2F, 7},
  |  |  318|      2|{7, 0x7, 0x1, 0x4, 0x4, 0x4F, 7},
  |  |  319|      2|{7, 0x7, 0x1, 0x7, 0x3, 0x0F, 7},
  |  |  320|      2|{7, 0x7, 0x1, 0x7, 0x1, 0x0D, 6},
  |  |  321|      2|{7, 0x7, 0x1, 0x7, 0x2, 0x57, 7},
  |  |  322|      2|{7, 0x8, 0x0, 0x0, 0x0, 0x35, 6},
  |  |  323|      2|{7, 0x8, 0x1, 0x8, 0x8, 0x37, 7},
  |  |  324|      2|{7, 0x9, 0x0, 0x0, 0x0, 0x15, 6},
  |  |  325|      2|{7, 0x9, 0x1, 0x0, 0x0, 0x27, 7},
  |  |  326|      2|{7, 0xA, 0x0, 0x0, 0x0, 0x25, 6},
  |  |  327|      2|{7, 0xA, 0x1, 0x0, 0x0, 0x29, 6},
  |  |  328|      2|{7, 0xB, 0x0, 0x0, 0x0, 0x1A, 5},
  |  |  329|      2|{7, 0xB, 0x1, 0xB, 0x1, 0x17, 7},
  |  |  330|      2|{7, 0xB, 0x1, 0x1, 0x1, 0x67, 7},
  |  |  331|      2|{7, 0xB, 0x1, 0x3, 0x2, 0x05, 6},
  |  |  332|      2|{7, 0xB, 0x1, 0xB, 0x8, 0x7B, 7},
  |  |  333|      2|{7, 0xC, 0x0, 0x0, 0x0, 0x39, 6},
  |  |  334|      2|{7, 0xC, 0x1, 0x0, 0x0, 0x19, 6},
  |  |  335|      2|{7, 0xD, 0x0, 0x0, 0x0, 0x0C, 5},
  |  |  336|      2|{7, 0xD, 0x1, 0xD, 0x1, 0x47, 7},
  |  |  337|      2|{7, 0xD, 0x1, 0x1, 0x1, 0x07, 7},
  |  |  338|      2|{7, 0xD, 0x1, 0x5, 0x4, 0x09, 6},
  |  |  339|      2|{7, 0xD, 0x1, 0xD, 0x8, 0x1B, 7},
  |  |  340|      2|{7, 0xE, 0x0, 0x0, 0x0, 0x31, 6},
  |  |  341|      2|{7, 0xE, 0x1, 0xE, 0x2, 0x3B, 7},
  |  |  342|      2|{7, 0xE, 0x1, 0x2, 0x2, 0x5B, 7},
  |  |  343|      2|{7, 0xE, 0x1, 0xA, 0x8, 0x3E, 6},
  |  |  344|      2|{7, 0xE, 0x1, 0xE, 0x4, 0x0B, 7},
  |  |  345|      2|{7, 0xF, 0x0, 0x0, 0x0, 0x00, 3},
  |  |  346|      2|{7, 0xF, 0x1, 0xF, 0xF, 0x6B, 7},
  |  |  347|      2|{7, 0xF, 0x1, 0xF, 0x7, 0x2B, 7},
  |  |  348|      2|{7, 0xF, 0x1, 0xF, 0xB, 0x4B, 7},
  |  |  349|      2|{7, 0xF, 0x1, 0xF, 0x3, 0x11, 6},
  |  |  350|      2|{7, 0xF, 0x1, 0x7, 0x6, 0x21, 6},
  |  |  351|      2|{7, 0xF, 0x1, 0xF, 0xA, 0x01, 6},
  |  |  352|      2|{7, 0xF, 0x1, 0xF, 0x2, 0x0A, 5},
  |  |  353|      2|{7, 0xF, 0x1, 0xB, 0x9, 0x1E, 6},
  |  |  354|      2|{7, 0xF, 0x1, 0xF, 0xC, 0x0E, 6},
  |  |  355|      2|{7, 0xF, 0x1, 0xF, 0x8, 0x12, 5},
  |  |  356|      2|{7, 0xF, 0x1, 0xF, 0x5, 0x2E, 6},
  |  |  357|      2|{7, 0xF, 0x1, 0xF, 0x1, 0x02, 5},
  |  |  358|      2|{7, 0xF, 0x1, 0xF, 0x4, 0x1C, 5}
  ------------------
  146|      2|      };
  147|       |      // number of entries in the table
  148|      2|      size_t tbl1_size = sizeof(tbl1) / sizeof(vlc_src_table);
  149|       |
  150|      2|      if (debug) memset(vlc_tbl0, 0, sizeof(vlc_tbl0)); //unnecessary
  ------------------
  |  Branch (150:11): [Folded, False: 2]
  ------------------
  151|       |
  152|       |      // this is to convert table entries into values for decoder look up
  153|       |      // There can be at most 1024 possibilities, not all of them are valid.
  154|       |      // 
  155|  2.05k|      for (int i = 0; i < 1024; ++i)
  ------------------
  |  Branch (155:23): [True: 2.04k, False: 2]
  ------------------
  156|  2.04k|      {
  157|  2.04k|        int cwd = i & 0x7F; // from i extract codeword
  158|  2.04k|        int c_q = i >> 7;   // from i extract context
  159|       |        // See if this case exist in the table, if so then set the entry in
  160|       |        // vlc_tbl0
  161|   911k|        for (size_t j = 0; j < tbl0_size; ++j) 
  ------------------
  |  Branch (161:28): [True: 909k, False: 2.04k]
  ------------------
  162|   909k|          if (tbl0[j].c_q == c_q) // this is an and operation
  ------------------
  |  Branch (162:15): [True: 113k, False: 795k]
  ------------------
  163|   113k|            if (tbl0[j].cwd == (cwd & ((1 << tbl0[j].cwd_len) - 1)))
  ------------------
  |  Branch (163:17): [True: 2.04k, False: 111k]
  ------------------
  164|  2.04k|            {
  165|  2.04k|              if (debug) assert(vlc_tbl0[i] == 0);
  ------------------
  |  Branch (165:19): [Folded, False: 2.04k]
  ------------------
  166|       |              // Put this entry into the table
  167|  2.04k|              vlc_tbl0[i] = (ui16)((tbl0[j].rho << 4) | (tbl0[j].u_off << 3)
  168|  2.04k|                | (tbl0[j].e_k << 12) | (tbl0[j].e_1 << 8) | tbl0[j].cwd_len);
  169|  2.04k|            }
  170|  2.04k|      }
  171|       |
  172|      2|      if (debug) memset(vlc_tbl1, 0, sizeof(vlc_tbl1)); //unnecessary
  ------------------
  |  Branch (172:11): [Folded, False: 2]
  ------------------
  173|       |
  174|       |      // this the same as above but for non-initial rows
  175|  2.05k|      for (int i = 0; i < 1024; ++i)
  ------------------
  |  Branch (175:23): [True: 2.04k, False: 2]
  ------------------
  176|  2.04k|      {
  177|  2.04k|        int cwd = i & 0x7F; //7 bits
  178|  2.04k|        int c_q = i >> 7;
  179|   735k|        for (size_t j = 0; j < tbl1_size; ++j)
  ------------------
  |  Branch (179:28): [True: 733k, False: 2.04k]
  ------------------
  180|   733k|          if (tbl1[j].c_q == c_q) // this is an and operation
  ------------------
  |  Branch (180:15): [True: 91.6k, False: 641k]
  ------------------
  181|  91.6k|            if (tbl1[j].cwd == (cwd & ((1 << tbl1[j].cwd_len) - 1)))
  ------------------
  |  Branch (181:17): [True: 2.04k, False: 89.6k]
  ------------------
  182|  2.04k|            {
  183|  2.04k|              if (debug) assert(vlc_tbl1[i] == 0);
  ------------------
  |  Branch (183:19): [Folded, False: 2.04k]
  ------------------
  184|  2.04k|              vlc_tbl1[i] = (ui16)((tbl1[j].rho << 4) | (tbl1[j].u_off << 3)
  185|  2.04k|                | (tbl1[j].e_k << 12) | (tbl1[j].e_1 << 8) | tbl1[j].cwd_len);
  186|  2.04k|            }
  187|  2.04k|      }
  188|       |
  189|      2|      return true;
  190|      2|    }
ojph_block_common.cpp:_ZN4ojph5localL16uvlc_init_tablesEv:
  197|      2|    {
  198|       |      // table stores possible decoding three bits from vlc
  199|       |      // there are 8 entries for xx1, x10, 100, 000, where x means do not
  200|       |      // care table value is made up of
  201|       |      // 2 bits in the LSB for prefix length 
  202|       |      // 3 bits for suffix length
  203|       |      // 3 bits in the MSB for prefix value (u_pfx in Table 3 of ITU T.814)
  204|      2|      static const ui8 dec[8] = { // the index is the prefix codeword
  205|      2|        3 | (5 << 2) | (5 << 5), //000 == 000, prefix codeword "000"
  206|      2|        1 | (0 << 2) | (1 << 5), //001 == xx1, prefix codeword "1"
  207|      2|        2 | (0 << 2) | (2 << 5), //010 == x10, prefix codeword "01"
  208|      2|        1 | (0 << 2) | (1 << 5), //011 == xx1, prefix codeword "1"
  209|      2|        3 | (1 << 2) | (3 << 5), //100 == 100, prefix codeword "001"
  210|      2|        1 | (0 << 2) | (1 << 5), //101 == xx1, prefix codeword "1"
  211|      2|        2 | (0 << 2) | (2 << 5), //110 == x10, prefix codeword "01"
  212|      2|        1 | (0 << 2) | (1 << 5)  //111 == xx1, prefix codeword "1"
  213|      2|      };
  214|       |
  215|    642|      for (ui32 i = 0; i < 256 + 64; ++i)
  ------------------
  |  Branch (215:24): [True: 640, False: 2]
  ------------------
  216|    640|      { 
  217|    640|        ui32 mode = i >> 6;
  218|    640|        ui32 vlc = i & 0x3F;
  219|       |
  220|    640|        if (mode == 0) {      // both u_off are 0
  ------------------
  |  Branch (220:13): [True: 128, False: 512]
  ------------------
  221|    128|          uvlc_tbl0[i] = 0;
  222|    128|          uvlc_bias[i] = 0;
  223|    128|        }
  224|    512|        else if (mode <= 2) // u_off are either 01 or 10
  ------------------
  |  Branch (224:18): [True: 256, False: 256]
  ------------------
  225|    256|        {
  226|    256|          ui32 d = dec[vlc & 0x7];   //look at the least significant 3 bits
  227|       |
  228|    256|          ui32 total_prefix = d & 0x3;
  229|    256|          ui32 total_suffix = (d >> 2) & 0x7;
  230|    256|          ui32 u0_suffix_len = (mode == 1) ? total_suffix : 0;
  ------------------
  |  Branch (230:32): [True: 128, False: 128]
  ------------------
  231|    256|          ui32 u0 = (mode == 1) ? (d >> 5) : 0;
  ------------------
  |  Branch (231:21): [True: 128, False: 128]
  ------------------
  232|    256|          ui32 u1 = (mode == 1) ? 0 : (d >> 5);
  ------------------
  |  Branch (232:21): [True: 128, False: 128]
  ------------------
  233|       |
  234|    256|          uvlc_tbl0[i] = (ui16)(total_prefix | 
  235|    256|                               (total_suffix << 3) |
  236|    256|                               (u0_suffix_len << 7) |
  237|    256|                               (u0 << 10) |
  238|    256|                               (u1 << 13));
  239|       |          
  240|    256|        }
  241|    256|        else if (mode == 3) // both u_off are 1, and MEL event is 0
  ------------------
  |  Branch (241:18): [True: 128, False: 128]
  ------------------
  242|    128|        {
  243|    128|          ui32 d0 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  244|    128|          vlc >>= d0 & 0x3;          // Consume bits
  245|    128|          ui32 d1 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  246|       |
  247|    128|          ui32 total_prefix, u0_suffix_len, total_suffix, u0, u1;
  248|    128|          if ((d0 & 0x3) == 3)
  ------------------
  |  Branch (248:15): [True: 32, False: 96]
  ------------------
  249|     32|          {
  250|     32|            total_prefix = (d0 & 0x3) + 1;
  251|     32|            u0_suffix_len = (d0 >> 2) & 0x7;
  252|     32|            total_suffix = u0_suffix_len;
  253|     32|            u0 = d0 >> 5;
  254|     32|            u1 = (vlc & 1) + 1;
  255|     32|            uvlc_bias[i] = 4; // 0b00 for u0 and 0b01 for u1
  256|     32|          }
  257|     96|          else
  258|     96|          {
  259|     96|            total_prefix = (d0 & 0x3) + (d1 & 0x3);
  260|     96|            u0_suffix_len = (d0 >> 2) & 0x7;
  261|     96|            total_suffix = u0_suffix_len + ((d1 >> 2) & 0x7);
  262|     96|            u0 = d0 >> 5;
  263|     96|            u1 = d1 >> 5;
  264|     96|            uvlc_bias[i] = 0;
  265|     96|          }
  266|       |
  267|    128|          uvlc_tbl0[i] = (ui16)(total_prefix | 
  268|    128|                               (total_suffix << 3) |
  269|    128|                               (u0_suffix_len << 7) |
  270|    128|                               (u0 << 10) |
  271|    128|                               (u1 << 13));
  272|    128|        }
  273|    128|        else if (mode == 4) // both u_off are 1, and MEL event is 1
  ------------------
  |  Branch (273:18): [True: 128, False: 0]
  ------------------
  274|    128|        {
  275|    128|          ui32 d0 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  276|    128|          vlc >>= d0 & 0x3;          // Consume bits
  277|    128|          ui32 d1 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  278|       |
  279|    128|          ui32 total_prefix = (d0 & 0x3) + (d1 & 0x3);
  280|    128|          ui32 u0_suffix_len = (d0 >> 2) & 0x7;
  281|    128|          ui32 total_suffix = u0_suffix_len + ((d1 >> 2) & 0x7);
  282|    128|          ui32 u0 = (d0 >> 5) + 2;
  283|    128|          ui32 u1 = (d1 >> 5) + 2;
  284|       |
  285|    128|          uvlc_tbl0[i] = (ui16)(total_prefix | 
  286|    128|                               (total_suffix << 3) |
  287|    128|                               (u0_suffix_len << 7) |
  288|    128|                               (u0 << 10) |
  289|    128|                               (u1 << 13));
  290|    128|          uvlc_bias[i] = 10; // 0b10 for u0 and 0b10 for u1
  291|    128|        }
  292|    640|      }
  293|       |
  294|    514|      for (ui32 i = 0; i < 256; ++i)
  ------------------
  |  Branch (294:24): [True: 512, False: 2]
  ------------------
  295|    512|      {
  296|    512|        ui32 mode = i >> 6;
  297|    512|        ui32 vlc = i & 0x3F;
  298|       |
  299|    512|        if (mode == 0)       // both u_off are 0
  ------------------
  |  Branch (299:13): [True: 128, False: 384]
  ------------------
  300|    128|          uvlc_tbl1[i] = 0;
  301|    384|        else if (mode <= 2)  // u_off are either 01 or 10
  ------------------
  |  Branch (301:18): [True: 256, False: 128]
  ------------------
  302|    256|        {
  303|    256|          ui32 d = dec[vlc & 0x7];   // look at the 3 LSB bits
  304|       |
  305|    256|          ui32 total_prefix = d & 0x3;
  306|    256|          ui32 total_suffix = (d >> 2) & 0x7;
  307|    256|          ui32 u0_suffix_len = (mode == 1) ? total_suffix : 0;
  ------------------
  |  Branch (307:32): [True: 128, False: 128]
  ------------------
  308|    256|          ui32 u0 = (mode == 1) ? (d >> 5) : 0;
  ------------------
  |  Branch (308:21): [True: 128, False: 128]
  ------------------
  309|    256|          ui32 u1 = (mode == 1) ? 0 : (d >> 5);
  ------------------
  |  Branch (309:21): [True: 128, False: 128]
  ------------------
  310|       |
  311|    256|          uvlc_tbl1[i] = (ui16)(total_prefix | 
  312|    256|                               (total_suffix << 3) |
  313|    256|                               (u0_suffix_len << 7) |
  314|    256|                               (u0 << 10) |
  315|    256|                               (u1 << 13));
  316|    256|        }
  317|    128|        else if (mode == 3) // both u_off are 1
  ------------------
  |  Branch (317:18): [True: 128, False: 0]
  ------------------
  318|    128|        {
  319|    128|          ui32 d0 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  320|    128|          vlc >>= d0 & 0x3;          // Consume bits
  321|    128|          ui32 d1 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  322|       |
  323|    128|          ui32 total_prefix = (d0 & 0x3) + (d1 & 0x3);
  324|    128|          ui32 u0_suffix_len = (d0 >> 2) & 0x7;
  325|    128|          ui32 total_suffix = u0_suffix_len + ((d1 >> 2) & 0x7);
  326|    128|          ui32 u0 = d0 >> 5;
  327|    128|          ui32 u1 = d1 >> 5;
  328|       |
  329|    128|          uvlc_tbl1[i] = (ui16)(total_prefix | 
  330|    128|                               (total_suffix << 3) |
  331|    128|                               (u0_suffix_len << 7) |
  332|    128|                               (u0 << 10) |
  333|    128|                               (u1 << 13));
  334|    128|        }
  335|    512|      }
  336|      2|      return true;
  337|      2|    }
ojph_block_common.cpp:_ZN4ojph5localL20uvlc_init_wide_tableEv:
  347|      2|    {
  348|      2|      static const ui8 dec[8] = {
  349|      2|        3 | (5 << 2) | (5 << 5), //000
  350|      2|        1 | (0 << 2) | (1 << 5), //xx1
  351|      2|        2 | (0 << 2) | (2 << 5), //x10
  352|      2|        1 | (0 << 2) | (1 << 5), //xx1
  353|      2|        3 | (1 << 2) | (3 << 5), //100
  354|      2|        1 | (0 << 2) | (1 << 5), //xx1
  355|      2|        2 | (0 << 2) | (2 << 5), //x10
  356|      2|        1 | (0 << 2) | (1 << 5)  //xx1
  357|      2|      };
  358|       |
  359|  8.19k|      for (ui32 idx = 0; idx < 4096; ++idx)
  ------------------
  |  Branch (359:26): [True: 8.19k, False: 2]
  ------------------
  360|  8.19k|      {
  361|  8.19k|        ui32 mode = idx >> 10;       // 2 bits
  362|  8.19k|        ui32 vlc = idx & 0x3FF;      // 10 bits
  363|       |
  364|  8.19k|        if (mode == 0) {
  ------------------
  |  Branch (364:13): [True: 2.04k, False: 6.14k]
  ------------------
  365|  2.04k|          uvlc_tbl1_wide[idx] = 0;
  366|  2.04k|          continue;
  367|  2.04k|        }
  368|       |
  369|  6.14k|        if (mode <= 2) // single UVLC (one u_off set)
  ------------------
  |  Branch (369:13): [True: 4.09k, False: 2.04k]
  ------------------
  370|  4.09k|        {
  371|  4.09k|          ui32 d = dec[vlc & 0x7];
  372|  4.09k|          ui32 prefix_len = d & 0x3;
  373|  4.09k|          ui32 suffix_len = (d >> 2) & 0x7;
  374|  4.09k|          ui32 u_pfx = d >> 5;
  375|  4.09k|          ui32 suffix_val = (vlc >> prefix_len) & ((1u << suffix_len) - 1);
  376|  4.09k|          ui32 u_val = u_pfx + suffix_val;
  377|  4.09k|          ui32 total = prefix_len + suffix_len;
  378|  4.09k|          ui32 u_q0 = (mode == 1) ? u_val : 0;
  ------------------
  |  Branch (378:23): [True: 2.04k, False: 2.04k]
  ------------------
  379|  4.09k|          ui32 u_q1 = (mode == 2) ? u_val : 0;
  ------------------
  |  Branch (379:23): [True: 2.04k, False: 2.04k]
  ------------------
  380|  4.09k|          uvlc_tbl1_wide[idx] = total | (u_q0 << 5) | (u_q1 << 13);
  381|  4.09k|          continue;
  382|  4.09k|        }
  383|       |
  384|       |        // mode == 3: both u_off set
  385|       |        // Bitstream layout: [prefix0][prefix1][suffix0][suffix1]
  386|  2.04k|        ui32 d0 = dec[vlc & 0x7];
  387|  2.04k|        ui32 p0_len = d0 & 0x3;
  388|  2.04k|        ui32 s0_len = (d0 >> 2) & 0x7;
  389|  2.04k|        ui32 u0_pfx = d0 >> 5;
  390|       |
  391|  2.04k|        ui32 vlc1 = vlc >> p0_len;  // consume prefix0
  392|  2.04k|        ui32 d1 = dec[vlc1 & 0x7];
  393|  2.04k|        ui32 p1_len = d1 & 0x3;
  394|  2.04k|        ui32 s1_len = (d1 >> 2) & 0x7;
  395|  2.04k|        ui32 u1_pfx = d1 >> 5;
  396|       |
  397|  2.04k|        ui32 total_prefix = p0_len + p1_len;
  398|  2.04k|        ui32 total_suffix = s0_len + s1_len;
  399|  2.04k|        ui32 total = total_prefix + total_suffix;
  400|       |
  401|  2.04k|        if (total > 10) {
  ------------------
  |  Branch (401:13): [True: 96, False: 1.95k]
  ------------------
  402|     96|          uvlc_tbl1_wide[idx] = 0x1F; // fallback sentinel
  403|     96|          continue;
  404|     96|        }
  405|       |
  406|       |        // suffixes follow both prefixes in the bitstream
  407|  1.95k|        ui32 suffix_bits = vlc >> total_prefix;
  408|  1.95k|        ui32 s0_val = suffix_bits & ((1u << s0_len) - 1);
  409|  1.95k|        ui32 s1_val = (suffix_bits >> s0_len) & ((1u << s1_len) - 1);
  410|       |
  411|  1.95k|        ui32 u_q0 = u0_pfx + s0_val;
  412|  1.95k|        ui32 u_q1 = u1_pfx + s1_val;
  413|  1.95k|        uvlc_tbl1_wide[idx] = total | (u_q0 << 5) | (u_q1 << 13);
  414|  1.95k|      }
  415|      2|      return true;
  416|      2|    }

ojph_codestream.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codestream_local.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_params.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_tile.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_tile_comp.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_file.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_mem.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_message.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_colour.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_transform.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_colour_sse.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_transform_sse.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_colour_sse2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_transform_sse2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_colour_avx.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_transform_avx.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_colour_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_transform_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_transform_avx512.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_resolution.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_subband.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_arch.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codeblock.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codeblock_fun.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codestream_gen.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_precinct.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_decoder32.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_decoder64.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_encoder.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codestream_sse.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codestream_sse2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_decoder_ssse3.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codestream_avx.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_codestream_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_decoder_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_encoder_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }
ojph_block_encoder_avx512.cpp:_ZN4ojphL19count_leading_zerosEj:
  208|      2|  {
  209|       |  #ifdef OJPH_COMPILER_MSVC
  210|       |    unsigned long result = 0;
  211|       |    _BitScanReverse(&result, val);
  212|       |    return 31 ^ (ui32)result;
  213|       |  #elif (defined OJPH_COMPILER_GNUC)
  214|       |    return (ui32)__builtin_clz(val);
  215|       |  #else
  216|       |    val |= (val >> 1);
  217|       |    val |= (val >> 2);
  218|       |    val |= (val >> 4);
  219|       |    val |= (val >> 8);
  220|       |    val |= (val >> 16);
  221|       |    return 32 - population_count(val);
  222|       |  #endif
  223|      2|  }

_ZN4ojph9run_cpuidEjjPj:
   54|      4|  {
   55|       |  #ifdef OJPH_COMPILER_MSVC
   56|       |    __cpuidex((int *)abcd, eax, ecx);
   57|       |  #else
   58|      4|    uint32_t ebx = 0, edx = 0;
   59|       |  #if defined( __i386__ ) && defined ( __PIC__ )
   60|       |    /* in case of PIC under 32-bit EBX cannot be clobbered */
   61|       |    __asm__ ( "movl %%ebx, %%edi \n\t cpuid \n\t xchgl %%ebx, %%edi"
   62|       |              : "=D" (ebx), "+a" (eax), "+c" (ecx), "=d" (edx) );
   63|       |  #else
   64|      4|    __asm__ ( "cpuid" : "+b" (ebx), "+a" (eax), "+c" (ecx), "=d" (edx) );
   65|      4|  #endif
   66|      4|    abcd[0] = eax; abcd[1] = ebx; abcd[2] = ecx; abcd[3] = edx;
   67|      4|  #endif
   68|      4|    return true;
   69|      4|  }
_ZN4ojph8read_xcrEj:
   73|      2|  {
   74|       |  #ifdef OJPH_COMPILER_MSVC
   75|       |    return _xgetbv(index);
   76|       |  #else
   77|      2|    uint32_t eax = 0, edx = 0;
   78|      2|    __asm__ ( "xgetbv" : "=a" (eax), "=d" (edx) : "c" (index) );
   79|      2|    return ((uint64_t)edx << 32) | eax;
   80|      2|  #endif
   81|      2|  }
_ZN4ojph18init_cpu_ext_levelERi:
   85|      2|  {
   86|      2|    uint32_t mmx_abcd[4];
   87|      2|    run_cpuid(1, 0, mmx_abcd);
   88|      2|    bool mmx_avail = ((mmx_abcd[3] & 0x00800000) == 0x00800000);
   89|       |
   90|      2|    level = 0;
   91|      2|    if (mmx_avail)
  ------------------
  |  Branch (91:9): [True: 2, False: 0]
  ------------------
   92|      2|    {
   93|      2|      level = X86_CPU_EXT_LEVEL_MMX;
   94|      2|      bool sse_avail = ((mmx_abcd[3] & 0x02000000) == 0x02000000);
   95|      2|      if (sse_avail)
  ------------------
  |  Branch (95:11): [True: 2, False: 0]
  ------------------
   96|      2|      {
   97|      2|        level = X86_CPU_EXT_LEVEL_SSE;
   98|      2|        bool sse2_avail = ((mmx_abcd[3] & 0x04000000) == 0x04000000);
   99|      2|        if (sse2_avail)
  ------------------
  |  Branch (99:13): [True: 2, False: 0]
  ------------------
  100|      2|        {
  101|      2|          level = X86_CPU_EXT_LEVEL_SSE2;
  102|      2|          bool sse3_avail = ((mmx_abcd[2] & 0x00000001) == 0x00000001);
  103|      2|          if (sse3_avail)
  ------------------
  |  Branch (103:15): [True: 2, False: 0]
  ------------------
  104|      2|          {
  105|      2|            level = X86_CPU_EXT_LEVEL_SSE3;
  106|      2|            bool ssse3_avail = ((mmx_abcd[2] & 0x00000200) == 0x00000200);
  107|      2|            if (ssse3_avail)
  ------------------
  |  Branch (107:17): [True: 2, False: 0]
  ------------------
  108|      2|            {
  109|      2|              level = X86_CPU_EXT_LEVEL_SSSE3;
  110|      2|              bool sse41_avail = ((mmx_abcd[2] & 0x00080000) == 0x00080000);
  111|      2|              if (sse41_avail) {
  ------------------
  |  Branch (111:19): [True: 2, False: 0]
  ------------------
  112|      2|                level = X86_CPU_EXT_LEVEL_SSE41;
  113|      2|                bool sse42_avail = ((mmx_abcd[2] & 0x00100000) == 0x00100000);
  114|      2|                if (sse42_avail)
  ------------------
  |  Branch (114:21): [True: 2, False: 0]
  ------------------
  115|      2|                {
  116|      2|                  level = X86_CPU_EXT_LEVEL_SSE42;
  117|       |                  
  118|      2|                  uint64_t xcr_val = 0;
  119|      2|                  bool osxsave_avail, ymm_avail, avx_avail = false;
  120|      2|                  osxsave_avail = ((mmx_abcd[2] & 0x08000000) == 0x08000000);
  121|      2|                  if (osxsave_avail)
  ------------------
  |  Branch (121:23): [True: 2, False: 0]
  ------------------
  122|      2|                  {
  123|      2|                    xcr_val = read_xcr(0); // _XCR_XFEATURE_ENABLED_MASK = 0
  124|      2|                    ymm_avail = osxsave_avail && ((xcr_val & 0x6) == 0x6);
  ------------------
  |  Branch (124:33): [True: 2, False: 0]
  |  Branch (124:50): [True: 2, False: 0]
  ------------------
  125|      2|                    avx_avail = ymm_avail && (mmx_abcd[2] & 0x10000000);
  ------------------
  |  Branch (125:33): [True: 2, False: 0]
  |  Branch (125:46): [True: 2, False: 0]
  ------------------
  126|      2|                  }
  127|      2|                  if (avx_avail)
  ------------------
  |  Branch (127:23): [True: 2, False: 0]
  ------------------
  128|      2|                  {
  129|      2|                    level = X86_CPU_EXT_LEVEL_AVX;
  130|       |
  131|      2|                    uint32_t avx2_abcd[4];
  132|      2|                    run_cpuid(7, 0, avx2_abcd);
  133|      2|                    bool avx2_avail = (avx2_abcd[1] & 0x20) != 0;
  134|      2|                    if (avx2_avail)
  ------------------
  |  Branch (134:25): [True: 2, False: 0]
  ------------------
  135|      2|                    {
  136|      2|                      level = X86_CPU_EXT_LEVEL_AVX2;
  137|      2|                      bool avx2fma_avail =
  138|      2|                        avx2_avail && ((mmx_abcd[2] & 0x1000) == 0x1000);
  ------------------
  |  Branch (138:25): [True: 2, False: 0]
  |  Branch (138:39): [True: 2, False: 0]
  ------------------
  139|      2|                      if (avx2fma_avail)
  ------------------
  |  Branch (139:27): [True: 2, False: 0]
  ------------------
  140|      2|                      {
  141|      2|                        level = X86_CPU_EXT_LEVEL_AVX2FMA;
  142|       |
  143|      2|                        bool zmm_avail =
  144|      2|                          osxsave_avail && ((xcr_val & 0xE0) == 0xE0);
  ------------------
  |  Branch (144:27): [True: 2, False: 0]
  |  Branch (144:44): [True: 0, False: 2]
  ------------------
  145|      2|                        bool avx512f_avail = (avx2_abcd[1] & 0x10000) != 0;
  146|      2|                        bool avx512cd_avail = (avx2_abcd[1] & 0x10000000) != 0;
  147|      2|                        bool avx512bw_avail = (avx2_abcd[1] & 0x40000000) != 0;
  148|      2|                        bool avx512vl_avail =
  149|      2|                          (avx2_abcd[1] & 0x80000000u) != 0;
  150|      2|                        bool avx512_avail = zmm_avail && avx512f_avail
  ------------------
  |  Branch (150:45): [True: 0, False: 2]
  |  Branch (150:58): [True: 0, False: 0]
  ------------------
  151|      0|                          && avx512cd_avail && avx512bw_avail
  ------------------
  |  Branch (151:30): [True: 0, False: 0]
  |  Branch (151:48): [True: 0, False: 0]
  ------------------
  152|      0|                          && avx512vl_avail;
  ------------------
  |  Branch (152:30): [True: 0, False: 0]
  ------------------
  153|      2|                        if (avx512_avail)
  ------------------
  |  Branch (153:29): [True: 0, False: 2]
  ------------------
  154|      0|                          level = X86_CPU_EXT_LEVEL_AVX512;
  155|      2|                      }
  156|      2|                    }
  157|      2|                  }
  158|      2|                }
  159|      2|              }
  160|      2|            }
  161|      2|          }
  162|      2|        }
  163|      2|      }
  164|      2|    }
  165|      2|    return true;
  166|      2|  }

_ZN5vvdec12PelBufferOpsC2Ev:
  341|      2|{
  342|      2|  addAvg4  = addAvgCore<Pel>;
  343|      2|  addAvg8  = addAvgCore<Pel>;
  344|      2|  addAvg16 = addAvgCore<Pel>;
  345|       |
  346|      2|  reco4 = reconstructCore<Pel>;
  347|      2|  reco8 = reconstructCore<Pel>;
  348|       |
  349|      2|  linTf4 = linTfCore<Pel>;
  350|      2|  linTf8 = linTfCore<Pel>;
  351|       |
  352|      2|  wghtAvg4 = addWeightedAvgCore<Pel>;
  353|      2|  wghtAvg8 = addWeightedAvgCore<Pel>;
  354|       |
  355|      2|  copyBuffer = copyBufferCore;
  356|       |
  357|      2|  transpose4x4 = transpose4x4Core<Pel>;
  358|      2|  transpose8x8 = transpose8x8Core<Pel>;
  359|       |
  360|      2|  applyLut = applyLutCore;
  361|      2|  rspFwd   = rspFwdCore;
  362|      2|  rspBcw   = nullptr;
  363|       |
  364|      2|  fillN_CU = fillN_CuCore;
  365|       |
  366|      2|  sampleRateConv = sampleRateConvCore;
  367|      2|}

_ZN5vvdec6CtxSetC2ESt16initializer_listIS0_E:
   82|      4|{
   83|      4|  uint16_t minOffset = std::numeric_limits<uint16_t>::max();
   84|      4|  uint16_t maxOffset = 0;
   85|      4|  for( auto& set: ctxSets )
  ------------------
  |  Branch (85:17): [True: 10, False: 4]
  ------------------
   86|     10|  {
   87|     10|    minOffset = std::min<uint16_t>( minOffset, set.Offset );
   88|     10|    maxOffset = std::max<uint16_t>( maxOffset, set.Offset + set.Size );
   89|     10|  }
   90|      4|  Offset = minOffset;
   91|      4|  Size   = maxOffset - minOffset;
   92|      4|}
_ZN5vvdec13ContextSetCfg9addCtxSetESt16initializer_listIS1_IhEE:
  103|    164|{
  104|    164|  const std::size_t startIdx  = sm_InitTables[0].size();
  105|    164|  const std::size_t numValues = ( *initSet2d.begin() ).size();
  106|    164|        std::size_t setId     = 0;
  107|    164|  for( auto& initSet: initSet2d )
  ------------------
  |  Branch (107:21): [True: 656, False: 164]
  ------------------
  108|    656|  {
  109|    656|    if( setId >= sm_InitTables.size() )
  ------------------
  |  Branch (109:9): [True: 0, False: 656]
  ------------------
  110|      0|      break;
  111|       |
  112|    656|    CHECK( initSet.size() != numValues,
  ------------------
  |  |  830|    656|#define CHECK( cond, msg )             { if UNLIKELY( cond ) { THROW_RECOVERABLE( msg << "\nERROR CONDITION: "   << #cond ); } }
  |  |  ------------------
  |  |  |  |  793|    656|#    define UNLIKELY( expr ) ( expr ) [[unlikely]]
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (793:32): [True: 0, False: 656]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CHECK( cond, msg )             { if UNLIKELY( cond ) { THROW_RECOVERABLE( msg << "\nERROR CONDITION: "   << #cond ); } }
  |  |  ------------------
  |  |  |  |  820|      0|#  define THROW_RECOVERABLE( msg )     throw( RecoverableException       ( "\nERROR: " ) << FMT_ERROR_LOCATION << msg )
  |  |  |  |  ------------------
  |  |  |  |  |  |  813|      0|#define FMT_ERROR_LOCATION "In function \"" << __PRETTY_FUNCTION__ << "\" in " << __FILE__ ":" << __LINE__ << ": "
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|    656|                       "Number of init values do not match for all sets (" << initSet.size() << " != " << numValues << ")." );
  114|       |
  115|    656|    for( auto& elemIter: initSet )
  ------------------
  |  Branch (115:24): [True: 2.97k, False: 656]
  ------------------
  116|  2.97k|    {
  117|  2.97k|      sm_InitTables[setId].push_back( elemIter );
  118|  2.97k|    }
  119|       |
  120|    656|    setId++;
  121|    656|  }
  122|    164|  return CtxSet( (uint16_t)startIdx, (uint16_t)numValues );
  123|    164|}

_ZN5vvdec6CtxSetC2Ett:
  154|    164|  CtxSet( uint16_t offset, uint16_t size ) : Offset( offset ), Size( size ) {}

_ZN5vvdec9TCoeffOpsC2Ev:
  408|      2|{
  409|      2|  cpyResiClip[0] = cpyResiClipCore; //  1
  410|      2|  cpyResiClip[1] = cpyResiClipCore; //  2
  411|      2|  cpyResiClip[2] = cpyResiClipCore; //  4
  412|      2|  cpyResiClip[3] = cpyResiClipCore; //  8
  413|      2|  cpyResiClip[4] = cpyResiClipCore; // 16
  414|      2|  cpyResiClip[5] = cpyResiClipCore; // 32
  415|      2|  cpyResiClip[6] = cpyResiClipCore; // 64
  416|      2|  roundClip4     = clipCore;
  417|      2|  roundClip8     = clipCore;
  418|      2|  fastInvCore[0] = fastInvCore_< 4>;
  419|      2|  fastInvCore[1] = fastInvCore_< 8>;
  420|      2|  fastInvCore[2] = fastInvCore_<16>;
  421|      2|  fastInvCore[3] = fastInvCore_<32>;
  422|      2|  fastInvCore[4] = fastInvCore_<64>;
  423|      2|}

ThreadPool.cpp:_ZNK5vvdec3$_0clEv:
   59|      2|const static auto VVDEC_BUSY_WAIT_TIME_MIN = [] {
   60|      2|  const char* env = getenv( "VVDEC_BUSY_WAIT_TIME_MIN" );
   61|      2|  if( env )
  ------------------
  |  Branch (61:7): [True: 0, False: 2]
  ------------------
   62|      0|    return std::chrono::microseconds( int( atof( env ) * 1000 ) );
   63|      2|  return std::chrono::microseconds( 1ms );
   64|      2|}();
ThreadPool.cpp:_ZNK5vvdec3$_1clEv:
   67|      2|const static auto VVDEC_BUSY_WAIT_TIME_MAX = [] {
   68|      2|  const char* env = getenv( "VVDEC_BUSY_WAIT_TIME_MAX" );
   69|      2|  if( env )
  ------------------
  |  Branch (69:7): [True: 0, False: 2]
  ------------------
   70|      0|    return atoi( env ) * 1ms;
   71|      2|  return 5ms;
   72|      2|}();

_ZN5vvenc12PelBufferOpsC2Ev:
  438|      2|{
  439|      2|  addAvg            = addAvgCore<Pel>;
  440|      2|  reco              = recoCore<Pel>;
  441|      2|  copyClip          = copyClipCore<Pel>;
  442|      2|  roundGeo          = roundGeoCore<Pel>;
  443|       |
  444|      2|  addAvg4           = addAvgCore<Pel>;
  445|      2|  addAvg8           = addAvgCore<Pel>;
  446|      2|  addAvg16          = addAvgCore<Pel>;
  447|       |
  448|      2|  sub4              = subsCore<Pel>;
  449|      2|  sub8              = subsCore<Pel>;
  450|       |
  451|      2|  wghtAvg4          = addWeightedAvgCore<Pel>;
  452|      2|  wghtAvg8          = addWeightedAvgCore<Pel>;
  453|       |
  454|      2|  copyClip4         = copyClipCore<Pel>;
  455|      2|  copyClip8         = copyClipCore<Pel>;
  456|       |
  457|      2|  reco4             = reconstructCore<Pel>;
  458|      2|  reco8             = reconstructCore<Pel>;
  459|       |
  460|      2|  linTf4            = linTfCore<Pel>;
  461|      2|  linTf8            = linTfCore<Pel>;
  462|       |
  463|      2|  copyBuffer        = copyBufferCore;
  464|       |
  465|      2|  removeHighFreq8   = removeHighFreq;
  466|      2|  removeHighFreq4   = removeHighFreq;
  467|       |
  468|      2|  transpose4x4      = transposeNxNCore<Pel,4>;
  469|      2|  transpose8x8      = transposeNxNCore<Pel,8>;
  470|      2|  mipMatrixMul_4_4  = mipMatrixMulCore<4,4>;
  471|      2|  mipMatrixMul_8_4  = mipMatrixMulCore<8,4>;
  472|      2|  mipMatrixMul_8_8  = mipMatrixMulCore<8,8>;
  473|      2|  weightCiip        = weightCiipCore;
  474|      2|  roundIntVector    = nullptr;
  475|       |
  476|      2|  fillPtrMap        = fillMapPtr_Core;
  477|      2|  AvgHighPassWithDownsampling = AvgHighPassWithDownsamplingCore;
  478|      2|  AvgHighPass = AvgHighPassCore;
  479|      2|  AvgHighPassWithDownsamplingDiff1st = AvgHighPassWithDownsamplingDiff1stCore;
  480|      2|  AvgHighPassWithDownsamplingDiff2nd = AvgHighPassWithDownsamplingDiff2ndCore;
  481|      2|  HDHighPass = HDHighPassCore;
  482|      2|  HDHighPass2 = HDHighPass2Core;
  483|      2|}

_ZN5vvenc9UnitScaleC2Eii:
  127|      2|  UnitScale( int sx, int sy ) : posx(sx), posy(sy), area(posx+posy) {}

Rom.cpp:_ZN5vvencL5Clip3IiEET_S1_S1_S1_:
  568|   150k|template <typename T> constexpr static inline T Clip3  ( const T minVal, const T maxVal, const T a) { return std::min<T> (std::max<T> (minVal, a) , maxVal); }  ///< general min/max clip

_ZN5vvenc6CtxSetC2ESt16initializer_listIS0_E:
  151|      4|{
  152|      4|  uint16_t  minOffset = std::numeric_limits<uint16_t>::max();
  153|      4|  uint16_t  maxOffset = 0;
  154|     14|  for( auto iter = ctxSets.begin(); iter != ctxSets.end(); iter++ )
  ------------------
  |  Branch (154:37): [True: 10, False: 4]
  ------------------
  155|     10|  {
  156|     10|    minOffset = std::min<uint16_t>( minOffset, (*iter).Offset              );
  157|     10|    maxOffset = std::max<uint16_t>( maxOffset, (*iter).Offset+(*iter).Size );
  158|     10|  }
  159|      4|  Offset  = minOffset;
  160|      4|  Size    = maxOffset - minOffset;
  161|      4|}
_ZN5vvenc13ContextSetCfg9addCtxSetESt16initializer_listIS1_IhEE:
  176|    164|{
  177|    164|  const std::size_t startIdx  = sm_InitTables[0].size();
  178|    164|  const std::size_t numValues = ( *initSet2d.begin() ).size();
  179|    164|        std::size_t setId     = 0;
  180|    820|  for( auto setIter = initSet2d.begin(); setIter != initSet2d.end() && setId < sm_InitTables.size(); setIter++, setId++ )
  ------------------
  |  Branch (180:42): [True: 656, False: 164]
  |  Branch (180:72): [True: 656, False: 0]
  ------------------
  181|    656|  {
  182|    656|    const std::initializer_list<uint8_t>& initSet   = *setIter;
  183|    656|    std::vector<uint8_t>&           initTable = sm_InitTables[setId];
  184|    656|    CHECK( initSet.size() != numValues,
  ------------------
  |  |  636|    656|#define CHECK(c,x)          if(c){ THROW(x); }
  |  |  ------------------
  |  |  |  |  635|      0|#define THROW(x)            throw( Exception( "ERROR: In function \"" ) << __FUNCTION__ << "\" in " << __FILE__ << ":" << __LINE__ << ": " << x )
  |  |  ------------------
  |  |  |  Branch (636:32): [True: 0, False: 656]
  |  |  ------------------
  ------------------
  185|    656|           "Number of init values do not match for all sets (" << initSet.size() << " != " << numValues << ")." );
  186|    656|    initTable.resize( startIdx + numValues );
  187|    656|    std::size_t elemId = startIdx;
  188|  3.60k|    for( auto elemIter = ( *setIter ).begin(); elemIter != ( *setIter ).end(); elemIter++, elemId++ )
  ------------------
  |  Branch (188:48): [True: 2.95k, False: 656]
  ------------------
  189|  2.95k|    {
  190|  2.95k|      initTable[elemId] = *elemIter;
  191|  2.95k|    }
  192|    656|  }
  193|    164|  return CtxSet( (uint16_t)startIdx, (uint16_t)numValues );
  194|    164|}

_ZN5vvenc6CtxSetC2Ett:
  159|    164|  CtxSet( uint16_t offset, uint16_t size ) : Offset( offset ), Size( size ) {}
_ZN5vvenc6CtxSetC2ERKS0_:
  160|     10|  CtxSet( const CtxSet& ctxSet ) : Offset( ctxSet.Offset ), Size( ctxSet.Size ) {}

_ZN5vvenc2MvC2Eii:
   90|     36|  Mv( int iHor, int iVer ) : hor( iHor ), ver( iVer ) {}

_ZNK5vvenc10InitGeoRom15initGeoTemplateEv:
 1305|      2|{
 1306|      2|  int modeIdx = 0;
 1307|     66|  for (int angleIdx = 0; angleIdx < GEO_NUM_ANGLES; angleIdx++)
  ------------------
  |  Branch (1307:26): [True: 64, False: 2]
  ------------------
 1308|     64|  {
 1309|    320|    for (int distanceIdx = 0; distanceIdx < GEO_NUM_DISTANCES; distanceIdx++)
  ------------------
  |  Branch (1309:31): [True: 256, False: 64]
  ------------------
 1310|    256|    {
 1311|    256|      if ((distanceIdx == 0 && angleIdx >= 16)
  ------------------
  |  Branch (1311:12): [True: 64, False: 192]
  |  Branch (1311:32): [True: 32, False: 32]
  ------------------
 1312|    224|          || ((distanceIdx == 2 || distanceIdx == 0) && (g_angle2mask[angleIdx] == 0 || g_angle2mask[angleIdx] == 5))
  ------------------
  |  Branch (1312:16): [True: 64, False: 160]
  |  Branch (1312:36): [True: 32, False: 128]
  |  Branch (1312:58): [True: 6, False: 90]
  |  Branch (1312:89): [True: 6, False: 84]
  ------------------
 1313|    212|          || g_angle2mask[angleIdx] == -1)
  ------------------
  |  Branch (1313:14): [True: 84, False: 128]
  ------------------
 1314|    128|        continue;
 1315|    128|      g_GeoParams[modeIdx][0] = (int16_t) angleIdx;
 1316|    128|      g_GeoParams[modeIdx][1] = (int16_t) distanceIdx;
 1317|    128|      modeIdx++;
 1318|    128|    }
 1319|     64|  }
 1320|     20|  for (int angleIdx = 0; angleIdx < (GEO_NUM_ANGLES >> 2) + 1; angleIdx++)
  ------------------
  |  Branch (1320:26): [True: 18, False: 2]
  ------------------
 1321|     18|  {
 1322|     18|    if (g_angle2mask[angleIdx] == -1)
  ------------------
  |  Branch (1322:9): [True: 6, False: 12]
  ------------------
 1323|      6|      continue;
 1324|       |
 1325|     12|    int     distanceX = angleIdx;
 1326|     12|    int     distanceY = (distanceX + (GEO_NUM_ANGLES >> 2)) % GEO_NUM_ANGLES;
 1327|     12|    int16_t rho = (g_Dis[distanceX] * 2 * GEO_MAX_CU_SIZE) + (g_Dis[distanceY] * 2 * GEO_MAX_CU_SIZE);
 1328|     12|    static const int16_t maskOffset = (2 * GEO_MAX_CU_SIZE - GEO_WEIGHT_MASK_SIZE) >> 1;
 1329|     12|    int                  index      = 0;
 1330|  1.35k|    for (int y = 0; y < GEO_WEIGHT_MASK_SIZE; y++)
  ------------------
  |  Branch (1330:21): [True: 1.34k, False: 12]
  ------------------
 1331|  1.34k|    {
 1332|  1.34k|      int16_t lookUpY = (((y + maskOffset) << 1) + 1) * g_Dis[distanceY];
 1333|   151k|      for (int x = 0; x < GEO_WEIGHT_MASK_SIZE; x++, index++)
  ------------------
  |  Branch (1333:23): [True: 150k, False: 1.34k]
  ------------------
 1334|   150k|      {
 1335|   150k|        int16_t sx_i                                         = ((x + maskOffset) << 1) + 1;
 1336|   150k|        int16_t weightIdx                                    = sx_i * g_Dis[distanceX] + lookUpY - rho;
 1337|   150k|        int     weightLinearIdx                              = 32 + weightIdx;
 1338|   150k|        g_globalGeoWeights[g_angle2mask[angleIdx]][index]    = Clip3(0, 8, (weightLinearIdx + 4) >> 3);
 1339|   150k|        g_globalGeoEncSADmask[g_angle2mask[angleIdx]][index] = weightIdx > 0 ? 1 : 0;
  ------------------
  |  Branch (1339:64): [True: 75.1k, False: 75.3k]
  ------------------
 1340|   150k|      }
 1341|  1.34k|    }
 1342|     12|  }
 1343|       |
 1344|     10|  for (int hIdx = 0; hIdx < GEO_NUM_CU_SIZE; hIdx++)
  ------------------
  |  Branch (1344:22): [True: 8, False: 2]
  ------------------
 1345|      8|  {
 1346|      8|    int16_t height = 1 << (hIdx + GEO_MIN_CU_LOG2);
 1347|     40|    for (int wIdx = 0; wIdx < GEO_NUM_CU_SIZE; wIdx++)
  ------------------
  |  Branch (1347:24): [True: 32, False: 8]
  ------------------
 1348|     32|    {
 1349|     32|      int16_t width = 1 << (wIdx + GEO_MIN_CU_LOG2);
 1350|  2.08k|      for (int splitDir = 0; splitDir < GEO_NUM_PARTITION_MODE; splitDir++)
  ------------------
  |  Branch (1350:30): [True: 2.04k, False: 32]
  ------------------
 1351|  2.04k|      {
 1352|  2.04k|        int16_t angle    = g_GeoParams[splitDir][0];
 1353|  2.04k|        int16_t distance = g_GeoParams[splitDir][1];
 1354|  2.04k|        int16_t offsetX  = (GEO_WEIGHT_MASK_SIZE - width) >> 1;
 1355|  2.04k|        int16_t offsetY  = (GEO_WEIGHT_MASK_SIZE - height) >> 1;
 1356|  2.04k|        if (distance > 0)
  ------------------
  |  Branch (1356:13): [True: 1.79k, False: 256]
  ------------------
 1357|  1.79k|        {
 1358|  1.79k|          if (angle % 16 == 8 || (angle % 16 != 0 && height >= width))
  ------------------
  |  Branch (1358:15): [True: 128, False: 1.66k]
  |  Branch (1358:35): [True: 1.53k, False: 128]
  |  Branch (1358:54): [True: 960, False: 576]
  ------------------
 1359|  1.08k|          {
 1360|  1.08k|            offsetY += angle < 16 ? ((distance * (int32_t) height) >> 3) : -((distance * (int32_t) height) >> 3);
  ------------------
  |  Branch (1360:24): [True: 544, False: 544]
  ------------------
 1361|  1.08k|          }
 1362|    704|          else
 1363|    704|          {
 1364|    704|            offsetX += angle < 16 ? ((distance * (int32_t) width) >> 3) : -((distance * (int32_t) width) >> 3);
  ------------------
  |  Branch (1364:24): [True: 352, False: 352]
  ------------------
 1365|    704|          }
 1366|  1.79k|        }
 1367|  2.04k|        g_weightOffset[hIdx][wIdx][splitDir][0] = offsetX;
 1368|  2.04k|        g_weightOffset[hIdx][wIdx][splitDir][1] = offsetY;
 1369|  2.04k|      }
 1370|     32|    }
 1371|      8|  }
 1372|      2|}

_ZN5vvenc10InitGeoRomC2Ev:
   91|      2|    InitGeoRom() { initGeoTemplate(); }

_ZN5vvenc9TCoeffOpsC2Ev:
 2004|      2|{
 2005|      2|  cpyResi4        = cpyResiCore;
 2006|      2|  cpyResi8        = cpyResiCore;
 2007|      2|  cpyCoeff4       = cpyCoeffCore;
 2008|      2|  cpyCoeff8       = cpyCoeffCore;
 2009|      2|  roundClip4      = clipCore;
 2010|      2|  roundClip8      = clipCore;
 2011|      2|  fastInvCore[0]  = fastInvCore_< 4>;
 2012|      2|  fastInvCore[1]  = fastInvCore_< 8>;
 2013|      2|  fastInvCore[2]  = fastInvCore_<16>;
 2014|      2|  fastInvCore[3]  = fastInvCore_<32>;
 2015|      2|  fastInvCore[4]  = fastInvCore_<64>;
 2016|      2|  fastFwdCore_1D[0] = fastFwdCore< 4>;
 2017|      2|  fastFwdCore_1D[1] = fastFwdCore< 8>;
 2018|      2|  fastFwdCore_1D[2] = fastFwdCore<16>;
 2019|      2|  fastFwdCore_1D[3] = fastFwdCore<32>;
 2020|      2|  fastFwdCore_1D[4] = fastFwdCore<64>;
 2021|      2|  fastFwdCore_2D[0] = fastFwdCore< 4>;
 2022|      2|  fastFwdCore_2D[1] = fastFwdCore< 8>;
 2023|      2|  fastFwdCore_2D[2] = fastFwdCore<16>;
 2024|      2|  fastFwdCore_2D[3] = fastFwdCore<32>;
 2025|      2|  fastFwdCore_2D[4] = fastFwdCore<64>;
 2026|      2|}

vvencimpl.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
EncLib.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
NoMallocThreadPool.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
MCTF.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
EncGOP.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
EncPicture.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
EncSlice.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
EncAdaptiveLoopFilter.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
EncCu.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();
IntraSearch.cpp:_ZNK5vvenc3$_0clEv:
   85|      2|const static auto BUSY_WAIT_TIME = [] {
   86|      2|  const char *env = getenv( "BUSY_WAIT_TIME" );
   87|      2|  if( env )
  ------------------
  |  Branch (87:7): [True: 0, False: 2]
  ------------------
   88|      0|    return std::chrono::milliseconds( atoi( env ) );
   89|      2|  return std::chrono::milliseconds( 1 );
   90|      2|}();

_ZN8apputils15program_options13ErrorReporterC2Ev:
   80|      2|  ErrorReporter() : is_errored(0) {}

_ZN4x2652MVC2Eii:
   49|     98|    MV(int32_t _x, int32_t _y) : x(_x), y(_y)  {}

