LLVMFuzzerTestOneInput:
   29|  15.0k|{
   30|  15.0k|  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|  15.0k|  HeifContext ctx;
   37|  15.0k|  ctx.get_security_limits()->max_total_memory = UINT64_C(2) * 1024 * 1024 * 1024;
   38|       |
   39|  15.0k|  BitstreamRange range(reader, size);
   40|   143k|  for (;;) {
   41|   143k|    std::shared_ptr<Box> box;
   42|   143k|    Error error = Box::read(range, &box, ctx.get_security_limits());
   43|   143k|    if (error != Error::Ok || range.error()) {
  ------------------
  |  Branch (43:9): [True: 15.0k, False: 128k]
  |  Branch (43:31): [True: 0, False: 128k]
  ------------------
   44|  15.0k|      break;
   45|  15.0k|    }
   46|       |
   47|   128k|    box->get_type();
   48|   128k|    box->get_type_string();
   49|   128k|    Indent indent;
   50|   128k|    box->dump_to_string(indent);
   51|   128k|  }
   52|       |
   53|  15.0k|  return 0;
   54|  15.0k|}

heif_polarization_angle_is_no_filter:
  587|  36.5k|{
  588|  36.5k|  uint32_t bits;
  589|  36.5k|  memcpy(&bits, &angle, sizeof(bits));
  590|  36.5k|  return bits == 0xFFFFFFFF;
  591|  36.5k|}

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

_ZN19StreamReader_memoryC2EPKhmb:
   78|  15.0k|    : m_length(size)
   79|  15.0k|{
   80|  15.0k|  if (copy) {
  ------------------
  |  Branch (80:7): [True: 0, False: 15.0k]
  ------------------
   81|      0|    m_owned_data = new uint8_t[m_length];
   82|      0|    if (size > 0) { // memcpy() from a NULL pointer is UB even for size 0 (until C2y/N3322), see read()
  ------------------
  |  Branch (82:9): [True: 0, False: 0]
  ------------------
   83|      0|      memcpy(m_owned_data, data, size);
   84|      0|    }
   85|       |
   86|      0|    m_data = m_owned_data;
   87|      0|  }
   88|  15.0k|  else {
   89|  15.0k|    m_data = data;
   90|  15.0k|  }
   91|  15.0k|}
_ZN19StreamReader_memoryD2Ev:
   94|  15.0k|{
   95|  15.0k|  if (m_owned_data) {
  ------------------
  |  Branch (95:7): [True: 0, False: 15.0k]
  ------------------
   96|      0|    delete[] m_owned_data;
   97|      0|  }
   98|  15.0k|}
_ZNK19StreamReader_memory12get_positionEv:
  101|   740k|{
  102|   740k|  return m_position;
  103|   740k|}
_ZN19StreamReader_memory18wait_for_file_sizeEm:
  106|   642k|{
  107|   642k|  return (target_size > m_length) ? grow_status::size_beyond_eof : grow_status::size_reached;
  ------------------
  |  Branch (107:10): [True: 9.76k, False: 632k]
  ------------------
  108|   642k|}
_ZN19StreamReader_memory4readEPvm:
  111|  19.3M|{
  112|  19.3M|  uint64_t end_pos = m_position + size;
  113|  19.3M|  if (end_pos > m_length) {
  ------------------
  |  Branch (113:7): [True: 0, False: 19.3M]
  ------------------
  114|      0|    return false;
  115|      0|  }
  116|       |
  117|       |  // Do not call memcpy() with a NULL pointer, even when size == 0. 'data' is NULL when the
  118|       |  // caller reads into an empty std::vector (e.g. a box with an empty payload), and passing
  119|       |  // NULL to memcpy() is undefined behaviour in C17 and C++. It trips UBSan's nonnull-attribute
  120|       |  // check on glibc's memcpy() declaration. C2y (WG14 N3322) makes zero-length operations on
  121|       |  // NULL pointers well-defined, but we cannot rely on that for many years.
  122|  19.3M|  if (size > 0) {
  ------------------
  |  Branch (122:7): [True: 19.2M, False: 39.5k]
  ------------------
  123|  19.2M|    memcpy(data, &m_data[m_position], size);
  124|  19.2M|  }
  125|  19.3M|  m_position += size;
  126|       |
  127|  19.3M|  return true;
  128|  19.3M|}
_ZN19StreamReader_memory4seekEm:
  131|  82.0k|{
  132|  82.0k|  if (position > m_length)
  ------------------
  |  Branch (132:7): [True: 0, False: 82.0k]
  ------------------
  133|      0|    return false;
  134|       |
  135|  82.0k|  m_position = position;
  136|  82.0k|  return true;
  137|  82.0k|}
_ZN14BitstreamRangeC2ENSt3__110shared_ptrI12StreamReaderEEmPS_:
  165|   330k|    : m_istr(std::move(istr)), m_parent_range(parent), m_remaining(length)
  166|   330k|{
  167|   330k|  if (parent) {
  ------------------
  |  Branch (167:7): [True: 315k, False: 15.0k]
  ------------------
  168|   315k|    m_nesting_level = parent->m_nesting_level + 1;
  169|   315k|  }
  170|   330k|}
_ZN14BitstreamRange5read8Ev:
  193|  5.20M|{
  194|  5.20M|  if (!prepare_read(1)) {
  ------------------
  |  Branch (194:7): [True: 109k, False: 5.09M]
  ------------------
  195|   109k|    return 0;
  196|   109k|  }
  197|       |
  198|  5.09M|  uint8_t buf;
  199|       |
  200|  5.09M|  auto istr = get_istream();
  201|  5.09M|  bool success = istr->read((char*) &buf, 1);
  202|       |
  203|  5.09M|  if (!success) {
  ------------------
  |  Branch (203:7): [True: 0, False: 5.09M]
  ------------------
  204|      0|    set_eof_while_reading();
  205|      0|    return 0;
  206|      0|  }
  207|       |
  208|  5.09M|  return buf;
  209|  5.09M|}
_ZN14BitstreamRange6read16Ev:
  213|  2.67M|{
  214|  2.67M|  if (!prepare_read(2)) {
  ------------------
  |  Branch (214:7): [True: 18.3k, False: 2.65M]
  ------------------
  215|  18.3k|    return 0;
  216|  18.3k|  }
  217|       |
  218|  2.65M|  uint8_t buf[2];
  219|       |
  220|  2.65M|  auto istr = get_istream();
  221|  2.65M|  bool success = istr->read((char*) buf, 2);
  222|       |
  223|  2.65M|  if (!success) {
  ------------------
  |  Branch (223:7): [True: 0, False: 2.65M]
  ------------------
  224|      0|    set_eof_while_reading();
  225|      0|    return 0;
  226|      0|  }
  227|       |
  228|  2.65M|  return static_cast<uint16_t>((buf[0] << 8) | (buf[1]));
  229|  2.65M|}
_ZN14BitstreamRange7read16sEv:
  233|   443k|{
  234|   443k|  uint16_t v = read16();
  235|       |
  236|   443k|  if (v & 0x8000) {
  ------------------
  |  Branch (236:7): [True: 22.7k, False: 420k]
  ------------------
  237|  22.7k|    auto val = static_cast<int16_t>((~v) & 0x7fff);
  238|  22.7k|    return static_cast<int16_t>(-val - 1);
  239|  22.7k|  }
  240|   420k|  else {
  241|   420k|    return static_cast<int16_t>(v);
  242|   420k|  }
  243|   443k|}
_ZN14BitstreamRange6read24Ev:
  247|    209|{
  248|    209|  if (!prepare_read(3)) {
  ------------------
  |  Branch (248:7): [True: 0, False: 209]
  ------------------
  249|      0|    return 0;
  250|      0|  }
  251|       |
  252|    209|  uint8_t buf[3];
  253|       |
  254|    209|  auto istr = get_istream();
  255|    209|  bool success = istr->read((char*) buf, 3);
  256|       |
  257|    209|  if (!success) {
  ------------------
  |  Branch (257:7): [True: 0, False: 209]
  ------------------
  258|      0|    set_eof_while_reading();
  259|      0|    return 0;
  260|      0|  }
  261|       |
  262|    209|  return (uint32_t) ((buf[0] << 16) |
  263|    209|                     (buf[1] << 8) |
  264|    209|                     (buf[2]));
  265|    209|}
_ZN14BitstreamRange6read32Ev:
  268|   928M|{
  269|   928M|  if (!prepare_read(4)) {
  ------------------
  |  Branch (269:7): [True: 924M, False: 3.78M]
  ------------------
  270|   924M|    return 0;
  271|   924M|  }
  272|       |
  273|  3.78M|  uint8_t buf[4];
  274|       |
  275|  3.78M|  auto istr = get_istream();
  276|  3.78M|  bool success = istr->read((char*) buf, 4);
  277|       |
  278|  3.78M|  if (!success) {
  ------------------
  |  Branch (278:7): [True: 0, False: 3.78M]
  ------------------
  279|      0|    set_eof_while_reading();
  280|      0|    return 0;
  281|      0|  }
  282|       |
  283|  3.78M|  return four_bytes_to_uint32(buf[0], buf[1], buf[2], buf[3]);
  284|  3.78M|}
_ZN14BitstreamRange9read_uintEi:
  288|   605k|{
  289|   605k|  switch (len)
  290|   605k|  {
  291|   503k|    case 8:
  ------------------
  |  Branch (291:5): [True: 503k, False: 102k]
  ------------------
  292|   503k|      return read8();
  293|   100k|    case 16:
  ------------------
  |  Branch (293:5): [True: 100k, False: 505k]
  ------------------
  294|   100k|      return read16();
  295|    209|    case 24:
  ------------------
  |  Branch (295:5): [True: 209, False: 605k]
  ------------------
  296|    209|      return read24();
  297|  1.72k|    case 32:
  ------------------
  |  Branch (297:5): [True: 1.72k, False: 604k]
  ------------------
  298|  1.72k|      return read32();
  299|    243|    case 64:
  ------------------
  |  Branch (299:5): [True: 243, False: 605k]
  ------------------
  300|    243|      return read64();
  301|      0|    default:
  ------------------
  |  Branch (301:5): [True: 0, False: 605k]
  ------------------
  302|      0|      assert(false);
  ------------------
  |  Branch (302:7): [Folded, False: 0]
  ------------------
  303|      0|      return 0;
  304|   605k|  }
  305|   605k|}
_ZN14BitstreamRange7read32sEv:
  309|   295k|{
  310|   295k|  uint32_t v = read32();
  311|       |
  312|   295k|  if (v & 0x80000000) {
  ------------------
  |  Branch (312:7): [True: 19.4k, False: 275k]
  ------------------
  313|  19.4k|    return -static_cast<int32_t>((~v) & 0x7fffffff) -1;
  314|  19.4k|  }
  315|   275k|  else {
  316|   275k|    return static_cast<int32_t>(v);
  317|   275k|  }
  318|   295k|}
_ZN14BitstreamRange6read64Ev:
  322|  3.69k|{
  323|  3.69k|  if (!prepare_read(8)) {
  ------------------
  |  Branch (323:7): [True: 91, False: 3.60k]
  ------------------
  324|     91|    return 0;
  325|     91|  }
  326|       |
  327|  3.60k|  uint8_t buf[8];
  328|       |
  329|  3.60k|  auto istr = get_istream();
  330|  3.60k|  bool success = istr->read((char*) buf, 8);
  331|       |
  332|  3.60k|  if (!success) {
  ------------------
  |  Branch (332:7): [True: 0, False: 3.60k]
  ------------------
  333|      0|    set_eof_while_reading();
  334|      0|    return 0;
  335|      0|  }
  336|       |
  337|  3.60k|  return ((static_cast<uint64_t>(buf[0]) << 56) |
  338|  3.60k|          (static_cast<uint64_t>(buf[1]) << 48) |
  339|  3.60k|          (static_cast<uint64_t>(buf[2]) << 40) |
  340|  3.60k|          (static_cast<uint64_t>(buf[3]) << 32) |
  341|  3.60k|          (static_cast<uint64_t>(buf[4]) << 24) |
  342|  3.60k|          (static_cast<uint64_t>(buf[5]) << 16) |
  343|  3.60k|          (static_cast<uint64_t>(buf[6]) << 8) |
  344|  3.60k|          (static_cast<uint64_t>(buf[7])));
  345|  3.60k|}
_ZN14BitstreamRange7read64sEv:
  349|    209|{
  350|    209|  uint64_t v = read64();
  351|       |
  352|    209|  if (v & 0x8000000000000000) {
  ------------------
  |  Branch (352:7): [True: 49, False: 160]
  ------------------
  353|     49|    return -static_cast<int64_t >((~v) & 0x7fffffffffffffff) -1;
  354|     49|  }
  355|    160|  else {
  356|    160|    return static_cast<int64_t >(v);
  357|    160|  }
  358|    209|}
_ZN14BitstreamRange12read_float32Ev:
  362|   924M|{
  363|   924M|#if __cpp_lib_bit_cast >= 201806L
  364|   924M|  uint32_t i = read32();
  365|   924M|  return std::bit_cast<float>(i); // this works directly on the value layout, thus we do not have to worry about memory layout
  366|       |#else
  367|       |  // compiler too old to support bit_cast
  368|       |
  369|       |  // TODO: I am not sure this works everywhere as there seem to be systems where
  370|       |  //       the float byte order is different from the integer endianness
  371|       |  //       https://en.wikipedia.org/wiki/Endianness#Floating_point
  372|       |  uint32_t i = read32();
  373|       |  float f;
  374|       |  memcpy(&f, &i, sizeof(float));
  375|       |  return f;
  376|       |#endif
  377|   924M|}
_ZN14BitstreamRange11read_stringEv:
  398|  25.4k|{
  399|  25.4k|  std::string str;
  400|       |
  401|       |  // Reading a string when no more data is available, returns an empty string.
  402|       |  // Such a case happens, for example, when reading a 'url' box without content.
  403|  25.4k|  if (eof()) {
  ------------------
  |  Branch (403:7): [True: 6.50k, False: 18.9k]
  ------------------
  404|  6.50k|    return std::string();
  405|  6.50k|  }
  406|       |
  407|  18.9k|  auto istr = get_istream();
  408|       |
  409|  7.64M|  for (;;) {
  410|  7.64M|    if (!prepare_read(1)) {
  ------------------
  |  Branch (410:9): [True: 0, False: 7.64M]
  ------------------
  411|      0|      return std::string();
  412|      0|    }
  413|       |
  414|  7.64M|    char c;
  415|  7.64M|    bool success = istr->read(&c, 1);
  416|       |
  417|  7.64M|    if (!success) {
  ------------------
  |  Branch (417:9): [True: 0, False: 7.64M]
  ------------------
  418|      0|      set_eof_while_reading();
  419|      0|      return std::string();
  420|      0|    }
  421|       |
  422|  7.64M|    if (c == 0 || m_remaining==0) {
  ------------------
  |  Branch (422:9): [True: 18.2k, False: 7.62M]
  |  Branch (422:19): [True: 712, False: 7.62M]
  ------------------
  423|  18.9k|      break;
  424|  18.9k|    }
  425|  7.62M|    else {
  426|  7.62M|      str += (char) c;
  427|  7.62M|    }
  428|  7.64M|  }
  429|       |
  430|  18.9k|  return str;
  431|  18.9k|}
_ZN14BitstreamRange17read_fixed_stringEi:
  435|  1.23k|{
  436|  1.23k|  std::string str;
  437|       |
  438|  1.23k|  if (!prepare_read(len)) {
  ------------------
  |  Branch (438:7): [True: 60, False: 1.17k]
  ------------------
  439|     60|    return std::string();
  440|     60|  }
  441|       |
  442|  1.17k|  auto istr = get_istream();
  443|       |
  444|  1.17k|  uint8_t n;
  445|  1.17k|  bool success = istr->read(&n, 1);
  446|  1.17k|  if (!success || n > len - 1) {
  ------------------
  |  Branch (446:7): [True: 0, False: 1.17k]
  |  Branch (446:19): [True: 302, False: 872]
  ------------------
  447|    302|    return {};
  448|    302|  }
  449|       |
  450|  7.05k|  for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (450:19): [True: 6.18k, False: 872]
  ------------------
  451|  6.18k|    char c;
  452|  6.18k|    success = istr->read(&c, 1);
  453|       |
  454|  6.18k|    if (!success) {
  ------------------
  |  Branch (454:9): [True: 0, False: 6.18k]
  ------------------
  455|      0|      set_eof_while_reading();
  456|      0|      return std::string();
  457|      0|    }
  458|       |
  459|  6.18k|    str += (char) c;
  460|  6.18k|  }
  461|       |
  462|    872|  istr->seek_cur(len-n-1);
  463|       |
  464|    872|  return str;
  465|    872|}
_ZN14BitstreamRange21read_string_until_eofEv:
  469|  1.15k|{
  470|  1.15k|  size_t n = get_remaining_bytes();
  471|       |
  472|  1.15k|  [[maybe_unused]] bool success = prepare_read(n);
  473|  1.15k|  assert(success); // we are reading exactly the rest of the box
  ------------------
  |  Branch (473:3): [True: 1.15k, False: 0]
  ------------------
  474|       |
  475|  1.15k|  std::string str;
  476|  1.15k|  str.resize(n);
  477|  1.15k|  get_istream()->read(str.data(), n);
  478|       |
  479|  1.15k|  return str;
  480|  1.15k|}
_ZN14BitstreamRange4readEPhm:
  484|   107k|{
  485|   107k|  if (!prepare_read(n)) {
  ------------------
  |  Branch (485:7): [True: 48, False: 107k]
  ------------------
  486|     48|    return false;
  487|     48|  }
  488|       |
  489|   107k|  auto istr = get_istream();
  490|   107k|  bool success = istr->read(data, n);
  491|       |
  492|   107k|  if (!success) {
  ------------------
  |  Branch (492:7): [True: 0, False: 107k]
  ------------------
  493|      0|    set_eof_while_reading();
  494|      0|  }
  495|       |
  496|   107k|  return success;
  497|   107k|}
_ZN14BitstreamRange12prepare_readEm:
  501|  1.02G|{
  502|       |  // Note: we do not test for negative nBytes anymore because we now use the unsigned size_t
  503|       |
  504|  1.02G|  if (m_remaining < nBytes) {
  ------------------
  |  Branch (504:7): [True: 925M, False: 97.2M]
  ------------------
  505|       |    // --- not enough data left in box -> move to end of box and set error flag
  506|       |
  507|   925M|    skip_to_end_of_box();
  508|       |
  509|   925M|    m_error = true;
  510|   925M|    return false;
  511|   925M|  }
  512|  97.2M|  else {
  513|       |    // --- this is the normal case (m_remaining >= nBytes)
  514|       |
  515|  97.2M|    if (m_parent_range) {
  ------------------
  |  Branch (515:9): [True: 77.8M, False: 19.3M]
  ------------------
  516|  77.8M|      if (!m_parent_range->prepare_read(nBytes)) {
  ------------------
  |  Branch (516:11): [True: 0, False: 77.8M]
  ------------------
  517|      0|        return false;
  518|      0|      }
  519|  77.8M|    }
  520|       |
  521|  97.2M|    m_remaining -= nBytes;
  522|       |
  523|  97.2M|    return true;
  524|  97.2M|  }
  525|  1.02G|}
_ZN14BitstreamRange24wait_for_available_bytesEm:
  529|   642k|{
  530|   642k|  int64_t target_size = m_istr->get_position() + nBytes;
  531|       |
  532|   642k|  return m_istr->wait_for_file_size(target_size);
  533|   642k|}
_ZN14BitstreamRange31skip_without_advancing_file_posEm:
  537|   382k|{
  538|   382k|  assert(n <= m_remaining);
  ------------------
  |  Branch (538:3): [True: 382k, False: 0]
  ------------------
  539|       |
  540|   382k|  m_remaining -= n;
  541|       |
  542|   382k|  if (m_parent_range) {
  ------------------
  |  Branch (542:7): [True: 303k, False: 79.0k]
  ------------------
  543|   303k|    m_parent_range->skip_without_advancing_file_pos(n);
  544|   303k|  }
  545|   382k|}
_ZN9BitReaderC2EPKhm:
  549|  11.1k|  : data_start(buffer),
  550|  11.1k|    data_length(len)
  551|  11.1k|{
  552|  11.1k|  data = buffer;
  553|  11.1k|  bytes_remaining = len;
  554|       |
  555|  11.1k|  nextbits = 0;
  556|  11.1k|  nextbits_cnt = 0;
  557|       |
  558|  11.1k|  refill();
  559|  11.1k|}
_ZN9BitReader8get_bitsEi:
  575|   773k|{
  576|   773k|  assert(n <= 32);
  ------------------
  |  Branch (576:3): [True: 773k, False: 0]
  ------------------
  577|       |
  578|   773k|  if (nextbits_cnt < n) {
  ------------------
  |  Branch (578:7): [True: 80.4k, False: 693k]
  ------------------
  579|  80.4k|    refill();
  580|  80.4k|  }
  581|       |
  582|   773k|  uint64_t val = nextbits;
  583|   773k|  val >>= 64 - n;
  584|       |
  585|   773k|#if AVOID_FUZZER_FALSE_POSITIVE
  586|       |  // Shifting an unsigned integer left such that some MSBs fall out is well defined in C++ despite the fuzzer claiming otherwise.
  587|   773k|  nextbits &= (0xffffffffffffffffULL >> n);
  588|   773k|#endif
  589|       |
  590|   773k|  nextbits <<= n;
  591|   773k|  nextbits_cnt -= n;
  592|       |
  593|   773k|  return static_cast<uint32_t>(val);
  594|   773k|}
_ZN9BitReader9get_bits8Ei:
  598|   261k|{
  599|   261k|  assert(n>0 && n <= 8);
  ------------------
  |  Branch (599:3): [True: 261k, False: 0]
  |  Branch (599:3): [True: 261k, False: 0]
  |  Branch (599:3): [True: 261k, False: 0]
  ------------------
  600|   261k|  return static_cast<uint8_t>(get_bits(n));
  601|   261k|}
_ZN9BitReader10get_bits16Ei:
  604|  33.5k|{
  605|  33.5k|  assert(n>0 && n <= 16);
  ------------------
  |  Branch (605:3): [True: 33.5k, False: 0]
  |  Branch (605:3): [True: 33.5k, False: 0]
  |  Branch (605:3): [True: 33.5k, False: 0]
  ------------------
  606|  33.5k|  return static_cast<uint16_t>(get_bits(n));
  607|  33.5k|}
_ZN9BitReader10get_bits32Ei:
  610|   109k|{
  611|   109k|  assert(n>0 && n <= 32);
  ------------------
  |  Branch (611:3): [True: 109k, False: 0]
  |  Branch (611:3): [True: 109k, False: 0]
  |  Branch (611:3): [True: 109k, False: 0]
  ------------------
  612|   109k|  return static_cast<uint32_t>(get_bits(n));
  613|   109k|}
_ZN9BitReader11get_bits32sEv:
  616|  7.08k|{
  617|  7.08k|  uint32_t bits = get_bits(32);
  618|  7.08k|  return static_cast<int32_t>(bits);
  619|  7.08k|}
_ZN9BitReader8get_flagEv:
  623|   361k|{
  624|   361k|  return (get_bits(1) == 0x01);
  625|   361k|}
_ZN9BitReader10read_bytesEj:
  628|  5.25k|{
  629|       |  // TODO: this implementation isn't very efficient
  630|  5.25k|  std::vector<uint8_t> bytes;
  631|   193k|  for (uint32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (631:24): [True: 188k, False: 5.25k]
  ------------------
  632|   188k|    bytes.push_back(get_bits8(8));
  633|   188k|  }
  634|  5.25k|  return bytes;
  635|  5.25k|}
_ZN9BitReader10skip_bytesEj:
  663|  19.0k|{
  664|       |  // This has to run in constant time. The number of bytes to skip is taken directly
  665|       |  // from 32-bit file fields (e.g. the 'uncC' row/tile alignment), so a byte-at-a-time
  666|       |  // loop spins for billions of iterations when a malformed file asks to skip far
  667|       |  // beyond the end of the data. MinimizedImageBox::parse() guards against the same
  668|       |  // failure mode by validating its declared chunk sizes up front.
  669|       |
  670|  19.0k|  uint64_t nBits = uint64_t{nBytes} * 8;
  671|       |
  672|       |  // --- consume the bits that are already buffered in 'nextbits'
  673|       |
  674|  19.0k|  if (nextbits_cnt > 0) {
  ------------------
  |  Branch (674:7): [True: 14.0k, False: 5.01k]
  ------------------
  675|  14.0k|    uint64_t from_buffer = std::min(nBits, static_cast<uint64_t>(nextbits_cnt));
  676|       |
  677|  14.0k|    if (from_buffer >= 64) {
  ------------------
  |  Branch (677:9): [True: 230, False: 13.8k]
  ------------------
  678|    230|      nextbits = 0;
  679|    230|    }
  680|  13.8k|    else {
  681|  13.8k|#if AVOID_FUZZER_FALSE_POSITIVE
  682|  13.8k|      nextbits &= (0xffffffffffffffffULL >> from_buffer);
  683|  13.8k|#endif
  684|  13.8k|      nextbits <<= from_buffer;
  685|  13.8k|    }
  686|       |
  687|  14.0k|    nextbits_cnt -= static_cast<int64_t>(from_buffer);
  688|  14.0k|    nBits -= from_buffer;
  689|  14.0k|  }
  690|       |
  691|  19.0k|  if (nBits == 0) {
  ------------------
  |  Branch (691:7): [True: 13.2k, False: 5.82k]
  ------------------
  692|  13.2k|    return;
  693|  13.2k|  }
  694|       |
  695|       |  // --- skip whole bytes directly in the input buffer, without pushing them
  696|       |  //     through the bit buffer
  697|       |
  698|  5.82k|  uint64_t whole_bytes = nBits / 8;
  699|  5.82k|  int residual_bits = static_cast<int>(nBits % 8);
  700|       |
  701|  5.82k|  if (whole_bytes >= bytes_remaining) {
  ------------------
  |  Branch (701:7): [True: 734, False: 5.09k]
  ------------------
  702|       |    // Skipping past the end of the data. Record the overshoot in 'nextbits_cnt' (which
  703|       |    // thereby goes negative) so that get_current_byte_index() keeps advancing exactly
  704|       |    // as it did with the previous bit-by-bit implementation.
  705|    734|    uint64_t overshoot_bits = (whole_bytes - bytes_remaining) * 8 + static_cast<uint64_t>(residual_bits);
  706|       |
  707|    734|    data += bytes_remaining;
  708|    734|    bytes_remaining = 0;
  709|    734|    nextbits = 0;
  710|    734|    nextbits_cnt -= static_cast<int64_t>(overshoot_bits);
  711|    734|    return;
  712|    734|  }
  713|       |
  714|  5.09k|  data += static_cast<size_t>(whole_bytes);
  715|  5.09k|  bytes_remaining -= static_cast<size_t>(whole_bytes);
  716|  5.09k|  nextbits = 0;
  717|  5.09k|  nextbits_cnt = 0;
  718|       |
  719|  5.09k|  refill();
  720|       |
  721|  5.09k|  if (residual_bits > 0) {
  ------------------
  |  Branch (721:7): [True: 0, False: 5.09k]
  ------------------
  722|      0|    skip_bits(residual_bits);
  723|      0|  }
  724|  5.09k|}
_ZN9BitReader9skip_bitsEi:
  727|  26.6k|{
  728|  26.6k|  if (nextbits_cnt < n) {
  ------------------
  |  Branch (728:7): [True: 7.25k, False: 19.4k]
  ------------------
  729|  7.25k|    refill();
  730|  7.25k|  }
  731|       |
  732|  26.6k|#if AVOID_FUZZER_FALSE_POSITIVE
  733|  26.6k|  nextbits &= (0xffffffffffffffffULL >> n);
  734|  26.6k|#endif
  735|       |
  736|  26.6k|  nextbits <<= n;
  737|  26.6k|  nextbits_cnt -= n;
  738|  26.6k|}
_ZN9BitReader21skip_to_byte_boundaryEv:
  751|  11.1k|{
  752|  11.1k|  int nskip = static_cast<int>(nextbits_cnt & 7);
  753|       |
  754|  11.1k|#if AVOID_FUZZER_FALSE_POSITIVE
  755|  11.1k|  nextbits &= (0xffffffffffffffffULL >> nskip);
  756|  11.1k|#endif
  757|       |
  758|  11.1k|  nextbits <<= nskip;
  759|  11.1k|  nextbits_cnt -= nskip;
  760|  11.1k|}
_ZN9BitReader6refillEv:
  801|   103k|{
  802|       |#if 0
  803|       |  // TODO: activate me once I'm sure this works
  804|       |  while (nextbits_cnt <= 64-8 && bytes_remaining) {
  805|       |    uint64_t newval = *data++;
  806|       |    bytes_remaining--;
  807|       |
  808|       |    nextbits_cnt += 8;
  809|       |    newval <<= 64-nextbits_cnt;
  810|       |    nextbits |= newval;
  811|       |  }
  812|       |#else
  813|   103k|  if (bytes_remaining == 0) {
  ------------------
  |  Branch (813:7): [True: 5.74k, False: 98.2k]
  ------------------
  814|       |    // Nothing to refill. Returning early also keeps the shift below out of range
  815|       |    // when nextbits_cnt is far negative after skipping past the end of the data.
  816|  5.74k|    return;
  817|  5.74k|  }
  818|       |
  819|  98.2k|  int64_t shift = 64 - nextbits_cnt;
  820|       |
  821|   755k|  while (shift >= 8 && bytes_remaining) {
  ------------------
  |  Branch (821:10): [True: 660k, False: 94.2k]
  |  Branch (821:24): [True: 656k, False: 4.03k]
  ------------------
  822|   656k|    uint64_t newval = *data++;
  823|   656k|    bytes_remaining--;
  824|       |
  825|   656k|    shift -= 8;
  826|   656k|    newval <<= shift;
  827|   656k|    nextbits |= newval;
  828|   656k|  }
  829|       |
  830|  98.2k|  nextbits_cnt = 64 - shift;
  831|  98.2k|#endif
  832|  98.2k|}

_ZNK14BitstreamRange5errorEv:
  392|  2.35M|  {
  393|  2.35M|    return m_error;
  394|  2.35M|  }
_ZN12StreamReader8seek_curEm:
   62|  82.0k|  {
   63|  82.0k|    return seek(get_position() + position_offset);
   64|  82.0k|  }
_ZN14BitstreamRange19skip_to_end_of_fileEv:
  337|     40|  {
  338|       |    // we do not actually move the file position here (because the stream may still be incomplete),
  339|       |    // but we set all m_remaining to zero
  340|     40|    m_remaining = 0;
  341|       |
  342|     40|    if (m_parent_range) {
  ------------------
  |  Branch (342:9): [True: 34, False: 6]
  ------------------
  343|     34|      m_parent_range->skip_to_end_of_file();
  344|     34|    }
  345|     40|  }
_ZN14BitstreamRange4skipEm:
  348|  21.8k|  {
  349|  21.8k|    size_t actual_skip = std::min(static_cast<size_t>(n), m_remaining);
  350|       |
  351|  21.8k|    if (m_parent_range) {
  ------------------
  |  Branch (351:9): [True: 21.8k, False: 0]
  ------------------
  352|       |      // also advance position in parent range
  353|  21.8k|      m_parent_range->skip_without_advancing_file_pos(actual_skip);
  354|  21.8k|    }
  355|       |
  356|  21.8k|    assert(actual_skip <= static_cast<uint64_t>(std::numeric_limits<int64_t>::max()));
  ------------------
  |  Branch (356:5): [True: 21.8k, False: 0]
  ------------------
  357|       |
  358|  21.8k|    m_istr->seek_cur(static_cast<int64_t>(actual_skip));
  359|  21.8k|    m_remaining -= actual_skip;
  360|  21.8k|  }
_ZN14BitstreamRange18skip_to_end_of_boxEv:
  363|   925M|  {
  364|   925M|    if (m_remaining > 0) {
  ------------------
  |  Branch (364:9): [True: 57.1k, False: 925M]
  ------------------
  365|  57.1k|      if (m_parent_range) {
  ------------------
  |  Branch (365:11): [True: 57.1k, False: 2]
  ------------------
  366|       |        // also advance position in parent range
  367|  57.1k|        m_parent_range->skip_without_advancing_file_pos(m_remaining);
  368|  57.1k|      }
  369|       |
  370|  57.1k|      m_istr->seek_cur(m_remaining);
  371|  57.1k|      m_remaining = 0;
  372|  57.1k|    }
  373|   925M|  }
_ZNK14BitstreamRange3eofEv:
  387|  4.25M|  {
  388|  4.25M|    return m_remaining == 0;
  389|  4.25M|  }
_ZNK14BitstreamRange9get_errorEv:
  397|  1.23M|  {
  398|  1.23M|    if (m_error) {
  ------------------
  |  Branch (398:9): [True: 10.1k, False: 1.22M]
  ------------------
  399|  10.1k|      return Error(heif_error_Invalid_input,
  400|  10.1k|                   heif_suberror_End_of_data);
  401|  10.1k|    }
  402|  1.22M|    else {
  403|  1.22M|      return Error::Ok;
  404|  1.22M|    }
  405|  1.23M|  }
_ZN14BitstreamRange11get_istreamEv:
  407|  12.0M|  std::shared_ptr<StreamReader> get_istream() { return m_istr; }
_ZNK14BitstreamRange17get_nesting_levelEv:
  409|   319k|  int get_nesting_level() const { return m_nesting_level; }
_ZNK14BitstreamRange19get_remaining_bytesEv:
  411|   392k|  size_t get_remaining_bytes() const { return m_remaining; }
_ZNK9BitReader22get_current_byte_indexEv:
  469|  19.0k|  {
  470|       |    // Computed in signed arithmetic: when we skipped past the end of the data,
  471|       |    // nextbits_cnt is negative and the index keeps growing beyond data_length (the
  472|       |    // 'uncC' alignment handling relies on that). Doing the subtraction in size_t
  473|       |    // would convert the negative operand first, which trips the 'integer' sanitizer.
  474|       |    // The result itself is always >= 0.
  475|  19.0k|    int64_t bytes_read = static_cast<int64_t>(data_length - bytes_remaining);
  476|  19.0k|    return static_cast<size_t>(bytes_read - nextbits_cnt / 8);
  477|  19.0k|  }
_ZNK9BitReader18get_bits_remainingEv:
  480|  11.1k|  {
  481|  11.1k|    return ((int64_t) bytes_remaining) * 8 + nextbits_cnt;
  482|  11.1k|  }
_ZN12StreamReaderD2Ev:
   42|  15.0k|  virtual ~StreamReader() = default;

_ZN8FractionC2Eii:
   64|  5.64k|{
   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|  5.64k|  numerator = num;
   70|  5.64k|  denominator = den;
   71|       |
   72|  33.1k|  while (denominator > MAX_FRACTION_VALUE || denominator < -MAX_FRACTION_VALUE) {
  ------------------
  |  Branch (72:10): [True: 27.4k, False: 5.64k]
  |  Branch (72:46): [True: 0, False: 5.64k]
  ------------------
   73|  27.4k|    numerator /= 2;
   74|  27.4k|    denominator /= 2;
   75|  27.4k|  }
   76|       |
   77|  9.01k|  while (denominator > 1 && (numerator > MAX_FRACTION_VALUE || numerator < -MAX_FRACTION_VALUE)) {
  ------------------
  |  Branch (77:10): [True: 5.40k, False: 3.61k]
  |  Branch (77:30): [True: 3.22k, False: 2.17k]
  |  Branch (77:64): [True: 148, False: 2.02k]
  ------------------
   78|  3.37k|    numerator /= 2;
   79|  3.37k|    denominator /= 2;
   80|  3.37k|  }
   81|  5.64k|}
_ZN8Fraction11from_signedEll:
   84|  6.07k|{
   85|  6.07k|  if (num < std::numeric_limits<int32_t>::min() || num > std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (85:7): [True: 0, False: 6.07k]
  |  Branch (85:52): [True: 260, False: 5.81k]
  ------------------
   86|  5.81k|      den < std::numeric_limits<int32_t>::min() || den > std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (86:7): [True: 0, False: 5.81k]
  |  Branch (86:52): [True: 172, False: 5.64k]
  ------------------
   87|    432|    return Error(heif_error_Invalid_input,
   88|    432|                 heif_suberror_Invalid_fractional_number,
   89|    432|                 "Fraction value exceeds the supported range");
   90|    432|  }
   91|       |
   92|  5.64k|  Fraction f(static_cast<int32_t>(num), static_cast<int32_t>(den));
   93|  5.64k|  if (!f.is_valid()) {
  ------------------
  |  Branch (93:7): [True: 3.40k, False: 2.23k]
  ------------------
   94|  3.40k|    return Error(heif_error_Invalid_input,
   95|  3.40k|                 heif_suberror_Invalid_fractional_number,
   96|  3.40k|                 "Fraction with zero denominator");
   97|  3.40k|  }
   98|       |
   99|  2.23k|  return f;
  100|  5.64k|}
_ZN8Fraction13from_unsignedEjj:
  103|  3.03k|{
  104|  3.03k|  return from_signed(num, den);
  105|  3.03k|}
_ZNK8Fraction8is_validEv:
  178|  5.64k|{
  179|  5.64k|  return denominator != 0;
  180|  5.64k|}
_ZN9BoxHeaderC2Ev:
  183|   736k|BoxHeader::BoxHeader() = default;
_ZNK9BoxHeader8get_typeEv:
  187|   128k|{
  188|   128k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (188:7): [True: 5.62k, False: 123k]
  ------------------
  189|  5.62k|    return m_uuid_type;
  190|  5.62k|  }
  191|   123k|  else {
  192|   123k|    std::vector<uint8_t> type(4);
  193|   123k|    type[0] = static_cast<uint8_t>((m_type >> 24) & 0xFF);
  194|   123k|    type[1] = static_cast<uint8_t>((m_type >> 16) & 0xFF);
  195|   123k|    type[2] = static_cast<uint8_t>((m_type >> 8) & 0xFF);
  196|   123k|    type[3] = static_cast<uint8_t>((m_type >> 0) & 0xFF);
  197|   123k|    return type;
  198|   123k|  }
  199|   128k|}
_ZNK9BoxHeader15get_type_stringEv:
  203|   659k|{
  204|   659k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (204:7): [True: 20.7k, False: 638k]
  ------------------
  205|       |    // 8-4-4-4-12
  206|       |
  207|  20.7k|    std::ostringstream sstr;
  208|  20.7k|    sstr << std::hex;
  209|  20.7k|    sstr << std::setfill('0');
  210|       |
  211|   352k|    for (int i = 0; i < 16; i++) {
  ------------------
  |  Branch (211:21): [True: 331k, False: 20.7k]
  ------------------
  212|   331k|      if (i == 4 || i == 6 || i == 8 || i == 10) {
  ------------------
  |  Branch (212:11): [True: 20.7k, False: 311k]
  |  Branch (212:21): [True: 20.7k, False: 290k]
  |  Branch (212:31): [True: 20.7k, False: 269k]
  |  Branch (212:41): [True: 20.7k, False: 248k]
  ------------------
  213|  82.9k|        sstr << '-';
  214|  82.9k|      }
  215|       |
  216|   331k|      sstr << std::setw(2);
  217|   331k|      sstr << ((int) m_uuid_type[i]);
  218|   331k|    }
  219|       |
  220|  20.7k|    return sstr.str();
  221|  20.7k|  }
  222|   638k|  else {
  223|   638k|    return fourcc_to_string(m_type);
  224|   638k|  }
  225|   659k|}
_ZNK9BoxHeader13get_uuid_typeEv:
  229|  25.3k|{
  230|  25.3k|  if (m_type != fourcc("uuid")) {
  ------------------
  |  Branch (230:7): [True: 0, False: 25.3k]
  ------------------
  231|      0|    return {};
  232|      0|  }
  233|       |
  234|  25.3k|  return m_uuid_type;
  235|  25.3k|}
_ZN9BoxHeader13set_uuid_typeERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  239|  2.22k|{
  240|  2.22k|  m_type = fourcc("uuid");
  241|  2.22k|  m_uuid_type = type;
  242|  2.22k|}
_ZN9BoxHeader12parse_headerER14BitstreamRange:
  246|   347k|{
  247|   347k|  StreamReader::grow_status status;
  248|   347k|  status = range.wait_for_available_bytes(8);
  249|   347k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (249:7): [True: 6.32k, False: 341k]
  ------------------
  250|       |    // TODO: return recoverable error at timeout
  251|  6.32k|    return Error(heif_error_Invalid_input,
  252|  6.32k|                 heif_suberror_End_of_data);
  253|  6.32k|  }
  254|       |
  255|   341k|  m_size = range.read32();
  256|   341k|  m_type = range.read32();
  257|       |
  258|   341k|  m_header_size = 8;
  259|       |
  260|   341k|  if (m_size == 1) {
  ------------------
  |  Branch (260:7): [True: 366, False: 340k]
  ------------------
  261|    366|    status = range.wait_for_available_bytes(8);
  262|    366|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (262:9): [True: 2, False: 364]
  ------------------
  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|    364|    uint64_t high = range.read32();
  269|    364|    uint64_t low = range.read32();
  270|       |
  271|    364|    m_size = (high << 32) | low;
  272|    364|    m_header_size += 8;
  273|       |
  274|    364|    std::stringstream sstr;
  275|    364|    sstr << "Box size " << m_size << " exceeds security limit.";
  276|       |
  277|    364|    if (m_size > MAX_LARGE_BOX_SIZE) {
  ------------------
  |  Branch (277:9): [True: 8, False: 356]
  ------------------
  278|      8|      return Error(heif_error_Memory_allocation_error,
  279|      8|                   heif_suberror_Security_limit_exceeded,
  280|      8|                   sstr.str());
  281|      8|    }
  282|    364|  }
  283|       |
  284|   341k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (284:7): [True: 9.23k, False: 332k]
  ------------------
  285|  9.23k|    status = range.wait_for_available_bytes(16);
  286|  9.23k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (286:9): [True: 2, False: 9.22k]
  ------------------
  287|       |      // TODO: return recoverable error at timeout
  288|      2|      return Error(heif_error_Invalid_input,
  289|      2|                   heif_suberror_End_of_data);
  290|      2|    }
  291|       |
  292|  9.22k|    if (range.prepare_read(16)) {
  ------------------
  |  Branch (292:9): [True: 9.22k, False: 1]
  ------------------
  293|  9.22k|      m_uuid_type.resize(16);
  294|  9.22k|      bool success = range.get_istream()->read((char*) m_uuid_type.data(), 16);
  295|  9.22k|      assert(success);
  ------------------
  |  Branch (295:7): [True: 9.22k, False: 0]
  ------------------
  296|  9.22k|      (void) success;
  297|  9.22k|    }
  298|       |
  299|  9.22k|    m_header_size += 16;
  300|  9.22k|  }
  301|       |
  302|   341k|  return range.get_error();
  303|   341k|}
_ZNK9BoxHeader4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  408|   198k|{
  409|   198k|  sstr << indent << "Box: " << get_type_string();
  410|   198k|  const char* debug_name = debug_box_name();
  411|   198k|  if (debug_name) {
  ------------------
  |  Branch (411:7): [True: 105k, False: 92.4k]
  ------------------
  412|   105k|    sstr << " ----- (" << debug_name << ")\n";
  413|   105k|  }
  414|  92.4k|  else {
  415|  92.4k|    sstr << " -----\n";
  416|  92.4k|  }
  417|       |
  418|   198k|  sstr << indent << "size: " << get_box_size() << "   (header size: " << get_header_size() << ")\n";
  419|       |
  420|   198k|  return;
  421|   198k|}
_ZN3Box5parseER14BitstreamRangePK20heif_security_limits:
  425|  2.16k|{
  426|       |  // skip box
  427|       |
  428|  2.16k|  if (get_box_size() == size_until_end_of_file) {
  ------------------
  |  Branch (428:7): [True: 6, False: 2.15k]
  ------------------
  429|      6|    range.skip_to_end_of_file();
  430|      6|  }
  431|  2.15k|  else {
  432|  2.15k|    uint64_t content_size = get_box_size() - get_header_size();
  433|       |
  434|  2.15k|    assert(MAX_BOX_SIZE <= SIZE_MAX);
  ------------------
  |  Branch (434:5): [True: 2.15k, Folded]
  ------------------
  435|       |
  436|  2.15k|    if (content_size > MAX_BOX_SIZE) {
  ------------------
  |  Branch (436:9): [True: 0, False: 2.15k]
  ------------------
  437|      0|      return Error(heif_error_Invalid_input,
  438|      0|                   heif_suberror_Invalid_box_size);
  439|      0|    }
  440|       |
  441|  2.15k|    if (range.prepare_read(static_cast<size_t>(content_size))) {
  ------------------
  |  Branch (441:9): [True: 2.15k, False: 0]
  ------------------
  442|  2.15k|      range.get_istream()->seek_cur(get_box_size() - get_header_size());
  443|  2.15k|    }
  444|  2.15k|  }
  445|       |
  446|       |  // Note: seekg() clears the eof flag and it will not be set again afterwards,
  447|       |  // hence we have to test for the fail flag.
  448|       |
  449|  2.16k|  return range.get_error();
  450|  2.16k|}
_ZN7FullBox21parse_full_box_headerER14BitstreamRange:
  454|  85.4k|{
  455|  85.4k|  uint32_t data = range.read32();
  456|  85.4k|  m_version = static_cast<uint8_t>(data >> 24);
  457|  85.4k|  m_flags = data & 0x00FFFFFF;
  458|       |  //m_is_full_box = true;
  459|       |
  460|  85.4k|  m_header_size += 4;
  461|       |
  462|  85.4k|  return range.get_error();
  463|  85.4k|}
_ZN3Box4readER14BitstreamRangePNSt3__110shared_ptrIS_EEPK20heif_security_limits:
  467|   325k|{
  468|   325k|  BoxHeader hdr;
  469|   325k|  Error err = hdr.parse_header(range);
  470|   325k|  if (err) {
  ------------------
  |  Branch (470:7): [True: 6.34k, False: 319k]
  ------------------
  471|  6.34k|    return err;
  472|  6.34k|  }
  473|       |
  474|   319k|  if (range.error()) {
  ------------------
  |  Branch (474:7): [True: 0, False: 319k]
  ------------------
  475|      0|    return range.get_error();
  476|      0|  }
  477|       |
  478|   319k|  result->reset();
  479|       |
  480|   319k|  std::shared_ptr<Box> box;
  481|       |
  482|   319k|  switch (hdr.get_short_type()) {
  483|  8.08k|    case fourcc("ftyp"):
  ------------------
  |  Branch (483:5): [True: 8.08k, False: 311k]
  ------------------
  484|  8.08k|      box = std::make_shared<Box_ftyp>();
  485|  8.08k|      break;
  486|       |
  487|    228|    case fourcc("free"):
  ------------------
  |  Branch (487:5): [True: 228, False: 319k]
  ------------------
  488|    530|    case fourcc("skip"):
  ------------------
  |  Branch (488:5): [True: 302, False: 319k]
  ------------------
  489|    530|      box = std::make_shared<Box_free>();
  490|    530|      break;
  491|       |
  492|  1.68k|    case fourcc("meta"):
  ------------------
  |  Branch (492:5): [True: 1.68k, False: 317k]
  ------------------
  493|  1.68k|      box = std::make_shared<Box_meta>();
  494|  1.68k|      break;
  495|       |
  496|  2.36k|    case fourcc("hdlr"):
  ------------------
  |  Branch (496:5): [True: 2.36k, False: 316k]
  ------------------
  497|  2.36k|      box = std::make_shared<Box_hdlr>();
  498|  2.36k|      break;
  499|       |
  500|  2.42k|    case fourcc("pitm"):
  ------------------
  |  Branch (500:5): [True: 2.42k, False: 316k]
  ------------------
  501|  2.42k|      box = std::make_shared<Box_pitm>();
  502|  2.42k|      break;
  503|       |
  504|  1.56k|    case fourcc("iloc"):
  ------------------
  |  Branch (504:5): [True: 1.56k, False: 317k]
  ------------------
  505|  1.56k|      box = std::make_shared<Box_iloc>();
  506|  1.56k|      break;
  507|       |
  508|  2.36k|    case fourcc("iinf"):
  ------------------
  |  Branch (508:5): [True: 2.36k, False: 316k]
  ------------------
  509|  2.36k|      box = std::make_shared<Box_iinf>();
  510|  2.36k|      break;
  511|       |
  512|  4.09k|    case fourcc("infe"):
  ------------------
  |  Branch (512:5): [True: 4.09k, False: 315k]
  ------------------
  513|  4.09k|      box = std::make_shared<Box_infe>();
  514|  4.09k|      break;
  515|       |
  516|  20.4k|    case fourcc("iprp"):
  ------------------
  |  Branch (516:5): [True: 20.4k, False: 298k]
  ------------------
  517|  20.4k|      box = std::make_shared<Box_iprp>();
  518|  20.4k|      break;
  519|       |
  520|  10.0k|    case fourcc("ipco"):
  ------------------
  |  Branch (520:5): [True: 10.0k, False: 309k]
  ------------------
  521|  10.0k|      box = std::make_shared<Box_ipco>();
  522|  10.0k|      break;
  523|       |
  524|  2.34k|    case fourcc("ipma"):
  ------------------
  |  Branch (524:5): [True: 2.34k, False: 317k]
  ------------------
  525|  2.34k|      box = std::make_shared<Box_ipma>();
  526|  2.34k|      break;
  527|       |
  528|  1.79k|    case fourcc("ispe"):
  ------------------
  |  Branch (528:5): [True: 1.79k, False: 317k]
  ------------------
  529|  1.79k|      box = std::make_shared<Box_ispe>();
  530|  1.79k|      break;
  531|       |
  532|  1.01k|    case fourcc("auxC"):
  ------------------
  |  Branch (532:5): [True: 1.01k, False: 318k]
  ------------------
  533|  1.01k|      box = std::make_shared<Box_auxC>();
  534|  1.01k|      break;
  535|       |
  536|  6.63k|    case fourcc("irot"):
  ------------------
  |  Branch (536:5): [True: 6.63k, False: 312k]
  ------------------
  537|  6.63k|      box = std::make_shared<Box_irot>();
  538|  6.63k|      break;
  539|       |
  540|  2.42k|    case fourcc("imir"):
  ------------------
  |  Branch (540:5): [True: 2.42k, False: 316k]
  ------------------
  541|  2.42k|      box = std::make_shared<Box_imir>();
  542|  2.42k|      break;
  543|       |
  544|  1.52k|    case fourcc("clap"):
  ------------------
  |  Branch (544:5): [True: 1.52k, False: 317k]
  ------------------
  545|  1.52k|      box = std::make_shared<Box_clap>();
  546|  1.52k|      break;
  547|       |
  548|  1.08k|    case fourcc("iscl"):
  ------------------
  |  Branch (548:5): [True: 1.08k, False: 318k]
  ------------------
  549|  1.08k|      box = std::make_shared<Box_iscl>();
  550|  1.08k|      break;
  551|       |
  552|  13.3k|    case fourcc("iref"):
  ------------------
  |  Branch (552:5): [True: 13.3k, False: 306k]
  ------------------
  553|  13.3k|      box = std::make_shared<Box_iref>();
  554|  13.3k|      break;
  555|       |
  556|    863|    case fourcc("rref"):
  ------------------
  |  Branch (556:5): [True: 863, False: 318k]
  ------------------
  557|    863|      box = std::make_shared<Box_rref>();
  558|    863|      break;
  559|       |
  560|  4.55k|    case fourcc("hvcC"):
  ------------------
  |  Branch (560:5): [True: 4.55k, False: 314k]
  ------------------
  561|  4.55k|      box = std::make_shared<Box_hvcC>();
  562|  4.55k|      break;
  563|       |
  564|    131|    case fourcc("hvc1"):
  ------------------
  |  Branch (564:5): [True: 131, False: 319k]
  ------------------
  565|    131|      box = std::make_shared<Box_hvc1>();
  566|    131|      break;
  567|       |
  568|  2.53k|    case fourcc("av1C"):
  ------------------
  |  Branch (568:5): [True: 2.53k, False: 316k]
  ------------------
  569|  2.53k|      box = std::make_shared<Box_av1C>();
  570|  2.53k|      break;
  571|       |
  572|     64|    case fourcc("av01"):
  ------------------
  |  Branch (572:5): [True: 64, False: 319k]
  ------------------
  573|     64|      box = std::make_shared<Box_av01>();
  574|     64|      break;
  575|       |
  576|  2.10k|    case fourcc("vvcC"):
  ------------------
  |  Branch (576:5): [True: 2.10k, False: 317k]
  ------------------
  577|  2.10k|      box = std::make_shared<Box_vvcC>();
  578|  2.10k|      break;
  579|       |
  580|     67|    case fourcc("vvc1"):
  ------------------
  |  Branch (580:5): [True: 67, False: 319k]
  ------------------
  581|     67|      box = std::make_shared<Box_vvc1>();
  582|     67|      break;
  583|       |
  584|  4.41k|    case fourcc("idat"):
  ------------------
  |  Branch (584:5): [True: 4.41k, False: 314k]
  ------------------
  585|  4.41k|      box = std::make_shared<Box_idat>();
  586|  4.41k|      break;
  587|       |
  588|  1.08k|    case fourcc("grpl"):
  ------------------
  |  Branch (588:5): [True: 1.08k, False: 318k]
  ------------------
  589|  1.08k|      box = std::make_shared<Box_grpl>();
  590|  1.08k|      break;
  591|       |
  592|  1.13k|    case fourcc("pymd"):
  ------------------
  |  Branch (592:5): [True: 1.13k, False: 318k]
  ------------------
  593|  1.13k|      box = std::make_shared<Box_pymd>();
  594|  1.13k|      break;
  595|       |
  596|    161|    case fourcc("altr"):
  ------------------
  |  Branch (596:5): [True: 161, False: 319k]
  ------------------
  597|    161|      box = std::make_shared<Box_EntityToGroup>();
  598|    161|      break;
  599|       |
  600|    337|    case fourcc("ster"):
  ------------------
  |  Branch (600:5): [True: 337, False: 319k]
  ------------------
  601|    337|      box = std::make_shared<Box_ster>();
  602|    337|      break;
  603|       |
  604|  4.06k|    case fourcc("dinf"):
  ------------------
  |  Branch (604:5): [True: 4.06k, False: 315k]
  ------------------
  605|  4.06k|      box = std::make_shared<Box_dinf>();
  606|  4.06k|      break;
  607|       |
  608|    379|    case fourcc("dref"):
  ------------------
  |  Branch (608:5): [True: 379, False: 318k]
  ------------------
  609|    379|      box = std::make_shared<Box_dref>();
  610|    379|      break;
  611|       |
  612|    671|    case fourcc("url "):
  ------------------
  |  Branch (612:5): [True: 671, False: 318k]
  ------------------
  613|    671|      box = std::make_shared<Box_url>();
  614|    671|      break;
  615|       |
  616|  5.75k|    case fourcc("colr"):
  ------------------
  |  Branch (616:5): [True: 5.75k, False: 313k]
  ------------------
  617|  5.75k|      box = std::make_shared<Box_colr>();
  618|  5.75k|      break;
  619|       |
  620|  3.63k|    case fourcc("pixi"):
  ------------------
  |  Branch (620:5): [True: 3.63k, False: 315k]
  ------------------
  621|  3.63k|      box = std::make_shared<Box_pixi>();
  622|  3.63k|      break;
  623|       |
  624|  11.9k|    case fourcc("pasp"):
  ------------------
  |  Branch (624:5): [True: 11.9k, False: 307k]
  ------------------
  625|  11.9k|      box = std::make_shared<Box_pasp>();
  626|  11.9k|      break;
  627|       |
  628|  5.35k|    case fourcc("lsel"):
  ------------------
  |  Branch (628:5): [True: 5.35k, False: 314k]
  ------------------
  629|  5.35k|      box = std::make_shared<Box_lsel>();
  630|  5.35k|      break;
  631|       |
  632|  11.4k|    case fourcc("a1op"):
  ------------------
  |  Branch (632:5): [True: 11.4k, False: 307k]
  ------------------
  633|  11.4k|      box = std::make_shared<Box_a1op>();
  634|  11.4k|      break;
  635|       |
  636|  3.84k|    case fourcc("a1lx"):
  ------------------
  |  Branch (636:5): [True: 3.84k, False: 315k]
  ------------------
  637|  3.84k|      box = std::make_shared<Box_a1lx>();
  638|  3.84k|      break;
  639|       |
  640|    724|    case fourcc("clli"):
  ------------------
  |  Branch (640:5): [True: 724, False: 318k]
  ------------------
  641|    724|      box = std::make_shared<Box_clli>();
  642|    724|      break;
  643|       |
  644|  2.89k|    case fourcc("mdcv"):
  ------------------
  |  Branch (644:5): [True: 2.89k, False: 316k]
  ------------------
  645|  2.89k|      box = std::make_shared<Box_mdcv>();
  646|  2.89k|      break;
  647|       |
  648|    716|    case fourcc("amve"):
  ------------------
  |  Branch (648:5): [True: 716, False: 318k]
  ------------------
  649|    716|      box = std::make_shared<Box_amve>();
  650|    716|      break;
  651|       |
  652|    504|    case fourcc("ndwt"):
  ------------------
  |  Branch (652:5): [True: 504, False: 318k]
  ------------------
  653|    504|      box = std::make_shared<Box_ndwt>();
  654|    504|      break;
  655|       |
  656|  1.93k|    case fourcc("cmin"):
  ------------------
  |  Branch (656:5): [True: 1.93k, False: 317k]
  ------------------
  657|  1.93k|      box = std::make_shared<Box_cmin>();
  658|  1.93k|      break;
  659|       |
  660|  2.73k|    case fourcc("cmex"):
  ------------------
  |  Branch (660:5): [True: 2.73k, False: 316k]
  ------------------
  661|  2.73k|      box = std::make_shared<Box_cmex>();
  662|  2.73k|      break;
  663|       |
  664|  1.53k|    case fourcc("udes"):
  ------------------
  |  Branch (664:5): [True: 1.53k, False: 317k]
  ------------------
  665|  1.53k|      box = std::make_shared<Box_udes>();
  666|  1.53k|      break;
  667|       |
  668|    736|    case fourcc("jpgC"):
  ------------------
  |  Branch (668:5): [True: 736, False: 318k]
  ------------------
  669|    736|      box = std::make_shared<Box_jpgC>();
  670|    736|      break;
  671|       |
  672|    122|    case fourcc("mjpg"):
  ------------------
  |  Branch (672:5): [True: 122, False: 319k]
  ------------------
  673|    122|      box = std::make_shared<Box_mjpg>();
  674|    122|      break;
  675|       |
  676|    588|    case fourcc("elng"):
  ------------------
  |  Branch (676:5): [True: 588, False: 318k]
  ------------------
  677|    588|      box = std::make_shared<Box_elng>();
  678|    588|      break;
  679|       |
  680|       |
  681|      0|#if WITH_UNCOMPRESSED_CODEC
  682|    908|    case fourcc("cmpd"):
  ------------------
  |  Branch (682:5): [True: 908, False: 318k]
  ------------------
  683|    908|      box = std::make_shared<Box_cmpd>();
  684|    908|      break;
  685|       |
  686|  4.09k|    case fourcc("uncC"):
  ------------------
  |  Branch (686:5): [True: 4.09k, False: 315k]
  ------------------
  687|  4.09k|      box = std::make_shared<Box_uncC>();
  688|  4.09k|      break;
  689|       |
  690|    637|    case fourcc("cmpC"):
  ------------------
  |  Branch (690:5): [True: 637, False: 318k]
  ------------------
  691|    637|      box = std::make_shared<Box_cmpC>();
  692|    637|      break;
  693|       |
  694|    855|    case fourcc("icef"):
  ------------------
  |  Branch (694:5): [True: 855, False: 318k]
  ------------------
  695|    855|      box = std::make_shared<Box_icef>();
  696|    855|      break;
  697|       |
  698|    572|    case fourcc("cpat"):
  ------------------
  |  Branch (698:5): [True: 572, False: 318k]
  ------------------
  699|    572|      box = std::make_shared<Box_cpat>();
  700|    572|      break;
  701|       |
  702|  1.34k|    case fourcc("splz"):
  ------------------
  |  Branch (702:5): [True: 1.34k, False: 318k]
  ------------------
  703|  1.34k|      box = std::make_shared<Box_splz>();
  704|  1.34k|      break;
  705|       |
  706|    480|    case fourcc("sbpm"):
  ------------------
  |  Branch (706:5): [True: 480, False: 318k]
  ------------------
  707|    480|      box = std::make_shared<Box_sbpm>();
  708|    480|      break;
  709|       |
  710|    417|    case fourcc("snuc"):
  ------------------
  |  Branch (710:5): [True: 417, False: 318k]
  ------------------
  711|    417|      box = std::make_shared<Box_snuc>();
  712|    417|      break;
  713|       |
  714|    377|    case fourcc("cloc"):
  ------------------
  |  Branch (714:5): [True: 377, False: 318k]
  ------------------
  715|    377|      box = std::make_shared<Box_cloc>();
  716|    377|      break;
  717|       |
  718|    714|    case fourcc("uncv"):
  ------------------
  |  Branch (718:5): [True: 714, False: 318k]
  ------------------
  719|    714|      box = std::make_shared<Box_uncv>();
  720|    714|      break;
  721|      0|#endif
  722|       |
  723|       |    // --- JPEG 2000
  724|       |
  725|  5.07k|    case fourcc("j2kH"):
  ------------------
  |  Branch (725:5): [True: 5.07k, False: 314k]
  ------------------
  726|  5.07k|      box = std::make_shared<Box_j2kH>();
  727|  5.07k|      break;
  728|       |
  729|  6.80k|    case fourcc("cdef"):
  ------------------
  |  Branch (729:5): [True: 6.80k, False: 312k]
  ------------------
  730|  6.80k|      box = std::make_shared<Box_cdef>();
  731|  6.80k|      break;
  732|       |
  733|  1.18k|    case fourcc("cmap"):
  ------------------
  |  Branch (733:5): [True: 1.18k, False: 318k]
  ------------------
  734|  1.18k|      box = std::make_shared<Box_cmap>();
  735|  1.18k|      break;
  736|       |
  737|    651|    case fourcc("pclr"):
  ------------------
  |  Branch (737:5): [True: 651, False: 318k]
  ------------------
  738|    651|      box = std::make_shared<Box_pclr>();
  739|    651|      break;
  740|       |
  741|    452|    case fourcc("j2kL"):
  ------------------
  |  Branch (741:5): [True: 452, False: 318k]
  ------------------
  742|    452|      box = std::make_shared<Box_j2kL>();
  743|    452|      break;
  744|       |
  745|     91|    case fourcc("j2ki"):
  ------------------
  |  Branch (745:5): [True: 91, False: 319k]
  ------------------
  746|     91|      box = std::make_shared<Box_j2ki>();
  747|     91|      break;
  748|       |
  749|       |
  750|       |    // --- mski
  751|       |
  752|    640|    case fourcc("mskC"):
  ------------------
  |  Branch (752:5): [True: 640, False: 318k]
  ------------------
  753|    640|      box = std::make_shared<Box_mskC>();
  754|    640|      break;
  755|       |
  756|       |    // --- TAI timestamps
  757|       |
  758|    429|    case fourcc("itai"):
  ------------------
  |  Branch (758:5): [True: 429, False: 318k]
  ------------------
  759|    429|      box = std::make_shared<Box_itai>();
  760|    429|      break;
  761|       |
  762|  1.52k|    case fourcc("taic"):
  ------------------
  |  Branch (762:5): [True: 1.52k, False: 317k]
  ------------------
  763|  1.52k|      box = std::make_shared<Box_taic>();
  764|  1.52k|      break;
  765|       |
  766|       |    // --- AVC (H.264)
  767|       |
  768|  4.96k|    case fourcc("avcC"):
  ------------------
  |  Branch (768:5): [True: 4.96k, False: 314k]
  ------------------
  769|  4.96k|      box = std::make_shared<Box_avcC>();
  770|  4.96k|      break;
  771|       |
  772|     62|    case fourcc("avc1"):
  ------------------
  |  Branch (772:5): [True: 62, False: 319k]
  ------------------
  773|     62|      box = std::make_shared<Box_avc1>();
  774|     62|      break;
  775|       |
  776|      0|#if HEIF_ENABLE_EXPERIMENTAL_FEATURES
  777|  1.21k|    case fourcc("tilC"):
  ------------------
  |  Branch (777:5): [True: 1.21k, False: 318k]
  ------------------
  778|  1.21k|      box = std::make_shared<Box_tilC>();
  779|  1.21k|      break;
  780|      0|#endif
  781|       |
  782|  11.1k|    case fourcc("mini"):
  ------------------
  |  Branch (782:5): [True: 11.1k, False: 308k]
  ------------------
  783|  11.1k|      box = std::make_shared<Box_mini>();
  784|  11.1k|      break;
  785|       |
  786|  2.16k|    case fourcc("mdat"):
  ------------------
  |  Branch (786:5): [True: 2.16k, False: 317k]
  ------------------
  787|       |      // avoid generating a 'Box_other'
  788|  2.16k|      box = std::make_shared<Box>();
  789|  2.16k|      break;
  790|       |
  791|  8.95k|    case fourcc("uuid"):
  ------------------
  |  Branch (791:5): [True: 8.95k, False: 310k]
  ------------------
  792|  8.95k|      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 (792:11): [True: 1.50k, False: 7.45k]
  ------------------
  793|  1.50k|        box = std::make_shared<Box_cmin>();
  794|  1.50k|      }
  795|  7.45k|      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 (795:16): [True: 2.41k, False: 5.03k]
  ------------------
  796|  2.41k|        box = std::make_shared<Box_cmex>();
  797|  2.41k|      }
  798|  5.03k|      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 (798:16): [True: 1.15k, False: 3.87k]
  ------------------
  799|  1.15k|        box = std::make_shared<Box_gimi_content_id>();
  800|  1.15k|      }
  801|  3.87k|#if WITH_UNCOMPRESSED_CODEC
  802|  3.87k|      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 (802:16): [True: 1.06k, False: 2.81k]
  ------------------
  803|  1.06k|        box = std::make_shared<Box_gimi_component_content_ids>();
  804|  1.06k|      }
  805|  2.81k|#endif
  806|  2.81k|      else {
  807|  2.81k|        box = std::make_shared<Box_other>(hdr.get_short_type());
  808|  2.81k|      }
  809|  8.95k|      break;
  810|       |
  811|       |    // --- sequences
  812|       |
  813|    238|    case fourcc("moov"):
  ------------------
  |  Branch (813:5): [True: 238, False: 319k]
  ------------------
  814|    238|      box = std::make_shared<Box_moov>();
  815|    238|      break;
  816|       |
  817|  1.71k|    case fourcc("mvhd"):
  ------------------
  |  Branch (817:5): [True: 1.71k, False: 317k]
  ------------------
  818|  1.71k|      box = std::make_shared<Box_mvhd>();
  819|  1.71k|      break;
  820|       |
  821|    303|    case fourcc("trak"):
  ------------------
  |  Branch (821:5): [True: 303, False: 319k]
  ------------------
  822|    303|      box = std::make_shared<Box_trak>();
  823|    303|      break;
  824|       |
  825|  1.06k|    case fourcc("tkhd"):
  ------------------
  |  Branch (825:5): [True: 1.06k, False: 318k]
  ------------------
  826|  1.06k|      box = std::make_shared<Box_tkhd>();
  827|  1.06k|      break;
  828|       |
  829|     79|    case fourcc("mdia"):
  ------------------
  |  Branch (829:5): [True: 79, False: 319k]
  ------------------
  830|     79|      box = std::make_shared<Box_mdia>();
  831|     79|      break;
  832|       |
  833|    577|    case fourcc("mdhd"):
  ------------------
  |  Branch (833:5): [True: 577, False: 318k]
  ------------------
  834|    577|      box = std::make_shared<Box_mdhd>();
  835|    577|      break;
  836|       |
  837|    305|    case fourcc("minf"):
  ------------------
  |  Branch (837:5): [True: 305, False: 319k]
  ------------------
  838|    305|      box = std::make_shared<Box_minf>();
  839|    305|      break;
  840|       |
  841|    555|    case fourcc("vmhd"):
  ------------------
  |  Branch (841:5): [True: 555, False: 318k]
  ------------------
  842|    555|      box = std::make_shared<Box_vmhd>();
  843|    555|      break;
  844|       |
  845|    472|    case fourcc("stbl"):
  ------------------
  |  Branch (845:5): [True: 472, False: 318k]
  ------------------
  846|    472|      box = std::make_shared<Box_stbl>();
  847|    472|      break;
  848|       |
  849|  1.49k|    case fourcc("stsd"):
  ------------------
  |  Branch (849:5): [True: 1.49k, False: 317k]
  ------------------
  850|  1.49k|      box = std::make_shared<Box_stsd>();
  851|  1.49k|      break;
  852|       |
  853|    509|    case fourcc("stts"):
  ------------------
  |  Branch (853:5): [True: 509, False: 318k]
  ------------------
  854|    509|      box = std::make_shared<Box_stts>();
  855|    509|      break;
  856|       |
  857|    952|    case fourcc("ctts"):
  ------------------
  |  Branch (857:5): [True: 952, False: 318k]
  ------------------
  858|    952|      box = std::make_shared<Box_ctts>();
  859|    952|      break;
  860|       |
  861|    361|    case fourcc("stsc"):
  ------------------
  |  Branch (861:5): [True: 361, False: 318k]
  ------------------
  862|    361|      box = std::make_shared<Box_stsc>();
  863|    361|      break;
  864|       |
  865|    631|    case fourcc("stco"):
  ------------------
  |  Branch (865:5): [True: 631, False: 318k]
  ------------------
  866|    631|      box = std::make_shared<Box_stco>();
  867|    631|      break;
  868|       |
  869|  1.10k|    case fourcc("stsz"):
  ------------------
  |  Branch (869:5): [True: 1.10k, False: 318k]
  ------------------
  870|  1.10k|      box = std::make_shared<Box_stsz>();
  871|  1.10k|      break;
  872|       |
  873|    487|    case fourcc("stss"):
  ------------------
  |  Branch (873:5): [True: 487, False: 318k]
  ------------------
  874|    487|      box = std::make_shared<Box_stss>();
  875|    487|      break;
  876|       |
  877|    402|    case fourcc("ccst"):
  ------------------
  |  Branch (877:5): [True: 402, False: 318k]
  ------------------
  878|    402|      box = std::make_shared<Box_ccst>();
  879|    402|      break;
  880|       |
  881|    911|    case fourcc("auxi"):
  ------------------
  |  Branch (881:5): [True: 911, False: 318k]
  ------------------
  882|    911|      box = std::make_shared<Box_auxi>();
  883|    911|      break;
  884|       |
  885|    616|    case fourcc("edts"):
  ------------------
  |  Branch (885:5): [True: 616, False: 318k]
  ------------------
  886|    616|      box = std::make_shared<Box_edts>();
  887|    616|      break;
  888|       |
  889|    755|    case fourcc("elst"):
  ------------------
  |  Branch (889:5): [True: 755, False: 318k]
  ------------------
  890|    755|      box = std::make_shared<Box_elst>();
  891|    755|      break;
  892|       |
  893|    523|    case fourcc("sbgp"):
  ------------------
  |  Branch (893:5): [True: 523, False: 318k]
  ------------------
  894|    523|      box = std::make_shared<Box_sbgp>();
  895|    523|      break;
  896|       |
  897|  1.67k|    case fourcc("sgpd"):
  ------------------
  |  Branch (897:5): [True: 1.67k, False: 317k]
  ------------------
  898|  1.67k|      box = std::make_shared<Box_sgpd>();
  899|  1.67k|      break;
  900|       |
  901|    532|    case fourcc("btrt"):
  ------------------
  |  Branch (901:5): [True: 532, False: 318k]
  ------------------
  902|    532|      box = std::make_shared<Box_btrt>();
  903|    532|      break;
  904|       |
  905|  1.14k|    case fourcc("saiz"):
  ------------------
  |  Branch (905:5): [True: 1.14k, False: 318k]
  ------------------
  906|  1.14k|      box = std::make_shared<Box_saiz>();
  907|  1.14k|      break;
  908|       |
  909|  1.59k|    case fourcc("saio"):
  ------------------
  |  Branch (909:5): [True: 1.59k, False: 317k]
  ------------------
  910|  1.59k|      box = std::make_shared<Box_saio>();
  911|  1.59k|      break;
  912|       |
  913|    729|    case fourcc("urim"):
  ------------------
  |  Branch (913:5): [True: 729, False: 318k]
  ------------------
  914|    729|      box = std::make_shared<Box_URIMetaSampleEntry>();
  915|    729|      break;
  916|       |
  917|    641|    case fourcc("uri "):
  ------------------
  |  Branch (917:5): [True: 641, False: 318k]
  ------------------
  918|    641|      box = std::make_shared<Box_uri>();
  919|    641|      break;
  920|       |
  921|    294|    case fourcc("nmhd"):
  ------------------
  |  Branch (921:5): [True: 294, False: 319k]
  ------------------
  922|    294|      box = std::make_shared<Box_nmhd>();
  923|    294|      break;
  924|       |
  925|    842|    case fourcc("tref"):
  ------------------
  |  Branch (925:5): [True: 842, False: 318k]
  ------------------
  926|    842|      box = std::make_shared<Box_tref>();
  927|    842|      break;
  928|       |
  929|    277|    case fourcc("sdtp"):
  ------------------
  |  Branch (929:5): [True: 277, False: 319k]
  ------------------
  930|    277|      box = std::make_shared<Box_sdtp>();
  931|    277|      break;
  932|       |
  933|       |    // OMAF
  934|    880|    case fourcc("prfr"):
  ------------------
  |  Branch (934:5): [True: 880, False: 318k]
  ------------------
  935|    880|      box = std::make_shared<Box_prfr>();
  936|    880|      break;
  937|       |
  938|  80.1k|    default:
  ------------------
  |  Branch (938:5): [True: 80.1k, False: 239k]
  ------------------
  939|  80.1k|      box = std::make_shared<Box_other>(hdr.get_short_type());
  940|  80.1k|      break;
  941|   319k|  }
  942|       |
  943|   319k|  box->set_short_header(hdr);
  944|       |
  945|   319k|  box->m_debug_box_type = hdr.get_type_string(); // only for debugging
  946|       |
  947|       |
  948|   319k|  if (range.get_nesting_level() > MAX_BOX_NESTING_LEVEL) {
  ------------------
  |  Branch (948:7): [True: 5, False: 319k]
  ------------------
  949|      5|    return Error(heif_error_Memory_allocation_error,
  950|      5|                 heif_suberror_Security_limit_exceeded,
  951|      5|                 "Security limit for maximum nesting of boxes has been exceeded");
  952|      5|  }
  953|       |
  954|   319k|  if (hdr.has_fixed_box_size()) {
  ------------------
  |  Branch (954:7): [True: 276k, False: 42.7k]
  ------------------
  955|       |    // Sanity checks
  956|   276k|    if (hdr.get_box_size() < hdr.get_header_size()) {
  ------------------
  |  Branch (956:9): [True: 23, False: 276k]
  ------------------
  957|     23|      std::stringstream sstr;
  958|     23|      sstr << "Box size (" << hdr.get_box_size() << " bytes) smaller than header size ("
  959|     23|           << hdr.get_header_size() << " bytes)";
  960|       |
  961|     23|      return {heif_error_Invalid_input,
  962|     23|              heif_suberror_Invalid_box_size,
  963|     23|              sstr.str()};
  964|     23|    }
  965|       |
  966|       |    // this is >= 0 because of above condition
  967|   276k|    auto nBytes = static_cast<uint64_t>(hdr.get_box_size() - hdr.get_header_size());
  968|   276k|    if (nBytes > SIZE_MAX) {
  ------------------
  |  Branch (968:9): [True: 0, False: 276k]
  ------------------
  969|      0|      return {heif_error_Memory_allocation_error,
  970|      0|              heif_suberror_Invalid_box_size,
  971|      0|              "Box size too large"};
  972|      0|    }
  973|       |
  974|       |    // Security check: make sure that box size does not exceed int64 size.
  975|       |
  976|   276k|    if (hdr.get_box_size() > (uint64_t) std::numeric_limits<int64_t>::max()) {
  ------------------
  |  Branch (976:9): [True: 0, False: 276k]
  ------------------
  977|      0|      return {heif_error_Invalid_input,
  978|      0|              heif_suberror_Invalid_box_size};
  979|      0|    }
  980|       |
  981|       |    // --- wait for data to arrive
  982|       |
  983|   276k|    auto status = range.wait_for_available_bytes(static_cast<size_t>(nBytes));
  984|   276k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (984:9): [True: 3.40k, False: 273k]
  ------------------
  985|       |      // TODO: return recoverable error at timeout
  986|  3.40k|      return {heif_error_Invalid_input,
  987|  3.40k|              heif_suberror_End_of_data};
  988|  3.40k|    }
  989|   276k|  }
  990|       |
  991|   315k|  auto box_size = static_cast<int64_t>(hdr.get_box_size());
  992|   315k|  int64_t box_size_without_header = hdr.has_fixed_box_size() ? (box_size - hdr.get_header_size()) : (int64_t)range.get_remaining_bytes();
  ------------------
  |  Branch (992:37): [True: 273k, False: 42.7k]
  ------------------
  993|       |
  994|       |  // Box size may not be larger than remaining bytes in parent box.
  995|       |
  996|   315k|  if ((int64_t)range.get_remaining_bytes() < box_size_without_header) {
  ------------------
  |  Branch (996:7): [True: 3, False: 315k]
  ------------------
  997|      3|    return {heif_error_Invalid_input,
  998|      3|            heif_suberror_Invalid_box_size};
  999|      3|  }
 1000|       |
 1001|       |
 1002|       |  // Create child bitstream range and read box from that range.
 1003|       |
 1004|   315k|  BitstreamRange boxrange(range.get_istream(),
 1005|   315k|                          box_size_without_header,
 1006|   315k|                          &range);
 1007|       |
 1008|   315k|  err = box->parse(boxrange, limits);
 1009|   315k|  boxrange.skip_to_end_of_box();
 1010|       |
 1011|   315k|  if (err == Error::Ok) {
  ------------------
  |  Branch (1011:7): [True: 298k, False: 17.6k]
  ------------------
 1012|   298k|    *result = std::move(box);
 1013|   298k|  }
 1014|  17.6k|  else {
 1015|  17.6k|    parse_error_fatality fatality = box->get_parse_error_fatality();
 1016|       |
 1017|  17.6k|    box = std::make_shared<Box_Error>(box->get_short_type(), err, fatality);
 1018|       |
 1019|       |    // We return a Box_Error that represents the parse error.
 1020|  17.6k|    *result = std::move(box);
 1021|  17.6k|  }
 1022|       |
 1023|   315k|  return err;
 1024|   315k|}
_ZNK3Box4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1028|   148k|{
 1029|       |
 1030|   148k|  BoxHeader::dump(sstr, indent, full_log);
 1031|       |
 1032|   148k|  return;
 1033|   148k|}
_ZNK7FullBox4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1037|  18.4k|{
 1038|       |
 1039|  18.4k|  Box::dump(sstr, indent, full_log);
 1040|       |
 1041|  18.4k|  sstr << indent << "version: " << ((int) m_version) << "\n"
 1042|  18.4k|       << indent << "flags: " << std::hex << m_flags << std::dec << "\n";
 1043|       |
 1044|  18.4k|  return;
 1045|  18.4k|}
_ZN3Box13read_childrenER14BitstreamRangejPK20heif_security_limits:
 1106|  48.8k|{
 1107|       |  // A freshly parsed box has no children yet, so m_children.size() below tracks
 1108|       |  // the number of children read so far.
 1109|  48.8k|  assert(m_children.empty());
  ------------------
  |  Branch (1109:3): [True: 48.8k, False: 0]
  ------------------
 1110|       |
 1111|       |  // Determine the applicable limit on the number of child boxes.
 1112|  48.8k|  uint32_t max_children;
 1113|  48.8k|  if (get_short_type() == fourcc("iinf")) {
  ------------------
  |  Branch (1113:7): [True: 1.91k, False: 46.9k]
  ------------------
 1114|  1.91k|    max_children = limits->max_items;
 1115|  1.91k|  }
 1116|  46.9k|  else {
 1117|  46.9k|    max_children = limits->max_children_per_box;
 1118|  46.9k|  }
 1119|       |
 1120|       |  // If the number of children is known in advance, reject an excessive count
 1121|       |  // directly instead of reading children until the accumulated count reaches
 1122|       |  // the limit.
 1123|  48.8k|  if (max_number != READ_CHILDREN_ALL) {
  ------------------
  |  Branch (1123:7): [True: 2.46k, False: 46.3k]
  ------------------
 1124|  2.46k|    if (max_children && max_number > max_children) {
  ------------------
  |  Branch (1124:9): [True: 2.46k, False: 0]
  |  Branch (1124:25): [True: 13, False: 2.45k]
  ------------------
 1125|     13|      std::stringstream sstr;
 1126|     13|      sstr << "Number of child boxes (" << max_number << ") in '" << get_type_string()
 1127|     13|           << "' box exceeds the security limit of " << max_children << ".";
 1128|       |
 1129|     13|      return Error(heif_error_Memory_allocation_error,
 1130|     13|                   heif_suberror_Security_limit_exceeded,
 1131|     13|                   sstr.str());
 1132|     13|    }
 1133|       |
 1134|       |    // The declared number of children cannot exceed what the remaining input
 1135|       |    // could possibly hold (each box occupies at least an 8-byte header). A
 1136|       |    // larger count means the box is truncated or malformed, so reject it
 1137|       |    // before reading anything. This also bounds the reservation below, which
 1138|       |    // matters when security limits are disabled and 'max_number' is otherwise
 1139|       |    // unbounded.
 1140|  2.45k|    size_t max_possible_children = range.get_remaining_bytes() / 8;
 1141|  2.45k|    if (max_number > max_possible_children) {
  ------------------
  |  Branch (1141:9): [True: 12, False: 2.43k]
  ------------------
 1142|     12|      std::stringstream sstr;
 1143|     12|      sstr << "'" << get_type_string() << "' box declares " << max_number
 1144|     12|           << " child boxes, but the remaining data can hold at most "
 1145|     12|           << max_possible_children << ".";
 1146|     12|      return Error(heif_error_Invalid_input,
 1147|     12|                   heif_suberror_End_of_data,
 1148|     12|                   sstr.str());
 1149|     12|    }
 1150|       |
 1151|  2.43k|    m_children.reserve(max_number);
 1152|  2.43k|  }
 1153|       |
 1154|   223k|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (1154:10): [True: 178k, False: 44.7k]
  |  Branch (1154:26): [True: 178k, False: 0]
  ------------------
 1155|   178k|    std::shared_ptr<Box> box;
 1156|   178k|    Error error = Box::read(range, &box, limits);
 1157|   178k|    if (error != Error::Ok && (!box || box->get_parse_error_fatality() == parse_error_fatality::fatal)) {
  ------------------
  |  Branch (1157:9): [True: 12.2k, False: 166k]
  |  Branch (1157:32): [True: 246, False: 11.9k]
  |  Branch (1157:40): [True: 1.84k, False: 10.1k]
  ------------------
 1158|  2.09k|      return error;
 1159|  2.09k|    }
 1160|       |
 1161|   176k|    if (max_number == READ_CHILDREN_ALL) {
  ------------------
  |  Branch (1161:9): [True: 98.9k, False: 77.8k]
  ------------------
 1162|  98.9k|      if (max_children && m_children.size() > max_children) {
  ------------------
  |  Branch (1162:11): [True: 98.9k, False: 0]
  |  Branch (1162:27): [True: 64, False: 98.9k]
  ------------------
 1163|     64|        std::stringstream sstr;
 1164|     64|        sstr << "Maximum number of child boxes (" << max_children << ") in '" << get_type_string() << "' box exceeded.";
 1165|       |
 1166|       |        // Sanity check.
 1167|     64|        return Error(heif_error_Memory_allocation_error,
 1168|     64|                     heif_suberror_Security_limit_exceeded,
 1169|     64|                     sstr.str());
 1170|     64|      }
 1171|  98.9k|    }
 1172|       |
 1173|   176k|    m_children.push_back(std::move(box));
 1174|       |
 1175|       |    // Stop once we have read the expected number of children.
 1176|   176k|    if (max_number != READ_CHILDREN_ALL &&
  ------------------
  |  Branch (1176:9): [True: 77.8k, False: 98.9k]
  ------------------
 1177|  77.8k|        m_children.size() == max_number) {
  ------------------
  |  Branch (1177:9): [True: 1.91k, False: 75.9k]
  ------------------
 1178|  1.91k|      break;
 1179|  1.91k|    }
 1180|   176k|  }
 1181|       |
 1182|       |  // If a specific number of children was expected, we must have read exactly
 1183|       |  // that many. A short read means the box is truncated or malformed. Prefer
 1184|       |  // this specific error over the lower-level range error below, which would
 1185|       |  // otherwise mask it.
 1186|  46.6k|  if (max_number != READ_CHILDREN_ALL && m_children.size() != max_number) {
  ------------------
  |  Branch (1186:7): [True: 2.27k, False: 44.3k]
  |  Branch (1186:42): [True: 30, False: 2.24k]
  ------------------
 1187|     30|    std::stringstream sstr;
 1188|     30|    sstr << "'" << get_type_string() << "' box declares " << max_number
 1189|     30|         << " child boxes, but only " << m_children.size() << " could be read.";
 1190|     30|    return Error(heif_error_Invalid_input,
 1191|     30|                 heif_suberror_End_of_data,
 1192|     30|                 sstr.str());
 1193|     30|  }
 1194|       |
 1195|  46.6k|  return range.get_error();
 1196|  46.6k|}
_ZNK3Box13dump_childrenERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentbb:
 1213|  41.0k|{
 1214|  41.0k|  bool first = true;
 1215|  41.0k|  int idx=1;
 1216|       |
 1217|  41.0k|  indent++;
 1218|  73.1k|  for (const auto& childBox : m_children) {
  ------------------
  |  Branch (1218:29): [True: 73.1k, False: 41.0k]
  ------------------
 1219|  73.1k|    if (first) {
  ------------------
  |  Branch (1219:9): [True: 34.3k, False: 38.7k]
  ------------------
 1220|  34.3k|      first = false;
 1221|  34.3k|    }
 1222|  38.7k|    else {
 1223|  38.7k|      sstr << indent << "\n";
 1224|  38.7k|    }
 1225|       |
 1226|  73.1k|    if (with_index) {
  ------------------
  |  Branch (1226:9): [True: 20.3k, False: 52.7k]
  ------------------
 1227|  20.3k|      sstr << indent << "index: " << idx << "\n";
 1228|  20.3k|      idx++;
 1229|  20.3k|    }
 1230|       |
 1231|  73.1k|    childBox->dump(sstr, indent, full_log);
 1232|  73.1k|    reset_stream_format(sstr);
 1233|  73.1k|  }
 1234|  41.0k|  indent--;
 1235|  41.0k|}
_ZN9Box_other5parseER14BitstreamRangePK20heif_security_limits:
 1259|  79.7k|{
 1260|  79.7k|  if (has_fixed_box_size()) {
  ------------------
  |  Branch (1260:7): [True: 76.0k, False: 3.71k]
  ------------------
 1261|  76.0k|    size_t len;
 1262|  76.0k|    if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1262:9): [True: 76.0k, False: 0]
  ------------------
 1263|  76.0k|      auto len64 = get_box_size() - get_header_size();
 1264|  76.0k|      if (len64 > MAX_BOX_SIZE) {
  ------------------
  |  Branch (1264:11): [True: 0, False: 76.0k]
  ------------------
 1265|      0|        return {heif_error_Invalid_input,
 1266|      0|                heif_suberror_Security_limit_exceeded,
 1267|      0|                "Box size too large"};
 1268|      0|      }
 1269|       |
 1270|  76.0k|      len = static_cast<size_t>(len64);
 1271|       |
 1272|  76.0k|      m_data.resize(len);
 1273|  76.0k|      range.read(m_data.data(), len);
 1274|  76.0k|    }
 1275|      0|    else {
 1276|      0|      return {heif_error_Invalid_input,
 1277|      0|              heif_suberror_Invalid_box_size};
 1278|      0|    }
 1279|  76.0k|  }
 1280|  3.71k|  else {
 1281|       |    // TODO: boxes until end of file (we will probably never need this)
 1282|  3.71k|  }
 1283|       |
 1284|  79.7k|  return range.get_error();
 1285|  79.7k|}
_ZNK9Box_other4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1305|  43.7k|{
 1306|       |
 1307|  43.7k|  BoxHeader::dump(sstr, indent, full_log);
 1308|       |
 1309|       |  // --- show raw box content
 1310|       |
 1311|  43.7k|  size_t len = 0;
 1312|  43.7k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1312:7): [True: 41.0k, False: 2.71k]
  ------------------
 1313|       |    // We can cast because if it does not fit, it would fail during parsing.
 1314|  41.0k|    len = static_cast<size_t>(get_box_size() - get_header_size());
 1315|  41.0k|  }
 1316|  2.71k|  else {
 1317|  2.71k|    sstr << indent << "invalid box size " << get_box_size() << " (smaller than header)\n";
 1318|  2.71k|    return;
 1319|  2.71k|  }
 1320|       |
 1321|  41.0k|  sstr << write_raw_data_as_hex(m_data.data(), len,
 1322|  41.0k|                                indent.get_string() + "data: ",
 1323|  41.0k|                                indent.get_string() + "      ");
 1324|       |
 1325|  41.0k|  return;
 1326|  43.7k|}
_ZNK9Box_Error4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1330|  4.71k|{
 1331|  4.71k|  sstr << indent << '\'' << fourcc_to_string(m_box_type_with_parse_error) << "' parse error: " << m_error.message << "\n";
 1332|  4.71k|  sstr << indent << "fatality: ";
 1333|  4.71k|  switch (m_fatality) {
  ------------------
  |  Branch (1333:11): [True: 4.71k, False: 0]
  ------------------
 1334|      0|    case parse_error_fatality::fatal: sstr << "fatal\n"; break;
  ------------------
  |  Branch (1334:5): [True: 0, False: 4.71k]
  ------------------
 1335|  1.61k|    case parse_error_fatality::ignorable: sstr << "ignorable\n"; break;
  ------------------
  |  Branch (1335:5): [True: 1.61k, False: 3.10k]
  ------------------
 1336|  3.10k|    case parse_error_fatality::optional: sstr << "optional\n"; break;
  ------------------
  |  Branch (1336:5): [True: 3.10k, False: 1.61k]
  ------------------
 1337|  4.71k|  }
 1338|       |
 1339|  4.71k|  return;
 1340|  4.71k|}
_ZNK9Box_Error24get_parse_error_fatalityEv:
 1343|  11.9k|{
 1344|  11.9k|  return m_fatality;
 1345|  11.9k|}
_ZN8Box_ftyp5parseER14BitstreamRangePK20heif_security_limits:
 1349|  8.08k|{
 1350|  8.08k|  m_major_brand = range.read32();
 1351|  8.08k|  m_minor_version = range.read32();
 1352|       |
 1353|  8.08k|  uint64_t box_size = get_box_size();
 1354|  8.08k|  if (box_size < 8 || box_size - 8 < get_header_size()) {
  ------------------
  |  Branch (1354:7): [True: 4, False: 8.08k]
  |  Branch (1354:23): [True: 8, False: 8.07k]
  ------------------
 1355|       |    // Sanity check.
 1356|     12|    return Error(heif_error_Invalid_input,
 1357|     12|                 heif_suberror_Invalid_box_size,
 1358|     12|                 "ftyp box too small (less than 8 bytes)");
 1359|     12|  }
 1360|       |
 1361|  8.07k|  uint64_t n_minor_brands = (get_box_size() - get_header_size() - 8) / 4;
 1362|       |
 1363|  8.07k|  if (limits->max_number_of_file_brands && n_minor_brands > limits->max_number_of_file_brands) {
  ------------------
  |  Branch (1363:7): [True: 8.07k, False: 0]
  |  Branch (1363:44): [True: 12, False: 8.06k]
  ------------------
 1364|     12|    return {
 1365|     12|      heif_error_Memory_allocation_error,
 1366|     12|      heif_suberror_Security_limit_exceeded,
 1367|     12|      "Number of minor brands in file exceeds security limit"
 1368|     12|    };
 1369|     12|  }
 1370|       |
 1371|  34.8k|  for (uint64_t i = 0; i < n_minor_brands && !range.error(); i++) {
  ------------------
  |  Branch (1371:24): [True: 26.8k, False: 8.06k]
  |  Branch (1371:46): [True: 26.8k, False: 0]
  ------------------
 1372|  26.8k|    m_compatible_brands.push_back(range.read32());
 1373|  26.8k|  }
 1374|       |
 1375|  8.06k|  return range.get_error();
 1376|  8.07k|}
_ZNK8Box_ftyp4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1389|  4.28k|{
 1390|       |
 1391|  4.28k|  BoxHeader::dump(sstr, indent, full_log);
 1392|       |
 1393|  4.28k|  sstr << indent << "major brand: " << fourcc_to_string(m_major_brand) << "\n"
 1394|  4.28k|       << indent << "minor version: ";
 1395|  4.28k|  if (m_minor_version < ('A' << 24)) {
  ------------------
  |  Branch (1395:7): [True: 3.69k, False: 595]
  ------------------
 1396|       |    // This is probably a version number
 1397|  3.69k|    sstr << m_minor_version;
 1398|  3.69k|  } else {
 1399|       |    // probably a 4CC, as used for mif3
 1400|    595|    sstr << fourcc_to_string(m_minor_version);
 1401|    595|  }
 1402|  4.28k|  sstr << "\n" << indent << "compatible brands: ";
 1403|       |
 1404|  4.28k|  bool first = true;
 1405|  15.2k|  for (uint32_t brand : m_compatible_brands) {
  ------------------
  |  Branch (1405:23): [True: 15.2k, False: 4.28k]
  ------------------
 1406|  15.2k|    if (first) { first = false; }
  ------------------
  |  Branch (1406:9): [True: 4.06k, False: 11.1k]
  ------------------
 1407|  11.1k|    else { sstr << ','; }
 1408|       |
 1409|  15.2k|    sstr << fourcc_to_string(brand);
 1410|  15.2k|  }
 1411|  4.28k|  sstr << "\n";
 1412|       |
 1413|  4.28k|  return;
 1414|  4.28k|}
_ZN8Box_free5parseER14BitstreamRangePK20heif_security_limits:
 1443|    529|{
 1444|    529|  range.skip_to_end_of_box();
 1445|    529|  return range.get_error();
 1446|    529|}
_ZNK8Box_free4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1450|    450|{
 1451|    450|  BoxHeader::dump(sstr, indent, full_log);
 1452|    450|  return;
 1453|    450|}
_ZN8Box_meta5parseER14BitstreamRangePK20heif_security_limits:
 1465|  1.68k|{
 1466|  1.68k|  parse_full_box_header(range);
 1467|       |
 1468|  1.68k|  if (get_version() != 0) {
  ------------------
  |  Branch (1468:7): [True: 1, False: 1.68k]
  ------------------
 1469|      1|    return unsupported_version_error("meta");
 1470|      1|  }
 1471|       |
 1472|       |  /*
 1473|       |  uint64_t boxSizeLimit;
 1474|       |  if (get_box_size() == BoxHeader::size_until_end_of_file) {
 1475|       |    boxSizeLimit = sizeLimit;
 1476|       |  }
 1477|       |  else {
 1478|       |    boxSizeLimit = get_box_size() - get_header_size();
 1479|       |  }
 1480|       |  */
 1481|       |
 1482|  1.68k|  return read_children(range, READ_CHILDREN_ALL, limits);
 1483|  1.68k|}
_ZNK8Box_meta4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1487|    901|{
 1488|    901|  Box::dump(sstr, indent, full_log);
 1489|    901|  dump_children(sstr, indent, full_log);
 1490|       |
 1491|    901|  return;
 1492|    901|}
_ZNK7FullBox25unsupported_version_errorEPKc:
 1496|  2.29k|{
 1497|  2.29k|  std::stringstream sstr;
 1498|  2.29k|  sstr << box << " box data version " << ((int) m_version) << " is not implemented yet";
 1499|       |
 1500|  2.29k|  return {heif_error_Unsupported_feature,
 1501|  2.29k|          heif_suberror_Unsupported_data_version,
 1502|  2.29k|          sstr.str()};
 1503|  2.29k|}
_ZN8Box_hdlr5parseER14BitstreamRangePK20heif_security_limits:
 1507|  2.35k|{
 1508|  2.35k|  parse_full_box_header(range);
 1509|       |
 1510|  2.35k|  if (get_version() != 0) {
  ------------------
  |  Branch (1510:7): [True: 4, False: 2.35k]
  ------------------
 1511|      4|    return unsupported_version_error("hdlr");
 1512|      4|  }
 1513|       |
 1514|  2.35k|  m_pre_defined = range.read32();
 1515|  2.35k|  m_handler_type = range.read32();
 1516|       |
 1517|  9.41k|  for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1517:19): [True: 7.05k, False: 2.35k]
  ------------------
 1518|  7.05k|    m_reserved[i] = range.read32();
 1519|  7.05k|  }
 1520|       |
 1521|  2.35k|  m_name = range.read_string();
 1522|       |
 1523|  2.35k|  return range.get_error();
 1524|  2.35k|}
_ZNK8Box_hdlr4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1528|  1.18k|{
 1529|  1.18k|  Box::dump(sstr, indent, full_log);
 1530|  1.18k|  sstr << indent << "pre_defined: " << m_pre_defined << "\n"
 1531|  1.18k|       << indent << "handler_type: " << fourcc_to_string(m_handler_type) << "\n"
 1532|  1.18k|       << indent << "name: " << m_name << "\n";
 1533|       |
 1534|  1.18k|  return;
 1535|  1.18k|}
_ZN8Box_pitm5parseER14BitstreamRangePK20heif_security_limits:
 1558|  2.42k|{
 1559|  2.42k|  parse_full_box_header(range);
 1560|       |
 1561|  2.42k|  if (get_version() > 1) {
  ------------------
  |  Branch (1561:7): [True: 6, False: 2.41k]
  ------------------
 1562|      6|    return unsupported_version_error("pitm");
 1563|      6|  }
 1564|       |
 1565|       |
 1566|  2.41k|  if (get_version() == 0) {
  ------------------
  |  Branch (1566:7): [True: 2.01k, False: 404]
  ------------------
 1567|  2.01k|    m_item_ID = range.read16();
 1568|  2.01k|  }
 1569|    404|  else {
 1570|    404|    m_item_ID = range.read32();
 1571|    404|  }
 1572|       |
 1573|  2.41k|  return range.get_error();
 1574|  2.42k|}
_ZNK8Box_pitm4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1578|  1.50k|{
 1579|  1.50k|  Box::dump(sstr, indent, full_log);
 1580|  1.50k|  sstr << indent << "item_ID: " << m_item_ID << "\n";
 1581|       |
 1582|  1.50k|  return;
 1583|  1.50k|}
_ZN8Box_iloc5parseER14BitstreamRangePK20heif_security_limits:
 1616|  1.56k|{
 1617|  1.56k|  parse_full_box_header(range);
 1618|       |
 1619|  1.56k|  if (get_version() > 2) {
  ------------------
  |  Branch (1619:7): [True: 1, False: 1.56k]
  ------------------
 1620|      1|    return unsupported_version_error("iloc");
 1621|      1|  }
 1622|       |
 1623|  1.56k|  const int version = get_version();
 1624|       |
 1625|  1.56k|  uint16_t values4 = range.read16();
 1626|       |
 1627|  1.56k|  int offset_size = (values4 >> 12) & 0xF;
 1628|  1.56k|  int length_size = (values4 >> 8) & 0xF;
 1629|  1.56k|  int base_offset_size = (values4 >> 4) & 0xF;
 1630|  1.56k|  int index_size = 0;
 1631|       |
 1632|  1.56k|  if (version == 1 || version == 2) {
  ------------------
  |  Branch (1632:7): [True: 244, False: 1.32k]
  |  Branch (1632:23): [True: 297, False: 1.02k]
  ------------------
 1633|    541|    index_size = (values4 & 0xF);
 1634|    541|  }
 1635|       |
 1636|  1.56k|  uint32_t item_count = 0;
 1637|  1.56k|  if (version < 2) {
  ------------------
  |  Branch (1637:7): [True: 1.27k, False: 297]
  ------------------
 1638|  1.27k|    item_count = range.read16();
 1639|  1.27k|  }
 1640|    297|  else if (version == 2) {
  ------------------
  |  Branch (1640:12): [True: 297, False: 0]
  ------------------
 1641|    297|    item_count = range.read32();
 1642|    297|  }
 1643|       |
 1644|       |  // Sanity check. (This might be obsolete now as we check for range.error() below).
 1645|  1.56k|  if (limits->max_items && item_count > limits->max_items) {
  ------------------
  |  Branch (1645:7): [True: 1.56k, False: 0]
  |  Branch (1645:28): [True: 46, False: 1.52k]
  ------------------
 1646|     46|    std::stringstream sstr;
 1647|     46|    sstr << "iloc box contains " << item_count << " items, which exceeds the security limit of "
 1648|     46|         << limits->max_items << " items.";
 1649|       |
 1650|     46|    return Error(heif_error_Memory_allocation_error,
 1651|     46|                 heif_suberror_Security_limit_exceeded,
 1652|     46|                 sstr.str());
 1653|     46|  }
 1654|       |
 1655|  5.52k|  for (uint32_t i = 0; i < item_count; i++) {
  ------------------
  |  Branch (1655:24): [True: 4.17k, False: 1.35k]
  ------------------
 1656|  4.17k|    Item item;
 1657|       |
 1658|  4.17k|    if (range.eof()) {
  ------------------
  |  Branch (1658:9): [True: 99, False: 4.07k]
  ------------------
 1659|     99|      std::stringstream sstr;
 1660|     99|      sstr << "iloc box should contain " << item_count << " items, but we can only read " << i << " items.";
 1661|       |
 1662|     99|      return {heif_error_Invalid_input,
 1663|     99|              heif_suberror_End_of_data,
 1664|     99|              sstr.str()};
 1665|     99|    }
 1666|       |
 1667|  4.07k|    if (version < 2) {
  ------------------
  |  Branch (1667:9): [True: 3.86k, False: 211]
  ------------------
 1668|  3.86k|      item.item_ID = range.read16();
 1669|  3.86k|    }
 1670|    211|    else if (version == 2) {
  ------------------
  |  Branch (1670:14): [True: 211, False: 0]
  ------------------
 1671|    211|      item.item_ID = range.read32();
 1672|    211|    }
 1673|       |
 1674|  4.07k|    if (version >= 1) {
  ------------------
  |  Branch (1674:9): [True: 593, False: 3.47k]
  ------------------
 1675|    593|      values4 = range.read16();
 1676|    593|      item.construction_method = (values4 & 0xF);
 1677|    593|    }
 1678|       |
 1679|  4.07k|    item.data_reference_index = range.read16();
 1680|       |
 1681|  4.07k|    item.base_offset = 0;
 1682|  4.07k|    if (base_offset_size == 4) {
  ------------------
  |  Branch (1682:9): [True: 597, False: 3.47k]
  ------------------
 1683|    597|      item.base_offset = range.read32();
 1684|    597|    }
 1685|  3.47k|    else if (base_offset_size == 8) {
  ------------------
  |  Branch (1685:14): [True: 194, False: 3.28k]
  ------------------
 1686|    194|      item.base_offset = ((uint64_t) range.read32()) << 32;
 1687|    194|      item.base_offset |= range.read32();
 1688|    194|    }
 1689|       |
 1690|  4.07k|    uint16_t extent_count = range.read16();
 1691|       |
 1692|       |    // Sanity check.
 1693|  4.07k|    auto max_iloc_extents = limits->max_iloc_extents_per_item;
 1694|  4.07k|    if (max_iloc_extents && extent_count > max_iloc_extents) {
  ------------------
  |  Branch (1694:9): [True: 4.07k, False: 0]
  |  Branch (1694:29): [True: 26, False: 4.04k]
  ------------------
 1695|     26|      std::stringstream sstr;
 1696|     26|      sstr << "Number of extents in iloc box (" << extent_count << ") exceeds security limit ("
 1697|     26|           << max_iloc_extents << ")\n";
 1698|       |
 1699|     26|      return Error(heif_error_Memory_allocation_error,
 1700|     26|                   heif_suberror_Security_limit_exceeded,
 1701|     26|                   sstr.str());
 1702|     26|    }
 1703|       |
 1704|  18.9k|    for (int e = 0; e < extent_count; e++) {
  ------------------
  |  Branch (1704:21): [True: 14.9k, False: 4.00k]
  ------------------
 1705|  14.9k|      Extent extent;
 1706|       |
 1707|  14.9k|      if (range.eof()) {
  ------------------
  |  Branch (1707:11): [True: 41, False: 14.9k]
  ------------------
 1708|     41|        std::stringstream sstr;
 1709|     41|        sstr << "iloc item should contain " << extent_count << " extents, but we can only read " << e << " extents.";
 1710|       |
 1711|     41|        return {heif_error_Invalid_input,
 1712|     41|                heif_suberror_End_of_data,
 1713|     41|                sstr.str()};
 1714|     41|      }
 1715|       |
 1716|  14.9k|      if ((version == 1 || version == 2) && index_size > 0) {
  ------------------
  |  Branch (1716:12): [True: 1.48k, False: 13.4k]
  |  Branch (1716:28): [True: 292, False: 13.1k]
  |  Branch (1716:45): [True: 1.27k, False: 495]
  ------------------
 1717|  1.27k|        if (index_size == 4) {
  ------------------
  |  Branch (1717:13): [True: 432, False: 847]
  ------------------
 1718|    432|          extent.index = range.read32();
 1719|    432|        }
 1720|    847|        else if (index_size == 8) {
  ------------------
  |  Branch (1720:18): [True: 276, False: 571]
  ------------------
 1721|    276|          extent.index = ((uint64_t) range.read32()) << 32;
 1722|    276|          extent.index |= range.read32();
 1723|    276|        }
 1724|  1.27k|      }
 1725|       |
 1726|  14.9k|      extent.offset = 0;
 1727|  14.9k|      if (offset_size == 4) {
  ------------------
  |  Branch (1727:11): [True: 629, False: 14.3k]
  ------------------
 1728|    629|        extent.offset = range.read32();
 1729|    629|      }
 1730|  14.3k|      else if (offset_size == 8) {
  ------------------
  |  Branch (1730:16): [True: 194, False: 14.1k]
  ------------------
 1731|    194|        extent.offset = ((uint64_t) range.read32()) << 32;
 1732|    194|        extent.offset |= range.read32();
 1733|    194|      }
 1734|       |
 1735|       |
 1736|  14.9k|      extent.length = 0;
 1737|  14.9k|      if (length_size == 4) {
  ------------------
  |  Branch (1737:11): [True: 631, False: 14.3k]
  ------------------
 1738|    631|        extent.length = range.read32();
 1739|    631|      }
 1740|  14.3k|      else if (length_size == 8) {
  ------------------
  |  Branch (1740:16): [True: 290, False: 14.0k]
  ------------------
 1741|    290|        extent.length = ((uint64_t) range.read32()) << 32;
 1742|    290|        extent.length |= range.read32();
 1743|    290|      }
 1744|       |
 1745|  14.9k|      item.extents.push_back(extent);
 1746|  14.9k|    }
 1747|       |
 1748|  4.00k|    if (!range.error()) {
  ------------------
  |  Branch (1748:9): [True: 3.92k, False: 83]
  ------------------
 1749|  3.92k|      m_items.push_back(item);
 1750|  3.92k|    }
 1751|  4.00k|  }
 1752|       |
 1753|  1.35k|  return range.get_error();
 1754|  1.52k|}
_ZN8Box_ilocC2Ev:
 1758|  1.56k|{
 1759|  1.56k|  set_short_type(fourcc("iloc"));
 1760|       |
 1761|  1.56k|  set_use_tmp_file(false);
 1762|  1.56k|}
_ZN8Box_ilocD2Ev:
 1766|  1.56k|{
 1767|  1.56k|  if (m_use_tmpfile) {
  ------------------
  |  Branch (1767:7): [True: 0, False: 1.56k]
  ------------------
 1768|      0|    unlink(m_tmp_filename);
 1769|      0|  }
 1770|  1.56k|}
_ZN8Box_iloc16set_use_tmp_fileEb:
 1774|  1.56k|{
 1775|  1.56k|  m_use_tmpfile = flag;
 1776|  1.56k|  if (flag) {
  ------------------
  |  Branch (1776:7): [True: 0, False: 1.56k]
  ------------------
 1777|      0|#if !defined(_WIN32)
 1778|      0|    strcpy(m_tmp_filename, "/tmp/libheif-XXXXXX");
 1779|      0|    m_tmpfile_fd = mkstemp(m_tmp_filename);
 1780|       |#else
 1781|       |    // TODO Currently unused code. Implement when needed.
 1782|       |    assert(false);
 1783|       |#  if 0
 1784|       |    char tmpname[L_tmpnam_s];
 1785|       |    // TODO: check return value (errno_t)
 1786|       |    tmpnam_s(tmpname, L_tmpnam_s);
 1787|       |    _sopen_s(&m_tmpfile_fd, tmpname, _O_CREAT | _O_TEMPORARY | _O_TRUNC | _O_RDWR, _SH_DENYRW, _S_IREAD | _S_IWRITE);
 1788|       |#  endif
 1789|       |#endif
 1790|      0|  }
 1791|  1.56k|}
_ZNK8Box_iloc4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1795|  1.21k|{
 1796|  1.21k|  Box::dump(sstr, indent, full_log);
 1797|       |
 1798|  1.94k|  for (const Item& item : m_items) {
  ------------------
  |  Branch (1798:25): [True: 1.94k, False: 1.21k]
  ------------------
 1799|  1.94k|    sstr << indent << "item ID: " << item.item_ID << "\n"
 1800|  1.94k|         << indent << "  construction method: " << ((int) item.construction_method) << "\n"
 1801|  1.94k|         << indent << "  data_reference_index: " << std::hex
 1802|  1.94k|         << item.data_reference_index << std::dec << "\n"
 1803|  1.94k|         << indent << "  base_offset: " << item.base_offset << "\n";
 1804|       |
 1805|  1.94k|    sstr << indent << "  extents: ";
 1806|  8.38k|    for (const Extent& extent : item.extents) {
  ------------------
  |  Branch (1806:31): [True: 8.38k, False: 1.94k]
  ------------------
 1807|  8.38k|      sstr << extent.offset << "," << extent.length;
 1808|  8.38k|      if (extent.index != 0) {
  ------------------
  |  Branch (1808:11): [True: 310, False: 8.07k]
  ------------------
 1809|    310|        sstr << ";index=" << extent.index;
 1810|    310|      }
 1811|  8.38k|      sstr << " ";
 1812|  8.38k|    }
 1813|  1.94k|    sstr << "\n";
 1814|  1.94k|  }
 1815|       |
 1816|  1.21k|  return;
 1817|  1.21k|}
_ZN8Box_infe5parseER14BitstreamRangePK20heif_security_limits:
 2497|  4.08k|{
 2498|  4.08k|  parse_full_box_header(range);
 2499|       |
 2500|       |  // only versions 2,3 are required by HEIF
 2501|  4.08k|  if (get_version() > 3) {
  ------------------
  |  Branch (2501:7): [True: 6, False: 4.08k]
  ------------------
 2502|      6|    return unsupported_version_error("infe");
 2503|      6|  }
 2504|       |
 2505|  4.08k|  if (get_version() <= 1) {
  ------------------
  |  Branch (2505:7): [True: 280, False: 3.80k]
  ------------------
 2506|    280|    m_item_ID = range.read16();
 2507|    280|    m_item_protection_index = range.read16();
 2508|       |
 2509|    280|    m_item_name = range.read_string();
 2510|    280|    m_content_type = range.read_string();
 2511|    280|    m_content_encoding = range.read_string();
 2512|    280|  }
 2513|       |
 2514|  4.08k|  m_item_type_4cc = 0;
 2515|       |
 2516|  4.08k|  if (get_version() >= 2) {
  ------------------
  |  Branch (2516:7): [True: 3.80k, False: 280]
  ------------------
 2517|  3.80k|    m_hidden_item = (get_flags() & 1);
 2518|       |
 2519|  3.80k|    if (get_version() == 2) {
  ------------------
  |  Branch (2519:9): [True: 3.44k, False: 355]
  ------------------
 2520|  3.44k|      m_item_ID = range.read16();
 2521|  3.44k|    }
 2522|    355|    else {
 2523|    355|      m_item_ID = range.read32();
 2524|    355|    }
 2525|       |
 2526|  3.80k|    m_item_protection_index = range.read16();
 2527|  3.80k|    m_item_type_4cc = range.read32();
 2528|       |
 2529|  3.80k|    m_item_name = range.read_string();
 2530|  3.80k|    if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2530:9): [True: 641, False: 3.16k]
  ------------------
 2531|    641|      m_content_type = range.read_string();
 2532|    641|      m_content_encoding = range.read_string();
 2533|    641|    }
 2534|  3.16k|    else if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2534:14): [True: 892, False: 2.26k]
  ------------------
 2535|    892|      m_item_uri_type = range.read_string();
 2536|    892|    }
 2537|  3.80k|  }
 2538|       |
 2539|  4.08k|  return range.get_error();
 2540|  4.08k|}
_ZNK8Box_infe4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2618|  2.90k|{
 2619|  2.90k|  Box::dump(sstr, indent, full_log);
 2620|       |
 2621|  2.90k|  sstr << indent << "item_ID: " << m_item_ID << "\n"
 2622|  2.90k|       << indent << "item_protection_index: " << m_item_protection_index << "\n"
 2623|  2.90k|       << indent << "item_type: " << fourcc_to_string(m_item_type_4cc) << "\n"
 2624|  2.90k|       << indent << "item_name: " << m_item_name << "\n";
 2625|       |
 2626|  2.90k|  if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2626:7): [True: 489, False: 2.41k]
  ------------------
 2627|    489|    sstr << indent << "content_type: " << m_content_type << "\n"
 2628|    489|         << indent << "content_encoding: " << m_content_encoding << "\n";
 2629|    489|  }
 2630|       |
 2631|  2.90k|  if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2631:7): [True: 683, False: 2.22k]
  ------------------
 2632|    683|    sstr << indent << "item uri type: " << m_item_uri_type << "\n";
 2633|    683|  }
 2634|       |
 2635|  2.90k|  sstr << indent << "hidden item: " << std::boolalpha << m_hidden_item << "\n";
 2636|       |
 2637|  2.90k|  return;
 2638|  2.90k|}
_ZN8Box_iinf5parseER14BitstreamRangePK20heif_security_limits:
 2642|  2.36k|{
 2643|  2.36k|  parse_full_box_header(range);
 2644|       |
 2645|       |  // TODO: there are several images in circulation that have an iinf version=2. We should not enforce this with a hard error.
 2646|  2.36k|  if (false && get_version() > 1) {
  ------------------
  |  Branch (2646:7): [Folded, False: 2.36k]
  |  Branch (2646:16): [True: 0, False: 0]
  ------------------
 2647|      0|    return unsupported_version_error("iinf");
 2648|      0|  }
 2649|       |
 2650|  2.36k|  int nEntries_size = (get_version() > 0) ? 4 : 2;
  ------------------
  |  Branch (2650:23): [True: 162, False: 2.20k]
  ------------------
 2651|       |
 2652|  2.36k|  uint32_t item_count;
 2653|  2.36k|  if (nEntries_size == 2) {
  ------------------
  |  Branch (2653:7): [True: 2.20k, False: 162]
  ------------------
 2654|  2.20k|    item_count = range.read16();
 2655|  2.20k|  }
 2656|    162|  else {
 2657|    162|    item_count = range.read32();
 2658|    162|  }
 2659|       |
 2660|  2.36k|  if (item_count == 0) {
  ------------------
  |  Branch (2660:7): [True: 382, False: 1.98k]
  ------------------
 2661|    382|    return Error::Ok;
 2662|    382|  }
 2663|       |
 2664|       |  // Sanity check.
 2665|  1.98k|  if (limits->max_items && item_count > limits->max_items) {
  ------------------
  |  Branch (2665:7): [True: 1.98k, False: 0]
  |  Branch (2665:28): [True: 64, False: 1.91k]
  ------------------
 2666|     64|    std::stringstream sstr;
 2667|     64|    sstr << "iinf box contains " << item_count << " items, which exceeds the security limit of "
 2668|     64|         << limits->max_items << " items.";
 2669|       |
 2670|     64|    return Error(heif_error_Memory_allocation_error,
 2671|     64|                 heif_suberror_Security_limit_exceeded,
 2672|     64|                 sstr.str());
 2673|     64|  }
 2674|       |
 2675|  1.91k|  return read_children(range, item_count, limits);
 2676|  1.98k|}
_ZNK8Box_iinf4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2680|  1.45k|{
 2681|  1.45k|  Box::dump(sstr, indent, full_log);
 2682|       |
 2683|  1.45k|  dump_children(sstr, indent, full_log);
 2684|       |
 2685|  1.45k|  return;
 2686|  1.45k|}
_ZN8Box_iprp5parseER14BitstreamRangePK20heif_security_limits:
 2690|  20.4k|{
 2691|       |  //parse_full_box_header(range);
 2692|       |
 2693|  20.4k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2694|  20.4k|}
_ZNK8Box_iprp4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2726|  18.5k|{
 2727|  18.5k|  Box::dump(sstr, indent, full_log);
 2728|       |
 2729|  18.5k|  dump_children(sstr, indent, full_log);
 2730|       |
 2731|  18.5k|  return;
 2732|  18.5k|}
_ZN8Box_ipco5parseER14BitstreamRangePK20heif_security_limits:
 2747|  10.0k|{
 2748|       |  //parse_full_box_header(range);
 2749|       |
 2750|  10.0k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2751|  10.0k|}
_ZNK8Box_ipco4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2755|  8.13k|{
 2756|  8.13k|  Box::dump(sstr, indent, full_log);
 2757|       |
 2758|  8.13k|  dump_children(sstr, indent, full_log, true);
 2759|       |
 2760|  8.13k|  return;
 2761|  8.13k|}
_ZN8Box_pixi5parseER14BitstreamRangePK20heif_security_limits:
 2765|  3.63k|{
 2766|  3.63k|  parse_full_box_header(range);
 2767|       |
 2768|  3.63k|  if (get_version() != 0) {
  ------------------
  |  Branch (2768:7): [True: 496, False: 3.14k]
  ------------------
 2769|    496|    return unsupported_version_error("pixi");
 2770|    496|  }
 2771|       |
 2772|  3.14k|  StreamReader::grow_status status;
 2773|  3.14k|  uint8_t num_channels = range.read8();
 2774|  3.14k|  status = range.wait_for_available_bytes(num_channels);
 2775|  3.14k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (2775:7): [True: 23, False: 3.11k]
  ------------------
 2776|       |    // TODO: return recoverable error at timeout
 2777|     23|    return Error(heif_error_Invalid_input,
 2778|     23|                 heif_suberror_End_of_data);
 2779|     23|  }
 2780|       |
 2781|  3.11k|  m_bits_per_channel.resize(num_channels);
 2782|  28.6k|  for (int i = 0; i < num_channels; i++) {
  ------------------
  |  Branch (2782:19): [True: 25.5k, False: 3.11k]
  ------------------
 2783|  25.5k|    m_bits_per_channel[i] = range.read8();
 2784|  25.5k|  }
 2785|       |
 2786|  3.11k|  return range.get_error();
 2787|  3.14k|}
_ZNK8Box_pixi4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2791|  1.41k|{
 2792|  1.41k|  Box::dump(sstr, indent, full_log);
 2793|       |
 2794|  1.41k|  sstr << indent << "bits_per_channel: ";
 2795|       |
 2796|  4.16k|  for (size_t i = 0; i < m_bits_per_channel.size(); i++) {
  ------------------
  |  Branch (2796:22): [True: 2.75k, False: 1.41k]
  ------------------
 2797|  2.75k|    if (i > 0) sstr << ",";
  ------------------
  |  Branch (2797:9): [True: 1.56k, False: 1.18k]
  ------------------
 2798|  2.75k|    sstr << ((int) m_bits_per_channel[i]);
 2799|  2.75k|  }
 2800|       |
 2801|  1.41k|  sstr << "\n";
 2802|       |
 2803|  1.41k|  return;
 2804|  1.41k|}
_ZN8Box_pasp5parseER14BitstreamRangePK20heif_security_limits:
 2829|  11.9k|{
 2830|       |  //parse_full_box_header(range);
 2831|       |
 2832|  11.9k|  hSpacing = range.read32();
 2833|  11.9k|  vSpacing = range.read32();
 2834|       |
 2835|  11.9k|  return range.get_error();
 2836|  11.9k|}
_ZNK8Box_pasp4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2840|  5.07k|{
 2841|  5.07k|  Box::dump(sstr, indent, full_log);
 2842|       |
 2843|  5.07k|  sstr << indent << "hSpacing: " << hSpacing << "\n";
 2844|  5.07k|  sstr << indent << "vSpacing: " << vSpacing << "\n";
 2845|       |
 2846|  5.07k|  return;
 2847|  5.07k|}
_ZN8Box_lsel5parseER14BitstreamRangePK20heif_security_limits:
 2864|  5.34k|{
 2865|  5.34k|  layer_id = range.read16();
 2866|       |
 2867|  5.34k|  return range.get_error();
 2868|  5.34k|}
_ZNK8Box_lsel4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2872|  2.60k|{
 2873|  2.60k|  Box::dump(sstr, indent, full_log);
 2874|       |
 2875|  2.60k|  sstr << indent << "layer_id: " << layer_id << "\n";
 2876|       |
 2877|  2.60k|  return;
 2878|  2.60k|}
_ZN8Box_clli5parseER14BitstreamRangePK20heif_security_limits:
 2894|    722|{
 2895|       |  //parse_full_box_header(range);
 2896|       |
 2897|    722|  clli.max_content_light_level = range.read16();
 2898|    722|  clli.max_pic_average_light_level = range.read16();
 2899|       |
 2900|    722|  return range.get_error();
 2901|    722|}
_ZNK8Box_clli4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2905|    278|{
 2906|    278|  Box::dump(sstr, indent, full_log);
 2907|       |
 2908|    278|  sstr << indent << "max_content_light_level: " << clli.max_content_light_level << "\n";
 2909|    278|  sstr << indent << "max_pic_average_light_level: " << clli.max_pic_average_light_level << "\n";
 2910|       |
 2911|    278|  return;
 2912|    278|}
_ZN8Box_mdcvC2Ev:
 2929|  5.68k|{
 2930|  5.68k|  set_short_type(fourcc("mdcv"));
 2931|       |
 2932|  5.68k|  memset(&mdcv, 0, sizeof(heif_mastering_display_colour_volume));
 2933|  5.68k|}
_ZN8Box_mdcv5parseER14BitstreamRangePK20heif_security_limits:
 2937|  2.89k|{
 2938|       |  //parse_full_box_header(range);
 2939|       |
 2940|  11.5k|  for (int c = 0; c < 3; c++) {
  ------------------
  |  Branch (2940:19): [True: 8.67k, False: 2.89k]
  ------------------
 2941|  8.67k|    mdcv.display_primaries_x[c] = range.read16();
 2942|  8.67k|    mdcv.display_primaries_y[c] = range.read16();
 2943|  8.67k|  }
 2944|       |
 2945|  2.89k|  mdcv.white_point_x = range.read16();
 2946|  2.89k|  mdcv.white_point_y = range.read16();
 2947|  2.89k|  mdcv.max_display_mastering_luminance = range.read32();
 2948|  2.89k|  mdcv.min_display_mastering_luminance = range.read32();
 2949|       |
 2950|  2.89k|  return range.get_error();
 2951|  2.89k|}
_ZNK8Box_mdcv4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2955|  2.49k|{
 2956|  2.49k|  Box::dump(sstr, indent, full_log);
 2957|       |
 2958|  2.49k|  sstr << indent << "display_primaries (x,y): ";
 2959|  2.49k|  sstr << "(" << mdcv.display_primaries_x[0] << ";" << mdcv.display_primaries_y[0] << "), ";
 2960|  2.49k|  sstr << "(" << mdcv.display_primaries_x[1] << ";" << mdcv.display_primaries_y[1] << "), ";
 2961|  2.49k|  sstr << "(" << mdcv.display_primaries_x[2] << ";" << mdcv.display_primaries_y[2] << ")\n";
 2962|       |
 2963|  2.49k|  sstr << indent << "white point (x,y): (" << mdcv.white_point_x << ";" << mdcv.white_point_y << ")\n";
 2964|  2.49k|  sstr << indent << "max display mastering luminance: " << mdcv.max_display_mastering_luminance << "\n";
 2965|  2.49k|  sstr << indent << "min display mastering luminance: " << mdcv.min_display_mastering_luminance << "\n";
 2966|       |
 2967|  2.49k|  return;
 2968|  2.49k|}
_ZN8Box_amveC2Ev:
 2992|  3.45k|{
 2993|  3.45k|  set_short_type(fourcc("amve"));
 2994|       |
 2995|       |  // These values are not valid.
 2996|  3.45k|  amve.ambient_illumination = 0;
 2997|  3.45k|  amve.ambient_light_x = 0;
 2998|  3.45k|  amve.ambient_light_y = 0;
 2999|  3.45k|}
_ZN8Box_amve5parseER14BitstreamRangePK20heif_security_limits:
 3002|    715|{
 3003|    715|  amve.ambient_illumination = range.read32();
 3004|    715|  amve.ambient_light_x = range.read16();
 3005|    715|  amve.ambient_light_y = range.read16();
 3006|       |
 3007|    715|  return range.get_error();
 3008|    715|}
_ZNK8Box_amve4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3012|    396|{
 3013|    396|  Box::dump(sstr, indent, full_log);
 3014|       |
 3015|    396|  sstr << indent << "ambient_illumination: " << amve.ambient_illumination << "\n";
 3016|    396|  sstr << indent << "ambient_light_x: " << amve.ambient_light_x << "\n";
 3017|    396|  sstr << indent << "ambient_light_y: " << amve.ambient_light_y << "\n";
 3018|       |
 3019|    396|  return;
 3020|    396|}
_ZN8Box_ndwt5parseER14BitstreamRangePK20heif_security_limits:
 3038|    500|{
 3039|    500|  parse_full_box_header(range);
 3040|       |
 3041|    500|  if (get_version() != 0) {
  ------------------
  |  Branch (3041:7): [True: 69, False: 431]
  ------------------
 3042|     69|    return unsupported_version_error("ndwt");
 3043|     69|  }
 3044|       |
 3045|    431|  m_diffuse_white_luminance = range.read32();
 3046|       |
 3047|    431|  return range.get_error();
 3048|    500|}
_ZNK8Box_ndwt4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3052|    427|{
 3053|    427|  Box::dump(sstr, indent, full_log);
 3054|       |
 3055|    427|  sstr << indent << "diffuse_white_luminance: " << m_diffuse_white_luminance << "\n";
 3056|       |
 3057|    427|  return;
 3058|    427|}
_ZN8Box_cclvC2Ev:
 3074|  7.01k|{
 3075|  7.01k|  set_short_type(fourcc("cclv"));
 3076|       |
 3077|  7.01k|  m_ccv_primaries_valid = false;
 3078|  7.01k|}
_ZN8Box_cclv13set_primariesEiiiiii:
 3082|  1.18k|{
 3083|  1.18k|  m_ccv_primaries_valid = true;
 3084|  1.18k|  m_ccv_primaries_x[0] = x0;
 3085|  1.18k|  m_ccv_primaries_y[0] = y0;
 3086|  1.18k|  m_ccv_primaries_x[1] = x1;
 3087|  1.18k|  m_ccv_primaries_y[1] = y1;
 3088|  1.18k|  m_ccv_primaries_x[2] = x2;
 3089|  1.18k|  m_ccv_primaries_y[2] = y2;
 3090|  1.18k|}
_ZN8Box_ispe5parseER14BitstreamRangePK20heif_security_limits:
 3273|  1.79k|{
 3274|  1.79k|  parse_full_box_header(range);
 3275|       |
 3276|  1.79k|  if (get_version() != 0) {
  ------------------
  |  Branch (3276:7): [True: 7, False: 1.78k]
  ------------------
 3277|      7|    return unsupported_version_error("ispe");
 3278|      7|  }
 3279|       |
 3280|  1.78k|  m_image_width = range.read32();
 3281|  1.78k|  m_image_height = range.read32();
 3282|       |
 3283|  1.78k|  return range.get_error();
 3284|  1.79k|}
_ZNK8Box_ispe4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3288|    954|{
 3289|    954|  Box::dump(sstr, indent, full_log);
 3290|       |
 3291|    954|  sstr << indent << "image width: " << m_image_width << "\n"
 3292|    954|       << indent << "image height: " << m_image_height << "\n";
 3293|       |
 3294|    954|  return;
 3295|    954|}
_ZN8Box_ipma5parseER14BitstreamRangePK20heif_security_limits:
 3324|  2.33k|{
 3325|  2.33k|  parse_full_box_header(range);
 3326|       |
 3327|       |  // TODO: is there any specification of allowed values for the ipma version in the HEIF standards?
 3328|       |
 3329|  2.33k|  if (get_version() > 1) {
  ------------------
  |  Branch (3329:7): [True: 7, False: 2.33k]
  ------------------
 3330|      7|    return unsupported_version_error("ipma");
 3331|      7|  }
 3332|       |
 3333|  2.33k|  uint32_t entry_cnt = range.read32();
 3334|       |
 3335|  2.33k|  if (limits->max_items && entry_cnt > limits->max_items) {
  ------------------
  |  Branch (3335:7): [True: 2.33k, False: 0]
  |  Branch (3335:28): [True: 45, False: 2.28k]
  ------------------
 3336|     45|    std::stringstream sstr;
 3337|     45|    sstr << "ipma box wants to define properties for " << entry_cnt
 3338|     45|         << " items, but the security limit has been set to " << limits->max_items << " items";
 3339|     45|    return {heif_error_Invalid_input,
 3340|     45|            heif_suberror_Security_limit_exceeded,
 3341|     45|            sstr.str()};
 3342|     45|  }
 3343|       |
 3344|  13.5k|  for (uint32_t i = 0; i < entry_cnt && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (3344:24): [True: 11.5k, False: 1.98k]
  |  Branch (3344:41): [True: 11.4k, False: 73]
  |  Branch (3344:59): [True: 11.2k, False: 225]
  ------------------
 3345|  11.2k|    Entry entry;
 3346|  11.2k|    if (get_version() < 1) {
  ------------------
  |  Branch (3346:9): [True: 7.28k, False: 3.93k]
  ------------------
 3347|  7.28k|      entry.item_ID = range.read16();
 3348|  7.28k|    }
 3349|  3.93k|    else {
 3350|  3.93k|      entry.item_ID = range.read32();
 3351|  3.93k|    }
 3352|       |
 3353|  11.2k|    int assoc_cnt = range.read8();
 3354|   456k|    for (int k = 0; k < assoc_cnt; k++) {
  ------------------
  |  Branch (3354:21): [True: 445k, False: 11.2k]
  ------------------
 3355|   445k|      PropertyAssociation association{};
 3356|       |
 3357|   445k|      uint16_t index;
 3358|   445k|      if (get_flags() & 1) {
  ------------------
  |  Branch (3358:11): [True: 714, False: 444k]
  ------------------
 3359|    714|        index = range.read16();
 3360|    714|        association.essential = !!(index & 0x8000);
 3361|    714|        association.property_index = (index & 0x7fff);
 3362|    714|      }
 3363|   444k|      else {
 3364|   444k|        index = range.read8();
 3365|   444k|        association.essential = !!(index & 0x80);
 3366|   444k|        association.property_index = (index & 0x7f);
 3367|   444k|      }
 3368|       |
 3369|   445k|      entry.associations.push_back(association);
 3370|   445k|    }
 3371|       |
 3372|  11.2k|    m_entries.push_back(entry);
 3373|  11.2k|  }
 3374|       |
 3375|  2.28k|  return range.get_error();
 3376|  2.33k|}
_ZNK8Box_ipma4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3477|  1.37k|{
 3478|  1.37k|  Box::dump(sstr, indent, full_log);
 3479|       |
 3480|  8.35k|  for (const Entry& entry : m_entries) {
  ------------------
  |  Branch (3480:27): [True: 8.35k, False: 1.37k]
  ------------------
 3481|  8.35k|    sstr << indent << "associations for item ID: " << entry.item_ID << "\n";
 3482|  8.35k|    indent++;
 3483|   419k|    for (const auto& assoc : entry.associations) {
  ------------------
  |  Branch (3483:28): [True: 419k, False: 8.35k]
  ------------------
 3484|   419k|      sstr << indent << "property index: " << assoc.property_index
 3485|   419k|           << " (essential: " << std::boolalpha << assoc.essential << ")\n";
 3486|   419k|    }
 3487|  8.35k|    indent--;
 3488|  8.35k|  }
 3489|       |
 3490|  1.37k|  return;
 3491|  1.37k|}
_ZN8Box_auxC5parseER14BitstreamRangePK20heif_security_limits:
 3586|  1.01k|{
 3587|  1.01k|  parse_full_box_header(range);
 3588|       |
 3589|  1.01k|  if (get_version() != 0) {
  ------------------
  |  Branch (3589:7): [True: 3, False: 1.00k]
  ------------------
 3590|      3|    return unsupported_version_error("auxC");
 3591|      3|  }
 3592|       |
 3593|  1.00k|  m_aux_type = range.read_string();
 3594|       |
 3595|  1.08M|  while (!range.eof()) {
  ------------------
  |  Branch (3595:10): [True: 1.08M, False: 1.00k]
  ------------------
 3596|  1.08M|    m_aux_subtypes.push_back(range.read8());
 3597|  1.08M|  }
 3598|       |
 3599|  1.00k|  return range.get_error();
 3600|  1.01k|}
_ZNK8Box_auxC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3620|    873|{
 3621|    873|  Box::dump(sstr, indent, full_log);
 3622|       |
 3623|    873|  sstr << indent << "aux type: " << m_aux_type << "\n"
 3624|    873|       << indent << "aux subtypes: ";
 3625|  1.08M|  for (uint8_t subtype : m_aux_subtypes) {
  ------------------
  |  Branch (3625:24): [True: 1.08M, False: 873]
  ------------------
 3626|  1.08M|    sstr << std::hex << std::setw(2) << std::setfill('0') << ((int) subtype) << " ";
 3627|  1.08M|  }
 3628|       |
 3629|    873|  sstr << "\n";
 3630|       |
 3631|    873|  return;
 3632|    873|}
_ZN8Box_irot5parseER14BitstreamRangePK20heif_security_limits:
 3636|  6.63k|{
 3637|       |  //parse_full_box_header(range);
 3638|       |
 3639|  6.63k|  uint16_t rotation = range.read8();
 3640|  6.63k|  rotation &= 0x03;
 3641|       |
 3642|  6.63k|  m_rotation = rotation * 90;
 3643|       |
 3644|  6.63k|  return range.get_error();
 3645|  6.63k|}
_ZNK8Box_irot4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3661|  3.03k|{
 3662|  3.03k|  Box::dump(sstr, indent, full_log);
 3663|       |
 3664|  3.03k|  sstr << indent << "rotation: " << m_rotation << " degrees (CCW)\n";
 3665|       |
 3666|  3.03k|  return;
 3667|  3.03k|}
_ZN8Box_imir5parseER14BitstreamRangePK20heif_security_limits:
 3671|  2.42k|{
 3672|       |  //parse_full_box_header(range);
 3673|       |
 3674|  2.42k|  uint8_t axis = range.read8();
 3675|  2.42k|  if (axis & 1) {
  ------------------
  |  Branch (3675:7): [True: 340, False: 2.08k]
  ------------------
 3676|    340|    m_axis = heif_transform_mirror_direction_horizontal;
 3677|    340|  }
 3678|  2.08k|  else {
 3679|  2.08k|    m_axis = heif_transform_mirror_direction_vertical;
 3680|  2.08k|  }
 3681|       |
 3682|  2.42k|  return range.get_error();
 3683|  2.42k|}
_ZNK8Box_imir4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3699|  1.10k|{
 3700|  1.10k|  Box::dump(sstr, indent, full_log);
 3701|       |
 3702|  1.10k|  sstr << indent << "mirror direction: ";
 3703|  1.10k|  switch (m_axis) {
  ------------------
  |  Branch (3703:11): [True: 1.10k, False: 0]
  ------------------
 3704|    867|    case heif_transform_mirror_direction_vertical:
  ------------------
  |  Branch (3704:5): [True: 867, False: 237]
  ------------------
 3705|    867|      sstr << "vertical\n";
 3706|    867|      break;
 3707|    237|    case heif_transform_mirror_direction_horizontal:
  ------------------
  |  Branch (3707:5): [True: 237, False: 867]
  ------------------
 3708|    237|      sstr << "horizontal\n";
 3709|    237|      break;
 3710|      0|    case heif_transform_mirror_direction_invalid:
  ------------------
  |  Branch (3710:5): [True: 0, False: 1.10k]
  ------------------
 3711|      0|      sstr << "invalid\n";
 3712|      0|      break;
 3713|  1.10k|  }
 3714|       |
 3715|  1.10k|  return;
 3716|  1.10k|}
_ZN8Box_iscl5parseER14BitstreamRangePK20heif_security_limits:
 3720|  1.07k|{
 3721|  1.07k|  parse_full_box_header(range);
 3722|       |
 3723|  1.07k|  if (get_version() != 0) {
  ------------------
  |  Branch (3723:7): [True: 90, False: 987]
  ------------------
 3724|     90|    return unsupported_version_error("iscl");
 3725|     90|  }
 3726|       |
 3727|    987|  m_target_width_numerator = range.read16();
 3728|    987|  m_target_width_denominator = range.read16();
 3729|    987|  m_target_height_numerator = range.read16();
 3730|    987|  m_target_height_denominator = range.read16();
 3731|       |
 3732|    987|  if (m_target_width_numerator == 0 || m_target_width_denominator == 0 ||
  ------------------
  |  Branch (3732:7): [True: 67, False: 920]
  |  Branch (3732:40): [True: 83, False: 837]
  ------------------
 3733|    837|      m_target_height_numerator == 0 || m_target_height_denominator == 0) {
  ------------------
  |  Branch (3733:7): [True: 332, False: 505]
  |  Branch (3733:41): [True: 71, False: 434]
  ------------------
 3734|    553|    return {heif_error_Invalid_input,
 3735|    553|            heif_suberror_Invalid_fractional_number,
 3736|    553|            "iscl property has zero numerator or denominator"};
 3737|    553|  }
 3738|       |
 3739|    434|  return range.get_error();
 3740|    987|}
_ZNK8Box_iscl4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3759|    418|{
 3760|    418|  FullBox::dump(sstr, indent, full_log);
 3761|       |
 3762|    418|  sstr << indent << "horizontal scaling factor: " << m_target_width_numerator << " / " << m_target_width_denominator << "\n";
 3763|    418|  sstr << indent << "vertical scaling factor:   " << m_target_height_numerator << " / " << m_target_height_denominator << "\n";
 3764|       |
 3765|    418|  return;
 3766|    418|}
_ZN8Box_clap5parseER14BitstreamRangePK20heif_security_limits:
 3770|  1.51k|{
 3771|       |  //parse_full_box_header(range);
 3772|       |
 3773|  1.51k|  uint32_t clean_aperture_width_num = range.read32();
 3774|  1.51k|  uint32_t clean_aperture_width_den = range.read32();
 3775|  1.51k|  uint32_t clean_aperture_height_num = range.read32();
 3776|  1.51k|  uint32_t clean_aperture_height_den = range.read32();
 3777|       |
 3778|       |  // Note: in the standard document 14496-12(2015), it says that the offset values should also be unsigned integers,
 3779|       |  // but this is obviously an error. Even the accompanying standard text says that offsets may be negative.
 3780|  1.51k|  int32_t horizontal_offset_num = (int32_t) range.read32();
 3781|  1.51k|  uint32_t horizontal_offset_den = (uint32_t) range.read32();
 3782|  1.51k|  int32_t vertical_offset_num = (int32_t) range.read32();
 3783|  1.51k|  uint32_t vertical_offset_den = (uint32_t) range.read32();
 3784|       |
 3785|       |  // The checked Fraction construction rejects values outside the int32_t range and
 3786|       |  // zero denominators.
 3787|  1.51k|  auto clean_aperture_width = Fraction::from_unsigned(clean_aperture_width_num, clean_aperture_width_den);
 3788|  1.51k|  auto clean_aperture_height = Fraction::from_unsigned(clean_aperture_height_num, clean_aperture_height_den);
 3789|  1.51k|  auto horizontal_offset = Fraction::from_signed(horizontal_offset_num, horizontal_offset_den);
 3790|  1.51k|  auto vertical_offset = Fraction::from_signed(vertical_offset_num, vertical_offset_den);
 3791|       |
 3792|  1.51k|  for (const Result<Fraction>* f : {&clean_aperture_width, &clean_aperture_height,
  ------------------
  |  Branch (3792:34): [True: 3.15k, False: 351]
  ------------------
 3793|  3.15k|                                    &horizontal_offset, &vertical_offset}) {
 3794|  3.15k|    if (!*f) {
  ------------------
  |  Branch (3794:9): [True: 1.16k, False: 1.99k]
  ------------------
 3795|  1.16k|      return f->error();
 3796|  1.16k|    }
 3797|  3.15k|  }
 3798|       |
 3799|    351|  m_clean_aperture_width = *clean_aperture_width;
 3800|    351|  m_clean_aperture_height = *clean_aperture_height;
 3801|    351|  m_horizontal_offset = *horizontal_offset;
 3802|    351|  m_vertical_offset = *vertical_offset;
 3803|       |
 3804|    351|  return range.get_error();
 3805|  1.51k|}
_ZNK8Box_clap4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 3828|    304|{
 3829|    304|  Box::dump(sstr, indent, full_log);
 3830|       |
 3831|    304|  sstr << indent << "clean_aperture: " << m_clean_aperture_width.numerator
 3832|    304|       << "/" << m_clean_aperture_width.denominator << " x "
 3833|    304|       << m_clean_aperture_height.numerator << "/"
 3834|    304|       << m_clean_aperture_height.denominator << "\n";
 3835|    304|  sstr << indent << "offset: " << m_horizontal_offset.numerator << "/"
 3836|    304|       << m_horizontal_offset.denominator << " ; "
 3837|    304|       << m_vertical_offset.numerator << "/"
 3838|    304|       << m_vertical_offset.denominator << "\n";
 3839|       |
 3840|    304|  return;
 3841|    304|}
_ZN8Box_iref5parseER14BitstreamRangePK20heif_security_limits:
 3940|  13.3k|{
 3941|  13.3k|  parse_full_box_header(range);
 3942|       |
 3943|  13.3k|  if (get_version() > 1) {
  ------------------
  |  Branch (3943:7): [True: 2, False: 13.3k]
  ------------------
 3944|      2|    return unsupported_version_error("iref");
 3945|      2|  }
 3946|       |
 3947|  33.6k|  while (!range.eof()) {
  ------------------
  |  Branch (3947:10): [True: 20.3k, False: 13.2k]
  ------------------
 3948|       |    // Cap the total number of reference entries, matching the item-count caps in
 3949|       |    // Box_iloc/Box_iinf/Box_ipma (and the per-entry nRefs cap below). Without it
 3950|       |    // the entry count is bounded only by the file size. That is a linear,
 3951|       |    // file-bounded allocation rather than an amplification, so this is a
 3952|       |    // consistency limit and not a security fix, but it rejects a pathological
 3953|       |    // 'iref' early with a clear error instead of parsing it in full.
 3954|       |    //
 3955|       |    // max_items is a heuristic ceiling here, not a semantically exact bound: the
 3956|       |    // number of entries is not strictly limited by the number of items, because
 3957|       |    // one item may be the source (from_item_ID) of several entries, one per
 3958|       |    // reference type (e.g. 'dimg', 'thmb', 'cdsc'). A well-formed file stays far
 3959|       |    // below max_items (default 1000) regardless, so the generous ceiling is fine
 3960|       |    // as a sanity limit; raise max_items if a legitimate file ever exceeds it.
 3961|  20.3k|    if (limits->max_items && m_references.size() >= limits->max_items) {
  ------------------
  |  Branch (3961:9): [True: 20.3k, False: 0]
  |  Branch (3961:30): [True: 1, False: 20.3k]
  ------------------
 3962|      1|      std::stringstream sstr;
 3963|      1|      sstr << "'iref' box contains more than " << limits->max_items
 3964|      1|           << " reference entries, which exceeds the security limit.";
 3965|       |
 3966|      1|      return {heif_error_Invalid_input,
 3967|      1|              heif_suberror_Security_limit_exceeded,
 3968|      1|              sstr.str()};
 3969|      1|    }
 3970|       |
 3971|  20.3k|    Reference ref;
 3972|       |
 3973|  20.3k|    Error err = ref.header.parse_header(range);
 3974|  20.3k|    if (err != Error::Ok) {
  ------------------
  |  Branch (3974:9): [True: 7, False: 20.3k]
  ------------------
 3975|      7|      return err;
 3976|      7|    }
 3977|       |
 3978|  20.3k|    int read_len = (get_version() == 0) ? 16 : 32;
  ------------------
  |  Branch (3978:20): [True: 20.0k, False: 275]
  ------------------
 3979|       |
 3980|  20.3k|    ref.from_item_ID = static_cast<uint32_t>(range.read_uint(read_len));
 3981|  20.3k|    uint16_t nRefs = range.read16();
 3982|       |
 3983|  20.3k|    if (nRefs==0) {
  ------------------
  |  Branch (3983:9): [True: 6, False: 20.3k]
  ------------------
 3984|      6|      return {heif_error_Invalid_input,
 3985|      6|              heif_suberror_Unspecified,
 3986|      6|              "Input file has an 'iref' box with no references."};
 3987|      6|    }
 3988|       |
 3989|  20.3k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (3989:9): [True: 20.3k, False: 0]
  |  Branch (3989:30): [True: 8, False: 20.3k]
  ------------------
 3990|      8|      std::stringstream sstr;
 3991|      8|      sstr << "Number of references in iref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 3992|       |
 3993|      8|      return {heif_error_Invalid_input,
 3994|      8|              heif_suberror_Security_limit_exceeded,
 3995|      8|              sstr.str()};
 3996|      8|    }
 3997|       |
 3998|   101k|    for (int i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (3998:21): [True: 80.9k, False: 20.3k]
  ------------------
 3999|  80.9k|      if (range.eof()) {
  ------------------
  |  Branch (3999:11): [True: 26, False: 80.8k]
  ------------------
 4000|     26|        std::stringstream sstr;
 4001|     26|        sstr << "iref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 4002|       |
 4003|     26|        return {heif_error_Invalid_input,
 4004|     26|                heif_suberror_End_of_data,
 4005|     26|                sstr.str()};
 4006|     26|      }
 4007|       |
 4008|  80.8k|      ref.to_item_ID.push_back(static_cast<uint32_t>(range.read_uint(read_len)));
 4009|  80.8k|    }
 4010|       |
 4011|  20.3k|    m_references.push_back(ref);
 4012|  20.3k|  }
 4013|       |
 4014|       |
 4015|       |  // Note: the same item may be listed several times within one reference entry.
 4016|       |  // ISO/IEC 14496-12 does not forbid it, and derived images rely on it: an 'iovl'
 4017|       |  // that places the same input image at two positions references it twice in its
 4018|       |  // 'dimg' entry (one offset per reference). Conformance file C021 does this.
 4019|       |
 4020|       |
 4021|       |#if 0
 4022|       |  // Note: This input sanity check first did not work as expected.
 4023|       |  // Its idea was to prevent infinite recursions while decoding when the input file
 4024|       |  // contains cyclic references. However, apparently there are cases where cyclic
 4025|       |  // references are actually allowed, like with images that have premultiplied alpha channels:
 4026|       |  // | Box: iref -----
 4027|       |  // | size: 40   (header size: 12)
 4028|       |  // | reference with type 'auxl' from ID: 2 to IDs: 1
 4029|       |  // | reference with type 'prem' from ID: 1 to IDs: 2
 4030|       |  //
 4031|       |  // We now test for cyclic references during the image decoding.
 4032|       |  // We pass down the item IDs that have already been seen during the decoding process.
 4033|       |  // If we try to decode an image IDs that has already been seen previously, we throw an error.
 4034|       |  // The advantage is that the error only occurs when we are trying to decode the faulty image.
 4035|       |
 4036|       |  // --- check for cyclic references
 4037|       |
 4038|       |  for (const auto& ref : m_references) {
 4039|       |    if (ref.header.get_short_type() != fourcc("dimg") &&
 4040|       |        ref.header.get_short_type() != fourcc("auxl")) {
 4041|       |      continue;
 4042|       |    }
 4043|       |
 4044|       |    std::set<heif_item_id> reached_ids; // IDs that we have already reached in the DAG
 4045|       |    std::set<heif_item_id> todo;    // IDs that still need to be followed
 4046|       |
 4047|       |    bool reverse = (ref.header.get_short_type() != fourcc("auxl"));
 4048|       |
 4049|       |    if (!reverse) {
 4050|       |      todo.insert(ref.from_item_ID);  // start at base item
 4051|       |    }
 4052|       |    else {
 4053|       |      if (ref.to_item_ID.empty()) {
 4054|       |        continue;
 4055|       |      }
 4056|       |
 4057|       |      // TODO: what if aux image is assigned to multiple images?
 4058|       |      todo.insert(ref.to_item_ID[0]);  // start at base item
 4059|       |    }
 4060|       |
 4061|       |    while (!todo.empty()) {
 4062|       |      // transfer ID into set of reached IDs
 4063|       |      auto id = *todo.begin();
 4064|       |      todo.erase(id);
 4065|       |      reached_ids.insert(id);
 4066|       |
 4067|       |      // if this ID refers to another 'iref', follow it
 4068|       |
 4069|       |      for (const auto& succ_ref : m_references) {
 4070|       |        if (succ_ref.header.get_short_type() != fourcc("dimg") &&
 4071|       |            succ_ref.header.get_short_type() != fourcc("auxl")) {
 4072|       |          continue;
 4073|       |        }
 4074|       |
 4075|       |        heif_item_id from;
 4076|       |        std::vector<heif_item_id> to;
 4077|       |
 4078|       |        if (succ_ref.header.get_short_type() == fourcc("auxl")) {
 4079|       |          if (succ_ref.to_item_ID.empty()) {
 4080|       |            continue;
 4081|       |          }
 4082|       |
 4083|       |          from = succ_ref.to_item_ID[0];
 4084|       |          to = {succ_ref.from_item_ID};
 4085|       |        }
 4086|       |        else {
 4087|       |          from = succ_ref.from_item_ID;
 4088|       |          to = succ_ref.to_item_ID;
 4089|       |        }
 4090|       |
 4091|       |        if (from == id) {
 4092|       |
 4093|       |          // Check whether any successor IDs has been visited yet, which would be an error.
 4094|       |          // Otherwise, put that ID into the 'todo' set.
 4095|       |
 4096|       |          for (const auto& succ_ref_id : to) {
 4097|       |            if (reached_ids.find(succ_ref_id) != reached_ids.end()) {
 4098|       |              return Error(heif_error_Invalid_input,
 4099|       |                           heif_suberror_Unspecified,
 4100|       |                           "'iref' has cyclic references");
 4101|       |            }
 4102|       |
 4103|       |            todo.insert(succ_ref_id);
 4104|       |          }
 4105|       |        }
 4106|       |      }
 4107|       |    }
 4108|       |  }
 4109|       |#endif
 4110|       |
 4111|  13.2k|  build_index();
 4112|       |
 4113|  13.2k|  return range.get_error();
 4114|  13.3k|}
_ZNK8Box_iref4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4167|  6.55k|{
 4168|  6.55k|  Box::dump(sstr, indent, full_log);
 4169|       |
 4170|  12.3k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (4170:24): [True: 12.3k, False: 6.55k]
  ------------------
 4171|  12.3k|    sstr << indent << "reference with type '" << ref.header.get_type_string() << "'"
 4172|  12.3k|         << " from ID: " << ref.from_item_ID
 4173|  12.3k|         << " to IDs: ";
 4174|  36.7k|    for (uint32_t id : ref.to_item_ID) {
  ------------------
  |  Branch (4174:22): [True: 36.7k, False: 12.3k]
  ------------------
 4175|  36.7k|      sstr << id << " ";
 4176|  36.7k|    }
 4177|  12.3k|    sstr << "\n";
 4178|  12.3k|  }
 4179|       |
 4180|  6.55k|  return;
 4181|  6.55k|}
_ZN8Box_iref11build_indexEv:
 4185|  13.2k|{
 4186|  13.2k|  m_from_id_index.clear();
 4187|  13.2k|  m_from_id_index.reserve(m_references.size());
 4188|  32.3k|  for (size_t i = 0; i < m_references.size(); i++) {
  ------------------
  |  Branch (4188:22): [True: 19.0k, False: 13.2k]
  ------------------
 4189|  19.0k|    add_to_index(i);
 4190|  19.0k|  }
 4191|  13.2k|}
_ZN8Box_iref12add_to_indexEm:
 4195|  19.0k|{
 4196|  19.0k|  m_from_id_index[m_references[reference_index].from_item_ID].push_back(reference_index);
 4197|  19.0k|}
_ZN8Box_rref5parseER14BitstreamRangePK20heif_security_limits:
 4268|    860|{
 4269|    860|  parse_full_box_header(range);
 4270|       |
 4271|    860|  if (get_version() > 1) {
  ------------------
  |  Branch (4271:7): [True: 7, False: 853]
  ------------------
 4272|      7|    return unsupported_version_error("rref");
 4273|      7|  }
 4274|       |
 4275|    853|  size_t remainingBytes = range.get_remaining_bytes();
 4276|       |
 4277|       |  // The number of reference types should be stored in uint(8), but the
 4278|       |  // common test images C043, C044 store them as uint(32).
 4279|       |  // Let us detect this case by the number of data bytes in this box.
 4280|    853|  bool cnt_as_uint32 = (remainingBytes > 0 && remainingBytes % 4 == 0);
  ------------------
  |  Branch (4280:25): [True: 848, False: 5]
  |  Branch (4280:47): [True: 481, False: 367]
  ------------------
 4281|       |
 4282|    853|  uint8_t nRefTypes;
 4283|    853|  if (cnt_as_uint32) {
  ------------------
  |  Branch (4283:7): [True: 481, False: 372]
  ------------------
 4284|       |    // fix broken C043, C044 files
 4285|       |    // TODO: remove me when the files have been corrected as the above check can misfire when there is extra padding
 4286|    481|    nRefTypes = (uint8_t)range.read32();
 4287|    481|  }
 4288|    372|  else {
 4289|    372|    nRefTypes = range.read8();
 4290|    372|  }
 4291|       |
 4292|  4.98k|  for (uint8_t i = 0; i < nRefTypes; i++) {
  ------------------
  |  Branch (4292:23): [True: 4.16k, False: 818]
  ------------------
 4293|  4.16k|    uint32_t refType = range.read32();
 4294|       |
 4295|  4.16k|    if (range.error()) {
  ------------------
  |  Branch (4295:9): [True: 35, False: 4.12k]
  ------------------
 4296|     35|      std::stringstream sstr;
 4297|     35|      sstr << "rref box should contain " << ((int)nRefTypes) << " reference types, but we can only read " << m_reference_types.size() << " reference types.";
 4298|       |
 4299|     35|      return {
 4300|     35|        heif_error_Invalid_input,
 4301|     35|        heif_suberror_End_of_data,
 4302|     35|        sstr.str()
 4303|     35|      };
 4304|     35|    }
 4305|       |
 4306|  4.12k|    m_reference_types.push_back(refType);
 4307|  4.12k|  }
 4308|       |
 4309|    818|  return range.get_error();
 4310|    853|}
_ZNK8Box_rref4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4395|    812|{
 4396|    812|  Box::dump(sstr, indent, full_log);
 4397|       |
 4398|    812|  sstr << indent << "reference types: ";
 4399|  4.06k|  for (size_t i = 0; i < m_reference_types.size(); i++) {
  ------------------
  |  Branch (4399:22): [True: 3.24k, False: 812]
  ------------------
 4400|  3.24k|    if (i > 0) sstr << ", ";
  ------------------
  |  Branch (4400:9): [True: 2.54k, False: 707]
  ------------------
 4401|  3.24k|    sstr << fourcc_to_string(m_reference_types[i]);
 4402|  3.24k|  }
 4403|    812|  sstr << "\n";
 4404|       |
 4405|    812|  return;
 4406|    812|}
_ZN8Box_idat5parseER14BitstreamRangePK20heif_security_limits:
 4410|  4.41k|{
 4411|       |  //parse_full_box_header(range);
 4412|       |
 4413|  4.41k|  m_data_start_pos = range.get_istream()->get_position();
 4414|       |
 4415|  4.41k|  return range.get_error();
 4416|  4.41k|}
_ZNK8Box_idat4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4432|  2.55k|{
 4433|  2.55k|  Box::dump(sstr, indent, full_log);
 4434|       |
 4435|  2.55k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (4435:7): [True: 2.13k, False: 420]
  ------------------
 4436|  2.13k|    sstr << indent << "number of data bytes: " << get_box_size() - get_header_size() << "\n";
 4437|  2.13k|  } else {
 4438|    420|     sstr << indent << "number of data bytes is invalid\n";
 4439|    420|  }
 4440|       |
 4441|  2.55k|  return;
 4442|  2.55k|}
_ZN8Box_grpl5parseER14BitstreamRangePK20heif_security_limits:
 4505|  1.08k|{
 4506|       |  //parse_full_box_header(range);
 4507|       |
 4508|  1.08k|  return read_children(range, READ_CHILDREN_ALL, limits); // should we pass the parsing context 'grpl' or are the box types unique?
 4509|  1.08k|}
_ZNK8Box_grpl4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4513|    789|{
 4514|    789|  Box::dump(sstr, indent, full_log);
 4515|    789|  dump_children(sstr, indent, full_log);
 4516|    789|  return;
 4517|    789|}
_ZN17Box_EntityToGroup5parseER14BitstreamRangePK20heif_security_limits:
 4521|  1.62k|{
 4522|  1.62k|  Error err = parse_full_box_header(range);
 4523|  1.62k|  if (err != Error::Ok) {
  ------------------
  |  Branch (4523:7): [True: 332, False: 1.28k]
  ------------------
 4524|    332|    return err;
 4525|    332|  }
 4526|       |
 4527|  1.28k|  group_id = range.read32();
 4528|  1.28k|  uint32_t nEntities = range.read32();
 4529|       |
 4530|  1.28k|  if (nEntities > range.get_remaining_bytes() / 4) {
  ------------------
  |  Branch (4530:7): [True: 87, False: 1.20k]
  ------------------
 4531|     87|    std::stringstream sstr;
 4532|     87|    size_t maxEntries = range.get_remaining_bytes() / 4;
 4533|     87|    sstr << "entity group box should contain " << nEntities << " entities, but we can only read " << maxEntries << " entities.";
 4534|       |
 4535|     87|    return {heif_error_Invalid_input,
 4536|     87|            heif_suberror_End_of_data,
 4537|     87|            sstr.str()};
 4538|     87|  }
 4539|       |
 4540|  1.20k|  if (limits->max_size_entity_group && nEntities > limits->max_size_entity_group) {
  ------------------
  |  Branch (4540:7): [True: 1.20k, False: 0]
  |  Branch (4540:40): [True: 51, False: 1.15k]
  ------------------
 4541|     51|    std::stringstream sstr;
 4542|     51|    sstr << "entity group box contains " << nEntities << " entities, but the security limit is set to " << limits->max_size_entity_group << " entities.";
 4543|       |
 4544|     51|    return {heif_error_Invalid_input,
 4545|     51|            heif_suberror_Security_limit_exceeded,
 4546|     51|            sstr.str()};
 4547|     51|  }
 4548|       |
 4549|  1.15k|  entity_ids.resize(nEntities);
 4550|  3.41k|  for (uint32_t i = 0; i < nEntities; i++) {
  ------------------
  |  Branch (4550:24): [True: 2.26k, False: 1.15k]
  ------------------
 4551|  2.26k|    entity_ids[i] = range.read32();
 4552|  2.26k|  }
 4553|       |
 4554|  1.15k|  return Error::Ok;
 4555|  1.20k|}
_ZNK17Box_EntityToGroup4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4584|    810|{
 4585|    810|  Box::dump(sstr, indent, full_log);
 4586|       |
 4587|    810|  sstr << indent << "group id: " << group_id << "\n"
 4588|    810|       << indent << "entity IDs: ";
 4589|       |
 4590|    810|  bool first = true;
 4591|  1.47k|  for (uint32_t id : entity_ids) {
  ------------------
  |  Branch (4591:20): [True: 1.47k, False: 810]
  ------------------
 4592|  1.47k|    if (first) {
  ------------------
  |  Branch (4592:9): [True: 494, False: 980]
  ------------------
 4593|    494|      first = false;
 4594|    494|    }
 4595|    980|    else {
 4596|    980|      sstr << ' ';
 4597|    980|    }
 4598|       |
 4599|  1.47k|    sstr << id;
 4600|  1.47k|  }
 4601|       |
 4602|    810|  sstr << "\n";
 4603|       |
 4604|    810|  return;
 4605|    810|}
_ZN8Box_ster5parseER14BitstreamRangePK20heif_security_limits:
 4609|    333|{
 4610|    333|  Error err = Box_EntityToGroup::parse(range, limits);
 4611|    333|  if (err) {
  ------------------
  |  Branch (4611:7): [True: 11, False: 322]
  ------------------
 4612|     11|    return err;
 4613|     11|  }
 4614|       |
 4615|    322|  if (entity_ids.size() != 2) {
  ------------------
  |  Branch (4615:7): [True: 2, False: 320]
  ------------------
 4616|      2|    return {heif_error_Invalid_input,
 4617|      2|            heif_suberror_Invalid_box_size,
 4618|      2|            "'ster' entity group does not exists of exactly two images"};
 4619|      2|  }
 4620|       |
 4621|    320|  return Error::Ok;
 4622|    322|}
_ZNK8Box_ster4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4626|    309|{
 4627|    309|  Box::dump(sstr, indent, full_log);
 4628|       |
 4629|    309|  sstr << indent << "group id: " << group_id << "\n"
 4630|    309|       << indent << "left image ID: " << entity_ids[0] << "\n"
 4631|    309|       << indent << "right image ID: " << entity_ids[1] << "\n";
 4632|       |
 4633|    309|  return;
 4634|    309|}
_ZN8Box_pymd5parseER14BitstreamRangePK20heif_security_limits:
 4639|  1.13k|{
 4640|  1.13k|  Error err = Box_EntityToGroup::parse(range, limits);
 4641|  1.13k|  if (err) {
  ------------------
  |  Branch (4641:7): [True: 447, False: 686]
  ------------------
 4642|    447|    return err;
 4643|    447|  }
 4644|       |
 4645|    686|  tile_size_x = range.read16();
 4646|    686|  tile_size_y = range.read16();
 4647|       |
 4648|  2.14k|  for (size_t i = 0; i < entity_ids.size(); i++) {
  ------------------
  |  Branch (4648:22): [True: 1.46k, False: 686]
  ------------------
 4649|  1.46k|    LayerInfo layer{};
 4650|  1.46k|    layer.layer_binning = range.read16();
 4651|  1.46k|    layer.tiles_in_layer_row_minus1 = range.read16();
 4652|  1.46k|    layer.tiles_in_layer_column_minus1 = range.read16();
 4653|       |
 4654|  1.46k|    m_layer_infos.push_back(layer);
 4655|  1.46k|  }
 4656|       |
 4657|    686|  return Error::Ok;
 4658|  1.13k|}
_ZNK8Box_pymd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4685|    676|{
 4686|    676|  Box_EntityToGroup::dump(sstr, indent, full_log);
 4687|       |
 4688|    676|  sstr << indent << "tile size: " << tile_size_x << "x" << tile_size_y << "\n";
 4689|       |
 4690|    676|  int layerNr = 0;
 4691|  1.31k|  for (const auto& layer : m_layer_infos) {
  ------------------
  |  Branch (4691:26): [True: 1.31k, False: 676]
  ------------------
 4692|  1.31k|    sstr << indent << "layer " << layerNr << ":\n"
 4693|  1.31k|         << indent << "| binning: " << layer.layer_binning << "\n"
 4694|  1.31k|         << indent << "| tiles: " << (layer.tiles_in_layer_row_minus1 + 1) << "x" << (layer.tiles_in_layer_column_minus1 + 1) << "\n";
 4695|       |
 4696|  1.31k|    layerNr++;
 4697|  1.31k|  }
 4698|       |
 4699|    676|  return;
 4700|    676|}
_ZN8Box_dinf5parseER14BitstreamRangePK20heif_security_limits:
 4704|  4.06k|{
 4705|       |  //parse_full_box_header(range);
 4706|       |
 4707|  4.06k|  return read_children(range, READ_CHILDREN_ALL, limits);
 4708|  4.06k|}
_ZNK8Box_dinf4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4712|  2.55k|{
 4713|  2.55k|  Box::dump(sstr, indent, full_log);
 4714|  2.55k|  dump_children(sstr, indent, full_log);
 4715|       |
 4716|  2.55k|  return;
 4717|  2.55k|}
_ZN8Box_dref5parseER14BitstreamRangePK20heif_security_limits:
 4721|    378|{
 4722|    378|  parse_full_box_header(range);
 4723|       |
 4724|    378|  if (get_version() != 0) {
  ------------------
  |  Branch (4724:7): [True: 2, False: 376]
  ------------------
 4725|      2|    return unsupported_version_error("dref");
 4726|      2|  }
 4727|       |
 4728|    376|  uint32_t nEntities = range.read32();
 4729|       |
 4730|       |  /*
 4731|       |  for (int i=0;i<nEntities;i++) {
 4732|       |    if (range.eof()) {
 4733|       |      break;
 4734|       |    }
 4735|       |  }
 4736|       |  */
 4737|       |
 4738|    376|  if (nEntities > (uint32_t)std::numeric_limits<int>::max()) {
  ------------------
  |  Branch (4738:7): [True: 14, False: 362]
  ------------------
 4739|     14|    return Error(heif_error_Memory_allocation_error,
 4740|     14|                 heif_suberror_Security_limit_exceeded,
 4741|     14|                 "Too many entities in dref box.");
 4742|     14|  }
 4743|       |
 4744|       |  // read_children verifies that exactly nEntities children are present.
 4745|    362|  return read_children(range, (int)nEntities, limits);
 4746|    376|}
_ZNK8Box_dref4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4770|    229|{
 4771|    229|  Box::dump(sstr, indent, full_log);
 4772|    229|  dump_children(sstr, indent, full_log);
 4773|       |
 4774|    229|  return;
 4775|    229|}
_ZN7Box_url5parseER14BitstreamRangePK20heif_security_limits:
 4779|    666|{
 4780|    666|  parse_full_box_header(range);
 4781|       |
 4782|    666|  if (get_version() > 0) {
  ------------------
  |  Branch (4782:7): [True: 9, False: 657]
  ------------------
 4783|      9|    return unsupported_version_error("url");
 4784|      9|  }
 4785|       |
 4786|    657|  if (get_flags() & 1) {
  ------------------
  |  Branch (4786:7): [True: 345, False: 312]
  ------------------
 4787|       |    // data in same file
 4788|    345|    m_location.clear();
 4789|    345|  }
 4790|    312|  else {
 4791|    312|    m_location = range.read_string();
 4792|    312|  }
 4793|       |
 4794|    657|  return range.get_error();
 4795|    666|}
_ZNK7Box_url4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4816|    433|{
 4817|    433|  Box::dump(sstr, indent, full_log);
 4818|       |  //dump_children(sstr, indent, full_log);
 4819|       |
 4820|    433|  sstr << indent << "location: " << m_location << "\n";
 4821|       |
 4822|    433|  return;
 4823|    433|}
_ZN8Box_udes5parseER14BitstreamRangePK20heif_security_limits:
 4827|  1.52k|{
 4828|  1.52k|  parse_full_box_header(range);
 4829|       |
 4830|  1.52k|  if (get_version() > 0) {
  ------------------
  |  Branch (4830:7): [True: 128, False: 1.40k]
  ------------------
 4831|    128|    return unsupported_version_error("udes");
 4832|    128|  }
 4833|       |
 4834|  1.40k|  m_lang = range.read_string();
 4835|  1.40k|  m_name = range.read_string();
 4836|  1.40k|  m_description = range.read_string();
 4837|  1.40k|  m_tags = range.read_string();
 4838|  1.40k|  return range.get_error();
 4839|  1.52k|}
_ZNK8Box_udes4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4842|  1.24k|{
 4843|  1.24k|  Box::dump(sstr, indent, full_log);
 4844|  1.24k|  sstr << indent << "lang: " << m_lang << "\n";
 4845|  1.24k|  sstr << indent << "name: " << m_name << "\n";
 4846|  1.24k|  sstr << indent << "description: " << m_description << "\n";
 4847|  1.24k|  sstr << indent << "tags: " << m_tags << "\n";
 4848|  1.24k|  return;
 4849|  1.24k|}
_ZNK8Box_cmin4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 4897|  1.29k|{
 4898|  1.29k|  Box::dump(sstr, indent, full_log);
 4899|  1.29k|  sstr << indent << "principal-point: " << m_matrix.principal_point_x << ", " << m_matrix.principal_point_y << "\n";
 4900|  1.29k|  if (m_matrix.is_anisotropic) {
  ------------------
  |  Branch (4900:7): [True: 525, False: 766]
  ------------------
 4901|    525|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << ", " << m_matrix.focal_length_y << "\n";
 4902|    525|    sstr << indent << "skew: " << m_matrix.skew << "\n";
 4903|    525|  }
 4904|    766|  else {
 4905|    766|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << "\n";
 4906|    766|    sstr << indent << "no skew\n";
 4907|    766|  }
 4908|       |
 4909|  1.29k|  return;
 4910|  1.29k|}
_ZN8Box_cmin5parseER14BitstreamRangePK20heif_security_limits:
 4914|  3.43k|{
 4915|  3.43k|  parse_full_box_header(range);
 4916|       |
 4917|  3.43k|  if (get_version() > 0) {
  ------------------
  |  Branch (4917:7): [True: 108, False: 3.32k]
  ------------------
 4918|    108|    return unsupported_version_error("cmin");
 4919|    108|  }
 4920|       |
 4921|  3.32k|  m_denominatorShift = (get_flags() & 0x1F00) >> 8;
 4922|  3.32k|  uint32_t denominator = (1U << m_denominatorShift);
 4923|       |
 4924|  3.32k|  m_matrix.focal_length_x = range.read32s() / (double)denominator;
 4925|  3.32k|  m_matrix.principal_point_x = range.read32s() / (double)denominator;
 4926|  3.32k|  m_matrix.principal_point_y = range.read32s() / (double)denominator;
 4927|       |
 4928|  3.32k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4928:7): [True: 727, False: 2.60k]
  ------------------
 4929|    727|    m_skewDenominatorShift = ((get_flags()) & 0x1F0000) >> 16;
 4930|    727|    uint32_t skewDenominator = (1U << m_skewDenominatorShift);
 4931|       |
 4932|    727|    m_matrix.focal_length_y = range.read32s() / (double)denominator;
 4933|    727|    m_matrix.skew = range.read32s() / (double)skewDenominator;
 4934|       |
 4935|    727|    m_matrix.is_anisotropic = true;
 4936|    727|  }
 4937|  2.60k|  else {
 4938|  2.60k|    m_matrix.is_anisotropic = false;
 4939|  2.60k|    m_matrix.focal_length_y = 0;
 4940|  2.60k|    m_matrix.skew = 0;
 4941|  2.60k|  }
 4942|  3.32k|  return range.get_error();
 4943|  3.43k|}
_ZN8Box_cmex5parseER14BitstreamRangePK20heif_security_limits:
 5101|  5.14k|{
 5102|  5.14k|  parse_full_box_header(range);
 5103|       |
 5104|  5.14k|  if (get_version() > 0) {
  ------------------
  |  Branch (5104:7): [True: 1.08k, False: 4.05k]
  ------------------
 5105|  1.08k|    return unsupported_version_error("cmex");
 5106|  1.08k|  }
 5107|       |
 5108|  4.05k|  m_matrix = ExtrinsicMatrix{};
 5109|       |
 5110|  4.05k|  if (get_flags() & pos_x_present) {
  ------------------
  |  Branch (5110:7): [True: 2.87k, False: 1.18k]
  ------------------
 5111|  2.87k|    m_has_pos_x = true;
 5112|  2.87k|    m_matrix.pos_x = range.read32s();
 5113|  2.87k|  }
 5114|       |
 5115|  4.05k|  if (get_flags() & pos_y_present) {
  ------------------
  |  Branch (5115:7): [True: 2.97k, False: 1.08k]
  ------------------
 5116|  2.97k|    m_has_pos_y = true;
 5117|  2.97k|    m_matrix.pos_y = range.read32s();
 5118|  2.97k|  }
 5119|       |
 5120|  4.05k|  if (get_flags() & pos_z_present) {
  ------------------
  |  Branch (5120:7): [True: 1.06k, False: 2.98k]
  ------------------
 5121|  1.06k|    m_has_pos_z = true;
 5122|  1.06k|    m_matrix.pos_z = range.read32s();
 5123|  1.06k|  }
 5124|       |
 5125|  4.05k|  if (get_flags() & orientation_present) {
  ------------------
  |  Branch (5125:7): [True: 1.38k, False: 2.67k]
  ------------------
 5126|  1.38k|    m_has_orientation = true;
 5127|       |
 5128|  1.38k|    if (get_version() == 0) {
  ------------------
  |  Branch (5128:9): [True: 1.38k, False: 0]
  ------------------
 5129|  1.38k|      bool use32bit = (get_flags() & rot_large_field_size);
 5130|  1.38k|      int32_t quat_x = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (5130:24): [True: 813, False: 569]
  ------------------
 5131|  1.38k|      int32_t quat_y = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (5131:24): [True: 813, False: 569]
  ------------------
 5132|  1.38k|      int32_t quat_z = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (5132:24): [True: 813, False: 569]
  ------------------
 5133|       |
 5134|  1.38k|      uint32_t div = 1U << (14 + (use32bit ? 16 : 0));
  ------------------
  |  Branch (5134:35): [True: 813, False: 569]
  ------------------
 5135|       |
 5136|  1.38k|      m_matrix.rotation_as_quaternions = true;
 5137|  1.38k|      m_matrix.quaternion_x = quat_x / (double)div;
 5138|  1.38k|      m_matrix.quaternion_y = quat_y / (double)div;
 5139|  1.38k|      m_matrix.quaternion_z = quat_z / (double)div;
 5140|       |
 5141|  1.38k|      double q_sum = (m_matrix.quaternion_x * m_matrix.quaternion_x +
 5142|  1.38k|                      m_matrix.quaternion_y * m_matrix.quaternion_y +
 5143|  1.38k|                      m_matrix.quaternion_z * m_matrix.quaternion_z);
 5144|       |
 5145|  1.38k|      if (q_sum > 1.0) {
  ------------------
  |  Branch (5145:11): [True: 313, False: 1.06k]
  ------------------
 5146|    313|        return Error(heif_error_Invalid_input,
 5147|    313|                     heif_suberror_Unspecified,
 5148|    313|                     "Invalid quaternion in extrinsic rotation matrix");
 5149|    313|      }
 5150|       |
 5151|  1.06k|      m_matrix.quaternion_w = sqrt(1 - q_sum);
 5152|       |
 5153|  1.06k|    } else if (get_version() == 1) {
  ------------------
  |  Branch (5153:16): [True: 0, False: 0]
  ------------------
 5154|      0|      uint32_t div = 1<<16;
 5155|      0|      m_matrix.rotation_yaw = range.read32s() / (double)div;
 5156|      0|      m_matrix.rotation_pitch = range.read32s() / (double)div;
 5157|      0|      m_matrix.rotation_roll = range.read32s() / (double)div;
 5158|      0|    }
 5159|  1.38k|  }
 5160|       |
 5161|  3.74k|  if (get_flags() & id_present) {
  ------------------
  |  Branch (5161:7): [True: 2.86k, False: 872]
  ------------------
 5162|  2.86k|    m_has_world_coordinate_system_id = true;
 5163|  2.86k|    m_matrix.world_coordinate_system_id = range.read32();
 5164|  2.86k|  }
 5165|       |
 5166|  3.74k|  return range.get_error();
 5167|  4.05k|}
_ZNK8Box_cmex4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 5171|  1.15k|{
 5172|  1.15k|  Box::dump(sstr, indent, full_log);
 5173|  1.15k|  sstr << indent << "camera position (um): ";
 5174|  1.15k|  sstr << m_matrix.pos_x << " ; ";
 5175|  1.15k|  sstr << m_matrix.pos_y << " ; ";
 5176|  1.15k|  sstr << m_matrix.pos_z << "\n";
 5177|       |
 5178|  1.15k|  sstr << indent << "orientation ";
 5179|  1.15k|  if (m_matrix.rotation_as_quaternions) {
  ------------------
  |  Branch (5179:7): [True: 1.15k, False: 0]
  ------------------
 5180|  1.15k|    sstr << "(quaterion)\n";
 5181|  1.15k|    sstr << indent << "  q = ["
 5182|  1.15k|         << m_matrix.quaternion_x << ";"
 5183|  1.15k|         << m_matrix.quaternion_y << ";"
 5184|  1.15k|         << m_matrix.quaternion_z << ";"
 5185|  1.15k|         << m_matrix.quaternion_w << "]\n";
 5186|  1.15k|  }
 5187|      0|  else {
 5188|      0|    sstr << "(angles)\n";
 5189|      0|    sstr << indent << "  yaw:   " << m_matrix.rotation_yaw << "\n";
 5190|      0|    sstr << indent << "  pitch: " << m_matrix.rotation_pitch << "\n";
 5191|      0|    sstr << indent << "  roll:  " << m_matrix.rotation_roll << "\n";
 5192|      0|  }
 5193|       |
 5194|  1.15k|  sstr << indent << "world coordinate system id: " << m_matrix.world_coordinate_system_id << "\n";
 5195|       |
 5196|  1.15k|  return;
 5197|  1.15k|}
_ZN8Box_taic4dumpERK19heif_tai_clock_infoR6Indent:
 5337|  1.50k|{
 5338|  1.50k|  std::ostringstream sstr;
 5339|  1.50k|  sstr << indent << "time_uncertainty: ";
 5340|  1.50k|  if (info.time_uncertainty == heif_tai_clock_info_time_uncertainty_unknown) {
  ------------------
  |  |   52|  1.50k|#define heif_tai_clock_info_time_uncertainty_unknown UINT64_C(0xFFFFFFFFFFFFFFFF)
  ------------------
  |  Branch (5340:7): [True: 643, False: 862]
  ------------------
 5341|    643|    sstr << "unknown\n";
 5342|    643|  }
 5343|    862|  else {
 5344|    862|    sstr << info.time_uncertainty << "\n";
 5345|    862|  }
 5346|  1.50k|  sstr << indent << "clock_resolution: " << info.clock_resolution << "\n";
 5347|  1.50k|  sstr << indent << "clock_drift_rate: ";
 5348|  1.50k|  if (info.clock_drift_rate == heif_tai_clock_info_clock_drift_rate_unknown) {
  ------------------
  |  |   53|  1.50k|#define heif_tai_clock_info_clock_drift_rate_unknown INT32_C(0x7FFFFFFF)
  ------------------
  |  Branch (5348:7): [True: 557, False: 948]
  ------------------
 5349|    557|    sstr << "undefined\n";
 5350|    557|  }
 5351|    948|  else {
 5352|    948|    sstr << info.clock_drift_rate << "\n";
 5353|    948|  }
 5354|       |
 5355|  1.50k|  sstr << indent << "clock_type: " << int(info.clock_type) << " ";
 5356|  1.50k|  switch (info.clock_type) {
 5357|    413|    case heif_tai_clock_info_clock_type_unknown: sstr << "(unknown)\n"; break;
  ------------------
  |  |   54|    413|#define heif_tai_clock_info_clock_type_unknown 0
  ------------------
  |  Branch (5357:5): [True: 413, False: 1.09k]
  ------------------
 5358|     46|    case heif_tai_clock_info_clock_type_synchronized_to_atomic_source: sstr << "(synchronized to atomic source)\n"; break;
  ------------------
  |  |   56|     46|#define heif_tai_clock_info_clock_type_synchronized_to_atomic_source 2
  ------------------
  |  Branch (5358:5): [True: 46, False: 1.45k]
  ------------------
 5359|     61|    case heif_tai_clock_info_clock_type_not_synchronized_to_atomic_source: sstr << "(not synchronized to atomic source)\n"; break;
  ------------------
  |  |   55|     61|#define heif_tai_clock_info_clock_type_not_synchronized_to_atomic_source 1
  ------------------
  |  Branch (5359:5): [True: 61, False: 1.44k]
  ------------------
 5360|    985|    default: sstr << "(illegal value)\n"; break;;
  ------------------
  |  Branch (5360:5): [True: 985, False: 520]
  ------------------
 5361|  1.50k|  }
 5362|  1.50k|  return sstr.str();
 5363|  1.50k|}
_ZNK8Box_taic4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 5366|  1.50k|void Box_taic::dump(std::ostream& sstr, Indent& indent, bool full_log) const {
 5367|  1.50k|  Box::dump(sstr, indent, full_log);
 5368|  1.50k|  sstr << dump(m_info, indent);
 5369|       |
 5370|  1.50k|  return;
 5371|  1.50k|}
_ZN8Box_taic5parseER14BitstreamRangePK20heif_security_limits:
 5385|  1.52k|Error Box_taic::parse(BitstreamRange& range, const heif_security_limits*) {
 5386|  1.52k|  parse_full_box_header(range);
 5387|       |
 5388|  1.52k|  m_info.time_uncertainty = range.read64();
 5389|  1.52k|  m_info.clock_resolution = range.read32();
 5390|       |
 5391|  1.52k|  m_info.clock_drift_rate = range.read32s();
 5392|  1.52k|  m_info.clock_type = range.read8() >> 6;
 5393|  1.52k|  return range.get_error();
 5394|  1.52k|}
_ZNK8Box_itai4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 5418|    273|void Box_itai::dump(std::ostream& sstr, Indent& indent, bool full_log) const {
 5419|    273|  Box::dump(sstr, indent, full_log);
 5420|    273|  sstr << indent << "tai_timestamp: " << m_timestamp.tai_timestamp << "\n";
 5421|    273|  sstr << indent << "synchronization_state: " << int(m_timestamp.synchronization_state) << "\n";
 5422|    273|  sstr << indent << "timestamp_generation_failure: " << int(m_timestamp.timestamp_generation_failure) << "\n";
 5423|    273|  sstr << indent << "timestamp_is_modified: " << int(m_timestamp.timestamp_is_modified) << "\n";
 5424|    273|  return;
 5425|    273|}
_ZN8Box_itai5parseER14BitstreamRangePK20heif_security_limits:
 5512|    425|Error Box_itai::parse(BitstreamRange& range, const heif_security_limits*) {
 5513|    425|  parse_full_box_header(range);
 5514|       |
 5515|    425|  m_timestamp.version = 1;
 5516|    425|  m_timestamp.tai_timestamp = range.read64();
 5517|       |
 5518|    425|  uint8_t status_bits = range.read8();
 5519|       |
 5520|    425|  m_timestamp.synchronization_state = !!(status_bits & 0x80);
 5521|    425|  m_timestamp.timestamp_generation_failure = !!(status_bits & 0x40);
 5522|    425|  m_timestamp.timestamp_is_modified = !!(status_bits & 0x20);
 5523|       |
 5524|    425|  return range.get_error();
 5525|    425|}
_ZN8Box_elng5parseER14BitstreamRangePK20heif_security_limits:
 5528|    584|{
 5529|    584|  parse_full_box_header(range);
 5530|       |
 5531|    584|  if (get_version() > 0) {
  ------------------
  |  Branch (5531:7): [True: 69, False: 515]
  ------------------
 5532|     69|    return unsupported_version_error("elng");
 5533|     69|  }
 5534|       |
 5535|    515|  m_lang = range.read_string();
 5536|    515|  return range.get_error();
 5537|    584|}
_ZNK8Box_elng4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 5540|    473|{
 5541|    473|  Box::dump(sstr, indent, full_log);
 5542|    473|  sstr << indent << "extended_language: " << m_lang << "\n";
 5543|    473|  return;
 5544|    473|}
_ZN19Box_gimi_content_id5parseER14BitstreamRangePK20heif_security_limits:
 5556|  1.15k|{
 5557|  1.15k|  m_content_id = range.read_string_until_eof();
 5558|       |
 5559|  1.15k|  return range.get_error();
 5560|  1.15k|}
_ZNK19Box_gimi_content_id4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 5576|  1.07k|{
 5577|  1.07k|  Box::dump(sstr, indent, full_log);
 5578|       |
 5579|  1.07k|  sstr << indent << "content ID: " << m_content_id << "\n";
 5580|       |
 5581|  1.07k|  return;
 5582|  1.07k|}

_ZNK9BoxHeader14dump_to_stringER6Indentb:
  156|   128k|  {
  157|   128k|    std::ostringstream sstr;
  158|   128k|    dump(sstr, indent, full_log);
  159|   128k|    return sstr.str();
  160|   128k|  }
_ZNK9BoxHeader12get_box_sizeEv:
  125|  1.61M|  uint64_t get_box_size() const { return m_size; }
_ZNK9BoxHeader18has_fixed_box_sizeEv:
  127|   723k|  bool has_fixed_box_size() const { return m_size != 0; }
_ZNK9BoxHeader15get_header_sizeEv:
  129|  1.29M|  uint32_t get_header_size() const { return m_header_size; }
_ZNK9BoxHeader14get_short_typeEv:
  131|   470k|  uint32_t get_short_type() const { return m_type; }
_ZNK9BoxHeader14debug_box_nameEv:
  137|  92.4k|  virtual const char* debug_box_name() const { return nullptr; }
_ZN9BoxHeader14set_short_typeEj:
  139|   379k|  void set_short_type(uint32_t type) { m_type = type; }
_ZN3Box16set_short_headerERK9BoxHeader:
  199|   319k|  {
  200|   319k|    *(BoxHeader*) this = hdr;
  201|   319k|  }
_ZN3Box19set_output_positionEm:
  278|  15.0k|  void set_output_position(uint64_t pos) { m_output_position = pos; }
_ZNK3Box24get_parse_error_fatalityEv:
  280|  7.14k|  virtual parse_error_fatality get_parse_error_fatality() const { return parse_error_fatality::fatal; }
_ZNK7FullBox11get_versionEv:
  338|   439k|  uint8_t get_version() const { return m_version; }
_ZNK7FullBox9get_flagsEv:
  342|   486k|  uint32_t get_flags() const { return m_flags; }
_ZN7FullBox9set_flagsEj:
  344|  2.58k|  void set_flags(uint32_t flags) { m_flags = flags; }
_ZN9Box_otherC2Ej:
  366|  82.9k|  {
  367|  82.9k|    set_short_type(short_type);
  368|  82.9k|  }
_ZN9Box_ErrorC2Ej5Error20parse_error_fatality:
  390|  17.6k|  {
  391|  17.6k|    set_short_type(fourcc("ERR "));
  392|       |
  393|  17.6k|    m_box_type_with_parse_error = box4cc;
  394|  17.6k|    m_error = std::move(err);
  395|  17.6k|    m_fatality = fatality;
  396|  17.6k|  }
_ZN8Box_ftypC2Ev:
  421|  38.1k|  {
  422|  38.1k|    set_short_type(fourcc("ftyp"));
  423|  38.1k|  }
_ZNK8Box_ftyp14debug_box_nameEv:
  427|  4.28k|  const char* debug_box_name() const override { return "File Type"; }
_ZN8Box_freeC2Ev:
  461|    530|  {
  462|    530|    set_short_type(fourcc("free"));
  463|    530|  }
_ZNK8Box_free14debug_box_nameEv:
  467|    450|  const char* debug_box_name() const override { return "Free Space"; }
_ZN8Box_metaC2Ev:
  480|  1.68k|  {
  481|  1.68k|    set_short_type(fourcc("meta"));
  482|  1.68k|  }
_ZNK8Box_meta14debug_box_nameEv:
  486|    901|  const char* debug_box_name() const override { return "Metadata"; }
_ZN8Box_hdlrC2Ev:
  497|  2.36k|  {
  498|  2.36k|    set_short_type(fourcc("hdlr"));
  499|  2.36k|  }
_ZNK8Box_hdlr14debug_box_nameEv:
  503|  1.18k|  const char* debug_box_name() const override { return "Handler Reference"; }
_ZN8Box_pitmC2Ev:
  528|  2.42k|  {
  529|  2.42k|    set_short_type(fourcc("pitm"));
  530|  2.42k|  }
_ZNK8Box_pitm14debug_box_nameEv:
  534|  1.50k|  const char* debug_box_name() const override { return "Primary Item"; }
_ZNK8Box_iloc14debug_box_nameEv:
  563|  1.21k|  const char* debug_box_name() const override { return "Item Location"; }
_ZN8Box_infeC2Ev:
  658|  4.09k|  {
  659|  4.09k|    set_short_type(fourcc("infe"));
  660|  4.09k|  }
_ZNK8Box_infe14debug_box_nameEv:
  664|  2.90k|  const char* debug_box_name() const override { return "Item Info Entry"; }
_ZN8Box_iinfC2Ev:
  720|  2.36k|  {
  721|  2.36k|    set_short_type(fourcc("iinf"));
  722|  2.36k|  }
_ZNK8Box_iinf14debug_box_nameEv:
  726|  1.45k|  const char* debug_box_name() const override { return "Item Information"; }
_ZN8Box_iprpC2Ev:
  744|  20.4k|  {
  745|  20.4k|    set_short_type(fourcc("iprp"));
  746|  20.4k|  }
_ZNK8Box_iprp14debug_box_nameEv:
  750|  18.5k|  const char* debug_box_name() const override { return "Item Properties"; }
_ZN8Box_ipcoC2Ev:
  761|  10.0k|  {
  762|  10.0k|    set_short_type(fourcc("ipco"));
  763|  10.0k|  }
_ZNK8Box_ipco14debug_box_nameEv:
  781|  8.13k|  const char* debug_box_name() const override { return "Item Property Container"; }
_ZN8Box_ispeC2Ev:
  792|  1.79k|  {
  793|  1.79k|    set_short_type(fourcc("ispe"));
  794|  1.79k|  }
_ZNK8Box_ispe14debug_box_nameEv:
  808|    954|  const char* debug_box_name() const override { return "Image Spatial Extents"; }
_ZN8Box_ipmaC2Ev:
  830|  2.34k|  {
  831|  2.34k|    set_short_type(fourcc("ipma"));
  832|  2.34k|  }
_ZNK8Box_ipma14debug_box_nameEv:
  836|  1.37k|  const char* debug_box_name() const override { return "Item Property Association"; }
_ZN8Box_auxCC2Ev:
  887|  1.01k|  {
  888|  1.01k|    set_short_type(fourcc("auxC"));
  889|  1.01k|  }
_ZNK8Box_auxC14debug_box_nameEv:
  901|    873|  const char* debug_box_name() const override { return "Image Properties for Auxiliary Images"; }
_ZN8Box_irotC2Ev:
  918|  6.63k|  {
  919|  6.63k|    set_short_type(fourcc("irot"));
  920|  6.63k|  }
_ZNK8Box_irot14debug_box_nameEv:
  928|  3.03k|  const char* debug_box_name() const override { return "Image Rotation"; }
_ZNK8Box_irot24get_parse_error_fatalityEv:
  935|    196|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_imirC2Ev:
  951|  2.42k|  {
  952|  2.42k|    set_short_type(fourcc("imir"));
  953|  2.42k|  }
_ZNK8Box_imir14debug_box_nameEv:
  965|  1.10k|  const char* debug_box_name() const override { return "Image Mirroring"; }
_ZNK8Box_imir24get_parse_error_fatalityEv:
  967|    527|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_isclC2Ev:
  983|  1.08k|  {
  984|  1.08k|    set_short_type(fourcc("iscl"));
  985|  1.08k|  }
_ZNK8Box_iscl14debug_box_nameEv:
 1006|    418|  const char* debug_box_name() const override { return "Image Scaling"; }
_ZNK8Box_iscl24get_parse_error_fatalityEv:
 1008|    643|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_clapC2Ev:
 1027|  1.52k|  {
 1028|  1.52k|    set_short_type(fourcc("clap"));
 1029|  1.52k|  }
_ZNK8Box_clap14debug_box_nameEv:
 1037|    304|  const char* debug_box_name() const override { return "Clean Aperture"; }
_ZNK8Box_clap24get_parse_error_fatalityEv:
 1065|  1.16k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_irefC2Ev:
 1084|  13.3k|  {
 1085|  13.3k|    set_short_type(fourcc("iref"));
 1086|  13.3k|  }
_ZNK8Box_iref14debug_box_nameEv:
 1099|  6.55k|  const char* debug_box_name() const override { return "Item Reference"; }
_ZN8Box_rrefC2Ev:
 1138|    863|  {
 1139|    863|    set_short_type(fourcc("rref"));
 1140|    863|  }
_ZNK8Box_rref14debug_box_nameEv:
 1146|    812|  const char* debug_box_name() const override { return "Required Reference Types"; }
_ZNK8Box_idat14debug_box_nameEv:
 1171|  2.55k|  const char* debug_box_name() const override { return "Item Data"; }
_ZN8Box_grplC2Ev:
 1204|  1.08k|  {
 1205|  1.08k|    set_short_type(fourcc("grpl"));
 1206|  1.08k|  }
_ZNK8Box_grpl14debug_box_nameEv:
 1210|    789|  const char* debug_box_name() const override { return "Groups List"; }
_ZN8Box_sterC2Ev:
 1246|    337|  {
 1247|    337|    set_short_type(fourcc("ster"));
 1248|    337|  }
_ZNK8Box_ster14debug_box_nameEv:
 1252|    309|  const char* debug_box_name() const override { return "Stereo pair"; }
_ZN8Box_pymdC2Ev:
 1267|  1.13k|  {
 1268|  1.13k|    set_short_type(fourcc("pymd"));
 1269|  1.13k|  }
_ZNK8Box_pymd14debug_box_nameEv:
 1273|    676|  const char* debug_box_name() const override { return "Image pyramid group"; }
_ZNK8Box_pymd24get_parse_error_fatalityEv:
 1296|    447|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_dinfC2Ev:
 1314|  4.06k|  {
 1315|  4.06k|    set_short_type(fourcc("dinf"));
 1316|  4.06k|  }
_ZNK8Box_dinf14debug_box_nameEv:
 1320|  2.55k|  const char* debug_box_name() const override { return "Data Information"; }
_ZN8Box_drefC2Ev:
 1331|    379|  {
 1332|    379|    set_short_type(fourcc("dref"));
 1333|    379|  }
_ZNK8Box_dref14debug_box_nameEv:
 1337|    229|  const char* debug_box_name() const override { return "Data Reference"; }
_ZN7Box_urlC2Ev:
 1350|    671|  {
 1351|    671|    set_short_type(fourcc("url "));
 1352|    671|    set_flags(1);
 1353|    671|  }
_ZNK7Box_url14debug_box_nameEv:
 1357|    433|  const char* debug_box_name() const override { return "Data Entry URL"; }
_ZN8Box_pixiC2Ev:
 1377|  3.63k|  {
 1378|  3.63k|    set_short_type(fourcc("pixi"));
 1379|  3.63k|  }
_ZNK8Box_pixi14debug_box_nameEv:
 1398|  1.41k|  const char* debug_box_name() const override { return "Pixel Information"; }
_ZNK8Box_pixi24get_parse_error_fatalityEv:
 1402|  1.04k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_paspC2Ev:
 1416|  11.9k|  {
 1417|  11.9k|    set_short_type(fourcc("pasp"));
 1418|  11.9k|  }
_ZNK8Box_pasp14debug_box_nameEv:
 1425|  5.07k|  const char* debug_box_name() const override { return "Pixel Aspect Ratio"; }
_ZNK8Box_pasp24get_parse_error_fatalityEv:
 1429|    290|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_lselC2Ev:
 1440|  5.35k|  {
 1441|  5.35k|    set_short_type(fourcc("lsel"));
 1442|  5.35k|  }
_ZNK8Box_lsel14debug_box_nameEv:
 1448|  2.60k|  const char* debug_box_name() const override { return "Layer Selection"; }
_ZNK8Box_lsel24get_parse_error_fatalityEv:
 1452|    462|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_clliC2Ev:
 1463|  6.00k|  {
 1464|  6.00k|    set_short_type(fourcc("clli"));
 1465|       |
 1466|  6.00k|    clli.max_content_light_level = 0;
 1467|  6.00k|    clli.max_pic_average_light_level = 0;
 1468|  6.00k|  }
_ZNK8Box_clli14debug_box_nameEv:
 1474|    278|  const char* debug_box_name() const override { return "Content Light Level Information"; }
_ZNK8Box_clli24get_parse_error_fatalityEv:
 1478|    405|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_mdcv14debug_box_nameEv:
 1494|  2.49k|  const char* debug_box_name() const override { return "Master Display Colour Volume"; }
_ZNK8Box_mdcv24get_parse_error_fatalityEv:
 1498|    309|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_amve14debug_box_nameEv:
 1514|    396|  const char* debug_box_name() const override { return "Ambient Viewing Environment"; }
_ZNK8Box_amve24get_parse_error_fatalityEv:
 1518|    220|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_ndwtC2Ev:
 1529|  4.51k|  {
 1530|  4.51k|    set_short_type(fourcc("ndwt"));
 1531|  4.51k|  }
_ZNK8Box_ndwt27get_diffuse_white_luminanceEv:
 1535|  3.74k|  uint32_t get_diffuse_white_luminance() const { return m_diffuse_white_luminance; }
_ZN8Box_ndwt27set_diffuse_white_luminanceEj:
 1537|  4.01k|  void set_diffuse_white_luminance(uint32_t luminance) { m_diffuse_white_luminance = luminance; }
_ZNK8Box_ndwt14debug_box_nameEv:
 1541|    427|  const char* debug_box_name() const override { return "Nominal Diffuse White"; }
_ZNK8Box_ndwt24get_parse_error_fatalityEv:
 1545|     73|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_cclv23ccv_primaries_are_validEv:
 1560|  12.7k|  bool ccv_primaries_are_valid() const { return m_ccv_primaries_valid; }
_ZNK8Box_cclv18get_ccv_primary_x0Ev:
 1561|  1.00k|  int32_t get_ccv_primary_x0() const { return m_ccv_primaries_x[0]; }
_ZNK8Box_cclv18get_ccv_primary_y0Ev:
 1562|  1.00k|  int32_t get_ccv_primary_y0() const { return m_ccv_primaries_y[0]; }
_ZNK8Box_cclv18get_ccv_primary_x1Ev:
 1563|  1.00k|  int32_t get_ccv_primary_x1() const { return m_ccv_primaries_x[1]; }
_ZNK8Box_cclv18get_ccv_primary_y1Ev:
 1564|  1.00k|  int32_t get_ccv_primary_y1() const { return m_ccv_primaries_y[1]; }
_ZNK8Box_cclv18get_ccv_primary_x2Ev:
 1565|  1.00k|  int32_t get_ccv_primary_x2() const { return m_ccv_primaries_x[2]; }
_ZNK8Box_cclv18get_ccv_primary_y2Ev:
 1566|  1.00k|  int32_t get_ccv_primary_y2() const { return m_ccv_primaries_y[2]; }
_ZNK8Box_cclv22min_luminance_is_validEv:
 1569|  12.7k|  bool min_luminance_is_valid() const { return m_ccv_min_luminance_value.has_value(); }
_ZNK8Box_cclv17get_min_luminanceEv:
 1570|    875|  uint32_t get_min_luminance() const { return *m_ccv_min_luminance_value; }
_ZN8Box_cclv17set_min_luminanceEj:
 1571|  1.00k|  void set_min_luminance(uint32_t luminance) { m_ccv_min_luminance_value = luminance; }
_ZNK8Box_cclv22max_luminance_is_validEv:
 1573|  12.7k|  bool max_luminance_is_valid() const { return m_ccv_max_luminance_value.has_value(); }
_ZNK8Box_cclv17get_max_luminanceEv:
 1574|  2.16k|  uint32_t get_max_luminance() const { return *m_ccv_max_luminance_value; }
_ZN8Box_cclv17set_max_luminanceEj:
 1575|  2.40k|  void set_max_luminance(uint32_t luminance) { m_ccv_max_luminance_value = luminance; }
_ZNK8Box_cclv22avg_luminance_is_validEv:
 1577|  12.7k|  bool avg_luminance_is_valid() const { return m_ccv_avg_luminance_value.has_value(); }
_ZNK8Box_cclv17get_avg_luminanceEv:
 1578|    919|  uint32_t get_avg_luminance() const { return *m_ccv_avg_luminance_value; }
_ZN8Box_cclv17set_avg_luminanceEj:
 1579|  1.05k|  void set_avg_luminance(uint32_t luminance) { m_ccv_avg_luminance_value = luminance; }
_ZN8Box_cminC2Ev:
 1607|  3.43k|  {
 1608|  3.43k|    set_short_type(fourcc("cmin"));
 1609|  3.43k|  }
_ZNK8Box_cmin14debug_box_nameEv:
 1664|  1.29k|  const char* debug_box_name() const override { return "Camera Intrinsic Matrix"; }
_ZNK8Box_cmin24get_parse_error_fatalityEv:
 1670|  1.21k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_cmexC2Ev:
 1689|  5.15k|  {
 1690|  5.15k|    set_short_type(fourcc("cmex"));
 1691|  5.15k|  }
_ZNK8Box_cmex14debug_box_nameEv:
 1721|  1.15k|  const char* debug_box_name() const override { return "Camera Extrinsic Matrix"; }
_ZNK8Box_cmex24get_parse_error_fatalityEv:
 1727|  2.80k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_udesC2Ev:
 1769|  1.53k|  {
 1770|  1.53k|    set_short_type(fourcc("udes"));
 1771|  1.53k|  }
_ZNK8Box_udes14debug_box_nameEv:
 1775|  1.24k|  const char* debug_box_name() const override { return "User Description"; }
_ZNK8Box_udes24get_parse_error_fatalityEv:
 1841|    203|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_taicC2Ev:
 1862|  1.52k|  {
 1863|  1.52k|    set_short_type(fourcc("taic"));
 1864|  1.52k|    initialize_heif_tai_clock_info(&m_info);
 1865|  1.52k|  }
_ZNK8Box_taic14debug_box_nameEv:
 1871|  1.50k|  const char* debug_box_name() const override { return "TAI Clock Information"; }
_ZN8Box_itaiC2Ev:
 1942|    429|  {
 1943|    429|    set_short_type(fourcc("itai"));
 1944|    429|    initialize_heif_tai_timestamp_packet(&m_timestamp);
 1945|    429|  }
_ZNK8Box_itai14debug_box_nameEv:
 1949|    273|  const char* debug_box_name() const override { return "Item TAI Timestamp"; }
_ZN19Box_gimi_content_idC2Ev:
 2007|  1.15k|  {
 2008|  1.15k|    set_uuid_type(std::vector<uint8_t>{0x26, 0x1e, 0xf3, 0x74, 0x1d, 0x97, 0x5b, 0xba, 0xac, 0xbd, 0x9d, 0x2c, 0x8e, 0xa7, 0x35, 0x22});
 2009|  1.15k|  }
_ZNK19Box_gimi_content_id14debug_box_nameEv:
 2017|  1.07k|  const char* debug_box_name() const override { return "GIMI Content ID"; }
_ZN8Box_elngC2Ev:
 2050|    588|  {
 2051|    588|    set_short_type(fourcc("elng"));
 2052|    588|  }
_ZNK8Box_elng14debug_box_nameEv:
 2056|    473|  const char* debug_box_name() const override { return "Extended language"; }
_ZNK8Box_elng24get_parse_error_fatalityEv:
 2076|     79|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN9BoxHeaderD2Ev:
  121|   769k|  virtual ~BoxHeader() = default;
_ZN3BoxC2Ev:
  196|   388k|  Box() = default;
_ZN8FractionC2Ev:
   67|  6.08k|  Fraction() = default;

_ZN8Box_avcC5parseER14BitstreamRangePK20heif_security_limits:
   35|  4.96k|{
   36|  4.96k|  m_configuration.configuration_version = range.read8();
   37|  4.96k|  m_configuration.AVCProfileIndication = range.read8();
   38|  4.96k|  m_configuration.profile_compatibility = range.read8();
   39|  4.96k|  m_configuration.AVCLevelIndication = range.read8();
   40|  4.96k|  uint8_t lengthSizeMinusOneWithReserved = range.read8();
   41|  4.96k|  m_configuration.lengthSize =
   42|  4.96k|      (lengthSizeMinusOneWithReserved & 0b00000011) + 1;
   43|       |
   44|  4.96k|  uint8_t numOfSequenceParameterSets = (range.read8() & 0b00011111);
   45|  9.01k|  for (int i = 0; i < numOfSequenceParameterSets; i++) {
  ------------------
  |  Branch (45:19): [True: 4.04k, False: 4.96k]
  ------------------
   46|  4.04k|    uint16_t sequenceParameterSetLength = range.read16();
   47|  4.04k|    std::vector<uint8_t> sps(sequenceParameterSetLength);
   48|  4.04k|    range.read(sps.data(), sps.size());
   49|  4.04k|    m_sps.push_back(sps);
   50|  4.04k|  }
   51|       |
   52|  4.96k|  uint8_t numOfPictureParameterSets = range.read8();
   53|  10.5k|  for (int i = 0; i < numOfPictureParameterSets; i++) {
  ------------------
  |  Branch (53:19): [True: 5.55k, False: 4.96k]
  ------------------
   54|  5.55k|    uint16_t pictureParameterSetLength = range.read16();
   55|  5.55k|    std::vector<uint8_t> pps(pictureParameterSetLength);
   56|  5.55k|    range.read(pps.data(), pps.size());
   57|  5.55k|    m_pps.push_back(pps);
   58|  5.55k|  }
   59|       |
   60|       |  // See ISO/IEC 14496-15 2017 Section 5.3.3.1.2
   61|  4.96k|  if (range.get_remaining_bytes() > 0) {
  ------------------
  |  Branch (61:7): [True: 2.97k, False: 1.98k]
  ------------------
   62|  2.97k|    if ((m_configuration.AVCProfileIndication != 66) &&
  ------------------
  |  Branch (62:9): [True: 2.71k, False: 267]
  ------------------
   63|  2.71k|        (m_configuration.AVCProfileIndication != 77) &&
  ------------------
  |  Branch (63:9): [True: 2.47k, False: 241]
  ------------------
   64|  2.47k|        (m_configuration.AVCProfileIndication != 88)) {
  ------------------
  |  Branch (64:9): [True: 2.00k, False: 471]
  ------------------
   65|  2.00k|      m_configuration.chroma_format = (heif_chroma) (range.read8() & 0b00000011);
   66|  2.00k|      m_configuration.bit_depth_luma = 8 + (range.read8() & 0b00000111);
   67|  2.00k|      m_configuration.bit_depth_chroma = 8 + (range.read8() & 0b00000111);
   68|  2.00k|      uint8_t numOfSequenceParameterSetExt = range.read8();
   69|  8.47k|      for (int i = 0; i < numOfSequenceParameterSetExt; i++) {
  ------------------
  |  Branch (69:23): [True: 6.47k, False: 2.00k]
  ------------------
   70|  6.47k|        uint16_t sequenceParameterSetExtLength = range.read16();
   71|  6.47k|        std::vector<uint8_t> sps_ext(sequenceParameterSetExtLength);
   72|  6.47k|        range.read(sps_ext.data(), sps_ext.size());
   73|  6.47k|        m_sps_ext.push_back(sps_ext);
   74|  6.47k|      }
   75|  2.00k|    }
   76|  2.97k|  }
   77|       |
   78|  4.96k|  return range.get_error();
   79|  4.96k|}
_ZNK8Box_avcC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  170|  4.54k|{
  171|  4.54k|  Box::dump(sstr, indent, full_log);
  172|  4.54k|  sstr << indent << "configuration_version: " << ((int) m_configuration.configuration_version) << "\n"
  173|  4.54k|      << indent << "AVCProfileIndication: " << ((int) m_configuration.AVCProfileIndication) << " (" << profileIndicationAsText() << ")\n"
  174|  4.54k|      << indent << "profile_compatibility: " << ((int) m_configuration.profile_compatibility) << "\n"
  175|  4.54k|      << indent << "AVCLevelIndication: " << ((int) m_configuration.AVCLevelIndication) << "\n"
  176|  4.54k|      << indent << "Chroma format: ";
  177|       |
  178|  4.54k|  switch (m_configuration.chroma_format) {
  179|  1.13k|    case heif_chroma_monochrome:
  ------------------
  |  |   75|  1.13k|#define heif_chroma_monochrome heif_chroma_planar
  ------------------
  |  Branch (179:5): [True: 1.13k, False: 3.40k]
  ------------------
  180|  1.13k|      sstr << "4:0:0\n";
  181|  1.13k|      break;
  182|  2.85k|    case heif_chroma_420:
  ------------------
  |  Branch (182:5): [True: 2.85k, False: 1.69k]
  ------------------
  183|  2.85k|      sstr << "4:2:0\n";
  184|  2.85k|      break;
  185|    162|    case heif_chroma_422:
  ------------------
  |  Branch (185:5): [True: 162, False: 4.37k]
  ------------------
  186|    162|      sstr << "4:2:2\n";
  187|    162|      break;
  188|    394|    case heif_chroma_444:
  ------------------
  |  Branch (188:5): [True: 394, False: 4.14k]
  ------------------
  189|    394|      sstr << "4:4:4\n";
  190|    394|      break;
  191|      0|    default:
  ------------------
  |  Branch (191:5): [True: 0, False: 4.54k]
  ------------------
  192|      0|      sstr << "unsupported\n";
  193|      0|      break;
  194|  4.54k|  }
  195|       |
  196|  4.54k|  sstr << indent << "Bit depth luma: " << ((int) m_configuration.bit_depth_luma) << "\n"
  197|  4.54k|      << indent << "Bit depth chroma: " << ((int) m_configuration.bit_depth_chroma) << "\n";
  198|       |
  199|  4.54k|  for (const auto& sps : m_sps) {
  ------------------
  |  Branch (199:24): [True: 3.35k, False: 4.54k]
  ------------------
  200|  3.35k|    sstr << indent << "SPS: ";
  201|  8.41k|    for (uint8_t b : sps) {
  ------------------
  |  Branch (201:20): [True: 8.41k, False: 3.35k]
  ------------------
  202|  8.41k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  203|  8.41k|    }
  204|  3.35k|    sstr << "\n";
  205|  3.35k|    sstr << std::dec;
  206|  3.35k|  }
  207|       |
  208|  4.54k|  for (const auto& spsext : m_sps_ext) {
  ------------------
  |  Branch (208:27): [True: 3.11k, False: 4.54k]
  ------------------
  209|  3.11k|    sstr << indent << "SPS-EXT: ";
  210|  3.11k|    for (uint8_t b : spsext) {
  ------------------
  |  Branch (210:20): [True: 549, False: 3.11k]
  ------------------
  211|    549|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  212|    549|    }
  213|  3.11k|    sstr << "\n";
  214|  3.11k|    sstr << std::dec;
  215|  3.11k|  }
  216|       |
  217|  4.54k|  for (const auto& pps : m_pps) {
  ------------------
  |  Branch (217:24): [True: 1.89k, False: 4.54k]
  ------------------
  218|  1.89k|    sstr << indent << "PPS: ";
  219|  1.89k|    for (uint8_t b : pps) {
  ------------------
  |  Branch (219:20): [True: 641, False: 1.89k]
  ------------------
  220|    641|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  221|    641|    }
  222|  1.89k|    sstr << "\n";
  223|  1.89k|    sstr << std::dec;
  224|  1.89k|  }
  225|       |
  226|  4.54k|  return;
  227|  4.54k|}
_ZNK8Box_avcC23profileIndicationAsTextEv:
  230|  4.54k|{
  231|       |  // See ISO/IEC 14496-10:2022 Annex A
  232|  4.54k|  switch (m_configuration.AVCProfileIndication) {
  233|    815|    case 44:
  ------------------
  |  Branch (233:5): [True: 815, False: 3.72k]
  ------------------
  234|    815|      return "CALVC 4:4:4";
  235|    646|    case 66:
  ------------------
  |  Branch (235:5): [True: 646, False: 3.89k]
  ------------------
  236|    646|      return "Constrained Baseline";
  237|  1.03k|    case 77:
  ------------------
  |  Branch (237:5): [True: 1.03k, False: 3.50k]
  ------------------
  238|  1.03k|      return "Main";
  239|    647|    case 88:
  ------------------
  |  Branch (239:5): [True: 647, False: 3.89k]
  ------------------
  240|    647|      return "Extended";
  241|    135|    case 100:
  ------------------
  |  Branch (241:5): [True: 135, False: 4.40k]
  ------------------
  242|    135|      return "High variant";
  243|     80|    case 110:
  ------------------
  |  Branch (243:5): [True: 80, False: 4.46k]
  ------------------
  244|     80|      return "High 10";
  245|     71|    case 122:
  ------------------
  |  Branch (245:5): [True: 71, False: 4.47k]
  ------------------
  246|     71|      return "High 4:2:2";
  247|    262|    case 244:
  ------------------
  |  Branch (247:5): [True: 262, False: 4.27k]
  ------------------
  248|    262|      return "High 4:4:4";
  249|    849|    default:
  ------------------
  |  Branch (249:5): [True: 849, False: 3.69k]
  ------------------
  250|    849|      return "Unknown";
  251|  4.54k|  }
  252|  4.54k|}

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

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

_ZN8Box_av1CC2Ev:
   45|  2.53k|  {
   46|  2.53k|    set_short_type(fourcc("av1C"));
   47|  2.53k|  }
_ZN8Box_av01C2Ev:
  122|     64|  {
  123|     64|    set_short_type(fourcc("av01"));
  124|     64|  }
_ZN8Box_a1opC2Ev:
  131|  11.4k|  {
  132|  11.4k|    set_short_type(fourcc("a1op"));
  133|  11.4k|  }
_ZN8Box_a1lxC2Ev:
  150|  3.84k|  {
  151|  3.84k|    set_short_type(fourcc("a1lx"));
  152|  3.84k|  }

_ZN30HEVCDecoderConfigurationRecord5parseER14BitstreamRangePK20heif_security_limits:
   38|  4.55k|{
   39|  4.55k|  uint8_t byte;
   40|       |
   41|  4.55k|  configuration_version = range.read8();
   42|  4.55k|  byte = range.read8();
   43|  4.55k|  general_profile_space = (byte >> 6) & 3;
   44|  4.55k|  general_tier_flag = (byte >> 5) & 1;
   45|  4.55k|  general_profile_idc = (byte & 0x1F);
   46|       |
   47|  4.55k|  general_profile_compatibility_flags = range.read32();
   48|       |
   49|  31.8k|  for (int i = 0; i < 6; i++) {
  ------------------
  |  Branch (49:19): [True: 27.3k, False: 4.55k]
  ------------------
   50|  27.3k|    byte = range.read8();
   51|       |
   52|   245k|    for (int b = 0; b < 8; b++) {
  ------------------
  |  Branch (52:21): [True: 218k, False: 27.3k]
  ------------------
   53|   218k|      general_constraint_indicator_flags[i * 8 + b] = (byte >> (7 - b)) & 1;
   54|   218k|    }
   55|  27.3k|  }
   56|       |
   57|  4.55k|  general_level_idc = range.read8();
   58|  4.55k|  min_spatial_segmentation_idc = range.read16() & 0x0FFF;
   59|  4.55k|  parallelism_type = range.read8() & 0x03;
   60|  4.55k|  chroma_format = range.read8() & 0x03;
   61|  4.55k|  bit_depth_luma = static_cast<uint8_t>((range.read8() & 0x07) + 8);
   62|  4.55k|  bit_depth_chroma = static_cast<uint8_t>((range.read8() & 0x07) + 8);
   63|  4.55k|  avg_frame_rate = range.read16();
   64|       |
   65|  4.55k|  byte = range.read8();
   66|  4.55k|  constant_frame_rate = (byte >> 6) & 0x03;
   67|  4.55k|  num_temporal_layers = (byte >> 3) & 0x07;
   68|  4.55k|  temporal_id_nested = (byte >> 2) & 1;
   69|       |
   70|  4.55k|  m_length_size = static_cast<uint8_t>((byte & 0x03) + 1);
   71|       |
   72|  4.55k|  int nArrays = range.read8();
   73|       |
   74|  8.84k|  for (int i = 0; i < nArrays && !range.error(); i++) {
  ------------------
  |  Branch (74:19): [True: 4.37k, False: 4.46k]
  |  Branch (74:34): [True: 4.28k, False: 85]
  ------------------
   75|  4.28k|    byte = range.read8();
   76|       |
   77|  4.28k|    NalArray array;
   78|       |
   79|  4.28k|    array.m_array_completeness = (byte >> 6) & 1;
   80|  4.28k|    array.m_NAL_unit_type = (byte & 0x3F);
   81|       |
   82|  4.28k|    int nUnits = range.read16();
   83|  23.2k|    for (int u = 0; u < nUnits && !range.error(); u++) {
  ------------------
  |  Branch (83:21): [True: 18.9k, False: 4.23k]
  |  Branch (83:35): [True: 18.9k, False: 57]
  ------------------
   84|       |
   85|  18.9k|      std::vector<uint8_t> nal_unit;
   86|  18.9k|      int size = range.read16();
   87|  18.9k|      if (!size) {
  ------------------
  |  Branch (87:11): [True: 2.28k, False: 16.6k]
  ------------------
   88|       |        // Ignore empty NAL units.
   89|  2.28k|        continue;
   90|  2.28k|      }
   91|       |
   92|  16.6k|      if (range.prepare_read(size)) {
  ------------------
  |  Branch (92:11): [True: 16.6k, False: 33]
  ------------------
   93|  16.6k|        nal_unit.resize(size);
   94|  16.6k|        bool success = range.get_istream()->read((char*) nal_unit.data(), size);
   95|  16.6k|        if (!success) {
  ------------------
  |  Branch (95:13): [True: 0, False: 16.6k]
  ------------------
   96|      0|          return Error{heif_error_Invalid_input, heif_suberror_End_of_data, "error while reading hvcC box"};
   97|      0|        }
   98|  16.6k|      }
   99|       |
  100|  16.6k|      array.m_nal_units.push_back(std::move(nal_unit));
  101|  16.6k|    }
  102|       |
  103|  4.28k|    m_nal_array.push_back(std::move(array));
  104|  4.28k|  }
  105|       |
  106|  4.55k|  range.skip_to_end_of_box();
  107|       |
  108|  4.55k|  return range.get_error();
  109|  4.55k|}
_ZN8Box_hvcC5parseER14BitstreamRangePK20heif_security_limits:
  270|  4.55k|{
  271|  4.55k|  return m_configuration.parse(range, limits);
  272|  4.55k|}
_ZNK8Box_hvcC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  276|  3.95k|{
  277|  3.95k|  Box::dump(sstr, indent, full_log);
  278|       |
  279|  3.95k|  const auto& c = m_configuration; // abbreviation
  280|       |
  281|  3.95k|  sstr << indent << "configuration_version: " << ((int) c.configuration_version) << "\n"
  282|  3.95k|       << indent << "general_profile_space: " << ((int) c.general_profile_space) << "\n"
  283|  3.95k|       << indent << "general_tier_flag: " << c.general_tier_flag << "\n"
  284|  3.95k|       << indent << "general_profile_idc: " << ((int) c.general_profile_idc) << "\n";
  285|       |
  286|  3.95k|  sstr << indent << "general_profile_compatibility_flags: ";
  287|   130k|  for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (287:19): [True: 126k, False: 3.95k]
  ------------------
  288|   126k|    sstr << ((c.general_profile_compatibility_flags >> (31 - i)) & 1);
  289|   126k|    if ((i % 8) == 7) sstr << ' ';
  ------------------
  |  Branch (289:9): [True: 15.8k, False: 110k]
  ------------------
  290|   110k|    else if ((i % 4) == 3) sstr << '.';
  ------------------
  |  Branch (290:14): [True: 15.8k, False: 94.8k]
  ------------------
  291|   126k|  }
  292|  3.95k|  sstr << "\n";
  293|       |
  294|  3.95k|  sstr << indent << "general_constraint_indicator_flags: ";
  295|  3.95k|  int cnt = 0;
  296|   193k|  for (int i = 0; i < HEVCDecoderConfigurationRecord::NUM_CONSTRAINT_INDICATOR_FLAGS; i++) {
  ------------------
  |  Branch (296:19): [True: 189k, False: 3.95k]
  ------------------
  297|   189k|    bool b = c.general_constraint_indicator_flags[i];
  298|       |
  299|   189k|    sstr << (b ? 1 : 0);
  ------------------
  |  Branch (299:14): [True: 85.8k, False: 103k]
  ------------------
  300|   189k|    cnt++;
  301|   189k|    if ((cnt % 8) == 0)
  ------------------
  |  Branch (301:9): [True: 23.7k, False: 165k]
  ------------------
  302|  23.7k|      sstr << ' ';
  303|   189k|  }
  304|  3.95k|  sstr << "\n";
  305|       |
  306|  3.95k|  sstr << indent << "general_level_idc: " << ((int) c.general_level_idc) << "\n"
  307|  3.95k|       << indent << "min_spatial_segmentation_idc: " << c.min_spatial_segmentation_idc << "\n"
  308|  3.95k|       << indent << "parallelism_type: " << ((int) c.parallelism_type) << "\n"
  309|  3.95k|       << indent << "chroma_format: ";
  310|       |
  311|  3.95k|  switch (c.chroma_format) {
  312|  1.34k|    case 0:
  ------------------
  |  Branch (312:5): [True: 1.34k, False: 2.60k]
  ------------------
  313|  1.34k|      sstr << "monochrome";
  314|  1.34k|      break;
  315|    203|    case 1:
  ------------------
  |  Branch (315:5): [True: 203, False: 3.74k]
  ------------------
  316|    203|      sstr << "4:2:0";
  317|    203|      break;
  318|    961|    case 2:
  ------------------
  |  Branch (318:5): [True: 961, False: 2.98k]
  ------------------
  319|    961|      sstr << "4:2:2";
  320|    961|      break;
  321|  1.44k|    case 3:
  ------------------
  |  Branch (321:5): [True: 1.44k, False: 2.50k]
  ------------------
  322|  1.44k|      sstr << "4:4:4";
  323|  1.44k|      break;
  324|      0|    default:
  ------------------
  |  Branch (324:5): [True: 0, False: 3.95k]
  ------------------
  325|      0|      sstr << ((int) c.chroma_format);
  326|      0|      break;
  327|  3.95k|  }
  328|       |
  329|  3.95k|  sstr << "\n"
  330|  3.95k|       << indent << "bit_depth_luma: " << ((int) c.bit_depth_luma) << "\n"
  331|  3.95k|       << indent << "bit_depth_chroma: " << ((int) c.bit_depth_chroma) << "\n"
  332|  3.95k|       << indent << "avg_frame_rate: " << c.avg_frame_rate << "\n"
  333|  3.95k|       << indent << "constant_frame_rate: " << ((int) c.constant_frame_rate) << "\n"
  334|  3.95k|       << indent << "num_temporal_layers: " << ((int) c.num_temporal_layers) << "\n"
  335|  3.95k|       << indent << "temporal_id_nested: " << ((int) c.temporal_id_nested) << "\n"
  336|  3.95k|       << indent << "length_size: " << ((int) c.m_length_size) << "\n";
  337|       |
  338|  3.95k|  for (const auto& array : c.m_nal_array) {
  ------------------
  |  Branch (338:26): [True: 3.07k, False: 3.95k]
  ------------------
  339|  3.07k|    sstr << indent << "<array>\n";
  340|       |
  341|  3.07k|    indent++;
  342|  3.07k|    sstr << indent << "array_completeness: " << ((int) array.m_array_completeness) << "\n"
  343|  3.07k|         << indent << "NAL_unit_type: " << ((int) array.m_NAL_unit_type) << "\n";
  344|       |
  345|  3.07k|    for (const auto& unit : array.m_nal_units) {
  ------------------
  |  Branch (345:27): [True: 618, False: 3.07k]
  ------------------
  346|       |      //sstr << "  unit with " << unit.size() << " bytes of data\n";
  347|    618|      sstr << indent;
  348|    873|      for (uint8_t b : unit) {
  ------------------
  |  Branch (348:22): [True: 873, False: 618]
  ------------------
  349|    873|        sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  350|    873|      }
  351|    618|      sstr << "\n";
  352|    618|      sstr << std::dec;
  353|    618|    }
  354|       |
  355|  3.07k|    indent--;
  356|  3.07k|  }
  357|       |
  358|  3.95k|  return;
  359|  3.95k|}

_ZN8Box_hvcCC2Ev:
  101|  4.55k|  {
  102|  4.55k|    set_short_type(fourcc("hvcC"));
  103|  4.55k|  }
_ZN8Box_hvc1C2Ev:
  142|    131|  {
  143|    131|    set_short_type(fourcc("hvc1"));
  144|    131|  }
_ZNK8Box_hvcC14debug_box_nameEv:
  110|  3.95k|  const char* debug_box_name() const override { return "HEVC Configuration Item"; }

_ZN8Box_cdef5parseER14BitstreamRangePK20heif_security_limits:
   33|  6.80k|{
   34|  6.80k|  uint16_t channel_count = range.read16();
   35|       |
   36|  6.80k|  if (limits->max_components && channel_count > limits->max_components) {
  ------------------
  |  Branch (36:7): [True: 6.80k, False: 0]
  |  Branch (36:33): [True: 9, False: 6.79k]
  ------------------
   37|      9|    std::stringstream sstr;
   38|      9|    sstr << "cdef box wants to define " << channel_count << " JPEG-2000 channels, but the security limit is set to "
   39|      9|         << limits->max_components << " components";
   40|      9|    return {heif_error_Invalid_input,
   41|      9|            heif_suberror_Security_limit_exceeded,
   42|      9|            sstr.str()};
   43|      9|  }
   44|       |
   45|  6.79k|  if (channel_count > range.get_remaining_bytes() / 6) {
  ------------------
  |  Branch (45:7): [True: 9, False: 6.78k]
  ------------------
   46|      9|    std::stringstream sstr;
   47|      9|    sstr << "cdef box wants to define " << channel_count << " JPEG-2000 channels, but file only contains "
   48|      9|         << range.get_remaining_bytes() / 6 << " components";
   49|      9|    return {heif_error_Invalid_input,
   50|      9|            heif_suberror_End_of_data,
   51|      9|            sstr.str()};
   52|      9|  }
   53|       |
   54|  6.78k|  m_channels.resize(channel_count);
   55|       |
   56|  10.3k|  for (uint16_t i = 0; i < channel_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (56:24): [True: 3.57k, False: 6.78k]
  |  Branch (56:45): [True: 3.57k, False: 0]
  |  Branch (56:63): [True: 3.57k, False: 0]
  ------------------
   57|  3.57k|    Channel channel;
   58|  3.57k|    channel.channel_index = range.read16();
   59|  3.57k|    channel.channel_type = range.read16();
   60|  3.57k|    channel.channel_association = range.read16();
   61|  3.57k|    m_channels[i] = channel;
   62|  3.57k|  }
   63|       |
   64|  6.78k|  return range.get_error();
   65|  6.79k|}
_ZNK8Box_cdef4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
   68|  2.76k|{
   69|  2.76k|  Box::dump(sstr, indent, full_log);
   70|       |
   71|  2.76k|  for (const auto& channel : m_channels) {
  ------------------
  |  Branch (71:28): [True: 2.56k, False: 2.76k]
  ------------------
   72|  2.56k|    sstr << indent << "channel_index: " << channel.channel_index
   73|  2.56k|         << ", channel_type: " << channel.channel_type
   74|  2.56k|         << ", channel_association: " << channel.channel_association << "\n";
   75|  2.56k|  }
   76|       |
   77|  2.76k|  return;
   78|  2.76k|}
_ZN8Box_cmap5parseER14BitstreamRangePK20heif_security_limits:
  135|  1.18k|{
  136|  1.11M|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (136:10): [True: 1.11M, False: 1.18k]
  |  Branch (136:26): [True: 1.11M, False: 0]
  ------------------
  137|  1.11M|    Component component;
  138|  1.11M|    component.component_index = range.read16();
  139|  1.11M|    component.mapping_type = range.read8();
  140|  1.11M|    component.palette_colour = range.read8();
  141|  1.11M|    m_components.push_back(component);
  142|  1.11M|  }
  143|       |
  144|  1.18k|  return range.get_error();
  145|  1.18k|}
_ZNK8Box_cmap4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  149|    598|{
  150|    598|  Box::dump(sstr, indent, full_log);
  151|       |
  152|   852k|  for (const auto& component : m_components) {
  ------------------
  |  Branch (152:30): [True: 852k, False: 598]
  ------------------
  153|   852k|    sstr << indent << "component_index: " << component.component_index
  154|   852k|         << ", mapping_type: " << (int) (component.mapping_type)
  155|   852k|         << ", palette_colour: " << (int) (component.palette_colour) << "\n";
  156|   852k|  }
  157|       |
  158|    598|  return;
  159|    598|}
_ZN8Box_pclr5parseER14BitstreamRangePK20heif_security_limits:
  179|    648|{
  180|    648|  uint16_t num_entries = range.read16();
  181|    648|  uint8_t num_palette_columns = range.read8();
  182|       |
  183|       |  // ISO/IEC 15444-1 (Table I.12) requires NPC to be in the range 1 to 255.
  184|       |  // A palette without columns carries no entry data, so the per-entry byte
  185|       |  // count below would be zero and could not bound num_entries. The entry loop
  186|       |  // then allocated up to 65535 empty PaletteEntry vectors from an 11-byte box,
  187|       |  // and nested 'j2kH' containers could repeat this hundreds of times without
  188|       |  // any of it being charged to the memory limits (GHSA-9c75-9g8r-4728).
  189|    648|  if (num_palette_columns == 0) {
  ------------------
  |  Branch (189:7): [True: 2, False: 646]
  ------------------
  190|      2|    return Error(heif_error_Invalid_input,
  191|      2|                 heif_suberror_Invalid_J2K_codestream,
  192|      2|                 "pclr box declares zero palette columns");
  193|      2|  }
  194|       |
  195|  7.64k|  for (uint8_t i = 0; i < num_palette_columns; i++) {
  ------------------
  |  Branch (195:23): [True: 7.00k, False: 641]
  ------------------
  196|       |    // B_i (Table I.13): the high bit marks signed values, the low 7 bits hold
  197|       |    // the column precision minus one (0..37 for 1..38 bits).
  198|  7.00k|    uint8_t b = range.read8();
  199|  7.00k|    if (b & 0x80) {
  ------------------
  |  Branch (199:9): [True: 2, False: 7.00k]
  ------------------
  200|      2|      return Error(heif_error_Unsupported_feature,
  201|      2|                   heif_suberror_Unsupported_data_version,
  202|      2|                   "pclr with signed data is not supported");
  203|      2|    }
  204|  7.00k|    uint8_t bit_depth = static_cast<uint8_t>((b & 0x7F) + 1);
  205|  7.00k|    if (bit_depth > 16) {
  ------------------
  |  Branch (205:9): [True: 3, False: 6.99k]
  ------------------
  206|      3|      return Error(heif_error_Unsupported_feature,
  207|      3|                   heif_suberror_Unsupported_data_version,
  208|      3|                   "pclr more than 16 bits per channel is not supported");
  209|      3|    }
  210|  6.99k|    m_bitDepths.push_back(bit_depth);
  211|  6.99k|  }
  212|       |  // Number of bytes each palette entry occupies in the box: each C_ji value is
  213|       |  // padded to a whole number of bytes (I.5.3.4). Used to bound num_entries by
  214|       |  // the data actually present, so a small header cannot force a large
  215|       |  // allocation (analogous to the 'cdef'/'j2kL' checks). The precision is at
  216|       |  // least 1 bit, so every entry occupies at least one byte and the bound is
  217|       |  // never vacuous. num_entries is a uint16_t and bytes_per_entry is at most
  218|       |  // 255 * 2, so the product cannot overflow.
  219|    641|  size_t bytes_per_entry = 0;
  220|  6.99k|  for (uint8_t bd : m_bitDepths) {
  ------------------
  |  Branch (220:19): [True: 6.99k, False: 641]
  ------------------
  221|  6.99k|    bytes_per_entry += (bd + 7) / 8;
  222|  6.99k|  }
  223|       |
  224|    641|  if (static_cast<size_t>(num_entries) * bytes_per_entry > range.get_remaining_bytes()) {
  ------------------
  |  Branch (224:7): [True: 40, False: 601]
  ------------------
  225|     40|    return Error(heif_error_Invalid_input,
  226|     40|                 heif_suberror_End_of_data,
  227|     40|                 "pclr box declares more entries than the box contains");
  228|     40|  }
  229|       |
  230|       |  // Each entry is stored as its own vector, so the palette costs noticeably
  231|       |  // more memory than the bytes it occupies in the file. Charge that storage
  232|       |  // to the memory limits before allocating it.
  233|    601|  size_t bytes_per_stored_entry = sizeof(PaletteEntry) + num_palette_columns * sizeof(uint16_t);
  234|    601|  if (auto err = m_memory_handle.alloc(num_entries, bytes_per_stored_entry,
  ------------------
  |  Branch (234:12): [True: 0, False: 601]
  ------------------
  235|    601|                                       limits, "the 'pclr' palette")) {
  236|      0|    return err;
  237|      0|  }
  238|       |
  239|    601|  m_entries.reserve(num_entries);
  240|       |
  241|  3.61k|  for (uint16_t j = 0; j < num_entries; j++) {
  ------------------
  |  Branch (241:24): [True: 3.01k, False: 601]
  ------------------
  242|  3.01k|    PaletteEntry entry;
  243|  7.67k|    for (size_t i = 0; i < m_bitDepths.size(); i++) {
  ------------------
  |  Branch (243:24): [True: 4.65k, False: 3.01k]
  ------------------
  244|  4.65k|      if (m_bitDepths[i] <= 8) {
  ------------------
  |  Branch (244:11): [True: 4.18k, False: 475]
  ------------------
  245|  4.18k|        entry.columns.push_back(range.read8());
  246|  4.18k|      }
  247|    475|      else {
  248|    475|        entry.columns.push_back(range.read16());
  249|    475|      }
  250|  4.65k|    }
  251|  3.01k|    m_entries.push_back(std::move(entry));
  252|  3.01k|  }
  253|       |
  254|    601|  return range.get_error();
  255|    601|}
_ZNK8Box_pclr4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  259|    502|{
  260|    502|  Box::dump(sstr, indent, full_log);
  261|       |
  262|    502|  sstr << indent << "NE: " << m_entries.size();
  263|    502|  sstr << ", NPC: " << (int) get_num_columns();
  264|    502|  sstr << ", B: ";
  265|  2.19k|  for (uint8_t b : m_bitDepths) {
  ------------------
  |  Branch (265:18): [True: 2.19k, False: 502]
  ------------------
  266|  2.19k|    sstr << (int) b << ", ";
  267|  2.19k|  }
  268|       |  // TODO: maybe dump entries too?
  269|    502|  sstr << "\n";
  270|       |
  271|    502|  return;
  272|    502|}
_ZN8Box_j2kL5parseER14BitstreamRangePK20heif_security_limits:
  315|    451|{
  316|    451|  uint16_t layer_count = range.read16();
  317|       |
  318|    451|  if (layer_count > range.get_remaining_bytes() / (2+1+2)) {
  ------------------
  |  Branch (318:7): [True: 4, False: 447]
  ------------------
  319|      4|    std::stringstream sstr;
  320|      4|    sstr << "j2kL box wants to define " << layer_count << "JPEG-2000 layers, but the box only contains "
  321|      4|         << range.get_remaining_bytes() / (2 + 1 + 2) << " layers entries";
  322|      4|    return {heif_error_Invalid_input,
  323|      4|            heif_suberror_End_of_data,
  324|      4|            sstr.str()};
  325|      4|  }
  326|       |
  327|    447|  m_layers.resize(layer_count);
  328|       |
  329|   397k|  for (int i = 0; i < layer_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (329:19): [True: 397k, False: 447]
  |  Branch (329:38): [True: 397k, False: 0]
  |  Branch (329:56): [True: 397k, False: 0]
  ------------------
  330|   397k|    Layer layer;
  331|   397k|    layer.layer_id = range.read16();
  332|   397k|    layer.discard_levels = range.read8();
  333|   397k|    layer.decode_layers = range.read16();
  334|   397k|    m_layers[i] = layer;
  335|   397k|  }
  336|       |
  337|    447|  if (range.get_error()) {
  ------------------
  |  Branch (337:7): [True: 4, False: 443]
  ------------------
  338|      4|    m_layers.clear();
  339|      4|  }
  340|       |
  341|    447|  return range.get_error();
  342|    451|}
_ZNK8Box_j2kL4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  345|    440|{
  346|    440|  Box::dump(sstr, indent, full_log);
  347|       |
  348|   397k|  for (const auto& layer : m_layers) {
  ------------------
  |  Branch (348:26): [True: 397k, False: 440]
  ------------------
  349|   397k|    sstr << indent << "layer_id: " << layer.layer_id
  350|   397k|         << ", discard_levels: " << (int) (layer.discard_levels)
  351|   397k|         << ", decode_layers: " << layer.decode_layers << "\n";
  352|   397k|  }
  353|       |
  354|    440|  return;
  355|    440|}
_ZN8Box_j2kH5parseER14BitstreamRangePK20heif_security_limits:
  376|  5.07k|{
  377|  5.07k|  return read_children(range, READ_CHILDREN_ALL, limits);
  378|  5.07k|}
_ZNK8Box_j2kH4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  381|  4.56k|{
  382|  4.56k|  Box::dump(sstr, indent, full_log);
  383|       |
  384|  4.56k|  dump_children(sstr, indent, full_log);
  385|       |
  386|  4.56k|  return;
  387|  4.56k|}

_ZN8Box_j2kHC2Ev:
  320|  5.07k|    Box_j2kH() { set_short_type(fourcc("j2kH")); }
_ZN8Box_cdefC2Ev:
   58|  6.80k|    Box_cdef() { set_short_type(fourcc("cdef")); }
_ZN8Box_cmapC2Ev:
  142|  1.18k|    Box_cmap() { set_short_type(fourcc("cmap")); }
_ZN8Box_pclrC2Ev:
  187|    651|    {
  188|    651|        set_short_type(fourcc("pclr"));
  189|    651|    }
_ZN8Box_j2kLC2Ev:
  275|    452|    Box_j2kL() { set_short_type(fourcc("j2kL")); }
_ZN8Box_j2kiC2Ev:
  533|     91|  {
  534|     91|    set_short_type(fourcc("j2ki"));
  535|     91|  }
_ZNK8Box_pclr15get_num_columnsEv:
  232|    502|    {
  233|    502|        return static_cast<uint8_t>(m_bitDepths.size());
  234|    502|    }

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

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

_Z25is_valid_component_formath:
   43|  2.49k|{
   44|  2.49k|  return format <= component_format_max_valid;
   45|  2.49k|}
_Z24is_valid_interleave_modeh:
   62|    637|{
   63|    637|  return interleave <= interleave_mode_max_valid;
   64|    637|}
_Z22is_valid_sampling_modeh:
   83|    639|{
   84|    639|  return sampling <= sampling_mode_max_valid;
   85|    639|}
_Z28is_predefined_component_typet:
   96|  5.44k|{
   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|  5.44k|  return type <= heif_cmpd_component_type_max_valid;
  ------------------
  |  |   29|  5.44k|#define heif_cmpd_component_type_max_valid heif_cmpd_component_type_key_black
  ------------------
  100|  5.44k|}
_ZN8Box_cmpd5parseER14BitstreamRangePK20heif_security_limits:
  144|    905|{
  145|    905|  uint32_t component_count = range.read32();
  146|       |
  147|    905|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (147:7): [True: 905, False: 0]
  |  Branch (147:33): [True: 48, False: 857]
  ------------------
  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|  9.15k|  for (unsigned int i = 0; i < component_count ; i++) {
  ------------------
  |  Branch (158:28): [True: 8.37k, False: 782]
  ------------------
  159|  8.37k|    if (range.eof()) {
  ------------------
  |  Branch (159:9): [True: 75, False: 8.29k]
  ------------------
  160|     75|      std::stringstream sstr;
  161|     75|      sstr << "cmpd box should contain " << component_count << " components, but box only contained "
  162|     75|           << i << " components";
  163|       |
  164|     75|      return {heif_error_Invalid_input,
  165|     75|              heif_suberror_End_of_data,
  166|     75|              sstr.str()
  167|     75|      };
  168|     75|    }
  169|       |
  170|  8.29k|    Component component;
  171|  8.29k|    component.component_type = range.read16();
  172|  8.29k|    if (component.component_type >= 0x8000) {
  ------------------
  |  Branch (172:9): [True: 1.99k, False: 6.30k]
  ------------------
  173|  1.99k|      component.component_type_uri = range.read_string();
  174|  1.99k|    }
  175|  6.30k|    else {
  176|  6.30k|      component.component_type_uri = std::string();
  177|  6.30k|    }
  178|  8.29k|    m_components.push_back(component);
  179|  8.29k|  }
  180|       |
  181|    782|  return range.get_error();
  182|    857|}
_ZN8Box_cmpd9Component23get_component_type_nameEt:
  185|  5.44k|{
  186|  5.44k|  std::stringstream sstr;
  187|       |
  188|  5.44k|  if (is_predefined_component_type(component_type)) {
  ------------------
  |  Branch (188:7): [True: 2.13k, False: 3.31k]
  ------------------
  189|  2.13k|    sstr << get_name(heif_cmpd_component_type(component_type), sNames_uncompressed_component_type) << "\n";
  190|  2.13k|  }
  191|  3.31k|  else {
  192|  3.31k|    sstr << "0x" << std::hex << component_type << std::dec << "\n";
  193|  3.31k|  }
  194|       |
  195|  5.44k|  return sstr.str();
  196|  5.44k|}
_ZNK8Box_cmpd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  207|    649|{
  208|    649|  Box::dump(sstr, indent, full_log);
  209|       |
  210|  5.44k|  for (const auto& component : m_components) {
  ------------------
  |  Branch (210:30): [True: 5.44k, False: 649]
  ------------------
  211|  5.44k|    sstr << indent << "component_type: " << component.get_component_type_name();
  212|       |
  213|  5.44k|    if (component.component_type >= 0x8000) {
  ------------------
  |  Branch (213:9): [True: 1.01k, False: 4.43k]
  ------------------
  214|  1.01k|      sstr << indent << "| component_type_uri: " << component.component_type_uri << "\n";
  215|  1.01k|    }
  216|  5.44k|  }
  217|       |
  218|    649|  return;
  219|    649|}
_ZN8Box_uncC5parseER14BitstreamRangePK20heif_security_limits:
  239|  4.08k|{
  240|  4.08k|  parse_full_box_header(range);
  241|       |
  242|  4.08k|  m_profile = range.read32();
  243|       |
  244|  4.08k|  if (get_version() == 1) {
  ------------------
  |  Branch (244:7): [True: 3.25k, False: 828]
  ------------------
  245|  3.25k|    switch (m_profile) {
  246|     66|      case fourcc("rgb3"):
  ------------------
  |  Branch (246:7): [True: 66, False: 3.18k]
  ------------------
  247|    132|      case fourcc("rgba"):
  ------------------
  |  Branch (247:7): [True: 66, False: 3.18k]
  ------------------
  248|    327|      case fourcc("abgr"):
  ------------------
  |  Branch (248:7): [True: 195, False: 3.05k]
  ------------------
  249|    521|      case fourcc("2vuy"):
  ------------------
  |  Branch (249:7): [True: 194, False: 3.05k]
  ------------------
  250|  1.06k|      case fourcc("yuv2"):
  ------------------
  |  Branch (250:7): [True: 547, False: 2.70k]
  ------------------
  251|  1.27k|      case fourcc("yvyu"):
  ------------------
  |  Branch (251:7): [True: 202, False: 3.05k]
  ------------------
  252|  1.33k|      case fourcc("vyuy"):
  ------------------
  |  Branch (252:7): [True: 66, False: 3.18k]
  ------------------
  253|  1.41k|      case fourcc("yuv1"):
  ------------------
  |  Branch (253:7): [True: 76, False: 3.17k]
  ------------------
  254|  1.60k|      case fourcc("v308"):
  ------------------
  |  Branch (254:7): [True: 194, False: 3.05k]
  ------------------
  255|  1.80k|      case fourcc("v408"):
  ------------------
  |  Branch (255:7): [True: 197, False: 3.05k]
  ------------------
  256|  1.88k|      case fourcc("y210"):
  ------------------
  |  Branch (256:7): [True: 81, False: 3.17k]
  ------------------
  257|  2.07k|      case fourcc("v410"):
  ------------------
  |  Branch (257:7): [True: 194, False: 3.05k]
  ------------------
  258|  2.27k|      case fourcc("v210"):
  ------------------
  |  Branch (258:7): [True: 195, False: 3.05k]
  ------------------
  259|  2.46k|      case fourcc("i420"):
  ------------------
  |  Branch (259:7): [True: 196, False: 3.05k]
  ------------------
  260|  2.53k|      case fourcc("nv12"):
  ------------------
  |  Branch (260:7): [True: 66, False: 3.18k]
  ------------------
  261|  2.60k|      case fourcc("nv21"):
  ------------------
  |  Branch (261:7): [True: 73, False: 3.17k]
  ------------------
  262|  2.68k|      case fourcc("yu22"):
  ------------------
  |  Branch (262:7): [True: 76, False: 3.17k]
  ------------------
  263|  2.75k|      case fourcc("yv22"):
  ------------------
  |  Branch (263:7): [True: 66, False: 3.18k]
  ------------------
  264|  2.81k|      case fourcc("yv20"):
  ------------------
  |  Branch (264:7): [True: 66, False: 3.18k]
  ------------------
  265|  2.81k|        break;
  266|    436|      default:
  ------------------
  |  Branch (266:7): [True: 436, False: 2.81k]
  ------------------
  267|    436|        return Error{heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Unknown uncC v1 profile"};
  268|  3.25k|    }
  269|  3.25k|  } else if (get_version() == 0) {
  ------------------
  |  Branch (269:14): [True: 702, False: 126]
  ------------------
  270|       |
  271|    702|    uint32_t component_count = range.read32();
  272|       |
  273|    702|    if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (273:9): [True: 702, False: 0]
  |  Branch (273:35): [True: 45, False: 657]
  ------------------
  274|     45|      std::stringstream sstr;
  275|     45|      sstr << "Number of image components (" << component_count << ") exceeds security limit ("
  276|     45|           << limits->max_components << ")";
  277|       |
  278|     45|      return {heif_error_Invalid_input,
  279|     45|              heif_suberror_Security_limit_exceeded,
  280|     45|              sstr.str()};
  281|     45|    }
  282|       |
  283|  3.13k|    for (uint32_t i = 0; i < component_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (283:26): [True: 2.54k, False: 588]
  |  Branch (283:49): [True: 2.50k, False: 34]
  |  Branch (283:67): [True: 2.49k, False: 17]
  ------------------
  284|  2.49k|      Component component;
  285|  2.49k|      component.component_index = range.read16();
  286|  2.49k|      component.component_bit_depth = uint16_t(range.read8() + 1);
  287|  2.49k|      component.component_format = range.read8();
  288|  2.49k|      component.component_align_size = range.read8();
  289|  2.49k|      m_components.push_back(component);
  290|       |
  291|  2.49k|      if (!is_valid_component_format(component.component_format)) {
  ------------------
  |  Branch (291:11): [True: 13, False: 2.47k]
  ------------------
  292|     13|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid component format"};
  293|     13|      }
  294|       |
  295|       |      // When component_align_size != 0, the component is padded up to that many bytes.
  296|       |      // It therefore must be large enough to hold the component's bit depth; otherwise
  297|       |      // the decoder computes a negative pad-bits count and shifts by a negative amount.
  298|  2.47k|      if (component.component_align_size != 0 &&
  ------------------
  |  Branch (298:11): [True: 901, False: 1.57k]
  ------------------
  299|    901|          uint32_t(component.component_align_size) * 8 < component.component_bit_depth) {
  ------------------
  |  Branch (299:11): [True: 5, False: 896]
  ------------------
  300|      5|        std::stringstream sstr;
  301|      5|        sstr << "Component alignment (" << int(component.component_align_size)
  302|      5|             << " bytes) is too small for component bit depth (" << component.component_bit_depth << " bits)";
  303|      5|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, sstr.str()};
  304|      5|      }
  305|  2.47k|    }
  306|       |
  307|    639|    m_sampling_type = range.read8();
  308|    639|    if (!is_valid_sampling_mode(m_sampling_type)) {
  ------------------
  |  Branch (308:9): [True: 2, False: 637]
  ------------------
  309|      2|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid sampling mode"};
  310|      2|    }
  311|       |
  312|    637|    m_interleave_type = range.read8();
  313|    637|    if (!is_valid_interleave_mode(m_interleave_type)) {
  ------------------
  |  Branch (313:9): [True: 5, False: 632]
  ------------------
  314|      5|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid interleave mode"};
  315|      5|    }
  316|       |
  317|    632|    m_block_size = range.read8();
  318|       |
  319|    632|    uint8_t flags = range.read8();
  320|    632|    m_components_little_endian = !!(flags & 0x80);
  321|    632|    m_block_pad_lsb = !!(flags & 0x40);
  322|    632|    m_block_little_endian = !!(flags & 0x20);
  323|    632|    m_block_reversed = !!(flags & 0x10);
  324|    632|    m_pad_unknown = !!(flags & 0x08);
  325|       |
  326|    632|    m_pixel_size = range.read32();
  327|       |
  328|    632|    if (limits->version >= 4 &&
  ------------------
  |  Branch (328:9): [True: 632, False: 0]
  ------------------
  329|    632|        limits->max_iso23001_17_pixel_size_bytes != 0 &&
  ------------------
  |  Branch (329:9): [True: 632, False: 0]
  ------------------
  330|    632|        m_pixel_size > limits->max_iso23001_17_pixel_size_bytes) {
  ------------------
  |  Branch (330:9): [True: 6, False: 626]
  ------------------
  331|      6|      std::stringstream sstr;
  332|      6|      sstr << "uncC pixel_size (" << m_pixel_size << " bytes) exceeds security limit of "
  333|      6|           << limits->max_iso23001_17_pixel_size_bytes << " bytes";
  334|      6|      return {heif_error_Memory_allocation_error,
  335|      6|              heif_suberror_Security_limit_exceeded,
  336|      6|              sstr.str()};
  337|      6|    }
  338|       |
  339|    626|    m_row_align_size = range.read32();
  340|       |
  341|    626|    m_tile_align_size = range.read32();
  342|       |
  343|    626|    uint32_t num_tile_cols_minus_one = range.read32();
  344|    626|    uint32_t num_tile_rows_minus_one = range.read32();
  345|       |
  346|       |    // The field is stored as `count - 1`, so 0xFFFFFFFF would mean 2^32 tiles,
  347|       |    // which we cannot represent in our uint32 m_num_tile_cols/rows. Reject this
  348|       |    // before the security-limit check so that disabling the security limit does
  349|       |    // not silently turn this into a divide-by-zero in get_heif_image_tiling().
  350|    626|    if (num_tile_cols_minus_one == 0xFFFFFFFF || num_tile_rows_minus_one == 0xFFFFFFFF) {
  ------------------
  |  Branch (350:9): [True: 1, False: 625]
  |  Branch (350:50): [True: 1, False: 624]
  ------------------
  351|      2|      return {heif_error_Unsupported_feature,
  352|      2|              heif_suberror_Invalid_parameter_value,
  353|      2|              "uncC num_tile_cols/rows_minus_one of 0xFFFFFFFF (2^32 tiles) exceeds the supported range"};
  354|      2|    }
  355|       |
  356|    624|    if (limits->max_number_of_tiles &&
  ------------------
  |  Branch (356:9): [True: 624, False: 0]
  ------------------
  357|    624|        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 (357:9): [True: 32, False: 592]
  ------------------
  358|     32|      std::stringstream sstr;
  359|     32|      sstr << "Tiling size "
  360|     32|           << ((uint64_t)num_tile_cols_minus_one + 1) << " x " << ((uint64_t)num_tile_rows_minus_one + 1)
  361|     32|           << " exceeds the maximum allowed number " << limits->max_number_of_tiles << " set as security limit";
  362|     32|      return {heif_error_Memory_allocation_error,
  363|     32|              heif_suberror_Security_limit_exceeded,
  364|     32|              sstr.str()};
  365|     32|    }
  366|       |
  367|    592|    m_num_tile_cols = num_tile_cols_minus_one + 1;
  368|    592|    m_num_tile_rows = num_tile_rows_minus_one + 1;
  369|    592|  }
  370|       |
  371|  3.53k|  return range.get_error();
  372|  4.08k|}
_ZNK8Box_uncC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  377|  3.23k|{
  378|  3.23k|  Box::dump(sstr, indent, full_log);
  379|       |
  380|  3.23k|  sstr << indent << "profile: " << m_profile;
  381|  3.23k|  if (m_profile != 0) {
  ------------------
  |  Branch (381:7): [True: 2.96k, False: 277]
  ------------------
  382|  2.96k|    sstr << " (" << fourcc_to_string(m_profile) << ")";
  383|  2.96k|  }
  384|  3.23k|  sstr << "\n";
  385|  3.23k|  if (get_version() == 0) {
  ------------------
  |  Branch (385:7): [True: 523, False: 2.71k]
  ------------------
  386|  1.43k|    for (const auto& component : m_components) {
  ------------------
  |  Branch (386:32): [True: 1.43k, False: 523]
  ------------------
  387|  1.43k|      sstr << indent << "component_index: " << component.component_index << "\n";
  388|  1.43k|      indent++;
  389|  1.43k|      sstr << indent << "component_bit_depth: " << (int) component.component_bit_depth << "\n";
  390|  1.43k|      sstr << indent << "component_format: " << get_name(heif_uncompressed_component_format(component.component_format), sNames_uncompressed_component_format) << "\n";
  391|  1.43k|      sstr << indent << "component_align_size: " << (int) component.component_align_size << "\n";
  392|  1.43k|      indent--;
  393|  1.43k|    }
  394|       |
  395|    523|    sstr << indent << "sampling_type: " << get_name(heif_uncompressed_sampling_mode(m_sampling_type), sNames_uncompressed_sampling_mode) << "\n";
  396|       |
  397|    523|    sstr << indent << "interleave_type: " << get_name(heif_uncompressed_interleave_mode(m_interleave_type), sNames_uncompressed_interleave_mode) << "\n";
  398|       |
  399|    523|    sstr << indent << "block_size: " << (int) m_block_size << "\n";
  400|       |
  401|    523|    sstr << indent << "components_little_endian: " << m_components_little_endian << "\n";
  402|    523|    sstr << indent << "block_pad_lsb: " << m_block_pad_lsb << "\n";
  403|    523|    sstr << indent << "block_little_endian: " << m_block_little_endian << "\n";
  404|    523|    sstr << indent << "block_reversed: " << m_block_reversed << "\n";
  405|    523|    sstr << indent << "pad_unknown: " << m_pad_unknown << "\n";
  406|       |
  407|    523|    sstr << indent << "pixel_size: " << m_pixel_size << "\n";
  408|       |
  409|    523|    sstr << indent << "row_align_size: " << m_row_align_size << "\n";
  410|       |
  411|    523|    sstr << indent << "tile_align_size: " << m_tile_align_size << "\n";
  412|       |
  413|    523|    sstr << indent << "num_tile_cols: " << m_num_tile_cols << "\n";
  414|       |
  415|    523|    sstr << indent << "num_tile_rows: " << m_num_tile_rows << "\n";
  416|    523|  }
  417|  3.23k|  return;
  418|  3.23k|}
_ZN8Box_cmpC5parseER14BitstreamRangePK20heif_security_limits:
  748|    634|{
  749|    634|  parse_full_box_header(range);
  750|       |
  751|    634|  if (get_version() != 0) {
  ------------------
  |  Branch (751:7): [True: 1, False: 633]
  ------------------
  752|      1|    return unsupported_version_error("cmpC");
  753|      1|  }
  754|       |
  755|    633|  m_compression_type = range.read32();
  756|       |
  757|    633|  uint8_t unit_type = range.read8();
  758|    633|  if (unit_type > heif_cmpC_compressed_unit_type_image_pixel) {
  ------------------
  |  Branch (758:7): [True: 6, False: 627]
  ------------------
  759|      6|    return {heif_error_Invalid_input,
  760|      6|            heif_suberror_Unsupported_parameter,
  761|      6|            "Unsupported cmpC compressed unit type"};
  762|    627|  };
  763|       |
  764|    627|  m_compressed_unit_type = static_cast<heif_cmpC_compressed_unit_type>(unit_type);
  765|       |
  766|    627|  return range.get_error();
  767|    633|}
_ZNK8Box_cmpC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  771|    402|{
  772|    402|  Box::dump(sstr, indent, full_log);
  773|    402|  sstr << indent << "compression_type: " << fourcc_to_string(m_compression_type) << "\n";
  774|    402|  sstr << indent << "compressed_entity_type: " << (int)m_compressed_unit_type << "\n";
  775|    402|  return;
  776|    402|}
_ZN8Box_icef5parseER14BitstreamRangePK20heif_security_limits:
  795|    850|{
  796|    850|  parse_full_box_header(range);
  797|       |
  798|    850|  if (get_version() != 0) {
  ------------------
  |  Branch (798:7): [True: 1, False: 849]
  ------------------
  799|      1|    return unsupported_version_error("icef");
  800|      1|  }
  801|    849|  uint8_t codes = range.read8();
  802|    849|  uint8_t unit_offset_code = (codes & 0b11100000) >> 5;
  803|    849|  uint8_t unit_size_code = (codes & 0b00011100) >> 2;
  804|    849|  uint32_t num_compressed_units = range.read32();
  805|    849|  uint64_t implied_offset = 0;
  806|       |
  807|    849|  if (unit_offset_code > 4) {
  ------------------
  |  Branch (807:7): [True: 1, False: 848]
  ------------------
  808|      1|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit offset code"};
  809|      1|  }
  810|       |
  811|    848|  if (unit_size_code > 4) {
  ------------------
  |  Branch (811:7): [True: 1, False: 847]
  ------------------
  812|      1|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit size code"};
  813|      1|  }
  814|       |
  815|       |  // --- precompute fields lengths
  816|       |
  817|    847|  uint8_t unit_offset_bits = unit_offset_bits_table[unit_offset_code];
  818|    847|  uint8_t unit_size_bits = unit_size_bits_table[unit_size_code];
  819|       |
  820|       |  // --- check if box is large enough for all the data
  821|       |
  822|       |  // range.get_remaining_bytes() is bounded by the real file size: Box::read() rejects any box whose
  823|       |  // declared size exceeds either the bytes actually available in the file (wait_for_available_bytes())
  824|       |  // or the parent box's remaining bytes. So this check already prevents an unbounded allocation:
  825|       |  // num_compressed_units cannot exceed the bytes present in the file.
  826|       |  // It is, however, not sufficient on its own. With unit_offset_code==0 and unit_size_code==0 a unit
  827|       |  // occupies only 1 byte in the file but allocates a 16-byte CompressedUnitInfo, a ~16x amplification
  828|       |  // that bypasses the configured memory budget. The alloc() below therefore additionally enforces the
  829|       |  // security limits (mirroring Box_snuc).
  830|       |
  831|    847|  uint64_t data_size_bytes = static_cast<uint64_t>(num_compressed_units) * (unit_offset_bits + unit_size_bits) / 8;
  832|    847|  if (data_size_bytes > range.get_remaining_bytes()) {
  ------------------
  |  Branch (832:7): [True: 52, False: 795]
  ------------------
  833|     52|    uint64_t contained_units = range.get_remaining_bytes() / ((unit_offset_bits + unit_size_bits) * 8);
  834|     52|    std::stringstream sstr;
  835|     52|    sstr << "icef box declares " << num_compressed_units << " units, but only " << contained_units
  836|     52|         << " were contained in the file";
  837|     52|    return {heif_error_Invalid_input,
  838|     52|            heif_suberror_End_of_data,
  839|     52|            sstr.str()};
  840|     52|  }
  841|       |
  842|       |  // --- read box content
  843|       |
  844|    795|  if (auto err = m_memory_handle.alloc(num_compressed_units, sizeof(CompressedUnitInfo),
  ------------------
  |  Branch (844:12): [True: 0, False: 795]
  ------------------
  845|    795|                                       limits, "icef box compressed unit infos")) {
  846|      0|    return err;
  847|      0|  }
  848|       |
  849|    795|  m_unit_infos.resize(num_compressed_units);
  850|       |
  851|   505k|  for (uint32_t r = 0; r < num_compressed_units; r++) {
  ------------------
  |  Branch (851:24): [True: 504k, False: 790]
  ------------------
  852|   504k|    CompressedUnitInfo unitInfo;
  853|   504k|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (853:9): [True: 503k, False: 437]
  ------------------
  854|   503k|      unitInfo.unit_offset = implied_offset;
  855|   503k|    } else {
  856|    437|      unitInfo.unit_offset = range.read_uint(unit_offset_bits);
  857|    437|    }
  858|       |
  859|   504k|    unitInfo.unit_size = range.read_uint(unit_size_bits);
  860|       |
  861|       |    // Reject unit_offset + unit_size wrapping past the 64 bit range.
  862|   504k|    if (unitInfo.unit_size >= UINT64_MAX - unitInfo.unit_offset) {
  ------------------
  |  Branch (862:9): [True: 5, False: 504k]
  ------------------
  863|      5|      return {heif_error_Invalid_input,
  864|      5|              heif_suberror_Invalid_parameter_value,
  865|      5|              "icef unit offset + size exceeds 64 bit range"};
  866|      5|    }
  867|       |
  868|       |    // implied_offset is only used as unit_offset when unit_offset_code==0.
  869|       |    // Accumulating it for other offset codes would be unused and could overflow, so only do it if needed.
  870|   504k|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (870:9): [True: 503k, False: 435]
  ------------------
  871|   503k|      implied_offset += unitInfo.unit_size;
  872|   503k|    }
  873|       |
  874|   504k|    if (range.get_error() != Error::Ok) {
  ------------------
  |  Branch (874:9): [True: 0, False: 504k]
  ------------------
  875|      0|      return range.get_error();
  876|      0|    }
  877|       |
  878|   504k|    m_unit_infos[r] = unitInfo;
  879|   504k|  }
  880|       |
  881|    790|  return range.get_error();
  882|    795|}
_ZNK8Box_icef4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  886|    755|{
  887|    755|  Box::dump(sstr, indent, full_log);
  888|    755|  sstr << indent << "num_compressed_units: " << m_unit_infos.size() << "\n";
  889|   503k|  for (CompressedUnitInfo unit_info: m_unit_infos) {
  ------------------
  |  Branch (889:36): [True: 503k, False: 755]
  ------------------
  890|   503k|    sstr << indent << "unit_offset: " << unit_info.unit_offset << ", unit_size: " << unit_info.unit_size << "\n";
  891|   503k|  }
  892|    755|  return;
  893|    755|}
_ZN8Box_cpat5parseER14BitstreamRangePK20heif_security_limits:
 1010|    567|{
 1011|    567|  parse_full_box_header(range);
 1012|       |
 1013|    567|  if (get_version() != 0) {
  ------------------
  |  Branch (1013:7): [True: 2, False: 565]
  ------------------
 1014|      2|    return unsupported_version_error("cpat");
 1015|      2|  }
 1016|       |
 1017|    565|  m_pattern.pattern_width = range.read16();
 1018|    565|  m_pattern.pattern_height = range.read16();
 1019|       |
 1020|    565|  if (m_pattern.pattern_width == 0 || m_pattern.pattern_height == 0) {
  ------------------
  |  Branch (1020:7): [True: 5, False: 560]
  |  Branch (1020:39): [True: 6, False: 554]
  ------------------
 1021|     11|    return {heif_error_Invalid_input,
 1022|     11|            heif_suberror_Invalid_parameter_value,
 1023|     11|            "Zero Bayer pattern size."};
 1024|     11|  }
 1025|       |
 1026|    554|  auto max_bayer_pattern_size = limits->max_bayer_pattern_pixels;
 1027|    554|  if (max_bayer_pattern_size && m_pattern.pattern_height > max_bayer_pattern_size / m_pattern.pattern_width) {
  ------------------
  |  Branch (1027:7): [True: 554, False: 0]
  |  Branch (1027:33): [True: 14, False: 540]
  ------------------
 1028|     14|    return {heif_error_Invalid_input,
 1029|     14|            heif_suberror_Security_limit_exceeded,
 1030|     14|            "Maximum Bayer pattern size exceeded."};
 1031|     14|  }
 1032|       |
 1033|    540|  size_t num_pixels = size_t{m_pattern.pattern_width} * m_pattern.pattern_height;
 1034|    540|  m_pattern.pixels.resize(num_pixels);
 1035|       |
 1036|  2.97k|  for (size_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1036:22): [True: 2.43k, False: 540]
  ------------------
 1037|  2.43k|    BayerPatternPixelCmpd pixel{};
 1038|  2.43k|    pixel.cmpd_index = range.read32();
 1039|  2.43k|    pixel.component_gain = range.read_float32();
 1040|  2.43k|    m_pattern.pixels[i] = pixel;
 1041|  2.43k|  }
 1042|       |
 1043|    540|  return range.get_error();
 1044|    554|}
_ZNK8Box_cpat4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1048|    429|{
 1049|       |
 1050|    429|  FullBox::dump(sstr, indent, full_log);
 1051|    429|  sstr << indent << "pattern_width: " << get_pattern_width() << "\n";
 1052|    429|  sstr << indent << "pattern_height: " << get_pattern_height() << "\n";
 1053|       |
 1054|  1.22k|  for (const auto& pixel : m_pattern.pixels) {
  ------------------
  |  Branch (1054:26): [True: 1.22k, False: 429]
  ------------------
 1055|  1.22k|    sstr << indent << "component index: " << pixel.cmpd_index << ", gain: " << pixel.component_gain << "\n";
 1056|  1.22k|  }
 1057|    429|  return;
 1058|    429|}
_ZN8Box_splz5parseER14BitstreamRangePK20heif_security_limits:
 1086|  1.33k|{
 1087|  1.33k|  parse_full_box_header(range);
 1088|       |
 1089|  1.33k|  if (get_version() != 0) {
  ------------------
  |  Branch (1089:7): [True: 7, False: 1.32k]
  ------------------
 1090|      7|    return unsupported_version_error("splz");
 1091|      7|  }
 1092|       |
 1093|  1.32k|  uint32_t component_count = range.read32();
 1094|  1.32k|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (1094:7): [True: 1.32k, False: 0]
  |  Branch (1094:33): [True: 14, False: 1.31k]
  ------------------
 1095|     14|    return {heif_error_Invalid_input,
 1096|     14|            heif_suberror_Security_limit_exceeded,
 1097|     14|            "Number of components in splz box exceeds the security limits."};
 1098|     14|  }
 1099|       |
 1100|  1.31k|  m_pattern.component_ids.resize(component_count);
 1101|  4.43k|  for (uint32_t i = 0; i < component_count; i++) {
  ------------------
  |  Branch (1101:24): [True: 3.11k, False: 1.31k]
  ------------------
 1102|  3.11k|    m_pattern.component_ids[i] = range.read32();
 1103|  3.11k|  }
 1104|       |
 1105|  1.31k|  m_pattern.pattern_width = range.read16();
 1106|  1.31k|  m_pattern.pattern_height = range.read16();
 1107|       |
 1108|  1.31k|  if (m_pattern.pattern_width == 0 || m_pattern.pattern_height == 0) {
  ------------------
  |  Branch (1108:7): [True: 16, False: 1.29k]
  |  Branch (1108:39): [True: 6, False: 1.29k]
  ------------------
 1109|     22|    return {heif_error_Invalid_input,
 1110|     22|            heif_suberror_Invalid_parameter_value,
 1111|     22|            "Zero polarization pattern size."};
 1112|     22|  }
 1113|       |
 1114|  1.29k|  auto max_pattern_size = limits->max_bayer_pattern_pixels;
 1115|  1.29k|  if (max_pattern_size && m_pattern.pattern_height > max_pattern_size / m_pattern.pattern_width) {
  ------------------
  |  Branch (1115:7): [True: 1.29k, False: 0]
  |  Branch (1115:27): [True: 11, False: 1.28k]
  ------------------
 1116|     11|    return {heif_error_Invalid_input,
 1117|     11|            heif_suberror_Security_limit_exceeded,
 1118|     11|            "Maximum polarization pattern size exceeded."};
 1119|     11|  }
 1120|       |
 1121|  1.28k|  size_t num_pixels = size_t{m_pattern.pattern_width} * m_pattern.pattern_height;
 1122|  1.28k|  m_pattern.polarization_angles.resize(num_pixels);
 1123|       |
 1124|  42.0k|  for (size_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1124:22): [True: 40.7k, False: 1.28k]
  ------------------
 1125|  40.7k|    m_pattern.polarization_angles[i] = range.read_float32();
 1126|  40.7k|  }
 1127|       |
 1128|  1.28k|  return range.get_error();
 1129|  1.29k|}
_ZNK8Box_splz4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1133|    808|{
 1134|       |
 1135|    808|  FullBox::dump(sstr, indent, full_log);
 1136|       |
 1137|    808|  sstr << indent << "component_count: " << m_pattern.component_ids.size() << "\n";
 1138|  2.48k|  for (size_t i = 0; i < m_pattern.component_ids.size(); i++) {
  ------------------
  |  Branch (1138:22): [True: 1.67k, False: 808]
  ------------------
 1139|  1.67k|    sstr << indent << "  component_index[" << i << "]: " << m_pattern.component_ids[i] << "\n";
 1140|  1.67k|  }
 1141|       |
 1142|    808|  sstr << indent << "pattern_width: " << m_pattern.pattern_width << "\n";
 1143|    808|  sstr << indent << "pattern_height: " << m_pattern.pattern_height << "\n";
 1144|       |
 1145|  10.6k|  for (uint16_t y = 0; y < m_pattern.pattern_height; y++) {
  ------------------
  |  Branch (1145:24): [True: 9.84k, False: 808]
  ------------------
 1146|  46.3k|    for (uint16_t x = 0; x < m_pattern.pattern_width; x++) {
  ------------------
  |  Branch (1146:26): [True: 36.5k, False: 9.84k]
  ------------------
 1147|  36.5k|      float angle = m_pattern.polarization_angles[y * m_pattern.pattern_width + x];
 1148|  36.5k|      if (heif_polarization_angle_is_no_filter(angle)) {
  ------------------
  |  Branch (1148:11): [True: 1.15k, False: 35.3k]
  ------------------
 1149|  1.15k|        sstr << indent << "  [" << x << "," << y << "]: no filter\n";
 1150|  1.15k|      }
 1151|  35.3k|      else {
 1152|  35.3k|        sstr << indent << "  [" << x << "," << y << "]: " << angle << " degrees\n";
 1153|  35.3k|      }
 1154|  36.5k|    }
 1155|  9.84k|  }
 1156|       |
 1157|    808|  return;
 1158|    808|}
_ZN8Box_sbpm5parseER14BitstreamRangePK20heif_security_limits:
 1190|    476|{
 1191|    476|  parse_full_box_header(range);
 1192|       |
 1193|    476|  if (get_version() != 0) {
  ------------------
  |  Branch (1193:7): [True: 8, False: 468]
  ------------------
 1194|      8|    return unsupported_version_error("sbpm");
 1195|      8|  }
 1196|       |
 1197|    468|  uint32_t component_count = range.read32();
 1198|       |
 1199|    468|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (1199:7): [True: 468, False: 0]
  |  Branch (1199:33): [True: 39, False: 429]
  ------------------
 1200|     39|    return {heif_error_Invalid_input,
 1201|     39|            heif_suberror_Security_limit_exceeded,
 1202|     39|            "sbpm component_count exceeds security limit."};
 1203|     39|  }
 1204|       |
 1205|    429|  m_map.component_ids.resize(component_count);
 1206|  2.45k|  for (uint32_t i = 0; i < component_count; i++) {
  ------------------
  |  Branch (1206:24): [True: 2.02k, False: 429]
  ------------------
 1207|  2.02k|    m_map.component_ids[i] = range.read32();
 1208|  2.02k|  }
 1209|       |
 1210|    429|  uint8_t flags = range.read8();
 1211|    429|  m_map.correction_applied = !!(flags & 0x80);
 1212|       |
 1213|    429|  uint32_t num_bad_rows = range.read32();
 1214|    429|  uint32_t num_bad_cols = range.read32();
 1215|    429|  uint32_t num_bad_pixels = range.read32();
 1216|       |
 1217|       |  // Security check: limit total number of entries
 1218|    429|  uint64_t total_entries = static_cast<uint64_t>(num_bad_rows) + num_bad_cols + num_bad_pixels;
 1219|    429|  if (limits->max_bad_pixels && total_entries > limits->max_bad_pixels) {
  ------------------
  |  Branch (1219:7): [True: 429, False: 0]
  |  Branch (1219:33): [True: 4, False: 425]
  ------------------
 1220|      4|    return {heif_error_Invalid_input,
 1221|      4|            heif_suberror_Security_limit_exceeded,
 1222|      4|            "sbpm total bad pixel entries exceed security limit."};
 1223|      4|  }
 1224|       |
 1225|    425|  m_map.bad_rows.resize(num_bad_rows);
 1226|  3.46k|  for (uint32_t i = 0; i < num_bad_rows; i++) {
  ------------------
  |  Branch (1226:24): [True: 3.03k, False: 425]
  ------------------
 1227|  3.03k|    m_map.bad_rows[i] = range.read32();
 1228|  3.03k|  }
 1229|       |
 1230|    425|  m_map.bad_columns.resize(num_bad_cols);
 1231|  3.79k|  for (uint32_t i = 0; i < num_bad_cols; i++) {
  ------------------
  |  Branch (1231:24): [True: 3.37k, False: 425]
  ------------------
 1232|  3.37k|    m_map.bad_columns[i] = range.read32();
 1233|  3.37k|  }
 1234|       |
 1235|    425|  m_map.bad_pixels.resize(num_bad_pixels);
 1236|  3.13k|  for (uint32_t i = 0; i < num_bad_pixels; i++) {
  ------------------
  |  Branch (1236:24): [True: 2.71k, False: 425]
  ------------------
 1237|  2.71k|    m_map.bad_pixels[i].row = range.read32();
 1238|  2.71k|    m_map.bad_pixels[i].column = range.read32();
 1239|  2.71k|  }
 1240|       |
 1241|    425|  return range.get_error();
 1242|    429|}
_ZNK8Box_sbpm4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1246|    361|{
 1247|       |
 1248|    361|  FullBox::dump(sstr, indent, full_log);
 1249|       |
 1250|    361|  sstr << indent << "component_count: " << m_map.component_ids.size() << "\n";
 1251|  1.01k|  for (size_t i = 0; i < m_map.component_ids.size(); i++) {
  ------------------
  |  Branch (1251:22): [True: 656, False: 361]
  ------------------
 1252|    656|    sstr << indent << "  component_index[" << i << "]: " << m_map.component_ids[i] << "\n";
 1253|    656|  }
 1254|       |
 1255|    361|  sstr << indent << "correction_applied: " << m_map.correction_applied << "\n";
 1256|       |
 1257|    361|  sstr << indent << "num_bad_rows: " << m_map.bad_rows.size() << "\n";
 1258|  1.04k|  for (size_t i = 0; i < m_map.bad_rows.size(); i++) {
  ------------------
  |  Branch (1258:22): [True: 685, False: 361]
  ------------------
 1259|    685|    sstr << indent << "  bad_row[" << i << "]: " << m_map.bad_rows[i] << "\n";
 1260|    685|  }
 1261|       |
 1262|    361|  sstr << indent << "num_bad_columns: " << m_map.bad_columns.size() << "\n";
 1263|  1.12k|  for (size_t i = 0; i < m_map.bad_columns.size(); i++) {
  ------------------
  |  Branch (1263:22): [True: 767, False: 361]
  ------------------
 1264|    767|    sstr << indent << "  bad_column[" << i << "]: " << m_map.bad_columns[i] << "\n";
 1265|    767|  }
 1266|       |
 1267|    361|  sstr << indent << "num_bad_pixels: " << m_map.bad_pixels.size() << "\n";
 1268|  1.64k|  for (size_t i = 0; i < m_map.bad_pixels.size(); i++) {
  ------------------
  |  Branch (1268:22): [True: 1.28k, False: 361]
  ------------------
 1269|  1.28k|    sstr << indent << "  bad_pixel[" << i << "]: row=" << m_map.bad_pixels[i].row
 1270|  1.28k|         << ", column=" << m_map.bad_pixels[i].column << "\n";
 1271|  1.28k|  }
 1272|       |
 1273|    361|  return;
 1274|    361|}
_ZN8Box_snuc5parseER14BitstreamRangePK20heif_security_limits:
 1313|    412|{
 1314|    412|  parse_full_box_header(range);
 1315|       |
 1316|    412|  if (get_version() != 0) {
  ------------------
  |  Branch (1316:7): [True: 9, False: 403]
  ------------------
 1317|      9|    return unsupported_version_error("snuc");
 1318|      9|  }
 1319|       |
 1320|    403|  uint32_t component_count = range.read32();
 1321|       |
 1322|    403|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (1322:7): [True: 403, False: 0]
  |  Branch (1322:33): [True: 19, False: 384]
  ------------------
 1323|     19|    return {heif_error_Invalid_input,
 1324|     19|            heif_suberror_Security_limit_exceeded,
 1325|     19|            "snuc component_count exceeds security limit."};
 1326|     19|  }
 1327|       |
 1328|    384|  m_nuc.component_ids.resize(component_count);
 1329|  2.39k|  for (uint32_t i = 0; i < component_count; i++) {
  ------------------
  |  Branch (1329:24): [True: 2.01k, False: 384]
  ------------------
 1330|  2.01k|    m_nuc.component_ids[i] = range.read32();
 1331|  2.01k|  }
 1332|       |
 1333|    384|  uint8_t flags = range.read8();
 1334|    384|  m_nuc.nuc_is_applied = !!(flags & 0x80);
 1335|       |
 1336|    384|  m_nuc.image_width = range.read32();
 1337|    384|  m_nuc.image_height = range.read32();
 1338|       |
 1339|    384|  if (m_nuc.image_width == 0 || m_nuc.image_height == 0) {
  ------------------
  |  Branch (1339:7): [True: 16, False: 368]
  |  Branch (1339:33): [True: 30, False: 338]
  ------------------
 1340|     46|    return {heif_error_Invalid_input,
 1341|     46|            heif_suberror_Invalid_parameter_value,
 1342|     46|            "snuc image width and height must be non-zero."};
 1343|     46|  }
 1344|       |
 1345|    338|  uint64_t num_pixels = static_cast<uint64_t>(m_nuc.image_width) * m_nuc.image_height;
 1346|       |
 1347|    338|  if (limits->max_image_size_pixels && num_pixels > limits->max_image_size_pixels) {
  ------------------
  |  Branch (1347:7): [True: 338, False: 0]
  |  Branch (1347:40): [True: 92, False: 246]
  ------------------
 1348|     92|    return {heif_error_Invalid_input,
 1349|     92|            heif_suberror_Security_limit_exceeded,
 1350|     92|            "snuc image dimensions exceed security limit."};
 1351|     92|  }
 1352|       |
 1353|    246|  Error err = m_memory_handle.alloc(num_pixels, 2 * sizeof(float), limits, "snuc box");
 1354|    246|  if (err) {
  ------------------
  |  Branch (1354:7): [True: 8, False: 238]
  ------------------
 1355|      8|    return err;
 1356|      8|  }
 1357|       |
 1358|    238|  m_nuc.nuc_gains.resize(num_pixels);
 1359|   462M|  for (uint64_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1359:24): [True: 462M, False: 238]
  ------------------
 1360|   462M|    m_nuc.nuc_gains[i] = range.read_float32();
 1361|   462M|  }
 1362|       |
 1363|    238|  m_nuc.nuc_offsets.resize(num_pixels);
 1364|   462M|  for (uint64_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1364:24): [True: 462M, False: 238]
  ------------------
 1365|   462M|    m_nuc.nuc_offsets[i] = range.read_float32();
 1366|   462M|  }
 1367|       |
 1368|    238|  return range.get_error();
 1369|    246|}
_ZNK8Box_snuc4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1373|    216|{
 1374|       |
 1375|    216|  FullBox::dump(sstr, indent, full_log);
 1376|       |
 1377|    216|  sstr << indent << "component_count: " << m_nuc.component_ids.size() << "\n";
 1378|    977|  for (size_t i = 0; i < m_nuc.component_ids.size(); i++) {
  ------------------
  |  Branch (1378:22): [True: 761, False: 216]
  ------------------
 1379|    761|    sstr << indent << "  component_index[" << i << "]: " << m_nuc.component_ids[i] << "\n";
 1380|    761|  }
 1381|       |
 1382|    216|  sstr << indent << "nuc_is_applied: " << m_nuc.nuc_is_applied << "\n";
 1383|    216|  sstr << indent << "image_width: " << m_nuc.image_width << "\n";
 1384|    216|  sstr << indent << "image_height: " << m_nuc.image_height << "\n";
 1385|       |
 1386|    216|  uint64_t num_pixels = static_cast<uint64_t>(m_nuc.image_width) * m_nuc.image_height;
 1387|    216|  sstr << indent << "nuc_gains: " << num_pixels << " values\n";
 1388|    216|  sstr << indent << "nuc_offsets: " << num_pixels << " values\n";
 1389|       |
 1390|    216|  return;
 1391|    216|}
_ZN8Box_cloc5parseER14BitstreamRangePK20heif_security_limits:
 1424|    374|{
 1425|    374|  parse_full_box_header(range);
 1426|       |
 1427|    374|  if (get_version() != 0) {
  ------------------
  |  Branch (1427:7): [True: 7, False: 367]
  ------------------
 1428|      7|    return unsupported_version_error("cloc");
 1429|      7|  }
 1430|       |
 1431|    367|  m_chroma_location = range.read8();
 1432|       |
 1433|    367|  if (m_chroma_location > 6) {
  ------------------
  |  Branch (1433:7): [True: 7, False: 360]
  ------------------
 1434|      7|    return {heif_error_Invalid_input,
 1435|      7|            heif_suberror_Invalid_parameter_value,
 1436|      7|            "cloc chroma_location value out of range (must be 0-6)."};
 1437|      7|  }
 1438|       |
 1439|    360|  return range.get_error();
 1440|    367|}
_ZNK8Box_cloc4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1444|    272|{
 1445|       |
 1446|    272|  FullBox::dump(sstr, indent, full_log);
 1447|       |
 1448|    272|  static const char* location_names[] = {
 1449|    272|    "h=0,   v=0.5",   // 0
 1450|    272|    "h=0.5, v=0.5",   // 1
 1451|    272|    "h=0,   v=0",     // 2
 1452|    272|    "h=0.5, v=0",     // 3
 1453|    272|    "h=0,   v=1",     // 4
 1454|    272|    "h=0.5, v=1",     // 5
 1455|    272|    "Cr:0,0 / Cb:1,0" // 6
 1456|    272|  };
 1457|       |
 1458|    272|  sstr << indent << "chroma_location: " << static_cast<int>(m_chroma_location);
 1459|    272|  if (m_chroma_location <= 6) {
  ------------------
  |  Branch (1459:7): [True: 272, False: 0]
  ------------------
 1460|    272|    sstr << " (" << location_names[m_chroma_location] << ")";
 1461|    272|  }
 1462|    272|  sstr << "\n";
 1463|       |
 1464|    272|  return;
 1465|    272|}
_ZN30Box_gimi_component_content_ids5parseER14BitstreamRangePK20heif_security_limits:
 1481|  1.06k|{
 1482|  1.06k|  uint32_t number_of_components = range.read32();
 1483|       |
 1484|  1.06k|  if (limits->max_components && number_of_components > limits->max_components) {
  ------------------
  |  Branch (1484:7): [True: 1.06k, False: 0]
  |  Branch (1484:33): [True: 86, False: 978]
  ------------------
 1485|     86|    std::stringstream sstr;
 1486|     86|    sstr << "GIMI component content IDs box contains " << number_of_components
 1487|     86|         << " components, but security limit is set to " << limits->max_components << " components";
 1488|     86|    return {heif_error_Invalid_input,
 1489|     86|            heif_suberror_Security_limit_exceeded,
 1490|     86|            sstr.str()};
 1491|     86|  }
 1492|       |
 1493|  6.26k|  for (uint32_t i = 0; i < number_of_components; i++) {
  ------------------
  |  Branch (1493:24): [True: 5.46k, False: 802]
  ------------------
 1494|  5.46k|    if (range.eof()) {
  ------------------
  |  Branch (1494:9): [True: 176, False: 5.29k]
  ------------------
 1495|    176|      return {heif_error_Invalid_input,
 1496|    176|              heif_suberror_End_of_data,
 1497|    176|              "Not enough data for all component content IDs"};
 1498|    176|    }
 1499|  5.29k|    m_content_ids.push_back(range.read_string());
 1500|  5.29k|  }
 1501|       |
 1502|    802|  return range.get_error();
 1503|    978|}
_ZNK30Box_gimi_component_content_ids4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1523|    735|{
 1524|    735|  Box::dump(sstr, indent, full_log);
 1525|       |
 1526|  3.74k|  for (size_t i = 0; i < m_content_ids.size(); i++) {
  ------------------
  |  Branch (1526:22): [True: 3.01k, False: 735]
  ------------------
 1527|  3.01k|    sstr << indent << "[" << i << "] content ID: " << m_content_ids[i] << "\n";
 1528|  3.01k|  }
 1529|       |
 1530|    735|  return;
 1531|    735|}
_Z8get_nameI24heif_cmpd_component_typeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|  2.13k|{
  124|  2.13k|  auto iter = table.find(val);
  125|  2.13k|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 2.13k]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|  2.13k|  else {
  129|  2.13k|    return iter->second;
  130|  2.13k|  }
  131|  2.13k|}
_Z8get_nameI34heif_uncompressed_component_formatEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|  1.43k|{
  124|  1.43k|  auto iter = table.find(val);
  125|  1.43k|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 1.43k]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|  1.43k|  else {
  129|  1.43k|    return iter->second;
  130|  1.43k|  }
  131|  1.43k|}
_Z8get_nameI31heif_uncompressed_sampling_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|    523|{
  124|    523|  auto iter = table.find(val);
  125|    523|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 523]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    523|  else {
  129|    523|    return iter->second;
  130|    523|  }
  131|    523|}
_Z8get_nameI33heif_uncompressed_interleave_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|    523|{
  124|    523|  auto iter = table.find(val);
  125|    523|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 523]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    523|  else {
  129|    523|    return iter->second;
  130|    523|  }
  131|    523|}

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

_ZN8Box_vvcC5parseER14BitstreamRangePK20heif_security_limits:
   34|  2.10k|{
   35|  2.10k|  parse_full_box_header(range);
   36|       |
   37|  2.10k|  uint8_t byte;
   38|       |
   39|  2.10k|  auto& c = m_configuration; // abbreviation
   40|       |
   41|  2.10k|  byte = range.read8();
   42|       |
   43|  2.10k|  c.LengthSizeMinusOne = (byte >> 1) & 3;
   44|  2.10k|  c.ptl_present_flag = !!(byte & 1);
   45|       |
   46|  2.10k|  if (c.ptl_present_flag) {
  ------------------
  |  Branch (46:7): [True: 2.09k, False: 6]
  ------------------
   47|  2.09k|    uint16_t word = range.read16();
   48|  2.09k|    c.ols_idx = (word >> 7) & 0x1FF;
   49|  2.09k|    c.num_sublayers = (word >> 4) & 0x07;
   50|  2.09k|    c.constant_frame_rate = (word >> 2) & 0x03;
   51|  2.09k|    c.chroma_format_idc = word & 0x03;
   52|       |
   53|  2.09k|    byte = range.read8();
   54|  2.09k|    c.bit_depth_minus8 = (byte >> 5) & 0x07;
   55|       |
   56|       |    // VvcPTLRecord
   57|       |
   58|  2.09k|    auto& ptl = c.native_ptl; // abbreviation
   59|       |
   60|  2.09k|    byte = range.read8();
   61|  2.09k|    ptl.num_bytes_constraint_info = byte & 0x3f;
   62|       |
   63|  2.09k|    if (ptl.num_bytes_constraint_info == 0) {
  ------------------
  |  Branch (63:9): [True: 1, False: 2.09k]
  ------------------
   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.09k|    byte = range.read8();
   70|  2.09k|    ptl.general_profile_idc = (byte >> 1) & 0x7f;
   71|  2.09k|    ptl.general_tier_flag = (byte & 1);
   72|       |
   73|  2.09k|    ptl.general_level_idc = range.read8();
   74|       |
   75|  12.7k|    for (int i = 0; i < ptl.num_bytes_constraint_info; i++) {
  ------------------
  |  Branch (75:21): [True: 10.6k, False: 2.09k]
  ------------------
   76|  10.6k|      byte = range.read8();
   77|  10.6k|      if (i == 0) {
  ------------------
  |  Branch (77:11): [True: 2.09k, False: 8.55k]
  ------------------
   78|  2.09k|        ptl.ptl_frame_only_constraint_flag = (byte >> 7) & 1;
   79|  2.09k|        ptl.ptl_multi_layer_enabled_flag = (byte >> 6) & 1;
   80|  2.09k|        byte &= 0x3f;
   81|  2.09k|      }
   82|       |
   83|  10.6k|      ptl.general_constraint_info.push_back(byte);
   84|  10.6k|    }
   85|       |
   86|  2.09k|    if (c.num_sublayers > 1) {
  ------------------
  |  Branch (86:9): [True: 695, False: 1.39k]
  ------------------
   87|    695|      ptl.ptl_sublayer_level_present_flag.resize(c.num_sublayers - 1);
   88|       |
   89|    695|      byte = range.read8();
   90|    695|      uint8_t mask = 0x80;
   91|       |
   92|  4.56k|      for (int i = c.num_sublayers - 2; i >= 0; i--) {
  ------------------
  |  Branch (92:41): [True: 3.86k, False: 695]
  ------------------
   93|  3.86k|        ptl.ptl_sublayer_level_present_flag[i] = !!(byte & mask);
   94|  3.86k|        mask >>= 1;
   95|  3.86k|      }
   96|    695|    }
   97|       |
   98|  2.09k|    ptl.sublayer_level_idc.resize(c.num_sublayers);
   99|  2.09k|    if (c.num_sublayers > 0) {
  ------------------
  |  Branch (99:9): [True: 844, False: 1.25k]
  ------------------
  100|    844|      ptl.sublayer_level_idc[c.num_sublayers - 1] = ptl.general_level_idc;
  101|       |
  102|  4.71k|      for (int i = c.num_sublayers - 2; i >= 0; i--) {
  ------------------
  |  Branch (102:41): [True: 3.86k, False: 844]
  ------------------
  103|  3.86k|        if (ptl.ptl_sublayer_level_present_flag[i]) {
  ------------------
  |  Branch (103:13): [True: 1.24k, False: 2.62k]
  ------------------
  104|  1.24k|          ptl.sublayer_level_idc[i] = range.read8();
  105|  1.24k|        }
  106|  2.62k|        else {
  107|  2.62k|          ptl.sublayer_level_idc[i] = ptl.sublayer_level_idc[i + 1];
  108|  2.62k|        }
  109|  3.86k|      }
  110|    844|    }
  111|       |
  112|  2.09k|    uint8_t ptl_num_sub_profiles = range.read8();
  113|  4.14k|    for (int j=0; j < ptl_num_sub_profiles; j++) {
  ------------------
  |  Branch (113:19): [True: 2.05k, False: 2.09k]
  ------------------
  114|  2.05k|      ptl.general_sub_profile_idc.push_back(range.read32());
  115|  2.05k|    }
  116|       |
  117|       |
  118|       |    // remaining fields
  119|       |
  120|  2.09k|    c.max_picture_width = range.read16();
  121|  2.09k|    c.max_picture_height = range.read16();
  122|  2.09k|    c.avg_frame_rate = range.read16();
  123|  2.09k|  }
  124|      6|  else {
  125|      6|    return Error{
  126|      6|      heif_error_Unsupported_feature,
  127|      6|      heif_suberror_Unspecified,
  128|      6|      "Reading vvcC configuration with ptl_present_flag=0 is not supported."
  129|      6|    };
  130|      6|  }
  131|       |
  132|       |  // read NAL arrays
  133|       |
  134|  2.09k|  int nArrays = range.read8();
  135|       |
  136|  6.52k|  for (int i = 0; i < nArrays && !range.error(); i++) {
  ------------------
  |  Branch (136:19): [True: 4.49k, False: 2.02k]
  |  Branch (136:34): [True: 4.42k, False: 65]
  ------------------
  137|  4.42k|    byte = range.read8();
  138|       |
  139|  4.42k|    NalArray array;
  140|       |
  141|  4.42k|    array.m_array_completeness = (byte >> 7) & 1;
  142|  4.42k|    array.m_NAL_unit_type = (byte & 0x3F);
  143|       |
  144|  4.42k|    int nUnits = range.read16();
  145|  10.1k|    for (int u = 0; u < nUnits && !range.error(); u++) {
  ------------------
  |  Branch (145:21): [True: 5.77k, False: 4.36k]
  |  Branch (145:35): [True: 5.71k, False: 59]
  ------------------
  146|       |
  147|  5.71k|      std::vector<uint8_t> nal_unit;
  148|  5.71k|      int size = range.read16();
  149|  5.71k|      if (!size) {
  ------------------
  |  Branch (149:11): [True: 2.31k, False: 3.40k]
  ------------------
  150|       |        // Ignore empty NAL units.
  151|  2.31k|        continue;
  152|  2.31k|      }
  153|       |
  154|  3.40k|      if (range.prepare_read(size)) {
  ------------------
  |  Branch (154:11): [True: 3.36k, False: 32]
  ------------------
  155|  3.36k|        nal_unit.resize(size);
  156|  3.36k|        bool success = range.get_istream()->read((char*) nal_unit.data(), size);
  157|  3.36k|        if (!success) {
  ------------------
  |  Branch (157:13): [True: 0, False: 3.36k]
  ------------------
  158|      0|          return Error{heif_error_Invalid_input, heif_suberror_End_of_data, "error while reading hvcC box"};
  159|      0|        }
  160|  3.36k|      }
  161|       |
  162|  3.40k|      array.m_nal_units.push_back(std::move(nal_unit));
  163|  3.40k|    }
  164|       |
  165|  4.42k|    m_nal_array.push_back(std::move(array));
  166|  4.42k|  }
  167|       |
  168|  2.09k|  return range.get_error();
  169|  2.09k|}
_Z8NAL_nameh:
  356|  2.81k|{
  357|  2.81k|  switch (nal_type) {
  358|    215|    case 12: return "OPI";
  ------------------
  |  Branch (358:5): [True: 215, False: 2.59k]
  ------------------
  359|     16|    case 13: return "DCI";
  ------------------
  |  Branch (359:5): [True: 16, False: 2.79k]
  ------------------
  360|     13|    case 14: return "VPS";
  ------------------
  |  Branch (360:5): [True: 13, False: 2.80k]
  ------------------
  361|    210|    case 15: return "SPS";
  ------------------
  |  Branch (361:5): [True: 210, False: 2.60k]
  ------------------
  362|     46|    case 16: return "PPS";
  ------------------
  |  Branch (362:5): [True: 46, False: 2.76k]
  ------------------
  363|     27|    case 17: return "PREFIX_APS";
  ------------------
  |  Branch (363:5): [True: 27, False: 2.78k]
  ------------------
  364|    376|    case 18: return "SUFFIX_APS";
  ------------------
  |  Branch (364:5): [True: 376, False: 2.43k]
  ------------------
  365|     22|    case 19: return "PH";
  ------------------
  |  Branch (365:5): [True: 22, False: 2.79k]
  ------------------
  366|  1.88k|    default: return "?";
  ------------------
  |  Branch (366:5): [True: 1.88k, False: 925]
  ------------------
  367|  2.81k|  }
  368|  2.81k|}
_ZNK8Box_vvcC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  372|  1.34k|{
  373|  1.34k|  FullBox::dump(sstr, indent, full_log);
  374|       |
  375|  1.34k|  const auto& c = m_configuration; // abbreviation
  376|       |
  377|  1.34k|  sstr << indent << "NAL length size: " << ((int) c.LengthSizeMinusOne + 1) << "\n";
  378|  1.34k|  if (c.ptl_present_flag) {
  ------------------
  |  Branch (378:7): [True: 1.34k, False: 0]
  ------------------
  379|  1.34k|    const auto& ptl = c.native_ptl;
  380|  1.34k|    sstr << indent << "ols-index: " << c.ols_idx << "\n"
  381|  1.34k|         << indent << "num sublayers: " << ((int) c.num_sublayers) << "\n"
  382|  1.34k|         << indent << "constant frame rate: " << (c.constant_frame_rate == 1 ? "constant" : (c.constant_frame_rate == 2 ? "multi-layer" : "unknown")) << "\n"
  ------------------
  |  Branch (382:51): [True: 615, False: 732]
  |  Branch (382:94): [True: 29, False: 703]
  ------------------
  383|  1.34k|         << indent << "chroma-format: " << vvc_chroma_names[c.chroma_format_idc] << "\n"
  384|  1.34k|         << indent << "bit-depth: " << ((int) c.bit_depth_minus8 + 8) << "\n"
  385|  1.34k|         << indent << "max picture width:  " << c.max_picture_width << "\n"
  386|  1.34k|         << indent << "max picture height: " << c.max_picture_height << "\n";
  387|       |
  388|  1.34k|    sstr << indent << "general profile: " << ((int)ptl.general_profile_idc) << "\n"
  389|  1.34k|         << indent << "tier flag: " << ((int)ptl.general_tier_flag) << "\n"
  390|  1.34k|         << indent << "general level:" << ((int)ptl.general_level_idc) << "\n"
  391|  1.34k|         << indent << "ptl frame only constraint flag: " << ((int)ptl.ptl_frame_only_constraint_flag) << "\n"
  392|  1.34k|         << indent << "ptl multi layer enabled flag: " << ((int)ptl.ptl_multi_layer_enabled_flag) << "\n";
  393|  1.34k|  }
  394|       |
  395|       |
  396|  1.34k|  sstr << indent << "num of arrays: " << m_nal_array.size() << "\n";
  397|       |
  398|  1.34k|  sstr << indent << "config NALs:\n";
  399|  2.81k|  for (const auto& nal_array : m_nal_array) {
  ------------------
  |  Branch (399:30): [True: 2.81k, False: 1.34k]
  ------------------
  400|  2.81k|    indent++;
  401|  2.81k|    sstr << indent << "NAL type: " << ((int)nal_array.m_NAL_unit_type) << " (" << NAL_name(nal_array.m_NAL_unit_type) << ")\n";
  402|  2.81k|    sstr << indent << "array completeness: " << ((int)nal_array.m_array_completeness) << "\n";
  403|       |
  404|  2.81k|    for (const auto& nal : nal_array.m_nal_units) {
  ------------------
  |  Branch (404:26): [True: 2.10k, False: 2.81k]
  ------------------
  405|  2.10k|      indent++;
  406|  2.10k|      std::string ind = indent.get_string();
  407|  2.10k|      sstr << write_raw_data_as_hex(nal.data(), nal.size(), ind, ind);
  408|  2.10k|      indent--;
  409|  2.10k|    }
  410|  2.81k|    indent--;
  411|  2.81k|  }
  412|       |
  413|  1.34k|  return;
  414|  1.34k|}

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

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

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

_ZN27MetadataDecompressionBudget9set_limitEPKm:
   39|  15.0k|  void set_limit(const uint64_t* limit) { m_limit = limit; }

_ZN11HeifContextC2Ev:
  164|  15.0k|    : m_limits(initial_security_limits()),
  165|  15.0k|      m_memory_tracker(&m_limits)
  166|  15.0k|{
  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|  15.0k|  reset_to_empty_heif();
  171|  15.0k|}
_ZN11HeifContextD2Ev:
  175|  15.0k|{
  176|       |  // Break circular references between Images (when a faulty input image has circular image references)
  177|  15.0k|  for (auto& it : m_all_images) {
  ------------------
  |  Branch (177:17): [True: 0, False: 15.0k]
  ------------------
  178|      0|    std::shared_ptr<ImageItem> image = it.second;
  179|      0|    image->clear();
  180|      0|  }
  181|  15.0k|}
_ZN11HeifContext19reset_to_empty_heifEv:
  290|  15.0k|{
  291|  15.0k|  m_heif_file = std::make_shared<HeifFile>();
  292|  15.0k|  m_heif_file->set_security_limits(&m_limits);
  293|  15.0k|  m_heif_file->new_empty_file();
  294|       |
  295|  15.0k|  m_all_images.clear();
  296|  15.0k|  m_top_level_images.clear();
  297|  15.0k|  m_primary_image.reset();
  298|  15.0k|}
context.cc:_ZL23initial_security_limitsv:
  150|  15.0k|{
  151|  15.0k|  const char* security_limits_variable = getenv("LIBHEIF_SECURITY_LIMITS");
  152|       |
  153|  15.0k|  if (security_limits_variable && (strcmp(security_limits_variable, "off") == 0 ||
  ------------------
  |  Branch (153:7): [True: 0, False: 15.0k]
  |  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|  15.0k|  else {
  158|  15.0k|    return global_security_limits;
  159|  15.0k|  }
  160|  15.0k|}

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

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

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

_ZN8HeifFileC2Ev:
   68|  15.0k|{
   69|  15.0k|  m_file_layout = std::make_shared<FileLayout>();
   70|  15.0k|}
_ZN8HeifFileD2Ev:
   72|  15.0k|HeifFile::~HeifFile() = default;
_ZN8HeifFile14new_empty_fileEv:
  169|  15.0k|{
  170|       |  //m_input_stream.reset();
  171|  15.0k|  m_top_level_boxes.clear();
  172|       |
  173|  15.0k|  m_ftyp_box = std::make_shared<Box_ftyp>();
  174|  15.0k|  m_top_level_boxes.push_back(m_ftyp_box);
  175|  15.0k|}

_ZN8HeifFile19set_security_limitsEPK20heif_security_limits:
   70|  15.0k|  void set_security_limits(const heif_security_limits* limits) {
   71|  15.0k|    m_limits = limits;
   72|  15.0k|    m_metadata_decompression_budget.set_limit(limits ? &limits->max_total_memory : nullptr);
  ------------------
  |  Branch (72:47): [True: 15.0k, False: 0]
  ------------------
   73|  15.0k|  }

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

_ZN8Box_mskC5parseER14BitstreamRangePK20heif_security_limits:
   37|    636|{
   38|    636|  parse_full_box_header(range);
   39|    636|  m_bits_per_pixel = range.read8();
   40|    636|  return range.get_error();
   41|    636|}
_ZNK8Box_mskC4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
   44|    456|{
   45|    456|  Box::dump(sstr, indent, full_log);
   46|    456|  sstr << indent << "bits_per_pixel: " << ((int)m_bits_per_pixel) << "\n";
   47|    456|  return;
   48|    456|}

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

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

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

_ZNK6Indent10get_stringEv:
   27|  3.64M|{
   28|  3.64M|  std::stringstream sstr;
   29|       |
   30|  26.3M|  for (int i = 0; i < get_indent(); i++) {
  ------------------
  |  Branch (30:19): [True: 22.7M, False: 3.64M]
  ------------------
   31|  22.7M|    sstr << "| ";
   32|  22.7M|  }
   33|       |
   34|  3.64M|  return sstr.str();
   35|  3.64M|}
_Z21write_raw_data_as_hexPKhmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   41|  43.1k|{
   42|  43.1k|  std::stringstream sstr;
   43|       |
   44|  43.1k|  sstr << std::hex << std::setfill('0');
   45|       |
   46|  6.39M|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (46:22): [True: 6.35M, False: 43.1k]
  ------------------
   47|  6.35M|    if (i % 16 == 0) {
  ------------------
  |  Branch (47:9): [True: 414k, False: 5.93M]
  ------------------
   48|       |      // start of line
   49|       |
   50|   414k|      if (i == 0) {
  ------------------
  |  Branch (50:11): [True: 31.6k, False: 382k]
  ------------------
   51|  31.6k|        sstr << firstLineIndent;
   52|  31.6k|      }
   53|   382k|      else {
   54|   382k|        sstr << remainingLinesIndent;
   55|   382k|      }
   56|   414k|      sstr << std::setw(4) << i << ": "; // address
   57|   414k|    }
   58|  5.93M|    else if (i % 16 == 8) {
  ------------------
  |  Branch (58:14): [True: 391k, False: 5.54M]
  ------------------
   59|       |      // space in middle
   60|   391k|      sstr << "  ";
   61|   391k|    }
   62|  5.54M|    else {
   63|       |      // space between bytes
   64|  5.54M|      sstr << " ";
   65|  5.54M|    }
   66|       |
   67|  6.35M|    sstr << std::setw(2) << ((int) data[i]);
   68|       |
   69|  6.35M|    if (i % 16 == 15 || i == len - 1) {
  ------------------
  |  Branch (69:9): [True: 385k, False: 5.96M]
  |  Branch (69:25): [True: 28.7k, False: 5.93M]
  ------------------
   70|   414k|      sstr << "\n";
   71|   414k|    }
   72|  6.35M|  }
   73|       |
   74|  43.1k|  return sstr.str();
   75|  43.1k|}

_ZN6IndentC2Ev:
   46|   128k|  Indent() = default;
_ZNK6Indent10get_indentEv:
   48|  26.3M|  int get_indent() const { return m_indent; }
_ZN6IndentppEi:
   50|  59.9k|  void operator++(int) { m_indent++; }
_ZN6IndentmmEi:
   53|  59.9k|  {
   54|  59.9k|    m_indent--;
   55|  59.9k|    if (m_indent < 0) m_indent = 0;
  ------------------
  |  Branch (55:9): [True: 0, False: 59.9k]
  ------------------
   56|  59.9k|  }
_ZlsRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEERK6Indent:
   66|  3.55M|{
   67|  3.55M|  ostr << indent.get_string();
   68|  3.55M|  return ostr;
   69|  3.55M|}
_Z19reset_stream_formatRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE:
   77|  73.1k|{
   78|  73.1k|  ostr << std::dec << std::noboolalpha;
   79|  73.1k|  ostr.fill(' ');
   80|  73.1k|}
_Z24dump_reached_entry_limitRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEERK6Indentbmm:
   90|  42.1k|{
   91|  42.1k|  if (full_log || index < MAX_DUMP_ENTRIES) {
  ------------------
  |  Branch (91:7): [True: 0, False: 42.1k]
  |  Branch (91:19): [True: 41.7k, False: 332]
  ------------------
   92|  41.7k|    return false;
   93|  41.7k|  }
   94|       |
   95|    332|  ostr << indent << "... (" << (total - index) << " more)\n";
   96|    332|  return true;
   97|  42.1k|}

_ZN8Box_mini5parseER14BitstreamRangePK20heif_security_limits:
   42|  11.1k|{
   43|  11.1k|  uint64_t start_offset = range.get_istream()->get_position();
   44|  11.1k|  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|  11.1k|  MemoryHandle mini_data_handle;
   50|  11.1k|  if (auto err = mini_data_handle.alloc(length, limits, "MinimizedImageBox payload")) {
  ------------------
  |  Branch (50:12): [True: 0, False: 11.1k]
  ------------------
   51|      0|    return err;
   52|      0|  }
   53|       |
   54|  11.1k|  std::vector<uint8_t> mini_data(length);
   55|  11.1k|  if (!range.read(mini_data.data(), mini_data.size())) {
  ------------------
  |  Branch (55:7): [True: 0, False: 11.1k]
  ------------------
   56|      0|    return range.get_error();
   57|      0|  }
   58|       |
   59|  11.1k|  BitReader bits(mini_data.data(), mini_data.size());
   60|       |
   61|  11.1k|  m_version = bits.get_bits8(2);
   62|  11.1k|  m_explicit_codec_types_flag = bits.get_flag();
   63|  11.1k|  m_float_flag = bits.get_flag();
   64|  11.1k|  m_full_range_flag = bits.get_flag();
   65|  11.1k|  m_alpha_flag = bits.get_flag();
   66|  11.1k|  m_explicit_cicp_flag = bits.get_flag();
   67|  11.1k|  m_hdr_flag = bits.get_flag();
   68|  11.1k|  m_icc_flag = bits.get_flag();
   69|  11.1k|  m_exif_flag = bits.get_flag();
   70|  11.1k|  m_xmp_flag = bits.get_flag();
   71|  11.1k|  m_chroma_subsampling = bits.get_bits8(2);
   72|  11.1k|  m_orientation = bits.get_bits8(3) + 1;
   73|       |
   74|  11.1k|  bool large_dimensions_flag = bits.get_flag();
   75|       |  // large_dimensions_flag = !large_dimensions_flag;  // HACK to get old behavior
   76|  11.1k|  m_width = 1 + bits.get_bits32(large_dimensions_flag ? 15 : 7);
  ------------------
  |  Branch (76:33): [True: 3.52k, False: 7.62k]
  ------------------
   77|  11.1k|  m_height = 1 + bits.get_bits32(large_dimensions_flag ? 15 : 7);
  ------------------
  |  Branch (77:34): [True: 3.52k, False: 7.62k]
  ------------------
   78|       |
   79|  11.1k|  if ((m_chroma_subsampling == 1) || (m_chroma_subsampling == 2))
  ------------------
  |  Branch (79:7): [True: 752, False: 10.3k]
  |  Branch (79:38): [True: 4.65k, False: 5.73k]
  ------------------
   80|  5.40k|  {
   81|  5.40k|    m_chroma_is_horizontally_centered = bits.get_flag();
   82|  5.40k|  }
   83|  11.1k|  if (m_chroma_subsampling == 1)
  ------------------
  |  Branch (83:7): [True: 752, False: 10.3k]
  ------------------
   84|    752|  {
   85|    752|    m_chroma_is_vertically_centered = bits.get_flag();
   86|    752|  }
   87|       |
   88|  11.1k|  bool high_bit_depth_flag = false;
   89|  11.1k|  if (m_float_flag)
  ------------------
  |  Branch (89:7): [True: 2.22k, False: 8.92k]
  ------------------
   90|  2.22k|  {
   91|  2.22k|    uint8_t bit_depth_log2 = bits.get_bits8(2) + 4; // [4;6] (7 is reserved)
   92|  2.22k|    if (bit_depth_log2 > 6) {
  ------------------
  |  Branch (92:9): [True: 3, False: 2.22k]
  ------------------
   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|  2.22k|    m_bit_depth = (uint8_t)powl(2, (bit_depth_log2)); // [16,32,64]
   98|  2.22k|  }
   99|  8.92k|  else
  100|  8.92k|  {
  101|  8.92k|    high_bit_depth_flag = bits.get_flag();
  102|  8.92k|    if (high_bit_depth_flag)
  ------------------
  |  Branch (102:9): [True: 3.23k, False: 5.68k]
  ------------------
  103|  3.23k|    {
  104|  3.23k|      m_bit_depth = bits.get_bits8(3) + 9; // [9;16]
  105|  3.23k|    }
  106|  8.92k|  }
  107|       |
  108|  11.1k|  if (m_alpha_flag)
  ------------------
  |  Branch (108:7): [True: 2.78k, False: 8.36k]
  ------------------
  109|  2.78k|  {
  110|  2.78k|    m_alpha_is_premultiplied = bits.get_flag();
  111|  2.78k|  }
  112|       |
  113|  11.1k|  if (m_explicit_cicp_flag)
  ------------------
  |  Branch (113:7): [True: 3.33k, False: 7.80k]
  ------------------
  114|  3.33k|  {
  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|  3.33k|    m_colour_primaries = bits.get_bits8(8);
  120|  3.33k|    m_transfer_characteristics = bits.get_bits8(8);
  121|  3.33k|    m_matrix_coefficients = bits.get_bits8(8);
  122|  3.33k|  }
  123|  7.80k|  else
  124|  7.80k|  {
  125|  7.80k|    m_colour_primaries = m_icc_flag ? 2 : 1;
  ------------------
  |  Branch (125:26): [True: 749, False: 7.05k]
  ------------------
  126|  7.80k|    m_transfer_characteristics = m_icc_flag ? 2 : 13;
  ------------------
  |  Branch (126:34): [True: 749, False: 7.05k]
  ------------------
  127|  7.80k|    m_matrix_coefficients = (m_chroma_subsampling == 0) ? 2 : 6;
  ------------------
  |  Branch (127:29): [True: 2.86k, False: 4.94k]
  ------------------
  128|  7.80k|  }
  129|       |
  130|  11.1k|  if (m_explicit_codec_types_flag)
  ------------------
  |  Branch (130:7): [True: 2.96k, False: 8.17k]
  ------------------
  131|  2.96k|  {
  132|  2.96k|    m_infe_type = bits.get_bits32(32);
  133|  2.96k|    m_codec_config_type = bits.get_bits32(32);
  134|  2.96k|  }
  135|       |
  136|  11.1k|  if (m_hdr_flag)
  ------------------
  |  Branch (136:7): [True: 9.89k, False: 1.24k]
  ------------------
  137|  9.89k|  {
  138|  9.89k|    m_gainmap_flag = bits.get_flag();
  139|  9.89k|    if (m_gainmap_flag)
  ------------------
  |  Branch (139:9): [True: 7.44k, False: 2.45k]
  ------------------
  140|  7.44k|    {
  141|  7.44k|      bool gainmap_dimension_same_as_main_item_flag = bits.get_flag();
  142|  7.44k|      if (gainmap_dimension_same_as_main_item_flag) {
  ------------------
  |  Branch (142:11): [True: 3.92k, False: 3.52k]
  ------------------
  143|  3.92k|        m_gainmap_width = m_width;
  144|  3.92k|        m_gainmap_height = m_height;
  145|  3.92k|      }
  146|  3.52k|      else {
  147|  3.52k|        m_gainmap_width = bits.get_bits32(large_dimensions_flag ? 15 : 7) + 1;
  ------------------
  |  Branch (147:43): [True: 1.45k, False: 2.07k]
  ------------------
  148|  3.52k|        m_gainmap_height = bits.get_bits32(large_dimensions_flag ? 15 : 7) + 1;
  ------------------
  |  Branch (148:44): [True: 1.45k, False: 2.07k]
  ------------------
  149|  3.52k|      }
  150|       |
  151|  7.44k|      m_gainmap_matrix_coefficients = bits.get_bits8(8);
  152|  7.44k|      m_gainmap_full_range_flag = bits.get_flag();
  153|  7.44k|      m_gainmap_chroma_subsampling = bits.get_bits8(2);
  154|  7.44k|      if ((m_gainmap_chroma_subsampling == 1) || (m_gainmap_chroma_subsampling == 2))
  ------------------
  |  Branch (154:11): [True: 3.88k, False: 3.56k]
  |  Branch (154:50): [True: 2.37k, False: 1.19k]
  ------------------
  155|  6.25k|      {
  156|  6.25k|        m_gainmap_chroma_is_horizontally_centred = bits.get_flag();
  157|  6.25k|      }
  158|  7.44k|      if (m_gainmap_chroma_subsampling == 1)
  ------------------
  |  Branch (158:11): [True: 3.88k, False: 3.56k]
  ------------------
  159|  3.88k|      {
  160|  3.88k|        m_gainmap_chroma_is_vertically_centred = bits.get_flag();
  161|  3.88k|      }
  162|       |
  163|  7.44k|      m_gainmap_float_flag = bits.get_flag();
  164|       |
  165|  7.44k|      bool gainmap_high_bit_depth_flag = false;
  166|  7.44k|      if (m_gainmap_float_flag)
  ------------------
  |  Branch (166:11): [True: 1.39k, False: 6.05k]
  ------------------
  167|  1.39k|      {
  168|  1.39k|        uint8_t bit_depth_log2 = bits.get_bits8(2) + 4;
  169|  1.39k|        if (bit_depth_log2 > 6) {
  ------------------
  |  Branch (169:13): [True: 9, False: 1.38k]
  ------------------
  170|      9|          return {heif_error_Invalid_input,
  171|      9|                  heif_suberror_Invalid_mini_box,
  172|      9|                  "Reserved float gainmap bit_depth_log2 value 7 in MinimizedImageBox"};
  173|      9|        }
  174|  1.38k|        m_gainmap_bit_depth = (uint8_t)powl(2, (bit_depth_log2));
  175|  1.38k|      }
  176|  6.05k|      else
  177|  6.05k|      {
  178|  6.05k|        gainmap_high_bit_depth_flag = bits.get_flag();
  179|  6.05k|        if (gainmap_high_bit_depth_flag)
  ------------------
  |  Branch (179:13): [True: 1.59k, False: 4.46k]
  ------------------
  180|  1.59k|        {
  181|  1.59k|          m_gainmap_bit_depth = 9 + bits.get_bits8(3);
  182|  1.59k|        }
  183|  6.05k|      }
  184|       |
  185|  7.43k|      m_tmap_icc_flag = bits.get_flag();
  186|  7.43k|      m_tmap_explicit_cicp_flag = bits.get_flag();
  187|  7.43k|      if (m_tmap_explicit_cicp_flag)
  ------------------
  |  Branch (187:11): [True: 2.12k, False: 5.31k]
  ------------------
  188|  2.12k|      {
  189|  2.12k|        m_tmap_colour_primaries = bits.get_bits8(8);
  190|  2.12k|        m_tmap_transfer_characteristics = bits.get_bits8(8);
  191|  2.12k|        m_tmap_matrix_coefficients = bits.get_bits8(8);
  192|  2.12k|        m_tmap_full_range_flag = bits.get_flag();
  193|  2.12k|      }
  194|  5.31k|      else
  195|  5.31k|      {
  196|  5.31k|        m_tmap_colour_primaries = 1;
  197|  5.31k|        m_tmap_transfer_characteristics = 13;
  198|  5.31k|        m_tmap_matrix_coefficients = 6;
  199|  5.31k|        m_tmap_full_range_flag = true;
  200|  5.31k|      }
  201|  7.43k|    }
  202|       |
  203|  9.88k|    bool clli_flag = bits.get_flag();
  204|  9.88k|    bool mdcv_flag = bits.get_flag();
  205|  9.88k|    bool cclv_flag = bits.get_flag();
  206|  9.88k|    bool amve_flag = bits.get_flag();
  207|  9.88k|    m_reve_flag = bits.get_flag();
  208|  9.88k|    bool ndwt_flag = bits.get_flag();
  209|       |
  210|  9.88k|    if (clli_flag)
  ------------------
  |  Branch (210:9): [True: 2.86k, False: 7.02k]
  ------------------
  211|  2.86k|    {
  212|  2.86k|      m_clli = std::make_shared<Box_clli>();
  213|  2.86k|      m_clli->clli.max_content_light_level = bits.get_bits16(16);
  214|  2.86k|      m_clli->clli.max_pic_average_light_level = bits.get_bits16(16);
  215|  2.86k|    }
  216|       |
  217|  9.88k|    if (mdcv_flag)
  ------------------
  |  Branch (217:9): [True: 1.23k, False: 8.65k]
  ------------------
  218|  1.23k|    {
  219|  1.23k|      m_mdcv = std::make_shared<Box_mdcv>();
  220|  4.92k|      for (int c = 0; c < 3; c++)
  ------------------
  |  Branch (220:23): [True: 3.69k, False: 1.23k]
  ------------------
  221|  3.69k|      {
  222|  3.69k|        m_mdcv->mdcv.display_primaries_x[c] = bits.get_bits16(16);
  223|  3.69k|        m_mdcv->mdcv.display_primaries_y[c] = bits.get_bits16(16);
  224|  3.69k|      }
  225|       |
  226|  1.23k|      m_mdcv->mdcv.white_point_x = bits.get_bits16(16);
  227|  1.23k|      m_mdcv->mdcv.white_point_y = bits.get_bits16(16);
  228|  1.23k|      m_mdcv->mdcv.max_display_mastering_luminance = bits.get_bits32(32);
  229|  1.23k|      m_mdcv->mdcv.min_display_mastering_luminance = bits.get_bits32(32);
  230|  1.23k|    }
  231|       |
  232|  9.88k|    if (cclv_flag)
  ------------------
  |  Branch (232:9): [True: 3.22k, False: 6.66k]
  ------------------
  233|  3.22k|    {
  234|  3.22k|      m_cclv = std::make_shared<Box_cclv>();
  235|  3.22k|      bits.skip_bits(2);
  236|  3.22k|      bool ccv_primaries_present_flag = bits.get_flag();
  237|  3.22k|      bool ccv_min_luminance_value_present_flag = bits.get_flag();
  238|  3.22k|      bool ccv_max_luminance_value_present_flag = bits.get_flag();
  239|  3.22k|      bool ccv_avg_luminance_value_present_flag = bits.get_flag();
  240|  3.22k|      bits.skip_bits(2);
  241|  3.22k|      if (ccv_primaries_present_flag)
  ------------------
  |  Branch (241:11): [True: 837, False: 2.39k]
  ------------------
  242|    837|      {
  243|    837|        int32_t x0 = bits.get_bits32s();
  244|    837|        int32_t y0 = bits.get_bits32s();
  245|    837|        int32_t x1 = bits.get_bits32s();
  246|    837|        int32_t y1 = bits.get_bits32s();
  247|    837|        int32_t x2 = bits.get_bits32s();
  248|    837|        int32_t y2 = bits.get_bits32s();
  249|    837|        m_cclv->set_primaries(x0, y0, x1, y1, x2, y2);
  250|    837|      }
  251|  3.22k|      if (ccv_min_luminance_value_present_flag)
  ------------------
  |  Branch (251:11): [True: 459, False: 2.76k]
  ------------------
  252|    459|      {
  253|    459|        m_cclv->set_min_luminance(bits.get_bits32(32));
  254|    459|      }
  255|  3.22k|      if (ccv_max_luminance_value_present_flag)
  ------------------
  |  Branch (255:11): [True: 1.82k, False: 1.40k]
  ------------------
  256|  1.82k|      {
  257|  1.82k|        m_cclv->set_max_luminance(bits.get_bits32(32));
  258|  1.82k|      }
  259|  3.22k|      if (ccv_avg_luminance_value_present_flag)
  ------------------
  |  Branch (259:11): [True: 568, False: 2.65k]
  ------------------
  260|    568|      {
  261|    568|        m_cclv->set_avg_luminance(bits.get_bits32(32));
  262|    568|      }
  263|  3.22k|    }
  264|       |
  265|  9.88k|    if (amve_flag)
  ------------------
  |  Branch (265:9): [True: 717, False: 9.17k]
  ------------------
  266|    717|    {
  267|    717|      m_amve = std::make_shared<Box_amve>();
  268|    717|      m_amve->amve.ambient_illumination = bits.get_bits32(32);
  269|    717|      m_amve->amve.ambient_light_x = bits.get_bits16(16);
  270|    717|      m_amve->amve.ambient_light_y = bits.get_bits16(16);
  271|    717|    }
  272|       |
  273|  9.88k|    if (m_reve_flag)
  ------------------
  |  Branch (273:9): [True: 1.39k, False: 8.49k]
  ------------------
  274|  1.39k|    {
  275|       |      // TODO: ReferenceViewingEnvironment isn't published yet
  276|  1.39k|      bits.skip_bits(32);
  277|  1.39k|      bits.skip_bits(16);
  278|  1.39k|      bits.skip_bits(16);
  279|  1.39k|      bits.skip_bits(32);
  280|  1.39k|      bits.skip_bits(16);
  281|  1.39k|      bits.skip_bits(16);
  282|  1.39k|    }
  283|       |
  284|  9.88k|    if (ndwt_flag)
  ------------------
  |  Branch (284:9): [True: 2.87k, False: 7.01k]
  ------------------
  285|  2.87k|    {
  286|  2.87k|      m_ndwt = std::make_shared<Box_ndwt>();
  287|  2.87k|      m_ndwt->set_diffuse_white_luminance(bits.get_bits32(32));
  288|  2.87k|    }
  289|       |
  290|  9.88k|    if (m_gainmap_flag)
  ------------------
  |  Branch (290:9): [True: 7.43k, False: 2.45k]
  ------------------
  291|  7.43k|    {
  292|  7.43k|      bool tmap_clli_flag = bits.get_flag();
  293|  7.43k|      bool tmap_mdcv_flag = bits.get_flag();
  294|  7.43k|      bool tmap_cclv_flag = bits.get_flag();
  295|  7.43k|      bool tmap_amve_flag = bits.get_flag();
  296|  7.43k|      m_tmap_reve_flag = bits.get_flag();
  297|  7.43k|      bool tmap_ndwt_flag = bits.get_flag();
  298|       |
  299|  7.43k|      if (tmap_clli_flag)
  ------------------
  |  Branch (299:11): [True: 2.41k, False: 5.02k]
  ------------------
  300|  2.41k|      {
  301|  2.41k|        m_tmap_clli = std::make_shared<Box_clli>();
  302|  2.41k|        m_tmap_clli->clli.max_content_light_level = (uint16_t)bits.get_bits32(16);
  303|  2.41k|        m_tmap_clli->clli.max_pic_average_light_level = (uint16_t)bits.get_bits32(16);
  304|  2.41k|      }
  305|       |
  306|  7.43k|      if (tmap_mdcv_flag)
  ------------------
  |  Branch (306:11): [True: 1.56k, False: 5.87k]
  ------------------
  307|  1.56k|      {
  308|  1.56k|        m_tmap_mdcv = std::make_shared<Box_mdcv>();
  309|  6.26k|        for (int c = 0; c < 3; c++)
  ------------------
  |  Branch (309:25): [True: 4.69k, False: 1.56k]
  ------------------
  310|  4.69k|        {
  311|  4.69k|          m_tmap_mdcv->mdcv.display_primaries_x[c] = bits.get_bits16(16);
  312|  4.69k|          m_tmap_mdcv->mdcv.display_primaries_y[c] = bits.get_bits16(16);
  313|  4.69k|        }
  314|       |
  315|  1.56k|        m_tmap_mdcv->mdcv.white_point_x = bits.get_bits16(16);
  316|  1.56k|        m_tmap_mdcv->mdcv.white_point_y = bits.get_bits16(16);
  317|  1.56k|        m_tmap_mdcv->mdcv.max_display_mastering_luminance = bits.get_bits32(32);
  318|  1.56k|        m_tmap_mdcv->mdcv.min_display_mastering_luminance = bits.get_bits32(32);
  319|  1.56k|      }
  320|       |
  321|  7.43k|      if (tmap_cclv_flag)
  ------------------
  |  Branch (321:11): [True: 3.79k, False: 3.64k]
  ------------------
  322|  3.79k|      {
  323|  3.79k|        m_tmap_cclv = std::make_shared<Box_cclv>();
  324|  3.79k|        bits.skip_bits(2); // skip ccv_cancel_flag and ccv_persistence_flag
  325|  3.79k|        bool ccv_primaries_present_flag = bits.get_flag();
  326|  3.79k|        bool ccv_min_luminance_value_present_flag = bits.get_flag();
  327|  3.79k|        bool ccv_max_luminance_value_present_flag = bits.get_flag();
  328|  3.79k|        bool ccv_avg_luminance_value_present_flag = bits.get_flag();
  329|  3.79k|        bits.skip_bits(2);
  330|  3.79k|        if (ccv_primaries_present_flag)
  ------------------
  |  Branch (330:13): [True: 344, False: 3.44k]
  ------------------
  331|    344|        {
  332|    344|          int32_t x0 = bits.get_bits32s();
  333|    344|          int32_t y0 = bits.get_bits32s();
  334|    344|          int32_t x1 = bits.get_bits32s();
  335|    344|          int32_t y1 = bits.get_bits32s();
  336|    344|          int32_t x2 = bits.get_bits32s();
  337|    344|          int32_t y2 = bits.get_bits32s();
  338|    344|          m_tmap_cclv->set_primaries(x0, y0, x1, y1, x2, y2);
  339|    344|        }
  340|  3.79k|        if (ccv_min_luminance_value_present_flag)
  ------------------
  |  Branch (340:13): [True: 548, False: 3.24k]
  ------------------
  341|    548|        {
  342|    548|          m_tmap_cclv->set_min_luminance(bits.get_bits32(32));
  343|    548|        }
  344|  3.79k|        if (ccv_max_luminance_value_present_flag)
  ------------------
  |  Branch (344:13): [True: 579, False: 3.21k]
  ------------------
  345|    579|        {
  346|    579|          m_tmap_cclv->set_max_luminance(bits.get_bits32(32));
  347|    579|        }
  348|  3.79k|        if (ccv_avg_luminance_value_present_flag)
  ------------------
  |  Branch (348:13): [True: 482, False: 3.30k]
  ------------------
  349|    482|        {
  350|    482|          m_tmap_cclv->set_avg_luminance(bits.get_bits32(32));
  351|    482|        }
  352|  3.79k|      }
  353|       |
  354|  7.43k|      if (tmap_amve_flag)
  ------------------
  |  Branch (354:11): [True: 2.02k, False: 5.41k]
  ------------------
  355|  2.02k|      {
  356|  2.02k|        m_tmap_amve = std::make_shared<Box_amve>();
  357|  2.02k|        m_tmap_amve->amve.ambient_illumination = bits.get_bits32(32);
  358|  2.02k|        m_tmap_amve->amve.ambient_light_x = bits.get_bits16(16);
  359|  2.02k|        m_tmap_amve->amve.ambient_light_y = bits.get_bits16(16);
  360|  2.02k|      }
  361|       |
  362|  7.43k|      if (m_tmap_reve_flag)
  ------------------
  |  Branch (362:11): [True: 711, False: 6.72k]
  ------------------
  363|    711|      {
  364|       |        // TODO: ReferenceViewingEnvironment isn't published yet
  365|    711|        bits.skip_bits(32);
  366|    711|        bits.skip_bits(16);
  367|    711|        bits.skip_bits(16);
  368|    711|        bits.skip_bits(32);
  369|    711|        bits.skip_bits(16);
  370|    711|        bits.skip_bits(16);
  371|    711|      }
  372|       |
  373|  7.43k|      if (tmap_ndwt_flag)
  ------------------
  |  Branch (373:11): [True: 1.14k, False: 6.29k]
  ------------------
  374|  1.14k|      {
  375|  1.14k|        m_tmap_ndwt = std::make_shared<Box_ndwt>();
  376|  1.14k|        m_tmap_ndwt->set_diffuse_white_luminance(bits.get_bits32(32));
  377|  1.14k|      }
  378|  7.43k|    }
  379|  9.88k|  }
  380|       |
  381|       |  // Chunk sizes
  382|  11.1k|  bool large_metadata_flag = false;
  383|  11.1k|  if (m_icc_flag || m_exif_flag || m_xmp_flag || (m_hdr_flag && m_gainmap_flag))
  ------------------
  |  Branch (383:7): [True: 2.41k, False: 8.71k]
  |  Branch (383:21): [True: 1.25k, False: 7.46k]
  |  Branch (383:36): [True: 1.26k, False: 6.20k]
  |  Branch (383:51): [True: 5.08k, False: 1.12k]
  |  Branch (383:65): [True: 3.35k, False: 1.72k]
  ------------------
  384|  8.29k|  {
  385|  8.29k|    large_metadata_flag = bits.get_flag();
  386|  8.29k|  }
  387|       |
  388|  11.1k|  bool large_codec_config_flag = bits.get_flag();
  389|  11.1k|  bool large_item_data_flag = bits.get_flag();
  390|       |
  391|  11.1k|  uint32_t icc_data_size = 0;
  392|  11.1k|  if (m_icc_flag)
  ------------------
  |  Branch (392:7): [True: 2.41k, False: 8.71k]
  ------------------
  393|  2.41k|  {
  394|  2.41k|    icc_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (394:37): [True: 9, False: 2.40k]
  ------------------
  395|  2.41k|  }
  396|       |
  397|  11.1k|  uint32_t tmap_icc_data_size = 0;
  398|  11.1k|  if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag)
  ------------------
  |  Branch (398:7): [True: 9.88k, False: 1.24k]
  |  Branch (398:21): [True: 7.43k, False: 2.45k]
  |  Branch (398:39): [True: 1.27k, False: 6.16k]
  ------------------
  399|  1.27k|  {
  400|  1.27k|    tmap_icc_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (400:42): [True: 158, False: 1.11k]
  ------------------
  401|  1.27k|  }
  402|       |
  403|  11.1k|  uint32_t gainmap_metadata_size = 0;
  404|  11.1k|  if (m_hdr_flag && m_gainmap_flag)
  ------------------
  |  Branch (404:7): [True: 9.88k, False: 1.24k]
  |  Branch (404:21): [True: 7.43k, False: 2.45k]
  ------------------
  405|  7.43k|  {
  406|  7.43k|    gainmap_metadata_size = bits.get_bits32(large_metadata_flag ? 20 : 10);
  ------------------
  |  Branch (406:45): [True: 176, False: 7.26k]
  ------------------
  407|  7.43k|  }
  408|       |
  409|  11.1k|  if (m_hdr_flag && m_gainmap_flag)
  ------------------
  |  Branch (409:7): [True: 9.88k, False: 1.24k]
  |  Branch (409:21): [True: 7.43k, False: 2.45k]
  ------------------
  410|  7.43k|  {
  411|  7.43k|    m_gainmap_item_data_size = bits.get_bits32(large_item_data_flag ? 28 : 15);
  ------------------
  |  Branch (411:48): [True: 59, False: 7.37k]
  ------------------
  412|  7.43k|  }
  413|       |
  414|  11.1k|  uint32_t gainmap_item_codec_config_size = 0;
  415|  11.1k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0)
  ------------------
  |  Branch (415:7): [True: 9.88k, False: 1.24k]
  |  Branch (415:21): [True: 7.43k, False: 2.45k]
  |  Branch (415:39): [True: 1.41k, False: 6.02k]
  ------------------
  416|  1.41k|  {
  417|  1.41k|    gainmap_item_codec_config_size = bits.get_bits32(large_codec_config_flag ? 12 : 3);
  ------------------
  |  Branch (417:54): [True: 61, False: 1.35k]
  ------------------
  418|  1.41k|  }
  419|       |
  420|  11.1k|  uint32_t main_item_codec_config_size = bits.get_bits32(large_codec_config_flag ? 12 : 3);
  ------------------
  |  Branch (420:58): [True: 706, False: 10.4k]
  ------------------
  421|  11.1k|  m_main_item_data_size = bits.get_bits32(large_item_data_flag ? 28 : 15) + 1;
  ------------------
  |  Branch (421:43): [True: 277, False: 10.8k]
  ------------------
  422|       |
  423|  11.1k|  if (m_alpha_flag)
  ------------------
  |  Branch (423:7): [True: 2.78k, False: 8.35k]
  ------------------
  424|  2.78k|  {
  425|  2.78k|    m_alpha_item_data_size = bits.get_bits32(large_item_data_flag ? 28 : 15);
  ------------------
  |  Branch (425:46): [True: 56, False: 2.72k]
  ------------------
  426|  2.78k|  }
  427|       |
  428|  11.1k|  uint32_t alpha_item_codec_config_size = 0;
  429|  11.1k|  if (m_alpha_flag && m_alpha_item_data_size > 0)
  ------------------
  |  Branch (429:7): [True: 2.78k, False: 8.35k]
  |  Branch (429:23): [True: 300, False: 2.48k]
  ------------------
  430|    300|  {
  431|    300|    alpha_item_codec_config_size = bits.get_bits32(large_codec_config_flag ? 12 : 3);
  ------------------
  |  Branch (431:52): [True: 30, False: 270]
  ------------------
  432|    300|  }
  433|       |
  434|  11.1k|  if (m_exif_flag || m_xmp_flag)
  ------------------
  |  Branch (434:7): [True: 2.80k, False: 8.32k]
  |  Branch (434:22): [True: 1.82k, False: 6.50k]
  ------------------
  435|  4.63k|  {
  436|  4.63k|    m_exif_xmp_compressed_flag = bits.get_flag();
  437|  4.63k|  }
  438|       |
  439|  11.1k|  if (m_exif_flag)
  ------------------
  |  Branch (439:7): [True: 2.80k, False: 8.32k]
  ------------------
  440|  2.80k|  {
  441|  2.80k|    m_exif_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (441:40): [True: 14, False: 2.79k]
  ------------------
  442|  2.80k|  }
  443|  11.1k|  if (m_xmp_flag)
  ------------------
  |  Branch (443:7): [True: 4.16k, False: 6.96k]
  ------------------
  444|  4.16k|  {
  445|  4.16k|    m_xmp_data_size = bits.get_bits32(large_metadata_flag ? 20 : 10) + 1;
  ------------------
  |  Branch (445:39): [True: 169, False: 3.99k]
  ------------------
  446|  4.16k|  }
  447|       |
  448|  11.1k|  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|  11.1k|  {
  455|  11.1k|    uint64_t required_bytes = (uint64_t) main_item_codec_config_size + m_main_item_data_size;
  456|  11.1k|    if (m_alpha_flag && m_alpha_item_data_size > 0) {
  ------------------
  |  Branch (456:9): [True: 2.78k, False: 8.35k]
  |  Branch (456:25): [True: 300, False: 2.48k]
  ------------------
  457|    300|      required_bytes += alpha_item_codec_config_size;
  458|    300|      required_bytes += m_alpha_item_data_size;
  459|    300|    }
  460|  11.1k|    if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0) {
  ------------------
  |  Branch (460:9): [True: 9.88k, False: 1.24k]
  |  Branch (460:23): [True: 7.43k, False: 2.45k]
  |  Branch (460:41): [True: 1.41k, False: 6.02k]
  ------------------
  461|  1.41k|      required_bytes += gainmap_item_codec_config_size;
  462|  1.41k|      required_bytes += m_gainmap_item_data_size;
  463|  1.41k|    }
  464|  11.1k|    if (m_icc_flag) required_bytes += icc_data_size;
  ------------------
  |  Branch (464:9): [True: 2.41k, False: 8.71k]
  ------------------
  465|  11.1k|    if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag) required_bytes += tmap_icc_data_size;
  ------------------
  |  Branch (465:9): [True: 9.88k, False: 1.24k]
  |  Branch (465:23): [True: 7.43k, False: 2.45k]
  |  Branch (465:41): [True: 1.27k, False: 6.16k]
  ------------------
  466|  11.1k|    if (m_hdr_flag && m_gainmap_flag) required_bytes += gainmap_metadata_size;
  ------------------
  |  Branch (466:9): [True: 9.88k, False: 1.24k]
  |  Branch (466:23): [True: 7.43k, False: 2.45k]
  ------------------
  467|  11.1k|    if (m_exif_flag) required_bytes += m_exif_data_size;
  ------------------
  |  Branch (467:9): [True: 2.80k, False: 8.32k]
  ------------------
  468|  11.1k|    if (m_xmp_flag) required_bytes += m_xmp_data_size;
  ------------------
  |  Branch (468:9): [True: 4.16k, False: 6.96k]
  ------------------
  469|       |
  470|  11.1k|    int64_t remaining_bits = bits.get_bits_remaining();
  471|  11.1k|    if (remaining_bits < 0 || required_bytes > (uint64_t) remaining_bits / 8) {
  ------------------
  |  Branch (471:9): [True: 320, False: 10.8k]
  |  Branch (471:31): [True: 108, False: 10.7k]
  ------------------
  472|    428|      return {heif_error_Invalid_input,
  473|    428|              heif_suberror_Invalid_mini_box,
  474|    428|              "Declared chunk sizes in MinimizedImageBox exceed available payload."};
  475|    428|    }
  476|  11.1k|  }
  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|  10.7k|  if (limits && limits->max_color_profile_size) {
  ------------------
  |  Branch (480:7): [True: 10.7k, False: 0]
  |  Branch (480:17): [True: 10.7k, False: 0]
  ------------------
  481|  10.7k|    if (m_icc_flag && icc_data_size > limits->max_color_profile_size) {
  ------------------
  |  Branch (481:9): [True: 2.35k, False: 8.35k]
  |  Branch (481:23): [True: 0, False: 2.35k]
  ------------------
  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|  10.7k|    if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag &&
  ------------------
  |  Branch (486:9): [True: 9.53k, False: 1.16k]
  |  Branch (486:23): [True: 7.23k, False: 2.30k]
  |  Branch (486:41): [True: 1.20k, False: 6.02k]
  ------------------
  487|  1.20k|        tmap_icc_data_size > limits->max_color_profile_size) {
  ------------------
  |  Branch (487:9): [True: 0, False: 1.20k]
  ------------------
  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|  10.7k|  }
  493|       |
  494|  10.7k|  if (main_item_codec_config_size > 0)
  ------------------
  |  Branch (494:7): [True: 684, False: 10.0k]
  ------------------
  495|    684|  {
  496|    684|    m_main_item_codec_config = bits.read_bytes(main_item_codec_config_size);
  497|    684|  }
  498|       |
  499|       |  // Chunks
  500|  10.7k|  if (m_alpha_flag && m_alpha_item_data_size > 0) {
  ------------------
  |  Branch (500:7): [True: 2.65k, False: 8.05k]
  |  Branch (500:23): [True: 263, False: 2.39k]
  ------------------
  501|    263|    if (alpha_item_codec_config_size == 0) {
  ------------------
  |  Branch (501:9): [True: 165, False: 98]
  ------------------
  502|    165|      m_alpha_item_codec_config = m_main_item_codec_config;
  503|    165|    }
  504|     98|    else {
  505|       |      // TODO: should we have a flag indicating that we have explicit config for alpha?
  506|     98|      m_alpha_item_codec_config = bits.read_bytes(alpha_item_codec_config_size);
  507|     98|    }
  508|    263|  }
  509|       |
  510|  10.7k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0)
  ------------------
  |  Branch (510:7): [True: 9.53k, False: 1.16k]
  |  Branch (510:21): [True: 7.23k, False: 2.30k]
  |  Branch (510:39): [True: 1.35k, False: 5.88k]
  ------------------
  511|  1.35k|  {
  512|  1.35k|    if (gainmap_item_codec_config_size == 0) {
  ------------------
  |  Branch (512:9): [True: 597, False: 754]
  ------------------
  513|    597|      m_gainmap_item_codec_config = m_main_item_codec_config;
  514|    597|    }
  515|    754|    else {
  516|       |      // TODO: should we have a flag indicating that we have explicit config for the gain map?
  517|    754|      m_gainmap_item_codec_config = bits.read_bytes(gainmap_item_codec_config_size);
  518|    754|    }
  519|  1.35k|  }
  520|       |
  521|  10.7k|  if (m_icc_flag)
  ------------------
  |  Branch (521:7): [True: 2.35k, False: 8.35k]
  ------------------
  522|  2.35k|  {
  523|  2.35k|    m_icc_data = bits.read_bytes(icc_data_size);
  524|  2.35k|  }
  525|       |
  526|  10.7k|  if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag)
  ------------------
  |  Branch (526:7): [True: 9.53k, False: 1.16k]
  |  Branch (526:21): [True: 7.23k, False: 2.30k]
  |  Branch (526:39): [True: 1.20k, False: 6.02k]
  ------------------
  527|  1.20k|  {
  528|  1.20k|    m_tmap_icc_data = bits.read_bytes(tmap_icc_data_size);
  529|  1.20k|  }
  530|       |
  531|  10.7k|  if (m_hdr_flag && m_gainmap_flag && gainmap_metadata_size > 0)
  ------------------
  |  Branch (531:7): [True: 9.53k, False: 1.16k]
  |  Branch (531:21): [True: 7.23k, False: 2.30k]
  |  Branch (531:39): [True: 158, False: 7.07k]
  ------------------
  532|    158|  {
  533|    158|    m_gainmap_metadata = bits.read_bytes(gainmap_metadata_size);
  534|    158|  }
  535|       |
  536|  10.7k|  if (m_alpha_flag && m_alpha_item_data_size > 0)
  ------------------
  |  Branch (536:7): [True: 2.65k, False: 8.05k]
  |  Branch (536:23): [True: 263, False: 2.39k]
  ------------------
  537|    263|  {
  538|    263|    m_alpha_item_data_offset = bits.get_current_byte_index() + start_offset;
  539|    263|    bits.skip_bytes(m_alpha_item_data_size);
  540|    263|  }
  541|  10.7k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_data_size > 0)
  ------------------
  |  Branch (541:7): [True: 9.53k, False: 1.16k]
  |  Branch (541:21): [True: 7.23k, False: 2.30k]
  |  Branch (541:39): [True: 1.35k, False: 5.88k]
  ------------------
  542|  1.35k|  {
  543|  1.35k|    m_gainmap_item_data_offset = bits.get_current_byte_index() + start_offset;
  544|  1.35k|    bits.skip_bytes(m_gainmap_item_data_size);
  545|  1.35k|  }
  546|       |
  547|  10.7k|  m_main_item_data_offset = bits.get_current_byte_index() + start_offset;
  548|  10.7k|  bits.skip_bytes(m_main_item_data_size);
  549|       |
  550|  10.7k|  if (m_exif_flag)
  ------------------
  |  Branch (550:7): [True: 2.69k, False: 8.01k]
  ------------------
  551|  2.69k|  {
  552|  2.69k|    m_exif_item_data_offset = bits.get_current_byte_index() + start_offset;
  553|  2.69k|    bits.skip_bytes(m_exif_data_size);
  554|  2.69k|  }
  555|  10.7k|  if (m_xmp_flag)
  ------------------
  |  Branch (555:7): [True: 4.04k, False: 6.66k]
  ------------------
  556|  4.04k|  {
  557|  4.04k|    m_xmp_item_data_offset = bits.get_current_byte_index() + start_offset;
  558|  4.04k|    bits.skip_bytes(m_xmp_data_size);
  559|  4.04k|  }
  560|       |
  561|  10.7k|  return range.get_error();
  562|  10.7k|}
_ZNK8Box_mini4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  565|  10.2k|{
  566|  10.2k|  Box::dump(sstr, indent, full_log);
  567|  10.2k|  sstr << indent << "version: " << (int)m_version << "\n";
  568|       |
  569|  10.2k|  sstr << indent << "explicit_codec_types_flag: " << m_explicit_codec_types_flag << "\n";
  570|  10.2k|  sstr << indent << "float_flag: " << m_float_flag << "\n";
  571|  10.2k|  sstr << indent << "full_range_flag: " << m_full_range_flag << "\n";
  572|  10.2k|  sstr << indent << "alpha_flag: " << m_alpha_flag << "\n";
  573|  10.2k|  sstr << indent << "explicit_cicp_flag: " << m_explicit_cicp_flag << "\n";
  574|  10.2k|  sstr << indent << "hdr_flag: " << m_hdr_flag << "\n";
  575|  10.2k|  sstr << indent << "icc_flag: " << m_icc_flag << "\n";
  576|  10.2k|  sstr << indent << "exif_flag: " << m_exif_flag << "\n";
  577|  10.2k|  sstr << indent << "xmp_flag: " << m_xmp_flag << "\n";
  578|       |
  579|  10.2k|  sstr << indent << "chroma_subsampling: " << (int)m_chroma_subsampling << "\n";
  580|  10.2k|  sstr << indent << "orientation: " << (int)m_orientation << "\n";
  581|       |
  582|  10.2k|  sstr << indent << "width: " << m_width << "\n";
  583|  10.2k|  sstr << indent << "height: " << m_height << "\n";
  584|       |
  585|  10.2k|  if ((m_chroma_subsampling == 1) || (m_chroma_subsampling == 2))
  ------------------
  |  Branch (585:7): [True: 708, False: 9.53k]
  |  Branch (585:38): [True: 4.42k, False: 5.11k]
  ------------------
  586|  5.13k|  {
  587|  5.13k|    sstr << indent << "chroma_is_horizontally_centered: " << m_chroma_is_horizontally_centered << "\n";
  588|  5.13k|  }
  589|  10.2k|  if (m_chroma_subsampling == 1)
  ------------------
  |  Branch (589:7): [True: 708, False: 9.53k]
  ------------------
  590|    708|  {
  591|    708|    sstr << indent << "chroma_is_vertically_centered: " << m_chroma_is_vertically_centered << "\n";
  592|    708|  }
  593|       |
  594|  10.2k|  sstr << "bit_depth: " << (int)m_bit_depth << "\n";
  595|       |
  596|  10.2k|  if (m_alpha_flag)
  ------------------
  |  Branch (596:7): [True: 2.48k, False: 7.76k]
  ------------------
  597|  2.48k|  {
  598|  2.48k|    sstr << "alpha_is_premultiplied: " << m_alpha_is_premultiplied << "\n";
  599|  2.48k|  }
  600|       |
  601|  10.2k|  sstr << "colour_primaries: " << (int)m_colour_primaries << "\n";
  602|  10.2k|  sstr << "transfer_characteristics: " << (int)m_transfer_characteristics << "\n";
  603|  10.2k|  sstr << "matrix_coefficients: " << (int)m_matrix_coefficients << "\n";
  604|       |
  605|  10.2k|  if (m_explicit_codec_types_flag)
  ------------------
  |  Branch (605:7): [True: 2.78k, False: 7.45k]
  ------------------
  606|  2.78k|  {
  607|  2.78k|    sstr << "infe_type: " << fourcc_to_string(m_infe_type) << " (" << m_infe_type << ")" << "\n";
  608|  2.78k|    sstr << "codec_config_type: " << fourcc_to_string(m_codec_config_type) << " (" << m_codec_config_type << ")" << "\n";
  609|  2.78k|  }
  610|       |
  611|  10.2k|  if (m_hdr_flag)
  ------------------
  |  Branch (611:7): [True: 9.07k, False: 1.16k]
  ------------------
  612|  9.07k|  {
  613|  9.07k|    sstr << indent << "gainmap_flag: " << m_gainmap_flag << "\n";
  614|  9.07k|    if (m_gainmap_flag)
  ------------------
  |  Branch (614:9): [True: 6.91k, False: 2.16k]
  ------------------
  615|  6.91k|    {
  616|  6.91k|      sstr << indent << "gainmap_width: " << m_gainmap_width << "\n";
  617|  6.91k|      sstr << indent << "gainmap_height: " << m_gainmap_height << "\n";
  618|  6.91k|      sstr << indent << "gainmap_matrix_coefficients: " << (int)m_gainmap_matrix_coefficients << "\n";
  619|  6.91k|      sstr << indent << "gainmap_full_range_flag: " << m_gainmap_full_range_flag << "\n";
  620|  6.91k|      sstr << indent << "gainmap_chroma_subsampling: " << (int)m_gainmap_chroma_subsampling << "\n";
  621|  6.91k|      if ((m_gainmap_chroma_subsampling == 1) || (m_gainmap_chroma_subsampling == 2))
  ------------------
  |  Branch (621:11): [True: 3.68k, False: 3.23k]
  |  Branch (621:50): [True: 2.21k, False: 1.02k]
  ------------------
  622|  5.89k|      {
  623|  5.89k|        sstr << indent << "gainmap_chroma_is_horizontally_centred: " << m_gainmap_chroma_is_horizontally_centred << "\n";
  624|  5.89k|      }
  625|  6.91k|      if (m_gainmap_chroma_subsampling == 1)
  ------------------
  |  Branch (625:11): [True: 3.68k, False: 3.23k]
  ------------------
  626|  3.68k|      {
  627|  3.68k|        sstr << indent << "gainmap_chroma_is_vertically_centred: " << m_gainmap_chroma_is_vertically_centred << "\n";
  628|  3.68k|      }
  629|  6.91k|      sstr << indent << "gainmap_float_flag: " << m_gainmap_float_flag << "\n";
  630|  6.91k|      sstr << "gainmap_bit_depth: " << (int)m_gainmap_bit_depth << "\n";
  631|  6.91k|      sstr << indent << "tmap_icc_flag: " << m_tmap_icc_flag << "\n";
  632|  6.91k|      sstr << indent << "tmap_explicit_cicp_flag: " << m_tmap_explicit_cicp_flag << "\n";
  633|  6.91k|      if (m_tmap_explicit_cicp_flag)
  ------------------
  |  Branch (633:11): [True: 2.02k, False: 4.89k]
  ------------------
  634|  2.02k|      {
  635|  2.02k|        sstr << "tmap_colour_primaries: " << (int)m_tmap_colour_primaries << "\n";
  636|  2.02k|        sstr << "tmap_transfer_characteristics: " << (int)m_tmap_transfer_characteristics << "\n";
  637|  2.02k|        sstr << "tmap_matrix_coefficients: " << (int)m_tmap_matrix_coefficients << "\n";
  638|  2.02k|        sstr << "tmap_full_range_flag: " << m_tmap_full_range_flag << "\n";
  639|  2.02k|      }
  640|  6.91k|    }
  641|       |
  642|  9.07k|    if (m_clli)
  ------------------
  |  Branch (642:9): [True: 2.60k, False: 6.47k]
  ------------------
  643|  2.60k|    {
  644|  2.60k|      sstr << indent << "ccli.max_content_light_level: " << m_clli->clli.max_content_light_level << "\n";
  645|  2.60k|      sstr << indent << "ccli.max_pic_average_light_level: " << m_clli->clli.max_pic_average_light_level << "\n";
  646|  2.60k|    }
  647|  6.47k|    else {
  648|  6.47k|      sstr << indent << "clli: ---\n";
  649|  6.47k|    }
  650|       |
  651|  9.07k|    if (m_mdcv)
  ------------------
  |  Branch (651:9): [True: 1.15k, False: 7.92k]
  ------------------
  652|  1.15k|    {
  653|  1.15k|      sstr << indent << "mdcv.display_primaries (x,y): ";
  654|  1.15k|      sstr << "(" << m_mdcv->mdcv.display_primaries_x[0] << ";" << m_mdcv->mdcv.display_primaries_y[0] << "), ";
  655|  1.15k|      sstr << "(" << m_mdcv->mdcv.display_primaries_x[1] << ";" << m_mdcv->mdcv.display_primaries_y[1] << "), ";
  656|  1.15k|      sstr << "(" << m_mdcv->mdcv.display_primaries_x[2] << ";" << m_mdcv->mdcv.display_primaries_y[2] << ")\n";
  657|       |
  658|  1.15k|      sstr << indent << "mdcv.white point (x,y): (" << m_mdcv->mdcv.white_point_x << ";" << m_mdcv->mdcv.white_point_y << ")\n";
  659|  1.15k|      sstr << indent << "mdcv.max display mastering luminance: " << m_mdcv->mdcv.max_display_mastering_luminance << "\n";
  660|  1.15k|      sstr << indent << "mdcv.min display mastering luminance: " << m_mdcv->mdcv.min_display_mastering_luminance << "\n";
  661|  1.15k|    }
  662|  7.92k|    else {
  663|  7.92k|      sstr << indent << "mdcv: ---\n";
  664|  7.92k|    }
  665|       |
  666|  9.07k|    if (m_cclv)
  ------------------
  |  Branch (666:9): [True: 2.80k, False: 6.27k]
  ------------------
  667|  2.80k|    {
  668|  2.80k|      sstr << indent << "cclv.ccv_primaries_present_flag: " << m_cclv->ccv_primaries_are_valid() << "\n";
  669|  2.80k|      sstr << indent << "cclv.ccv_min_luminance_value_present_flag: " << m_cclv->min_luminance_is_valid() << "\n";
  670|  2.80k|      sstr << indent << "cclv.ccv_max_luminance_value_present_flag: " << m_cclv->max_luminance_is_valid() << "\n";
  671|  2.80k|      sstr << indent << "cclv.ccv_avg_luminance_value_present_flag: " << m_cclv->avg_luminance_is_valid() << "\n";
  672|  2.80k|      if (m_cclv->ccv_primaries_are_valid())
  ------------------
  |  Branch (672:11): [True: 730, False: 2.07k]
  ------------------
  673|    730|      {
  674|    730|        sstr << indent << "cclv.ccv_primaries (x,y): ";
  675|    730|        sstr << "(" << m_cclv->get_ccv_primary_x0() << ";" << m_cclv->get_ccv_primary_y0() << "), ";
  676|    730|        sstr << "(" << m_cclv->get_ccv_primary_x1() << ";" << m_cclv->get_ccv_primary_y1() << "), ";
  677|    730|        sstr << "(" << m_cclv->get_ccv_primary_x2() << ";" << m_cclv->get_ccv_primary_y2() << ")\n";
  678|    730|      }
  679|  2.80k|      if (m_cclv->min_luminance_is_valid())
  ------------------
  |  Branch (679:11): [True: 392, False: 2.41k]
  ------------------
  680|    392|      {
  681|    392|        sstr << indent << "cclv.ccv_min_luminance_value: " << m_cclv->get_min_luminance() << "\n";
  682|    392|      }
  683|  2.80k|      if (m_cclv->max_luminance_is_valid())
  ------------------
  |  Branch (683:11): [True: 1.66k, False: 1.13k]
  ------------------
  684|  1.66k|      {
  685|  1.66k|        sstr << indent << "cclv.ccv_max_luminance_value: " << m_cclv->get_max_luminance() << "\n";
  686|  1.66k|      }
  687|  2.80k|      if (m_cclv->avg_luminance_is_valid())
  ------------------
  |  Branch (687:11): [True: 498, False: 2.30k]
  ------------------
  688|    498|      {
  689|    498|        sstr << indent << "cclv.ccv_avg_luminance_value: " << m_cclv->get_avg_luminance() << "\n";
  690|    498|      }
  691|  2.80k|    }
  692|  6.27k|    else {
  693|  6.27k|      sstr << indent << "cclv: ---\n";
  694|  6.27k|    }
  695|       |
  696|  9.07k|    if (m_amve)
  ------------------
  |  Branch (696:9): [True: 618, False: 8.46k]
  ------------------
  697|    618|    {
  698|    618|      sstr << indent << "amve.ambient_illumination: " << m_amve->amve.ambient_illumination << "\n";
  699|    618|      sstr << indent << "amve.ambient_light_x: " << m_amve->amve.ambient_light_x << "\n";
  700|    618|      sstr << indent << "amve.ambient_light_y: " << m_amve->amve.ambient_light_y << "\n";
  701|    618|    }
  702|  8.46k|    else {
  703|  8.46k|      sstr << indent << "amve: ---\n";
  704|  8.46k|    }
  705|       |
  706|  9.07k|    sstr << indent << "reve_flag: " << m_reve_flag << "\n";
  707|       |
  708|  9.07k|    if (m_reve_flag)
  ------------------
  |  Branch (708:9): [True: 1.25k, False: 7.81k]
  ------------------
  709|  1.25k|    {
  710|       |      // TODO - this isn't published yet
  711|  1.25k|    }
  712|  9.07k|    if (m_ndwt)
  ------------------
  |  Branch (712:9): [True: 2.67k, False: 6.40k]
  ------------------
  713|  2.67k|    {
  714|  2.67k|      sstr << indent << "ndwt.diffuse_white_luminance: " << m_ndwt->get_diffuse_white_luminance() << "\n";
  715|  2.67k|    }
  716|  6.40k|    else {
  717|  6.40k|      sstr << indent << "ndwt: ---\n";
  718|  6.40k|    }
  719|       |
  720|  9.07k|    if (m_gainmap_flag)
  ------------------
  |  Branch (720:9): [True: 6.91k, False: 2.16k]
  ------------------
  721|  6.91k|    {
  722|  6.91k|      if (m_tmap_clli)
  ------------------
  |  Branch (722:11): [True: 2.32k, False: 4.59k]
  ------------------
  723|  2.32k|      {
  724|  2.32k|        sstr << indent << "tmap_clli.max_content_light_level: " << m_tmap_clli->clli.max_content_light_level << "\n";
  725|  2.32k|        sstr << indent << "tmap_clli.max_pic_average_light_level: " << m_tmap_clli->clli.max_pic_average_light_level << "\n";
  726|  2.32k|      }
  727|  4.59k|      else {
  728|  4.59k|        sstr << indent << "tmap_clli: ---\n";
  729|  4.59k|      }
  730|       |
  731|  6.91k|      if (m_tmap_mdcv)
  ------------------
  |  Branch (731:11): [True: 1.40k, False: 5.51k]
  ------------------
  732|  1.40k|      {
  733|  1.40k|        sstr << indent << "tmap_mdcv.display_primaries (x,y): ";
  734|  1.40k|        sstr << "(" << m_tmap_mdcv->mdcv.display_primaries_x[0] << ";" << m_tmap_mdcv->mdcv.display_primaries_y[0] << "), ";
  735|  1.40k|        sstr << "(" << m_tmap_mdcv->mdcv.display_primaries_x[1] << ";" << m_tmap_mdcv->mdcv.display_primaries_y[1] << "), ";
  736|  1.40k|        sstr << "(" << m_tmap_mdcv->mdcv.display_primaries_x[2] << ";" << m_tmap_mdcv->mdcv.display_primaries_y[2] << ")\n";
  737|       |
  738|  1.40k|        sstr << indent << "tmap_mdcv.white point (x,y): (" << m_tmap_mdcv->mdcv.white_point_x << ";" << m_tmap_mdcv->mdcv.white_point_y << ")\n";
  739|  1.40k|        sstr << indent << "tmap_mdcv.max display mastering luminance: " << m_tmap_mdcv->mdcv.max_display_mastering_luminance << "\n";
  740|  1.40k|        sstr << indent << "tmap_mdcv.min display mastering luminance: " << m_tmap_mdcv->mdcv.min_display_mastering_luminance << "\n";
  741|  1.40k|      }
  742|  5.51k|      else {
  743|  5.51k|        sstr << indent << "tmap_mdcv: ---\n";
  744|  5.51k|      }
  745|       |
  746|  6.91k|      if (m_tmap_cclv)
  ------------------
  |  Branch (746:11): [True: 3.54k, False: 3.36k]
  ------------------
  747|  3.54k|      {
  748|  3.54k|        sstr << indent << "tmap_cclv.ccv_primaries_present_flag: " << m_tmap_cclv->ccv_primaries_are_valid() << "\n";
  749|  3.54k|        sstr << indent << "tmap_cclv.ccv_min_luminance_value_present_flag: " << m_tmap_cclv->min_luminance_is_valid() << "\n";
  750|  3.54k|        sstr << indent << "tmap_cclv.ccv_max_luminance_value_present_flag: " << m_tmap_cclv->max_luminance_is_valid() << "\n";
  751|  3.54k|        sstr << indent << "tmap_cclv.ccv_avg_luminance_value_present_flag: " << m_tmap_cclv->avg_luminance_is_valid() << "\n";
  752|  3.54k|        if (m_tmap_cclv->ccv_primaries_are_valid())
  ------------------
  |  Branch (752:13): [True: 272, False: 3.27k]
  ------------------
  753|    272|        {
  754|    272|          sstr << indent << "tmap_cclv.ccv_primaries (x,y): ";
  755|    272|          sstr << "(" << m_tmap_cclv->get_ccv_primary_x0() << ";" << m_tmap_cclv->get_ccv_primary_y0() << "), ";
  756|    272|          sstr << "(" << m_tmap_cclv->get_ccv_primary_x1() << ";" << m_tmap_cclv->get_ccv_primary_y1() << "), ";
  757|    272|          sstr << "(" << m_tmap_cclv->get_ccv_primary_x2() << ";" << m_tmap_cclv->get_ccv_primary_y2() << ")\n";
  758|    272|        }
  759|  3.54k|        if (m_tmap_cclv->min_luminance_is_valid())
  ------------------
  |  Branch (759:13): [True: 483, False: 3.06k]
  ------------------
  760|    483|        {
  761|    483|          sstr << indent << "tmap_cclv.ccv_min_luminance_value: " << m_tmap_cclv->get_min_luminance() << "\n";
  762|    483|        }
  763|  3.54k|        if (m_tmap_cclv->max_luminance_is_valid())
  ------------------
  |  Branch (763:13): [True: 498, False: 3.05k]
  ------------------
  764|    498|        {
  765|    498|          sstr << indent << "tmap_cclv.ccv_max_luminance_value: " << m_tmap_cclv->get_max_luminance() << "\n";
  766|    498|        }
  767|  3.54k|        if (m_tmap_cclv->avg_luminance_is_valid())
  ------------------
  |  Branch (767:13): [True: 421, False: 3.12k]
  ------------------
  768|    421|        {
  769|    421|          sstr << indent << "tmap_cclv.ccv_avg_luminance_value: " << m_tmap_cclv->get_avg_luminance() << "\n";
  770|    421|        }
  771|  3.54k|      }
  772|  3.36k|      else {
  773|  3.36k|        sstr << indent << "tmap_cclv: ---\n";
  774|  3.36k|      }
  775|       |
  776|  6.91k|      if (m_tmap_amve)
  ------------------
  |  Branch (776:11): [True: 1.94k, False: 4.96k]
  ------------------
  777|  1.94k|      {
  778|  1.94k|        sstr << indent << "tmap_amve.ambient_illumination: " << m_tmap_amve->amve.ambient_illumination << "\n";
  779|  1.94k|        sstr << indent << "tmap_amve.ambient_light_x: " << m_tmap_amve->amve.ambient_light_x << "\n";
  780|  1.94k|        sstr << indent << "tmap_amve.ambient_light_y: " << m_tmap_amve->amve.ambient_light_y << "\n";
  781|  1.94k|      }
  782|  4.96k|      else {
  783|  4.96k|        sstr << indent << "tmap_amve: ---\n";
  784|  4.96k|      }
  785|       |
  786|  6.91k|      sstr << indent << "tmap_reve_flag: " << m_tmap_reve_flag << "\n";
  787|       |
  788|  6.91k|      if (m_tmap_reve_flag)
  ------------------
  |  Branch (788:11): [True: 613, False: 6.30k]
  ------------------
  789|    613|      {
  790|       |        // TODO - this isn't published yet
  791|    613|      }
  792|  6.91k|      if (m_tmap_ndwt)
  ------------------
  |  Branch (792:11): [True: 1.07k, False: 5.84k]
  ------------------
  793|  1.07k|      {
  794|  1.07k|        sstr << indent << "tmap_ndwt.diffuse_white_luminance: " << m_tmap_ndwt->get_diffuse_white_luminance() << "\n";
  795|  1.07k|      }
  796|  5.84k|      else {
  797|  5.84k|        sstr << indent << "tmap_ndwt: ---\n";
  798|  5.84k|      }
  799|  6.91k|    }
  800|  9.07k|  }
  801|       |
  802|  10.2k|  if (m_alpha_flag && (m_alpha_item_data_size > 0) && (m_alpha_item_codec_config.size() > 0))
  ------------------
  |  Branch (802:7): [True: 2.48k, False: 7.76k]
  |  Branch (802:23): [True: 243, False: 2.24k]
  |  Branch (802:55): [True: 110, False: 133]
  ------------------
  803|    110|  {
  804|    110|    sstr << "alpha_item_code_config size: " << m_alpha_item_codec_config.size() << "\n";
  805|    110|  }
  806|  10.2k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_item_codec_config.size() > 0)
  ------------------
  |  Branch (806:7): [True: 9.07k, False: 1.16k]
  |  Branch (806:21): [True: 6.91k, False: 2.16k]
  |  Branch (806:39): [True: 730, False: 6.18k]
  ------------------
  807|    730|  {
  808|    730|    sstr << "gainmap_item_codec_config size: " << m_gainmap_item_codec_config.size() << "\n";
  809|    730|  }
  810|  10.2k|  if (m_main_item_codec_config.size() > 0)
  ------------------
  |  Branch (810:7): [True: 649, False: 9.59k]
  ------------------
  811|    649|  {
  812|    649|    sstr << "main_item_code_config size: " << m_main_item_codec_config.size() << "\n";
  813|    649|  }
  814|       |
  815|  10.2k|  if (m_icc_flag)
  ------------------
  |  Branch (815:7): [True: 2.25k, False: 7.98k]
  ------------------
  816|  2.25k|  {
  817|  2.25k|    sstr << "icc_data size: " << m_icc_data.size() << "\n";
  818|  2.25k|  }
  819|  10.2k|  if (m_hdr_flag && m_gainmap_flag && m_tmap_icc_flag)
  ------------------
  |  Branch (819:7): [True: 9.07k, False: 1.16k]
  |  Branch (819:21): [True: 6.91k, False: 2.16k]
  |  Branch (819:39): [True: 1.20k, False: 5.71k]
  ------------------
  820|  1.20k|  {
  821|  1.20k|    sstr << "tmap_icc_data size: " << m_tmap_icc_data.size() << "\n";
  822|  1.20k|  }
  823|  10.2k|  if (m_hdr_flag && m_gainmap_flag && m_gainmap_metadata.size() > 0)
  ------------------
  |  Branch (823:7): [True: 9.07k, False: 1.16k]
  |  Branch (823:21): [True: 6.91k, False: 2.16k]
  |  Branch (823:39): [True: 145, False: 6.77k]
  ------------------
  824|    145|  {
  825|    145|    sstr << "gainmap_metadata size: " << m_gainmap_metadata.size() << "\n";
  826|    145|  }
  827|       |
  828|  10.2k|  if (m_alpha_flag && (m_alpha_item_data_size > 0))
  ------------------
  |  Branch (828:7): [True: 2.48k, False: 7.76k]
  |  Branch (828:23): [True: 243, False: 2.24k]
  ------------------
  829|    243|  {
  830|    243|    sstr << "alpha_item_data offset: " << m_alpha_item_data_offset << ", size: " << m_alpha_item_data_size << "\n";
  831|    243|  }
  832|  10.2k|  if (m_hdr_flag && m_gainmap_flag && (m_gainmap_item_data_size > 0))
  ------------------
  |  Branch (832:7): [True: 9.07k, False: 1.16k]
  |  Branch (832:21): [True: 6.91k, False: 2.16k]
  |  Branch (832:39): [True: 1.24k, False: 5.67k]
  ------------------
  833|  1.24k|  {
  834|  1.24k|    sstr << "gainmap_item_data offset: " << m_gainmap_item_data_offset << ", size: " << m_gainmap_item_data_size << "\n";
  835|  1.24k|  }
  836|       |
  837|  10.2k|  sstr << "main_item_data offset: " << m_main_item_data_offset << ", size: " << m_main_item_data_size << "\n";
  838|       |
  839|  10.2k|  if (m_exif_flag)
  ------------------
  |  Branch (839:7): [True: 2.54k, False: 7.70k]
  ------------------
  840|  2.54k|  {
  841|  2.54k|    sstr << "exif_data offset: " << m_exif_item_data_offset << ", size: " << m_exif_data_size << "\n";
  842|  2.54k|  }
  843|  10.2k|  if (m_xmp_flag)
  ------------------
  |  Branch (843:7): [True: 3.96k, False: 6.27k]
  ------------------
  844|  3.96k|  {
  845|  3.96k|    sstr << "xmp_data offset: " << m_xmp_item_data_offset << ", size: " << m_xmp_data_size << "\n";
  846|  3.96k|  }
  847|  10.2k|  return;
  848|  10.2k|}

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

_ZN18color_profile_nclx5parseER14BitstreamRange:
  225|    102|{
  226|    102|  StreamReader::grow_status status;
  227|    102|  status = range.wait_for_available_bytes(7);
  228|    102|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (228:7): [True: 4, False: 98]
  ------------------
  229|       |    // TODO: return recoverable error at timeout
  230|      4|    return Error(heif_error_Invalid_input,
  231|      4|                 heif_suberror_End_of_data);
  232|      4|  }
  233|       |
  234|     98|  m_profile.m_colour_primaries = range.read16();
  235|     98|  m_profile.m_transfer_characteristics = range.read16();
  236|     98|  m_profile.m_matrix_coefficients = range.read16();
  237|     98|  m_profile.m_full_range_flag = (range.read8() & 0x80 ? true : false);
  ------------------
  |  Branch (237:34): [True: 3, False: 95]
  ------------------
  238|       |
  239|     98|  return Error::Ok;
  240|    102|}
_ZN18color_profile_nclx10parse_nclcER14BitstreamRange:
  243|    227|{
  244|    227|  StreamReader::grow_status status;
  245|    227|  status = range.wait_for_available_bytes(6);
  246|    227|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (246:7): [True: 2, False: 225]
  ------------------
  247|       |    // TODO: return recoverable error at timeout
  248|      2|    return Error(heif_error_Invalid_input,
  249|      2|                 heif_suberror_End_of_data);
  250|      2|  }
  251|       |
  252|    225|  m_profile.m_colour_primaries = range.read16();
  253|    225|  m_profile.m_transfer_characteristics = range.read16();
  254|    225|  m_profile.m_matrix_coefficients = range.read16();
  255|       |
  256|       |  // use full range for RGB, limited range otherwise
  257|    225|  m_profile.m_full_range_flag = (m_profile.m_matrix_coefficients == 0);
  258|       |
  259|    225|  return Error::Ok;
  260|    227|}
_ZN12nclx_profile17set_sRGB_defaultsEv:
  317|    329|{
  318|       |  // sRGB defaults
  319|    329|  m_colour_primaries = 1;
  320|    329|  m_transfer_characteristics = 13;
  321|    329|  m_matrix_coefficients = 6;
  322|    329|  m_full_range_flag = true;
  323|    329|}
_ZN8Box_colr5parseER14BitstreamRangePK20heif_security_limits:
  387|  5.74k|{
  388|  5.74k|  StreamReader::grow_status status;
  389|  5.74k|  uint32_t colour_type = range.read32();
  390|       |
  391|  5.74k|  if (colour_type == fourcc("nclx")) {
  ------------------
  |  Branch (391:7): [True: 102, False: 5.64k]
  ------------------
  392|    102|    auto color_profile = std::make_shared<color_profile_nclx>();
  393|    102|    m_color_profile = color_profile;
  394|    102|    Error err = color_profile->parse(range);
  395|    102|    if (err) {
  ------------------
  |  Branch (395:9): [True: 4, False: 98]
  ------------------
  396|      4|      return err;
  397|      4|    }
  398|    102|  }
  399|  5.64k|  else if (colour_type == fourcc("nclc")) {
  ------------------
  |  Branch (399:12): [True: 227, False: 5.42k]
  ------------------
  400|    227|    auto color_profile = std::make_shared<color_profile_nclx>();
  401|    227|    m_color_profile = color_profile;
  402|    227|    Error err = color_profile->parse_nclc(range);
  403|    227|    if (err) {
  ------------------
  |  Branch (403:9): [True: 2, False: 225]
  ------------------
  404|      2|      return err;
  405|      2|    }
  406|    227|  }
  407|  5.42k|  else if (colour_type == fourcc("prof") ||
  ------------------
  |  Branch (407:12): [True: 1.33k, False: 4.08k]
  ------------------
  408|  5.31k|           colour_type == fourcc("rICC")) {
  ------------------
  |  Branch (408:12): [True: 3.97k, False: 105]
  ------------------
  409|  5.31k|    if (!has_fixed_box_size()) {
  ------------------
  |  Branch (409:9): [True: 2, False: 5.31k]
  ------------------
  410|      2|      return Error(heif_error_Unsupported_feature, heif_suberror_Unspecified, "colr boxes with undefined box size are not supported");
  411|      2|    }
  412|       |
  413|  5.31k|    uint64_t profile_size_64 = get_box_size() - get_header_size() - 4;
  414|  5.31k|    if (limits->max_color_profile_size && profile_size_64 > limits->max_color_profile_size) {
  ------------------
  |  Branch (414:9): [True: 5.31k, False: 0]
  |  Branch (414:43): [True: 0, False: 5.31k]
  ------------------
  415|      0|      return Error(heif_error_Invalid_input, heif_suberror_Security_limit_exceeded, "Color profile exceeds maximum supported size");
  416|      0|    }
  417|       |
  418|  5.31k|    size_t profile_size = static_cast<size_t>(profile_size_64);
  419|       |
  420|  5.31k|    status = range.wait_for_available_bytes(profile_size);
  421|  5.31k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (421:9): [True: 0, False: 5.31k]
  ------------------
  422|       |      // TODO: return recoverable error at timeout
  423|      0|      return Error(heif_error_Invalid_input,
  424|      0|                   heif_suberror_End_of_data);
  425|      0|    }
  426|       |
  427|  5.31k|    std::vector<uint8_t> rawData(profile_size);
  428|   212k|    for (size_t i = 0; i < profile_size; i++) {
  ------------------
  |  Branch (428:24): [True: 206k, False: 5.31k]
  ------------------
  429|   206k|      rawData[i] = range.read8();
  430|   206k|    }
  431|       |
  432|  5.31k|    m_color_profile = std::make_shared<color_profile_raw>(colour_type, rawData);
  433|  5.31k|  }
  434|    105|  else {
  435|    105|    return Error(heif_error_Invalid_input,
  436|    105|                 heif_suberror_Unknown_color_profile_type);
  437|    105|  }
  438|       |
  439|  5.63k|  return range.get_error();
  440|  5.74k|}
_ZNK8Box_colr4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  444|  3.28k|{
  445|  3.28k|  Box::dump(sstr, indent, full_log);
  446|       |
  447|  3.28k|  if (m_color_profile) {
  ------------------
  |  Branch (447:7): [True: 3.28k, False: 0]
  ------------------
  448|  3.28k|    sstr << indent << "colour_type: " << fourcc_to_string(get_color_profile_type()) << "\n";
  449|  3.28k|    m_color_profile->dump(sstr, indent, full_log);
  450|  3.28k|  }
  451|      0|  else {
  452|      0|    sstr << indent << "colour_type: ---\n";
  453|      0|    sstr << "no color profile\n";
  454|      0|  }
  455|       |
  456|  3.28k|  return;
  457|  3.28k|}
_ZNK17color_profile_raw4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  461|  2.99k|{
  462|  2.99k|  sstr << indent << "profile size: " << m_data.size() << "\n";
  463|  2.99k|  return;
  464|  2.99k|}
_ZNK18color_profile_nclx4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  468|    281|{
  469|    281|  sstr << indent << "colour_primaries: " << m_profile.m_colour_primaries << "\n"
  470|    281|       << indent << "transfer_characteristics: " << m_profile.m_transfer_characteristics << "\n"
  471|    281|       << indent << "matrix_coefficients: " << m_profile.m_matrix_coefficients << "\n"
  472|    281|       << indent << "full_range_flag: " << m_profile.m_full_range_flag << "\n";
  473|    281|  return;
  474|    281|}

_ZN17color_profile_rawC2EjRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  105|  5.31k|      : m_type(type), m_data(data) {}
_ZNK17color_profile_raw8get_typeEv:
  107|  2.99k|  uint32_t get_type() const override { return m_type; }
_ZN18color_profile_nclxC2Ev:
  175|    329|  color_profile_nclx() { m_profile.set_sRGB_defaults(); }
_ZNK18color_profile_nclx8get_typeEv:
  184|    281|  uint32_t get_type() const override { return fourcc("nclx"); }
_ZN8Box_colrC2Ev:
  205|  5.75k|  {
  206|  5.75k|    set_short_type(fourcc("colr"));
  207|  5.75k|  }
_ZNK8Box_colr22get_color_profile_typeEv:
  211|  3.28k|  uint32_t get_color_profile_type() const { return m_color_profile->get_type(); }
_ZN13color_profileD2Ev:
   92|  5.64k|  virtual ~color_profile() = default;

_ZN8Box_prfr5parseER14BitstreamRangePK20heif_security_limits:
   29|    878|{
   30|    878|  parse_full_box_header(range);
   31|       |
   32|    878|  if (get_version() > 0) {
  ------------------
  |  Branch (32:7): [True: 100, False: 778]
  ------------------
   33|    100|    return unsupported_version_error("prfr");
   34|    100|  }
   35|       |
   36|    778|  uint8_t projection_type = (range.read8() & 0x1F);
   37|    778|  m_projection = static_cast<heif_omaf_image_projection>(projection_type);
   38|    778|  return range.get_error();
   39|    878|}
_ZNK8Box_prfr4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
   42|    728|{
   43|    728|  Box::dump(sstr, indent, full_log);
   44|    728|  sstr << indent << "projection_type: ";
   45|    728|  switch (m_projection) {
   46|     94|    case heif_omaf_image_projection_equirectangular:
  ------------------
  |  Branch (46:5): [True: 94, False: 634]
  ------------------
   47|     94|      sstr << "equirectangular\n";
   48|     94|      break;
   49|    382|    case heif_omaf_image_projection_cube_map:
  ------------------
  |  Branch (49:5): [True: 382, False: 346]
  ------------------
   50|    382|      sstr << "cube-map\n";
   51|    382|      break;
   52|    252|    default:
  ------------------
  |  Branch (52:5): [True: 252, False: 476]
  ------------------
   53|    252|      sstr << "unknown (" << m_projection << ")\n";
   54|    252|      break;
   55|    728|  }
   56|    728|  return;
   57|    728|}

_ZN8Box_prfrC2Ev:
   37|    880|  {
   38|    880|    set_short_type(fourcc("prfr"));
   39|    880|  }
_ZNK8Box_prfr14debug_box_nameEv:
   47|    728|  const char* debug_box_name() const override { return "Projection Format"; }
_ZNK8Box_prfr24get_parse_error_fatalityEv:
   49|    121|  [[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:
  551|      2|{
  552|      2|  return &decoder_libde265;
  553|      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:
  687|      2|{
  688|      2|  return &decoder_openjpeg;
  689|      2|}
decoder_openjpeg.cc:_ZL20openjpeg_init_pluginv:
   62|      2|{
   63|      2|}

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

_Z24get_decoder_plugin_vvdecv:
  449|      2|{
  450|      2|  return &decoder_vvdec;
  451|      2|}
decoder_vvdec.cc:_ZL17vvdec_init_pluginv:
   85|      2|{
   86|      2|}

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

_Z23get_encoder_plugin_jpegv:
  548|      2|{
  549|      2|  return &encoder_plugin_jpeg;
  550|      2|}
encoder_jpeg.cc:_ZL16jpeg_init_pluginv:
  118|      2|{
  119|      2|  jpeg_init_parameters();
  120|      2|}
encoder_jpeg.cc:_ZL20jpeg_init_parametersv:
   80|      2|{
   81|      2|  heif_encoder_parameter* p = jpeg_encoder_params;
   82|      2|  const heif_encoder_parameter** d = jpeg_encoder_parameter_ptrs;
   83|      2|  int i = 0;
   84|       |
   85|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (85:3): [True: 2, False: 0]
  ------------------
   86|      2|  p->version = 2;
   87|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
   88|      2|  p->type = heif_encoder_parameter_type_integer;
   89|      2|  p->integer.default_value = 50;
   90|      2|  p->has_default = true;
   91|      2|  p->integer.have_minimum_maximum = true;
   92|      2|  p->integer.minimum = 0;
   93|      2|  p->integer.maximum = 100;
   94|      2|  p->integer.valid_values = NULL;
   95|      2|  p->integer.num_valid_values = 0;
   96|      2|  d[i++] = p++;
   97|       |
   98|       |  /*
   99|       |  assert(i < MAX_NPARAMETERS);
  100|       |  p->version = 2;
  101|       |  p->name = heif_encoder_parameter_name_lossless;
  102|       |  p->type = heif_encoder_parameter_type_boolean;
  103|       |  p->boolean.default_value = false;
  104|       |  p->has_default = true;
  105|       |  d[i++] = p++;
  106|       |*/
  107|       |
  108|      2|  d[i++] = nullptr;
  109|      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:
  944|      2|{
  945|      2|  return &encoder_plugin_openjph;
  946|      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:
 1369|      2|{
 1370|      2|  return &encoder_plugin_svt;
 1371|      2|}
encoder_svt.cc:_ZL15svt_init_pluginv:
  337|      2|{
  338|      2|  svt_init_parameters();
  339|      2|}
encoder_svt.cc:_ZL19svt_init_parametersv:
  189|      2|{
  190|      2|  heif_encoder_parameter* p = svt_encoder_params;
  191|      2|  const heif_encoder_parameter** d = svt_encoder_parameter_ptrs;
  192|      2|  int i = 0;
  193|       |
  194|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (194:3): [True: 2, False: 0]
  ------------------
  195|      2|  p->version = 2;
  196|      2|  p->name = kParam_speed;
  197|      2|  p->type = heif_encoder_parameter_type_integer;
  198|      2|  p->integer.default_value = 12;
  199|      2|  p->has_default = true;
  200|      2|  p->integer.have_minimum_maximum = true;
  201|      2|  p->integer.minimum = 0;
  202|      2|  p->integer.maximum = 13;
  203|      2|  p->integer.valid_values = nullptr;
  204|      2|  p->integer.num_valid_values = 0;
  205|      2|  d[i++] = p++;
  206|       |
  207|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (207:3): [True: 2, False: 0]
  ------------------
  208|      2|  p->version = 2;
  209|      2|  p->name = kParam_threads;
  210|      2|  p->type = heif_encoder_parameter_type_integer;
  211|      2|  p->integer.default_value = 4;
  212|      2|  p->has_default = true;
  213|      2|  p->integer.have_minimum_maximum = true;
  214|      2|  p->integer.minimum = 1;
  215|      2|  p->integer.maximum = 16;
  216|      2|  p->integer.valid_values = nullptr;
  217|      2|  p->integer.num_valid_values = 0;
  218|      2|  d[i++] = p++;
  219|       |
  220|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (220:3): [True: 2, False: 0]
  ------------------
  221|      2|  p->version = 2;
  222|      2|  p->name = "tile-rows";
  223|      2|  p->type = heif_encoder_parameter_type_integer;
  224|      2|  p->integer.default_value = 4;
  225|      2|  p->has_default = true;
  226|      2|  p->integer.have_minimum_maximum = false;
  227|      2|  p->integer.valid_values = valid_tile_num_values;
  228|      2|  p->integer.num_valid_values = 7;
  229|      2|  d[i++] = p++;
  230|       |
  231|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (231:3): [True: 2, False: 0]
  ------------------
  232|      2|  p->version = 2;
  233|      2|  p->name = "tile-cols";
  234|      2|  p->type = heif_encoder_parameter_type_integer;
  235|      2|  p->integer.default_value = 4;
  236|      2|  p->has_default = true;
  237|      2|  p->integer.have_minimum_maximum = false;
  238|      2|  p->integer.valid_values = valid_tile_num_values;
  239|      2|  p->integer.num_valid_values = 7;
  240|      2|  d[i++] = p++;
  241|       |
  242|       |
  243|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (243:3): [True: 2, False: 0]
  ------------------
  244|      2|  p->version = 2;
  245|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  246|      2|  p->type = heif_encoder_parameter_type_integer;
  247|      2|  p->integer.default_value = 50;
  248|      2|  p->has_default = true;
  249|      2|  p->integer.have_minimum_maximum = true;
  250|      2|  p->integer.minimum = 0;
  251|      2|  p->integer.maximum = 100;
  252|      2|  p->integer.valid_values = NULL;
  253|      2|  p->integer.num_valid_values = 0;
  254|      2|  d[i++] = p++;
  255|       |
  256|      2|#if SVT_AV1_CHECK_VERSION(3, 0, 0)
  257|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (257:3): [True: 2, False: 0]
  ------------------
  258|      2|  p->version = 2;
  259|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  260|      2|  p->type = heif_encoder_parameter_type_boolean;
  261|      2|  p->boolean.default_value = false;
  262|      2|  p->has_default = true;
  263|      2|  d[i++] = p++;
  264|      2|#endif
  265|       |
  266|       |#if 0
  267|       |  assert(i < MAX_NPARAMETERS);
  268|       |  p->version = 2;
  269|       |  p->name = kParam_chroma;
  270|       |  p->type = heif_encoder_parameter_type_string;
  271|       |  p->string.default_value = "420";
  272|       |  p->has_default = true;
  273|       |  p->string.valid_values = kParam_chroma_valid_values;
  274|       |  d[i++] = p++;
  275|       |#endif
  276|       |
  277|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (277:3): [True: 2, False: 0]
  ------------------
  278|      2|  p->version = 2;
  279|      2|  p->name = kParam_qp;
  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 = 63;
  286|      2|  p->integer.valid_values = nullptr;
  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_min_q;
  293|      2|  p->type = heif_encoder_parameter_type_integer;
  294|      2|  p->integer.default_value = 0;
  295|      2|  p->has_default = true;
  296|      2|  p->integer.have_minimum_maximum = true;
  297|      2|  p->integer.minimum = 0;
  298|      2|  p->integer.maximum = 63;
  299|      2|  p->integer.valid_values = nullptr;
  300|      2|  p->integer.num_valid_values = 0;
  301|      2|  d[i++] = p++;
  302|       |
  303|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (303:3): [True: 2, False: 0]
  ------------------
  304|      2|  p->version = 2;
  305|      2|  p->name = kParam_max_q;
  306|      2|  p->type = heif_encoder_parameter_type_integer;
  307|      2|  p->integer.default_value = 63;
  308|      2|  p->has_default = true;
  309|      2|  p->integer.have_minimum_maximum = true;
  310|      2|  p->integer.minimum = 0;
  311|      2|  p->integer.maximum = 63;
  312|      2|  p->integer.valid_values = nullptr;
  313|      2|  p->integer.num_valid_values = 0;
  314|      2|  d[i++] = p++;
  315|       |
  316|      2|#if SVT_AV1_CHECK_VERSION(0, 9, 1)
  317|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (317:3): [True: 2, False: 0]
  ------------------
  318|      2|  p->version = 2;
  319|      2|  p->name = kParam_tune;
  320|      2|  p->type = heif_encoder_parameter_type_string;
  321|      2|  p->string.default_value = "psnr";
  322|      2|  p->has_default = true;
  323|      2|  p->string.valid_values = kParam_tune_valid_values;
  324|      2|  d[i++] = p++;
  325|      2|#endif
  326|       |
  327|      2|  d[i++] = nullptr;
  328|      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:
  921|      2|{
  922|      2|  return &encoder_plugin_vvenc;
  923|      2|}
encoder_vvenc.cc:_ZL17vvenc_init_pluginv:
  141|      2|{
  142|      2|  vvenc_init_parameters();
  143|      2|}
encoder_vvenc.cc:_ZL21vvenc_init_parametersv:
  104|      2|{
  105|      2|  heif_encoder_parameter* p = vvenc_encoder_params;
  106|      2|  const heif_encoder_parameter** d = vvenc_encoder_parameter_ptrs;
  107|      2|  int i = 0;
  108|       |
  109|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (109:3): [True: 2, False: 0]
  ------------------
  110|      2|  p->version = 2;
  111|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  112|      2|  p->type = heif_encoder_parameter_type_integer;
  113|      2|  p->integer.default_value = 50;
  114|      2|  p->has_default = true;
  115|      2|  p->integer.have_minimum_maximum = true;
  116|      2|  p->integer.minimum = 0;
  117|      2|  p->integer.maximum = 100;
  118|      2|  p->integer.valid_values = NULL;
  119|      2|  p->integer.num_valid_values = 0;
  120|      2|  d[i++] = p++;
  121|       |
  122|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (122:3): [True: 2, False: 0]
  ------------------
  123|      2|  p->version = 2;
  124|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  125|      2|  p->type = heif_encoder_parameter_type_boolean;
  126|      2|  p->boolean.default_value = false;
  127|      2|  p->has_default = true;
  128|      2|  d[i++] = p++;
  129|       |
  130|      2|  d[i++] = nullptr;
  131|      2|}

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

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

_Z22get_memory_usage_mutexv:
  221|  71.3k|{
  222|  71.3k|  static std::mutex sMutex;
  223|  71.3k|  return sMutex;
  224|  71.3k|}
_ZN18TotalMemoryTrackerC2EPK20heif_security_limits:
  229|  15.0k|{
  230|  15.0k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  231|       |
  232|  15.0k|  sMemoryUsage[limits] = {};
  233|  15.0k|  m_limits_context = limits;
  234|  15.0k|}
_ZN18TotalMemoryTrackerD2Ev:
  237|  15.0k|{
  238|  15.0k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  239|  15.0k|  sMemoryUsage.erase(m_limits_context);
  240|  15.0k|}
_ZN12MemoryHandle5allocEmmPK20heif_security_limitsPKc:
  261|  7.82k|{
  262|  7.82k|  if (element_size != 0 && count > SIZE_MAX / element_size) {
  ------------------
  |  Branch (262:7): [True: 7.82k, False: 0]
  |  Branch (262:28): [True: 0, False: 7.82k]
  ------------------
  263|      0|    std::stringstream sstr;
  264|      0|    if (reason_description) {
  ------------------
  |  Branch (264:9): [True: 0, False: 0]
  ------------------
  265|      0|      sstr << "Allocation size overflow computing " << count << " * " << element_size
  266|      0|           << " for " << reason_description;
  267|      0|    }
  268|      0|    else {
  269|      0|      sstr << "Allocation size overflow computing " << count << " * " << element_size;
  270|      0|    }
  271|      0|    return {heif_error_Memory_allocation_error,
  272|      0|            heif_suberror_Security_limit_exceeded,
  273|      0|            sstr.str()};
  274|      0|  }
  275|  7.82k|  return alloc(count * element_size, limits_context, reason_description);
  276|  7.82k|}
_ZN12MemoryHandle5allocEmPK20heif_security_limitsPKc:
  281|  20.6k|{
  282|       |  // --- check whether limits are exceeded
  283|       |
  284|  20.6k|  if (!limits_context) {
  ------------------
  |  Branch (284:7): [True: 0, False: 20.6k]
  ------------------
  285|      0|    return Error::Ok;
  286|      0|  }
  287|       |
  288|       |  // check against maximum memory block size
  289|       |
  290|  20.6k|  if (limits_context->max_memory_block_size != 0 &&
  ------------------
  |  Branch (290:7): [True: 20.6k, False: 0]
  ------------------
  291|  20.6k|      memory_amount > limits_context->max_memory_block_size) {
  ------------------
  |  Branch (291:7): [True: 42, False: 20.6k]
  ------------------
  292|     42|    std::stringstream sstr;
  293|       |
  294|     42|    if (reason_description) {
  ------------------
  |  Branch (294:9): [True: 42, False: 0]
  ------------------
  295|     42|      sstr << "Allocating " << memory_amount << " bytes for " << reason_description <<" exceeds the security limit of "
  296|     42|           << limits_context->max_memory_block_size << " bytes";
  297|     42|    }
  298|      0|    else {
  299|      0|      sstr << "Allocating " << memory_amount << " bytes exceeds the security limit of "
  300|      0|           << limits_context->max_memory_block_size << " bytes";
  301|      0|    }
  302|       |
  303|     42|    return {heif_error_Memory_allocation_error,
  304|     42|            heif_suberror_Security_limit_exceeded,
  305|     42|            sstr.str()};
  306|     42|  }
  307|       |
  308|       |  // Resolve to the registered (root) context for total-memory accounting.
  309|       |  // The passed-in limits may be a stack-local derived copy (e.g. tightened for
  310|       |  // ispe) whose `parent` points back to the registered context.
  311|  20.6k|  const heif_security_limits* root_limits = limits_context;
  312|  20.6k|  while (root_limits->version >= 4 && root_limits->parent) {
  ------------------
  |  Branch (312:10): [True: 20.6k, False: 0]
  |  Branch (312:39): [True: 0, False: 20.6k]
  ------------------
  313|      0|    root_limits = root_limits->parent;
  314|      0|  }
  315|       |
  316|       |  // we allow several allocations on the same handle, but they have to be for the same registered context
  317|  20.6k|  if (m_limits_context) {
  ------------------
  |  Branch (317:7): [True: 0, False: 20.6k]
  ------------------
  318|      0|    assert(m_limits_context == root_limits);
  ------------------
  |  Branch (318:5): [True: 0, False: 0]
  ------------------
  319|      0|  }
  320|       |
  321|  20.6k|  if (root_limits == &global_security_limits ||
  ------------------
  |  Branch (321:7): [True: 0, False: 20.6k]
  ------------------
  322|  20.6k|      root_limits == &disabled_security_limits) {
  ------------------
  |  Branch (322:7): [True: 0, False: 20.6k]
  ------------------
  323|      0|    return Error::Ok;
  324|      0|  }
  325|       |
  326|  20.6k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  327|  20.6k|  auto it = sMemoryUsage.find(root_limits);
  328|  20.6k|  if (it == sMemoryUsage.end()) {
  ------------------
  |  Branch (328:7): [True: 0, False: 20.6k]
  ------------------
  329|       |    // Unregistered limits context with no resolvable parent — total-memory
  330|       |    // tracking is not available, but the per-block check above still applies.
  331|      0|    return Error::Ok;
  332|      0|  }
  333|       |
  334|       |  // check against maximum total memory usage
  335|       |
  336|  20.6k|  if (limits_context->max_total_memory != 0 &&
  ------------------
  |  Branch (336:7): [True: 20.6k, False: 0]
  ------------------
  337|  20.6k|      it->second.total_memory_usage + memory_amount > limits_context->max_total_memory) {
  ------------------
  |  Branch (337:7): [True: 29, False: 20.6k]
  ------------------
  338|     29|    std::stringstream sstr;
  339|       |
  340|     29|    if (reason_description) {
  ------------------
  |  Branch (340:9): [True: 29, False: 0]
  ------------------
  341|     29|      sstr << "Memory usage of " << it->second.total_memory_usage + memory_amount
  342|     29|           << " bytes for " << reason_description << " exceeds the security limit of "
  343|     29|           << limits_context->max_total_memory << " bytes of total memory usage";
  344|     29|    }
  345|      0|    else {
  346|      0|      sstr << "Memory usage of " << it->second.total_memory_usage + memory_amount
  347|      0|           << " bytes exceeds the security limit of "
  348|      0|           << limits_context->max_total_memory << " bytes of total memory usage";
  349|      0|    }
  350|       |
  351|     29|    return {heif_error_Memory_allocation_error,
  352|     29|            heif_suberror_Security_limit_exceeded,
  353|     29|            sstr.str()};
  354|     29|  }
  355|       |
  356|       |
  357|       |  // --- register memory usage
  358|       |
  359|  20.6k|  m_limits_context = root_limits;
  360|  20.6k|  m_memory_amount += memory_amount;
  361|       |
  362|  20.6k|  it->second.total_memory_usage += memory_amount;
  363|       |
  364|       |  // remember maximum memory usage (for informational purpose)
  365|  20.6k|  if (it->second.total_memory_usage > it->second.max_memory_usage) {
  ------------------
  |  Branch (365:7): [True: 3.85k, False: 16.7k]
  ------------------
  366|  3.85k|    it->second.max_memory_usage = it->second.total_memory_usage;
  367|  3.85k|  }
  368|       |
  369|  20.6k|  return Error::Ok;
  370|  20.6k|}
_ZN12MemoryHandle4freeEv:
  374|  22.3k|{
  375|  22.3k|  if (m_limits_context) {
  ------------------
  |  Branch (375:7): [True: 20.6k, False: 1.72k]
  ------------------
  376|  20.6k|    std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  377|       |
  378|  20.6k|    auto it = sMemoryUsage.find(m_limits_context);
  379|  20.6k|    if (it != sMemoryUsage.end()) {
  ------------------
  |  Branch (379:9): [True: 20.6k, False: 0]
  ------------------
  380|  20.6k|      it->second.total_memory_usage -= m_memory_amount;
  381|  20.6k|    }
  382|       |
  383|  20.6k|    m_limits_context = nullptr;
  384|  20.6k|    m_memory_amount = 0;
  385|  20.6k|  }
  386|  22.3k|}

_ZN12MemoryHandleD2Ev:
  249|  22.3k|  ~MemoryHandle() { free(); }
_ZN12MemoryHandleC2Ev:
  248|  22.3k|  MemoryHandle() = default;

_ZN13Box_container5parseER14BitstreamRangePK20heif_security_limits:
   30|  2.00k|{
   31|  2.00k|  return read_children(range, READ_CHILDREN_ALL, limits);
   32|  2.00k|}
_ZNK13Box_container4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
   36|  1.72k|{
   37|  1.72k|  Box::dump(sstr, indent, full_log);
   38|  1.72k|  dump_children(sstr, indent, full_log);
   39|       |
   40|  1.72k|  return;
   41|  1.72k|}
_ZNK8Box_mvhd18get_matrix_elementEi:
   45|  10.3k|{
   46|  10.3k|  if (idx == 8) {
  ------------------
  |  Branch (46:7): [True: 1.15k, False: 9.21k]
  ------------------
   47|  1.15k|    return 1.0;
   48|  1.15k|  }
   49|       |
   50|  9.21k|  return m_matrix[idx] / double(0x10000);
   51|  10.3k|}
_ZN8Box_mvhd5parseER14BitstreamRangePK20heif_security_limits:
   55|  1.71k|{
   56|  1.71k|  parse_full_box_header(range);
   57|       |
   58|  1.71k|  if (get_version() > 1) {
  ------------------
  |  Branch (58:7): [True: 1, False: 1.71k]
  ------------------
   59|      1|    return unsupported_version_error("mvhd");
   60|      1|  }
   61|       |
   62|  1.71k|  if (get_version() == 1) {
  ------------------
  |  Branch (62:7): [True: 80, False: 1.63k]
  ------------------
   63|     80|    m_creation_time = range.read64();
   64|     80|    m_modification_time = range.read64();
   65|     80|    m_timescale = range.read32();
   66|     80|    m_duration = range.read64();
   67|     80|  }
   68|  1.63k|  else {
   69|       |    // version==0
   70|  1.63k|    m_creation_time = range.read32();
   71|  1.63k|    m_modification_time = range.read32();
   72|  1.63k|    m_timescale = range.read32();
   73|  1.63k|    m_duration = range.read32();
   74|  1.63k|  }
   75|       |
   76|  1.71k|  m_rate = range.read32();
   77|  1.71k|  m_volume = range.read16();
   78|  1.71k|  range.skip(2);
   79|  1.71k|  range.skip(8);
   80|  15.3k|  for (uint32_t& m : m_matrix) {
  ------------------
  |  Branch (80:20): [True: 15.3k, False: 1.71k]
  ------------------
   81|  15.3k|    m = range.read32();
   82|  15.3k|  }
   83|  11.9k|  for (int i = 0; i < 6; i++) {
  ------------------
  |  Branch (83:19): [True: 10.2k, False: 1.71k]
  ------------------
   84|  10.2k|    range.skip(4);
   85|  10.2k|  }
   86|       |
   87|  1.71k|  m_next_track_ID = range.read32();
   88|       |
   89|  1.71k|  return range.get_error();
   90|  1.71k|}
_ZNK8Box_mvhd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
   94|  1.15k|{
   95|  1.15k|  FullBox::dump(sstr, indent, full_log);
   96|  1.15k|  sstr << indent << "creation time:     " << m_creation_time << "\n"
   97|  1.15k|      << indent << "modification time: " << m_modification_time << "\n"
   98|  1.15k|      << indent << "timescale: " << m_timescale << "\n"
   99|  1.15k|      << indent << "duration: " << m_duration << "\n";
  100|  1.15k|  sstr << indent << "rate: " << get_rate() << "\n"
  101|  1.15k|      << indent << "volume: " << get_volume() << "\n"
  102|  1.15k|      << indent << "matrix:\n";
  103|  4.60k|  for (int y = 0; y < 3; y++) {
  ------------------
  |  Branch (103:19): [True: 3.45k, False: 1.15k]
  ------------------
  104|  3.45k|    sstr << indent << "  ";
  105|  13.8k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (105:21): [True: 10.3k, False: 3.45k]
  ------------------
  106|  10.3k|      sstr << get_matrix_element(i + 3 * y) << " ";
  107|  10.3k|    }
  108|  3.45k|    sstr << "\n";
  109|  3.45k|  }
  110|  1.15k|  sstr << indent << "next_track_ID: " << m_next_track_ID << "\n";
  111|       |
  112|  1.15k|  return;
  113|  1.15k|}
_ZNK8Box_tkhd18get_matrix_elementEi:
  168|  8.71k|{
  169|  8.71k|  if (idx == 8) {
  ------------------
  |  Branch (169:7): [True: 968, False: 7.74k]
  ------------------
  170|    968|    return 1.0;
  171|    968|  }
  172|       |
  173|  7.74k|  return m_matrix[idx] / double(0x10000);
  174|  8.71k|}
_ZN8Box_tkhd5parseER14BitstreamRangePK20heif_security_limits:
  178|  1.06k|{
  179|  1.06k|  parse_full_box_header(range);
  180|       |
  181|  1.06k|  if (get_version() > 1) {
  ------------------
  |  Branch (181:7): [True: 3, False: 1.06k]
  ------------------
  182|      3|    return unsupported_version_error("tkhd");
  183|      3|  }
  184|       |
  185|  1.06k|  if (get_version() == 1) {
  ------------------
  |  Branch (185:7): [True: 84, False: 979]
  ------------------
  186|     84|    m_creation_time = range.read64();
  187|     84|    m_modification_time = range.read64();
  188|     84|    m_track_id = range.read32();
  189|     84|    range.skip(4);
  190|     84|    m_duration = range.read64();
  191|     84|  }
  192|    979|  else {
  193|       |    // version==0
  194|    979|    m_creation_time = range.read32();
  195|    979|    m_modification_time = range.read32();
  196|    979|    m_track_id = range.read32();
  197|    979|    range.skip(4);
  198|    979|    m_duration = range.read32();
  199|    979|  }
  200|       |
  201|  1.06k|  range.skip(8);
  202|  1.06k|  m_layer = range.read16();
  203|  1.06k|  m_alternate_group = range.read16();
  204|  1.06k|  m_volume = range.read16();
  205|  1.06k|  range.skip(2);
  206|  9.56k|  for (uint32_t& m : m_matrix) {
  ------------------
  |  Branch (206:20): [True: 9.56k, False: 1.06k]
  ------------------
  207|  9.56k|    m = range.read32();
  208|  9.56k|  }
  209|       |
  210|  1.06k|  m_width = range.read32();
  211|  1.06k|  m_height = range.read32();
  212|       |
  213|  1.06k|  return range.get_error();
  214|  1.06k|}
_ZNK8Box_tkhd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  218|    968|{
  219|    968|  FullBox::dump(sstr, indent, full_log);
  220|    968|  sstr << indent << "track enabled: " << ((get_flags() & Track_enabled) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (220:43): [True: 283, False: 685]
  ------------------
  221|    968|       << indent << "track in movie: " << ((get_flags() & Track_in_movie) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (221:44): [True: 286, False: 682]
  ------------------
  222|    968|       << indent << "track in preview: " << ((get_flags() & Track_in_preview) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (222:46): [True: 287, False: 681]
  ------------------
  223|    968|       << indent << "track size is aspect ratio: " << ((get_flags() & Track_size_is_aspect_ratio) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (223:56): [True: 277, False: 691]
  ------------------
  224|    968|  sstr << indent << "creation time:     " << m_creation_time << "\n"
  225|    968|      << indent << "modification time: " << m_modification_time << "\n"
  226|    968|      << indent << "track ID: " << m_track_id << "\n"
  227|    968|      << indent << "duration: " << m_duration << "\n";
  228|    968|  sstr << indent << "layer: " << m_layer << "\n"
  229|    968|      << indent << "alternate_group: " << m_alternate_group << "\n"
  230|    968|      << indent << "volume: " << get_volume() << "\n"
  231|    968|      << indent << "matrix:\n";
  232|  3.87k|  for (int y = 0; y < 3; y++) {
  ------------------
  |  Branch (232:19): [True: 2.90k, False: 968]
  ------------------
  233|  2.90k|    sstr << indent << "  ";
  234|  11.6k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (234:21): [True: 8.71k, False: 2.90k]
  ------------------
  235|  8.71k|      sstr << get_matrix_element(i + 3 * y) << " ";
  236|  8.71k|    }
  237|  2.90k|    sstr << "\n";
  238|  2.90k|  }
  239|       |
  240|    968|  sstr << indent << "width: " << get_width() << "\n"
  241|    968|      << indent << "height: " << get_height() << "\n";
  242|       |
  243|    968|  return;
  244|    968|}
_ZN8Box_mdhd5parseER14BitstreamRangePK20heif_security_limits:
  299|    576|{
  300|    576|  parse_full_box_header(range);
  301|       |
  302|    576|  if (get_version() > 1) {
  ------------------
  |  Branch (302:7): [True: 6, False: 570]
  ------------------
  303|      6|    return unsupported_version_error("mdhd");
  304|      6|  }
  305|       |
  306|    570|  if (get_version() == 1) {
  ------------------
  |  Branch (306:7): [True: 68, False: 502]
  ------------------
  307|     68|    m_creation_time = range.read64();
  308|     68|    m_modification_time = range.read64();
  309|     68|    m_timescale = range.read32();
  310|     68|    m_duration = range.read64();
  311|     68|  }
  312|    502|  else {
  313|       |    // version==0
  314|    502|    m_creation_time = range.read32();
  315|    502|    m_modification_time = range.read32();
  316|    502|    m_timescale = range.read32();
  317|    502|    m_duration = range.read32();
  318|    502|  }
  319|       |
  320|    570|  uint16_t language_packed = range.read16();
  321|    570|  m_language[0] = ((language_packed >> 10) & 0x1F) + 0x60;
  322|    570|  m_language[1] = ((language_packed >> 5) & 0x1F) + 0x60;
  323|    570|  m_language[2] = ((language_packed >> 0) & 0x1F) + 0x60;
  324|    570|  m_language[3] = 0;
  325|       |
  326|    570|  range.skip(2);
  327|       |
  328|    570|  return range.get_error();
  329|    576|}
_ZNK8Box_mdhd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  333|    413|{
  334|    413|  FullBox::dump(sstr, indent, full_log);
  335|    413|  sstr << indent << "creation time:     " << m_creation_time << "\n"
  336|    413|      << indent << "modification time: " << m_modification_time << "\n"
  337|    413|      << indent << "timescale: " << m_timescale << "\n"
  338|    413|      << indent << "duration: " << m_duration << "\n";
  339|    413|  sstr << indent << "language: " << m_language << "\n";
  340|       |
  341|    413|  return;
  342|    413|}
_ZN8Box_vmhd5parseER14BitstreamRangePK20heif_security_limits:
  390|    553|{
  391|    553|  parse_full_box_header(range);
  392|       |
  393|    553|  if (get_version() > 0) {
  ------------------
  |  Branch (393:7): [True: 1, False: 552]
  ------------------
  394|      1|    return unsupported_version_error("vmhd");
  395|      1|  }
  396|       |
  397|    552|  m_graphics_mode = range.read16();
  398|  1.65k|  for (uint16_t& c : m_op_color) {
  ------------------
  |  Branch (398:20): [True: 1.65k, False: 552]
  ------------------
  399|  1.65k|    c = range.read16();
  400|  1.65k|  }
  401|       |
  402|    552|  return range.get_error();
  403|    553|}
_ZNK8Box_vmhd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  407|    547|{
  408|    547|  FullBox::dump(sstr, indent, full_log);
  409|    547|  sstr << indent << "graphics mode: " << m_graphics_mode;
  410|    547|  if (m_graphics_mode == 0) {
  ------------------
  |  Branch (410:7): [True: 143, False: 404]
  ------------------
  411|    143|    sstr << " (copy)";
  412|    143|  }
  413|    547|  sstr << "\n"
  414|    547|       << indent << "op color: " << m_op_color[0] << "; " << m_op_color[1] << "; " << m_op_color[2] << "\n";
  415|       |
  416|    547|  return;
  417|    547|}
_ZN8Box_nmhd5parseER14BitstreamRangePK20heif_security_limits:
  436|    290|{
  437|    290|  parse_full_box_header(range);
  438|       |
  439|    290|  if (get_version() > 0) {
  ------------------
  |  Branch (439:7): [True: 2, False: 288]
  ------------------
  440|      2|    return unsupported_version_error("nmhd");
  441|      2|  }
  442|       |
  443|    288|  return range.get_error();
  444|    290|}
_ZNK8Box_nmhd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  448|    211|{
  449|    211|  FullBox::dump(sstr, indent, full_log);
  450|       |
  451|    211|  return;
  452|    211|}
_ZN8Box_stsd5parseER14BitstreamRangePK20heif_security_limits:
  466|  1.49k|{
  467|  1.49k|  parse_full_box_header(range);
  468|       |
  469|  1.49k|  if (get_version() > 0) {
  ------------------
  |  Branch (469:7): [True: 7, False: 1.48k]
  ------------------
  470|      7|    return unsupported_version_error("stsd");
  471|      7|  }
  472|       |
  473|  1.48k|  uint32_t entry_count = range.read32();
  474|       |
  475|  1.48k|  if (limits->max_sample_description_box_entries &&
  ------------------
  |  Branch (475:7): [True: 1.48k, False: 0]
  ------------------
  476|  1.48k|      entry_count > limits->max_sample_description_box_entries) {
  ------------------
  |  Branch (476:7): [True: 7, False: 1.48k]
  ------------------
  477|      7|    std::stringstream sstr;
  478|      7|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample description items exceeds the security limit of "
  479|      7|         << limits->max_sample_description_box_entries << " items";
  480|       |
  481|      7|    return {heif_error_Memory_allocation_error,
  482|      7|            heif_suberror_Security_limit_exceeded,
  483|      7|            sstr.str()};
  484|       |
  485|      7|  }
  486|       |
  487|  4.26k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (487:24): [True: 2.91k, False: 1.34k]
  ------------------
  488|  2.91k|    std::shared_ptr<Box> entrybox;
  489|  2.91k|    Error err = Box::read(range, &entrybox, limits);
  490|  2.91k|    if (err) {
  ------------------
  |  Branch (490:9): [True: 136, False: 2.77k]
  ------------------
  491|    136|      return err;
  492|    136|    }
  493|       |
  494|       |#if 0
  495|       |    auto visualSampleEntry_box = std::dynamic_pointer_cast<Box_VisualSampleEntry>(entrybox);
  496|       |    if (!visualSampleEntry_box) {
  497|       |      return Error{heif_error_Invalid_input,
  498|       |                   heif_suberror_Unspecified,
  499|       |                   "Invalid or unknown VisualSampleEntry in stsd box."};
  500|       |    }
  501|       |#endif
  502|       |
  503|  2.77k|    m_sample_entries.push_back(entrybox);
  504|  2.77k|  }
  505|       |
  506|  1.34k|  return range.get_error();
  507|  1.48k|}
_ZNK8Box_stsd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  511|  1.07k|{
  512|  1.07k|  FullBox::dump(sstr, indent, full_log);
  513|  2.23k|  for (size_t i = 0; i < m_sample_entries.size(); i++) {
  ------------------
  |  Branch (513:22): [True: 1.15k, False: 1.07k]
  ------------------
  514|  1.15k|    sstr << indent << "[" << i << "]\n";
  515|  1.15k|    indent++;
  516|  1.15k|    m_sample_entries[i]->dump(sstr, indent, full_log);
  517|  1.15k|    indent--;
  518|  1.15k|  }
  519|       |
  520|  1.07k|  return;
  521|  1.07k|}
_ZN8Box_stts5parseER14BitstreamRangePK20heif_security_limits:
  540|    506|{
  541|    506|  parse_full_box_header(range);
  542|       |
  543|    506|  if (get_version() > 0) {
  ------------------
  |  Branch (543:7): [True: 2, False: 504]
  ------------------
  544|      2|    return unsupported_version_error("stts");
  545|      2|  }
  546|       |
  547|    504|  uint32_t entry_count = range.read32();
  548|       |
  549|    504|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (549:7): [True: 504, False: 0]
  |  Branch (549:42): [True: 11, False: 493]
  ------------------
  550|     11|    return {
  551|     11|      heif_error_Memory_allocation_error,
  552|     11|      heif_suberror_Security_limit_exceeded,
  553|     11|      "Security limit for maximum number of sequence frames exceeded"
  554|     11|    };
  555|     11|  }
  556|       |
  557|    493|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(TimeToSample),
  ------------------
  |  Branch (557:12): [True: 0, False: 493]
  ------------------
  558|    493|                                       limits, "the 'stts' table")) {
  559|      0|    return err;
  560|      0|  }
  561|       |
  562|    493|  m_entries.resize(entry_count);
  563|       |
  564|   446k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (564:24): [True: 446k, False: 447]
  ------------------
  565|   446k|    if (range.eof()) {
  ------------------
  |  Branch (565:9): [True: 46, False: 445k]
  ------------------
  566|     46|      std::stringstream sstr;
  567|     46|      sstr << "stts box should contain " << entry_count << " entries, but box only contained "
  568|     46|          << i << " entries";
  569|       |
  570|     46|      return {
  571|     46|        heif_error_Invalid_input,
  572|     46|        heif_suberror_End_of_data,
  573|     46|        sstr.str()
  574|     46|      };
  575|     46|    }
  576|       |
  577|   445k|    TimeToSample entry{};
  578|   445k|    entry.sample_count = range.read32();
  579|   445k|    entry.sample_delta = range.read32();
  580|   445k|    m_entries[i] = entry;
  581|   445k|  }
  582|       |
  583|       |  // The run-lengths describe the samples of the track, so their sum is the track's
  584|       |  // sample count: a 32-bit quantity that 'stsz' caps at max_sequence_frames. Nothing
  585|       |  // above bounds the sum, so an oversized table would wrap get_number_of_samples()
  586|       |  // and could thereby slip past the consistency check against 'stsz'.
  587|    447|  {
  588|    447|    uint64_t total_samples = 0;
  589|   445k|    for (const auto& entry : m_entries) {
  ------------------
  |  Branch (589:28): [True: 445k, False: 447]
  ------------------
  590|   445k|      total_samples += entry.sample_count;
  591|   445k|    }
  592|       |
  593|    447|    uint64_t max_samples = (limits->max_sequence_frames > 0
  ------------------
  |  Branch (593:29): [True: 447, False: 0]
  ------------------
  594|    447|                            ? limits->max_sequence_frames
  595|    447|                            : uint64_t{0xFFFFFFFF});
  596|       |
  597|    447|    if (total_samples > max_samples) {
  ------------------
  |  Branch (597:9): [True: 32, False: 415]
  ------------------
  598|     32|      return {
  599|     32|        heif_error_Memory_allocation_error,
  600|     32|        heif_suberror_Security_limit_exceeded,
  601|     32|        "Security limit for maximum number of sequence frames exceeded"
  602|     32|      };
  603|     32|    }
  604|    447|  }
  605|       |
  606|       |  // Precompute the prefix sum of sample_count for O(log entries) lookups in
  607|       |  // get_sample_duration(). Safe as uint32 because the total was just checked to
  608|       |  // be <= max_samples <= 0xFFFFFFFF.
  609|    415|  {
  610|    415|    uint32_t running = 0;
  611|    537|    for (auto& entry : m_entries) {
  ------------------
  |  Branch (611:22): [True: 537, False: 415]
  ------------------
  612|    537|      running += entry.sample_count;
  613|    537|      entry.cumulative_sample_count = running;
  614|    537|    }
  615|    415|  }
  616|       |
  617|    415|  return range.get_error();
  618|    447|}
_ZNK8Box_stts4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  622|    325|{
  623|    325|  FullBox::dump(sstr, indent, full_log);
  624|    689|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (624:22): [True: 365, False: 324]
  ------------------
  625|    365|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_entries.size())) break;
  ------------------
  |  Branch (625:9): [True: 1, False: 364]
  ------------------
  626|    364|    sstr << indent << "[" << i << "] : cnt=" << m_entries[i].sample_count << ", delta=" << m_entries[i].sample_delta << "\n";
  627|    364|  }
  628|       |
  629|    325|  return;
  630|    325|}
_ZN8Box_ctts5parseER14BitstreamRangePK20heif_security_limits:
  719|    949|{
  720|    949|  parse_full_box_header(range);
  721|       |
  722|    949|  uint8_t version = get_version();
  723|       |
  724|    949|  if (version > 1) {
  ------------------
  |  Branch (724:7): [True: 7, False: 942]
  ------------------
  725|      7|    return unsupported_version_error("ctts");
  726|      7|  }
  727|       |
  728|    942|  uint32_t entry_count = range.read32();
  729|       |
  730|    942|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (730:7): [True: 942, False: 0]
  |  Branch (730:42): [True: 9, False: 933]
  ------------------
  731|      9|    return {
  732|      9|      heif_error_Memory_allocation_error,
  733|      9|      heif_suberror_Security_limit_exceeded,
  734|      9|      "Security limit for maximum number of sequence frames exceeded"
  735|      9|    };
  736|      9|  }
  737|       |
  738|    933|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(OffsetToSample),
  ------------------
  |  Branch (738:12): [True: 0, False: 933]
  ------------------
  739|    933|                                       limits, "the 'ctts' table")) {
  740|      0|    return err;
  741|      0|  }
  742|       |
  743|    933|  m_entries.resize(entry_count);
  744|       |
  745|   564k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (745:24): [True: 563k, False: 890]
  ------------------
  746|   563k|    if (range.eof()) {
  ------------------
  |  Branch (746:9): [True: 43, False: 563k]
  ------------------
  747|     43|      std::stringstream sstr;
  748|     43|      sstr << "ctts box should contain " << entry_count << " entries, but box only contained "
  749|     43|          << i << " entries";
  750|       |
  751|     43|      return {
  752|     43|        heif_error_Invalid_input,
  753|     43|        heif_suberror_End_of_data,
  754|     43|        sstr.str()
  755|     43|      };
  756|     43|    }
  757|       |
  758|   563k|    OffsetToSample entry{};
  759|   563k|    entry.sample_count = range.read32();
  760|   563k|    if (version == 0) {
  ------------------
  |  Branch (760:9): [True: 511k, False: 52.6k]
  ------------------
  761|   511k|      uint32_t offset = range.read32();
  762|       |#if 0
  763|       |      // TODO: I disabled this because I found several files that seem to
  764|       |      //       have wrong data. Since we are not using the 'ctts' data anyway,
  765|       |      //       let's not care about it now.
  766|       |
  767|       |      if (offset > INT32_MAX) {
  768|       |        return {
  769|       |          heif_error_Unsupported_feature,
  770|       |          heif_suberror_Unsupported_parameter,
  771|       |          "We don't support offsets > 0x7fff in 'ctts' box."
  772|       |        };
  773|       |      }
  774|       |#endif
  775|       |
  776|   511k|      entry.sample_offset = static_cast<int32_t>(offset);
  777|   511k|    }
  778|  52.6k|    else if (version == 1) {
  ------------------
  |  Branch (778:14): [True: 52.6k, False: 0]
  ------------------
  779|  52.6k|      entry.sample_offset = range.read32s();
  780|  52.6k|    }
  781|      0|    else {
  782|      0|      assert(false);
  ------------------
  |  Branch (782:7): [Folded, False: 0]
  ------------------
  783|      0|    }
  784|       |
  785|   563k|    m_entries[i] = entry;
  786|   563k|  }
  787|       |
  788|       |  // The run-lengths describe the samples of the track, so their sum is the track's
  789|       |  // sample count: a 32-bit quantity that 'stsz' caps at max_sequence_frames. Nothing
  790|       |  // above bounds the sum, so an oversized table would wrap get_number_of_samples()
  791|       |  // and could thereby slip past the consistency check against 'stsz'.
  792|    890|  {
  793|    890|    uint64_t total_samples = 0;
  794|   563k|    for (const auto& entry : m_entries) {
  ------------------
  |  Branch (794:28): [True: 563k, False: 890]
  ------------------
  795|   563k|      total_samples += entry.sample_count;
  796|   563k|    }
  797|       |
  798|    890|    uint64_t max_samples = (limits->max_sequence_frames > 0
  ------------------
  |  Branch (798:29): [True: 890, False: 0]
  ------------------
  799|    890|                            ? limits->max_sequence_frames
  800|    890|                            : uint64_t{0xFFFFFFFF});
  801|       |
  802|    890|    if (total_samples > max_samples) {
  ------------------
  |  Branch (802:9): [True: 73, False: 817]
  ------------------
  803|     73|      return {
  804|     73|        heif_error_Memory_allocation_error,
  805|     73|        heif_suberror_Security_limit_exceeded,
  806|     73|        "Security limit for maximum number of sequence frames exceeded"
  807|     73|      };
  808|     73|    }
  809|    890|  }
  810|       |
  811|    817|  return range.get_error();
  812|    890|}
_ZNK8Box_ctts4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  816|    612|{
  817|    612|  FullBox::dump(sstr, indent, full_log);
  818|  1.33k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (818:22): [True: 727, False: 610]
  ------------------
  819|    727|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_entries.size())) break;
  ------------------
  |  Branch (819:9): [True: 2, False: 725]
  ------------------
  820|    725|    sstr << indent << "[" << i << "] : cnt=" << m_entries[i].sample_count << ", offset=" << m_entries[i].sample_offset << "\n";
  821|    725|  }
  822|       |
  823|    612|  return;
  824|    612|}
_ZN8Box_stsc5parseER14BitstreamRangePK20heif_security_limits:
  920|    359|{
  921|    359|  parse_full_box_header(range);
  922|       |
  923|    359|  if (get_version() > 0) {
  ------------------
  |  Branch (923:7): [True: 1, False: 358]
  ------------------
  924|      1|    return unsupported_version_error("stsc");
  925|      1|  }
  926|       |
  927|    358|  uint32_t entry_count = range.read32();
  928|    358|  if (entry_count == 0) {
  ------------------
  |  Branch (928:7): [True: 4, False: 354]
  ------------------
  929|      4|    return {
  930|      4|      heif_error_Invalid_input,
  931|      4|      heif_suberror_Unspecified,
  932|      4|      "'stsc' box with zero entries."};
  933|      4|  }
  934|       |
  935|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
  936|    354|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (936:7): [True: 354, False: 0]
  |  Branch (936:42): [True: 63, False: 291]
  ------------------
  937|     63|    return {
  938|     63|      heif_error_Invalid_input,
  939|     63|      heif_suberror_Unspecified,
  940|     63|      "Number of chunks in `stsc` box exceeds security limits of maximum number of frames."};
  941|     63|  }
  942|       |
  943|       |
  944|    291|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(SampleToChunk),
  ------------------
  |  Branch (944:12): [True: 0, False: 291]
  ------------------
  945|    291|                                       limits, "the 'stsc' table")) {
  946|      0|    return err;
  947|      0|  }
  948|       |
  949|    291|  m_entries.resize(entry_count);
  950|       |
  951|  1.05k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (951:24): [True: 933, False: 122]
  ------------------
  952|    933|    SampleToChunk entry{};
  953|    933|    entry.first_chunk = range.read32();
  954|    933|    entry.samples_per_chunk = range.read32();
  955|    933|    entry.sample_description_index = range.read32();
  956|       |
  957|    933|    if (entry.samples_per_chunk == 0) {
  ------------------
  |  Branch (957:9): [True: 71, False: 862]
  ------------------
  958|     71|      return {
  959|     71|        heif_error_Invalid_input,
  960|     71|        heif_suberror_Unspecified,
  961|     71|        "'stsc' box with zero samples per chunk entry."};
  962|     71|    }
  963|       |
  964|    862|    if (entry.sample_description_index == 0) {
  ------------------
  |  Branch (964:9): [True: 41, False: 821]
  ------------------
  965|     41|      return {
  966|     41|      heif_error_Invalid_input,
  967|     41|      heif_suberror_Unspecified,
  968|     41|      "'sample_description_index' in 'stsc' must not be 0."};
  969|     41|    }
  970|       |
  971|    821|    if (limits->max_sequence_frames > 0 && entry.samples_per_chunk > limits->max_sequence_frames) {
  ------------------
  |  Branch (971:9): [True: 821, False: 0]
  |  Branch (971:44): [True: 42, False: 779]
  ------------------
  972|     42|      return {
  973|     42|        heif_error_Invalid_input,
  974|     42|        heif_suberror_Unspecified,
  975|     42|        "Number of chunk samples in `stsc` box exceeds security limits of maximum number of frames."};
  976|     42|    }
  977|       |
  978|       |    // Each entry starts a run of chunks, so decreasing values have no meaning (ISO/IEC 14496-12, 8.7.4).
  979|       |    // get_chunk() relies on this order for its binary search. Equal values (empty runs) are tolerated.
  980|    779|    if (i > 0 && entry.first_chunk < m_entries[i - 1].first_chunk) {
  ------------------
  |  Branch (980:9): [True: 597, False: 182]
  |  Branch (980:18): [True: 15, False: 582]
  ------------------
  981|     15|      return {
  982|     15|        heif_error_Invalid_input,
  983|     15|        heif_suberror_Unspecified,
  984|     15|        "'first_chunk' values in 'stsc' box must not decrease."};
  985|     15|    }
  986|       |
  987|    764|    m_entries[i] = entry;
  988|    764|  }
  989|       |
  990|    122|  return range.get_error();
  991|    291|}
_ZNK8Box_stsc4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
  995|    106|{
  996|    106|  FullBox::dump(sstr, indent, full_log);
  997|    385|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (997:22): [True: 280, False: 105]
  ------------------
  998|    280|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_entries.size())) break;
  ------------------
  |  Branch (998:9): [True: 1, False: 279]
  ------------------
  999|    279|    sstr << indent << "[" << i << "]\n"
 1000|    279|        << indent << "  first chunk: " << m_entries[i].first_chunk << "\n"
 1001|    279|        << indent << "  samples per chunk: " << m_entries[i].samples_per_chunk << "\n"
 1002|    279|        << indent << "  sample description index: " << m_entries[i].sample_description_index << "\n";
 1003|    279|  }
 1004|       |
 1005|    106|  return;
 1006|    106|}
_ZN8Box_stco5parseER14BitstreamRangePK20heif_security_limits:
 1065|    630|{
 1066|    630|  parse_full_box_header(range);
 1067|       |
 1068|    630|  if (get_version() > 0) {
  ------------------
  |  Branch (1068:7): [True: 7, False: 623]
  ------------------
 1069|      7|    return unsupported_version_error("stco");
 1070|      7|  }
 1071|       |
 1072|    623|  uint32_t entry_count = range.read32();
 1073|       |
 1074|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
 1075|    623|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (1075:7): [True: 623, False: 0]
  |  Branch (1075:42): [True: 32, False: 591]
  ------------------
 1076|     32|    return {
 1077|     32|      heif_error_Invalid_input,
 1078|     32|      heif_suberror_Unspecified,
 1079|     32|      "Number of chunks in 'stco' box exceeds security limits of maximum number of frames."
 1080|     32|    };
 1081|     32|  }
 1082|       |
 1083|       |  // check required memory
 1084|       |
 1085|    591|  uint64_t mem_size = static_cast<uint64_t>(entry_count) * sizeof(uint32_t);
 1086|    591|  if (auto err = m_memory_handle.alloc(mem_size,
  ------------------
  |  Branch (1086:12): [True: 0, False: 591]
  ------------------
 1087|    591|                                       limits, "the 'stco' table")) {
 1088|      0|    return err;
 1089|      0|  }
 1090|       |
 1091|  1.85k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1091:24): [True: 1.29k, False: 561]
  ------------------
 1092|  1.29k|    m_offsets.push_back(range.read32());
 1093|       |
 1094|  1.29k|    if (range.error()) {
  ------------------
  |  Branch (1094:9): [True: 30, False: 1.26k]
  ------------------
 1095|     30|      return range.get_error();
 1096|     30|    }
 1097|  1.29k|  }
 1098|       |
 1099|    561|  return range.get_error();
 1100|    591|}
_ZNK8Box_stco4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1104|    305|{
 1105|    305|  FullBox::dump(sstr, indent, full_log);
 1106|    881|  for (size_t i = 0; i < m_offsets.size(); i++) {
  ------------------
  |  Branch (1106:22): [True: 577, False: 304]
  ------------------
 1107|    577|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_offsets.size())) break;
  ------------------
  |  Branch (1107:9): [True: 1, False: 576]
  ------------------
 1108|    576|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_offsets[i] << std::dec << "\n";
 1109|    576|  }
 1110|       |
 1111|    305|  return;
 1112|    305|}
_ZN8Box_stsz5parseER14BitstreamRangePK20heif_security_limits:
 1154|  1.10k|{
 1155|  1.10k|  parse_full_box_header(range);
 1156|       |
 1157|  1.10k|  if (get_version() > 0) {
  ------------------
  |  Branch (1157:7): [True: 6, False: 1.09k]
  ------------------
 1158|      6|    return unsupported_version_error("stsz");
 1159|      6|  }
 1160|       |
 1161|  1.09k|  m_fixed_sample_size = range.read32();
 1162|  1.09k|  m_sample_count = range.read32();
 1163|       |
 1164|  1.09k|  if (limits->max_sequence_frames > 0 && m_sample_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (1164:7): [True: 1.09k, False: 0]
  |  Branch (1164:42): [True: 27, False: 1.06k]
  ------------------
 1165|     27|    return {
 1166|     27|      heif_error_Memory_allocation_error,
 1167|     27|      heif_suberror_Security_limit_exceeded,
 1168|     27|      "Security limit for maximum number of sequence frames exceeded"
 1169|     27|    };
 1170|     27|  }
 1171|       |
 1172|  1.06k|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1172:7): [True: 720, False: 349]
  ------------------
 1173|       |    // check required memory
 1174|       |
 1175|    720|    if (auto err = m_memory_handle.alloc(m_sample_count, sizeof(uint32_t),
  ------------------
  |  Branch (1175:14): [True: 0, False: 720]
  ------------------
 1176|    720|                                         limits, "the 'stsz' table")) {
 1177|      0|      return err;
 1178|      0|    }
 1179|       |
 1180|  1.73k|    for (uint32_t i = 0; i < m_sample_count; i++) {
  ------------------
  |  Branch (1180:26): [True: 1.04k, False: 693]
  ------------------
 1181|  1.04k|      if (range.eof()) {
  ------------------
  |  Branch (1181:11): [True: 14, False: 1.02k]
  ------------------
 1182|     14|        std::stringstream sstr;
 1183|     14|        sstr << "stsz box should contain " << m_sample_count << " entries, but box only contained "
 1184|     14|            << i << " entries";
 1185|       |
 1186|     14|        return {
 1187|     14|          heif_error_Invalid_input,
 1188|     14|          heif_suberror_End_of_data,
 1189|     14|          sstr.str()
 1190|     14|        };
 1191|     14|      }
 1192|       |
 1193|  1.02k|      m_sample_sizes.push_back(range.read32());
 1194|       |
 1195|  1.02k|      if (range.error()) {
  ------------------
  |  Branch (1195:11): [True: 13, False: 1.01k]
  ------------------
 1196|     13|        return range.get_error();
 1197|     13|      }
 1198|  1.02k|    }
 1199|    720|  }
 1200|       |
 1201|  1.04k|  return range.get_error();
 1202|  1.06k|}
_ZNK8Box_stsz4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1206|  1.00k|{
 1207|  1.00k|  FullBox::dump(sstr, indent, full_log);
 1208|  1.00k|  sstr << indent << "sample count: " << m_sample_count << "\n";
 1209|  1.00k|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1209:7): [True: 683, False: 317]
  ------------------
 1210|  1.26k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1210:24): [True: 579, False: 682]
  ------------------
 1211|    579|      if (dump_reached_entry_limit(sstr, indent, full_log, i, m_sample_sizes.size())) break;
  ------------------
  |  Branch (1211:11): [True: 1, False: 578]
  ------------------
 1212|    578|      sstr << indent << "[" << i << "] : " << m_sample_sizes[i] << "\n";
 1213|    578|    }
 1214|    683|  }
 1215|    317|  else {
 1216|    317|    sstr << indent << "fixed sample size: " << m_fixed_sample_size << "\n";
 1217|    317|  }
 1218|       |
 1219|  1.00k|  return;
 1220|  1.00k|}
_ZN8Box_stss5parseER14BitstreamRangePK20heif_security_limits:
 1272|    486|{
 1273|    486|  parse_full_box_header(range);
 1274|       |
 1275|    486|  if (get_version() > 0) {
  ------------------
  |  Branch (1275:7): [True: 3, False: 483]
  ------------------
 1276|      3|    return unsupported_version_error("stss");
 1277|      3|  }
 1278|       |
 1279|    483|  uint32_t sample_count = range.read32();
 1280|       |
 1281|       |  // check required memory
 1282|       |
 1283|    483|  if (auto err = m_memory_handle.alloc(sample_count, sizeof(uint32_t),
  ------------------
  |  Branch (1283:12): [True: 55, False: 428]
  ------------------
 1284|    483|                                       limits, "the 'stss' table")) {
 1285|     55|    return err;
 1286|     55|  }
 1287|       |
 1288|  1.70k|  for (uint32_t i = 0; i < sample_count; i++) {
  ------------------
  |  Branch (1288:24): [True: 1.32k, False: 386]
  ------------------
 1289|  1.32k|    m_sync_samples.push_back(range.read32());
 1290|       |
 1291|  1.32k|    if (range.error()) {
  ------------------
  |  Branch (1291:9): [True: 42, False: 1.28k]
  ------------------
 1292|     42|      return range.get_error();
 1293|     42|    }
 1294|  1.32k|  }
 1295|       |
 1296|    386|  return range.get_error();
 1297|    428|}
_ZNK8Box_stss4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1301|    329|{
 1302|    329|  FullBox::dump(sstr, indent, full_log);
 1303|  1.17k|  for (size_t i = 0; i < m_sync_samples.size(); i++) {
  ------------------
  |  Branch (1303:22): [True: 851, False: 328]
  ------------------
 1304|    851|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_sync_samples.size())) break;
  ------------------
  |  Branch (1304:9): [True: 1, False: 850]
  ------------------
 1305|    850|    sstr << indent << "[" << i << "] : " << m_sync_samples[i] << "\n";
 1306|    850|  }
 1307|       |
 1308|    329|  return;
 1309|    329|}
_ZN17VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1339|  1.23k|{
 1340|  1.23k|  (void)limits;
 1341|       |
 1342|  1.23k|  range.skip(6);
 1343|  1.23k|  data_reference_index = range.read16();
 1344|       |
 1345|  1.23k|  pre_defined = range.read16();
 1346|  1.23k|  range.skip(2);
 1347|  3.70k|  for (uint32_t& p : pre_defined2) {
  ------------------
  |  Branch (1347:20): [True: 3.70k, False: 1.23k]
  ------------------
 1348|  3.70k|    p = range.read32();
 1349|  3.70k|  }
 1350|  1.23k|  width = range.read16();
 1351|  1.23k|  height = range.read16();
 1352|  1.23k|  horizresolution = range.read32();
 1353|  1.23k|  vertresolution = range.read32();
 1354|  1.23k|  range.skip(4);
 1355|  1.23k|  frame_count = range.read16();
 1356|  1.23k|  compressorname = range.read_fixed_string(32);
 1357|  1.23k|  depth = range.read16();
 1358|  1.23k|  pre_defined3 = range.read16s();
 1359|       |
 1360|       |  // other boxes from derived specifications
 1361|       |  //std::shared_ptr<Box_clap> clap; // optional // TODO
 1362|       |  //std::shared_ptr<Box_pixi> pixi; // optional // TODO
 1363|       |
 1364|  1.23k|  return Error::Ok;
 1365|  1.23k|}
_ZNK17VisualSampleEntry4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1395|    654|{
 1396|    654|  sstr << indent << "data reference index: " << data_reference_index << "\n"
 1397|    654|       << indent << "width: " << width << "\n"
 1398|    654|       << indent << "height: " << height << "\n"
 1399|    654|       << indent << "horiz. resolution: " << get_horizontal_resolution() << "\n"
 1400|    654|       << indent << "vert. resolution: " << get_vertical_resolution() << "\n"
 1401|    654|       << indent << "frame count: " << frame_count << "\n"
 1402|    654|       << indent << "compressorname: " << compressorname << "\n"
 1403|    654|       << indent << "depth: " << depth << "\n";
 1404|       |
 1405|    654|  return;
 1406|    654|}
_ZNK22Box_URIMetaSampleEntry4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1426|    507|{
 1427|    507|  Box::dump(sstr, indent, full_log);
 1428|    507|  sstr << indent << "data reference index: " << data_reference_index << "\n";
 1429|    507|  dump_children(sstr, indent, full_log);
 1430|    507|  return;
 1431|    507|}
_ZN22Box_URIMetaSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1435|    728|{
 1436|    728|  range.skip(6);
 1437|    728|  data_reference_index = range.read16();
 1438|       |
 1439|    728|  Error err = read_children(range, READ_CHILDREN_ALL, limits);
 1440|    728|  if (err) {
  ------------------
  |  Branch (1440:7): [True: 94, False: 634]
  ------------------
 1441|     94|    return err;
 1442|     94|  }
 1443|       |
 1444|    634|  return Error::Ok;
 1445|    728|}
_ZN7Box_uri5parseER14BitstreamRangePK20heif_security_limits:
 1449|    639|{
 1450|    639|  parse_full_box_header(range);
 1451|       |
 1452|    639|  if (get_version() > 0) {
  ------------------
  |  Branch (1452:7): [True: 9, False: 630]
  ------------------
 1453|      9|    return unsupported_version_error("uri ");
 1454|      9|  }
 1455|       |
 1456|    630|  m_uri = range.read_string();
 1457|       |
 1458|    630|  return range.get_error();
 1459|    639|}
_ZNK7Box_uri4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1463|    626|{
 1464|    626|  FullBox::dump(sstr, indent, full_log);
 1465|    626|  sstr << indent << "uri: " << m_uri << "\n";
 1466|       |
 1467|    626|  return;
 1468|    626|}
_ZN8Box_ccst5parseER14BitstreamRangePK20heif_security_limits:
 1485|    401|{
 1486|    401|  parse_full_box_header(range);
 1487|       |
 1488|    401|  if (get_version() > 0) {
  ------------------
  |  Branch (1488:7): [True: 1, False: 400]
  ------------------
 1489|      1|    return unsupported_version_error("ccst");
 1490|      1|  }
 1491|       |
 1492|    400|  uint32_t bits = range.read32();
 1493|       |
 1494|    400|  auto& constraints = m_codingConstraints;
 1495|       |
 1496|    400|  constraints.all_ref_pics_intra = (bits & 0x80000000) != 0;
 1497|    400|  constraints.intra_pred_used = (bits & 0x40000000) != 0;
 1498|    400|  constraints.max_ref_per_pic = (bits >> 26) & 0x0F;
 1499|       |
 1500|    400|  return range.get_error();
 1501|    401|}
_ZNK8Box_ccst4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1505|    396|{
 1506|    396|  const auto& constraints = m_codingConstraints;
 1507|       |
 1508|    396|  FullBox::dump(sstr, indent, full_log);
 1509|    396|  sstr << indent << "all ref pics intra: " << std::boolalpha <<constraints.all_ref_pics_intra << "\n"
 1510|    396|       << indent << "intra pred used: " << constraints.intra_pred_used << "\n"
 1511|    396|       << indent << "max ref per pic: " << ((int) constraints.max_ref_per_pic) << "\n";
 1512|       |
 1513|    396|  return;
 1514|    396|}
_ZN8Box_auxi5parseER14BitstreamRangePK20heif_security_limits:
 1544|    910|{
 1545|    910|  parse_full_box_header(range);
 1546|       |
 1547|    910|  if (get_version() > 0) {
  ------------------
  |  Branch (1547:7): [True: 2, False: 908]
  ------------------
 1548|      2|    return unsupported_version_error("auxi");
 1549|      2|  }
 1550|       |
 1551|    908|  m_aux_track_type = range.read_string();
 1552|       |
 1553|    908|  return range.get_error();
 1554|    910|}
_ZNK8Box_auxi4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1558|    904|{
 1559|    904|  FullBox::dump(sstr, indent, full_log);
 1560|    904|  sstr << indent << "aux track info type: " << m_aux_track_type << "\n";
 1561|       |
 1562|    904|  return;
 1563|    904|}
_ZNK21Box_VisualSampleEntry4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1596|    654|{
 1597|    654|  Box::dump(sstr, indent, full_log);
 1598|    654|  m_visualSampleEntry.dump(sstr, indent, full_log);
 1599|    654|  dump_children(sstr, indent, full_log);
 1600|    654|  return;
 1601|    654|}
_ZN21Box_VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1605|  1.23k|{
 1606|  1.23k|  auto err = m_visualSampleEntry.parse(range, limits);
 1607|  1.23k|  if (err) {
  ------------------
  |  Branch (1607:7): [True: 0, False: 1.23k]
  ------------------
 1608|      0|    return err;
 1609|      0|  }
 1610|       |
 1611|  1.23k|  err = read_children(range, READ_CHILDREN_ALL, limits);
 1612|  1.23k|  if (err) {
  ------------------
  |  Branch (1612:7): [True: 452, False: 782]
  ------------------
 1613|    452|    return err;
 1614|    452|  }
 1615|       |
 1616|    782|  return Error::Ok;
 1617|  1.23k|}
_ZNK8Box_sbgp4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1621|    462|{
 1622|    462|  FullBox::dump(sstr, indent, full_log);
 1623|    462|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1624|       |
 1625|    462|  if (m_grouping_type_parameter) {
  ------------------
  |  Branch (1625:7): [True: 279, False: 183]
  ------------------
 1626|    279|    sstr << indent << "grouping_type_parameter: " << *m_grouping_type_parameter << "\n";
 1627|    279|  }
 1628|       |
 1629|    462|  uint32_t total_samples = 0;
 1630|   123k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (1630:22): [True: 122k, False: 462]
  ------------------
 1631|   122k|    if (full_log || i < MAX_DUMP_ENTRIES) {
  ------------------
  |  Branch (1631:9): [True: 0, False: 122k]
  |  Branch (1631:21): [True: 1.88k, False: 120k]
  ------------------
 1632|  1.88k|      sstr << indent << "[" << std::setw(2) << (i + 1) << "] : " << std::setw(3) << m_entries[i].sample_count << "x " << m_entries[i].group_description_index << "\n";
 1633|  1.88k|    }
 1634|   122k|    total_samples += m_entries[i].sample_count;
 1635|   122k|  }
 1636|    462|  if (!full_log && m_entries.size() > MAX_DUMP_ENTRIES) {
  ------------------
  |  Branch (1636:7): [True: 462, False: 0]
  |  Branch (1636:20): [True: 11, False: 451]
  ------------------
 1637|     11|    sstr << indent << "... (" << (m_entries.size() - MAX_DUMP_ENTRIES) << " more)\n";
 1638|     11|  }
 1639|    462|  sstr << indent << "total samples: " << total_samples << "\n";
 1640|       |
 1641|    462|  return;
 1642|    462|}
_ZN8Box_sbgp5parseER14BitstreamRangePK20heif_security_limits:
 1684|    518|{
 1685|    518|  parse_full_box_header(range);
 1686|       |
 1687|    518|  if (get_version() > 1) {
  ------------------
  |  Branch (1687:7): [True: 1, False: 517]
  ------------------
 1688|      1|    return unsupported_version_error("sbgp");
 1689|      1|  }
 1690|       |
 1691|    517|  m_grouping_type = range.read32();
 1692|       |
 1693|    517|  if (get_version() == 1) {
  ------------------
  |  Branch (1693:7): [True: 295, False: 222]
  ------------------
 1694|    295|    m_grouping_type_parameter = range.read32();
 1695|    295|  }
 1696|       |
 1697|    517|  uint32_t count = range.read32();
 1698|    517|  if (auto err = m_memory_handle.alloc(count, sizeof(Entry),
  ------------------
  |  Branch (1698:12): [True: 8, False: 509]
  ------------------
 1699|    517|                                       limits, "the 'sample to group' table")) {
 1700|      8|    return err;
 1701|      8|  }
 1702|       |
 1703|   127k|  for (uint32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1703:24): [True: 127k, False: 481]
  ------------------
 1704|   127k|    Entry e{};
 1705|   127k|    e.sample_count = range.read32();
 1706|   127k|    e.group_description_index = range.read32();
 1707|   127k|    m_entries.push_back(e);
 1708|   127k|    if (range.error()) {
  ------------------
  |  Branch (1708:9): [True: 28, False: 127k]
  ------------------
 1709|     28|      return range.get_error();
 1710|     28|    }
 1711|   127k|  }
 1712|       |
 1713|    481|  return range.get_error();
 1714|    509|}
_ZNK21SampleGroupEntry_refs4dumpEv:
 1718|  28.6k|{
 1719|  28.6k|  std::stringstream sstr;
 1720|  28.6k|  if (m_sample_id==0) {
  ------------------
  |  Branch (1720:7): [True: 27.7k, False: 877]
  ------------------
 1721|  27.7k|    sstr << "0 (non-ref) refs =";
 1722|  27.7k|  }
 1723|    877|  else {
 1724|    877|    sstr << m_sample_id << " refs =";
 1725|    877|  }
 1726|  51.0k|  for (uint32_t ref : m_direct_reference_sample_id) {
  ------------------
  |  Branch (1726:21): [True: 51.0k, False: 28.6k]
  ------------------
 1727|  51.0k|    sstr << ' ' << ref;
 1728|  51.0k|  }
 1729|       |
 1730|  28.6k|  return sstr.str();
 1731|  28.6k|}
_ZN21SampleGroupEntry_refs5parseER14BitstreamRangePK20heif_security_limits:
 1739|  80.6k|{
 1740|  80.6k|  m_sample_id = range.read32();
 1741|  80.6k|  uint8_t cnt = range.read8();
 1742|   132k|  for (uint8_t i = 0; i < cnt; i++) {
  ------------------
  |  Branch (1742:23): [True: 51.4k, False: 80.6k]
  ------------------
 1743|  51.4k|    m_direct_reference_sample_id.push_back(range.read32());
 1744|  51.4k|  }
 1745|       |
 1746|  80.6k|  return Error::Ok;
 1747|  80.6k|}
_ZNK8Box_sgpd4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1768|  1.63k|{
 1769|  1.63k|  FullBox::dump(sstr, indent, full_log);
 1770|       |
 1771|  1.63k|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1772|  1.63k|  if (m_default_length) {
  ------------------
  |  Branch (1772:7): [True: 477, False: 1.15k]
  ------------------
 1773|    477|    sstr << indent << "default_length: " << *m_default_length << "\n";
 1774|    477|  }
 1775|  1.63k|  if (m_default_sample_description_index) {
  ------------------
  |  Branch (1775:7): [True: 643, False: 988]
  ------------------
 1776|    643|    sstr << indent << "default_sample_description_index: " << *m_default_sample_description_index << "\n";
 1777|    643|  }
 1778|       |
 1779|  30.2k|  for (size_t i=0; i<m_entries.size(); i++) {
  ------------------
  |  Branch (1779:20): [True: 28.8k, False: 1.37k]
  ------------------
 1780|  28.8k|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_entries.size())) break;
  ------------------
  |  Branch (1780:9): [True: 256, False: 28.6k]
  ------------------
 1781|  28.6k|    sstr << indent << "[" << (i+1) << "] : ";
 1782|  28.6k|    if (m_entries[i].sample_group_entry) {
  ------------------
  |  Branch (1782:9): [True: 28.6k, False: 0]
  ------------------
 1783|  28.6k|      sstr << m_entries[i].sample_group_entry->dump() << "\n";
 1784|  28.6k|    }
 1785|      0|    else {
 1786|      0|      sstr << "empty (description_length=" << m_entries[i].description_length << ")\n";
 1787|      0|    }
 1788|  28.6k|  }
 1789|       |
 1790|  1.63k|  return;
 1791|  1.63k|}
_ZN8Box_sgpd5parseER14BitstreamRangePK20heif_security_limits:
 1801|  1.67k|{
 1802|  1.67k|  parse_full_box_header(range);
 1803|       |
 1804|  1.67k|  m_grouping_type = range.read32();
 1805|       |
 1806|       |  // Readers are expected to ignore sgpd boxes with grouping_types they don't
 1807|       |  // understand. Skip parsing of unknown types to avoid allocating Entry objects
 1808|       |  // for entries whose payload we wouldn't read anyway (and which, with
 1809|       |  // version==1 + default_length!=0 or version>=2, would consume zero bytes per
 1810|       |  // iteration and allow unbounded allocation from a tiny box).
 1811|  1.67k|  if (m_grouping_type != fourcc("refs")) {
  ------------------
  |  Branch (1811:7): [True: 442, False: 1.23k]
  ------------------
 1812|    442|    return Error::Ok;
 1813|    442|  }
 1814|       |
 1815|  1.23k|  if (get_version() == 1) {
  ------------------
  |  Branch (1815:7): [True: 482, False: 752]
  ------------------
 1816|    482|    m_default_length = range.read32();
 1817|    482|  }
 1818|       |
 1819|  1.23k|  if (get_version() >= 2) {
  ------------------
  |  Branch (1819:7): [True: 656, False: 578]
  ------------------
 1820|    656|    m_default_sample_description_index = range.read32();
 1821|    656|  }
 1822|       |
 1823|  1.23k|  uint32_t entry_count = range.read32();
 1824|       |
 1825|  1.23k|  if (limits->max_sample_group_description_box_entries &&
  ------------------
  |  Branch (1825:7): [True: 1.23k, False: 0]
  ------------------
 1826|  1.23k|      entry_count > limits->max_sample_group_description_box_entries) {
  ------------------
  |  Branch (1826:7): [True: 40, False: 1.19k]
  ------------------
 1827|     40|    std::stringstream sstr;
 1828|     40|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample group description items exceeds the security limit of "
 1829|     40|         << limits->max_sample_group_description_box_entries << " items";
 1830|       |
 1831|     40|    return {heif_error_Memory_allocation_error,
 1832|     40|            heif_suberror_Security_limit_exceeded,
 1833|     40|            sstr.str()};
 1834|       |
 1835|     40|  }
 1836|       |
 1837|  1.19k|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(Entry),
  ------------------
  |  Branch (1837:12): [True: 0, False: 1.19k]
  ------------------
 1838|  1.19k|                                       limits, "the 'sgpd' table")) {
 1839|      0|    return err;
 1840|      0|  }
 1841|       |
 1842|  81.8k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1842:24): [True: 80.6k, False: 1.19k]
  ------------------
 1843|  80.6k|    Entry entry;
 1844|       |
 1845|  80.6k|    if (get_version() == 1) {
  ------------------
  |  Branch (1845:9): [True: 50.3k, False: 30.3k]
  ------------------
 1846|  50.3k|      if (*m_default_length == 0) {
  ------------------
  |  Branch (1846:11): [True: 620, False: 49.6k]
  ------------------
 1847|    620|        entry.description_length = range.read32();
 1848|    620|      }
 1849|  50.3k|    }
 1850|       |
 1851|  80.6k|    switch (m_grouping_type) {
 1852|  80.6k|      case fourcc("refs"): {
  ------------------
  |  Branch (1852:7): [True: 80.6k, False: 0]
  ------------------
 1853|  80.6k|        entry.sample_group_entry = std::make_shared<SampleGroupEntry_refs>();
 1854|  80.6k|        Error err = entry.sample_group_entry->parse(range, limits);
 1855|  80.6k|        if (err) {
  ------------------
  |  Branch (1855:13): [True: 0, False: 80.6k]
  ------------------
 1856|      0|          return err;
 1857|      0|        }
 1858|       |
 1859|  80.6k|        break;
 1860|  80.6k|      }
 1861|       |
 1862|  80.6k|      default:
  ------------------
  |  Branch (1862:7): [True: 0, False: 80.6k]
  ------------------
 1863|      0|        break;
 1864|  80.6k|    }
 1865|       |
 1866|  80.6k|    m_entries.emplace_back(std::move(entry));
 1867|  80.6k|  }
 1868|       |
 1869|  1.19k|  return Error::Ok;
 1870|  1.19k|}
_ZNK8Box_btrt4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1874|    354|{
 1875|    354|  FullBox::dump(sstr, indent, full_log);
 1876|       |
 1877|    354|  sstr << indent << "bufferSizeDB: " << m_bufferSizeDB << " bytes\n";
 1878|    354|  sstr << indent << "max bitrate: " << m_maxBitrate << " bits/sec\n";
 1879|    354|  sstr << indent << "avg bitrate: " << m_avgBitrate << " bits/sec\n";
 1880|       |
 1881|    354|  return;
 1882|    354|}
_ZN8Box_btrt5parseER14BitstreamRangePK20heif_security_limits:
 1900|    531|{
 1901|    531|  m_bufferSizeDB = range.read32();
 1902|    531|  m_maxBitrate = range.read32();
 1903|    531|  m_avgBitrate = range.read32();
 1904|       |
 1905|    531|  return Error::Ok;
 1906|    531|}
_ZNK8Box_saiz4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 1971|    952|{
 1972|    952|  FullBox::dump(sstr, indent, full_log);
 1973|       |
 1974|    952|  sstr << indent << "aux_info_type: ";
 1975|    952|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (1975:7): [True: 469, False: 483]
  ------------------
 1976|    469|    sstr << "0\n";
 1977|    469|  }
 1978|    483|  else {
 1979|    483|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 1980|    483|  }
 1981|       |
 1982|    952|  sstr << indent << "aux_info_type_parameter: ";
 1983|    952|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (1983:7): [True: 471, False: 481]
  ------------------
 1984|    471|    sstr << "0\n";
 1985|    471|  }
 1986|    481|  else {
 1987|    481|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 1988|    481|  }
 1989|       |
 1990|    952|  sstr << indent << "default sample size: ";
 1991|    952|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1991:7): [True: 693, False: 259]
  ------------------
 1992|    693|    sstr << "0 (variable)\n";
 1993|    693|  }
 1994|    259|  else {
 1995|    259|    sstr << ((int)m_default_sample_info_size) << "\n";
 1996|    259|  }
 1997|       |
 1998|    952|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1998:7): [True: 693, False: 259]
  ------------------
 1999|  3.08k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1999:24): [True: 2.40k, False: 674]
  ------------------
 2000|  2.40k|      if (dump_reached_entry_limit(sstr, indent, full_log, i, m_sample_sizes.size())) break;
  ------------------
  |  Branch (2000:11): [True: 19, False: 2.38k]
  ------------------
 2001|  2.38k|      sstr << indent << "[" << i << "] : " << ((int) m_sample_sizes[i]) << "\n";
 2002|  2.38k|    }
 2003|    693|  }
 2004|       |
 2005|    952|  return;
 2006|    952|}
_ZN8Box_saiz5parseER14BitstreamRangePK20heif_security_limits:
 2045|  1.14k|{
 2046|  1.14k|  parse_full_box_header(range);
 2047|       |
 2048|  1.14k|  if (get_flags() & 1) {
  ------------------
  |  Branch (2048:7): [True: 489, False: 653]
  ------------------
 2049|    489|    m_aux_info_type = range.read32();
 2050|    489|    m_aux_info_type_parameter = range.read32();
 2051|    489|  }
 2052|       |
 2053|  1.14k|  m_default_sample_info_size = range.read8();
 2054|  1.14k|  m_num_samples = range.read32();
 2055|       |
 2056|  1.14k|  if (limits && limits->max_sequence_frames > 0 && m_num_samples > limits->max_sequence_frames) {
  ------------------
  |  Branch (2056:7): [True: 1.14k, False: 0]
  |  Branch (2056:17): [True: 1.14k, False: 0]
  |  Branch (2056:52): [True: 40, False: 1.10k]
  ------------------
 2057|     40|    return {
 2058|     40|      heif_error_Memory_allocation_error,
 2059|     40|      heif_suberror_Security_limit_exceeded,
 2060|     40|      "Number of 'saiz' samples exceeds the maximum number of sequence frames."
 2061|     40|    };
 2062|     40|  }
 2063|       |
 2064|  1.10k|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (2064:7): [True: 838, False: 264]
  ------------------
 2065|       |    // check required memory
 2066|       |
 2067|    838|    uint64_t mem_size = m_num_samples;
 2068|    838|    if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'sample aux info sizes' (saiz) table")) {
  ------------------
  |  Branch (2068:14): [True: 0, False: 838]
  ------------------
 2069|      0|      return err;
 2070|      0|    }
 2071|       |
 2072|       |    // read whole table at once
 2073|       |
 2074|    838|    m_sample_sizes.resize(m_num_samples);
 2075|    838|    range.read(m_sample_sizes.data(), m_num_samples);
 2076|    838|  }
 2077|       |
 2078|  1.10k|  return range.get_error();
 2079|  1.10k|}
_ZNK8Box_saio4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2116|  1.42k|{
 2117|  1.42k|  FullBox::dump(sstr, indent, full_log);
 2118|       |
 2119|  1.42k|  sstr << indent << "aux_info_type: ";
 2120|  1.42k|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (2120:7): [True: 884, False: 544]
  ------------------
 2121|    884|    sstr << "0\n";
 2122|    884|  }
 2123|    544|  else {
 2124|    544|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 2125|    544|  }
 2126|       |
 2127|  1.42k|  sstr << indent << "aux_info_type_parameter: ";
 2128|  1.42k|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (2128:7): [True: 800, False: 628]
  ------------------
 2129|    800|    sstr << "0\n";
 2130|    800|  }
 2131|    628|  else {
 2132|    628|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 2133|    628|  }
 2134|       |
 2135|  2.12k|  for (size_t i = 0; i < m_chunk_offset.size(); i++) {
  ------------------
  |  Branch (2135:22): [True: 699, False: 1.42k]
  ------------------
 2136|    699|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_chunk_offset.size())) break;
  ------------------
  |  Branch (2136:9): [True: 1, False: 698]
  ------------------
 2137|    698|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_chunk_offset[i] << "\n";
 2138|    698|  }
 2139|       |
 2140|  1.42k|  return;
 2141|  1.42k|}
_ZN8Box_saio5parseER14BitstreamRangePK20heif_security_limits:
 2197|  1.59k|{
 2198|  1.59k|  parse_full_box_header(range);
 2199|       |
 2200|  1.59k|  if (get_flags() & 1) {
  ------------------
  |  Branch (2200:7): [True: 721, False: 875]
  ------------------
 2201|    721|    m_aux_info_type = range.read32();
 2202|    721|    m_aux_info_type_parameter = range.read32();
 2203|    721|  }
 2204|       |
 2205|  1.59k|  uint32_t num_chunks = range.read32();
 2206|       |
 2207|       |  // We have no explicit maximum on the number of chunks.
 2208|       |  // Use the maximum number of frames as an upper limit.
 2209|  1.59k|  if (limits && limits->max_sequence_frames > 0 && num_chunks > limits->max_sequence_frames) {
  ------------------
  |  Branch (2209:7): [True: 1.59k, False: 0]
  |  Branch (2209:17): [True: 1.59k, False: 0]
  |  Branch (2209:52): [True: 42, False: 1.55k]
  ------------------
 2210|     42|    return {
 2211|     42|      heif_error_Memory_allocation_error,
 2212|     42|      heif_suberror_Security_limit_exceeded,
 2213|     42|      "Number of 'saio' chunks exceeds the maximum number of sequence frames."
 2214|     42|    };
 2215|     42|  }
 2216|       |
 2217|  1.55k|  if (auto err = m_memory_handle.alloc(num_chunks, sizeof(uint64_t),
  ------------------
  |  Branch (2217:12): [True: 0, False: 1.55k]
  ------------------
 2218|  1.55k|                                       limits, "the 'saio' table")) {
 2219|      0|    return err;
 2220|      0|  }
 2221|       |
 2222|  1.55k|  m_chunk_offset.resize(num_chunks);
 2223|       |
 2224|  3.00k|  for (uint32_t i = 0; i < num_chunks; i++) {
  ------------------
  |  Branch (2224:24): [True: 1.50k, False: 1.50k]
  ------------------
 2225|  1.50k|    uint64_t offset;
 2226|  1.50k|    if (get_version() == 1) {
  ------------------
  |  Branch (2226:9): [True: 395, False: 1.10k]
  ------------------
 2227|    395|      offset = range.read64();
 2228|    395|    }
 2229|  1.10k|    else {
 2230|  1.10k|      offset = range.read32();
 2231|  1.10k|    }
 2232|       |
 2233|  1.50k|    m_chunk_offset[i] = offset;
 2234|       |
 2235|  1.50k|    if (range.error()) {
  ------------------
  |  Branch (2235:9): [True: 50, False: 1.45k]
  ------------------
 2236|     50|      return range.get_error();
 2237|     50|    }
 2238|  1.50k|  }
 2239|       |
 2240|  1.50k|  return Error::Ok;
 2241|  1.55k|}
_ZNK8Box_sdtp4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2245|    270|{
 2246|    270|  FullBox::dump(sstr, indent, full_log);
 2247|       |
 2248|    270|  assert(m_sample_information.size() <= UINT32_MAX);
  ------------------
  |  Branch (2248:3): [True: 270, False: 0]
  ------------------
 2249|       |
 2250|  6.29k|  for (uint32_t i = 0; i < static_cast<uint32_t>(m_sample_information.size()); i++) {
  ------------------
  |  Branch (2250:24): [True: 6.07k, False: 222]
  ------------------
 2251|       |
 2252|  6.07k|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_sample_information.size())) break;
  ------------------
  |  Branch (2252:9): [True: 48, False: 6.02k]
  ------------------
 2253|       |
 2254|  6.02k|    const char* spaces = "            ";
 2255|  6.02k|    int nSpaces = 6;
 2256|  6.02k|    int k = i;
 2257|  11.1k|    while (k >= 10 && nSpaces < 12) {
  ------------------
  |  Branch (2257:12): [True: 5.07k, False: 6.02k]
  |  Branch (2257:23): [True: 5.07k, False: 0]
  ------------------
 2258|  5.07k|      k /= 10;
 2259|  5.07k|      nSpaces++;
 2260|  5.07k|    }
 2261|       |
 2262|  6.02k|    spaces = spaces + 12 - nSpaces;
 2263|       |
 2264|  6.02k|    sstr << indent << "[" << i << "] : is_leading=" << (int) get_is_leading(i) << "\n"
 2265|  6.02k|        << indent << spaces << "depends_on=" << (int) get_depends_on(i) << "\n"
 2266|  6.02k|        << indent << spaces << "is_depended_on=" << (int) get_is_depended_on(i) << "\n"
 2267|  6.02k|        << indent << spaces << "has_redundancy=" << (int) get_has_redundancy(i) << "\n";
 2268|  6.02k|  }
 2269|       |
 2270|    270|  return;
 2271|    270|}
_ZN8Box_sdtp5parseER14BitstreamRangePK20heif_security_limits:
 2275|    276|{
 2276|    276|  parse_full_box_header(range);
 2277|       |
 2278|       |  // We have no easy way to get the number of samples from 'saiz' or 'stz2' as specified
 2279|       |  // in the standard. Instead, we read until the end of the box.
 2280|    276|  size_t nSamples = range.get_remaining_bytes();
 2281|       |
 2282|    276|  if (limits && limits->max_sequence_frames > 0 && nSamples > limits->max_sequence_frames) {
  ------------------
  |  Branch (2282:7): [True: 276, False: 0]
  |  Branch (2282:17): [True: 276, False: 0]
  |  Branch (2282:52): [True: 0, False: 276]
  ------------------
 2283|      0|    return {
 2284|      0|      heif_error_Memory_allocation_error,
 2285|      0|      heif_suberror_Security_limit_exceeded,
 2286|      0|      "Number of 'sdtp' samples exceeds the maximum number of sequence frames."
 2287|      0|    };
 2288|      0|  }
 2289|       |
 2290|    276|  if (auto err = m_memory_handle.alloc(nSamples, limits, "the 'sdtp' table")) {
  ------------------
  |  Branch (2290:12): [True: 0, False: 276]
  ------------------
 2291|      0|    return err;
 2292|      0|  }
 2293|       |
 2294|    276|  m_sample_information.resize(nSamples);
 2295|    276|  range.read(m_sample_information.data(), nSamples);
 2296|       |
 2297|    276|  return range.get_error();
 2298|    276|}
_ZN8Box_tref5parseER14BitstreamRangePK20heif_security_limits:
 2302|    839|{
 2303|  2.29k|  while (!range.eof()) {
  ------------------
  |  Branch (2303:10): [True: 1.63k, False: 663]
  ------------------
 2304|  1.63k|    BoxHeader header;
 2305|  1.63k|    Error err = header.parse_header(range);
 2306|  1.63k|    if (err != Error::Ok) {
  ------------------
  |  Branch (2306:9): [True: 10, False: 1.62k]
  ------------------
 2307|     10|      return err;
 2308|     10|    }
 2309|       |
 2310|  1.62k|    if (header.get_box_size() < header.get_header_size()) {
  ------------------
  |  Branch (2310:9): [True: 2, False: 1.62k]
  ------------------
 2311|      2|      return {heif_error_Invalid_input,
 2312|      2|              heif_suberror_Unspecified,
 2313|      2|              "Invalid box size (smaller than header)"};
 2314|      2|    }
 2315|       |
 2316|  1.62k|    uint64_t dataSize = (header.get_box_size() - header.get_header_size());
 2317|       |
 2318|  1.62k|    if (dataSize % 4 != 0 || dataSize < 4) {
  ------------------
  |  Branch (2318:9): [True: 23, False: 1.59k]
  |  Branch (2318:30): [True: 1, False: 1.59k]
  ------------------
 2319|     24|      return {heif_error_Invalid_input,
 2320|     24|              heif_suberror_Unspecified,
 2321|     24|              "Input file has a 'tref' TrackReferenceTypeBox with invalid size."};
 2322|     24|    }
 2323|       |
 2324|  1.59k|    uint64_t nRefs = dataSize / 4;
 2325|       |
 2326|  1.59k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (2326:9): [True: 1.59k, False: 0]
  |  Branch (2326:30): [True: 111, False: 1.48k]
  ------------------
 2327|    111|      std::stringstream sstr;
 2328|    111|      sstr << "Number of references in tref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 2329|       |
 2330|    111|      return {heif_error_Invalid_input,
 2331|    111|              heif_suberror_Security_limit_exceeded,
 2332|    111|              sstr.str()};
 2333|    111|    }
 2334|       |
 2335|  1.48k|    Reference ref;
 2336|  1.48k|    ref.reference_type = header.get_short_type();
 2337|       |
 2338|  6.17k|    for (uint64_t i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (2338:26): [True: 4.71k, False: 1.45k]
  ------------------
 2339|  4.71k|      if (range.eof()) {
  ------------------
  |  Branch (2339:11): [True: 29, False: 4.68k]
  ------------------
 2340|     29|        std::stringstream sstr;
 2341|     29|        sstr << "tref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 2342|       |
 2343|     29|        return {heif_error_Invalid_input,
 2344|     29|                heif_suberror_End_of_data,
 2345|     29|                sstr.str()};
 2346|     29|      }
 2347|       |
 2348|  4.68k|      ref.to_track_id.push_back(static_cast<uint32_t>(range.read32()));
 2349|  4.68k|    }
 2350|       |
 2351|  1.45k|    m_references.push_back(ref);
 2352|  1.45k|  }
 2353|       |
 2354|       |  // Note: a track ID may appear several times within one reference type box.
 2355|       |  // ISO/IEC 14496-12 does not forbid it and no consumer depends on uniqueness,
 2356|       |  // so a redundant entry is tolerated instead of rejecting the whole file.
 2357|       |
 2358|    663|  return range.get_error();
 2359|    839|}
_ZNK8Box_tref4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2385|    461|{
 2386|    461|  Box::dump(sstr, indent, full_log);
 2387|       |
 2388|  1.04k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2388:24): [True: 1.04k, False: 461]
  ------------------
 2389|  1.04k|    sstr << indent << "reference with type '" << fourcc_to_string(ref.reference_type) << "'"
 2390|  1.04k|         << " to track IDs: ";
 2391|  1.41k|    for (uint32_t id : ref.to_track_id) {
  ------------------
  |  Branch (2391:22): [True: 1.41k, False: 1.04k]
  ------------------
 2392|  1.41k|      sstr << id << " ";
 2393|  1.41k|    }
 2394|  1.04k|    sstr << "\n";
 2395|  1.04k|  }
 2396|       |
 2397|    461|  return;
 2398|    461|}
_ZN8Box_elst5parseER14BitstreamRangePK20heif_security_limits:
 2455|    752|{
 2456|    752|  Error err = parse_full_box_header(range);
 2457|    752|  if (err != Error::Ok) {
  ------------------
  |  Branch (2457:7): [True: 3, False: 749]
  ------------------
 2458|      3|    return err;
 2459|      3|  }
 2460|       |
 2461|    749|  if (get_version() > 1) {
  ------------------
  |  Branch (2461:7): [True: 2, False: 747]
  ------------------
 2462|      2|    return unsupported_version_error("edts");
 2463|      2|  }
 2464|       |
 2465|    747|  uint32_t nEntries = range.read32();
 2466|    747|  m_entries.clear();
 2467|       |
 2468|   220k|  for (uint64_t i = 0; i < nEntries; i++) {
  ------------------
  |  Branch (2468:24): [True: 220k, False: 660]
  ------------------
 2469|   220k|    if (range.eof()) {
  ------------------
  |  Branch (2469:9): [True: 87, False: 220k]
  ------------------
 2470|     87|      std::stringstream sstr;
 2471|     87|      sstr << "edts box should contain " << nEntries << " entries, but we can only read " << i << " entries.";
 2472|       |
 2473|     87|      return {heif_error_Invalid_input,
 2474|     87|              heif_suberror_End_of_data,
 2475|     87|              sstr.str()};
 2476|     87|    }
 2477|       |
 2478|   220k|    Entry entry{};
 2479|   220k|    if (get_version() == 1) {
  ------------------
  |  Branch (2479:9): [True: 209, False: 220k]
  ------------------
 2480|    209|      entry.segment_duration = range.read64();
 2481|    209|      entry.media_time = range.read64s();
 2482|    209|    }
 2483|   220k|    else {
 2484|   220k|      entry.segment_duration = range.read32();
 2485|   220k|      entry.media_time = range.read32s();
 2486|   220k|    }
 2487|       |
 2488|   220k|    entry.media_rate_integer = range.read16s();
 2489|   220k|    entry.media_rate_fraction = range.read16s();
 2490|       |
 2491|   220k|    m_entries.push_back(entry);
 2492|   220k|  }
 2493|       |
 2494|    660|  return range.get_error();
 2495|    747|}
_ZNK8Box_elst4dumpERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEER6Indentb:
 2535|    498|{
 2536|    498|  FullBox::dump(sstr, indent, full_log);
 2537|       |
 2538|    498|  sstr << indent << "repeat list: " << ((get_flags() & Flags::Repeat_EditList) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (2538:41): [True: 196, False: 302]
  ------------------
 2539|       |
 2540|  1.18k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (2540:22): [True: 687, False: 497]
  ------------------
 2541|    687|    if (dump_reached_entry_limit(sstr, indent, full_log, i, m_entries.size())) break;
  ------------------
  |  Branch (2541:9): [True: 1, False: 686]
  ------------------
 2542|    686|    const auto& entry = m_entries[i];
 2543|    686|    sstr << indent << "segment duration: " << entry.segment_duration << "\n";
 2544|    686|    sstr << indent << "media time: " << entry.media_time << "\n";
 2545|    686|    sstr << indent << "media rate integer: " << entry.media_rate_integer << "\n";
 2546|    686|    sstr << indent << "media rate fraction: " << entry.media_rate_fraction << "\n";
 2547|    686|  }
 2548|       |
 2549|    498|  return;
 2550|    498|}

_ZN13Box_containerC2EPKc:
   37|  2.01k|  {
   38|  2.01k|    set_short_type(fourcc(type));
   39|  2.01k|  }
_ZN8Box_moovC2Ev:
   51|    238|  Box_moov() : Box_container("moov") {}
_ZNK8Box_moov14debug_box_nameEv:
   53|    216|  const char* debug_box_name() const override { return "Movie"; }
_ZN8Box_mvhdC2Ev:
   61|  1.71k|  {
   62|  1.71k|    set_short_type(fourcc("mvhd"));
   63|  1.71k|  }
_ZNK8Box_mvhd14debug_box_nameEv:
   67|  1.15k|  const char* debug_box_name() const override { return "Movie Header"; }
_ZNK8Box_mvhd8get_rateEv:
   73|  1.15k|  double get_rate() const { return m_rate / double(0x10000); }
_ZNK8Box_mvhd10get_volumeEv:
   75|  1.15k|  float get_volume() const { return float(m_volume) / float(0x100); }
_ZN8Box_trakC2Ev:
  121|    303|  Box_trak() : Box_container("trak") {}
_ZNK8Box_trak14debug_box_nameEv:
  123|    209|  const char* debug_box_name() const override { return "Track"; }
_ZN8Box_tkhdC2Ev:
  131|  1.06k|  {
  132|  1.06k|    set_short_type(fourcc("tkhd"));
  133|       |
  134|       |    // set default flags according to ISO 14496-12
  135|  1.06k|    set_flags(Track_enabled | Track_in_movie | Track_in_preview);
  136|  1.06k|  }
_ZNK8Box_tkhd14debug_box_nameEv:
  147|    968|  const char* debug_box_name() const override { return "Track Header"; }
_ZNK8Box_tkhd10get_volumeEv:
  153|    968|  float get_volume() const { return float(m_volume) / float(0x100); }
_ZNK8Box_tkhd9get_widthEv:
  157|    968|  double get_width() const { return float(m_width) / double(0x10000); }
_ZNK8Box_tkhd10get_heightEv:
  159|    968|  double get_height() const { return float(m_height) / double(0x10000); }
_ZN8Box_mdiaC2Ev:
  198|     79|  Box_mdia() : Box_container("mdia") {}
_ZNK8Box_mdia14debug_box_nameEv:
  200|     72|  const char* debug_box_name() const override { return "Media"; }
_ZN8Box_mdhdC2Ev:
  208|    577|  {
  209|    577|    set_short_type(fourcc("mdhd"));
  210|    577|  }
_ZNK8Box_mdhd14debug_box_nameEv:
  214|    413|  const char* debug_box_name() const override { return "Media Header"; }
_ZN8Box_minfC2Ev:
  246|    305|  Box_minf() : Box_container("minf") {}
_ZNK8Box_minf14debug_box_nameEv:
  248|    260|  const char* debug_box_name() const override { return "Media Information"; }
_ZN8Box_vmhdC2Ev:
  256|    555|  {
  257|    555|    set_short_type(fourcc("vmhd"));
  258|    555|    set_flags(1);
  259|    555|  }
_ZNK8Box_vmhd14debug_box_nameEv:
  263|    547|  const char* debug_box_name() const override { return "Video Media Header"; }
_ZN8Box_nmhdC2Ev:
  280|    294|  {
  281|    294|    set_short_type(fourcc("nmhd"));
  282|    294|    set_flags(1);
  283|    294|  }
_ZNK8Box_nmhd14debug_box_nameEv:
  287|    211|  const char* debug_box_name() const override { return "Null Media Header"; }
_ZN8Box_stblC2Ev:
  299|    472|  Box_stbl() : Box_container("stbl") {}
_ZNK8Box_stbl14debug_box_nameEv:
  301|    461|  const char* debug_box_name() const override { return "Sample Table"; }
_ZN8Box_stsdC2Ev:
  309|  1.49k|  {
  310|  1.49k|    set_short_type(fourcc("stsd"));
  311|  1.49k|  }
_ZNK8Box_stsd14debug_box_nameEv:
  315|  1.07k|  const char* debug_box_name() const override { return "Sample Description"; }
_ZN8Box_sttsC2Ev:
  347|    509|  {
  348|    509|    set_short_type(fourcc("stts"));
  349|    509|  }
_ZNK8Box_stts14debug_box_nameEv:
  353|    325|  const char* debug_box_name() const override { return "Decoding Time to Sample"; }
_ZN8Box_cttsC2Ev:
  393|    952|  {
  394|    952|    set_short_type(fourcc("ctts"));
  395|    952|  }
_ZNK8Box_ctts14debug_box_nameEv:
  399|    612|  const char* debug_box_name() const override { return "Composition Time to Sample"; }
_ZN8Box_stscC2Ev:
  433|    361|  {
  434|    361|    set_short_type(fourcc("stsc"));
  435|    361|  }
_ZNK8Box_stsc14debug_box_nameEv:
  439|    106|  const char* debug_box_name() const override { return "Sample to Chunk"; }
_ZN8Box_stcoC2Ev:
  477|    631|  {
  478|    631|    set_short_type(fourcc("stco"));
  479|    631|  }
_ZNK8Box_stco14debug_box_nameEv:
  483|    305|  const char* debug_box_name() const override { return "Sample Offset"; }
_ZN8Box_stszC2Ev:
  510|  1.10k|  {
  511|  1.10k|    set_short_type(fourcc("stsz"));
  512|  1.10k|  }
_ZNK8Box_stsz14debug_box_nameEv:
  516|  1.00k|  const char* debug_box_name() const override { return "Sample Size"; }
_ZN8Box_stssC2Ev:
  545|    487|  {
  546|    487|    set_short_type(fourcc("stss"));
  547|    487|  }
_ZNK8Box_stss14debug_box_nameEv:
  551|    329|  const char* debug_box_name() const override { return "Sync Sample"; }
_ZN8Box_ccstC2Ev:
  584|    402|  {
  585|    402|    set_short_type(fourcc("ccst"));
  586|    402|  }
_ZNK8Box_ccst14debug_box_nameEv:
  590|    396|  const char* debug_box_name() const override { return "Coding Constraints"; }
_ZN8Box_auxiC2Ev:
  609|    911|  {
  610|    911|    set_short_type(fourcc("auxi"));
  611|    911|  }
_ZNK8Box_auxi14debug_box_nameEv:
  615|    904|  const char* debug_box_name() const override { return "Auxiliary Info Type"; }
_ZNK17VisualSampleEntry25get_horizontal_resolutionEv:
  654|    654|  double get_horizontal_resolution() const { return horizresolution / double(0x10000); }
_ZNK17VisualSampleEntry23get_vertical_resolutionEv:
  656|    654|  double get_vertical_resolution() const { return vertresolution / double(0x10000); }
_ZN22Box_URIMetaSampleEntryC2Ev:
  687|    729|  {
  688|    729|    set_short_type(fourcc("urim"));
  689|    729|  }
_ZNK22Box_URIMetaSampleEntry14debug_box_nameEv:
  695|    507|  const char* debug_box_name() const override { return "URI Meta Sample Entry"; }
_ZN7Box_uriC2Ev:
  710|    641|  {
  711|    641|    set_short_type(fourcc("uri "));
  712|    641|  }
_ZNK7Box_uri14debug_box_nameEv:
  722|    626|  const char* debug_box_name() const override { return "URI"; }
_ZN8Box_sbgpC2Ev:
  736|    523|  {
  737|    523|    set_short_type(fourcc("sbgp"));
  738|    523|  }
_ZNK8Box_sbgp14debug_box_nameEv:
  744|    462|  const char* debug_box_name() const override { return "Sample to Group"; }
_ZN8Box_sgpdC2Ev:
  797|  1.67k|  {
  798|  1.67k|    set_short_type(fourcc("sgpd"));
  799|  1.67k|  }
_ZNK8Box_sgpd14debug_box_nameEv:
  805|  1.63k|  const char* debug_box_name() const override { return "Sample Group Description"; }
_ZN8Box_btrtC2Ev:
  830|    532|  {
  831|    532|    set_short_type(fourcc("btrt"));
  832|    532|  }
_ZNK8Box_btrt14debug_box_nameEv:
  836|    354|  const char* debug_box_name() const override { return "Bitrate"; }
_ZN8Box_saizC2Ev:
  853|  1.14k|  {
  854|  1.14k|    set_short_type(fourcc("saiz"));
  855|  1.14k|  }
_ZNK8Box_saiz14debug_box_nameEv:
  875|    952|  const char* debug_box_name() const override { return "Sample Auxiliary Information Sizes"; }
_ZN8Box_saioC2Ev:
  896|  1.59k|  {
  897|  1.59k|    set_short_type(fourcc("saio"));
  898|  1.59k|  }
_ZNK8Box_saio14debug_box_nameEv:
  915|  1.42k|  const char* debug_box_name() const override { return "Sample Auxiliary Information Offsets"; }
_ZN8Box_sdtpC2Ev:
  941|    277|  {
  942|    277|    set_short_type(fourcc("sdtp"));
  943|    277|  }
_ZNK8Box_sdtp14debug_box_nameEv:
  947|    270|  const char* debug_box_name() const override { return "Independent and Disposable Samples"; }
_ZNK8Box_sdtp14get_is_leadingEj:
  951|  6.02k|  uint8_t get_is_leading(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 6) & 3; }
_ZNK8Box_sdtp14get_depends_onEj:
  953|  6.02k|  uint8_t get_depends_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 4) & 3; }
_ZNK8Box_sdtp18get_is_depended_onEj:
  955|  6.02k|  uint8_t get_is_depended_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 2) & 3; }
_ZNK8Box_sdtp18get_has_redundancyEj:
  957|  6.02k|  uint8_t get_has_redundancy(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx]) & 3; }
_ZN8Box_trefC2Ev:
  972|    842|  {
  973|    842|    set_short_type(fourcc("tref"));
  974|    842|  }
_ZNK8Box_tref14debug_box_nameEv:
  983|    461|  const char* debug_box_name() const override { return "Track Reference"; }
_ZN8Box_edtsC2Ev:
 1008|    616|  Box_edts() : Box_container("edts") {}
_ZNK8Box_edts14debug_box_nameEv:
 1010|    508|  const char* debug_box_name() const override { return "Edit List Container"; }
_ZN8Box_elstC2Ev:
 1018|    755|  {
 1019|    755|    set_short_type(fourcc("elst"));
 1020|    755|  }
_ZNK8Box_elst14debug_box_nameEv:
 1028|    498|  const char* debug_box_name() const override { return "Edit List"; }
_ZN16SampleGroupEntryD2Ev:
  768|  80.6k|  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:
  212|      2|{
  213|      2|  std::lock_guard<std::mutex> lock(de265_init_mutex());
  214|       |
  215|      2|  de265_init_count++;
  216|       |
  217|      2|  if (de265_init_count > 1) {
  ------------------
  |  Branch (217:7): [True: 0, False: 2]
  ------------------
  218|       |    // we are not the first -> already initialized
  219|       |
  220|      0|    return DE265_OK;
  221|      0|  }
  222|       |
  223|       |
  224|       |  // do initializations
  225|       |
  226|      2|  init_scan_orders();
  227|      2|  pps_scan_cache_init();
  228|       |
  229|      2|  if (!alloc_and_init_significant_coeff_ctxIdx_lookupTable()) {
  ------------------
  |  Branch (229:7): [True: 0, False: 2]
  ------------------
  230|      0|    pps_scan_cache_free();
  231|      0|    de265_init_count--;
  232|      0|    return DE265_ERROR_LIBRARY_INITIALIZATION_FAILED;
  233|      0|  }
  234|       |
  235|      2|  return DE265_OK;
  236|      2|}
de265.cc:_ZL16de265_init_mutexv:
  205|      2|{
  206|      2|  static std::mutex de265_init_mutex;
  207|      2|  return de265_init_mutex;
  208|      2|}

_Z19pps_scan_cache_initv:
  700|      2|{
  701|      2|  if (!g_pps_scan_cache.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (701:7): [True: 2, False: 0]
  ------------------
  702|      2|    g_pps_scan_cache.store(new pps_scan_cache(), std::memory_order_release);
  703|      2|  }
  704|      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:
  178|    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:
  704|      2|{
  705|      2|  addAvg            = addAvgCore<Pel>;
  706|      2|  reco              = recoCore<Pel>;
  707|      2|  copyClip          = copyClipCore<Pel>;
  708|      2|  roundGeo          = roundGeoCore<Pel>;
  709|       |
  710|      2|  addAvg4           = addAvgCore<Pel>;
  711|      2|  addAvg8           = addAvgCore<Pel>;
  712|      2|  addAvg16          = addAvgCore<Pel>;
  713|       |
  714|      2|  sub2              = subsCore<Pel>;
  715|      2|  sub4              = subsCore<Pel>;
  716|      2|  sub8              = subsCore<Pel>;
  717|       |
  718|      2|  wghtAvg4          = addWeightedAvgCore<Pel>;
  719|      2|  wghtAvg8          = addWeightedAvgCore<Pel>;
  720|       |
  721|      2|  copyClip2         = copyClipCore<Pel>;
  722|      2|  copyClip4         = copyClipCore<Pel>;
  723|      2|  copyClip8         = copyClipCore<Pel>;
  724|       |
  725|      2|  reco2             = reconstructCore<Pel>;
  726|      2|  reco4             = reconstructCore<Pel>;
  727|      2|  reco8             = reconstructCore<Pel>;
  728|       |
  729|      2|  linTf4            = linTfCore<Pel>;
  730|      2|  linTf8            = linTfCore<Pel>;
  731|       |
  732|      2|  copyBuffer        = copyBufferCore;
  733|       |
  734|      2|  removeHighFreq8   = removeHighFreq;
  735|      2|  removeHighFreq4   = removeHighFreq;
  736|       |
  737|      2|  transpose4x4      = transposeNxNCore<Pel,4>;
  738|      2|  transpose8x8      = transposeNxNCore<Pel,8>;
  739|      2|  mipMatrixMul_4_4  = mipMatrixMulCore<4,4>;
  740|      2|  mipMatrixMul_8_4  = mipMatrixMulCore<8,4>;
  741|      2|  mipMatrixMul_8_8  = mipMatrixMulCore<8,8>;
  742|      2|  mipUpsampleHor    = mipUpsampleHorCore;
  743|      2|  mipUpsampleVer    = mipUpsampleVerCore;
  744|      2|  weightCiip        = weightCiipCore;
  745|      2|  roundIntVector    = nullptr;
  746|       |
  747|      2|  fillPtrMap        = fillMapPtr_Core;
  748|      2|  AvgHighPassWithDownsampling = AvgHighPassWithDownsamplingCore;
  749|      2|  AvgHighPass = AvgHighPassCore;
  750|      2|  AvgHighPassWithDownsamplingDiff1st = AvgHighPassWithDownsamplingDiff1stCore;
  751|      2|  AvgHighPassWithDownsamplingDiff2nd = AvgHighPassWithDownsamplingDiff2ndCore;
  752|      2|  HDHighPass = HDHighPassCore;
  753|      2|  HDHighPass2 = HDHighPass2Core;
  754|      2|  sumSquaredError  = sumSquaredErrorCore;
  755|      2|  sum              = sumCore;
  756|      2|  sumAndSumSquares = sumAndSumSquaresCore;
  757|      2|  pictureChecksum  = pictureChecksumCore;
  758|      2|  padHorizontal    = padHorizontalCore;
  759|      2|  downsample2x2    = downsample2x2Core;
  760|      2|  highPassCorrelation = highPassCorrelationCore;
  761|      2|  blockStats4x4       = blockStats4x4Core;
  762|      2|  absGradientSums     = absGradientSumsCore;
  763|      2|  sumAbsDeviation     = sumAbsDeviationCore;
  764|      2|}

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

Rom.cpp:_ZN5vvencL5Clip3IiEET_S1_S1_S1_:
  572|   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:
 2031|      2|{
 2032|      2|  cpyResi4        = cpyResiCore;
 2033|      2|  cpyResi8        = cpyResiCore;
 2034|      2|  cpyCoeff4       = cpyCoeffCore;
 2035|      2|  cpyCoeff8       = cpyCoeffCore;
 2036|      2|  roundClip4      = clipCore;
 2037|      2|  roundClip8      = clipCore;
 2038|      2|  fastInvCore[0]  = fastInvCore_< 4>;
 2039|      2|  fastInvCore[1]  = fastInvCore_< 8>;
 2040|      2|  fastInvCore[2]  = fastInvCore_<16>;
 2041|      2|  fastInvCore[3]  = fastInvCore_<32>;
 2042|      2|  fastInvCore[4]  = fastInvCore_<64>;
 2043|      2|  fastFwdCore_1D[0] = fastFwdCore< 4>;
 2044|      2|  fastFwdCore_1D[1] = fastFwdCore< 8>;
 2045|      2|  fastFwdCore_1D[2] = fastFwdCore<16>;
 2046|      2|  fastFwdCore_1D[3] = fastFwdCore<32>;
 2047|      2|  fastFwdCore_1D[4] = fastFwdCore<64>;
 2048|      2|  fastFwdCore_2D[0] = fastFwdCore< 4>;
 2049|      2|  fastFwdCore_2D[1] = fastFwdCore< 8>;
 2050|      2|  fastFwdCore_2D[2] = fastFwdCore<16>;
 2051|      2|  fastFwdCore_2D[3] = fastFwdCore<32>;
 2052|      2|  fastFwdCore_2D[4] = fastFwdCore<64>;
 2053|      2|  fastInvDCT2[0]    = fastInverseDCT2_B2_Core;
 2054|      2|  fastInvDCT2[1]    = fastInverseDCT2_B4_Core;
 2055|      2|  fastInvDCT2[2]    = fastInverseDCT2_B8_Core;
 2056|      2|  fastFwdDCT2[0]    = fastForwardDCT2_B2_Core;
 2057|      2|  fastFwdDCT2[1]    = fastForwardDCT2_B4_Core;
 2058|      2|  fastFwdDST7_4     = fastForwardDST7_B4_Core;
 2059|      2|  fastFwdDCT8_4     = fastForwardDCT8_B4_Core;
 2060|      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|}();
CuTree.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)  {}

