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

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

_ZN19StreamReader_memoryC2EPKhmb:
   78|  14.7k|    : m_length(size),
   79|  14.7k|      m_position(0)
   80|  14.7k|{
   81|  14.7k|  if (copy) {
  ------------------
  |  Branch (81:7): [True: 0, False: 14.7k]
  ------------------
   82|      0|    m_owned_data = new uint8_t[m_length];
   83|      0|    memcpy(m_owned_data, data, size);
   84|       |
   85|      0|    m_data = m_owned_data;
   86|      0|  }
   87|  14.7k|  else {
   88|  14.7k|    m_data = data;
   89|  14.7k|  }
   90|  14.7k|}
_ZN19StreamReader_memoryD2Ev:
   93|  14.7k|{
   94|  14.7k|  if (m_owned_data) {
  ------------------
  |  Branch (94:7): [True: 0, False: 14.7k]
  ------------------
   95|      0|    delete[] m_owned_data;
   96|      0|  }
   97|  14.7k|}
_ZNK19StreamReader_memory12get_positionEv:
  100|   990k|{
  101|   990k|  return m_position;
  102|   990k|}
_ZN19StreamReader_memory18wait_for_file_sizeEm:
  105|   895k|{
  106|   895k|  return (target_size > m_length) ? grow_status::size_beyond_eof : grow_status::size_reached;
  ------------------
  |  Branch (106:10): [True: 10.4k, False: 884k]
  ------------------
  107|   895k|}
_ZN19StreamReader_memory4readEPvm:
  110|  55.4M|{
  111|  55.4M|  uint64_t end_pos = m_position + size;
  112|  55.4M|  if (end_pos > m_length) {
  ------------------
  |  Branch (112:7): [True: 0, False: 55.4M]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|  55.4M|  memcpy(data, &m_data[m_position], size);
  117|  55.4M|  m_position += size;
  118|       |
  119|  55.4M|  return true;
  120|  55.4M|}
_ZN19StreamReader_memory4seekEm:
  123|  88.1k|{
  124|  88.1k|  if (position > m_length)
  ------------------
  |  Branch (124:7): [True: 0, False: 88.1k]
  ------------------
  125|      0|    return false;
  126|       |
  127|  88.1k|  m_position = position;
  128|  88.1k|  return true;
  129|  88.1k|}
_ZN14BitstreamRangeC2ENSt3__110shared_ptrI12StreamReaderEEmPS_:
  157|   457k|    : m_istr(std::move(istr)), m_parent_range(parent), m_remaining(length)
  158|   457k|{
  159|   457k|  if (parent) {
  ------------------
  |  Branch (159:7): [True: 443k, False: 14.7k]
  ------------------
  160|   443k|    m_nesting_level = parent->m_nesting_level + 1;
  161|   443k|  }
  162|   457k|}
_ZN14BitstreamRange5read8Ev:
  185|  19.9M|{
  186|  19.9M|  if (!prepare_read(1)) {
  ------------------
  |  Branch (186:7): [True: 123k, False: 19.8M]
  ------------------
  187|   123k|    return 0;
  188|   123k|  }
  189|       |
  190|  19.8M|  uint8_t buf;
  191|       |
  192|  19.8M|  auto istr = get_istream();
  193|  19.8M|  bool success = istr->read((char*) &buf, 1);
  194|       |
  195|  19.8M|  if (!success) {
  ------------------
  |  Branch (195:7): [True: 0, False: 19.8M]
  ------------------
  196|      0|    set_eof_while_reading();
  197|      0|    return 0;
  198|      0|  }
  199|       |
  200|  19.8M|  return buf;
  201|  19.8M|}
_ZN14BitstreamRange6read16Ev:
  205|  8.14M|{
  206|  8.14M|  if (!prepare_read(2)) {
  ------------------
  |  Branch (206:7): [True: 27.9k, False: 8.12M]
  ------------------
  207|  27.9k|    return 0;
  208|  27.9k|  }
  209|       |
  210|  8.12M|  uint8_t buf[2];
  211|       |
  212|  8.12M|  auto istr = get_istream();
  213|  8.12M|  bool success = istr->read((char*) buf, 2);
  214|       |
  215|  8.12M|  if (!success) {
  ------------------
  |  Branch (215:7): [True: 0, False: 8.12M]
  ------------------
  216|      0|    set_eof_while_reading();
  217|      0|    return 0;
  218|      0|  }
  219|       |
  220|  8.12M|  return static_cast<uint16_t>((buf[0] << 8) | (buf[1]));
  221|  8.12M|}
_ZN14BitstreamRange7read16sEv:
  225|   655k|{
  226|   655k|  uint16_t v = read16();
  227|       |
  228|   655k|  if (v & 0x8000) {
  ------------------
  |  Branch (228:7): [True: 53.5k, False: 601k]
  ------------------
  229|  53.5k|    auto val = static_cast<int16_t>((~v) & 0x7fff);
  230|  53.5k|    return static_cast<int16_t>(-val - 1);
  231|  53.5k|  }
  232|   601k|  else {
  233|   601k|    return static_cast<int16_t>(v);
  234|   601k|  }
  235|   655k|}
_ZN14BitstreamRange6read24Ev:
  239|  24.8k|{
  240|  24.8k|  if (!prepare_read(3)) {
  ------------------
  |  Branch (240:7): [True: 0, False: 24.8k]
  ------------------
  241|      0|    return 0;
  242|      0|  }
  243|       |
  244|  24.8k|  uint8_t buf[3];
  245|       |
  246|  24.8k|  auto istr = get_istream();
  247|  24.8k|  bool success = istr->read((char*) buf, 3);
  248|       |
  249|  24.8k|  if (!success) {
  ------------------
  |  Branch (249:7): [True: 0, False: 24.8k]
  ------------------
  250|      0|    set_eof_while_reading();
  251|      0|    return 0;
  252|      0|  }
  253|       |
  254|  24.8k|  return (uint32_t) ((buf[0] << 16) |
  255|  24.8k|                     (buf[1] << 8) |
  256|  24.8k|                     (buf[2]));
  257|  24.8k|}
_ZN14BitstreamRange6read32Ev:
  260|  4.31M|{
  261|  4.31M|  if (!prepare_read(4)) {
  ------------------
  |  Branch (261:7): [True: 193k, False: 4.12M]
  ------------------
  262|   193k|    return 0;
  263|   193k|  }
  264|       |
  265|  4.12M|  uint8_t buf[4];
  266|       |
  267|  4.12M|  auto istr = get_istream();
  268|  4.12M|  bool success = istr->read((char*) buf, 4);
  269|       |
  270|  4.12M|  if (!success) {
  ------------------
  |  Branch (270:7): [True: 0, False: 4.12M]
  ------------------
  271|      0|    set_eof_while_reading();
  272|      0|    return 0;
  273|      0|  }
  274|       |
  275|  4.12M|  return four_bytes_to_uint32(buf[0], buf[1], buf[2], buf[3]);
  276|  4.12M|}
_ZN14BitstreamRange9read_uintEi:
  280|  1.49M|{
  281|  1.49M|  switch (len)
  282|  1.49M|  {
  283|  1.37M|    case 8:
  ------------------
  |  Branch (283:5): [True: 1.37M, False: 121k]
  ------------------
  284|  1.37M|      return read8();
  285|  96.2k|    case 16:
  ------------------
  |  Branch (285:5): [True: 96.2k, False: 1.40M]
  ------------------
  286|  96.2k|      return read16();
  287|  24.8k|    case 24:
  ------------------
  |  Branch (287:5): [True: 24.8k, False: 1.47M]
  ------------------
  288|  24.8k|      return read24();
  289|    539|    case 32:
  ------------------
  |  Branch (289:5): [True: 539, False: 1.49M]
  ------------------
  290|    539|      return read32();
  291|    248|    case 64:
  ------------------
  |  Branch (291:5): [True: 248, False: 1.49M]
  ------------------
  292|    248|      return read64();
  293|      0|    default:
  ------------------
  |  Branch (293:5): [True: 0, False: 1.49M]
  ------------------
  294|      0|      assert(false);
  ------------------
  |  Branch (294:7): [Folded, False: 0]
  ------------------
  295|      0|      return 0;
  296|  1.49M|  }
  297|  1.49M|}
_ZN14BitstreamRange7read32sEv:
  301|   394k|{
  302|   394k|  uint32_t v = read32();
  303|       |
  304|   394k|  if (v & 0x80000000) {
  ------------------
  |  Branch (304:7): [True: 55.2k, False: 339k]
  ------------------
  305|  55.2k|    return -static_cast<int32_t>((~v) & 0x7fffffff) -1;
  306|  55.2k|  }
  307|   339k|  else {
  308|   339k|    return static_cast<int32_t>(v);
  309|   339k|  }
  310|   394k|}
_ZN14BitstreamRange6read64Ev:
  314|  17.6k|{
  315|  17.6k|  if (!prepare_read(8)) {
  ------------------
  |  Branch (315:7): [True: 84, False: 17.5k]
  ------------------
  316|     84|    return 0;
  317|     84|  }
  318|       |
  319|  17.5k|  uint8_t buf[8];
  320|       |
  321|  17.5k|  auto istr = get_istream();
  322|  17.5k|  bool success = istr->read((char*) buf, 8);
  323|       |
  324|  17.5k|  if (!success) {
  ------------------
  |  Branch (324:7): [True: 0, False: 17.5k]
  ------------------
  325|      0|    set_eof_while_reading();
  326|      0|    return 0;
  327|      0|  }
  328|       |
  329|  17.5k|  return ((static_cast<uint64_t>(buf[0]) << 56) |
  330|  17.5k|          (static_cast<uint64_t>(buf[1]) << 48) |
  331|  17.5k|          (static_cast<uint64_t>(buf[2]) << 40) |
  332|  17.5k|          (static_cast<uint64_t>(buf[3]) << 32) |
  333|  17.5k|          (static_cast<uint64_t>(buf[4]) << 24) |
  334|  17.5k|          (static_cast<uint64_t>(buf[5]) << 16) |
  335|  17.5k|          (static_cast<uint64_t>(buf[6]) << 8) |
  336|  17.5k|          (static_cast<uint64_t>(buf[7])));
  337|  17.5k|}
_ZN14BitstreamRange7read64sEv:
  341|  7.02k|{
  342|  7.02k|  uint64_t v = read64();
  343|       |
  344|  7.02k|  if (v & 0x8000000000000000) {
  ------------------
  |  Branch (344:7): [True: 1.24k, False: 5.78k]
  ------------------
  345|  1.24k|    return -static_cast<int64_t >((~v) & 0x7fffffffffffffff) -1;
  346|  1.24k|  }
  347|  5.78k|  else {
  348|  5.78k|    return static_cast<int64_t >(v);
  349|  5.78k|  }
  350|  7.02k|}
_ZN14BitstreamRange12read_float32Ev:
  354|  4.92k|{
  355|  4.92k|#if __cpp_lib_bit_cast >= 201806L
  356|  4.92k|  uint32_t i = read32();
  357|  4.92k|  return std::bit_cast<float>(i); // this works directly on the value layout, thus we do not have to worry about memory layout
  358|       |#else
  359|       |  // compiler too old to support bit_cast
  360|       |
  361|       |  // TODO: I am not sure this works everywhere as there seem to be systems where
  362|       |  //       the float byte order is different from the integer endianness
  363|       |  //       https://en.wikipedia.org/wiki/Endianness#Floating_point
  364|       |  uint32_t i = read32();
  365|       |  float f;
  366|       |  memcpy(&f, &i, sizeof(float));
  367|       |  return f;
  368|       |#endif
  369|  4.92k|}
_ZN14BitstreamRange11read_stringEv:
  390|  20.4k|{
  391|  20.4k|  std::string str;
  392|       |
  393|       |  // Reading a string when no more data is available, returns an empty string.
  394|       |  // Such a case happens, for example, when reading a 'url' box without content.
  395|  20.4k|  if (eof()) {
  ------------------
  |  Branch (395:7): [True: 5.68k, False: 14.7k]
  ------------------
  396|  5.68k|    return std::string();
  397|  5.68k|  }
  398|       |
  399|  14.7k|  auto istr = get_istream();
  400|       |
  401|  23.1M|  for (;;) {
  402|  23.1M|    if (!prepare_read(1)) {
  ------------------
  |  Branch (402:9): [True: 0, False: 23.1M]
  ------------------
  403|      0|      return std::string();
  404|      0|    }
  405|       |
  406|  23.1M|    char c;
  407|  23.1M|    bool success = istr->read(&c, 1);
  408|       |
  409|  23.1M|    if (!success) {
  ------------------
  |  Branch (409:9): [True: 0, False: 23.1M]
  ------------------
  410|      0|      set_eof_while_reading();
  411|      0|      return std::string();
  412|      0|    }
  413|       |
  414|  23.1M|    if (c == 0 || m_remaining==0) {
  ------------------
  |  Branch (414:9): [True: 14.4k, False: 23.0M]
  |  Branch (414:19): [True: 298, False: 23.0M]
  ------------------
  415|  14.7k|      break;
  416|  14.7k|    }
  417|  23.0M|    else {
  418|  23.0M|      str += (char) c;
  419|  23.0M|    }
  420|  23.1M|  }
  421|       |
  422|  14.7k|  return str;
  423|  14.7k|}
_ZN14BitstreamRange17read_fixed_stringEi:
  427|  1.75k|{
  428|  1.75k|  std::string str;
  429|       |
  430|  1.75k|  if (!prepare_read(len)) {
  ------------------
  |  Branch (430:7): [True: 60, False: 1.69k]
  ------------------
  431|     60|    return std::string();
  432|     60|  }
  433|       |
  434|  1.69k|  auto istr = get_istream();
  435|       |
  436|  1.69k|  uint8_t n;
  437|  1.69k|  bool success = istr->read(&n, 1);
  438|  1.69k|  if (!success || n > len - 1) {
  ------------------
  |  Branch (438:7): [True: 0, False: 1.69k]
  |  Branch (438:19): [True: 371, False: 1.32k]
  ------------------
  439|    371|    return {};
  440|    371|  }
  441|       |
  442|  8.61k|  for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (442:19): [True: 7.29k, False: 1.32k]
  ------------------
  443|  7.29k|    char c;
  444|  7.29k|    success = istr->read(&c, 1);
  445|       |
  446|  7.29k|    if (!success) {
  ------------------
  |  Branch (446:9): [True: 0, False: 7.29k]
  ------------------
  447|      0|      set_eof_while_reading();
  448|      0|      return std::string();
  449|      0|    }
  450|       |
  451|  7.29k|    str += (char) c;
  452|  7.29k|  }
  453|       |
  454|  1.32k|  istr->seek_cur(len-n-1);
  455|       |
  456|  1.32k|  return str;
  457|  1.32k|}
_ZN14BitstreamRange21read_string_until_eofEv:
  461|  1.88k|{
  462|  1.88k|  size_t n = get_remaining_bytes();
  463|       |
  464|  1.88k|  [[maybe_unused]] bool success = prepare_read(n);
  465|  1.88k|  assert(success); // we are reading exactly the rest of the box
  ------------------
  |  Branch (465:3): [True: 1.88k, False: 0]
  ------------------
  466|       |
  467|  1.88k|  std::string str;
  468|  1.88k|  str.resize(n);
  469|  1.88k|  get_istream()->read(str.data(), n);
  470|       |
  471|  1.88k|  return str;
  472|  1.88k|}
_ZN14BitstreamRange4readEPhm:
  476|   152k|{
  477|   152k|  if (!prepare_read(n)) {
  ------------------
  |  Branch (477:7): [True: 69, False: 152k]
  ------------------
  478|     69|    return false;
  479|     69|  }
  480|       |
  481|   152k|  auto istr = get_istream();
  482|   152k|  bool success = istr->read(data, n);
  483|       |
  484|   152k|  if (!success) {
  ------------------
  |  Branch (484:7): [True: 0, False: 152k]
  ------------------
  485|      0|    set_eof_while_reading();
  486|      0|  }
  487|       |
  488|   152k|  return success;
  489|   152k|}
_ZN14BitstreamRange12prepare_readEm:
  493|   356M|{
  494|       |  // Note: we do not test for negative nBytes anymore because we now use the unsigned size_t
  495|       |
  496|   356M|  if (m_remaining < nBytes) {
  ------------------
  |  Branch (496:7): [True: 345k, False: 356M]
  ------------------
  497|       |    // --- not enough data left in box -> move to end of box and set error flag
  498|       |
  499|   345k|    skip_to_end_of_box();
  500|       |
  501|   345k|    m_error = true;
  502|   345k|    return false;
  503|   345k|  }
  504|   356M|  else {
  505|       |    // --- this is the normal case (m_remaining >= nBytes)
  506|       |
  507|   356M|    if (m_parent_range) {
  ------------------
  |  Branch (507:9): [True: 300M, False: 55.4M]
  ------------------
  508|   300M|      if (!m_parent_range->prepare_read(nBytes)) {
  ------------------
  |  Branch (508:11): [True: 0, False: 300M]
  ------------------
  509|      0|        return false;
  510|      0|      }
  511|   300M|    }
  512|       |
  513|   356M|    m_remaining -= nBytes;
  514|       |
  515|   356M|    return true;
  516|   356M|  }
  517|   356M|}
_ZN14BitstreamRange24wait_for_available_bytesEm:
  521|   895k|{
  522|   895k|  int64_t target_size = m_istr->get_position() + nBytes;
  523|       |
  524|   895k|  return m_istr->wait_for_file_size(target_size);
  525|   895k|}
_ZN14BitstreamRange31skip_without_advancing_file_posEm:
  529|   579k|{
  530|   579k|  assert(n <= m_remaining);
  ------------------
  |  Branch (530:3): [True: 579k, False: 0]
  ------------------
  531|       |
  532|   579k|  m_remaining -= n;
  533|       |
  534|   579k|  if (m_parent_range) {
  ------------------
  |  Branch (534:7): [True: 494k, False: 84.7k]
  ------------------
  535|   494k|    m_parent_range->skip_without_advancing_file_pos(n);
  536|   494k|  }
  537|   579k|}

_ZNK14BitstreamRange5errorEv:
  374|  8.27M|  {
  375|  8.27M|    return m_error;
  376|  8.27M|  }
_ZN12StreamReader8seek_curEm:
   62|  88.1k|  {
   63|  88.1k|    return seek(get_position() + position_offset);
   64|  88.1k|  }
_ZN14BitstreamRange19skip_to_end_of_fileEv:
  319|     79|  {
  320|       |    // we do not actually move the file position here (because the stream may still be incomplete),
  321|       |    // but we set all m_remaining to zero
  322|     79|    m_remaining = 0;
  323|       |
  324|     79|    if (m_parent_range) {
  ------------------
  |  Branch (324:9): [True: 70, False: 9]
  ------------------
  325|     70|      m_parent_range->skip_to_end_of_file();
  326|     70|    }
  327|     79|  }
_ZN14BitstreamRange4skipEm:
  330|  21.9k|  {
  331|  21.9k|    size_t actual_skip = std::min(static_cast<size_t>(n), m_remaining);
  332|       |
  333|  21.9k|    if (m_parent_range) {
  ------------------
  |  Branch (333:9): [True: 21.9k, False: 0]
  ------------------
  334|       |      // also advance position in parent range
  335|  21.9k|      m_parent_range->skip_without_advancing_file_pos(actual_skip);
  336|  21.9k|    }
  337|       |
  338|  21.9k|    assert(actual_skip <= static_cast<uint64_t>(std::numeric_limits<int64_t>::max()));
  ------------------
  |  Branch (338:5): [True: 21.9k, False: 0]
  ------------------
  339|       |
  340|  21.9k|    m_istr->seek_cur(static_cast<int64_t>(actual_skip));
  341|  21.9k|    m_remaining -= actual_skip;
  342|  21.9k|  }
_ZN14BitstreamRange18skip_to_end_of_boxEv:
  345|   793k|  {
  346|   793k|    if (m_remaining > 0) {
  ------------------
  |  Branch (346:9): [True: 62.8k, False: 731k]
  ------------------
  347|  62.8k|      if (m_parent_range) {
  ------------------
  |  Branch (347:11): [True: 62.8k, False: 2]
  ------------------
  348|       |        // also advance position in parent range
  349|  62.8k|        m_parent_range->skip_without_advancing_file_pos(m_remaining);
  350|  62.8k|      }
  351|       |
  352|  62.8k|      m_istr->seek_cur(m_remaining);
  353|  62.8k|      m_remaining = 0;
  354|  62.8k|    }
  355|   793k|  }
_ZNK14BitstreamRange3eofEv:
  369|  13.1M|  {
  370|  13.1M|    return m_remaining == 0;
  371|  13.1M|  }
_ZNK14BitstreamRange9get_errorEv:
  379|  2.38M|  {
  380|  2.38M|    if (m_error) {
  ------------------
  |  Branch (380:9): [True: 9.52k, False: 2.37M]
  ------------------
  381|  9.52k|      return Error(heif_error_Invalid_input,
  382|  9.52k|                   heif_suberror_End_of_data);
  383|  9.52k|    }
  384|  2.37M|    else {
  385|  2.37M|      return Error::Ok;
  386|  2.37M|    }
  387|  2.38M|  }
_ZN14BitstreamRange11get_istreamEv:
  389|  32.7M|  std::shared_ptr<StreamReader> get_istream() { return m_istr; }
_ZNK14BitstreamRange17get_nesting_levelEv:
  391|   446k|  int get_nesting_level() const { return m_nesting_level; }
_ZNK14BitstreamRange19get_remaining_bytesEv:
  393|   525k|  size_t get_remaining_bytes() const { return m_remaining; }
_ZN12StreamReaderD2Ev:
   42|  14.7k|  virtual ~StreamReader() = default;

_ZN8FractionC2Eii:
   64|  63.2k|{
   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|  63.2k|  numerator = num;
   70|  63.2k|  denominator = den;
   71|       |
   72|   554k|  while (denominator > MAX_FRACTION_VALUE || denominator < -MAX_FRACTION_VALUE) {
  ------------------
  |  Branch (72:10): [True: 490k, False: 63.2k]
  |  Branch (72:46): [True: 0, False: 63.2k]
  ------------------
   73|   490k|    numerator /= 2;
   74|   490k|    denominator /= 2;
   75|   490k|  }
   76|       |
   77|   125k|  while (denominator > 1 && (numerator > MAX_FRACTION_VALUE || numerator < -MAX_FRACTION_VALUE)) {
  ------------------
  |  Branch (77:10): [True: 105k, False: 19.5k]
  |  Branch (77:30): [True: 61.8k, False: 43.9k]
  |  Branch (77:64): [True: 334, False: 43.6k]
  ------------------
   78|  62.1k|    numerator /= 2;
   79|  62.1k|    denominator /= 2;
   80|  62.1k|  }
   81|  63.2k|}
_ZN8FractionC2Ejj:
   84|  31.6k|{
   85|  31.6k|  assert(num <= (uint32_t) std::numeric_limits<int32_t>::max());
  ------------------
  |  Branch (85:3): [True: 31.6k, False: 0]
  ------------------
   86|  31.6k|  assert(den <= (uint32_t) std::numeric_limits<int32_t>::max());
  ------------------
  |  Branch (86:3): [True: 31.6k, False: 0]
  ------------------
   87|       |
   88|  31.6k|  *this = Fraction(int32_t(num), int32_t(den));
   89|  31.6k|}
_ZNK8Fraction8is_validEv:
  162|  58.8k|{
  163|  58.8k|  return denominator != 0;
  164|  58.8k|}
_ZN9BoxHeaderC2Ev:
  167|   980k|BoxHeader::BoxHeader() = default;
_ZNK9BoxHeader8get_typeEv:
  171|   100k|{
  172|   100k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (172:7): [True: 3.06k, False: 97.3k]
  ------------------
  173|  3.06k|    return m_uuid_type;
  174|  3.06k|  }
  175|  97.3k|  else {
  176|  97.3k|    std::vector<uint8_t> type(4);
  177|  97.3k|    type[0] = static_cast<uint8_t>((m_type >> 24) & 0xFF);
  178|  97.3k|    type[1] = static_cast<uint8_t>((m_type >> 16) & 0xFF);
  179|  97.3k|    type[2] = static_cast<uint8_t>((m_type >> 8) & 0xFF);
  180|  97.3k|    type[3] = static_cast<uint8_t>((m_type >> 0) & 0xFF);
  181|  97.3k|    return type;
  182|  97.3k|  }
  183|   100k|}
_ZNK9BoxHeader15get_type_stringEv:
  187|   898k|{
  188|   898k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (188:7): [True: 29.0k, False: 869k]
  ------------------
  189|       |    // 8-4-4-4-12
  190|       |
  191|  29.0k|    std::ostringstream sstr;
  192|  29.0k|    sstr << std::hex;
  193|  29.0k|    sstr << std::setfill('0');
  194|       |
  195|   494k|    for (int i = 0; i < 16; i++) {
  ------------------
  |  Branch (195:21): [True: 465k, False: 29.0k]
  ------------------
  196|   465k|      if (i == 4 || i == 6 || i == 8 || i == 10) {
  ------------------
  |  Branch (196:11): [True: 29.0k, False: 436k]
  |  Branch (196:21): [True: 29.0k, False: 407k]
  |  Branch (196:31): [True: 29.0k, False: 378k]
  |  Branch (196:41): [True: 29.0k, False: 349k]
  ------------------
  197|   116k|        sstr << '-';
  198|   116k|      }
  199|       |
  200|   465k|      sstr << std::setw(2);
  201|   465k|      sstr << ((int) m_uuid_type[i]);
  202|   465k|    }
  203|       |
  204|  29.0k|    return sstr.str();
  205|  29.0k|  }
  206|   869k|  else {
  207|   869k|    return fourcc_to_string(m_type);
  208|   869k|  }
  209|   898k|}
_ZNK9BoxHeader13get_uuid_typeEv:
  213|  38.3k|{
  214|  38.3k|  if (m_type != fourcc("uuid")) {
  ------------------
  |  Branch (214:7): [True: 0, False: 38.3k]
  ------------------
  215|      0|    return {};
  216|      0|  }
  217|       |
  218|  38.3k|  return m_uuid_type;
  219|  38.3k|}
_ZN9BoxHeader13set_uuid_typeERKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  223|  1.88k|{
  224|  1.88k|  m_type = fourcc("uuid");
  225|  1.88k|  m_uuid_type = type;
  226|  1.88k|}
_ZN9BoxHeader12parse_headerER14BitstreamRange:
  230|   473k|{
  231|   473k|  StreamReader::grow_status status;
  232|   473k|  status = range.wait_for_available_bytes(8);
  233|   473k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (233:7): [True: 7.49k, False: 466k]
  ------------------
  234|       |    // TODO: return recoverable error at timeout
  235|  7.49k|    return Error(heif_error_Invalid_input,
  236|  7.49k|                 heif_suberror_End_of_data);
  237|  7.49k|  }
  238|       |
  239|   466k|  m_size = range.read32();
  240|   466k|  m_type = range.read32();
  241|       |
  242|   466k|  m_header_size = 8;
  243|       |
  244|   466k|  if (m_size == 1) {
  ------------------
  |  Branch (244:7): [True: 253, False: 466k]
  ------------------
  245|    253|    status = range.wait_for_available_bytes(8);
  246|    253|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (246:9): [True: 1, False: 252]
  ------------------
  247|       |      // TODO: return recoverable error at timeout
  248|      1|      return Error(heif_error_Invalid_input,
  249|      1|                   heif_suberror_End_of_data);
  250|      1|    }
  251|       |
  252|    252|    uint64_t high = range.read32();
  253|    252|    uint64_t low = range.read32();
  254|       |
  255|    252|    m_size = (high << 32) | low;
  256|    252|    m_header_size += 8;
  257|       |
  258|    252|    std::stringstream sstr;
  259|    252|    sstr << "Box size " << m_size << " exceeds security limit.";
  260|       |
  261|    252|    if (m_size > MAX_LARGE_BOX_SIZE) {
  ------------------
  |  Branch (261:9): [True: 19, False: 233]
  ------------------
  262|     19|      return Error(heif_error_Memory_allocation_error,
  263|     19|                   heif_suberror_Security_limit_exceeded,
  264|     19|                   sstr.str());
  265|     19|    }
  266|    252|  }
  267|       |
  268|   466k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (268:7): [True: 14.9k, False: 451k]
  ------------------
  269|  14.9k|    status = range.wait_for_available_bytes(16);
  270|  14.9k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (270:9): [True: 2, False: 14.9k]
  ------------------
  271|       |      // TODO: return recoverable error at timeout
  272|      2|      return Error(heif_error_Invalid_input,
  273|      2|                   heif_suberror_End_of_data);
  274|      2|    }
  275|       |
  276|  14.9k|    if (range.prepare_read(16)) {
  ------------------
  |  Branch (276:9): [True: 14.9k, False: 1]
  ------------------
  277|  14.9k|      m_uuid_type.resize(16);
  278|  14.9k|      bool success = range.get_istream()->read((char*) m_uuid_type.data(), 16);
  279|  14.9k|      assert(success);
  ------------------
  |  Branch (279:7): [True: 14.9k, False: 0]
  ------------------
  280|  14.9k|      (void) success;
  281|  14.9k|    }
  282|       |
  283|  14.9k|    m_header_size += 16;
  284|  14.9k|  }
  285|       |
  286|   466k|  return range.get_error();
  287|   466k|}
_ZNK9BoxHeader4dumpER6Indent:
  392|   337k|{
  393|   337k|  std::ostringstream sstr;
  394|   337k|  sstr << indent << "Box: " << get_type_string();
  395|   337k|  const char* debug_name = debug_box_name();
  396|   337k|  if (debug_name) {
  ------------------
  |  Branch (396:7): [True: 171k, False: 165k]
  ------------------
  397|   171k|    sstr << " ----- (" << debug_name << ")\n";
  398|   171k|  }
  399|   165k|  else {
  400|   165k|    sstr << " -----\n";
  401|   165k|  }
  402|       |
  403|   337k|  sstr << indent << "size: " << get_box_size() << "   (header size: " << get_header_size() << ")\n";
  404|       |
  405|   337k|  return sstr.str();
  406|   337k|}
_ZN3Box5parseER14BitstreamRangePK20heif_security_limits:
  410|  2.11k|{
  411|       |  // skip box
  412|       |
  413|  2.11k|  if (get_box_size() == size_until_end_of_file) {
  ------------------
  |  Branch (413:7): [True: 9, False: 2.11k]
  ------------------
  414|      9|    range.skip_to_end_of_file();
  415|      9|  }
  416|  2.11k|  else {
  417|  2.11k|    uint64_t content_size = get_box_size() - get_header_size();
  418|       |
  419|  2.11k|    assert(MAX_BOX_SIZE <= SIZE_MAX);
  ------------------
  |  Branch (419:5): [True: 2.11k, Folded]
  ------------------
  420|       |
  421|  2.11k|    if (content_size > MAX_BOX_SIZE) {
  ------------------
  |  Branch (421:9): [True: 0, False: 2.11k]
  ------------------
  422|      0|      return Error(heif_error_Invalid_input,
  423|      0|                   heif_suberror_Invalid_box_size);
  424|      0|    }
  425|       |
  426|  2.11k|    if (range.prepare_read(static_cast<size_t>(content_size))) {
  ------------------
  |  Branch (426:9): [True: 2.11k, False: 0]
  ------------------
  427|  2.11k|      range.get_istream()->seek_cur(get_box_size() - get_header_size());
  428|  2.11k|    }
  429|  2.11k|  }
  430|       |
  431|       |  // Note: seekg() clears the eof flag and it will not be set again afterwards,
  432|       |  // hence we have to test for the fail flag.
  433|       |
  434|  2.11k|  return range.get_error();
  435|  2.11k|}
_ZN7FullBox21parse_full_box_headerER14BitstreamRange:
  439|   101k|{
  440|   101k|  uint32_t data = range.read32();
  441|   101k|  m_version = static_cast<uint8_t>(data >> 24);
  442|   101k|  m_flags = data & 0x00FFFFFF;
  443|       |  //m_is_full_box = true;
  444|       |
  445|   101k|  m_header_size += 4;
  446|       |
  447|   101k|  return range.get_error();
  448|   101k|}
_ZN3Box4readER14BitstreamRangePNSt3__110shared_ptrIS_EEPK20heif_security_limits:
  452|   453k|{
  453|   453k|  BoxHeader hdr;
  454|   453k|  Error err = hdr.parse_header(range);
  455|   453k|  if (err) {
  ------------------
  |  Branch (455:7): [True: 7.55k, False: 446k]
  ------------------
  456|  7.55k|    return err;
  457|  7.55k|  }
  458|       |
  459|   446k|  if (range.error()) {
  ------------------
  |  Branch (459:7): [True: 0, False: 446k]
  ------------------
  460|      0|    return range.get_error();
  461|      0|  }
  462|       |
  463|   446k|  result->reset();
  464|       |
  465|   446k|  std::shared_ptr<Box> box;
  466|       |
  467|   446k|  switch (hdr.get_short_type()) {
  468|  11.5k|    case fourcc("ftyp"):
  ------------------
  |  Branch (468:5): [True: 11.5k, False: 434k]
  ------------------
  469|  11.5k|      box = std::make_shared<Box_ftyp>();
  470|  11.5k|      break;
  471|       |
  472|    743|    case fourcc("free"):
  ------------------
  |  Branch (472:5): [True: 743, False: 445k]
  ------------------
  473|  1.13k|    case fourcc("skip"):
  ------------------
  |  Branch (473:5): [True: 390, False: 445k]
  ------------------
  474|  1.13k|      box = std::make_shared<Box_free>();
  475|  1.13k|      break;
  476|       |
  477|  2.93k|    case fourcc("meta"):
  ------------------
  |  Branch (477:5): [True: 2.93k, False: 443k]
  ------------------
  478|  2.93k|      box = std::make_shared<Box_meta>();
  479|  2.93k|      break;
  480|       |
  481|  2.14k|    case fourcc("hdlr"):
  ------------------
  |  Branch (481:5): [True: 2.14k, False: 443k]
  ------------------
  482|  2.14k|      box = std::make_shared<Box_hdlr>();
  483|  2.14k|      break;
  484|       |
  485|  3.20k|    case fourcc("pitm"):
  ------------------
  |  Branch (485:5): [True: 3.20k, False: 442k]
  ------------------
  486|  3.20k|      box = std::make_shared<Box_pitm>();
  487|  3.20k|      break;
  488|       |
  489|  2.08k|    case fourcc("iloc"):
  ------------------
  |  Branch (489:5): [True: 2.08k, False: 444k]
  ------------------
  490|  2.08k|      box = std::make_shared<Box_iloc>();
  491|  2.08k|      break;
  492|       |
  493|  3.92k|    case fourcc("iinf"):
  ------------------
  |  Branch (493:5): [True: 3.92k, False: 442k]
  ------------------
  494|  3.92k|      box = std::make_shared<Box_iinf>();
  495|  3.92k|      break;
  496|       |
  497|  4.41k|    case fourcc("infe"):
  ------------------
  |  Branch (497:5): [True: 4.41k, False: 441k]
  ------------------
  498|  4.41k|      box = std::make_shared<Box_infe>();
  499|  4.41k|      break;
  500|       |
  501|  30.8k|    case fourcc("iprp"):
  ------------------
  |  Branch (501:5): [True: 30.8k, False: 415k]
  ------------------
  502|  30.8k|      box = std::make_shared<Box_iprp>();
  503|  30.8k|      break;
  504|       |
  505|  10.9k|    case fourcc("ipco"):
  ------------------
  |  Branch (505:5): [True: 10.9k, False: 435k]
  ------------------
  506|  10.9k|      box = std::make_shared<Box_ipco>();
  507|  10.9k|      break;
  508|       |
  509|  2.88k|    case fourcc("ipma"):
  ------------------
  |  Branch (509:5): [True: 2.88k, False: 443k]
  ------------------
  510|  2.88k|      box = std::make_shared<Box_ipma>();
  511|  2.88k|      break;
  512|       |
  513|  2.46k|    case fourcc("ispe"):
  ------------------
  |  Branch (513:5): [True: 2.46k, False: 443k]
  ------------------
  514|  2.46k|      box = std::make_shared<Box_ispe>();
  515|  2.46k|      break;
  516|       |
  517|  1.06k|    case fourcc("auxC"):
  ------------------
  |  Branch (517:5): [True: 1.06k, False: 445k]
  ------------------
  518|  1.06k|      box = std::make_shared<Box_auxC>();
  519|  1.06k|      break;
  520|       |
  521|  6.76k|    case fourcc("irot"):
  ------------------
  |  Branch (521:5): [True: 6.76k, False: 439k]
  ------------------
  522|  6.76k|      box = std::make_shared<Box_irot>();
  523|  6.76k|      break;
  524|       |
  525|  2.17k|    case fourcc("imir"):
  ------------------
  |  Branch (525:5): [True: 2.17k, False: 443k]
  ------------------
  526|  2.17k|      box = std::make_shared<Box_imir>();
  527|  2.17k|      break;
  528|       |
  529|  17.7k|    case fourcc("clap"):
  ------------------
  |  Branch (529:5): [True: 17.7k, False: 428k]
  ------------------
  530|  17.7k|      box = std::make_shared<Box_clap>();
  531|  17.7k|      break;
  532|       |
  533|  16.1k|    case fourcc("iref"):
  ------------------
  |  Branch (533:5): [True: 16.1k, False: 430k]
  ------------------
  534|  16.1k|      box = std::make_shared<Box_iref>();
  535|  16.1k|      break;
  536|       |
  537|  3.70k|    case fourcc("hvcC"):
  ------------------
  |  Branch (537:5): [True: 3.70k, False: 442k]
  ------------------
  538|  3.70k|      box = std::make_shared<Box_hvcC>();
  539|  3.70k|      break;
  540|       |
  541|    113|    case fourcc("hvc1"):
  ------------------
  |  Branch (541:5): [True: 113, False: 446k]
  ------------------
  542|    113|      box = std::make_shared<Box_hvc1>();
  543|    113|      break;
  544|       |
  545|  3.92k|    case fourcc("av1C"):
  ------------------
  |  Branch (545:5): [True: 3.92k, False: 442k]
  ------------------
  546|  3.92k|      box = std::make_shared<Box_av1C>();
  547|  3.92k|      break;
  548|       |
  549|     83|    case fourcc("av01"):
  ------------------
  |  Branch (549:5): [True: 83, False: 446k]
  ------------------
  550|     83|      box = std::make_shared<Box_av01>();
  551|     83|      break;
  552|       |
  553|  2.51k|    case fourcc("vvcC"):
  ------------------
  |  Branch (553:5): [True: 2.51k, False: 443k]
  ------------------
  554|  2.51k|      box = std::make_shared<Box_vvcC>();
  555|  2.51k|      break;
  556|       |
  557|    150|    case fourcc("vvc1"):
  ------------------
  |  Branch (557:5): [True: 150, False: 445k]
  ------------------
  558|    150|      box = std::make_shared<Box_vvc1>();
  559|    150|      break;
  560|       |
  561|  6.91k|    case fourcc("idat"):
  ------------------
  |  Branch (561:5): [True: 6.91k, False: 439k]
  ------------------
  562|  6.91k|      box = std::make_shared<Box_idat>();
  563|  6.91k|      break;
  564|       |
  565|  1.66k|    case fourcc("grpl"):
  ------------------
  |  Branch (565:5): [True: 1.66k, False: 444k]
  ------------------
  566|  1.66k|      box = std::make_shared<Box_grpl>();
  567|  1.66k|      break;
  568|       |
  569|  1.33k|    case fourcc("pymd"):
  ------------------
  |  Branch (569:5): [True: 1.33k, False: 444k]
  ------------------
  570|  1.33k|      box = std::make_shared<Box_pymd>();
  571|  1.33k|      break;
  572|       |
  573|    225|    case fourcc("altr"):
  ------------------
  |  Branch (573:5): [True: 225, False: 445k]
  ------------------
  574|    225|      box = std::make_shared<Box_EntityToGroup>();
  575|    225|      break;
  576|       |
  577|    680|    case fourcc("ster"):
  ------------------
  |  Branch (577:5): [True: 680, False: 445k]
  ------------------
  578|    680|      box = std::make_shared<Box_ster>();
  579|    680|      break;
  580|       |
  581|  6.41k|    case fourcc("dinf"):
  ------------------
  |  Branch (581:5): [True: 6.41k, False: 439k]
  ------------------
  582|  6.41k|      box = std::make_shared<Box_dinf>();
  583|  6.41k|      break;
  584|       |
  585|  1.62k|    case fourcc("dref"):
  ------------------
  |  Branch (585:5): [True: 1.62k, False: 444k]
  ------------------
  586|  1.62k|      box = std::make_shared<Box_dref>();
  587|  1.62k|      break;
  588|       |
  589|  1.81k|    case fourcc("url "):
  ------------------
  |  Branch (589:5): [True: 1.81k, False: 444k]
  ------------------
  590|  1.81k|      box = std::make_shared<Box_url>();
  591|  1.81k|      break;
  592|       |
  593|  10.1k|    case fourcc("colr"):
  ------------------
  |  Branch (593:5): [True: 10.1k, False: 435k]
  ------------------
  594|  10.1k|      box = std::make_shared<Box_colr>();
  595|  10.1k|      break;
  596|       |
  597|  3.64k|    case fourcc("pixi"):
  ------------------
  |  Branch (597:5): [True: 3.64k, False: 442k]
  ------------------
  598|  3.64k|      box = std::make_shared<Box_pixi>();
  599|  3.64k|      break;
  600|       |
  601|  15.5k|    case fourcc("pasp"):
  ------------------
  |  Branch (601:5): [True: 15.5k, False: 430k]
  ------------------
  602|  15.5k|      box = std::make_shared<Box_pasp>();
  603|  15.5k|      break;
  604|       |
  605|  7.80k|    case fourcc("lsel"):
  ------------------
  |  Branch (605:5): [True: 7.80k, False: 438k]
  ------------------
  606|  7.80k|      box = std::make_shared<Box_lsel>();
  607|  7.80k|      break;
  608|       |
  609|  14.4k|    case fourcc("a1op"):
  ------------------
  |  Branch (609:5): [True: 14.4k, False: 431k]
  ------------------
  610|  14.4k|      box = std::make_shared<Box_a1op>();
  611|  14.4k|      break;
  612|       |
  613|  5.12k|    case fourcc("a1lx"):
  ------------------
  |  Branch (613:5): [True: 5.12k, False: 440k]
  ------------------
  614|  5.12k|      box = std::make_shared<Box_a1lx>();
  615|  5.12k|      break;
  616|       |
  617|  2.16k|    case fourcc("clli"):
  ------------------
  |  Branch (617:5): [True: 2.16k, False: 443k]
  ------------------
  618|  2.16k|      box = std::make_shared<Box_clli>();
  619|  2.16k|      break;
  620|       |
  621|  5.00k|    case fourcc("mdcv"):
  ------------------
  |  Branch (621:5): [True: 5.00k, False: 441k]
  ------------------
  622|  5.00k|      box = std::make_shared<Box_mdcv>();
  623|  5.00k|      break;
  624|       |
  625|  1.16k|    case fourcc("amve"):
  ------------------
  |  Branch (625:5): [True: 1.16k, False: 444k]
  ------------------
  626|  1.16k|      box = std::make_shared<Box_amve>();
  627|  1.16k|      break;
  628|       |
  629|  2.14k|    case fourcc("cmin"):
  ------------------
  |  Branch (629:5): [True: 2.14k, False: 443k]
  ------------------
  630|  2.14k|      box = std::make_shared<Box_cmin>();
  631|  2.14k|      break;
  632|       |
  633|  2.24k|    case fourcc("cmex"):
  ------------------
  |  Branch (633:5): [True: 2.24k, False: 443k]
  ------------------
  634|  2.24k|      box = std::make_shared<Box_cmex>();
  635|  2.24k|      break;
  636|       |
  637|  1.85k|    case fourcc("udes"):
  ------------------
  |  Branch (637:5): [True: 1.85k, False: 444k]
  ------------------
  638|  1.85k|      box = std::make_shared<Box_udes>();
  639|  1.85k|      break;
  640|       |
  641|  5.05k|    case fourcc("jpgC"):
  ------------------
  |  Branch (641:5): [True: 5.05k, False: 441k]
  ------------------
  642|  5.05k|      box = std::make_shared<Box_jpgC>();
  643|  5.05k|      break;
  644|       |
  645|    127|    case fourcc("mjpg"):
  ------------------
  |  Branch (645:5): [True: 127, False: 445k]
  ------------------
  646|    127|      box = std::make_shared<Box_mjpg>();
  647|    127|      break;
  648|       |
  649|    761|    case fourcc("elng"):
  ------------------
  |  Branch (649:5): [True: 761, False: 445k]
  ------------------
  650|    761|      box = std::make_shared<Box_elng>();
  651|    761|      break;
  652|       |
  653|       |
  654|      0|#if WITH_UNCOMPRESSED_CODEC
  655|    811|    case fourcc("cmpd"):
  ------------------
  |  Branch (655:5): [True: 811, False: 445k]
  ------------------
  656|    811|      box = std::make_shared<Box_cmpd>();
  657|    811|      break;
  658|       |
  659|  5.57k|    case fourcc("uncC"):
  ------------------
  |  Branch (659:5): [True: 5.57k, False: 440k]
  ------------------
  660|  5.57k|      box = std::make_shared<Box_uncC>();
  661|  5.57k|      break;
  662|       |
  663|    707|    case fourcc("cmpC"):
  ------------------
  |  Branch (663:5): [True: 707, False: 445k]
  ------------------
  664|    707|      box = std::make_shared<Box_cmpC>();
  665|    707|      break;
  666|       |
  667|    810|    case fourcc("icef"):
  ------------------
  |  Branch (667:5): [True: 810, False: 445k]
  ------------------
  668|    810|      box = std::make_shared<Box_icef>();
  669|    810|      break;
  670|       |
  671|    730|    case fourcc("cpat"):
  ------------------
  |  Branch (671:5): [True: 730, False: 445k]
  ------------------
  672|    730|      box = std::make_shared<Box_cpat>();
  673|    730|      break;
  674|       |
  675|      0|    case fourcc("splz"):
  ------------------
  |  Branch (675:5): [True: 0, False: 446k]
  ------------------
  676|      0|      box = std::make_shared<Box_splz>();
  677|      0|      break;
  678|       |
  679|      0|    case fourcc("sbpm"):
  ------------------
  |  Branch (679:5): [True: 0, False: 446k]
  ------------------
  680|      0|      box = std::make_shared<Box_sbpm>();
  681|      0|      break;
  682|       |
  683|      0|    case fourcc("snuc"):
  ------------------
  |  Branch (683:5): [True: 0, False: 446k]
  ------------------
  684|      0|      box = std::make_shared<Box_snuc>();
  685|      0|      break;
  686|       |
  687|      0|    case fourcc("cloc"):
  ------------------
  |  Branch (687:5): [True: 0, False: 446k]
  ------------------
  688|      0|      box = std::make_shared<Box_cloc>();
  689|      0|      break;
  690|       |
  691|  1.16k|    case fourcc("uncv"):
  ------------------
  |  Branch (691:5): [True: 1.16k, False: 444k]
  ------------------
  692|  1.16k|      box = std::make_shared<Box_uncv>();
  693|  1.16k|      break;
  694|      0|#endif
  695|       |
  696|       |    // --- JPEG 2000
  697|       |
  698|  4.78k|    case fourcc("j2kH"):
  ------------------
  |  Branch (698:5): [True: 4.78k, False: 441k]
  ------------------
  699|  4.78k|      box = std::make_shared<Box_j2kH>();
  700|  4.78k|      break;
  701|       |
  702|  9.58k|    case fourcc("cdef"):
  ------------------
  |  Branch (702:5): [True: 9.58k, False: 436k]
  ------------------
  703|  9.58k|      box = std::make_shared<Box_cdef>();
  704|  9.58k|      break;
  705|       |
  706|  3.21k|    case fourcc("cmap"):
  ------------------
  |  Branch (706:5): [True: 3.21k, False: 442k]
  ------------------
  707|  3.21k|      box = std::make_shared<Box_cmap>();
  708|  3.21k|      break;
  709|       |
  710|  1.81k|    case fourcc("pclr"):
  ------------------
  |  Branch (710:5): [True: 1.81k, False: 444k]
  ------------------
  711|  1.81k|      box = std::make_shared<Box_pclr>();
  712|  1.81k|      break;
  713|       |
  714|    573|    case fourcc("j2kL"):
  ------------------
  |  Branch (714:5): [True: 573, False: 445k]
  ------------------
  715|    573|      box = std::make_shared<Box_j2kL>();
  716|    573|      break;
  717|       |
  718|     66|    case fourcc("j2ki"):
  ------------------
  |  Branch (718:5): [True: 66, False: 446k]
  ------------------
  719|     66|      box = std::make_shared<Box_j2ki>();
  720|     66|      break;
  721|       |
  722|       |
  723|       |    // --- mski
  724|       |
  725|    503|    case fourcc("mskC"):
  ------------------
  |  Branch (725:5): [True: 503, False: 445k]
  ------------------
  726|    503|      box = std::make_shared<Box_mskC>();
  727|    503|      break;
  728|       |
  729|       |    // --- TAI timestamps
  730|       |
  731|    714|    case fourcc("itai"):
  ------------------
  |  Branch (731:5): [True: 714, False: 445k]
  ------------------
  732|    714|      box = std::make_shared<Box_itai>();
  733|    714|      break;
  734|       |
  735|  1.62k|    case fourcc("taic"):
  ------------------
  |  Branch (735:5): [True: 1.62k, False: 444k]
  ------------------
  736|  1.62k|      box = std::make_shared<Box_taic>();
  737|  1.62k|      break;
  738|       |
  739|       |    // --- AVC (H.264)
  740|       |
  741|  4.64k|    case fourcc("avcC"):
  ------------------
  |  Branch (741:5): [True: 4.64k, False: 441k]
  ------------------
  742|  4.64k|      box = std::make_shared<Box_avcC>();
  743|  4.64k|      break;
  744|       |
  745|     69|    case fourcc("avc1"):
  ------------------
  |  Branch (745:5): [True: 69, False: 446k]
  ------------------
  746|     69|      box = std::make_shared<Box_avc1>();
  747|     69|      break;
  748|       |
  749|      0|#if HEIF_ENABLE_EXPERIMENTAL_FEATURES
  750|  1.25k|    case fourcc("tilC"):
  ------------------
  |  Branch (750:5): [True: 1.25k, False: 444k]
  ------------------
  751|  1.25k|      box = std::make_shared<Box_tilC>();
  752|  1.25k|      break;
  753|      0|#endif
  754|       |
  755|       |#if ENABLE_EXPERIMENTAL_MINI_FORMAT
  756|       |    case fourcc("mini"):
  757|       |      box = std::make_shared<Box_mini>();
  758|       |      break;
  759|       |#endif
  760|       |
  761|  2.12k|    case fourcc("mdat"):
  ------------------
  |  Branch (761:5): [True: 2.12k, False: 443k]
  ------------------
  762|       |      // avoid generating a 'Box_other'
  763|  2.12k|      box = std::make_shared<Box>();
  764|  2.12k|      break;
  765|       |
  766|  14.6k|    case fourcc("uuid"):
  ------------------
  |  Branch (766:5): [True: 14.6k, False: 431k]
  ------------------
  767|  14.6k|      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 (767:11): [True: 2.84k, False: 11.7k]
  ------------------
  768|  2.84k|        box = std::make_shared<Box_cmin>();
  769|  2.84k|      }
  770|  11.7k|      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 (770:16): [True: 4.88k, False: 6.91k]
  ------------------
  771|  4.88k|        box = std::make_shared<Box_cmex>();
  772|  4.88k|      }
  773|  6.91k|      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 (773:16): [True: 1.88k, False: 5.03k]
  ------------------
  774|  1.88k|        box = std::make_shared<Box_gimi_content_id>();
  775|  1.88k|      }
  776|  5.03k|#if WITH_UNCOMPRESSED_CODEC
  777|  5.03k|      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 (777:16): [True: 0, False: 5.03k]
  ------------------
  778|      0|        box = std::make_shared<Box_gimi_component_content_ids>();
  779|      0|      }
  780|  5.03k|#endif
  781|  5.03k|      else {
  782|  5.03k|        box = std::make_shared<Box_other>(hdr.get_short_type());
  783|  5.03k|      }
  784|  14.6k|      break;
  785|       |
  786|       |    // --- sequences
  787|       |
  788|    542|    case fourcc("moov"):
  ------------------
  |  Branch (788:5): [True: 542, False: 445k]
  ------------------
  789|    542|      box = std::make_shared<Box_moov>();
  790|    542|      break;
  791|       |
  792|  1.29k|    case fourcc("mvhd"):
  ------------------
  |  Branch (792:5): [True: 1.29k, False: 444k]
  ------------------
  793|  1.29k|      box = std::make_shared<Box_mvhd>();
  794|  1.29k|      break;
  795|       |
  796|    622|    case fourcc("trak"):
  ------------------
  |  Branch (796:5): [True: 622, False: 445k]
  ------------------
  797|    622|      box = std::make_shared<Box_trak>();
  798|    622|      break;
  799|       |
  800|  1.49k|    case fourcc("tkhd"):
  ------------------
  |  Branch (800:5): [True: 1.49k, False: 444k]
  ------------------
  801|  1.49k|      box = std::make_shared<Box_tkhd>();
  802|  1.49k|      break;
  803|       |
  804|     69|    case fourcc("mdia"):
  ------------------
  |  Branch (804:5): [True: 69, False: 446k]
  ------------------
  805|     69|      box = std::make_shared<Box_mdia>();
  806|     69|      break;
  807|       |
  808|  1.07k|    case fourcc("mdhd"):
  ------------------
  |  Branch (808:5): [True: 1.07k, False: 445k]
  ------------------
  809|  1.07k|      box = std::make_shared<Box_mdhd>();
  810|  1.07k|      break;
  811|       |
  812|    258|    case fourcc("minf"):
  ------------------
  |  Branch (812:5): [True: 258, False: 445k]
  ------------------
  813|    258|      box = std::make_shared<Box_minf>();
  814|    258|      break;
  815|       |
  816|    719|    case fourcc("vmhd"):
  ------------------
  |  Branch (816:5): [True: 719, False: 445k]
  ------------------
  817|    719|      box = std::make_shared<Box_vmhd>();
  818|    719|      break;
  819|       |
  820|    939|    case fourcc("stbl"):
  ------------------
  |  Branch (820:5): [True: 939, False: 445k]
  ------------------
  821|    939|      box = std::make_shared<Box_stbl>();
  822|    939|      break;
  823|       |
  824|  1.74k|    case fourcc("stsd"):
  ------------------
  |  Branch (824:5): [True: 1.74k, False: 444k]
  ------------------
  825|  1.74k|      box = std::make_shared<Box_stsd>();
  826|  1.74k|      break;
  827|       |
  828|  1.13k|    case fourcc("stts"):
  ------------------
  |  Branch (828:5): [True: 1.13k, False: 444k]
  ------------------
  829|  1.13k|      box = std::make_shared<Box_stts>();
  830|  1.13k|      break;
  831|       |
  832|  1.02k|    case fourcc("ctts"):
  ------------------
  |  Branch (832:5): [True: 1.02k, False: 445k]
  ------------------
  833|  1.02k|      box = std::make_shared<Box_ctts>();
  834|  1.02k|      break;
  835|       |
  836|    224|    case fourcc("stsc"):
  ------------------
  |  Branch (836:5): [True: 224, False: 445k]
  ------------------
  837|    224|      box = std::make_shared<Box_stsc>();
  838|    224|      break;
  839|       |
  840|  1.17k|    case fourcc("stco"):
  ------------------
  |  Branch (840:5): [True: 1.17k, False: 444k]
  ------------------
  841|  1.17k|      box = std::make_shared<Box_stco>();
  842|  1.17k|      break;
  843|       |
  844|  1.68k|    case fourcc("stsz"):
  ------------------
  |  Branch (844:5): [True: 1.68k, False: 444k]
  ------------------
  845|  1.68k|      box = std::make_shared<Box_stsz>();
  846|  1.68k|      break;
  847|       |
  848|    739|    case fourcc("stss"):
  ------------------
  |  Branch (848:5): [True: 739, False: 445k]
  ------------------
  849|    739|      box = std::make_shared<Box_stss>();
  850|    739|      break;
  851|       |
  852|    601|    case fourcc("ccst"):
  ------------------
  |  Branch (852:5): [True: 601, False: 445k]
  ------------------
  853|    601|      box = std::make_shared<Box_ccst>();
  854|    601|      break;
  855|       |
  856|    805|    case fourcc("auxi"):
  ------------------
  |  Branch (856:5): [True: 805, False: 445k]
  ------------------
  857|    805|      box = std::make_shared<Box_auxi>();
  858|    805|      break;
  859|       |
  860|    344|    case fourcc("edts"):
  ------------------
  |  Branch (860:5): [True: 344, False: 445k]
  ------------------
  861|    344|      box = std::make_shared<Box_edts>();
  862|    344|      break;
  863|       |
  864|  1.04k|    case fourcc("elst"):
  ------------------
  |  Branch (864:5): [True: 1.04k, False: 445k]
  ------------------
  865|  1.04k|      box = std::make_shared<Box_elst>();
  866|  1.04k|      break;
  867|       |
  868|    963|    case fourcc("sbgp"):
  ------------------
  |  Branch (868:5): [True: 963, False: 445k]
  ------------------
  869|    963|      box = std::make_shared<Box_sbgp>();
  870|    963|      break;
  871|       |
  872|  1.79k|    case fourcc("sgpd"):
  ------------------
  |  Branch (872:5): [True: 1.79k, False: 444k]
  ------------------
  873|  1.79k|      box = std::make_shared<Box_sgpd>();
  874|  1.79k|      break;
  875|       |
  876|    838|    case fourcc("btrt"):
  ------------------
  |  Branch (876:5): [True: 838, False: 445k]
  ------------------
  877|    838|      box = std::make_shared<Box_btrt>();
  878|    838|      break;
  879|       |
  880|  1.18k|    case fourcc("saiz"):
  ------------------
  |  Branch (880:5): [True: 1.18k, False: 444k]
  ------------------
  881|  1.18k|      box = std::make_shared<Box_saiz>();
  882|  1.18k|      break;
  883|       |
  884|  1.32k|    case fourcc("saio"):
  ------------------
  |  Branch (884:5): [True: 1.32k, False: 444k]
  ------------------
  885|  1.32k|      box = std::make_shared<Box_saio>();
  886|  1.32k|      break;
  887|       |
  888|    839|    case fourcc("urim"):
  ------------------
  |  Branch (888:5): [True: 839, False: 445k]
  ------------------
  889|    839|      box = std::make_shared<Box_URIMetaSampleEntry>();
  890|    839|      break;
  891|       |
  892|    912|    case fourcc("uri "):
  ------------------
  |  Branch (892:5): [True: 912, False: 445k]
  ------------------
  893|    912|      box = std::make_shared<Box_uri>();
  894|    912|      break;
  895|       |
  896|    425|    case fourcc("nmhd"):
  ------------------
  |  Branch (896:5): [True: 425, False: 445k]
  ------------------
  897|    425|      box = std::make_shared<Box_nmhd>();
  898|    425|      break;
  899|       |
  900|  1.40k|    case fourcc("tref"):
  ------------------
  |  Branch (900:5): [True: 1.40k, False: 444k]
  ------------------
  901|  1.40k|      box = std::make_shared<Box_tref>();
  902|  1.40k|      break;
  903|       |
  904|    462|    case fourcc("sdtp"):
  ------------------
  |  Branch (904:5): [True: 462, False: 445k]
  ------------------
  905|    462|      box = std::make_shared<Box_sdtp>();
  906|    462|      break;
  907|       |
  908|      0|#if HEIF_WITH_OMAF
  909|       |    // OMAF
  910|      0|    case fourcc("prfr"):
  ------------------
  |  Branch (910:5): [True: 0, False: 446k]
  ------------------
  911|      0|      box = std::make_shared<Box_prfr>();
  912|      0|      break;
  913|      0|#endif
  914|       |
  915|   132k|    default:
  ------------------
  |  Branch (915:5): [True: 132k, False: 313k]
  ------------------
  916|   132k|      box = std::make_shared<Box_other>(hdr.get_short_type());
  917|   132k|      break;
  918|   446k|  }
  919|       |
  920|   446k|  box->set_short_header(hdr);
  921|       |
  922|   446k|  box->m_debug_box_type = hdr.get_type_string(); // only for debugging
  923|       |
  924|       |
  925|   446k|  if (range.get_nesting_level() > MAX_BOX_NESTING_LEVEL) {
  ------------------
  |  Branch (925:7): [True: 3, False: 446k]
  ------------------
  926|      3|    return Error(heif_error_Memory_allocation_error,
  927|      3|                 heif_suberror_Security_limit_exceeded,
  928|      3|                 "Security limit for maximum nesting of boxes has been exceeded");
  929|      3|  }
  930|       |
  931|   446k|  if (hdr.has_fixed_box_size()) {
  ------------------
  |  Branch (931:7): [True: 392k, False: 53.4k]
  ------------------
  932|       |    // Sanity checks
  933|   392k|    if (hdr.get_box_size() < hdr.get_header_size()) {
  ------------------
  |  Branch (933:9): [True: 21, False: 392k]
  ------------------
  934|     21|      std::stringstream sstr;
  935|     21|      sstr << "Box size (" << hdr.get_box_size() << " bytes) smaller than header size ("
  936|     21|           << hdr.get_header_size() << " bytes)";
  937|       |
  938|     21|      return {heif_error_Invalid_input,
  939|     21|              heif_suberror_Invalid_box_size,
  940|     21|              sstr.str()};
  941|     21|    }
  942|       |
  943|       |    // this is >= 0 because of above condition
  944|   392k|    auto nBytes = static_cast<uint64_t>(hdr.get_box_size() - hdr.get_header_size());
  945|   392k|    if (nBytes > SIZE_MAX) {
  ------------------
  |  Branch (945:9): [True: 0, False: 392k]
  ------------------
  946|      0|      return {heif_error_Memory_allocation_error,
  947|      0|              heif_suberror_Invalid_box_size,
  948|      0|              "Box size too large"};
  949|      0|    }
  950|       |
  951|       |    // Security check: make sure that box size does not exceed int64 size.
  952|       |
  953|   392k|    if (hdr.get_box_size() > (uint64_t) std::numeric_limits<int64_t>::max()) {
  ------------------
  |  Branch (953:9): [True: 0, False: 392k]
  ------------------
  954|      0|      return {heif_error_Invalid_input,
  955|      0|              heif_suberror_Invalid_box_size};
  956|      0|    }
  957|       |
  958|       |    // --- wait for data to arrive
  959|       |
  960|   392k|    auto status = range.wait_for_available_bytes(static_cast<size_t>(nBytes));
  961|   392k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (961:9): [True: 2.92k, False: 389k]
  ------------------
  962|       |      // TODO: return recoverable error at timeout
  963|  2.92k|      return {heif_error_Invalid_input,
  964|  2.92k|              heif_suberror_End_of_data};
  965|  2.92k|    }
  966|   392k|  }
  967|       |
  968|   443k|  auto box_size = static_cast<int64_t>(hdr.get_box_size());
  969|   443k|  int64_t box_size_without_header = hdr.has_fixed_box_size() ? (box_size - hdr.get_header_size()) : (int64_t)range.get_remaining_bytes();
  ------------------
  |  Branch (969:37): [True: 389k, False: 53.4k]
  ------------------
  970|       |
  971|       |  // Box size may not be larger than remaining bytes in parent box.
  972|       |
  973|   443k|  if ((int64_t)range.get_remaining_bytes() < box_size_without_header) {
  ------------------
  |  Branch (973:7): [True: 2, False: 443k]
  ------------------
  974|      2|    return {heif_error_Invalid_input,
  975|      2|            heif_suberror_Invalid_box_size};
  976|      2|  }
  977|       |
  978|       |
  979|       |  // Create child bitstream range and read box from that range.
  980|       |
  981|   443k|  BitstreamRange boxrange(range.get_istream(),
  982|   443k|                          box_size_without_header,
  983|   443k|                          &range);
  984|       |
  985|   443k|  err = box->parse(boxrange, limits);
  986|   443k|  boxrange.skip_to_end_of_box();
  987|       |
  988|   443k|  if (err == Error::Ok) {
  ------------------
  |  Branch (988:7): [True: 412k, False: 30.9k]
  ------------------
  989|   412k|    *result = std::move(box);
  990|   412k|  }
  991|  30.9k|  else {
  992|  30.9k|    parse_error_fatality fatality = box->get_parse_error_fatality();
  993|       |
  994|  30.9k|    box = std::make_shared<Box_Error>(box->get_short_type(), err, fatality);
  995|       |
  996|       |    // We return a Box_Error that represents the parse error.
  997|  30.9k|    *result = std::move(box);
  998|  30.9k|  }
  999|       |
 1000|   443k|  return err;
 1001|   443k|}
_ZNK3Box4dumpER6Indent:
 1005|   222k|{
 1006|   222k|  std::ostringstream sstr;
 1007|       |
 1008|   222k|  sstr << BoxHeader::dump(indent);
 1009|       |
 1010|   222k|  return sstr.str();
 1011|   222k|}
_ZNK7FullBox4dumpER6Indent:
 1015|  21.9k|{
 1016|  21.9k|  std::ostringstream sstr;
 1017|       |
 1018|  21.9k|  sstr << Box::dump(indent);
 1019|       |
 1020|  21.9k|  sstr << indent << "version: " << ((int) m_version) << "\n"
 1021|  21.9k|       << indent << "flags: " << std::hex << m_flags << "\n";
 1022|       |
 1023|  21.9k|  return sstr.str();
 1024|  21.9k|}
_ZN3Box13read_childrenER14BitstreamRangejPK20heif_security_limits:
 1085|  68.1k|{
 1086|  68.1k|  uint32_t count = 0;
 1087|       |
 1088|   398k|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (1088:10): [True: 335k, False: 63.2k]
  |  Branch (1088:26): [True: 335k, False: 0]
  ------------------
 1089|   335k|    std::shared_ptr<Box> box;
 1090|   335k|    Error error = Box::read(range, &box, limits);
 1091|   335k|    if (error != Error::Ok && (!box || box->get_parse_error_fatality() == parse_error_fatality::fatal)) {
  ------------------
  |  Branch (1091:9): [True: 26.5k, False: 308k]
  |  Branch (1091:32): [True: 195, False: 26.3k]
  |  Branch (1091:40): [True: 1.95k, False: 24.4k]
  ------------------
 1092|  2.14k|      return error;
 1093|  2.14k|    }
 1094|       |
 1095|   333k|    if (max_number == READ_CHILDREN_ALL) {
  ------------------
  |  Branch (1095:9): [True: 110k, False: 222k]
  ------------------
 1096|   110k|      uint32_t max_children;
 1097|   110k|      if (get_short_type() == fourcc("iinf")) {
  ------------------
  |  Branch (1097:11): [True: 197, False: 110k]
  ------------------
 1098|    197|        max_children = limits->max_items;
 1099|    197|      }
 1100|   110k|      else {
 1101|   110k|        max_children = limits->max_children_per_box;
 1102|   110k|      }
 1103|       |
 1104|   110k|      if (max_children && m_children.size() > max_children) {
  ------------------
  |  Branch (1104:11): [True: 110k, False: 0]
  |  Branch (1104:27): [True: 64, False: 110k]
  ------------------
 1105|     64|        std::stringstream sstr;
 1106|     64|        sstr << "Maximum number of child boxes (" << max_children << ") in '" << get_type_string() << "' box exceeded.";
 1107|       |
 1108|       |        // Sanity check.
 1109|     64|        return Error(heif_error_Memory_allocation_error,
 1110|     64|                     heif_suberror_Security_limit_exceeded,
 1111|     64|                     sstr.str());
 1112|     64|      }
 1113|   110k|    }
 1114|       |
 1115|   332k|    m_children.push_back(std::move(box));
 1116|       |
 1117|       |
 1118|       |    // count the new child and end reading new children when we reached the expected number
 1119|       |
 1120|   332k|    count++;
 1121|       |
 1122|   332k|    if (max_number != READ_CHILDREN_ALL &&
  ------------------
  |  Branch (1122:9): [True: 222k, False: 110k]
  ------------------
 1123|   222k|        count == max_number) {
  ------------------
  |  Branch (1123:9): [True: 2.61k, False: 219k]
  ------------------
 1124|  2.61k|      break;
 1125|  2.61k|    }
 1126|   332k|  }
 1127|       |
 1128|  65.9k|  return range.get_error();
 1129|  68.1k|}
_ZNK3Box13dump_childrenER6Indentb:
 1146|  59.5k|{
 1147|  59.5k|  std::ostringstream sstr;
 1148|       |
 1149|  59.5k|  bool first = true;
 1150|  59.5k|  int idx=1;
 1151|       |
 1152|  59.5k|  indent++;
 1153|   241k|  for (const auto& childBox : m_children) {
  ------------------
  |  Branch (1153:29): [True: 241k, False: 59.5k]
  ------------------
 1154|   241k|    if (first) {
  ------------------
  |  Branch (1154:9): [True: 49.6k, False: 191k]
  ------------------
 1155|  49.6k|      first = false;
 1156|  49.6k|    }
 1157|   191k|    else {
 1158|   191k|      sstr << indent << "\n";
 1159|   191k|    }
 1160|       |
 1161|   241k|    if (with_index) {
  ------------------
  |  Branch (1161:9): [True: 25.2k, False: 215k]
  ------------------
 1162|  25.2k|      sstr << indent << "index: " << idx << "\n";
 1163|  25.2k|      idx++;
 1164|  25.2k|    }
 1165|       |
 1166|   241k|    sstr << childBox->dump(indent);
 1167|   241k|  }
 1168|  59.5k|  indent--;
 1169|       |
 1170|  59.5k|  return sstr.str();
 1171|  59.5k|}
_ZN9Box_other5parseER14BitstreamRangePK20heif_security_limits:
 1195|   134k|{
 1196|   134k|  if (has_fixed_box_size()) {
  ------------------
  |  Branch (1196:7): [True: 128k, False: 6.47k]
  ------------------
 1197|   128k|    size_t len;
 1198|   128k|    if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1198:9): [True: 128k, False: 0]
  ------------------
 1199|   128k|      auto len64 = get_box_size() - get_header_size();
 1200|   128k|      if (len64 > MAX_BOX_SIZE) {
  ------------------
  |  Branch (1200:11): [True: 0, False: 128k]
  ------------------
 1201|      0|        return {heif_error_Invalid_input,
 1202|      0|                heif_suberror_Security_limit_exceeded,
 1203|      0|                "Box size too large"};
 1204|      0|      }
 1205|       |
 1206|   128k|      len = static_cast<size_t>(len64);
 1207|       |
 1208|   128k|      m_data.resize(len);
 1209|   128k|      range.read(m_data.data(), len);
 1210|   128k|    }
 1211|      0|    else {
 1212|      0|      return {heif_error_Invalid_input,
 1213|      0|              heif_suberror_Invalid_box_size};
 1214|      0|    }
 1215|   128k|  }
 1216|  6.47k|  else {
 1217|       |    // TODO: boxes until end of file (we will probably never need this)
 1218|  6.47k|  }
 1219|       |
 1220|   134k|  return range.get_error();
 1221|   134k|}
_ZNK9Box_other4dumpER6Indent:
 1241|   103k|{
 1242|   103k|  std::ostringstream sstr;
 1243|       |
 1244|   103k|  sstr << BoxHeader::dump(indent);
 1245|       |
 1246|       |  // --- show raw box content
 1247|       |
 1248|   103k|  size_t len = 0;
 1249|   103k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1249:7): [True: 97.9k, False: 5.31k]
  ------------------
 1250|       |    // We can cast because if it does not fit, it would fail during parsing.
 1251|  97.9k|    len = static_cast<size_t>(get_box_size() - get_header_size());
 1252|  97.9k|  }
 1253|  5.31k|  else {
 1254|  5.31k|    sstr << indent << "invalid box size " << get_box_size() << " (smaller than header)\n";
 1255|  5.31k|    return sstr.str();
 1256|  5.31k|  }
 1257|       |
 1258|  97.9k|  sstr << write_raw_data_as_hex(m_data.data(), len,
 1259|  97.9k|                                indent.get_string() + "data: ",
 1260|  97.9k|                                indent.get_string() + "      ");
 1261|       |
 1262|  97.9k|  return sstr.str();
 1263|   103k|}
_ZNK9Box_Error4dumpER6Indent:
 1267|  5.76k|{
 1268|  5.76k|  std::ostringstream sstr;
 1269|  5.76k|  sstr << indent << '\'' << fourcc_to_string(m_box_type_with_parse_error) << "' parse error: " << m_error.message << "\n";
 1270|  5.76k|  sstr << indent << "fatality: ";
 1271|  5.76k|  switch (m_fatality) {
  ------------------
  |  Branch (1271:11): [True: 5.76k, False: 0]
  ------------------
 1272|      0|    case parse_error_fatality::fatal: sstr << "fatal\n"; break;
  ------------------
  |  Branch (1272:5): [True: 0, False: 5.76k]
  ------------------
 1273|  2.53k|    case parse_error_fatality::ignorable: sstr << "ignorable\n"; break;
  ------------------
  |  Branch (1273:5): [True: 2.53k, False: 3.22k]
  ------------------
 1274|  3.22k|    case parse_error_fatality::optional: sstr << "optional\n"; break;
  ------------------
  |  Branch (1274:5): [True: 3.22k, False: 2.53k]
  ------------------
 1275|  5.76k|  }
 1276|       |
 1277|  5.76k|  return sstr.str();
 1278|  5.76k|}
_ZNK9Box_Error24get_parse_error_fatalityEv:
 1281|  26.3k|{
 1282|  26.3k|  return m_fatality;
 1283|  26.3k|}
_ZN8Box_ftyp5parseER14BitstreamRangePK20heif_security_limits:
 1287|  11.5k|{
 1288|  11.5k|  m_major_brand = range.read32();
 1289|  11.5k|  m_minor_version = range.read32();
 1290|       |
 1291|  11.5k|  uint64_t box_size = get_box_size();
 1292|  11.5k|  if (box_size < 8 || box_size - 8 < get_header_size()) {
  ------------------
  |  Branch (1292:7): [True: 7, False: 11.4k]
  |  Branch (1292:23): [True: 6, False: 11.4k]
  ------------------
 1293|       |    // Sanity check.
 1294|     13|    return Error(heif_error_Invalid_input,
 1295|     13|                 heif_suberror_Invalid_box_size,
 1296|     13|                 "ftyp box too small (less than 8 bytes)");
 1297|     13|  }
 1298|       |
 1299|  11.4k|  uint64_t n_minor_brands = (get_box_size() - get_header_size() - 8) / 4;
 1300|       |
 1301|  11.4k|  if (limits->max_number_of_file_brands && n_minor_brands > limits->max_number_of_file_brands) {
  ------------------
  |  Branch (1301:7): [True: 11.4k, False: 0]
  |  Branch (1301:44): [True: 16, False: 11.4k]
  ------------------
 1302|     16|    return {
 1303|     16|      heif_error_Memory_allocation_error,
 1304|     16|      heif_suberror_Security_limit_exceeded,
 1305|     16|      "Number of minor brands in file exceeds security limit"
 1306|     16|    };
 1307|     16|  }
 1308|       |
 1309|  46.5k|  for (uint64_t i = 0; i < n_minor_brands && !range.error(); i++) {
  ------------------
  |  Branch (1309:24): [True: 35.0k, False: 11.4k]
  |  Branch (1309:46): [True: 35.0k, False: 0]
  ------------------
 1310|  35.0k|    m_compatible_brands.push_back(range.read32());
 1311|  35.0k|  }
 1312|       |
 1313|  11.4k|  return range.get_error();
 1314|  11.4k|}
_ZNK8Box_ftyp4dumpER6Indent:
 1327|  10.0k|{
 1328|  10.0k|  std::ostringstream sstr;
 1329|       |
 1330|  10.0k|  sstr << BoxHeader::dump(indent);
 1331|       |
 1332|  10.0k|  sstr << indent << "major brand: " << fourcc_to_string(m_major_brand) << "\n"
 1333|  10.0k|       << indent << "minor version: ";
 1334|  10.0k|  if (m_minor_version < ('A' << 24)) {
  ------------------
  |  Branch (1334:7): [True: 8.05k, False: 2.03k]
  ------------------
 1335|       |    // This is probably a version number
 1336|  8.05k|    sstr << m_minor_version;
 1337|  8.05k|  } else {
 1338|       |    // probably a 4CC, as used for mif3
 1339|  2.03k|    sstr << fourcc_to_string(m_minor_version);
 1340|  2.03k|  }
 1341|  10.0k|  sstr << "\n" << indent << "compatible brands: ";
 1342|       |
 1343|  10.0k|  bool first = true;
 1344|  30.4k|  for (uint32_t brand : m_compatible_brands) {
  ------------------
  |  Branch (1344:23): [True: 30.4k, False: 10.0k]
  ------------------
 1345|  30.4k|    if (first) { first = false; }
  ------------------
  |  Branch (1345:9): [True: 9.20k, False: 21.2k]
  ------------------
 1346|  21.2k|    else { sstr << ','; }
 1347|       |
 1348|  30.4k|    sstr << fourcc_to_string(brand);
 1349|  30.4k|  }
 1350|  10.0k|  sstr << "\n";
 1351|       |
 1352|  10.0k|  return sstr.str();
 1353|  10.0k|}
_ZN8Box_free5parseER14BitstreamRangePK20heif_security_limits:
 1382|  1.13k|{
 1383|  1.13k|  range.skip_to_end_of_box();
 1384|  1.13k|  return range.get_error();
 1385|  1.13k|}
_ZNK8Box_free4dumpER6Indent:
 1389|  1.00k|{
 1390|  1.00k|  std::ostringstream sstr;
 1391|  1.00k|  sstr << BoxHeader::dump(indent);
 1392|  1.00k|  return sstr.str();
 1393|  1.00k|}
_ZN8Box_meta5parseER14BitstreamRangePK20heif_security_limits:
 1405|  2.93k|{
 1406|  2.93k|  parse_full_box_header(range);
 1407|       |
 1408|  2.93k|  if (get_version() != 0) {
  ------------------
  |  Branch (1408:7): [True: 7, False: 2.93k]
  ------------------
 1409|      7|    return unsupported_version_error("meta");
 1410|      7|  }
 1411|       |
 1412|       |  /*
 1413|       |  uint64_t boxSizeLimit;
 1414|       |  if (get_box_size() == BoxHeader::size_until_end_of_file) {
 1415|       |    boxSizeLimit = sizeLimit;
 1416|       |  }
 1417|       |  else {
 1418|       |    boxSizeLimit = get_box_size() - get_header_size();
 1419|       |  }
 1420|       |  */
 1421|       |
 1422|  2.93k|  return read_children(range, READ_CHILDREN_ALL, limits);
 1423|  2.93k|}
_ZNK8Box_meta4dumpER6Indent:
 1427|  2.70k|{
 1428|  2.70k|  std::ostringstream sstr;
 1429|  2.70k|  sstr << Box::dump(indent);
 1430|  2.70k|  sstr << dump_children(indent);
 1431|       |
 1432|  2.70k|  return sstr.str();
 1433|  2.70k|}
_ZNK7FullBox25unsupported_version_errorEPKc:
 1437|  2.17k|{
 1438|  2.17k|  std::stringstream sstr;
 1439|  2.17k|  sstr << box << " box data version " << ((int) m_version) << " is not implemented yet";
 1440|       |
 1441|  2.17k|  return {heif_error_Unsupported_feature,
 1442|  2.17k|          heif_suberror_Unsupported_data_version,
 1443|  2.17k|          sstr.str()};
 1444|  2.17k|}
_ZN8Box_hdlr5parseER14BitstreamRangePK20heif_security_limits:
 1448|  2.14k|{
 1449|  2.14k|  parse_full_box_header(range);
 1450|       |
 1451|  2.14k|  if (get_version() != 0) {
  ------------------
  |  Branch (1451:7): [True: 6, False: 2.13k]
  ------------------
 1452|      6|    return unsupported_version_error("hdlr");
 1453|      6|  }
 1454|       |
 1455|  2.13k|  m_pre_defined = range.read32();
 1456|  2.13k|  m_handler_type = range.read32();
 1457|       |
 1458|  8.54k|  for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1458:19): [True: 6.41k, False: 2.13k]
  ------------------
 1459|  6.41k|    m_reserved[i] = range.read32();
 1460|  6.41k|  }
 1461|       |
 1462|  2.13k|  m_name = range.read_string();
 1463|       |
 1464|  2.13k|  return range.get_error();
 1465|  2.14k|}
_ZNK8Box_hdlr4dumpER6Indent:
 1469|  1.53k|{
 1470|  1.53k|  std::ostringstream sstr;
 1471|  1.53k|  sstr << Box::dump(indent);
 1472|  1.53k|  sstr << indent << "pre_defined: " << m_pre_defined << "\n"
 1473|  1.53k|       << indent << "handler_type: " << fourcc_to_string(m_handler_type) << "\n"
 1474|  1.53k|       << indent << "name: " << m_name << "\n";
 1475|       |
 1476|  1.53k|  return sstr.str();
 1477|  1.53k|}
_ZN8Box_pitm5parseER14BitstreamRangePK20heif_security_limits:
 1500|  3.20k|{
 1501|  3.20k|  parse_full_box_header(range);
 1502|       |
 1503|  3.20k|  if (get_version() > 1) {
  ------------------
  |  Branch (1503:7): [True: 6, False: 3.19k]
  ------------------
 1504|      6|    return unsupported_version_error("pitm");
 1505|      6|  }
 1506|       |
 1507|       |
 1508|  3.19k|  if (get_version() == 0) {
  ------------------
  |  Branch (1508:7): [True: 2.99k, False: 205]
  ------------------
 1509|  2.99k|    m_item_ID = range.read16();
 1510|  2.99k|  }
 1511|    205|  else {
 1512|    205|    m_item_ID = range.read32();
 1513|    205|  }
 1514|       |
 1515|  3.19k|  return range.get_error();
 1516|  3.20k|}
_ZNK8Box_pitm4dumpER6Indent:
 1520|  2.59k|{
 1521|  2.59k|  std::ostringstream sstr;
 1522|  2.59k|  sstr << Box::dump(indent);
 1523|  2.59k|  sstr << indent << "item_ID: " << m_item_ID << "\n";
 1524|       |
 1525|  2.59k|  return sstr.str();
 1526|  2.59k|}
_ZN8Box_iloc5parseER14BitstreamRangePK20heif_security_limits:
 1559|  2.08k|{
 1560|  2.08k|  parse_full_box_header(range);
 1561|       |
 1562|  2.08k|  if (get_version() > 2) {
  ------------------
  |  Branch (1562:7): [True: 7, False: 2.07k]
  ------------------
 1563|      7|    return unsupported_version_error("iloc");
 1564|      7|  }
 1565|       |
 1566|  2.07k|  const int version = get_version();
 1567|       |
 1568|  2.07k|  uint16_t values4 = range.read16();
 1569|       |
 1570|  2.07k|  int offset_size = (values4 >> 12) & 0xF;
 1571|  2.07k|  int length_size = (values4 >> 8) & 0xF;
 1572|  2.07k|  int base_offset_size = (values4 >> 4) & 0xF;
 1573|  2.07k|  int index_size = 0;
 1574|       |
 1575|  2.07k|  if (version == 1 || version == 2) {
  ------------------
  |  Branch (1575:7): [True: 305, False: 1.76k]
  |  Branch (1575:23): [True: 248, False: 1.52k]
  ------------------
 1576|    553|    index_size = (values4 & 0xF);
 1577|    553|  }
 1578|       |
 1579|  2.07k|  uint32_t item_count = 0;
 1580|  2.07k|  if (version < 2) {
  ------------------
  |  Branch (1580:7): [True: 1.82k, False: 248]
  ------------------
 1581|  1.82k|    item_count = range.read16();
 1582|  1.82k|  }
 1583|    248|  else if (version == 2) {
  ------------------
  |  Branch (1583:12): [True: 248, False: 0]
  ------------------
 1584|    248|    item_count = range.read32();
 1585|    248|  }
 1586|       |
 1587|       |  // Sanity check. (This might be obsolete now as we check for range.error() below).
 1588|  2.07k|  if (limits->max_items && item_count > limits->max_items) {
  ------------------
  |  Branch (1588:7): [True: 2.07k, False: 0]
  |  Branch (1588:28): [True: 9, False: 2.06k]
  ------------------
 1589|      9|    std::stringstream sstr;
 1590|      9|    sstr << "iloc box contains " << item_count << " items, which exceeds the security limit of "
 1591|      9|         << limits->max_items << " items.";
 1592|       |
 1593|      9|    return Error(heif_error_Memory_allocation_error,
 1594|      9|                 heif_suberror_Security_limit_exceeded,
 1595|      9|                 sstr.str());
 1596|      9|  }
 1597|       |
 1598|  8.40k|  for (uint32_t i = 0; i < item_count; i++) {
  ------------------
  |  Branch (1598:24): [True: 6.50k, False: 1.89k]
  ------------------
 1599|  6.50k|    Item item;
 1600|       |
 1601|  6.50k|    if (range.eof()) {
  ------------------
  |  Branch (1601:9): [True: 113, False: 6.39k]
  ------------------
 1602|    113|      std::stringstream sstr;
 1603|    113|      sstr << "iloc box should contain " << item_count << " items, but we can only read " << i << " items.";
 1604|       |
 1605|    113|      return {heif_error_Invalid_input,
 1606|    113|              heif_suberror_End_of_data,
 1607|    113|              sstr.str()};
 1608|    113|    }
 1609|       |
 1610|  6.39k|    if (version < 2) {
  ------------------
  |  Branch (1610:9): [True: 6.30k, False: 85]
  ------------------
 1611|  6.30k|      item.item_ID = range.read16();
 1612|  6.30k|    }
 1613|     85|    else if (version == 2) {
  ------------------
  |  Branch (1613:14): [True: 85, False: 0]
  ------------------
 1614|     85|      item.item_ID = range.read32();
 1615|     85|    }
 1616|       |
 1617|  6.39k|    if (version >= 1) {
  ------------------
  |  Branch (1617:9): [True: 1.35k, False: 5.04k]
  ------------------
 1618|  1.35k|      values4 = range.read16();
 1619|  1.35k|      item.construction_method = (values4 & 0xF);
 1620|  1.35k|    }
 1621|       |
 1622|  6.39k|    item.data_reference_index = range.read16();
 1623|       |
 1624|  6.39k|    item.base_offset = 0;
 1625|  6.39k|    if (base_offset_size == 4) {
  ------------------
  |  Branch (1625:9): [True: 1.11k, False: 5.28k]
  ------------------
 1626|  1.11k|      item.base_offset = range.read32();
 1627|  1.11k|    }
 1628|  5.28k|    else if (base_offset_size == 8) {
  ------------------
  |  Branch (1628:14): [True: 199, False: 5.08k]
  ------------------
 1629|    199|      item.base_offset = ((uint64_t) range.read32()) << 32;
 1630|    199|      item.base_offset |= range.read32();
 1631|    199|    }
 1632|       |
 1633|  6.39k|    uint16_t extent_count = range.read16();
 1634|       |
 1635|       |    // Sanity check.
 1636|  6.39k|    auto max_iloc_extents = limits->max_iloc_extents_per_item;
 1637|  6.39k|    if (max_iloc_extents && extent_count > max_iloc_extents) {
  ------------------
  |  Branch (1637:9): [True: 6.39k, False: 0]
  |  Branch (1637:29): [True: 15, False: 6.37k]
  ------------------
 1638|     15|      std::stringstream sstr;
 1639|     15|      sstr << "Number of extents in iloc box (" << extent_count << ") exceeds security limit ("
 1640|     15|           << max_iloc_extents << ")\n";
 1641|       |
 1642|     15|      return Error(heif_error_Memory_allocation_error,
 1643|     15|                   heif_suberror_Security_limit_exceeded,
 1644|     15|                   sstr.str());
 1645|     15|    }
 1646|       |
 1647|  21.5k|    for (int e = 0; e < extent_count; e++) {
  ------------------
  |  Branch (1647:21): [True: 15.2k, False: 6.33k]
  ------------------
 1648|  15.2k|      Extent extent;
 1649|       |
 1650|  15.2k|      if (range.eof()) {
  ------------------
  |  Branch (1650:11): [True: 40, False: 15.2k]
  ------------------
 1651|     40|        std::stringstream sstr;
 1652|     40|        sstr << "iloc item should contain " << extent_count << " extents, but we can only read " << e << " extents.";
 1653|       |
 1654|     40|        return {heif_error_Invalid_input,
 1655|     40|                heif_suberror_End_of_data,
 1656|     40|                sstr.str()};
 1657|     40|      }
 1658|       |
 1659|  15.2k|      if ((version == 1 || version == 2) && index_size > 0) {
  ------------------
  |  Branch (1659:12): [True: 1.67k, False: 13.5k]
  |  Branch (1659:28): [True: 324, False: 13.2k]
  |  Branch (1659:45): [True: 953, False: 1.04k]
  ------------------
 1660|    953|        if (index_size == 4) {
  ------------------
  |  Branch (1660:13): [True: 278, False: 675]
  ------------------
 1661|    278|          extent.index = range.read32();
 1662|    278|        }
 1663|    675|        else if (index_size == 8) {
  ------------------
  |  Branch (1663:18): [True: 352, False: 323]
  ------------------
 1664|    352|          extent.index = ((uint64_t) range.read32()) << 32;
 1665|    352|          extent.index |= range.read32();
 1666|    352|        }
 1667|    953|      }
 1668|       |
 1669|  15.2k|      extent.offset = 0;
 1670|  15.2k|      if (offset_size == 4) {
  ------------------
  |  Branch (1670:11): [True: 1.01k, False: 14.1k]
  ------------------
 1671|  1.01k|        extent.offset = range.read32();
 1672|  1.01k|      }
 1673|  14.1k|      else if (offset_size == 8) {
  ------------------
  |  Branch (1673:16): [True: 194, False: 13.9k]
  ------------------
 1674|    194|        extent.offset = ((uint64_t) range.read32()) << 32;
 1675|    194|        extent.offset |= range.read32();
 1676|    194|      }
 1677|       |
 1678|       |
 1679|  15.2k|      extent.length = 0;
 1680|  15.2k|      if (length_size == 4) {
  ------------------
  |  Branch (1680:11): [True: 1.01k, False: 14.1k]
  ------------------
 1681|  1.01k|        extent.length = range.read32();
 1682|  1.01k|      }
 1683|  14.1k|      else if (length_size == 8) {
  ------------------
  |  Branch (1683:16): [True: 195, False: 13.9k]
  ------------------
 1684|    195|        extent.length = ((uint64_t) range.read32()) << 32;
 1685|    195|        extent.length |= range.read32();
 1686|    195|      }
 1687|       |
 1688|  15.2k|      item.extents.push_back(extent);
 1689|  15.2k|    }
 1690|       |
 1691|  6.33k|    if (!range.error()) {
  ------------------
  |  Branch (1691:9): [True: 6.25k, False: 87]
  ------------------
 1692|  6.25k|      m_items.push_back(item);
 1693|  6.25k|    }
 1694|  6.33k|  }
 1695|       |
 1696|  1.89k|  return range.get_error();
 1697|  2.06k|}
_ZN8Box_ilocC2Ev:
 1701|  2.08k|{
 1702|  2.08k|  set_short_type(fourcc("iloc"));
 1703|       |
 1704|  2.08k|  set_use_tmp_file(false);
 1705|  2.08k|}
_ZN8Box_ilocD2Ev:
 1709|  2.08k|{
 1710|  2.08k|  if (m_use_tmpfile) {
  ------------------
  |  Branch (1710:7): [True: 0, False: 2.08k]
  ------------------
 1711|      0|    unlink(m_tmp_filename);
 1712|      0|  }
 1713|  2.08k|}
_ZN8Box_iloc16set_use_tmp_fileEb:
 1717|  2.08k|{
 1718|  2.08k|  m_use_tmpfile = flag;
 1719|  2.08k|  if (flag) {
  ------------------
  |  Branch (1719:7): [True: 0, False: 2.08k]
  ------------------
 1720|      0|#if !defined(_WIN32)
 1721|      0|    strcpy(m_tmp_filename, "/tmp/libheif-XXXXXX");
 1722|      0|    m_tmpfile_fd = mkstemp(m_tmp_filename);
 1723|       |#else
 1724|       |    // TODO Currently unused code. Implement when needed.
 1725|       |    assert(false);
 1726|       |#  if 0
 1727|       |    char tmpname[L_tmpnam_s];
 1728|       |    // TODO: check return value (errno_t)
 1729|       |    tmpnam_s(tmpname, L_tmpnam_s);
 1730|       |    _sopen_s(&m_tmpfile_fd, tmpname, _O_CREAT | _O_TEMPORARY | _O_TRUNC | _O_RDWR, _SH_DENYRW, _S_IREAD | _S_IWRITE);
 1731|       |#  endif
 1732|       |#endif
 1733|      0|  }
 1734|  2.08k|}
_ZNK8Box_iloc4dumpER6Indent:
 1738|  1.58k|{
 1739|  1.58k|  std::ostringstream sstr;
 1740|  1.58k|  sstr << Box::dump(indent);
 1741|       |
 1742|  3.44k|  for (const Item& item : m_items) {
  ------------------
  |  Branch (1742:25): [True: 3.44k, False: 1.58k]
  ------------------
 1743|  3.44k|    sstr << indent << "item ID: " << item.item_ID << "\n"
 1744|  3.44k|         << indent << "  construction method: " << ((int) item.construction_method) << "\n"
 1745|  3.44k|         << indent << "  data_reference_index: " << std::hex
 1746|  3.44k|         << item.data_reference_index << std::dec << "\n"
 1747|  3.44k|         << indent << "  base_offset: " << item.base_offset << "\n";
 1748|       |
 1749|  3.44k|    sstr << indent << "  extents: ";
 1750|  7.60k|    for (const Extent& extent : item.extents) {
  ------------------
  |  Branch (1750:31): [True: 7.60k, False: 3.44k]
  ------------------
 1751|  7.60k|      sstr << extent.offset << "," << extent.length;
 1752|  7.60k|      if (extent.index != 0) {
  ------------------
  |  Branch (1752:11): [True: 298, False: 7.31k]
  ------------------
 1753|    298|        sstr << ";index=" << extent.index;
 1754|    298|      }
 1755|  7.60k|      sstr << " ";
 1756|  7.60k|    }
 1757|  3.44k|    sstr << "\n";
 1758|  3.44k|  }
 1759|       |
 1760|  1.58k|  return sstr.str();
 1761|  1.58k|}
_ZN8Box_infe5parseER14BitstreamRangePK20heif_security_limits:
 2380|  4.40k|{
 2381|  4.40k|  parse_full_box_header(range);
 2382|       |
 2383|       |  // only versions 2,3 are required by HEIF
 2384|  4.40k|  if (get_version() > 3) {
  ------------------
  |  Branch (2384:7): [True: 6, False: 4.39k]
  ------------------
 2385|      6|    return unsupported_version_error("infe");
 2386|      6|  }
 2387|       |
 2388|  4.39k|  if (get_version() <= 1) {
  ------------------
  |  Branch (2388:7): [True: 236, False: 4.16k]
  ------------------
 2389|    236|    m_item_ID = range.read16();
 2390|    236|    m_item_protection_index = range.read16();
 2391|       |
 2392|    236|    m_item_name = range.read_string();
 2393|    236|    m_content_type = range.read_string();
 2394|    236|    m_content_encoding = range.read_string();
 2395|    236|  }
 2396|       |
 2397|  4.39k|  m_item_type_4cc = 0;
 2398|       |
 2399|  4.39k|  if (get_version() >= 2) {
  ------------------
  |  Branch (2399:7): [True: 4.16k, False: 236]
  ------------------
 2400|  4.16k|    m_hidden_item = (get_flags() & 1);
 2401|       |
 2402|  4.16k|    if (get_version() == 2) {
  ------------------
  |  Branch (2402:9): [True: 3.96k, False: 202]
  ------------------
 2403|  3.96k|      m_item_ID = range.read16();
 2404|  3.96k|    }
 2405|    202|    else {
 2406|    202|      m_item_ID = range.read32();
 2407|    202|    }
 2408|       |
 2409|  4.16k|    m_item_protection_index = range.read16();
 2410|  4.16k|    m_item_type_4cc = range.read32();
 2411|       |
 2412|  4.16k|    m_item_name = range.read_string();
 2413|  4.16k|    if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2413:9): [True: 515, False: 3.64k]
  ------------------
 2414|    515|      m_content_type = range.read_string();
 2415|    515|      m_content_encoding = range.read_string();
 2416|    515|    }
 2417|  3.64k|    else if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2417:14): [True: 798, False: 2.85k]
  ------------------
 2418|    798|      m_item_uri_type = range.read_string();
 2419|    798|    }
 2420|  4.16k|  }
 2421|       |
 2422|  4.39k|  return range.get_error();
 2423|  4.40k|}
_ZNK8Box_infe4dumpER6Indent:
 2501|  3.85k|{
 2502|  3.85k|  std::ostringstream sstr;
 2503|  3.85k|  sstr << Box::dump(indent);
 2504|       |
 2505|  3.85k|  sstr << indent << "item_ID: " << m_item_ID << "\n"
 2506|  3.85k|       << indent << "item_protection_index: " << m_item_protection_index << "\n"
 2507|  3.85k|       << indent << "item_type: " << fourcc_to_string(m_item_type_4cc) << "\n"
 2508|  3.85k|       << indent << "item_name: " << m_item_name << "\n";
 2509|       |
 2510|  3.85k|  if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2510:7): [True: 470, False: 3.38k]
  ------------------
 2511|    470|    sstr << indent << "content_type: " << m_content_type << "\n"
 2512|    470|         << indent << "content_encoding: " << m_content_encoding << "\n";
 2513|    470|  }
 2514|       |
 2515|  3.85k|  if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2515:7): [True: 798, False: 3.05k]
  ------------------
 2516|    798|    sstr << indent << "item uri type: " << m_item_uri_type << "\n";
 2517|    798|  }
 2518|       |
 2519|  3.85k|  sstr << indent << "hidden item: " << std::boolalpha << m_hidden_item << "\n";
 2520|       |
 2521|  3.85k|  return sstr.str();
 2522|  3.85k|}
_ZN8Box_iinf5parseER14BitstreamRangePK20heif_security_limits:
 2526|  3.92k|{
 2527|  3.92k|  parse_full_box_header(range);
 2528|       |
 2529|       |  // TODO: there are several images in circulation that have an iinf version=2. We should not enforce this with a hard error.
 2530|  3.92k|  if (false && get_version() > 1) {
  ------------------
  |  Branch (2530:7): [Folded, False: 3.92k]
  |  Branch (2530:16): [True: 0, False: 0]
  ------------------
 2531|      0|    return unsupported_version_error("iinf");
 2532|      0|  }
 2533|       |
 2534|  3.92k|  int nEntries_size = (get_version() > 0) ? 4 : 2;
  ------------------
  |  Branch (2534:23): [True: 910, False: 3.01k]
  ------------------
 2535|       |
 2536|  3.92k|  uint32_t item_count;
 2537|  3.92k|  if (nEntries_size == 2) {
  ------------------
  |  Branch (2537:7): [True: 3.01k, False: 910]
  ------------------
 2538|  3.01k|    item_count = range.read16();
 2539|  3.01k|  }
 2540|    910|  else {
 2541|    910|    item_count = range.read32();
 2542|    910|  }
 2543|       |
 2544|  3.92k|  if (item_count == 0) {
  ------------------
  |  Branch (2544:7): [True: 697, False: 3.23k]
  ------------------
 2545|    697|    return Error::Ok;
 2546|    697|  }
 2547|       |
 2548|  3.23k|  return read_children(range, item_count, limits);
 2549|  3.92k|}
_ZNK8Box_iinf4dumpER6Indent:
 2553|  3.18k|{
 2554|  3.18k|  std::ostringstream sstr;
 2555|  3.18k|  sstr << Box::dump(indent);
 2556|       |
 2557|  3.18k|  sstr << dump_children(indent);
 2558|       |
 2559|  3.18k|  return sstr.str();
 2560|  3.18k|}
_ZN8Box_iprp5parseER14BitstreamRangePK20heif_security_limits:
 2564|  30.8k|{
 2565|       |  //parse_full_box_header(range);
 2566|       |
 2567|  30.8k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2568|  30.8k|}
_ZNK8Box_iprp4dumpER6Indent:
 2600|  26.6k|{
 2601|  26.6k|  std::ostringstream sstr;
 2602|  26.6k|  sstr << Box::dump(indent);
 2603|       |
 2604|  26.6k|  sstr << dump_children(indent);
 2605|       |
 2606|  26.6k|  return sstr.str();
 2607|  26.6k|}
_ZN8Box_ipco5parseER14BitstreamRangePK20heif_security_limits:
 2622|  10.9k|{
 2623|       |  //parse_full_box_header(range);
 2624|       |
 2625|  10.9k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2626|  10.9k|}
_ZNK8Box_ipco4dumpER6Indent:
 2630|  9.88k|{
 2631|  9.88k|  std::ostringstream sstr;
 2632|  9.88k|  sstr << Box::dump(indent);
 2633|       |
 2634|  9.88k|  sstr << dump_children(indent, true);
 2635|       |
 2636|  9.88k|  return sstr.str();
 2637|  9.88k|}
_ZN8Box_pixi5parseER14BitstreamRangePK20heif_security_limits:
 2641|  3.63k|{
 2642|  3.63k|  parse_full_box_header(range);
 2643|       |
 2644|  3.63k|  if (get_version() != 0) {
  ------------------
  |  Branch (2644:7): [True: 419, False: 3.21k]
  ------------------
 2645|    419|    return unsupported_version_error("pixi");
 2646|    419|  }
 2647|       |
 2648|  3.21k|  StreamReader::grow_status status;
 2649|  3.21k|  uint8_t num_channels = range.read8();
 2650|  3.21k|  status = range.wait_for_available_bytes(num_channels);
 2651|  3.21k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (2651:7): [True: 27, False: 3.19k]
  ------------------
 2652|       |    // TODO: return recoverable error at timeout
 2653|     27|    return Error(heif_error_Invalid_input,
 2654|     27|                 heif_suberror_End_of_data);
 2655|     27|  }
 2656|       |
 2657|  3.19k|  m_bits_per_channel.resize(num_channels);
 2658|  30.0k|  for (int i = 0; i < num_channels; i++) {
  ------------------
  |  Branch (2658:19): [True: 26.8k, False: 3.19k]
  ------------------
 2659|  26.8k|    m_bits_per_channel[i] = range.read8();
 2660|  26.8k|  }
 2661|       |
 2662|  3.19k|  return range.get_error();
 2663|  3.21k|}
_ZNK8Box_pixi4dumpER6Indent:
 2667|  2.29k|{
 2668|  2.29k|  std::ostringstream sstr;
 2669|  2.29k|  sstr << Box::dump(indent);
 2670|       |
 2671|  2.29k|  sstr << indent << "bits_per_channel: ";
 2672|       |
 2673|  9.33k|  for (size_t i = 0; i < m_bits_per_channel.size(); i++) {
  ------------------
  |  Branch (2673:22): [True: 7.03k, False: 2.29k]
  ------------------
 2674|  7.03k|    if (i > 0) sstr << ",";
  ------------------
  |  Branch (2674:9): [True: 4.98k, False: 2.05k]
  ------------------
 2675|  7.03k|    sstr << ((int) m_bits_per_channel[i]);
 2676|  7.03k|  }
 2677|       |
 2678|  2.29k|  sstr << "\n";
 2679|       |
 2680|  2.29k|  return sstr.str();
 2681|  2.29k|}
_ZN8Box_pasp5parseER14BitstreamRangePK20heif_security_limits:
 2706|  15.5k|{
 2707|       |  //parse_full_box_header(range);
 2708|       |
 2709|  15.5k|  hSpacing = range.read32();
 2710|  15.5k|  vSpacing = range.read32();
 2711|       |
 2712|  15.5k|  return range.get_error();
 2713|  15.5k|}
_ZNK8Box_pasp4dumpER6Indent:
 2717|  13.4k|{
 2718|  13.4k|  std::ostringstream sstr;
 2719|  13.4k|  sstr << Box::dump(indent);
 2720|       |
 2721|  13.4k|  sstr << indent << "hSpacing: " << hSpacing << "\n";
 2722|  13.4k|  sstr << indent << "vSpacing: " << vSpacing << "\n";
 2723|       |
 2724|  13.4k|  return sstr.str();
 2725|  13.4k|}
_ZN8Box_lsel5parseER14BitstreamRangePK20heif_security_limits:
 2742|  7.79k|{
 2743|  7.79k|  layer_id = range.read16();
 2744|       |
 2745|  7.79k|  return range.get_error();
 2746|  7.79k|}
_ZNK8Box_lsel4dumpER6Indent:
 2750|  6.20k|{
 2751|  6.20k|  std::ostringstream sstr;
 2752|  6.20k|  sstr << Box::dump(indent);
 2753|       |
 2754|  6.20k|  sstr << indent << "layer_id: " << layer_id << "\n";
 2755|       |
 2756|  6.20k|  return sstr.str();
 2757|  6.20k|}
_ZN8Box_clli5parseER14BitstreamRangePK20heif_security_limits:
 2773|  2.16k|{
 2774|       |  //parse_full_box_header(range);
 2775|       |
 2776|  2.16k|  clli.max_content_light_level = range.read16();
 2777|  2.16k|  clli.max_pic_average_light_level = range.read16();
 2778|       |
 2779|  2.16k|  return range.get_error();
 2780|  2.16k|}
_ZNK8Box_clli4dumpER6Indent:
 2784|  1.91k|{
 2785|  1.91k|  std::ostringstream sstr;
 2786|  1.91k|  sstr << Box::dump(indent);
 2787|       |
 2788|  1.91k|  sstr << indent << "max_content_light_level: " << clli.max_content_light_level << "\n";
 2789|  1.91k|  sstr << indent << "max_pic_average_light_level: " << clli.max_pic_average_light_level << "\n";
 2790|       |
 2791|  1.91k|  return sstr.str();
 2792|  1.91k|}
_ZN8Box_mdcvC2Ev:
 2809|  5.00k|{
 2810|  5.00k|  set_short_type(fourcc("mdcv"));
 2811|       |
 2812|  5.00k|  memset(&mdcv, 0, sizeof(heif_mastering_display_colour_volume));
 2813|  5.00k|}
_ZN8Box_mdcv5parseER14BitstreamRangePK20heif_security_limits:
 2817|  5.00k|{
 2818|       |  //parse_full_box_header(range);
 2819|       |
 2820|  20.0k|  for (int c = 0; c < 3; c++) {
  ------------------
  |  Branch (2820:19): [True: 15.0k, False: 5.00k]
  ------------------
 2821|  15.0k|    mdcv.display_primaries_x[c] = range.read16();
 2822|  15.0k|    mdcv.display_primaries_y[c] = range.read16();
 2823|  15.0k|  }
 2824|       |
 2825|  5.00k|  mdcv.white_point_x = range.read16();
 2826|  5.00k|  mdcv.white_point_y = range.read16();
 2827|  5.00k|  mdcv.max_display_mastering_luminance = range.read32();
 2828|  5.00k|  mdcv.min_display_mastering_luminance = range.read32();
 2829|       |
 2830|  5.00k|  return range.get_error();
 2831|  5.00k|}
_ZNK8Box_mdcv4dumpER6Indent:
 2835|  3.10k|{
 2836|  3.10k|  std::ostringstream sstr;
 2837|  3.10k|  sstr << Box::dump(indent);
 2838|       |
 2839|  3.10k|  sstr << indent << "display_primaries (x,y): ";
 2840|  3.10k|  sstr << "(" << mdcv.display_primaries_x[0] << ";" << mdcv.display_primaries_y[0] << "), ";
 2841|  3.10k|  sstr << "(" << mdcv.display_primaries_x[1] << ";" << mdcv.display_primaries_y[1] << "), ";
 2842|  3.10k|  sstr << "(" << mdcv.display_primaries_x[2] << ";" << mdcv.display_primaries_y[2] << ")\n";
 2843|       |
 2844|  3.10k|  sstr << indent << "white point (x,y): (" << mdcv.white_point_x << ";" << mdcv.white_point_y << ")\n";
 2845|  3.10k|  sstr << indent << "max display mastering luminance: " << mdcv.max_display_mastering_luminance << "\n";
 2846|  3.10k|  sstr << indent << "min display mastering luminance: " << mdcv.min_display_mastering_luminance << "\n";
 2847|       |
 2848|  3.10k|  return sstr.str();
 2849|  3.10k|}
_ZN8Box_amveC2Ev:
 2873|  1.16k|{
 2874|  1.16k|  set_short_type(fourcc("amve"));
 2875|       |
 2876|       |  // These values are not valid.
 2877|  1.16k|  amve.ambient_illumination = 0;
 2878|  1.16k|  amve.ambient_light_x = 0;
 2879|  1.16k|  amve.ambient_light_y = 0;
 2880|  1.16k|}
_ZN8Box_amve5parseER14BitstreamRangePK20heif_security_limits:
 2883|  1.16k|{
 2884|  1.16k|  amve.ambient_illumination = range.read32();
 2885|  1.16k|  amve.ambient_light_x = range.read16();
 2886|  1.16k|  amve.ambient_light_y = range.read16();
 2887|       |
 2888|  1.16k|  return range.get_error();
 2889|  1.16k|}
_ZNK8Box_amve4dumpER6Indent:
 2893|    495|{
 2894|    495|  std::ostringstream sstr;
 2895|    495|  sstr << Box::dump(indent);
 2896|       |
 2897|    495|  sstr << indent << "ambient_illumination: " << amve.ambient_illumination << "\n";
 2898|    495|  sstr << indent << "ambient_light_x: " << amve.ambient_light_x << "\n";
 2899|    495|  sstr << indent << "ambient_light_y: " << amve.ambient_light_y << "\n";
 2900|       |
 2901|    495|  return sstr.str();
 2902|    495|}
_ZN8Box_ispe5parseER14BitstreamRangePK20heif_security_limits:
 3120|  2.46k|{
 3121|  2.46k|  parse_full_box_header(range);
 3122|       |
 3123|  2.46k|  if (get_version() != 0) {
  ------------------
  |  Branch (3123:7): [True: 2, False: 2.46k]
  ------------------
 3124|      2|    return unsupported_version_error("ispe");
 3125|      2|  }
 3126|       |
 3127|  2.46k|  m_image_width = range.read32();
 3128|  2.46k|  m_image_height = range.read32();
 3129|       |
 3130|  2.46k|  return range.get_error();
 3131|  2.46k|}
_ZNK8Box_ispe4dumpER6Indent:
 3135|  2.17k|{
 3136|  2.17k|  std::ostringstream sstr;
 3137|  2.17k|  sstr << Box::dump(indent);
 3138|       |
 3139|  2.17k|  sstr << indent << "image width: " << m_image_width << "\n"
 3140|  2.17k|       << indent << "image height: " << m_image_height << "\n";
 3141|       |
 3142|  2.17k|  return sstr.str();
 3143|  2.17k|}
_ZN8Box_ipma5parseER14BitstreamRangePK20heif_security_limits:
 3172|  2.88k|{
 3173|  2.88k|  parse_full_box_header(range);
 3174|       |
 3175|       |  // TODO: is there any specification of allowed values for the ipma version in the HEIF standards?
 3176|       |
 3177|  2.88k|  if (get_version() > 1) {
  ------------------
  |  Branch (3177:7): [True: 5, False: 2.88k]
  ------------------
 3178|      5|    return unsupported_version_error("ipma");
 3179|      5|  }
 3180|       |
 3181|  2.88k|  uint32_t entry_cnt = range.read32();
 3182|       |
 3183|  2.88k|  if (limits->max_items && entry_cnt > limits->max_items) {
  ------------------
  |  Branch (3183:7): [True: 2.88k, False: 0]
  |  Branch (3183:28): [True: 46, False: 2.83k]
  ------------------
 3184|     46|    std::stringstream sstr;
 3185|     46|    sstr << "ipma box wants to define properties for " << entry_cnt
 3186|     46|         << " items, but the security limit has been set to " << limits->max_items << " items";
 3187|     46|    return {heif_error_Invalid_input,
 3188|     46|            heif_suberror_Security_limit_exceeded,
 3189|     46|            sstr.str()};
 3190|     46|  }
 3191|       |
 3192|  26.7k|  for (uint32_t i = 0; i < entry_cnt && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (3192:24): [True: 24.2k, False: 2.48k]
  |  Branch (3192:41): [True: 24.2k, False: 60]
  |  Branch (3192:59): [True: 23.9k, False: 291]
  ------------------
 3193|  23.9k|    Entry entry;
 3194|  23.9k|    if (get_version() < 1) {
  ------------------
  |  Branch (3194:9): [True: 12.1k, False: 11.8k]
  ------------------
 3195|  12.1k|      entry.item_ID = range.read16();
 3196|  12.1k|    }
 3197|  11.8k|    else {
 3198|  11.8k|      entry.item_ID = range.read32();
 3199|  11.8k|    }
 3200|       |
 3201|  23.9k|    int assoc_cnt = range.read8();
 3202|  1.39M|    for (int k = 0; k < assoc_cnt; k++) {
  ------------------
  |  Branch (3202:21): [True: 1.36M, False: 23.9k]
  ------------------
 3203|  1.36M|      PropertyAssociation association{};
 3204|       |
 3205|  1.36M|      uint16_t index;
 3206|  1.36M|      if (get_flags() & 1) {
  ------------------
  |  Branch (3206:11): [True: 1.35k, False: 1.36M]
  ------------------
 3207|  1.35k|        index = range.read16();
 3208|  1.35k|        association.essential = !!(index & 0x8000);
 3209|  1.35k|        association.property_index = (index & 0x7fff);
 3210|  1.35k|      }
 3211|  1.36M|      else {
 3212|  1.36M|        index = range.read8();
 3213|  1.36M|        association.essential = !!(index & 0x80);
 3214|  1.36M|        association.property_index = (index & 0x7f);
 3215|  1.36M|      }
 3216|       |
 3217|  1.36M|      entry.associations.push_back(association);
 3218|  1.36M|    }
 3219|       |
 3220|  23.9k|    m_entries.push_back(entry);
 3221|  23.9k|  }
 3222|       |
 3223|  2.83k|  return range.get_error();
 3224|  2.88k|}
_ZNK8Box_ipma4dumpER6Indent:
 3288|  2.48k|{
 3289|  2.48k|  std::ostringstream sstr;
 3290|  2.48k|  sstr << Box::dump(indent);
 3291|       |
 3292|  21.9k|  for (const Entry& entry : m_entries) {
  ------------------
  |  Branch (3292:27): [True: 21.9k, False: 2.48k]
  ------------------
 3293|  21.9k|    sstr << indent << "associations for item ID: " << entry.item_ID << "\n";
 3294|  21.9k|    indent++;
 3295|  1.36M|    for (const auto& assoc : entry.associations) {
  ------------------
  |  Branch (3295:28): [True: 1.36M, False: 21.9k]
  ------------------
 3296|  1.36M|      sstr << indent << "property index: " << assoc.property_index
 3297|  1.36M|           << " (essential: " << std::boolalpha << assoc.essential << ")\n";
 3298|  1.36M|    }
 3299|  21.9k|    indent--;
 3300|  21.9k|  }
 3301|       |
 3302|  2.48k|  return sstr.str();
 3303|  2.48k|}
_ZN8Box_auxC5parseER14BitstreamRangePK20heif_security_limits:
 3398|  1.05k|{
 3399|  1.05k|  parse_full_box_header(range);
 3400|       |
 3401|  1.05k|  if (get_version() != 0) {
  ------------------
  |  Branch (3401:7): [True: 7, False: 1.05k]
  ------------------
 3402|      7|    return unsupported_version_error("auxC");
 3403|      7|  }
 3404|       |
 3405|  1.05k|  m_aux_type = range.read_string();
 3406|       |
 3407|  5.61M|  while (!range.eof()) {
  ------------------
  |  Branch (3407:10): [True: 5.61M, False: 1.05k]
  ------------------
 3408|  5.61M|    m_aux_subtypes.push_back(range.read8());
 3409|  5.61M|  }
 3410|       |
 3411|  1.05k|  return range.get_error();
 3412|  1.05k|}
_ZNK8Box_auxC4dumpER6Indent:
 3432|    836|{
 3433|    836|  std::ostringstream sstr;
 3434|    836|  sstr << Box::dump(indent);
 3435|       |
 3436|    836|  sstr << indent << "aux type: " << m_aux_type << "\n"
 3437|    836|       << indent << "aux subtypes: ";
 3438|  5.60M|  for (uint8_t subtype : m_aux_subtypes) {
  ------------------
  |  Branch (3438:24): [True: 5.60M, False: 836]
  ------------------
 3439|  5.60M|    sstr << std::hex << std::setw(2) << std::setfill('0') << ((int) subtype) << " ";
 3440|  5.60M|  }
 3441|       |
 3442|    836|  sstr << "\n";
 3443|       |
 3444|    836|  return sstr.str();
 3445|    836|}
_ZN8Box_irot5parseER14BitstreamRangePK20heif_security_limits:
 3449|  6.76k|{
 3450|       |  //parse_full_box_header(range);
 3451|       |
 3452|  6.76k|  uint16_t rotation = range.read8();
 3453|  6.76k|  rotation &= 0x03;
 3454|       |
 3455|  6.76k|  m_rotation = rotation * 90;
 3456|       |
 3457|  6.76k|  return range.get_error();
 3458|  6.76k|}
_ZNK8Box_irot4dumpER6Indent:
 3474|  4.85k|{
 3475|  4.85k|  std::ostringstream sstr;
 3476|  4.85k|  sstr << Box::dump(indent);
 3477|       |
 3478|  4.85k|  sstr << indent << "rotation: " << m_rotation << " degrees (CCW)\n";
 3479|       |
 3480|  4.85k|  return sstr.str();
 3481|  4.85k|}
_ZN8Box_imir5parseER14BitstreamRangePK20heif_security_limits:
 3485|  2.16k|{
 3486|       |  //parse_full_box_header(range);
 3487|       |
 3488|  2.16k|  uint8_t axis = range.read8();
 3489|  2.16k|  if (axis & 1) {
  ------------------
  |  Branch (3489:7): [True: 147, False: 2.02k]
  ------------------
 3490|    147|    m_axis = heif_transform_mirror_direction_horizontal;
 3491|    147|  }
 3492|  2.02k|  else {
 3493|  2.02k|    m_axis = heif_transform_mirror_direction_vertical;
 3494|  2.02k|  }
 3495|       |
 3496|  2.16k|  return range.get_error();
 3497|  2.16k|}
_ZNK8Box_imir4dumpER6Indent:
 3513|  1.58k|{
 3514|  1.58k|  std::ostringstream sstr;
 3515|  1.58k|  sstr << Box::dump(indent);
 3516|       |
 3517|  1.58k|  sstr << indent << "mirror direction: ";
 3518|  1.58k|  switch (m_axis) {
  ------------------
  |  Branch (3518:11): [True: 1.58k, False: 0]
  ------------------
 3519|  1.43k|    case heif_transform_mirror_direction_vertical:
  ------------------
  |  Branch (3519:5): [True: 1.43k, False: 147]
  ------------------
 3520|  1.43k|      sstr << "vertical\n";
 3521|  1.43k|      break;
 3522|    147|    case heif_transform_mirror_direction_horizontal:
  ------------------
  |  Branch (3522:5): [True: 147, False: 1.43k]
  ------------------
 3523|    147|      sstr << "horizontal\n";
 3524|    147|      break;
 3525|      0|    case heif_transform_mirror_direction_invalid:
  ------------------
  |  Branch (3525:5): [True: 0, False: 1.58k]
  ------------------
 3526|      0|      sstr << "invalid\n";
 3527|      0|      break;
 3528|  1.58k|  }
 3529|       |
 3530|  1.58k|  return sstr.str();
 3531|  1.58k|}
_ZN8Box_clap5parseER14BitstreamRangePK20heif_security_limits:
 3535|  17.7k|{
 3536|       |  //parse_full_box_header(range);
 3537|       |
 3538|  17.7k|  uint32_t clean_aperture_width_num = range.read32();
 3539|  17.7k|  uint32_t clean_aperture_width_den = range.read32();
 3540|  17.7k|  uint32_t clean_aperture_height_num = range.read32();
 3541|  17.7k|  uint32_t clean_aperture_height_den = range.read32();
 3542|       |
 3543|       |  // Note: in the standard document 14496-12(2015), it says that the offset values should also be unsigned integers,
 3544|       |  // but this is obviously an error. Even the accompanying standard text says that offsets may be negative.
 3545|  17.7k|  int32_t horizontal_offset_num = (int32_t) range.read32();
 3546|  17.7k|  uint32_t horizontal_offset_den = (uint32_t) range.read32();
 3547|  17.7k|  int32_t vertical_offset_num = (int32_t) range.read32();
 3548|  17.7k|  uint32_t vertical_offset_den = (uint32_t) range.read32();
 3549|       |
 3550|  17.7k|  if (clean_aperture_width_num > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3550:7): [True: 1.11k, False: 16.6k]
  ------------------
 3551|  16.6k|      clean_aperture_width_den > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3551:7): [True: 377, False: 16.2k]
  ------------------
 3552|  16.2k|      clean_aperture_height_num > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3552:7): [True: 116, False: 16.1k]
  ------------------
 3553|  16.1k|      clean_aperture_height_den > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3553:7): [True: 124, False: 16.0k]
  ------------------
 3554|  16.0k|      horizontal_offset_den > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3554:7): [True: 119, False: 15.9k]
  ------------------
 3555|  15.9k|      vertical_offset_den > (uint32_t) std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (3555:7): [True: 95, False: 15.8k]
  ------------------
 3556|  1.94k|    return Error(heif_error_Invalid_input,
 3557|  1.94k|                 heif_suberror_Invalid_fractional_number,
 3558|  1.94k|                 "Exceeded supported value range.");
 3559|  1.94k|  }
 3560|       |
 3561|  15.8k|  m_clean_aperture_width = Fraction(clean_aperture_width_num,
 3562|  15.8k|                                    clean_aperture_width_den);
 3563|  15.8k|  m_clean_aperture_height = Fraction(clean_aperture_height_num,
 3564|  15.8k|                                     clean_aperture_height_den);
 3565|  15.8k|  m_horizontal_offset = Fraction(horizontal_offset_num, (int32_t) horizontal_offset_den);
 3566|  15.8k|  m_vertical_offset = Fraction(vertical_offset_num, (int32_t) vertical_offset_den);
 3567|  15.8k|  if (!m_clean_aperture_width.is_valid() || !m_clean_aperture_height.is_valid() ||
  ------------------
  |  Branch (3567:7): [True: 1.05k, False: 14.7k]
  |  Branch (3567:45): [True: 343, False: 14.4k]
  ------------------
 3568|  15.0k|      !m_horizontal_offset.is_valid() || !m_vertical_offset.is_valid()) {
  ------------------
  |  Branch (3568:7): [True: 511, False: 13.8k]
  |  Branch (3568:42): [True: 13.1k, False: 712]
  ------------------
 3569|  15.0k|    return Error(heif_error_Invalid_input,
 3570|  15.0k|                 heif_suberror_Invalid_fractional_number);
 3571|  15.0k|  }
 3572|       |
 3573|    712|  return range.get_error();
 3574|  15.8k|}
_ZNK8Box_clap4dumpER6Indent:
 3597|    524|{
 3598|    524|  std::ostringstream sstr;
 3599|    524|  sstr << Box::dump(indent);
 3600|       |
 3601|    524|  sstr << indent << "clean_aperture: " << m_clean_aperture_width.numerator
 3602|    524|       << "/" << m_clean_aperture_width.denominator << " x "
 3603|    524|       << m_clean_aperture_height.numerator << "/"
 3604|    524|       << m_clean_aperture_height.denominator << "\n";
 3605|    524|  sstr << indent << "offset: " << m_horizontal_offset.numerator << "/"
 3606|    524|       << m_horizontal_offset.denominator << " ; "
 3607|    524|       << m_vertical_offset.numerator << "/"
 3608|    524|       << m_vertical_offset.denominator << "\n";
 3609|       |
 3610|    524|  return sstr.str();
 3611|    524|}
_ZN8Box_iref5parseER14BitstreamRangePK20heif_security_limits:
 3689|  16.1k|{
 3690|  16.1k|  parse_full_box_header(range);
 3691|       |
 3692|  16.1k|  if (get_version() > 1) {
  ------------------
  |  Branch (3692:7): [True: 7, False: 16.0k]
  ------------------
 3693|      7|    return unsupported_version_error("iref");
 3694|      7|  }
 3695|       |
 3696|  33.7k|  while (!range.eof()) {
  ------------------
  |  Branch (3696:10): [True: 17.6k, False: 16.0k]
  ------------------
 3697|  17.6k|    Reference ref;
 3698|       |
 3699|  17.6k|    Error err = ref.header.parse_header(range);
 3700|  17.6k|    if (err != Error::Ok) {
  ------------------
  |  Branch (3700:9): [True: 12, False: 17.6k]
  ------------------
 3701|     12|      return err;
 3702|     12|    }
 3703|       |
 3704|  17.6k|    int read_len = (get_version() == 0) ? 16 : 32;
  ------------------
  |  Branch (3704:20): [True: 17.5k, False: 84]
  ------------------
 3705|       |
 3706|  17.6k|    ref.from_item_ID = static_cast<uint32_t>(range.read_uint(read_len));
 3707|  17.6k|    uint16_t nRefs = range.read16();
 3708|       |
 3709|  17.6k|    if (nRefs==0) {
  ------------------
  |  Branch (3709:9): [True: 2, False: 17.6k]
  ------------------
 3710|      2|      return {heif_error_Invalid_input,
 3711|      2|              heif_suberror_Unspecified,
 3712|      2|              "Input file has an 'iref' box with no references."};
 3713|      2|    }
 3714|       |
 3715|  17.6k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (3715:9): [True: 17.6k, False: 0]
  |  Branch (3715:30): [True: 16, False: 17.6k]
  ------------------
 3716|     16|      std::stringstream sstr;
 3717|     16|      sstr << "Number of references in iref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 3718|       |
 3719|     16|      return {heif_error_Invalid_input,
 3720|     16|              heif_suberror_Security_limit_exceeded,
 3721|     16|              sstr.str()};
 3722|     16|    }
 3723|       |
 3724|  96.2k|    for (int i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (3724:21): [True: 78.6k, False: 17.6k]
  ------------------
 3725|  78.6k|      if (range.eof()) {
  ------------------
  |  Branch (3725:11): [True: 28, False: 78.6k]
  ------------------
 3726|     28|        std::stringstream sstr;
 3727|     28|        sstr << "iref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 3728|       |
 3729|     28|        return {heif_error_Invalid_input,
 3730|     28|                heif_suberror_End_of_data,
 3731|     28|                sstr.str()};
 3732|     28|      }
 3733|       |
 3734|  78.6k|      ref.to_item_ID.push_back(static_cast<uint32_t>(range.read_uint(read_len)));
 3735|  78.6k|    }
 3736|       |
 3737|  17.6k|    m_references.push_back(ref);
 3738|  17.6k|  }
 3739|       |
 3740|       |
 3741|       |  // --- check for duplicate references
 3742|       |
 3743|  16.0k|  if (auto error = check_for_double_references()) {
  ------------------
  |  Branch (3743:12): [True: 46, False: 15.9k]
  ------------------
 3744|     46|    return error;
 3745|     46|  }
 3746|       |
 3747|       |
 3748|       |#if 0
 3749|       |  // Note: This input sanity check first did not work as expected.
 3750|       |  // Its idea was to prevent infinite recursions while decoding when the input file
 3751|       |  // contains cyclic references. However, apparently there are cases where cyclic
 3752|       |  // references are actually allowed, like with images that have premultiplied alpha channels:
 3753|       |  // | Box: iref -----
 3754|       |  // | size: 40   (header size: 12)
 3755|       |  // | reference with type 'auxl' from ID: 2 to IDs: 1
 3756|       |  // | reference with type 'prem' from ID: 1 to IDs: 2
 3757|       |  //
 3758|       |  // We now test for cyclic references during the image decoding.
 3759|       |  // We pass down the item IDs that have already been seen during the decoding process.
 3760|       |  // If we try to decode an image IDs that has already been seen previously, we throw an error.
 3761|       |  // The advantage is that the error only occurs when we are trying to decode the faulty image.
 3762|       |
 3763|       |  // --- check for cyclic references
 3764|       |
 3765|       |  for (const auto& ref : m_references) {
 3766|       |    if (ref.header.get_short_type() != fourcc("dimg") &&
 3767|       |        ref.header.get_short_type() != fourcc("auxl")) {
 3768|       |      continue;
 3769|       |    }
 3770|       |
 3771|       |    std::set<heif_item_id> reached_ids; // IDs that we have already reached in the DAG
 3772|       |    std::set<heif_item_id> todo;    // IDs that still need to be followed
 3773|       |
 3774|       |    bool reverse = (ref.header.get_short_type() != fourcc("auxl"));
 3775|       |
 3776|       |    if (!reverse) {
 3777|       |      todo.insert(ref.from_item_ID);  // start at base item
 3778|       |    }
 3779|       |    else {
 3780|       |      if (ref.to_item_ID.empty()) {
 3781|       |        continue;
 3782|       |      }
 3783|       |
 3784|       |      // TODO: what if aux image is assigned to multiple images?
 3785|       |      todo.insert(ref.to_item_ID[0]);  // start at base item
 3786|       |    }
 3787|       |
 3788|       |    while (!todo.empty()) {
 3789|       |      // transfer ID into set of reached IDs
 3790|       |      auto id = *todo.begin();
 3791|       |      todo.erase(id);
 3792|       |      reached_ids.insert(id);
 3793|       |
 3794|       |      // if this ID refers to another 'iref', follow it
 3795|       |
 3796|       |      for (const auto& succ_ref : m_references) {
 3797|       |        if (succ_ref.header.get_short_type() != fourcc("dimg") &&
 3798|       |            succ_ref.header.get_short_type() != fourcc("auxl")) {
 3799|       |          continue;
 3800|       |        }
 3801|       |
 3802|       |        heif_item_id from;
 3803|       |        std::vector<heif_item_id> to;
 3804|       |
 3805|       |        if (succ_ref.header.get_short_type() == fourcc("auxl")) {
 3806|       |          if (succ_ref.to_item_ID.empty()) {
 3807|       |            continue;
 3808|       |          }
 3809|       |
 3810|       |          from = succ_ref.to_item_ID[0];
 3811|       |          to = {succ_ref.from_item_ID};
 3812|       |        }
 3813|       |        else {
 3814|       |          from = succ_ref.from_item_ID;
 3815|       |          to = succ_ref.to_item_ID;
 3816|       |        }
 3817|       |
 3818|       |        if (from == id) {
 3819|       |
 3820|       |          // Check whether any successor IDs has been visited yet, which would be an error.
 3821|       |          // Otherwise, put that ID into the 'todo' set.
 3822|       |
 3823|       |          for (const auto& succ_ref_id : to) {
 3824|       |            if (reached_ids.find(succ_ref_id) != reached_ids.end()) {
 3825|       |              return Error(heif_error_Invalid_input,
 3826|       |                           heif_suberror_Unspecified,
 3827|       |                           "'iref' has cyclic references");
 3828|       |            }
 3829|       |
 3830|       |            todo.insert(succ_ref_id);
 3831|       |          }
 3832|       |        }
 3833|       |      }
 3834|       |    }
 3835|       |  }
 3836|       |#endif
 3837|       |
 3838|  15.9k|  return range.get_error();
 3839|  16.0k|}
_ZNK8Box_iref27check_for_double_referencesEv:
 3843|  16.0k|{
 3844|  17.0k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (3844:24): [True: 17.0k, False: 15.9k]
  ------------------
 3845|  17.0k|    std::set<heif_item_id> to_ids;
 3846|  74.6k|    for (const auto to_id : ref.to_item_ID) {
  ------------------
  |  Branch (3846:27): [True: 74.6k, False: 16.9k]
  ------------------
 3847|  74.6k|      if (to_ids.find(to_id) == to_ids.end()) {
  ------------------
  |  Branch (3847:11): [True: 74.6k, False: 46]
  ------------------
 3848|  74.6k|        to_ids.insert(to_id);
 3849|  74.6k|      }
 3850|     46|      else {
 3851|     46|        return {heif_error_Invalid_input,
 3852|     46|                heif_suberror_Unspecified,
 3853|     46|                "'iref' has double references"};
 3854|     46|      }
 3855|  74.6k|    }
 3856|  17.0k|  }
 3857|       |
 3858|  15.9k|  return Error::Ok;
 3859|  16.0k|}
_ZNK8Box_iref4dumpER6Indent:
 3916|  13.9k|{
 3917|  13.9k|  std::ostringstream sstr;
 3918|  13.9k|  sstr << Box::dump(indent);
 3919|       |
 3920|  14.4k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (3920:24): [True: 14.4k, False: 13.9k]
  ------------------
 3921|  14.4k|    sstr << indent << "reference with type '" << ref.header.get_type_string() << "'"
 3922|  14.4k|         << " from ID: " << ref.from_item_ID
 3923|  14.4k|         << " to IDs: ";
 3924|  57.4k|    for (uint32_t id : ref.to_item_ID) {
  ------------------
  |  Branch (3924:22): [True: 57.4k, False: 14.4k]
  ------------------
 3925|  57.4k|      sstr << id << " ";
 3926|  57.4k|    }
 3927|  14.4k|    sstr << "\n";
 3928|  14.4k|  }
 3929|       |
 3930|  13.9k|  return sstr.str();
 3931|  13.9k|}
_ZN8Box_idat5parseER14BitstreamRangePK20heif_security_limits:
 4002|  6.91k|{
 4003|       |  //parse_full_box_header(range);
 4004|       |
 4005|  6.91k|  m_data_start_pos = range.get_istream()->get_position();
 4006|       |
 4007|  6.91k|  return range.get_error();
 4008|  6.91k|}
_ZNK8Box_idat4dumpER6Indent:
 4024|  4.89k|{
 4025|  4.89k|  std::ostringstream sstr;
 4026|  4.89k|  sstr << Box::dump(indent);
 4027|       |
 4028|  4.89k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (4028:7): [True: 4.46k, False: 429]
  ------------------
 4029|  4.46k|    sstr << indent << "number of data bytes: " << get_box_size() - get_header_size() << "\n";
 4030|  4.46k|  } else {
 4031|    429|     sstr << indent << "number of data bytes is invalid\n";
 4032|    429|  }
 4033|       |
 4034|  4.89k|  return sstr.str();
 4035|  4.89k|}
_ZN8Box_grpl5parseER14BitstreamRangePK20heif_security_limits:
 4098|  1.66k|{
 4099|       |  //parse_full_box_header(range);
 4100|       |
 4101|  1.66k|  return read_children(range, READ_CHILDREN_ALL, limits); // should we pass the parsing context 'grpl' or are the box types unique?
 4102|  1.66k|}
_ZNK8Box_grpl4dumpER6Indent:
 4106|  1.47k|{
 4107|  1.47k|  std::ostringstream sstr;
 4108|  1.47k|  sstr << Box::dump(indent);
 4109|  1.47k|  sstr << dump_children(indent);
 4110|  1.47k|  return sstr.str();
 4111|  1.47k|}
_ZN17Box_EntityToGroup5parseER14BitstreamRangePK20heif_security_limits:
 4115|  2.22k|{
 4116|  2.22k|  Error err = parse_full_box_header(range);
 4117|  2.22k|  if (err != Error::Ok) {
  ------------------
  |  Branch (4117:7): [True: 73, False: 2.15k]
  ------------------
 4118|     73|    return err;
 4119|     73|  }
 4120|       |
 4121|  2.15k|  group_id = range.read32();
 4122|  2.15k|  uint32_t nEntities = range.read32();
 4123|       |
 4124|  2.15k|  if (nEntities > range.get_remaining_bytes() / 4) {
  ------------------
  |  Branch (4124:7): [True: 83, False: 2.07k]
  ------------------
 4125|     83|    std::stringstream sstr;
 4126|     83|    size_t maxEntries = range.get_remaining_bytes() / 4;
 4127|     83|    sstr << "entity group box should contain " << nEntities << " entities, but we can only read " << maxEntries << " entities.";
 4128|       |
 4129|     83|    return {heif_error_Invalid_input,
 4130|     83|            heif_suberror_End_of_data,
 4131|     83|            sstr.str()};
 4132|     83|  }
 4133|       |
 4134|  2.07k|  if (limits->max_size_entity_group && nEntities > limits->max_size_entity_group) {
  ------------------
  |  Branch (4134:7): [True: 2.07k, False: 0]
  |  Branch (4134:40): [True: 70, False: 2.00k]
  ------------------
 4135|     70|    std::stringstream sstr;
 4136|     70|    sstr << "entity group box contains " << nEntities << " entities, but the security limit is set to " << limits->max_size_entity_group << " entities.";
 4137|       |
 4138|     70|    return {heif_error_Invalid_input,
 4139|     70|            heif_suberror_Security_limit_exceeded,
 4140|     70|            sstr.str()};
 4141|     70|  }
 4142|       |
 4143|  2.00k|  entity_ids.resize(nEntities);
 4144|  7.15k|  for (uint32_t i = 0; i < nEntities; i++) {
  ------------------
  |  Branch (4144:24): [True: 5.15k, False: 2.00k]
  ------------------
 4145|  5.15k|    entity_ids[i] = range.read32();
 4146|  5.15k|  }
 4147|       |
 4148|  2.00k|  return Error::Ok;
 4149|  2.07k|}
_ZNK17Box_EntityToGroup4dumpER6Indent:
 4178|  1.02k|{
 4179|  1.02k|  std::ostringstream sstr;
 4180|  1.02k|  sstr << Box::dump(indent);
 4181|       |
 4182|  1.02k|  sstr << indent << "group id: " << group_id << "\n"
 4183|  1.02k|       << indent << "entity IDs: ";
 4184|       |
 4185|  1.02k|  bool first = true;
 4186|  3.18k|  for (uint32_t id : entity_ids) {
  ------------------
  |  Branch (4186:20): [True: 3.18k, False: 1.02k]
  ------------------
 4187|  3.18k|    if (first) {
  ------------------
  |  Branch (4187:9): [True: 536, False: 2.64k]
  ------------------
 4188|    536|      first = false;
 4189|    536|    }
 4190|  2.64k|    else {
 4191|  2.64k|      sstr << ' ';
 4192|  2.64k|    }
 4193|       |
 4194|  3.18k|    sstr << id;
 4195|  3.18k|  }
 4196|       |
 4197|  1.02k|  sstr << "\n";
 4198|       |
 4199|  1.02k|  return sstr.str();
 4200|  1.02k|}
_ZN8Box_ster5parseER14BitstreamRangePK20heif_security_limits:
 4204|    677|{
 4205|    677|  Error err = Box_EntityToGroup::parse(range, limits);
 4206|    677|  if (err) {
  ------------------
  |  Branch (4206:7): [True: 9, False: 668]
  ------------------
 4207|      9|    return err;
 4208|      9|  }
 4209|       |
 4210|    668|  if (entity_ids.size() != 2) {
  ------------------
  |  Branch (4210:7): [True: 2, False: 666]
  ------------------
 4211|      2|    return {heif_error_Invalid_input,
 4212|      2|            heif_suberror_Invalid_box_size,
 4213|      2|            "'ster' entity group does not exists of exactly two images"};
 4214|      2|  }
 4215|       |
 4216|    666|  return Error::Ok;
 4217|    668|}
_ZNK8Box_ster4dumpER6Indent:
 4221|    644|{
 4222|    644|  std::ostringstream sstr;
 4223|    644|  sstr << Box::dump(indent);
 4224|       |
 4225|    644|  sstr << indent << "group id: " << group_id << "\n"
 4226|    644|       << indent << "left image ID: " << entity_ids[0] << "\n"
 4227|    644|       << indent << "right image ID: " << entity_ids[1] << "\n";
 4228|       |
 4229|    644|  return sstr.str();
 4230|    644|}
_ZN8Box_pymd5parseER14BitstreamRangePK20heif_security_limits:
 4235|  1.33k|{
 4236|  1.33k|  Error err = Box_EntityToGroup::parse(range, limits);
 4237|  1.33k|  if (err) {
  ------------------
  |  Branch (4237:7): [True: 213, False: 1.11k]
  ------------------
 4238|    213|    return err;
 4239|    213|  }
 4240|       |
 4241|  1.11k|  tile_size_x = range.read16();
 4242|  1.11k|  tile_size_y = range.read16();
 4243|       |
 4244|  4.67k|  for (size_t i = 0; i < entity_ids.size(); i++) {
  ------------------
  |  Branch (4244:22): [True: 3.55k, False: 1.11k]
  ------------------
 4245|  3.55k|    LayerInfo layer{};
 4246|  3.55k|    layer.layer_binning = range.read16();
 4247|  3.55k|    layer.tiles_in_layer_row_minus1 = range.read16();
 4248|  3.55k|    layer.tiles_in_layer_column_minus1 = range.read16();
 4249|       |
 4250|  3.55k|    m_layer_infos.push_back(layer);
 4251|  3.55k|  }
 4252|       |
 4253|  1.11k|  return Error::Ok;
 4254|  1.33k|}
_ZNK8Box_pymd4dumpER6Indent:
 4281|    896|{
 4282|    896|  std::ostringstream sstr;
 4283|    896|  sstr << Box_EntityToGroup::dump(indent);
 4284|       |
 4285|    896|  sstr << indent << "tile size: " << tile_size_x << "x" << tile_size_y << "\n";
 4286|       |
 4287|    896|  int layerNr = 0;
 4288|  3.06k|  for (const auto& layer : m_layer_infos) {
  ------------------
  |  Branch (4288:26): [True: 3.06k, False: 896]
  ------------------
 4289|  3.06k|    sstr << indent << "layer " << layerNr << ":\n"
 4290|  3.06k|         << indent << "| binning: " << layer.layer_binning << "\n"
 4291|  3.06k|         << indent << "| tiles: " << (layer.tiles_in_layer_row_minus1 + 1) << "x" << (layer.tiles_in_layer_column_minus1 + 1) << "\n";
 4292|       |
 4293|  3.06k|    layerNr++;
 4294|  3.06k|  }
 4295|       |
 4296|    896|  return sstr.str();
 4297|    896|}
_ZN8Box_dinf5parseER14BitstreamRangePK20heif_security_limits:
 4301|  6.40k|{
 4302|       |  //parse_full_box_header(range);
 4303|       |
 4304|  6.40k|  return read_children(range, READ_CHILDREN_ALL, limits);
 4305|  6.40k|}
_ZNK8Box_dinf4dumpER6Indent:
 4309|  5.21k|{
 4310|  5.21k|  std::ostringstream sstr;
 4311|  5.21k|  sstr << Box::dump(indent);
 4312|  5.21k|  sstr << dump_children(indent);
 4313|       |
 4314|  5.21k|  return sstr.str();
 4315|  5.21k|}
_ZN8Box_dref5parseER14BitstreamRangePK20heif_security_limits:
 4319|  1.62k|{
 4320|  1.62k|  parse_full_box_header(range);
 4321|       |
 4322|  1.62k|  if (get_version() != 0) {
  ------------------
  |  Branch (4322:7): [True: 2, False: 1.62k]
  ------------------
 4323|      2|    return unsupported_version_error("dref");
 4324|      2|  }
 4325|       |
 4326|  1.62k|  uint32_t nEntities = range.read32();
 4327|       |
 4328|       |  /*
 4329|       |  for (int i=0;i<nEntities;i++) {
 4330|       |    if (range.eof()) {
 4331|       |      break;
 4332|       |    }
 4333|       |  }
 4334|       |  */
 4335|       |
 4336|  1.62k|  if (nEntities > (uint32_t)std::numeric_limits<int>::max()) {
  ------------------
  |  Branch (4336:7): [True: 20, False: 1.60k]
  ------------------
 4337|     20|    return Error(heif_error_Memory_allocation_error,
 4338|     20|                 heif_suberror_Security_limit_exceeded,
 4339|     20|                 "Too many entities in dref box.");
 4340|     20|  }
 4341|       |
 4342|  1.60k|  Error err = read_children(range, (int)nEntities, limits);
 4343|  1.60k|  if (err) {
  ------------------
  |  Branch (4343:7): [True: 71, False: 1.53k]
  ------------------
 4344|     71|    return err;
 4345|     71|  }
 4346|       |
 4347|  1.53k|  if (m_children.size() != nEntities) {
  ------------------
  |  Branch (4347:7): [True: 1.14k, False: 394]
  ------------------
 4348|       |    // TODO return Error(
 4349|  1.14k|  }
 4350|       |
 4351|  1.53k|  return err;
 4352|  1.60k|}
_ZNK8Box_dref4dumpER6Indent:
 4376|  1.31k|{
 4377|  1.31k|  std::ostringstream sstr;
 4378|  1.31k|  sstr << Box::dump(indent);
 4379|  1.31k|  sstr << dump_children(indent);
 4380|       |
 4381|  1.31k|  return sstr.str();
 4382|  1.31k|}
_ZN7Box_url5parseER14BitstreamRangePK20heif_security_limits:
 4386|  1.80k|{
 4387|  1.80k|  parse_full_box_header(range);
 4388|       |
 4389|  1.80k|  if (get_version() > 0) {
  ------------------
  |  Branch (4389:7): [True: 7, False: 1.80k]
  ------------------
 4390|      7|    return unsupported_version_error("url");
 4391|      7|  }
 4392|       |
 4393|  1.80k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4393:7): [True: 1.19k, False: 609]
  ------------------
 4394|       |    // data in same file
 4395|  1.19k|    m_location.clear();
 4396|  1.19k|  }
 4397|    609|  else {
 4398|    609|    m_location = range.read_string();
 4399|    609|  }
 4400|       |
 4401|  1.80k|  return range.get_error();
 4402|  1.80k|}
_ZNK7Box_url4dumpER6Indent:
 4423|  1.19k|{
 4424|  1.19k|  std::ostringstream sstr;
 4425|  1.19k|  sstr << Box::dump(indent);
 4426|       |  //sstr << dump_children(indent);
 4427|       |
 4428|  1.19k|  sstr << indent << "location: " << m_location << "\n";
 4429|       |
 4430|  1.19k|  return sstr.str();
 4431|  1.19k|}
_ZN8Box_udes5parseER14BitstreamRangePK20heif_security_limits:
 4435|  1.85k|{
 4436|  1.85k|  parse_full_box_header(range);
 4437|       |
 4438|  1.85k|  if (get_version() > 0) {
  ------------------
  |  Branch (4438:7): [True: 378, False: 1.47k]
  ------------------
 4439|    378|    return unsupported_version_error("udes");
 4440|    378|  }
 4441|       |
 4442|  1.47k|  m_lang = range.read_string();
 4443|  1.47k|  m_name = range.read_string();
 4444|  1.47k|  m_description = range.read_string();
 4445|  1.47k|  m_tags = range.read_string();
 4446|  1.47k|  return range.get_error();
 4447|  1.85k|}
_ZNK8Box_udes4dumpER6Indent:
 4450|  1.36k|{
 4451|  1.36k|  std::ostringstream sstr;
 4452|  1.36k|  sstr << Box::dump(indent);
 4453|  1.36k|  sstr << indent << "lang: " << m_lang << "\n";
 4454|  1.36k|  sstr << indent << "name: " << m_name << "\n";
 4455|  1.36k|  sstr << indent << "description: " << m_description << "\n";
 4456|  1.36k|  sstr << indent << "tags: " << m_lang << "\n";
 4457|  1.36k|  return sstr.str();
 4458|  1.36k|}
_ZNK8Box_cmin4dumpER6Indent:
 4506|  2.81k|{
 4507|  2.81k|  std::ostringstream sstr;
 4508|  2.81k|  sstr << Box::dump(indent);
 4509|  2.81k|  sstr << indent << "principal-point: " << m_matrix.principal_point_x << ", " << m_matrix.principal_point_y << "\n";
 4510|  2.81k|  if (m_matrix.is_anisotropic) {
  ------------------
  |  Branch (4510:7): [True: 545, False: 2.27k]
  ------------------
 4511|    545|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << ", " << m_matrix.focal_length_y << "\n";
 4512|    545|    sstr << indent << "skew: " << m_matrix.skew << "\n";
 4513|    545|  }
 4514|  2.27k|  else {
 4515|  2.27k|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << "\n";
 4516|  2.27k|    sstr << indent << "no skew\n";
 4517|  2.27k|  }
 4518|       |
 4519|  2.81k|  return sstr.str();
 4520|  2.81k|}
_ZN8Box_cmin5parseER14BitstreamRangePK20heif_security_limits:
 4524|  4.98k|{
 4525|  4.98k|  parse_full_box_header(range);
 4526|       |
 4527|  4.98k|  if (get_version() > 0) {
  ------------------
  |  Branch (4527:7): [True: 138, False: 4.84k]
  ------------------
 4528|    138|    return unsupported_version_error("cmin");
 4529|    138|  }
 4530|       |
 4531|  4.84k|  m_denominatorShift = (get_flags() & 0x1F00) >> 8;
 4532|  4.84k|  uint32_t denominator = (1U << m_denominatorShift);
 4533|       |
 4534|  4.84k|  m_matrix.focal_length_x = range.read32s() / (double)denominator;
 4535|  4.84k|  m_matrix.principal_point_x = range.read32s() / (double)denominator;
 4536|  4.84k|  m_matrix.principal_point_y = range.read32s() / (double)denominator;
 4537|       |
 4538|  4.84k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4538:7): [True: 566, False: 4.27k]
  ------------------
 4539|    566|    m_skewDenominatorShift = ((get_flags()) & 0x1F0000) >> 16;
 4540|    566|    uint32_t skewDenominator = (1U << m_skewDenominatorShift);
 4541|       |
 4542|    566|    m_matrix.focal_length_y = range.read32s() / (double)denominator;
 4543|    566|    m_matrix.skew = range.read32s() / (double)skewDenominator;
 4544|       |
 4545|    566|    m_matrix.is_anisotropic = true;
 4546|    566|  }
 4547|  4.27k|  else {
 4548|  4.27k|    m_matrix.is_anisotropic = false;
 4549|  4.27k|    m_matrix.focal_length_y = 0;
 4550|  4.27k|    m_matrix.skew = 0;
 4551|  4.27k|  }
 4552|  4.84k|  return range.get_error();
 4553|  4.98k|}
_ZN8Box_cmex5parseER14BitstreamRangePK20heif_security_limits:
 4711|  7.12k|{
 4712|  7.12k|  parse_full_box_header(range);
 4713|       |
 4714|  7.12k|  if (get_version() > 0) {
  ------------------
  |  Branch (4714:7): [True: 1.02k, False: 6.10k]
  ------------------
 4715|  1.02k|    return unsupported_version_error("cmex");
 4716|  1.02k|  }
 4717|       |
 4718|  6.10k|  m_matrix = ExtrinsicMatrix{};
 4719|       |
 4720|  6.10k|  if (get_flags() & pos_x_present) {
  ------------------
  |  Branch (4720:7): [True: 4.88k, False: 1.21k]
  ------------------
 4721|  4.88k|    m_has_pos_x = true;
 4722|  4.88k|    m_matrix.pos_x = range.read32s();
 4723|  4.88k|  }
 4724|       |
 4725|  6.10k|  if (get_flags() & pos_y_present) {
  ------------------
  |  Branch (4725:7): [True: 5.28k, False: 818]
  ------------------
 4726|  5.28k|    m_has_pos_y = true;
 4727|  5.28k|    m_matrix.pos_y = range.read32s();
 4728|  5.28k|  }
 4729|       |
 4730|  6.10k|  if (get_flags() & pos_z_present) {
  ------------------
  |  Branch (4730:7): [True: 708, False: 5.39k]
  ------------------
 4731|    708|    m_has_pos_z = true;
 4732|    708|    m_matrix.pos_z = range.read32s();
 4733|    708|  }
 4734|       |
 4735|  6.10k|  if (get_flags() & orientation_present) {
  ------------------
  |  Branch (4735:7): [True: 1.27k, False: 4.82k]
  ------------------
 4736|  1.27k|    m_has_orientation = true;
 4737|       |
 4738|  1.27k|    if (get_version() == 0) {
  ------------------
  |  Branch (4738:9): [True: 1.27k, False: 0]
  ------------------
 4739|  1.27k|      bool use32bit = (get_flags() & rot_large_field_size);
 4740|  1.27k|      int32_t quat_x = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (4740:24): [True: 535, False: 739]
  ------------------
 4741|  1.27k|      int32_t quat_y = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (4741:24): [True: 535, False: 739]
  ------------------
 4742|  1.27k|      int32_t quat_z = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (4742:24): [True: 535, False: 739]
  ------------------
 4743|       |
 4744|  1.27k|      uint32_t div = 1U << (14 + (use32bit ? 16 : 0));
  ------------------
  |  Branch (4744:35): [True: 535, False: 739]
  ------------------
 4745|       |
 4746|  1.27k|      m_matrix.rotation_as_quaternions = true;
 4747|  1.27k|      m_matrix.quaternion_x = quat_x / (double)div;
 4748|  1.27k|      m_matrix.quaternion_y = quat_y / (double)div;
 4749|  1.27k|      m_matrix.quaternion_z = quat_z / (double)div;
 4750|       |
 4751|  1.27k|      double q_sum = (m_matrix.quaternion_x * m_matrix.quaternion_x +
 4752|  1.27k|                      m_matrix.quaternion_y * m_matrix.quaternion_y +
 4753|  1.27k|                      m_matrix.quaternion_z * m_matrix.quaternion_z);
 4754|       |
 4755|  1.27k|      if (q_sum > 1.0) {
  ------------------
  |  Branch (4755:11): [True: 196, False: 1.07k]
  ------------------
 4756|    196|        return Error(heif_error_Invalid_input,
 4757|    196|                     heif_suberror_Unspecified,
 4758|    196|                     "Invalid quaternion in extrinsic rotation matrix");
 4759|    196|      }
 4760|       |
 4761|  1.07k|      m_matrix.quaternion_w = sqrt(1 - q_sum);
 4762|       |
 4763|  1.07k|    } else if (get_version() == 1) {
  ------------------
  |  Branch (4763:16): [True: 0, False: 0]
  ------------------
 4764|      0|      uint32_t div = 1<<16;
 4765|      0|      m_matrix.rotation_yaw = range.read32s() / (double)div;
 4766|      0|      m_matrix.rotation_pitch = range.read32s() / (double)div;
 4767|      0|      m_matrix.rotation_roll = range.read32s() / (double)div;
 4768|      0|    }
 4769|  1.27k|  }
 4770|       |
 4771|  5.90k|  if (get_flags() & id_present) {
  ------------------
  |  Branch (4771:7): [True: 4.87k, False: 1.03k]
  ------------------
 4772|  4.87k|    m_has_world_coordinate_system_id = true;
 4773|  4.87k|    m_matrix.world_coordinate_system_id = range.read32();
 4774|  4.87k|  }
 4775|       |
 4776|  5.90k|  return range.get_error();
 4777|  6.10k|}
_ZNK8Box_cmex4dumpER6Indent:
 4781|  4.16k|{
 4782|  4.16k|  std::ostringstream sstr;
 4783|  4.16k|  sstr << Box::dump(indent);
 4784|  4.16k|  sstr << indent << "camera position (um): ";
 4785|  4.16k|  sstr << m_matrix.pos_x << " ; ";
 4786|  4.16k|  sstr << m_matrix.pos_y << " ; ";
 4787|  4.16k|  sstr << m_matrix.pos_z << "\n";
 4788|       |
 4789|  4.16k|  sstr << indent << "orientation ";
 4790|  4.16k|  if (m_matrix.rotation_as_quaternions) {
  ------------------
  |  Branch (4790:7): [True: 4.16k, False: 0]
  ------------------
 4791|  4.16k|    sstr << "(quaterion)\n";
 4792|  4.16k|    sstr << indent << "  q = ["
 4793|  4.16k|         << m_matrix.quaternion_x << ";"
 4794|  4.16k|         << m_matrix.quaternion_y << ";"
 4795|  4.16k|         << m_matrix.quaternion_z << ";"
 4796|  4.16k|         << m_matrix.quaternion_w << "]\n";
 4797|  4.16k|  }
 4798|      0|  else {
 4799|      0|    sstr << "(angles)\n";
 4800|      0|    sstr << indent << "  yaw:   " << m_matrix.rotation_yaw << "\n";
 4801|      0|    sstr << indent << "  pitch: " << m_matrix.rotation_pitch << "\n";
 4802|      0|    sstr << indent << "  roll:  " << m_matrix.rotation_roll << "\n";
 4803|      0|  }
 4804|       |
 4805|  4.16k|  sstr << indent << "world coordinate system id: " << m_matrix.world_coordinate_system_id << "\n";
 4806|       |
 4807|  4.16k|  return sstr.str();
 4808|  4.16k|}
_ZN8Box_taic4dumpERK19heif_tai_clock_infoR6Indent:
 4948|  1.51k|{
 4949|  1.51k|  std::ostringstream sstr;
 4950|  1.51k|  sstr << indent << "time_uncertainty: ";
 4951|  1.51k|  if (info.time_uncertainty == heif_tai_clock_info_time_uncertainty_unknown) {
  ------------------
  |  |   52|  1.51k|#define heif_tai_clock_info_time_uncertainty_unknown UINT64_C(0xFFFFFFFFFFFFFFFF)
  ------------------
  |  Branch (4951:7): [True: 68, False: 1.44k]
  ------------------
 4952|     68|    sstr << "unknown\n";
 4953|     68|  }
 4954|  1.44k|  else {
 4955|  1.44k|    sstr << info.time_uncertainty << "\n";
 4956|  1.44k|  }
 4957|  1.51k|  sstr << indent << "clock_resolution: " << info.clock_resolution << "\n";
 4958|  1.51k|  sstr << indent << "clock_drift_rate: ";
 4959|  1.51k|  if (info.clock_drift_rate == heif_tai_clock_info_clock_drift_rate_unknown) {
  ------------------
  |  |   53|  1.51k|#define heif_tai_clock_info_clock_drift_rate_unknown INT32_C(0x7FFFFFFF)
  ------------------
  |  Branch (4959:7): [True: 112, False: 1.40k]
  ------------------
 4960|    112|    sstr << "undefined\n";
 4961|    112|  }
 4962|  1.40k|  else {
 4963|  1.40k|    sstr << info.clock_drift_rate << "\n";
 4964|  1.40k|  }
 4965|       |
 4966|  1.51k|  sstr << indent << "clock_type: " << int(info.clock_type) << " ";
 4967|  1.51k|  switch (info.clock_type) {
 4968|    419|    case heif_tai_clock_info_clock_type_unknown: sstr << "(unknown)\n"; break;
  ------------------
  |  |   54|    419|#define heif_tai_clock_info_clock_type_unknown 0
  ------------------
  |  Branch (4968:5): [True: 419, False: 1.09k]
  ------------------
 4969|      4|    case heif_tai_clock_info_clock_type_synchronized_to_atomic_source: sstr << "(synchronized to atomic source)\n"; break;
  ------------------
  |  |   56|      4|#define heif_tai_clock_info_clock_type_synchronized_to_atomic_source 2
  ------------------
  |  Branch (4969:5): [True: 4, False: 1.51k]
  ------------------
 4970|     13|    case heif_tai_clock_info_clock_type_not_synchronized_to_atomic_source: sstr << "(not synchronized to atomic source)\n"; break;
  ------------------
  |  |   55|     13|#define heif_tai_clock_info_clock_type_not_synchronized_to_atomic_source 1
  ------------------
  |  Branch (4970:5): [True: 13, False: 1.50k]
  ------------------
 4971|  1.08k|    default: sstr << "(illegal value)\n"; break;;
  ------------------
  |  Branch (4971:5): [True: 1.08k, False: 436]
  ------------------
 4972|  1.51k|  }
 4973|  1.51k|  return sstr.str();
 4974|  1.51k|}
_ZNK8Box_taic4dumpER6Indent:
 4977|  1.51k|std::string Box_taic::dump(Indent& indent) const {
 4978|  1.51k|  std::ostringstream sstr;
 4979|  1.51k|  sstr << Box::dump(indent);
 4980|  1.51k|  sstr << dump(m_info, indent);
 4981|       |
 4982|  1.51k|  return sstr.str();
 4983|  1.51k|}
_ZN8Box_taic5parseER14BitstreamRangePK20heif_security_limits:
 4997|  1.61k|Error Box_taic::parse(BitstreamRange& range, const heif_security_limits*) {
 4998|  1.61k|  parse_full_box_header(range);
 4999|       |
 5000|  1.61k|  m_info.time_uncertainty = range.read64();
 5001|  1.61k|  m_info.clock_resolution = range.read32();
 5002|       |
 5003|  1.61k|  m_info.clock_drift_rate = range.read32s();
 5004|  1.61k|  m_info.clock_type = range.read8();
 5005|  1.61k|  return range.get_error();
 5006|  1.61k|}
_ZNK8Box_itai4dumpER6Indent:
 5030|    554|std::string Box_itai::dump(Indent& indent) const {
 5031|    554|  std::ostringstream sstr;
 5032|    554|  sstr << Box::dump(indent);
 5033|    554|  sstr << indent << "tai_timestamp: " << m_timestamp.tai_timestamp << "\n";
 5034|    554|  sstr << indent << "synchronization_state: " << int(m_timestamp.synchronization_state) << "\n";
 5035|    554|  sstr << indent << "timestamp_generation_failure: " << int(m_timestamp.timestamp_generation_failure) << "\n";
 5036|    554|  sstr << indent << "timestamp_is_modified: " << int(m_timestamp.timestamp_is_modified) << "\n";
 5037|    554|  return sstr.str();
 5038|    554|}
_ZN8Box_itai5parseER14BitstreamRangePK20heif_security_limits:
 5125|    712|Error Box_itai::parse(BitstreamRange& range, const heif_security_limits*) {
 5126|    712|  parse_full_box_header(range);
 5127|       |
 5128|    712|  m_timestamp.version = 1;
 5129|    712|  m_timestamp.tai_timestamp = range.read64();
 5130|       |
 5131|    712|  uint8_t status_bits = range.read8();
 5132|       |
 5133|    712|  m_timestamp.synchronization_state = !!(status_bits & 0x80);
 5134|    712|  m_timestamp.timestamp_generation_failure = !!(status_bits & 0x40);
 5135|    712|  m_timestamp.timestamp_is_modified = !!(status_bits & 0x20);
 5136|       |
 5137|    712|  return range.get_error();
 5138|    712|}
_ZN8Box_elng5parseER14BitstreamRangePK20heif_security_limits:
 5141|    756|{
 5142|    756|  parse_full_box_header(range);
 5143|       |
 5144|    756|  if (get_version() > 0) {
  ------------------
  |  Branch (5144:7): [True: 70, False: 686]
  ------------------
 5145|     70|    return unsupported_version_error("elng");
 5146|     70|  }
 5147|       |
 5148|    686|  m_lang = range.read_string();
 5149|    686|  return range.get_error();
 5150|    756|}
_ZNK8Box_elng4dumpER6Indent:
 5153|    592|{
 5154|    592|  std::ostringstream sstr;
 5155|    592|  sstr << Box::dump(indent);
 5156|    592|  sstr << indent << "extended_language: " << m_lang << "\n";
 5157|    592|  return sstr.str();
 5158|    592|}
_ZN19Box_gimi_content_id5parseER14BitstreamRangePK20heif_security_limits:
 5170|  1.88k|{
 5171|  1.88k|  m_content_id = range.read_string_until_eof();
 5172|       |
 5173|  1.88k|  return range.get_error();
 5174|  1.88k|}
_ZNK19Box_gimi_content_id4dumpER6Indent:
 5190|  1.41k|{
 5191|  1.41k|  std::ostringstream sstr;
 5192|  1.41k|  sstr << Box::dump(indent);
 5193|       |
 5194|  1.41k|  sstr << indent << "content ID: " << m_content_id << "\n";
 5195|       |
 5196|  1.41k|  return sstr.str();
 5197|  1.41k|}

_ZNK9BoxHeader12get_box_sizeEv:
  119|  2.47M|  uint64_t get_box_size() const { return m_size; }
_ZNK9BoxHeader18has_fixed_box_sizeEv:
  121|  1.04M|  bool has_fixed_box_size() const { return m_size != 0; }
_ZNK9BoxHeader15get_header_sizeEv:
  123|  2.02M|  uint32_t get_header_size() const { return m_header_size; }
_ZNK9BoxHeader14get_short_typeEv:
  125|   727k|  uint32_t get_short_type() const { return m_type; }
_ZNK9BoxHeader14debug_box_nameEv:
  131|   165k|  virtual const char* debug_box_name() const { return nullptr; }
_ZN9BoxHeader14set_short_typeEj:
  133|   495k|  void set_short_type(uint32_t type) { m_type = type; }
_ZN3Box16set_short_headerERK9BoxHeader:
  183|   446k|  {
  184|   446k|    *(BoxHeader*) this = hdr;
  185|   446k|  }
_ZN3Box19set_output_positionEm:
  262|  14.7k|  void set_output_position(uint64_t pos) { m_output_position = pos; }
_ZNK3Box24get_parse_error_fatalityEv:
  264|  6.18k|  virtual parse_error_fatality get_parse_error_fatality() const { return parse_error_fatality::fatal; }
_ZNK7FullBox11get_versionEv:
  322|   886k|  uint8_t get_version() const { return m_version; }
_ZNK7FullBox9get_flagsEv:
  326|  1.42M|  uint32_t get_flags() const { return m_flags; }
_ZN7FullBox9set_flagsEj:
  328|  4.44k|  void set_flags(uint32_t flags) { m_flags = flags; }
_ZN9Box_otherC2Ej:
  350|   137k|  {
  351|   137k|    set_short_type(short_type);
  352|   137k|  }
_ZN9Box_ErrorC2Ej5Error20parse_error_fatality:
  374|  30.9k|  {
  375|  30.9k|    set_short_type(fourcc("ERR "));
  376|       |
  377|  30.9k|    m_box_type_with_parse_error = box4cc;
  378|  30.9k|    m_error = std::move(err);
  379|  30.9k|    m_fatality = fatality;
  380|  30.9k|  }
_ZN8Box_ftypC2Ev:
  405|  41.1k|  {
  406|  41.1k|    set_short_type(fourcc("ftyp"));
  407|  41.1k|  }
_ZNK8Box_ftyp14debug_box_nameEv:
  411|  10.0k|  const char* debug_box_name() const override { return "File Type"; }
_ZN8Box_freeC2Ev:
  445|  1.13k|  {
  446|  1.13k|    set_short_type(fourcc("free"));
  447|  1.13k|  }
_ZNK8Box_free14debug_box_nameEv:
  451|  1.00k|  const char* debug_box_name() const override { return "Free Space"; }
_ZN8Box_metaC2Ev:
  464|  2.93k|  {
  465|  2.93k|    set_short_type(fourcc("meta"));
  466|  2.93k|  }
_ZNK8Box_meta14debug_box_nameEv:
  470|  2.70k|  const char* debug_box_name() const override { return "Metadata"; }
_ZN8Box_hdlrC2Ev:
  481|  2.14k|  {
  482|  2.14k|    set_short_type(fourcc("hdlr"));
  483|  2.14k|  }
_ZNK8Box_hdlr14debug_box_nameEv:
  487|  1.53k|  const char* debug_box_name() const override { return "Handler Reference"; }
_ZN8Box_pitmC2Ev:
  512|  3.20k|  {
  513|  3.20k|    set_short_type(fourcc("pitm"));
  514|  3.20k|  }
_ZNK8Box_pitm14debug_box_nameEv:
  518|  2.59k|  const char* debug_box_name() const override { return "Primary Item"; }
_ZNK8Box_iloc14debug_box_nameEv:
  547|  1.58k|  const char* debug_box_name() const override { return "Item Location"; }
_ZN8Box_infeC2Ev:
  642|  4.41k|  {
  643|  4.41k|    set_short_type(fourcc("infe"));
  644|  4.41k|  }
_ZNK8Box_infe14debug_box_nameEv:
  648|  3.85k|  const char* debug_box_name() const override { return "Item Info Entry"; }
_ZN8Box_iinfC2Ev:
  704|  3.92k|  {
  705|  3.92k|    set_short_type(fourcc("iinf"));
  706|  3.92k|  }
_ZNK8Box_iinf14debug_box_nameEv:
  710|  3.18k|  const char* debug_box_name() const override { return "Item Information"; }
_ZN8Box_iprpC2Ev:
  728|  30.8k|  {
  729|  30.8k|    set_short_type(fourcc("iprp"));
  730|  30.8k|  }
_ZNK8Box_iprp14debug_box_nameEv:
  734|  26.6k|  const char* debug_box_name() const override { return "Item Properties"; }
_ZN8Box_ipcoC2Ev:
  745|  10.9k|  {
  746|  10.9k|    set_short_type(fourcc("ipco"));
  747|  10.9k|  }
_ZNK8Box_ipco14debug_box_nameEv:
  765|  9.88k|  const char* debug_box_name() const override { return "Item Property Container"; }
_ZN8Box_ispeC2Ev:
  776|  2.46k|  {
  777|  2.46k|    set_short_type(fourcc("ispe"));
  778|  2.46k|  }
_ZNK8Box_ispe14debug_box_nameEv:
  792|  2.17k|  const char* debug_box_name() const override { return "Image Spatial Extents"; }
_ZN8Box_ipmaC2Ev:
  814|  2.88k|  {
  815|  2.88k|    set_short_type(fourcc("ipma"));
  816|  2.88k|  }
_ZNK8Box_ipma14debug_box_nameEv:
  820|  2.48k|  const char* debug_box_name() const override { return "Item Property Association"; }
_ZN8Box_auxCC2Ev:
  861|  1.06k|  {
  862|  1.06k|    set_short_type(fourcc("auxC"));
  863|  1.06k|  }
_ZNK8Box_auxC14debug_box_nameEv:
  875|    836|  const char* debug_box_name() const override { return "Image Properties for Auxiliary Images"; }
_ZN8Box_irotC2Ev:
  892|  6.76k|  {
  893|  6.76k|    set_short_type(fourcc("irot"));
  894|  6.76k|  }
_ZNK8Box_irot14debug_box_nameEv:
  902|  4.85k|  const char* debug_box_name() const override { return "Image Rotation"; }
_ZNK8Box_irot24get_parse_error_fatalityEv:
  909|    144|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_imirC2Ev:
  925|  2.17k|  {
  926|  2.17k|    set_short_type(fourcc("imir"));
  927|  2.17k|  }
_ZNK8Box_imir14debug_box_nameEv:
  939|  1.58k|  const char* debug_box_name() const override { return "Image Mirroring"; }
_ZNK8Box_imir24get_parse_error_fatalityEv:
  941|    424|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_clapC2Ev:
  957|  17.7k|  {
  958|  17.7k|    set_short_type(fourcc("clap"));
  959|  17.7k|  }
_ZNK8Box_clap14debug_box_nameEv:
  967|    524|  const char* debug_box_name() const override { return "Clean Aperture"; }
_ZNK8Box_clap24get_parse_error_fatalityEv:
  984|  17.0k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_irefC2Ev:
 1003|  16.1k|  {
 1004|  16.1k|    set_short_type(fourcc("iref"));
 1005|  16.1k|  }
_ZNK8Box_iref14debug_box_nameEv:
 1018|  13.9k|  const char* debug_box_name() const override { return "Item Reference"; }
_ZNK8Box_idat14debug_box_nameEv:
 1049|  4.89k|  const char* debug_box_name() const override { return "Item Data"; }
_ZN8Box_grplC2Ev:
 1082|  1.66k|  {
 1083|  1.66k|    set_short_type(fourcc("grpl"));
 1084|  1.66k|  }
_ZNK8Box_grpl14debug_box_nameEv:
 1088|  1.47k|  const char* debug_box_name() const override { return "Groups List"; }
_ZN8Box_sterC2Ev:
 1124|    680|  {
 1125|    680|    set_short_type(fourcc("ster"));
 1126|    680|  }
_ZNK8Box_ster14debug_box_nameEv:
 1130|    644|  const char* debug_box_name() const override { return "Stereo pair"; }
_ZN8Box_pymdC2Ev:
 1145|  1.33k|  {
 1146|  1.33k|    set_short_type(fourcc("pymd"));
 1147|  1.33k|  }
_ZNK8Box_pymd14debug_box_nameEv:
 1151|    896|  const char* debug_box_name() const override { return "Image pyramid group"; }
_ZNK8Box_pymd24get_parse_error_fatalityEv:
 1174|    213|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_dinfC2Ev:
 1192|  6.41k|  {
 1193|  6.41k|    set_short_type(fourcc("dinf"));
 1194|  6.41k|  }
_ZNK8Box_dinf14debug_box_nameEv:
 1198|  5.21k|  const char* debug_box_name() const override { return "Data Information"; }
_ZN8Box_drefC2Ev:
 1209|  1.62k|  {
 1210|  1.62k|    set_short_type(fourcc("dref"));
 1211|  1.62k|  }
_ZNK8Box_dref14debug_box_nameEv:
 1215|  1.31k|  const char* debug_box_name() const override { return "Data Reference"; }
_ZN7Box_urlC2Ev:
 1228|  1.81k|  {
 1229|  1.81k|    set_short_type(fourcc("url "));
 1230|  1.81k|    set_flags(1);
 1231|  1.81k|  }
_ZNK7Box_url14debug_box_nameEv:
 1235|  1.19k|  const char* debug_box_name() const override { return "Data Entry URL"; }
_ZN8Box_pixiC2Ev:
 1255|  3.64k|  {
 1256|  3.64k|    set_short_type(fourcc("pixi"));
 1257|  3.64k|  }
_ZNK8Box_pixi14debug_box_nameEv:
 1276|  2.29k|  const char* debug_box_name() const override { return "Pixel Information"; }
_ZNK8Box_pixi24get_parse_error_fatalityEv:
 1280|    778|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_paspC2Ev:
 1294|  15.5k|  {
 1295|  15.5k|    set_short_type(fourcc("pasp"));
 1296|  15.5k|  }
_ZNK8Box_pasp14debug_box_nameEv:
 1303|  13.4k|  const char* debug_box_name() const override { return "Pixel Aspect Ratio"; }
_ZNK8Box_pasp24get_parse_error_fatalityEv:
 1307|    119|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_lselC2Ev:
 1318|  7.80k|  {
 1319|  7.80k|    set_short_type(fourcc("lsel"));
 1320|  7.80k|  }
_ZNK8Box_lsel14debug_box_nameEv:
 1326|  6.20k|  const char* debug_box_name() const override { return "Layer Selection"; }
_ZNK8Box_lsel24get_parse_error_fatalityEv:
 1330|    618|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_clliC2Ev:
 1341|  2.16k|  {
 1342|  2.16k|    set_short_type(fourcc("clli"));
 1343|       |
 1344|  2.16k|    clli.max_content_light_level = 0;
 1345|  2.16k|    clli.max_pic_average_light_level = 0;
 1346|  2.16k|  }
_ZNK8Box_clli14debug_box_nameEv:
 1352|  1.91k|  const char* debug_box_name() const override { return "Content Light Level Information"; }
_ZNK8Box_clli24get_parse_error_fatalityEv:
 1356|    164|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_mdcv14debug_box_nameEv:
 1372|  3.10k|  const char* debug_box_name() const override { return "Master Display Colour Volume"; }
_ZNK8Box_mdcv24get_parse_error_fatalityEv:
 1376|    516|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_amve14debug_box_nameEv:
 1392|    495|  const char* debug_box_name() const override { return "Ambient Viewing Environment"; }
_ZNK8Box_amve24get_parse_error_fatalityEv:
 1396|    645|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_cminC2Ev:
 1455|  4.98k|  {
 1456|  4.98k|    set_short_type(fourcc("cmin"));
 1457|  4.98k|  }
_ZNK8Box_cmin14debug_box_nameEv:
 1512|  2.81k|  const char* debug_box_name() const override { return "Camera Intrinsic Matrix"; }
_ZNK8Box_cmin24get_parse_error_fatalityEv:
 1518|  1.52k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_cmexC2Ev:
 1537|  7.12k|  {
 1538|  7.12k|    set_short_type(fourcc("cmex"));
 1539|  7.12k|  }
_ZNK8Box_cmex14debug_box_nameEv:
 1569|  4.16k|  const char* debug_box_name() const override { return "Camera Extrinsic Matrix"; }
_ZNK8Box_cmex24get_parse_error_fatalityEv:
 1575|  2.02k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_udesC2Ev:
 1617|  1.85k|  {
 1618|  1.85k|    set_short_type(fourcc("udes"));
 1619|  1.85k|  }
_ZNK8Box_udes14debug_box_nameEv:
 1623|  1.36k|  const char* debug_box_name() const override { return "User Description"; }
_ZNK8Box_udes24get_parse_error_fatalityEv:
 1689|    485|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_taicC2Ev:
 1710|  1.62k|  {
 1711|  1.62k|    set_short_type(fourcc("taic"));
 1712|  1.62k|    initialize_heif_tai_clock_info(&m_info);
 1713|  1.62k|  }
_ZNK8Box_taic14debug_box_nameEv:
 1719|  1.51k|  const char* debug_box_name() const override { return "TAI Clock Information"; }
_ZN8Box_itaiC2Ev:
 1790|    714|  {
 1791|    714|    set_short_type(fourcc("itai"));
 1792|    714|    initialize_heif_tai_timestamp_packet(&m_timestamp);
 1793|    714|  }
_ZNK8Box_itai14debug_box_nameEv:
 1797|    554|  const char* debug_box_name() const override { return "Item TAI Timestamp"; }
_ZN19Box_gimi_content_idC2Ev:
 1855|  1.88k|  {
 1856|  1.88k|    set_uuid_type(std::vector<uint8_t>{0x26, 0x1e, 0xf3, 0x74, 0x1d, 0x97, 0x5b, 0xba, 0xac, 0xbd, 0x9d, 0x2c, 0x8e, 0xa7, 0x35, 0x22});
 1857|  1.88k|  }
_ZNK19Box_gimi_content_id14debug_box_nameEv:
 1865|  1.41k|  const char* debug_box_name() const override { return "GIMI Content ID"; }
_ZN8Box_elngC2Ev:
 1898|    761|  {
 1899|    761|    set_short_type(fourcc("elng"));
 1900|    761|  }
_ZNK8Box_elng14debug_box_nameEv:
 1904|    592|  const char* debug_box_name() const override { return "Extended language"; }
_ZNK8Box_elng24get_parse_error_fatalityEv:
 1924|     73|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN9BoxHeaderD2Ev:
  115|  1.00M|  virtual ~BoxHeader() = default;
_ZN3BoxC2Ev:
  180|   506k|  Box() = default;
_ZN8FractionC2Ev:
   66|  70.9k|  Fraction() = default;

_ZN8Box_avcC5parseER14BitstreamRangePK20heif_security_limits:
   35|  4.64k|{
   36|  4.64k|  m_configuration.configuration_version = range.read8();
   37|  4.64k|  m_configuration.AVCProfileIndication = range.read8();
   38|  4.64k|  m_configuration.profile_compatibility = range.read8();
   39|  4.64k|  m_configuration.AVCLevelIndication = range.read8();
   40|  4.64k|  uint8_t lengthSizeMinusOneWithReserved = range.read8();
   41|  4.64k|  m_configuration.lengthSize =
   42|  4.64k|      (lengthSizeMinusOneWithReserved & 0b00000011) + 1;
   43|       |
   44|  4.64k|  uint8_t numOfSequenceParameterSets = (range.read8() & 0b00011111);
   45|  7.53k|  for (int i = 0; i < numOfSequenceParameterSets; i++) {
  ------------------
  |  Branch (45:19): [True: 2.88k, False: 4.64k]
  ------------------
   46|  2.88k|    uint16_t sequenceParameterSetLength = range.read16();
   47|  2.88k|    std::vector<uint8_t> sps(sequenceParameterSetLength);
   48|  2.88k|    range.read(sps.data(), sps.size());
   49|  2.88k|    m_sps.push_back(sps);
   50|  2.88k|  }
   51|       |
   52|  4.64k|  uint8_t numOfPictureParameterSets = range.read8();
   53|  9.82k|  for (int i = 0; i < numOfPictureParameterSets; i++) {
  ------------------
  |  Branch (53:19): [True: 5.18k, False: 4.64k]
  ------------------
   54|  5.18k|    uint16_t pictureParameterSetLength = range.read16();
   55|  5.18k|    std::vector<uint8_t> pps(pictureParameterSetLength);
   56|  5.18k|    range.read(pps.data(), pps.size());
   57|  5.18k|    m_pps.push_back(pps);
   58|  5.18k|  }
   59|       |
   60|       |  // See ISO/IEC 14496-15 2017 Section 5.3.3.1.2
   61|  4.64k|  if (range.get_remaining_bytes() > 0) {
  ------------------
  |  Branch (61:7): [True: 1.75k, False: 2.89k]
  ------------------
   62|  1.75k|    if ((m_configuration.AVCProfileIndication != 66) &&
  ------------------
  |  Branch (62:9): [True: 1.47k, False: 283]
  ------------------
   63|  1.47k|        (m_configuration.AVCProfileIndication != 77) &&
  ------------------
  |  Branch (63:9): [True: 1.25k, False: 218]
  ------------------
   64|  1.25k|        (m_configuration.AVCProfileIndication != 88)) {
  ------------------
  |  Branch (64:9): [True: 1.19k, False: 62]
  ------------------
   65|  1.19k|      m_configuration.chroma_format = (heif_chroma) (range.read8() & 0b00000011);
   66|  1.19k|      m_configuration.bit_depth_luma = 8 + (range.read8() & 0b00000111);
   67|  1.19k|      m_configuration.bit_depth_chroma = 8 + (range.read8() & 0b00000111);
   68|  1.19k|      uint8_t numOfSequenceParameterSetExt = range.read8();
   69|  7.03k|      for (int i = 0; i < numOfSequenceParameterSetExt; i++) {
  ------------------
  |  Branch (69:23): [True: 5.84k, False: 1.19k]
  ------------------
   70|  5.84k|        uint16_t sequenceParameterSetExtLength = range.read16();
   71|  5.84k|        std::vector<uint8_t> sps_ext(sequenceParameterSetExtLength);
   72|  5.84k|        range.read(sps_ext.data(), sps_ext.size());
   73|  5.84k|        m_sps_ext.push_back(sps_ext);
   74|  5.84k|      }
   75|  1.19k|    }
   76|  1.75k|  }
   77|       |
   78|  4.64k|  return range.get_error();
   79|  4.64k|}
_ZNK8Box_avcC4dumpER6Indent:
  170|  3.92k|{
  171|  3.92k|  std::ostringstream sstr;
  172|  3.92k|  sstr << Box::dump(indent);
  173|  3.92k|  sstr << indent << "configuration_version: " << ((int) m_configuration.configuration_version) << "\n"
  174|  3.92k|      << indent << "AVCProfileIndication: " << ((int) m_configuration.AVCProfileIndication) << " (" << profileIndicationAsText() << ")\n"
  175|  3.92k|      << indent << "profile_compatibility: " << ((int) m_configuration.profile_compatibility) << "\n"
  176|  3.92k|      << indent << "AVCLevelIndication: " << ((int) m_configuration.AVCLevelIndication) << "\n"
  177|  3.92k|      << indent << "Chroma format: ";
  178|       |
  179|  3.92k|  switch (m_configuration.chroma_format) {
  180|    933|    case heif_chroma_monochrome:
  ------------------
  |  |   75|    933|#define heif_chroma_monochrome heif_chroma_planar
  ------------------
  |  Branch (180:5): [True: 933, False: 2.99k]
  ------------------
  181|    933|      sstr << "4:0:0\n";
  182|    933|      break;
  183|  2.83k|    case heif_chroma_420:
  ------------------
  |  Branch (183:5): [True: 2.83k, False: 1.09k]
  ------------------
  184|  2.83k|      sstr << "4:2:0\n";
  185|  2.83k|      break;
  186|     30|    case heif_chroma_422:
  ------------------
  |  Branch (186:5): [True: 30, False: 3.89k]
  ------------------
  187|     30|      sstr << "4:2:2\n";
  188|     30|      break;
  189|    129|    case heif_chroma_444:
  ------------------
  |  Branch (189:5): [True: 129, False: 3.79k]
  ------------------
  190|    129|      sstr << "4:4:4\n";
  191|    129|      break;
  192|      0|    default:
  ------------------
  |  Branch (192:5): [True: 0, False: 3.92k]
  ------------------
  193|      0|      sstr << "unsupported\n";
  194|      0|      break;
  195|  3.92k|  }
  196|       |
  197|  3.92k|  sstr << indent << "Bit depth luma: " << ((int) m_configuration.bit_depth_luma) << "\n"
  198|  3.92k|      << indent << "Bit depth chroma: " << ((int) m_configuration.bit_depth_chroma) << "\n";
  199|       |
  200|  3.92k|  for (const auto& sps : m_sps) {
  ------------------
  |  Branch (200:24): [True: 2.19k, False: 3.92k]
  ------------------
  201|  2.19k|    sstr << indent << "SPS: ";
  202|   977k|    for (uint8_t b : sps) {
  ------------------
  |  Branch (202:20): [True: 977k, False: 2.19k]
  ------------------
  203|   977k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  204|   977k|    }
  205|  2.19k|    sstr << "\n";
  206|  2.19k|    sstr << std::dec;
  207|  2.19k|  }
  208|       |
  209|  3.92k|  for (const auto& spsext : m_sps_ext) {
  ------------------
  |  Branch (209:27): [True: 2.74k, False: 3.92k]
  ------------------
  210|  2.74k|    sstr << indent << "SPS-EXT: ";
  211|  68.3k|    for (uint8_t b : spsext) {
  ------------------
  |  Branch (211:20): [True: 68.3k, False: 2.74k]
  ------------------
  212|  68.3k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  213|  68.3k|    }
  214|  2.74k|    sstr << "\n";
  215|  2.74k|    sstr << std::dec;
  216|  2.74k|  }
  217|       |
  218|  3.92k|  for (const auto& pps : m_pps) {
  ------------------
  |  Branch (218:24): [True: 2.21k, False: 3.92k]
  ------------------
  219|  2.21k|    sstr << indent << "PPS: ";
  220|   953k|    for (uint8_t b : pps) {
  ------------------
  |  Branch (220:20): [True: 953k, False: 2.21k]
  ------------------
  221|   953k|      sstr << std::setfill('0') << std::setw(2) << std::hex << ((int) b) << " ";
  222|   953k|    }
  223|  2.21k|    sstr << "\n";
  224|  2.21k|    sstr << std::dec;
  225|  2.21k|  }
  226|       |
  227|  3.92k|  return sstr.str();
  228|  3.92k|}
_ZNK8Box_avcC23profileIndicationAsTextEv:
  231|  3.92k|{
  232|       |  // See ISO/IEC 14496-10:2022 Annex A
  233|  3.92k|  switch (m_configuration.AVCProfileIndication) {
  234|    558|    case 44:
  ------------------
  |  Branch (234:5): [True: 558, False: 3.37k]
  ------------------
  235|    558|      return "CALVC 4:4:4";
  236|    686|    case 66:
  ------------------
  |  Branch (236:5): [True: 686, False: 3.24k]
  ------------------
  237|    686|      return "Constrained Baseline";
  238|  1.14k|    case 77:
  ------------------
  |  Branch (238:5): [True: 1.14k, False: 2.78k]
  ------------------
  239|  1.14k|      return "Main";
  240|    567|    case 88:
  ------------------
  |  Branch (240:5): [True: 567, False: 3.36k]
  ------------------
  241|    567|      return "Extended";
  242|    257|    case 100:
  ------------------
  |  Branch (242:5): [True: 257, False: 3.67k]
  ------------------
  243|    257|      return "High variant";
  244|     73|    case 110:
  ------------------
  |  Branch (244:5): [True: 73, False: 3.85k]
  ------------------
  245|     73|      return "High 10";
  246|    204|    case 122:
  ------------------
  |  Branch (246:5): [True: 204, False: 3.72k]
  ------------------
  247|    204|      return "High 4:2:2";
  248|     92|    case 244:
  ------------------
  |  Branch (248:5): [True: 92, False: 3.83k]
  ------------------
  249|     92|      return "High 4:4:4";
  250|    350|    default:
  ------------------
  |  Branch (250:5): [True: 350, False: 3.57k]
  ------------------
  251|    350|      return "Unknown";
  252|  3.92k|  }
  253|  3.92k|}

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

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

_ZN8Box_av1CC2Ev:
   45|  3.92k|  {
   46|  3.92k|    set_short_type(fourcc("av1C"));
   47|  3.92k|  }
_ZN8Box_av01C2Ev:
  122|     83|  {
  123|     83|    set_short_type(fourcc("av01"));
  124|     83|  }
_ZN8Box_a1opC2Ev:
  131|  14.4k|  {
  132|  14.4k|    set_short_type(fourcc("a1op"));
  133|  14.4k|  }
_ZN8Box_a1lxC2Ev:
  150|  5.12k|  {
  151|  5.12k|    set_short_type(fourcc("a1lx"));
  152|  5.12k|  }

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

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

_ZN8Box_cdef5parseER14BitstreamRangePK20heif_security_limits:
   33|  9.58k|{
   34|  9.58k|  uint16_t channel_count = range.read16();
   35|       |
   36|  9.58k|  if (limits->max_components && channel_count > limits->max_components) {
  ------------------
  |  Branch (36:7): [True: 9.58k, False: 0]
  |  Branch (36:33): [True: 10, False: 9.57k]
  ------------------
   37|     10|    std::stringstream sstr;
   38|     10|    sstr << "cdef box wants to define " << channel_count << " JPEG-2000 channels, but the security limit is set to "
   39|     10|         << limits->max_components << " components";
   40|     10|    return {heif_error_Invalid_input,
   41|     10|            heif_suberror_Security_limit_exceeded,
   42|     10|            sstr.str()};
   43|     10|  }
   44|       |
   45|  9.57k|  if (channel_count > range.get_remaining_bytes() / 6) {
  ------------------
  |  Branch (45:7): [True: 11, False: 9.56k]
  ------------------
   46|     11|    std::stringstream sstr;
   47|     11|    sstr << "cdef box wants to define " << channel_count << " JPEG-2000 channels, but file only contains "
   48|     11|         << range.get_remaining_bytes() / 6 << " components";
   49|     11|    return {heif_error_Invalid_input,
   50|     11|            heif_suberror_End_of_data,
   51|     11|            sstr.str()};
   52|     11|  }
   53|       |
   54|  9.56k|  m_channels.resize(channel_count);
   55|       |
   56|  15.9k|  for (uint16_t i = 0; i < channel_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (56:24): [True: 6.33k, False: 9.56k]
  |  Branch (56:45): [True: 6.33k, False: 0]
  |  Branch (56:63): [True: 6.33k, False: 0]
  ------------------
   57|  6.33k|    Channel channel;
   58|  6.33k|    channel.channel_index = range.read16();
   59|  6.33k|    channel.channel_type = range.read16();
   60|  6.33k|    channel.channel_association = range.read16();
   61|  6.33k|    m_channels[i] = channel;
   62|  6.33k|  }
   63|       |
   64|  9.56k|  return range.get_error();
   65|  9.57k|}
_ZNK8Box_cdef4dumpER6Indent:
   68|  8.17k|{
   69|  8.17k|  std::ostringstream sstr;
   70|  8.17k|  sstr << Box::dump(indent);
   71|       |
   72|  8.17k|  for (const auto& channel : m_channels) {
  ------------------
  |  Branch (72:28): [True: 5.24k, False: 8.17k]
  ------------------
   73|  5.24k|    sstr << indent << "channel_index: " << channel.channel_index
   74|  5.24k|         << ", channel_type: " << channel.channel_type
   75|  5.24k|         << ", channel_association: " << channel.channel_association << "\n";
   76|  5.24k|  }
   77|       |
   78|  8.17k|  return sstr.str();
   79|  8.17k|}
_ZN8Box_cmap5parseER14BitstreamRangePK20heif_security_limits:
  136|  3.20k|{
  137|  5.05M|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (137:10): [True: 5.04M, False: 3.20k]
  |  Branch (137:26): [True: 5.04M, False: 0]
  ------------------
  138|  5.04M|    Component component;
  139|  5.04M|    component.component_index = range.read16();
  140|  5.04M|    component.mapping_type = range.read8();
  141|  5.04M|    component.palette_colour = range.read8();
  142|  5.04M|    m_components.push_back(component);
  143|  5.04M|  }
  144|       |
  145|  3.20k|  return range.get_error();
  146|  3.20k|}
_ZNK8Box_cmap4dumpER6Indent:
  150|  1.75k|{
  151|  1.75k|  std::ostringstream sstr;
  152|  1.75k|  sstr << Box::dump(indent);
  153|       |
  154|  4.82M|  for (const auto& component : m_components) {
  ------------------
  |  Branch (154:30): [True: 4.82M, False: 1.75k]
  ------------------
  155|  4.82M|    sstr << indent << "component_index: " << component.component_index
  156|  4.82M|         << ", mapping_type: " << (int) (component.mapping_type)
  157|  4.82M|         << ", palette_colour: " << (int) (component.palette_colour) << "\n";
  158|  4.82M|  }
  159|       |
  160|  1.75k|  return sstr.str();
  161|  1.75k|}
_ZN8Box_pclr5parseER14BitstreamRangePK20heif_security_limits:
  181|  1.81k|{
  182|  1.81k|  uint16_t num_entries = range.read16();
  183|  1.81k|  uint8_t num_palette_columns = range.read8();
  184|  7.91k|  for (uint8_t i = 0; i < num_palette_columns; i++) {
  ------------------
  |  Branch (184:23): [True: 6.10k, False: 1.80k]
  ------------------
  185|  6.10k|    uint8_t bit_depth = range.read8();
  186|  6.10k|    if (bit_depth & 0x80) {
  ------------------
  |  Branch (186:9): [True: 5, False: 6.10k]
  ------------------
  187|      5|      return Error(heif_error_Unsupported_feature,
  188|      5|                   heif_suberror_Unsupported_data_version,
  189|      5|                   "pclr with signed data is not supported");
  190|      5|    }
  191|  6.10k|    if (bit_depth > 16) {
  ------------------
  |  Branch (191:9): [True: 3, False: 6.10k]
  ------------------
  192|      3|      return Error(heif_error_Unsupported_feature,
  193|      3|                   heif_suberror_Unsupported_data_version,
  194|      3|                   "pclr more than 16 bits per channel is not supported");
  195|      3|    }
  196|  6.10k|    m_bitDepths.push_back(bit_depth);
  197|  6.10k|  }
  198|  26.8M|  for (uint16_t j = 0; j < num_entries; j++) {
  ------------------
  |  Branch (198:24): [True: 26.8M, False: 1.80k]
  ------------------
  199|  26.8M|    PaletteEntry entry;
  200|  26.8M|    for (unsigned long int i = 0; i < entry.columns.size(); i++) {
  ------------------
  |  Branch (200:35): [True: 0, False: 26.8M]
  ------------------
  201|      0|      if (m_bitDepths[i] <= 8) {
  ------------------
  |  Branch (201:11): [True: 0, False: 0]
  ------------------
  202|      0|        entry.columns.push_back(range.read8());
  203|      0|      }
  204|      0|      else {
  205|      0|        entry.columns.push_back(range.read16());
  206|      0|      }
  207|      0|    }
  208|  26.8M|    m_entries.push_back(entry);
  209|  26.8M|  }
  210|       |
  211|  1.80k|  return range.get_error();
  212|  1.81k|}
_ZNK8Box_pclr4dumpER6Indent:
  216|  1.58k|{
  217|  1.58k|  std::ostringstream sstr;
  218|  1.58k|  sstr << Box::dump(indent);
  219|       |
  220|  1.58k|  sstr << indent << "NE: " << m_entries.size();
  221|  1.58k|  sstr << ", NPC: " << (int) get_num_columns();
  222|  1.58k|  sstr << ", B: ";
  223|  4.17k|  for (uint8_t b : m_bitDepths) {
  ------------------
  |  Branch (223:18): [True: 4.17k, False: 1.58k]
  ------------------
  224|  4.17k|    sstr << (int) b << ", ";
  225|  4.17k|  }
  226|       |  // TODO: maybe dump entries too?
  227|  1.58k|  sstr << "\n";
  228|       |
  229|  1.58k|  return sstr.str();
  230|  1.58k|}
_ZN8Box_j2kL5parseER14BitstreamRangePK20heif_security_limits:
  273|    572|{
  274|    572|  uint16_t layer_count = range.read16();
  275|       |
  276|    572|  if (layer_count > range.get_remaining_bytes() / (2+1+2)) {
  ------------------
  |  Branch (276:7): [True: 17, False: 555]
  ------------------
  277|     17|    std::stringstream sstr;
  278|     17|    sstr << "j2kL box wants to define " << layer_count << "JPEG-2000 layers, but the box only contains "
  279|     17|         << range.get_remaining_bytes() / (2 + 1 + 2) << " layers entries";
  280|     17|    return {heif_error_Invalid_input,
  281|     17|            heif_suberror_End_of_data,
  282|     17|            sstr.str()};
  283|     17|  }
  284|       |
  285|    555|  m_layers.resize(layer_count);
  286|       |
  287|   993k|  for (int i = 0; i < layer_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (287:19): [True: 992k, False: 555]
  |  Branch (287:38): [True: 992k, False: 0]
  |  Branch (287:56): [True: 992k, False: 0]
  ------------------
  288|   992k|    Layer layer;
  289|   992k|    layer.layer_id = range.read16();
  290|   992k|    layer.discard_levels = range.read8();
  291|   992k|    layer.decode_layers = range.read16();
  292|   992k|    m_layers[i] = layer;
  293|   992k|  }
  294|       |
  295|    555|  if (range.get_error()) {
  ------------------
  |  Branch (295:7): [True: 5, False: 550]
  ------------------
  296|      5|    m_layers.clear();
  297|      5|  }
  298|       |
  299|    555|  return range.get_error();
  300|    572|}
_ZNK8Box_j2kL4dumpER6Indent:
  303|    464|{
  304|    464|  std::ostringstream sstr;
  305|    464|  sstr << Box::dump(indent);
  306|       |
  307|   992k|  for (const auto& layer : m_layers) {
  ------------------
  |  Branch (307:26): [True: 992k, False: 464]
  ------------------
  308|   992k|    sstr << indent << "layer_id: " << layer.layer_id
  309|   992k|         << ", discard_levels: " << (int) (layer.discard_levels)
  310|   992k|         << ", decode_layers: " << layer.decode_layers << "\n";
  311|   992k|  }
  312|       |
  313|    464|  return sstr.str();
  314|    464|}
_ZN8Box_j2kH5parseER14BitstreamRangePK20heif_security_limits:
  335|  4.78k|{
  336|  4.78k|  return read_children(range, READ_CHILDREN_ALL, limits);
  337|  4.78k|}
_ZNK8Box_j2kH4dumpER6Indent:
  340|  4.27k|{
  341|  4.27k|  std::ostringstream sstr;
  342|  4.27k|  sstr << Box::dump(indent);
  343|       |
  344|  4.27k|  sstr << dump_children(indent);
  345|       |
  346|  4.27k|  return sstr.str();
  347|  4.27k|}

_ZN8Box_j2kHC2Ev:
  314|  4.78k|    Box_j2kH() { set_short_type(fourcc("j2kH")); }
_ZN8Box_cdefC2Ev:
   57|  9.58k|    Box_cdef() { set_short_type(fourcc("cdef")); }
_ZN8Box_cmapC2Ev:
  141|  3.21k|    Box_cmap() { set_short_type(fourcc("cmap")); }
_ZN8Box_pclrC2Ev:
  186|  1.81k|    {
  187|  1.81k|        set_short_type(fourcc("pclr"));
  188|  1.81k|    }
_ZN8Box_j2kLC2Ev:
  269|    573|    Box_j2kL() { set_short_type(fourcc("j2kL")); }
_ZN8Box_j2kiC2Ev:
  527|     66|  {
  528|     66|    set_short_type(fourcc("j2ki"));
  529|     66|  }
_ZNK8Box_pclr15get_num_columnsEv:
  227|  1.58k|    {
  228|  1.58k|        return (uint8_t)(m_bitDepths.size());
  229|  1.58k|    }

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

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

_Z25is_valid_component_formath:
   43|  3.03k|{
   44|  3.03k|  return format <= component_format_max_valid;
   45|  3.03k|}
_Z24is_valid_interleave_modeh:
   62|  1.07k|{
   63|  1.07k|  return interleave <= interleave_mode_max_valid;
   64|  1.07k|}
_Z22is_valid_sampling_modeh:
   83|  1.07k|{
   84|  1.07k|  return sampling <= sampling_mode_max_valid;
   85|  1.07k|}
_Z28is_predefined_component_typet:
   96|  4.88k|{
   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|  4.88k|  return type <= heif_unci_component_type_max_valid;
  ------------------
  |  |   29|  4.88k|#define heif_unci_component_type_max_valid heif_unci_component_type_key_black
  ------------------
  100|  4.88k|}
_ZN8Box_cmpd5parseER14BitstreamRangePK20heif_security_limits:
  144|    810|{
  145|    810|  uint32_t component_count = range.read32();
  146|       |
  147|    810|  if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (147:7): [True: 810, False: 0]
  |  Branch (147:33): [True: 41, False: 769]
  ------------------
  148|     41|    std::stringstream sstr;
  149|     41|    sstr << "cmpd box should contain " << component_count << " components, but security limit is set to "
  150|     41|         << limits->max_components << " components";
  151|       |
  152|     41|    return {heif_error_Invalid_input,
  153|     41|            heif_suberror_Security_limit_exceeded,
  154|     41|            sstr.str()
  155|     41|    };
  156|     41|  }
  157|       |
  158|  8.53k|  for (unsigned int i = 0; i < component_count ; i++) {
  ------------------
  |  Branch (158:28): [True: 7.85k, False: 686]
  ------------------
  159|  7.85k|    if (range.eof()) {
  ------------------
  |  Branch (159:9): [True: 83, False: 7.76k]
  ------------------
  160|     83|      std::stringstream sstr;
  161|     83|      sstr << "cmpd box should contain " << component_count << " components, but box only contained "
  162|     83|           << i << " components";
  163|       |
  164|     83|      return {heif_error_Invalid_input,
  165|     83|              heif_suberror_End_of_data,
  166|     83|              sstr.str()
  167|     83|      };
  168|     83|    }
  169|       |
  170|  7.76k|    Component component;
  171|  7.76k|    component.component_type = range.read16();
  172|  7.76k|    if (component.component_type >= 0x8000) {
  ------------------
  |  Branch (172:9): [True: 1.65k, False: 6.11k]
  ------------------
  173|  1.65k|      component.component_type_uri = range.read_string();
  174|  1.65k|    }
  175|  6.11k|    else {
  176|  6.11k|      component.component_type_uri = std::string();
  177|  6.11k|    }
  178|  7.76k|    m_components.push_back(component);
  179|  7.76k|  }
  180|       |
  181|    686|  return range.get_error();
  182|    769|}
_ZN8Box_cmpd9Component23get_component_type_nameEt:
  185|  4.88k|{
  186|  4.88k|  std::stringstream sstr;
  187|       |
  188|  4.88k|  if (is_predefined_component_type(component_type)) {
  ------------------
  |  Branch (188:7): [True: 1.88k, False: 2.99k]
  ------------------
  189|  1.88k|    sstr << get_name(heif_unci_component_type(component_type), sNames_uncompressed_component_type) << "\n";
  190|  1.88k|  }
  191|  2.99k|  else {
  192|  2.99k|    sstr << "0x" << std::hex << component_type << std::dec << "\n";
  193|  2.99k|  }
  194|       |
  195|  4.88k|  return sstr.str();
  196|  4.88k|}
_ZNK8Box_cmpd4dumpER6Indent:
  207|    615|{
  208|    615|  std::ostringstream sstr;
  209|    615|  sstr << Box::dump(indent);
  210|       |
  211|  4.88k|  for (const auto& component : m_components) {
  ------------------
  |  Branch (211:30): [True: 4.88k, False: 615]
  ------------------
  212|  4.88k|    sstr << indent << "component_type: " << component.get_component_type_name();
  213|       |
  214|  4.88k|    if (component.component_type >= 0x8000) {
  ------------------
  |  Branch (214:9): [True: 898, False: 3.98k]
  ------------------
  215|    898|      sstr << indent << "| component_type_uri: " << component.component_type_uri << "\n";
  216|    898|    }
  217|  4.88k|  }
  218|       |
  219|    615|  return sstr.str();
  220|    615|}
_ZN8Box_uncC5parseER14BitstreamRangePK20heif_security_limits:
  240|  5.57k|{
  241|  5.57k|  parse_full_box_header(range);
  242|       |
  243|  5.57k|  m_profile = range.read32();
  244|       |
  245|  5.57k|  if (get_version() == 1) {
  ------------------
  |  Branch (245:7): [True: 2.01k, False: 3.56k]
  ------------------
  246|  2.01k|    switch (m_profile) {
  247|    312|      case fourcc("rgb3"):
  ------------------
  |  Branch (247:7): [True: 312, False: 1.70k]
  ------------------
  248|    506|      case fourcc("rgba"):
  ------------------
  |  Branch (248:7): [True: 194, False: 1.82k]
  ------------------
  249|  1.01k|      case fourcc("abgr"):
  ------------------
  |  Branch (249:7): [True: 506, False: 1.50k]
  ------------------
  250|  1.20k|      case fourcc("2vuy"):
  ------------------
  |  Branch (250:7): [True: 194, False: 1.82k]
  ------------------
  251|  1.27k|      case fourcc("yuv2"):
  ------------------
  |  Branch (251:7): [True: 66, False: 1.94k]
  ------------------
  252|  1.27k|      case fourcc("yvyu"):
  ------------------
  |  Branch (252:7): [True: 1, False: 2.01k]
  ------------------
  253|  1.27k|      case fourcc("vyuy"):
  ------------------
  |  Branch (253:7): [True: 1, False: 2.01k]
  ------------------
  254|  1.29k|      case fourcc("yuv1"):
  ------------------
  |  Branch (254:7): [True: 19, False: 1.99k]
  ------------------
  255|  1.31k|      case fourcc("v308"):
  ------------------
  |  Branch (255:7): [True: 18, False: 1.99k]
  ------------------
  256|  1.32k|      case fourcc("v408"):
  ------------------
  |  Branch (256:7): [True: 10, False: 2.00k]
  ------------------
  257|  1.32k|      case fourcc("y210"):
  ------------------
  |  Branch (257:7): [True: 3, False: 2.01k]
  ------------------
  258|  1.32k|      case fourcc("v410"):
  ------------------
  |  Branch (258:7): [True: 3, False: 2.01k]
  ------------------
  259|  1.32k|      case fourcc("v210"):
  ------------------
  |  Branch (259:7): [True: 1, False: 2.01k]
  ------------------
  260|  1.34k|      case fourcc("i420"):
  ------------------
  |  Branch (260:7): [True: 18, False: 1.99k]
  ------------------
  261|  1.36k|      case fourcc("nv12"):
  ------------------
  |  Branch (261:7): [True: 18, False: 1.99k]
  ------------------
  262|  1.36k|      case fourcc("nv21"):
  ------------------
  |  Branch (262:7): [True: 1, False: 2.01k]
  ------------------
  263|  1.36k|      case fourcc("yu22"):
  ------------------
  |  Branch (263:7): [True: 1, False: 2.01k]
  ------------------
  264|  1.43k|      case fourcc("yv22"):
  ------------------
  |  Branch (264:7): [True: 66, False: 1.94k]
  ------------------
  265|  1.45k|      case fourcc("yv20"):
  ------------------
  |  Branch (265:7): [True: 18, False: 1.99k]
  ------------------
  266|  1.45k|        break;
  267|    565|      default:
  ------------------
  |  Branch (267:7): [True: 565, False: 1.45k]
  ------------------
  268|    565|        return Error{heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Unknown uncC v1 profile"};
  269|  2.01k|    }
  270|  3.56k|  } else if (get_version() == 0) {
  ------------------
  |  Branch (270:14): [True: 1.11k, False: 2.44k]
  ------------------
  271|       |
  272|  1.11k|    uint32_t component_count = range.read32();
  273|       |
  274|  1.11k|    if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (274:9): [True: 1.11k, False: 0]
  |  Branch (274:35): [True: 24, False: 1.09k]
  ------------------
  275|     24|      std::stringstream sstr;
  276|     24|      sstr << "Number of image components (" << component_count << ") exceeds security limit ("
  277|     24|           << limits->max_components << ")";
  278|       |
  279|     24|      return {heif_error_Invalid_input,
  280|     24|              heif_suberror_Security_limit_exceeded,
  281|     24|              sstr.str()};
  282|     24|    }
  283|       |
  284|  4.11k|    for (uint32_t i = 0; i < component_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (284:26): [True: 3.07k, False: 1.04k]
  |  Branch (284:49): [True: 3.04k, False: 21]
  |  Branch (284:67): [True: 3.03k, False: 10]
  ------------------
  285|  3.03k|      Component component;
  286|  3.03k|      component.component_index = range.read16();
  287|  3.03k|      component.component_bit_depth = uint16_t(range.read8() + 1);
  288|  3.03k|      component.component_format = range.read8();
  289|  3.03k|      component.component_align_size = range.read8();
  290|  3.03k|      m_components.push_back(component);
  291|       |
  292|  3.03k|      if (!is_valid_component_format(component.component_format)) {
  ------------------
  |  Branch (292:11): [True: 16, False: 3.02k]
  ------------------
  293|     16|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid component format"};
  294|     16|      }
  295|  3.03k|    }
  296|       |
  297|  1.07k|    m_sampling_type = range.read8();
  298|  1.07k|    if (!is_valid_sampling_mode(m_sampling_type)) {
  ------------------
  |  Branch (298:9): [True: 1, False: 1.07k]
  ------------------
  299|      1|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid sampling mode"};
  300|      1|    }
  301|       |
  302|  1.07k|    m_interleave_type = range.read8();
  303|  1.07k|    if (!is_valid_interleave_mode(m_interleave_type)) {
  ------------------
  |  Branch (303:9): [True: 1, False: 1.07k]
  ------------------
  304|      1|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid interleave mode"};
  305|      1|    }
  306|       |
  307|  1.07k|    m_block_size = range.read8();
  308|       |
  309|  1.07k|    uint8_t flags = range.read8();
  310|  1.07k|    m_components_little_endian = !!(flags & 0x80);
  311|  1.07k|    m_block_pad_lsb = !!(flags & 0x40);
  312|  1.07k|    m_block_little_endian = !!(flags & 0x20);
  313|  1.07k|    m_block_reversed = !!(flags & 0x10);
  314|  1.07k|    m_pad_unknown = !!(flags & 0x08);
  315|       |
  316|  1.07k|    m_pixel_size = range.read32();
  317|       |
  318|  1.07k|    m_row_align_size = range.read32();
  319|       |
  320|  1.07k|    m_tile_align_size = range.read32();
  321|       |
  322|  1.07k|    uint32_t num_tile_cols_minus_one = range.read32();
  323|  1.07k|    uint32_t num_tile_rows_minus_one = range.read32();
  324|       |
  325|  1.07k|    if (limits->max_number_of_tiles &&
  ------------------
  |  Branch (325:9): [True: 1.07k, False: 0]
  ------------------
  326|  1.07k|        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 (326:9): [True: 2, False: 1.07k]
  ------------------
  327|      2|      std::stringstream sstr;
  328|      2|      sstr << "Tiling size "
  329|      2|           << ((uint64_t)num_tile_cols_minus_one + 1) << " x " << ((uint64_t)num_tile_rows_minus_one + 1)
  330|      2|           << " exceeds the maximum allowed number " << limits->max_number_of_tiles << " set as security limit";
  331|      2|      return {heif_error_Memory_allocation_error,
  332|      2|              heif_suberror_Security_limit_exceeded,
  333|      2|              sstr.str()};
  334|      2|    }
  335|       |
  336|  1.07k|    m_num_tile_cols = num_tile_cols_minus_one + 1;
  337|  1.07k|    m_num_tile_rows = num_tile_rows_minus_one + 1;
  338|  1.07k|  }
  339|       |
  340|  4.96k|  return range.get_error();
  341|  5.57k|}
_ZNK8Box_uncC4dumpER6Indent:
  346|  3.01k|{
  347|  3.01k|  std::ostringstream sstr;
  348|  3.01k|  sstr << Box::dump(indent);
  349|       |
  350|  3.01k|  sstr << indent << "profile: " << m_profile;
  351|  3.01k|  if (m_profile != 0) {
  ------------------
  |  Branch (351:7): [True: 2.49k, False: 520]
  ------------------
  352|  2.49k|    sstr << " (" << fourcc_to_string(m_profile) << ")";
  353|  2.49k|  }
  354|  3.01k|  sstr << "\n";
  355|  3.01k|  if (get_version() == 0) {
  ------------------
  |  Branch (355:7): [True: 847, False: 2.16k]
  ------------------
  356|  1.74k|    for (const auto& component : m_components) {
  ------------------
  |  Branch (356:32): [True: 1.74k, False: 847]
  ------------------
  357|  1.74k|      sstr << indent << "component_index: " << component.component_index << "\n";
  358|  1.74k|      indent++;
  359|  1.74k|      sstr << indent << "component_bit_depth: " << (int) component.component_bit_depth << "\n";
  360|  1.74k|      sstr << indent << "component_format: " << get_name(heif_uncompressed_component_format(component.component_format), sNames_uncompressed_component_format) << "\n";
  361|  1.74k|      sstr << indent << "component_align_size: " << (int) component.component_align_size << "\n";
  362|  1.74k|      indent--;
  363|  1.74k|    }
  364|       |
  365|    847|    sstr << indent << "sampling_type: " << get_name(heif_uncompressed_sampling_mode(m_sampling_type), sNames_uncompressed_sampling_mode) << "\n";
  366|       |
  367|    847|    sstr << indent << "interleave_type: " << get_name(heif_uncompressed_interleave_mode(m_interleave_type), sNames_uncompressed_interleave_mode) << "\n";
  368|       |
  369|    847|    sstr << indent << "block_size: " << (int) m_block_size << "\n";
  370|       |
  371|    847|    sstr << indent << "components_little_endian: " << m_components_little_endian << "\n";
  372|    847|    sstr << indent << "block_pad_lsb: " << m_block_pad_lsb << "\n";
  373|    847|    sstr << indent << "block_little_endian: " << m_block_little_endian << "\n";
  374|    847|    sstr << indent << "block_reversed: " << m_block_reversed << "\n";
  375|    847|    sstr << indent << "pad_unknown: " << m_pad_unknown << "\n";
  376|       |
  377|    847|    sstr << indent << "pixel_size: " << m_pixel_size << "\n";
  378|       |
  379|    847|    sstr << indent << "row_align_size: " << m_row_align_size << "\n";
  380|       |
  381|    847|    sstr << indent << "tile_align_size: " << m_tile_align_size << "\n";
  382|       |
  383|    847|    sstr << indent << "num_tile_cols: " << m_num_tile_cols << "\n";
  384|       |
  385|    847|    sstr << indent << "num_tile_rows: " << m_num_tile_rows << "\n";
  386|    847|  }
  387|  3.01k|  return sstr.str();
  388|  3.01k|}
_ZN8Box_cmpC5parseER14BitstreamRangePK20heif_security_limits:
  718|    705|{
  719|    705|  parse_full_box_header(range);
  720|       |
  721|    705|  if (get_version() != 0) {
  ------------------
  |  Branch (721:7): [True: 6, False: 699]
  ------------------
  722|      6|    return unsupported_version_error("cmpC");
  723|      6|  }
  724|       |
  725|    699|  m_compression_type = range.read32();
  726|       |
  727|    699|  uint8_t unit_type = range.read8();
  728|    699|  if (unit_type > heif_cmpC_compressed_unit_type_image_pixel) {
  ------------------
  |  Branch (728:7): [True: 2, False: 697]
  ------------------
  729|      2|    return {heif_error_Invalid_input,
  730|      2|            heif_suberror_Unsupported_parameter,
  731|      2|            "Unsupported cmpC compressed unit type"};
  732|    697|  };
  733|       |
  734|    697|  m_compressed_unit_type = static_cast<heif_cmpC_compressed_unit_type>(unit_type);
  735|       |
  736|    697|  return range.get_error();
  737|    699|}
_ZNK8Box_cmpC4dumpER6Indent:
  741|    599|{
  742|    599|  std::ostringstream sstr;
  743|    599|  sstr << Box::dump(indent);
  744|    599|  sstr << indent << "compression_type: " << fourcc_to_string(m_compression_type) << "\n";
  745|    599|  sstr << indent << "compressed_entity_type: " << (int)m_compressed_unit_type << "\n";
  746|    599|  return sstr.str();
  747|    599|}
_ZN8Box_icef5parseER14BitstreamRangePK20heif_security_limits:
  766|    805|{
  767|    805|  parse_full_box_header(range);
  768|       |
  769|    805|  if (get_version() != 0) {
  ------------------
  |  Branch (769:7): [True: 3, False: 802]
  ------------------
  770|      3|    return unsupported_version_error("icef");
  771|      3|  }
  772|    802|  uint8_t codes = range.read8();
  773|    802|  uint8_t unit_offset_code = (codes & 0b11100000) >> 5;
  774|    802|  uint8_t unit_size_code = (codes & 0b00011100) >> 2;
  775|    802|  uint32_t num_compressed_units = range.read32();
  776|    802|  uint64_t implied_offset = 0;
  777|       |
  778|    802|  if (unit_offset_code > 4) {
  ------------------
  |  Branch (778:7): [True: 2, False: 800]
  ------------------
  779|      2|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit offset code"};
  780|      2|  }
  781|       |
  782|    800|  if (unit_size_code > 4) {
  ------------------
  |  Branch (782:7): [True: 5, False: 795]
  ------------------
  783|      5|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit size code"};
  784|      5|  }
  785|       |
  786|       |  // --- precompute fields lengths
  787|       |
  788|    795|  uint8_t unit_offset_bits = unit_offset_bits_table[unit_offset_code];
  789|    795|  uint8_t unit_size_bits = unit_size_bits_table[unit_size_code];
  790|       |
  791|       |  // --- check if box is large enough for all the data
  792|       |
  793|    795|  uint64_t data_size_bytes = static_cast<uint64_t>(num_compressed_units) * (unit_offset_bits + unit_size_bits) / 8;
  794|    795|  if (data_size_bytes > range.get_remaining_bytes()) {
  ------------------
  |  Branch (794:7): [True: 15, False: 780]
  ------------------
  795|     15|    uint64_t contained_units = range.get_remaining_bytes() / ((unit_offset_bits + unit_size_bits) * 8);
  796|     15|    std::stringstream sstr;
  797|     15|    sstr << "icef box declares " << num_compressed_units << " units, but only " << contained_units
  798|     15|         << " were contained in the file";
  799|     15|    return {heif_error_Invalid_input,
  800|     15|            heif_suberror_End_of_data,
  801|     15|            sstr.str()};
  802|     15|  }
  803|       |
  804|       |  // TODO: should we impose some security limit?
  805|       |
  806|       |  // --- read box content
  807|       |
  808|    780|  m_unit_infos.resize(num_compressed_units);
  809|       |
  810|  1.40M|  for (uint32_t r = 0; r < num_compressed_units; r++) {
  ------------------
  |  Branch (810:24): [True: 1.40M, False: 777]
  ------------------
  811|  1.40M|    struct CompressedUnitInfo unitInfo;
  812|  1.40M|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (812:9): [True: 1.40M, False: 411]
  ------------------
  813|  1.40M|      unitInfo.unit_offset = implied_offset;
  814|  1.40M|    } else {
  815|    411|      unitInfo.unit_offset = range.read_uint(unit_offset_bits);
  816|    411|    }
  817|       |
  818|  1.40M|    unitInfo.unit_size = range.read_uint(unit_size_bits);
  819|       |
  820|  1.40M|    if (unitInfo.unit_size >= UINT64_MAX - implied_offset) {
  ------------------
  |  Branch (820:9): [True: 3, False: 1.40M]
  ------------------
  821|      3|      return {heif_error_Invalid_input,
  822|      3|              heif_suberror_Invalid_parameter_value,
  823|      3|              "cumulative offsets too large for 64 bit file size"};
  824|      3|    }
  825|       |
  826|  1.40M|    implied_offset += unitInfo.unit_size;
  827|       |
  828|  1.40M|    if (range.get_error() != Error::Ok) {
  ------------------
  |  Branch (828:9): [True: 0, False: 1.40M]
  ------------------
  829|      0|      return range.get_error();
  830|      0|    }
  831|       |
  832|  1.40M|    m_unit_infos[r] = unitInfo;
  833|  1.40M|  }
  834|       |
  835|    777|  return range.get_error();
  836|    780|}
_ZNK8Box_icef4dumpER6Indent:
  840|    771|{
  841|    771|  std::ostringstream sstr;
  842|    771|  sstr << Box::dump(indent);
  843|    771|  sstr << indent << "num_compressed_units: " << m_unit_infos.size() << "\n";
  844|  1.40M|  for (CompressedUnitInfo unit_info: m_unit_infos) {
  ------------------
  |  Branch (844:36): [True: 1.40M, False: 771]
  ------------------
  845|  1.40M|    sstr << indent << "unit_offset: " << unit_info.unit_offset << ", unit_size: " << unit_info.unit_size << "\n";
  846|  1.40M|  }
  847|    771|  return sstr.str();
  848|    771|}
_ZN8Box_cpat5parseER14BitstreamRangePK20heif_security_limits:
  965|    724|{
  966|    724|  parse_full_box_header(range);
  967|       |
  968|    724|  if (get_version() != 0) {
  ------------------
  |  Branch (968:7): [True: 1, False: 723]
  ------------------
  969|      1|    return unsupported_version_error("cpat");
  970|      1|  }
  971|       |
  972|    723|  m_pattern.pattern_width = range.read16();
  973|    723|  m_pattern.pattern_height = range.read16();
  974|       |
  975|    723|  if (m_pattern.pattern_width == 0 || m_pattern.pattern_height == 0) {
  ------------------
  |  Branch (975:7): [True: 4, False: 719]
  |  Branch (975:39): [True: 13, False: 706]
  ------------------
  976|     17|    return {heif_error_Invalid_input,
  977|     17|            heif_suberror_Invalid_parameter_value,
  978|     17|            "Zero Bayer pattern size."};
  979|     17|  }
  980|       |
  981|    706|  auto max_bayer_pattern_size = limits->max_bayer_pattern_pixels;
  982|    706|  if (max_bayer_pattern_size && m_pattern.pattern_height > max_bayer_pattern_size / m_pattern.pattern_width) {
  ------------------
  |  Branch (982:7): [True: 706, False: 0]
  |  Branch (982:33): [True: 11, False: 695]
  ------------------
  983|     11|    return {heif_error_Invalid_input,
  984|     11|            heif_suberror_Security_limit_exceeded,
  985|     11|            "Maximum Bayer pattern size exceeded."};
  986|     11|  }
  987|       |
  988|    695|  size_t num_pixels = size_t{m_pattern.pattern_width} * m_pattern.pattern_height;
  989|    695|  m_pattern.pixels.resize(num_pixels);
  990|       |
  991|  5.62k|  for (size_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (991:22): [True: 4.92k, False: 695]
  ------------------
  992|  4.92k|    BayerPatternPixelCmpd pixel{};
  993|  4.92k|    pixel.cmpd_index = range.read32();
  994|  4.92k|    pixel.component_gain = range.read_float32();
  995|  4.92k|    m_pattern.pixels[i] = pixel;
  996|  4.92k|  }
  997|       |
  998|    695|  return range.get_error();
  999|    706|}
_ZNK8Box_cpat4dumpER6Indent:
 1003|    530|{
 1004|    530|  std::ostringstream sstr;
 1005|       |
 1006|    530|  sstr << FullBox::dump(indent);
 1007|    530|  sstr << indent << "pattern_width: " << get_pattern_width() << "\n";
 1008|    530|  sstr << indent << "pattern_height: " << get_pattern_height() << "\n";
 1009|       |
 1010|  2.56k|  for (const auto& pixel : m_pattern.pixels) {
  ------------------
  |  Branch (1010:26): [True: 2.56k, False: 530]
  ------------------
 1011|  2.56k|    sstr << indent << "component index: " << pixel.cmpd_index << ", gain: " << pixel.component_gain << "\n";
 1012|  2.56k|  }
 1013|    530|  return sstr.str();
 1014|    530|}
_Z8get_nameI24heif_unci_component_typeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|  1.88k|{
  124|  1.88k|  auto iter = table.find(val);
  125|  1.88k|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 1.88k]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|  1.88k|  else {
  129|  1.88k|    return iter->second;
  130|  1.88k|  }
  131|  1.88k|}
_Z8get_nameI34heif_uncompressed_component_formatEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|  1.74k|{
  124|  1.74k|  auto iter = table.find(val);
  125|  1.74k|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 1.74k]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|  1.74k|  else {
  129|  1.74k|    return iter->second;
  130|  1.74k|  }
  131|  1.74k|}
_Z8get_nameI31heif_uncompressed_sampling_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|    847|{
  124|    847|  auto iter = table.find(val);
  125|    847|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 847]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    847|  else {
  129|    847|    return iter->second;
  130|    847|  }
  131|    847|}
_Z8get_nameI33heif_uncompressed_interleave_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|    847|{
  124|    847|  auto iter = table.find(val);
  125|    847|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 847]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    847|  else {
  129|    847|    return iter->second;
  130|    847|  }
  131|    847|}

_ZN8Box_cmpdC2Ev:
   45|    811|  {
   46|    811|    set_short_type(fourcc("cmpd"));
   47|    811|  }
_ZN8Box_uncCC2Ev:
   90|  5.57k|  Box_uncC() {
   91|  5.57k|    set_short_type(fourcc("uncC"));
   92|  5.57k|  }
_ZN8Box_cmpCC2Ev:
  270|    707|  {
  271|    707|    set_short_type(fourcc("cmpC"));
  272|    707|  }
_ZN8Box_icefC2Ev:
  304|    810|  {
  305|    810|    set_short_type(fourcc("icef"));
  306|    810|  }
_ZN8Box_cpatC2Ev:
  358|    730|  {
  359|    730|    set_short_type(fourcc("cpat"));
  360|    730|  }
_ZN8Box_uncvC2Ev:
  497|  1.16k|  {
  498|  1.16k|    set_short_type(fourcc("uncv"));
  499|  1.16k|  }
_ZNK8Box_cmpd9Component23get_component_type_nameEv:
   60|  4.88k|    std::string get_component_type_name() const { return get_component_type_name(component_type); }
_ZNK8Box_cpat17get_pattern_widthEv:
  362|    530|  uint16_t get_pattern_width() const { return m_pattern.pattern_width; }
_ZNK8Box_cpat18get_pattern_heightEv:
  364|    530|  uint16_t get_pattern_height() const { return m_pattern.pattern_height; }

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

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

_Z16fourcc_to_stringj:
  152|   940k|{
  153|   940k|  std::string str("    ");
  154|   940k|  str[0] = static_cast<char>((code >> 24) & 0xFF);
  155|   940k|  str[1] = static_cast<char>((code >> 16) & 0xFF);
  156|   940k|  str[2] = static_cast<char>((code >> 8) & 0xFF);
  157|   940k|  str[3] = static_cast<char>((code >> 0) & 0xFF);
  158|       |
  159|   940k|  return str;
  160|   940k|}

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

_ZN11HeifContextC2Ev:
  148|  14.7k|    : m_memory_tracker(&m_limits)
  149|  14.7k|{
  150|  14.7k|  const char* security_limits_variable = getenv("LIBHEIF_SECURITY_LIMITS");
  151|       |
  152|  14.7k|  if (security_limits_variable && (strcmp(security_limits_variable, "off") == 0 ||
  ------------------
  |  Branch (152:7): [True: 0, False: 14.7k]
  |  Branch (152:36): [True: 0, False: 0]
  ------------------
  153|      0|                                   strcmp(security_limits_variable, "OFF") == 0)) {
  ------------------
  |  Branch (153:36): [True: 0, False: 0]
  ------------------
  154|      0|    m_limits = disabled_security_limits;
  155|      0|  }
  156|  14.7k|  else {
  157|  14.7k|    m_limits = global_security_limits;
  158|  14.7k|  }
  159|       |
  160|  14.7k|  reset_to_empty_heif();
  161|  14.7k|}
_ZN11HeifContextD2Ev:
  165|  14.7k|{
  166|       |  // Break circular references between Images (when a faulty input image has circular image references)
  167|  14.7k|  for (auto& it : m_all_images) {
  ------------------
  |  Branch (167:17): [True: 0, False: 14.7k]
  ------------------
  168|      0|    std::shared_ptr<ImageItem> image = it.second;
  169|      0|    image->clear();
  170|      0|  }
  171|  14.7k|}
_ZN11HeifContext19reset_to_empty_heifEv:
  275|  14.7k|{
  276|  14.7k|  m_heif_file = std::make_shared<HeifFile>();
  277|  14.7k|  m_heif_file->set_security_limits(&m_limits);
  278|  14.7k|  m_heif_file->new_empty_file();
  279|       |
  280|  14.7k|  m_all_images.clear();
  281|  14.7k|  m_top_level_images.clear();
  282|  14.7k|  m_primary_image.reset();
  283|  14.7k|}

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

_ZN5ErrorC2Ev:
   46|  45.7k|Error::Error() = default;
_ZN5ErrorC2E15heif_error_code18heif_suberror_codeRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   52|  41.8k|    : error_code(c),
   53|  41.8k|      sub_error_code(sc),
   54|  41.8k|      message(msg)
   55|  41.8k|{
   56|  41.8k|}

_ZNK5ErrorneERKS_:
   95|  1.87M|  bool operator!=(const Error& other) const { return !(*this == other); }
_ZNK5ErroreqERKS_:
   93|  2.31M|  bool operator==(const Error& other) const { return error_code == other.error_code; }
_ZNK5ErrorcvbEv:
  106|   594k|  operator bool() const { return error_code != heif_error_Ok; }
_ZN11ErrorBufferC2Ev:
   47|  14.7k|  ErrorBuffer() = default;

_ZN8HeifFileC2Ev:
   68|  14.7k|{
   69|  14.7k|  m_file_layout = std::make_shared<FileLayout>();
   70|  14.7k|}
_ZN8HeifFileD2Ev:
   72|  14.7k|HeifFile::~HeifFile() = default;
_ZN8HeifFile14new_empty_fileEv:
  162|  14.7k|{
  163|       |  //m_input_stream.reset();
  164|  14.7k|  m_top_level_boxes.clear();
  165|       |
  166|  14.7k|  m_ftyp_box = std::make_shared<Box_ftyp>();
  167|  14.7k|  m_top_level_boxes.push_back(m_ftyp_box);
  168|  14.7k|}

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

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

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

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

_ZN8Box_tilC32init_heif_tiled_image_parametersER27heif_tiled_image_parameters:
  101|  1.25k|{
  102|  1.25k|  params.version = 1;
  103|       |
  104|  1.25k|  params.image_width = 0;
  105|  1.25k|  params.image_height = 0;
  106|  1.25k|  params.tile_width = 0;
  107|  1.25k|  params.tile_height = 0;
  108|  1.25k|  params.compression_format_fourcc = 0;
  109|  1.25k|  params.offset_field_length = 40;
  110|  1.25k|  params.size_field_length = 24;
  111|  1.25k|  params.number_of_extra_dimensions = 0;
  112|       |
  113|  10.0k|  for (uint32_t& dim : params.extra_dimensions) {
  ------------------
  |  Branch (113:22): [True: 10.0k, False: 1.25k]
  ------------------
  114|  10.0k|    dim = 0;
  115|  10.0k|  }
  116|       |
  117|  1.25k|  params.tiles_are_sequential = false;
  118|  1.25k|}
_ZNK8Box_tilC4dumpER6Indent:
  208|    814|{
  209|    814|  std::ostringstream sstr;
  210|       |
  211|    814|  sstr << BoxHeader::dump(indent);
  212|       |
  213|    814|  sstr << indent << "version: " << ((int) get_version()) << "\n"
  214|       |       //<< indent << "image size: " << m_parameters.image_width << "x" << m_parameters.image_height << "\n"
  215|    814|       << indent << "tile size: " << m_parameters.tile_width << "x" << m_parameters.tile_height << "\n"
  216|    814|       << indent << "compression: " << fourcc_to_string(m_parameters.compression_format_fourcc) << "\n"
  217|    814|       << indent << "tiles are sequential: " << (m_parameters.tiles_are_sequential ? "yes" : "no") << "\n"
  ------------------
  |  Branch (217:50): [True: 40, False: 774]
  ------------------
  218|    814|       << indent << "offset field length: " << ((int) m_parameters.offset_field_length) << " bits\n"
  219|    814|       << indent << "size field length: " << ((int) m_parameters.size_field_length) << " bits\n"
  220|    814|       << indent << "number of extra dimensions: " << ((int) m_parameters.number_of_extra_dimensions) << "\n";
  221|       |
  222|    814|  sstr << indent << "tile properties:\n"
  223|    814|       << dump_children(indent, true);
  224|       |
  225|    814|  return sstr.str();
  226|       |
  227|    814|}
_ZN8Box_tilC5parseER14BitstreamRangePK20heif_security_limits:
  231|  1.25k|{
  232|  1.25k|  parse_full_box_header(range);
  233|       |
  234|       |  // Note: actually, we should allow 0 only, but there are a few images around that use version 1.
  235|  1.25k|  if (get_version() > 1) {
  ------------------
  |  Branch (235:7): [True: 6, False: 1.24k]
  ------------------
  236|      6|    std::stringstream sstr;
  237|      6|    sstr << "'tili' image version " << ((int) get_version()) << " is not implemented yet";
  238|       |
  239|      6|    return {heif_error_Unsupported_feature,
  240|      6|            heif_suberror_Unsupported_data_version,
  241|      6|            sstr.str()};
  242|      6|  }
  243|       |
  244|  1.24k|  m_parameters.version = get_version();
  245|       |
  246|  1.24k|  uint32_t flags = get_flags();
  247|       |
  248|  1.24k|  switch (flags & 0x03) {
  ------------------
  |  Branch (248:11): [True: 1.24k, False: 0]
  ------------------
  249|    758|    case 0:
  ------------------
  |  Branch (249:5): [True: 758, False: 488]
  ------------------
  250|    758|      m_parameters.offset_field_length = 32;
  251|    758|      break;
  252|     69|    case 1:
  ------------------
  |  Branch (252:5): [True: 69, False: 1.17k]
  ------------------
  253|     69|      m_parameters.offset_field_length = 40;
  254|     69|      break;
  255|    192|    case 2:
  ------------------
  |  Branch (255:5): [True: 192, False: 1.05k]
  ------------------
  256|    192|      m_parameters.offset_field_length = 48;
  257|    192|      break;
  258|    227|    case 3:
  ------------------
  |  Branch (258:5): [True: 227, False: 1.01k]
  ------------------
  259|    227|      m_parameters.offset_field_length = 64;
  260|    227|      break;
  261|  1.24k|  }
  262|       |
  263|  1.24k|  switch (flags & 0x0c) {
  ------------------
  |  Branch (263:11): [True: 1.24k, False: 0]
  ------------------
  264|    471|    case 0x00:
  ------------------
  |  Branch (264:5): [True: 471, False: 775]
  ------------------
  265|    471|      m_parameters.size_field_length = 0;
  266|    471|      break;
  267|     97|    case 0x04:
  ------------------
  |  Branch (267:5): [True: 97, False: 1.14k]
  ------------------
  268|     97|      m_parameters.size_field_length = 24;
  269|     97|      break;
  270|    505|    case 0x08:
  ------------------
  |  Branch (270:5): [True: 505, False: 741]
  ------------------
  271|    505|      m_parameters.size_field_length = 32;
  272|    505|      break;
  273|    173|    case 0x0c:
  ------------------
  |  Branch (273:5): [True: 173, False: 1.07k]
  ------------------
  274|    173|      m_parameters.size_field_length = 64;
  275|    173|      break;
  276|  1.24k|  }
  277|       |
  278|  1.24k|  m_parameters.tiles_are_sequential = !!(flags & 0x10);
  279|       |
  280|       |
  281|  1.24k|  m_parameters.tile_width = range.read32();
  282|  1.24k|  m_parameters.tile_height = range.read32();
  283|  1.24k|  m_parameters.compression_format_fourcc = range.read32();
  284|       |
  285|  1.24k|  if (m_parameters.tile_width == 0 || m_parameters.tile_height == 0) {
  ------------------
  |  Branch (285:7): [True: 6, False: 1.24k]
  |  Branch (285:39): [True: 46, False: 1.19k]
  ------------------
  286|     52|    return {heif_error_Invalid_input,
  287|     52|            heif_suberror_Unspecified,
  288|     52|            "Tile with zero width or height."};
  289|     52|  }
  290|       |
  291|       |
  292|       |  // --- extra dimensions
  293|       |
  294|  1.19k|  m_parameters.number_of_extra_dimensions = range.read8();
  295|       |
  296|  1.92k|  for (int i = 0; i < m_parameters.number_of_extra_dimensions; i++) {
  ------------------
  |  Branch (296:19): [True: 781, False: 1.14k]
  ------------------
  297|    781|    uint32_t size = range.read32();
  298|       |
  299|    781|    if (size == 0) {
  ------------------
  |  Branch (299:9): [True: 50, False: 731]
  ------------------
  300|     50|      return {heif_error_Invalid_input,
  301|     50|              heif_suberror_Unspecified,
  302|     50|              "'tili' extra dimension may not be zero."};
  303|     50|    }
  304|       |
  305|    731|    if (i < 8) {
  ------------------
  |  Branch (305:9): [True: 393, False: 338]
  ------------------
  306|    393|      m_parameters.extra_dimensions[i] = size;
  307|    393|    }
  308|    338|    else {
  309|       |      // TODO: error: too many dimensions (not supported)
  310|    338|    }
  311|    731|  }
  312|       |
  313|       |  // --- read tile properties
  314|       |
  315|       |  // Check version for backwards compatibility with old format.
  316|       |  // TODO: remove when spec is final and old test images have been converted
  317|  1.14k|  if (get_version() == 0) {
  ------------------
  |  Branch (317:7): [True: 304, False: 840]
  ------------------
  318|    304|    uint8_t num_properties = range.read8();
  319|       |
  320|    304|    Error error = read_children(range, num_properties, limits);
  321|    304|    if (error) {
  ------------------
  |  Branch (321:9): [True: 97, False: 207]
  ------------------
  322|     97|      return error;
  323|     97|    }
  324|    304|  }
  325|       |
  326|  1.04k|  return range.get_error();
  327|  1.14k|}

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

_ZNK6Indent10get_stringEv:
   27|  27.4M|{
   28|  27.4M|  std::stringstream sstr;
   29|       |
   30|   188M|  for (int i = 0; i < get_indent(); i++) {
  ------------------
  |  Branch (30:19): [True: 161M, False: 27.4M]
  ------------------
   31|   161M|    sstr << "| ";
   32|   161M|  }
   33|       |
   34|  27.4M|  return sstr.str();
   35|  27.4M|}
_Z21write_raw_data_as_hexPKhmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   41|   100k|{
   42|   100k|  std::stringstream sstr;
   43|       |
   44|   100k|  sstr << std::hex << std::setfill('0');
   45|       |
   46|  9.30M|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (46:22): [True: 9.20M, False: 100k]
  ------------------
   47|  9.20M|    if (i % 16 == 0) {
  ------------------
  |  Branch (47:9): [True: 612k, False: 8.58M]
  ------------------
   48|       |      // start of line
   49|       |
   50|   612k|      if (i == 0) {
  ------------------
  |  Branch (50:11): [True: 70.4k, False: 542k]
  ------------------
   51|  70.4k|        sstr << firstLineIndent;
   52|  70.4k|      }
   53|   542k|      else {
   54|   542k|        sstr << remainingLinesIndent;
   55|   542k|      }
   56|   612k|      sstr << std::setw(4) << i << ": "; // address
   57|   612k|    }
   58|  8.58M|    else if (i % 16 == 8) {
  ------------------
  |  Branch (58:14): [True: 562k, False: 8.02M]
  ------------------
   59|       |      // space in middle
   60|   562k|      sstr << "  ";
   61|   562k|    }
   62|  8.02M|    else {
   63|       |      // space between bytes
   64|  8.02M|      sstr << " ";
   65|  8.02M|    }
   66|       |
   67|  9.20M|    sstr << std::setw(2) << ((int) data[i]);
   68|       |
   69|  9.20M|    if (i % 16 == 15 || i == len - 1) {
  ------------------
  |  Branch (69:9): [True: 547k, False: 8.65M]
  |  Branch (69:25): [True: 65.2k, False: 8.58M]
  ------------------
   70|   612k|      sstr << "\n";
   71|   612k|    }
   72|  9.20M|  }
   73|       |
   74|   100k|  return sstr.str();
   75|   100k|}

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

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

_ZN17color_profile_rawC2EjRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  105|  9.38k|      : m_type(type), m_data(data) {}
_ZNK17color_profile_raw8get_typeEv:
  107|  7.20k|  uint32_t get_type() const override { return m_type; }
_ZN18color_profile_nclxC2Ev:
  173|    679|  color_profile_nclx() { m_profile.set_sRGB_defaults(); }
_ZNK18color_profile_nclx8get_typeEv:
  182|    620|  uint32_t get_type() const override { return fourcc("nclx"); }
_ZN8Box_colrC2Ev:
  203|  10.1k|  {
  204|  10.1k|    set_short_type(fourcc("colr"));
  205|  10.1k|  }
_ZNK8Box_colr22get_color_profile_typeEv:
  209|  7.82k|  uint32_t get_color_profile_type() const { return m_color_profile->get_type(); }
_ZN13color_profileD2Ev:
   92|  10.0k|  virtual ~color_profile() = default;

_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:
  435|      2|{
  436|      2|  return &decoder_aom;
  437|      2|}
decoder_aom.cc:_ZL15aom_init_pluginv:
   88|      2|{
   89|      2|}

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

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

_Z27get_decoder_plugin_libde265v:
  502|      2|{
  503|      2|  return &decoder_libde265;
  504|      2|}
decoder_libde265.cc:_ZL20libde265_init_pluginv:
   66|      2|{
   67|      2|  de265_init();
   68|      2|}

_Z27get_decoder_plugin_openh264v:
  466|      2|{
  467|      2|  return &decoder_openh264;
  468|      2|}
decoder_openh264.cc:_ZL20openh264_init_pluginv:
   95|      2|{
   96|      2|}

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

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

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

_Z22get_encoder_plugin_aomv:
 1452|      2|{
 1453|      2|  return &encoder_plugin_aom;
 1454|      2|}
encoder_aom.cc:_ZL15aom_init_pluginv:
  416|      2|{
  417|      2|  aom_init_parameters();
  418|      2|}
encoder_aom.cc:_ZL19aom_init_parametersv:
  230|      2|{
  231|      2|  heif_encoder_parameter* p = aom_encoder_params;
  232|      2|  const heif_encoder_parameter** d = aom_encoder_parameter_ptrs;
  233|      2|  int i = 0;
  234|       |
  235|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (235:3): [True: 2, False: 0]
  ------------------
  236|      2|  p->version = 2;
  237|      2|  p->name = kParam_realtime;
  238|      2|  p->type = heif_encoder_parameter_type_boolean;
  239|      2|  p->boolean.default_value = false;
  240|      2|  p->has_default = true;
  241|      2|  d[i++] = p++;
  242|       |
  243|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (243:3): [True: 2, False: 0]
  ------------------
  244|      2|  p->version = 2;
  245|      2|  p->name = kParam_speed;
  246|      2|  p->type = heif_encoder_parameter_type_integer;
  247|      2|  p->integer.default_value = 6;
  248|      2|  p->has_default = true;
  249|      2|  p->integer.have_minimum_maximum = true;
  250|      2|  p->integer.minimum = 0;
  251|      2|  if (aom_codec_version_major() >= 3) {
  ------------------
  |  Branch (251:7): [True: 2, False: 0]
  ------------------
  252|      2|    p->integer.maximum = 9;
  253|      2|  }
  254|      0|  else {
  255|      0|    p->integer.maximum = 8;
  256|      0|  }
  257|      2|  p->integer.valid_values = NULL;
  258|      2|  p->integer.num_valid_values = 0;
  259|      2|  d[i++] = p++;
  260|       |
  261|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (261:3): [True: 2, False: 0]
  ------------------
  262|      2|  p->version = 2;
  263|      2|  p->name = kParam_threads;
  264|      2|  p->type = heif_encoder_parameter_type_integer;
  265|      2|  p->has_default = true;
  266|      2|  p->integer.have_minimum_maximum = true;
  267|      2|  p->integer.minimum = 1;
  268|      2|  p->integer.maximum = 64;
  269|      2|  int threads = static_cast<int>(std::thread::hardware_concurrency());
  270|      2|  if (threads == 0) {
  ------------------
  |  Branch (270:7): [True: 0, False: 2]
  ------------------
  271|       |    // Could not autodetect, use previous default value.
  272|      0|    threads = 4;
  273|      0|  }
  274|      2|  threads = std::min(threads, p->integer.maximum);
  275|      2|  p->integer.default_value = threads;
  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 = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  283|      2|  p->type = heif_encoder_parameter_type_integer;
  284|      2|  p->integer.default_value = 50;
  285|      2|  p->has_default = true;
  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 = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  296|      2|  p->type = heif_encoder_parameter_type_boolean;
  297|      2|  p->boolean.default_value = false;
  298|      2|  p->has_default = true;
  299|      2|  d[i++] = p++;
  300|       |
  301|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (301:3): [True: 2, False: 0]
  ------------------
  302|      2|  p->version = 2;
  303|      2|  p->name = kParam_chroma;
  304|      2|  p->type = heif_encoder_parameter_type_string;
  305|      2|  p->string.default_value = "420";
  306|      2|  p->has_default = true;
  307|      2|  p->string.valid_values = kParam_chroma_valid_values;
  308|      2|  d[i++] = p++;
  309|       |
  310|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (310:3): [True: 2, False: 0]
  ------------------
  311|      2|  p->version = 2;
  312|      2|  p->name = kParam_tune;
  313|      2|  p->type = heif_encoder_parameter_type_string;
  314|      2|  p->string.default_value = "auto";
  315|      2|  p->has_default = true;
  316|      2|  p->string.valid_values = kParam_tune_valid_values;
  317|      2|  d[i++] = p++;
  318|       |
  319|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (319:3): [True: 2, False: 0]
  ------------------
  320|      2|  p->version = 2;
  321|      2|  p->name = kParam_min_q;
  322|      2|  p->type = heif_encoder_parameter_type_integer;
  323|      2|  p->integer.default_value = 0;
  324|      2|  p->has_default = true;
  325|      2|  p->integer.have_minimum_maximum = true;
  326|      2|  p->integer.minimum = 0;
  327|      2|  p->integer.maximum = 63;
  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 = kParam_max_q;
  335|      2|  p->type = heif_encoder_parameter_type_integer;
  336|      2|  p->integer.default_value = 63;
  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 = 63;
  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 = kParam_alpha_quality;
  348|      2|  p->type = heif_encoder_parameter_type_integer;
  349|      2|  p->has_default = false;
  350|      2|  p->integer.have_minimum_maximum = true;
  351|      2|  p->integer.minimum = 0;
  352|      2|  p->integer.maximum = 100;
  353|      2|  p->integer.valid_values = NULL;
  354|      2|  p->integer.num_valid_values = 0;
  355|      2|  d[i++] = p++;
  356|       |
  357|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (357:3): [True: 2, False: 0]
  ------------------
  358|      2|  p->version = 2;
  359|      2|  p->name = kParam_alpha_min_q;
  360|      2|  p->type = heif_encoder_parameter_type_integer;
  361|      2|  p->has_default = false;
  362|      2|  p->integer.have_minimum_maximum = true;
  363|      2|  p->integer.minimum = 0;
  364|      2|  p->integer.maximum = 63;
  365|      2|  p->integer.valid_values = NULL;
  366|      2|  p->integer.num_valid_values = 0;
  367|      2|  d[i++] = p++;
  368|       |
  369|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (369:3): [True: 2, False: 0]
  ------------------
  370|      2|  p->version = 2;
  371|      2|  p->name = kParam_alpha_max_q;
  372|      2|  p->type = heif_encoder_parameter_type_integer;
  373|      2|  p->has_default = false;
  374|      2|  p->integer.have_minimum_maximum = true;
  375|      2|  p->integer.minimum = 0;
  376|      2|  p->integer.maximum = 63;
  377|      2|  p->integer.valid_values = NULL;
  378|      2|  p->integer.num_valid_values = 0;
  379|      2|  d[i++] = p++;
  380|       |
  381|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (381:3): [True: 2, False: 0]
  ------------------
  382|      2|  p->version = 2;
  383|      2|  p->name = kParam_lossless_alpha;
  384|      2|  p->type = heif_encoder_parameter_type_boolean;
  385|      2|  p->boolean.default_value = false;
  386|      2|  p->has_default = true;
  387|      2|  d[i++] = p++;
  388|       |
  389|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (389:3): [True: 2, False: 0]
  ------------------
  390|      2|  p->version = 2;
  391|      2|  p->name = kParam_auto_tiles;
  392|      2|  p->type = heif_encoder_parameter_type_boolean;
  393|      2|  p->boolean.default_value = false;
  394|      2|  p->has_default = true;
  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_enable_intra_block_copy;
  400|      2|  p->type = heif_encoder_parameter_type_boolean;
  401|      2|  p->boolean.default_value = true;
  402|      2|  p->has_default = true;
  403|      2|  d[i++] = p++;
  404|       |
  405|      2|  assert(i < MAX_NPARAMETERS + 1);
  ------------------
  |  Branch (405:3): [True: 2, False: 0]
  ------------------
  406|      2|  d[i++] = nullptr;
  407|      2|}

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

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

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

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

_Z22get_encoder_plugin_svtv:
 1277|      2|{
 1278|      2|  return &encoder_plugin_svt;
 1279|      2|}
encoder_svt.cc:_ZL15svt_init_pluginv:
  324|      2|{
  325|      2|  svt_init_parameters();
  326|      2|}
encoder_svt.cc:_ZL19svt_init_parametersv:
  176|      2|{
  177|      2|  heif_encoder_parameter* p = svt_encoder_params;
  178|      2|  const heif_encoder_parameter** d = svt_encoder_parameter_ptrs;
  179|      2|  int i = 0;
  180|       |
  181|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (181:3): [True: 2, False: 0]
  ------------------
  182|      2|  p->version = 2;
  183|      2|  p->name = kParam_speed;
  184|      2|  p->type = heif_encoder_parameter_type_integer;
  185|      2|  p->integer.default_value = 12;
  186|      2|  p->has_default = true;
  187|      2|  p->integer.have_minimum_maximum = true;
  188|      2|  p->integer.minimum = 0;
  189|      2|  p->integer.maximum = 13;
  190|      2|  p->integer.valid_values = nullptr;
  191|      2|  p->integer.num_valid_values = 0;
  192|      2|  d[i++] = p++;
  193|       |
  194|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (194:3): [True: 2, False: 0]
  ------------------
  195|      2|  p->version = 2;
  196|      2|  p->name = kParam_threads;
  197|      2|  p->type = heif_encoder_parameter_type_integer;
  198|      2|  p->integer.default_value = 4;
  199|      2|  p->has_default = true;
  200|      2|  p->integer.have_minimum_maximum = true;
  201|      2|  p->integer.minimum = 1;
  202|      2|  p->integer.maximum = 16;
  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 = "tile-rows";
  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 = false;
  214|      2|  p->integer.valid_values = valid_tile_num_values;
  215|      2|  p->integer.num_valid_values = 7;
  216|      2|  d[i++] = p++;
  217|       |
  218|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (218:3): [True: 2, False: 0]
  ------------------
  219|      2|  p->version = 2;
  220|      2|  p->name = "tile-cols";
  221|      2|  p->type = heif_encoder_parameter_type_integer;
  222|      2|  p->integer.default_value = 4;
  223|      2|  p->has_default = true;
  224|      2|  p->integer.have_minimum_maximum = false;
  225|      2|  p->integer.valid_values = valid_tile_num_values;
  226|      2|  p->integer.num_valid_values = 7;
  227|      2|  d[i++] = p++;
  228|       |
  229|       |
  230|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (230:3): [True: 2, False: 0]
  ------------------
  231|      2|  p->version = 2;
  232|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  233|      2|  p->type = heif_encoder_parameter_type_integer;
  234|      2|  p->integer.default_value = 50;
  235|      2|  p->has_default = true;
  236|      2|  p->integer.have_minimum_maximum = true;
  237|      2|  p->integer.minimum = 0;
  238|      2|  p->integer.maximum = 100;
  239|      2|  p->integer.valid_values = NULL;
  240|      2|  p->integer.num_valid_values = 0;
  241|      2|  d[i++] = p++;
  242|       |
  243|      2|#if SVT_AV1_CHECK_VERSION(3, 0, 0)
  244|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (244:3): [True: 2, False: 0]
  ------------------
  245|      2|  p->version = 2;
  246|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  247|      2|  p->type = heif_encoder_parameter_type_boolean;
  248|      2|  p->boolean.default_value = false;
  249|      2|  p->has_default = true;
  250|      2|  d[i++] = p++;
  251|      2|#endif
  252|       |
  253|       |#if 0
  254|       |  assert(i < MAX_NPARAMETERS);
  255|       |  p->version = 2;
  256|       |  p->name = kParam_chroma;
  257|       |  p->type = heif_encoder_parameter_type_string;
  258|       |  p->string.default_value = "420";
  259|       |  p->has_default = true;
  260|       |  p->string.valid_values = kParam_chroma_valid_values;
  261|       |  d[i++] = p++;
  262|       |#endif
  263|       |
  264|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (264:3): [True: 2, False: 0]
  ------------------
  265|      2|  p->version = 2;
  266|      2|  p->name = kParam_qp;
  267|      2|  p->type = heif_encoder_parameter_type_integer;
  268|      2|  p->integer.default_value = 50;
  269|      2|  p->has_default = false;
  270|      2|  p->integer.have_minimum_maximum = true;
  271|      2|  p->integer.minimum = 0;
  272|      2|  p->integer.maximum = 63;
  273|      2|  p->integer.valid_values = nullptr;
  274|      2|  p->integer.num_valid_values = 0;
  275|      2|  d[i++] = p++;
  276|       |
  277|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (277:3): [True: 2, False: 0]
  ------------------
  278|      2|  p->version = 2;
  279|      2|  p->name = kParam_min_q;
  280|      2|  p->type = heif_encoder_parameter_type_integer;
  281|      2|  p->integer.default_value = 0;
  282|      2|  p->has_default = true;
  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_max_q;
  293|      2|  p->type = heif_encoder_parameter_type_integer;
  294|      2|  p->integer.default_value = 63;
  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|#if SVT_AV1_CHECK_VERSION(0, 9, 1)
  304|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (304:3): [True: 2, False: 0]
  ------------------
  305|      2|  p->version = 2;
  306|      2|  p->name = kParam_tune;
  307|      2|  p->type = heif_encoder_parameter_type_string;
  308|      2|  p->string.default_value = "psnr";
  309|      2|  p->has_default = true;
  310|      2|  p->string.valid_values = kParam_tune_valid_values;
  311|      2|  d[i++] = p++;
  312|      2|#endif
  313|       |
  314|      2|  d[i++] = nullptr;
  315|      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:
  875|      2|{
  876|      2|  return &encoder_plugin_vvenc;
  877|      2|}
encoder_vvenc.cc:_ZL17vvenc_init_pluginv:
  138|      2|{
  139|      2|  vvenc_init_parameters();
  140|      2|}
encoder_vvenc.cc:_ZL21vvenc_init_parametersv:
  101|      2|{
  102|      2|  heif_encoder_parameter* p = vvenc_encoder_params;
  103|      2|  const heif_encoder_parameter** d = vvenc_encoder_parameter_ptrs;
  104|      2|  int i = 0;
  105|       |
  106|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (106:3): [True: 2, False: 0]
  ------------------
  107|      2|  p->version = 2;
  108|      2|  p->name = heif_encoder_parameter_name_quality;
  ------------------
  |  |  317|      2|#define heif_encoder_parameter_name_quality  "quality"
  ------------------
  109|      2|  p->type = heif_encoder_parameter_type_integer;
  110|      2|  p->integer.default_value = 50;
  111|      2|  p->has_default = true;
  112|      2|  p->integer.have_minimum_maximum = true;
  113|      2|  p->integer.minimum = 0;
  114|      2|  p->integer.maximum = 100;
  115|      2|  p->integer.valid_values = NULL;
  116|      2|  p->integer.num_valid_values = 0;
  117|      2|  d[i++] = p++;
  118|       |
  119|      2|  assert(i < MAX_NPARAMETERS);
  ------------------
  |  Branch (119:3): [True: 2, False: 0]
  ------------------
  120|      2|  p->version = 2;
  121|      2|  p->name = heif_encoder_parameter_name_lossless;
  ------------------
  |  |  318|      2|#define heif_encoder_parameter_name_lossless "lossless"
  ------------------
  122|      2|  p->type = heif_encoder_parameter_type_boolean;
  123|      2|  p->boolean.default_value = false;
  124|      2|  p->has_default = true;
  125|      2|  d[i++] = p++;
  126|       |
  127|      2|  d[i++] = nullptr;
  128|      2|}

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

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

_Z22get_memory_usage_mutexv:
  139|  45.2k|{
  140|  45.2k|  static std::mutex sMutex;
  141|  45.2k|  return sMutex;
  142|  45.2k|}
_ZN18TotalMemoryTrackerC2EPK20heif_security_limits:
  147|  14.7k|{
  148|  14.7k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  149|       |
  150|  14.7k|  sMemoryUsage[limits] = {};
  151|  14.7k|  m_limits_context = limits;
  152|  14.7k|}
_ZN18TotalMemoryTrackerD2Ev:
  155|  14.7k|{
  156|  14.7k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  157|  14.7k|  sMemoryUsage.erase(m_limits_context);
  158|  14.7k|}
_ZN12MemoryHandle5allocEmPK20heif_security_limitsPKc:
  178|  7.87k|{
  179|       |  // we allow several allocations on the same handle, but they have to be for the same context
  180|  7.87k|  if (m_limits_context) {
  ------------------
  |  Branch (180:7): [True: 0, False: 7.87k]
  ------------------
  181|      0|    assert(m_limits_context == limits_context);
  ------------------
  |  Branch (181:5): [True: 0, False: 0]
  ------------------
  182|      0|  }
  183|       |
  184|       |
  185|       |  // --- check whether limits are exceeded
  186|       |
  187|  7.87k|  if (!limits_context) {
  ------------------
  |  Branch (187:7): [True: 0, False: 7.87k]
  ------------------
  188|      0|    return Error::Ok;
  189|      0|  }
  190|       |
  191|       |  // check against maximum memory block size
  192|       |
  193|  7.87k|  if (limits_context->max_memory_block_size != 0 &&
  ------------------
  |  Branch (193:7): [True: 7.87k, False: 0]
  ------------------
  194|  7.87k|      memory_amount > limits_context->max_memory_block_size) {
  ------------------
  |  Branch (194:7): [True: 26, False: 7.84k]
  ------------------
  195|     26|    std::stringstream sstr;
  196|       |
  197|     26|    if (reason_description) {
  ------------------
  |  Branch (197:9): [True: 26, False: 0]
  ------------------
  198|     26|      sstr << "Allocating " << memory_amount << " bytes for " << reason_description <<" exceeds the security limit of "
  199|     26|           << limits_context->max_memory_block_size << " bytes";
  200|     26|    }
  201|      0|    else {
  202|      0|      sstr << "Allocating " << memory_amount << " bytes exceeds the security limit of "
  203|      0|           << limits_context->max_memory_block_size << " bytes";
  204|      0|    }
  205|       |
  206|     26|    return {heif_error_Memory_allocation_error,
  207|     26|            heif_suberror_Security_limit_exceeded,
  208|     26|            sstr.str()};
  209|     26|  }
  210|       |
  211|  7.84k|  if (limits_context == &global_security_limits ||
  ------------------
  |  Branch (211:7): [True: 0, False: 7.84k]
  ------------------
  212|  7.84k|      limits_context == &disabled_security_limits) {
  ------------------
  |  Branch (212:7): [True: 0, False: 7.84k]
  ------------------
  213|      0|    return Error::Ok;
  214|      0|  }
  215|       |
  216|  7.84k|  std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  217|  7.84k|  auto it = sMemoryUsage.find(limits_context);
  218|  7.84k|  if (it == sMemoryUsage.end()) {
  ------------------
  |  Branch (218:7): [True: 0, False: 7.84k]
  ------------------
  219|      0|    assert(false);
  ------------------
  |  Branch (219:5): [Folded, False: 0]
  ------------------
  220|      0|    return Error::Ok;
  221|      0|  }
  222|       |
  223|       |  // check against maximum total memory usage
  224|       |
  225|  7.84k|  if (limits_context->max_total_memory != 0 &&
  ------------------
  |  Branch (225:7): [True: 7.84k, False: 0]
  ------------------
  226|  7.84k|      it->second.total_memory_usage + memory_amount > limits_context->max_total_memory) {
  ------------------
  |  Branch (226:7): [True: 25, False: 7.82k]
  ------------------
  227|     25|    std::stringstream sstr;
  228|       |
  229|     25|    if (reason_description) {
  ------------------
  |  Branch (229:9): [True: 25, False: 0]
  ------------------
  230|     25|      sstr << "Memory usage of " << it->second.total_memory_usage + memory_amount
  231|     25|           << " bytes for " << reason_description << " exceeds the security limit of "
  232|     25|           << limits_context->max_total_memory << " bytes of total memory usage";
  233|     25|    }
  234|      0|    else {
  235|      0|      sstr << "Memory usage of " << it->second.total_memory_usage + memory_amount
  236|      0|           << " bytes exceeds the security limit of "
  237|      0|           << limits_context->max_total_memory << " bytes of total memory usage";
  238|      0|    }
  239|       |
  240|     25|    return {heif_error_Memory_allocation_error,
  241|     25|            heif_suberror_Security_limit_exceeded,
  242|     25|            sstr.str()};
  243|     25|  }
  244|       |
  245|       |
  246|       |  // --- register memory usage
  247|       |
  248|  7.82k|  m_limits_context = limits_context;
  249|  7.82k|  m_memory_amount += memory_amount;
  250|       |
  251|  7.82k|  it->second.total_memory_usage += memory_amount;
  252|       |
  253|       |  // remember maximum memory usage (for informational purpose)
  254|  7.82k|  if (it->second.total_memory_usage > it->second.max_memory_usage) {
  ------------------
  |  Branch (254:7): [True: 1.55k, False: 6.26k]
  ------------------
  255|  1.55k|    it->second.max_memory_usage = it->second.total_memory_usage;
  256|  1.55k|  }
  257|       |
  258|  7.82k|  return Error::Ok;
  259|  7.84k|}
_ZN12MemoryHandle4freeEv:
  263|  9.44k|{
  264|  9.44k|  if (m_limits_context) {
  ------------------
  |  Branch (264:7): [True: 7.82k, False: 1.62k]
  ------------------
  265|  7.82k|    std::lock_guard<std::mutex> lock(get_memory_usage_mutex());
  266|       |
  267|  7.82k|    auto it = sMemoryUsage.find(m_limits_context);
  268|  7.82k|    if (it != sMemoryUsage.end()) {
  ------------------
  |  Branch (268:9): [True: 7.82k, False: 0]
  ------------------
  269|  7.82k|      it->second.total_memory_usage -= m_memory_amount;
  270|  7.82k|    }
  271|       |
  272|  7.82k|    m_limits_context = nullptr;
  273|  7.82k|    m_memory_amount = 0;
  274|  7.82k|  }
  275|  9.44k|}

_ZN12MemoryHandleD2Ev:
   85|  9.44k|  ~MemoryHandle() { free(); }
_ZN12MemoryHandleC2Ev:
   84|  9.44k|  MemoryHandle() = default;

_ZN13Box_container5parseER14BitstreamRangePK20heif_security_limits:
   30|  2.76k|{
   31|  2.76k|  return read_children(range, READ_CHILDREN_ALL, limits);
   32|  2.76k|}
_ZNK13Box_container4dumpER6Indent:
   36|  2.20k|{
   37|  2.20k|  std::ostringstream sstr;
   38|  2.20k|  sstr << Box::dump(indent);
   39|  2.20k|  sstr << dump_children(indent);
   40|       |
   41|  2.20k|  return sstr.str();
   42|  2.20k|}
_ZNK8Box_mvhd18get_matrix_elementEi:
   46|  10.8k|{
   47|  10.8k|  if (idx == 8) {
  ------------------
  |  Branch (47:7): [True: 1.20k, False: 9.64k]
  ------------------
   48|  1.20k|    return 1.0;
   49|  1.20k|  }
   50|       |
   51|  9.64k|  return m_matrix[idx] / double(0x10000);
   52|  10.8k|}
_ZN8Box_mvhd5parseER14BitstreamRangePK20heif_security_limits:
   56|  1.29k|{
   57|  1.29k|  parse_full_box_header(range);
   58|       |
   59|  1.29k|  if (get_version() > 1) {
  ------------------
  |  Branch (59:7): [True: 6, False: 1.28k]
  ------------------
   60|      6|    return unsupported_version_error("mvhd");
   61|      6|  }
   62|       |
   63|  1.28k|  if (get_version() == 1) {
  ------------------
  |  Branch (63:7): [True: 18, False: 1.27k]
  ------------------
   64|     18|    m_creation_time = range.read64();
   65|     18|    m_modification_time = range.read64();
   66|     18|    m_timescale = range.read32();
   67|     18|    m_duration = range.read64();
   68|     18|  }
   69|  1.27k|  else {
   70|       |    // version==0
   71|  1.27k|    m_creation_time = range.read32();
   72|  1.27k|    m_modification_time = range.read32();
   73|  1.27k|    m_timescale = range.read32();
   74|  1.27k|    m_duration = range.read32();
   75|  1.27k|  }
   76|       |
   77|  1.28k|  m_rate = range.read32();
   78|  1.28k|  m_volume = range.read16();
   79|  1.28k|  range.skip(2);
   80|  1.28k|  range.skip(8);
   81|  11.6k|  for (uint32_t& m : m_matrix) {
  ------------------
  |  Branch (81:20): [True: 11.6k, False: 1.28k]
  ------------------
   82|  11.6k|    m = range.read32();
   83|  11.6k|  }
   84|  9.02k|  for (int i = 0; i < 6; i++) {
  ------------------
  |  Branch (84:19): [True: 7.73k, False: 1.28k]
  ------------------
   85|  7.73k|    range.skip(4);
   86|  7.73k|  }
   87|       |
   88|  1.28k|  m_next_track_ID = range.read32();
   89|       |
   90|  1.28k|  return range.get_error();
   91|  1.29k|}
_ZNK8Box_mvhd4dumpER6Indent:
   95|  1.20k|{
   96|  1.20k|  std::ostringstream sstr;
   97|  1.20k|  sstr << FullBox::dump(indent);
   98|  1.20k|  sstr << indent << "creation time:     " << m_creation_time << "\n"
   99|  1.20k|      << indent << "modification time: " << m_modification_time << "\n"
  100|  1.20k|      << indent << "timescale: " << m_timescale << "\n"
  101|  1.20k|      << indent << "duration: " << m_duration << "\n";
  102|  1.20k|  sstr << indent << "rate: " << get_rate() << "\n"
  103|  1.20k|      << indent << "volume: " << get_volume() << "\n"
  104|  1.20k|      << indent << "matrix:\n";
  105|  4.82k|  for (int y = 0; y < 3; y++) {
  ------------------
  |  Branch (105:19): [True: 3.61k, False: 1.20k]
  ------------------
  106|  3.61k|    sstr << indent << "  ";
  107|  14.4k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (107:21): [True: 10.8k, False: 3.61k]
  ------------------
  108|  10.8k|      sstr << get_matrix_element(i + 3 * y) << " ";
  109|  10.8k|    }
  110|  3.61k|    sstr << "\n";
  111|  3.61k|  }
  112|  1.20k|  sstr << indent << "next_track_ID: " << m_next_track_ID << "\n";
  113|       |
  114|  1.20k|  return sstr.str();
  115|  1.20k|}
_ZNK8Box_tkhd18get_matrix_elementEi:
  170|  12.8k|{
  171|  12.8k|  if (idx == 8) {
  ------------------
  |  Branch (171:7): [True: 1.42k, False: 11.4k]
  ------------------
  172|  1.42k|    return 1.0;
  173|  1.42k|  }
  174|       |
  175|  11.4k|  return m_matrix[idx] / double(0x10000);
  176|  12.8k|}
_ZN8Box_tkhd5parseER14BitstreamRangePK20heif_security_limits:
  180|  1.49k|{
  181|  1.49k|  parse_full_box_header(range);
  182|       |
  183|  1.49k|  if (get_version() > 1) {
  ------------------
  |  Branch (183:7): [True: 7, False: 1.48k]
  ------------------
  184|      7|    return unsupported_version_error("tkhd");
  185|      7|  }
  186|       |
  187|  1.48k|  if (get_version() == 1) {
  ------------------
  |  Branch (187:7): [True: 63, False: 1.42k]
  ------------------
  188|     63|    m_creation_time = range.read64();
  189|     63|    m_modification_time = range.read64();
  190|     63|    m_track_id = range.read32();
  191|     63|    range.skip(4);
  192|     63|    m_duration = range.read64();
  193|     63|  }
  194|  1.42k|  else {
  195|       |    // version==0
  196|  1.42k|    m_creation_time = range.read32();
  197|  1.42k|    m_modification_time = range.read32();
  198|  1.42k|    m_track_id = range.read32();
  199|  1.42k|    range.skip(4);
  200|  1.42k|    m_duration = range.read32();
  201|  1.42k|  }
  202|       |
  203|  1.48k|  range.skip(8);
  204|  1.48k|  m_layer = range.read16();
  205|  1.48k|  m_alternate_group = range.read16();
  206|  1.48k|  m_volume = range.read16();
  207|  1.48k|  range.skip(2);
  208|  13.3k|  for (uint32_t& m : m_matrix) {
  ------------------
  |  Branch (208:20): [True: 13.3k, False: 1.48k]
  ------------------
  209|  13.3k|    m = range.read32();
  210|  13.3k|  }
  211|       |
  212|  1.48k|  m_width = range.read32();
  213|  1.48k|  m_height = range.read32();
  214|       |
  215|  1.48k|  return range.get_error();
  216|  1.49k|}
_ZNK8Box_tkhd4dumpER6Indent:
  220|  1.42k|{
  221|  1.42k|  std::ostringstream sstr;
  222|  1.42k|  sstr << FullBox::dump(indent);
  223|  1.42k|  sstr << indent << "track enabled: " << ((get_flags() & Track_enabled) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (223:43): [True: 519, False: 910]
  ------------------
  224|  1.42k|       << indent << "track in movie: " << ((get_flags() & Track_in_movie) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (224:44): [True: 536, False: 893]
  ------------------
  225|  1.42k|       << indent << "track in preview: " << ((get_flags() & Track_in_preview) ? "yes" : "no") << "\n"
  ------------------
  |  Branch (225:46): [True: 535, False: 894]
  ------------------
  226|  1.42k|       << indent << "track size is aspect ratio: " << ((get_flags() & Track_size_is_aspect_ratio) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (226:56): [True: 518, False: 911]
  ------------------
  227|  1.42k|  sstr << indent << "creation time:     " << m_creation_time << "\n"
  228|  1.42k|      << indent << "modification time: " << m_modification_time << "\n"
  229|  1.42k|      << indent << "track ID: " << m_track_id << "\n"
  230|  1.42k|      << indent << "duration: " << m_duration << "\n";
  231|  1.42k|  sstr << indent << "layer: " << m_layer << "\n"
  232|  1.42k|      << indent << "alternate_group: " << m_alternate_group << "\n"
  233|  1.42k|      << indent << "volume: " << get_volume() << "\n"
  234|  1.42k|      << indent << "matrix:\n";
  235|  5.71k|  for (int y = 0; y < 3; y++) {
  ------------------
  |  Branch (235:19): [True: 4.28k, False: 1.42k]
  ------------------
  236|  4.28k|    sstr << indent << "  ";
  237|  17.1k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (237:21): [True: 12.8k, False: 4.28k]
  ------------------
  238|  12.8k|      sstr << get_matrix_element(i + 3 * y) << " ";
  239|  12.8k|    }
  240|  4.28k|    sstr << "\n";
  241|  4.28k|  }
  242|       |
  243|  1.42k|  sstr << indent << "width: " << get_width() << "\n"
  244|  1.42k|      << indent << "height: " << get_height() << "\n";
  245|       |
  246|  1.42k|  return sstr.str();
  247|  1.42k|}
_ZN8Box_mdhd5parseER14BitstreamRangePK20heif_security_limits:
  302|  1.07k|{
  303|  1.07k|  parse_full_box_header(range);
  304|       |
  305|  1.07k|  if (get_version() > 1) {
  ------------------
  |  Branch (305:7): [True: 4, False: 1.06k]
  ------------------
  306|      4|    return unsupported_version_error("mdhd");
  307|      4|  }
  308|       |
  309|  1.06k|  if (get_version() == 1) {
  ------------------
  |  Branch (309:7): [True: 109, False: 957]
  ------------------
  310|    109|    m_creation_time = range.read64();
  311|    109|    m_modification_time = range.read64();
  312|    109|    m_timescale = range.read32();
  313|    109|    m_duration = range.read64();
  314|    109|  }
  315|    957|  else {
  316|       |    // version==0
  317|    957|    m_creation_time = range.read32();
  318|    957|    m_modification_time = range.read32();
  319|    957|    m_timescale = range.read32();
  320|    957|    m_duration = range.read32();
  321|    957|  }
  322|       |
  323|  1.06k|  uint16_t language_packed = range.read16();
  324|  1.06k|  m_language[0] = ((language_packed >> 10) & 0x1F) + 0x60;
  325|  1.06k|  m_language[1] = ((language_packed >> 5) & 0x1F) + 0x60;
  326|  1.06k|  m_language[2] = ((language_packed >> 0) & 0x1F) + 0x60;
  327|  1.06k|  m_language[3] = 0;
  328|       |
  329|  1.06k|  range.skip(2);
  330|       |
  331|  1.06k|  return range.get_error();
  332|  1.07k|}
_ZNK8Box_mdhd4dumpER6Indent:
  336|    923|{
  337|    923|  std::ostringstream sstr;
  338|    923|  sstr << FullBox::dump(indent);
  339|    923|  sstr << indent << "creation time:     " << m_creation_time << "\n"
  340|    923|      << indent << "modification time: " << m_modification_time << "\n"
  341|    923|      << indent << "timescale: " << m_timescale << "\n"
  342|    923|      << indent << "duration: " << m_duration << "\n";
  343|    923|  sstr << indent << "language: " << m_language << "\n";
  344|       |
  345|    923|  return sstr.str();
  346|    923|}
_ZN8Box_vmhd5parseER14BitstreamRangePK20heif_security_limits:
  394|    715|{
  395|    715|  parse_full_box_header(range);
  396|       |
  397|    715|  if (get_version() > 0) {
  ------------------
  |  Branch (397:7): [True: 1, False: 714]
  ------------------
  398|      1|    return unsupported_version_error("vmhd");
  399|      1|  }
  400|       |
  401|    714|  m_graphics_mode = range.read16();
  402|  2.14k|  for (uint16_t& c : m_op_color) {
  ------------------
  |  Branch (402:20): [True: 2.14k, False: 714]
  ------------------
  403|  2.14k|    c = range.read16();
  404|  2.14k|  }
  405|       |
  406|    714|  return range.get_error();
  407|    715|}
_ZNK8Box_vmhd4dumpER6Indent:
  411|    613|{
  412|    613|  std::ostringstream sstr;
  413|    613|  sstr << FullBox::dump(indent);
  414|    613|  sstr << indent << "graphics mode: " << m_graphics_mode;
  415|    613|  if (m_graphics_mode == 0) {
  ------------------
  |  Branch (415:7): [True: 255, False: 358]
  ------------------
  416|    255|    sstr << " (copy)";
  417|    255|  }
  418|    613|  sstr << "\n"
  419|    613|       << indent << "op color: " << m_op_color[0] << "; " << m_op_color[1] << "; " << m_op_color[2] << "\n";
  420|       |
  421|    613|  return sstr.str();
  422|    613|}
_ZN8Box_nmhd5parseER14BitstreamRangePK20heif_security_limits:
  441|    422|{
  442|    422|  parse_full_box_header(range);
  443|       |
  444|    422|  if (get_version() > 0) {
  ------------------
  |  Branch (444:7): [True: 6, False: 416]
  ------------------
  445|      6|    return unsupported_version_error("nmhd");
  446|      6|  }
  447|       |
  448|    416|  return range.get_error();
  449|    422|}
_ZNK8Box_nmhd4dumpER6Indent:
  453|    411|{
  454|    411|  std::ostringstream sstr;
  455|    411|  sstr << FullBox::dump(indent);
  456|       |
  457|    411|  return sstr.str();
  458|    411|}
_ZN8Box_stsd5parseER14BitstreamRangePK20heif_security_limits:
  472|  1.74k|{
  473|  1.74k|  parse_full_box_header(range);
  474|       |
  475|  1.74k|  if (get_version() > 0) {
  ------------------
  |  Branch (475:7): [True: 2, False: 1.74k]
  ------------------
  476|      2|    return unsupported_version_error("stsd");
  477|      2|  }
  478|       |
  479|  1.74k|  uint32_t entry_count = range.read32();
  480|       |
  481|  1.74k|  if (limits->max_sample_description_box_entries &&
  ------------------
  |  Branch (481:7): [True: 1.74k, False: 0]
  ------------------
  482|  1.74k|      entry_count > limits->max_sample_description_box_entries) {
  ------------------
  |  Branch (482:7): [True: 46, False: 1.69k]
  ------------------
  483|     46|    std::stringstream sstr;
  484|     46|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample description items exceeds the security limit of "
  485|     46|         << limits->max_sample_description_box_entries << " items";
  486|       |
  487|     46|    return {heif_error_Memory_allocation_error,
  488|     46|            heif_suberror_Security_limit_exceeded,
  489|     46|            sstr.str()};
  490|       |
  491|     46|  }
  492|       |
  493|  4.89k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (493:24): [True: 3.30k, False: 1.59k]
  ------------------
  494|  3.30k|    std::shared_ptr<Box> entrybox;
  495|  3.30k|    Error err = Box::read(range, &entrybox, limits);
  496|  3.30k|    if (err) {
  ------------------
  |  Branch (496:9): [True: 100, False: 3.20k]
  ------------------
  497|    100|      return err;
  498|    100|    }
  499|       |
  500|       |#if 0
  501|       |    auto visualSampleEntry_box = std::dynamic_pointer_cast<Box_VisualSampleEntry>(entrybox);
  502|       |    if (!visualSampleEntry_box) {
  503|       |      return Error{heif_error_Invalid_input,
  504|       |                   heif_suberror_Unspecified,
  505|       |                   "Invalid or unknown VisualSampleEntry in stsd box."};
  506|       |    }
  507|       |#endif
  508|       |
  509|  3.20k|    m_sample_entries.push_back(entrybox);
  510|  3.20k|  }
  511|       |
  512|  1.59k|  return range.get_error();
  513|  1.69k|}
_ZNK8Box_stsd4dumpER6Indent:
  517|  1.26k|{
  518|  1.26k|  std::ostringstream sstr;
  519|  1.26k|  sstr << FullBox::dump(indent);
  520|  2.78k|  for (size_t i = 0; i < m_sample_entries.size(); i++) {
  ------------------
  |  Branch (520:22): [True: 1.51k, False: 1.26k]
  ------------------
  521|  1.51k|    sstr << indent << "[" << i << "]\n";
  522|  1.51k|    indent++;
  523|  1.51k|    sstr << m_sample_entries[i]->dump(indent);
  524|  1.51k|    indent--;
  525|  1.51k|  }
  526|       |
  527|  1.26k|  return sstr.str();
  528|  1.26k|}
_ZN8Box_stts5parseER14BitstreamRangePK20heif_security_limits:
  547|  1.12k|{
  548|  1.12k|  parse_full_box_header(range);
  549|       |
  550|  1.12k|  if (get_version() > 0) {
  ------------------
  |  Branch (550:7): [True: 7, False: 1.12k]
  ------------------
  551|      7|    return unsupported_version_error("stts");
  552|      7|  }
  553|       |
  554|  1.12k|  uint32_t entry_count = range.read32();
  555|       |
  556|  1.12k|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (556:7): [True: 1.12k, False: 0]
  |  Branch (556:42): [True: 1, False: 1.11k]
  ------------------
  557|      1|    return {
  558|      1|      heif_error_Memory_allocation_error,
  559|      1|      heif_suberror_Security_limit_exceeded,
  560|      1|      "Security limit for maximum number of sequence frames exceeded"
  561|      1|    };
  562|      1|  }
  563|       |
  564|  1.11k|  if (auto err = m_memory_handle.alloc(entry_count * sizeof(TimeToSample),
  ------------------
  |  Branch (564:12): [True: 0, False: 1.11k]
  ------------------
  565|  1.11k|                                       limits, "the 'stts' table")) {
  566|      0|    return err;
  567|      0|  }
  568|       |
  569|  1.11k|  m_entries.resize(entry_count);
  570|       |
  571|   159k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (571:24): [True: 157k, False: 1.08k]
  ------------------
  572|   157k|    if (range.eof()) {
  ------------------
  |  Branch (572:9): [True: 35, False: 157k]
  ------------------
  573|     35|      std::stringstream sstr;
  574|     35|      sstr << "stts box should contain " << entry_count << " entries, but box only contained "
  575|     35|          << i << " entries";
  576|       |
  577|     35|      return {
  578|     35|        heif_error_Invalid_input,
  579|     35|        heif_suberror_End_of_data,
  580|     35|        sstr.str()
  581|     35|      };
  582|     35|    }
  583|       |
  584|   157k|    TimeToSample entry{};
  585|   157k|    entry.sample_count = range.read32();
  586|   157k|    entry.sample_delta = range.read32();
  587|   157k|    m_entries[i] = entry;
  588|   157k|  }
  589|       |
  590|  1.08k|  return range.get_error();
  591|  1.11k|}
_ZNK8Box_stts4dumpER6Indent:
  595|    851|{
  596|    851|  std::ostringstream sstr;
  597|    851|  sstr << FullBox::dump(indent);
  598|   125k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (598:22): [True: 124k, False: 851]
  ------------------
  599|   124k|    sstr << indent << "[" << i << "] : cnt=" << m_entries[i].sample_count << ", delta=" << m_entries[i].sample_delta << "\n";
  600|   124k|  }
  601|       |
  602|    851|  return sstr.str();
  603|    851|}
_ZN8Box_ctts5parseER14BitstreamRangePK20heif_security_limits:
  677|  1.01k|{
  678|  1.01k|  parse_full_box_header(range);
  679|       |
  680|  1.01k|  uint8_t version = get_version();
  681|       |
  682|  1.01k|  if (version > 1) {
  ------------------
  |  Branch (682:7): [True: 1, False: 1.01k]
  ------------------
  683|      1|    return unsupported_version_error("ctts");
  684|      1|  }
  685|       |
  686|  1.01k|  uint32_t entry_count = range.read32();
  687|       |
  688|  1.01k|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (688:7): [True: 1.01k, False: 0]
  |  Branch (688:42): [True: 10, False: 1.00k]
  ------------------
  689|     10|    return {
  690|     10|      heif_error_Memory_allocation_error,
  691|     10|      heif_suberror_Security_limit_exceeded,
  692|     10|      "Security limit for maximum number of sequence frames exceeded"
  693|     10|    };
  694|     10|  }
  695|       |
  696|  1.00k|  if (auto err = m_memory_handle.alloc(entry_count * sizeof(OffsetToSample),
  ------------------
  |  Branch (696:12): [True: 0, False: 1.00k]
  ------------------
  697|  1.00k|                                       limits, "the 'ctts' table")) {
  698|      0|    return err;
  699|      0|  }
  700|       |
  701|  1.00k|  m_entries.resize(entry_count);
  702|       |
  703|   150k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (703:24): [True: 149k, False: 955]
  ------------------
  704|   149k|    if (range.eof()) {
  ------------------
  |  Branch (704:9): [True: 53, False: 149k]
  ------------------
  705|     53|      std::stringstream sstr;
  706|     53|      sstr << "ctts box should contain " << entry_count << " entries, but box only contained "
  707|     53|          << i << " entries";
  708|       |
  709|     53|      return {
  710|     53|        heif_error_Invalid_input,
  711|     53|        heif_suberror_End_of_data,
  712|     53|        sstr.str()
  713|     53|      };
  714|     53|    }
  715|       |
  716|   149k|    OffsetToSample entry{};
  717|   149k|    entry.sample_count = range.read32();
  718|   149k|    if (version == 0) {
  ------------------
  |  Branch (718:9): [True: 103k, False: 45.8k]
  ------------------
  719|   103k|      uint32_t offset = range.read32();
  720|       |#if 0
  721|       |      // TODO: I disabled this because I found several files that seem to
  722|       |      //       have wrong data. Since we are not using the 'ctts' data anyway,
  723|       |      //       let's not care about it now.
  724|       |
  725|       |      if (offset > INT32_MAX) {
  726|       |        return {
  727|       |          heif_error_Unsupported_feature,
  728|       |          heif_suberror_Unsupported_parameter,
  729|       |          "We don't support offsets > 0x7fff in 'ctts' box."
  730|       |        };
  731|       |      }
  732|       |#endif
  733|       |
  734|   103k|      entry.sample_offset = static_cast<int32_t>(offset);
  735|   103k|    }
  736|  45.8k|    else if (version == 1) {
  ------------------
  |  Branch (736:14): [True: 45.8k, False: 0]
  ------------------
  737|  45.8k|      entry.sample_offset = range.read32s();
  738|  45.8k|    }
  739|      0|    else {
  740|      0|      assert(false);
  ------------------
  |  Branch (740:7): [Folded, False: 0]
  ------------------
  741|      0|    }
  742|       |
  743|   149k|    m_entries[i] = entry;
  744|   149k|  }
  745|       |
  746|    955|  return range.get_error();
  747|  1.00k|}
_ZNK8Box_ctts4dumpER6Indent:
  751|    855|{
  752|    855|  std::ostringstream sstr;
  753|    855|  sstr << FullBox::dump(indent);
  754|  65.7k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (754:22): [True: 64.9k, False: 855]
  ------------------
  755|  64.9k|    sstr << indent << "[" << i << "] : cnt=" << m_entries[i].sample_count << ", offset=" << m_entries[i].sample_offset << "\n";
  756|  64.9k|  }
  757|       |
  758|    855|  return sstr.str();
  759|    855|}
_ZN8Box_stsc5parseER14BitstreamRangePK20heif_security_limits:
  850|    223|{
  851|    223|  parse_full_box_header(range);
  852|       |
  853|    223|  if (get_version() > 0) {
  ------------------
  |  Branch (853:7): [True: 1, False: 222]
  ------------------
  854|      1|    return unsupported_version_error("stsc");
  855|      1|  }
  856|       |
  857|    222|  uint32_t entry_count = range.read32();
  858|    222|  if (entry_count == 0) {
  ------------------
  |  Branch (858:7): [True: 37, False: 185]
  ------------------
  859|     37|    return {
  860|     37|      heif_error_Invalid_input,
  861|     37|      heif_suberror_Unspecified,
  862|     37|      "'stsc' box with zero entries."};
  863|     37|  }
  864|       |
  865|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
  866|    185|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (866:7): [True: 185, False: 0]
  |  Branch (866:42): [True: 39, False: 146]
  ------------------
  867|     39|    return {
  868|     39|      heif_error_Invalid_input,
  869|     39|      heif_suberror_Unspecified,
  870|     39|      "Number of chunks in `stsc` box exceeds security limits of maximum number of frames."};
  871|     39|  }
  872|       |
  873|       |
  874|    146|  if (auto err = m_memory_handle.alloc(entry_count * sizeof(SampleToChunk),
  ------------------
  |  Branch (874:12): [True: 0, False: 146]
  ------------------
  875|    146|                                       limits, "the 'stsc' table")) {
  876|      0|    return err;
  877|      0|  }
  878|       |
  879|    146|  m_entries.resize(entry_count);
  880|       |
  881|    625|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (881:24): [True: 592, False: 33]
  ------------------
  882|    592|    SampleToChunk entry{};
  883|    592|    entry.first_chunk = range.read32();
  884|    592|    entry.samples_per_chunk = range.read32();
  885|    592|    entry.sample_description_index = range.read32();
  886|       |
  887|    592|    if (entry.samples_per_chunk == 0) {
  ------------------
  |  Branch (887:9): [True: 63, False: 529]
  ------------------
  888|     63|      return {
  889|     63|        heif_error_Invalid_input,
  890|     63|        heif_suberror_Unspecified,
  891|     63|        "'stsc' box with zero samples per chunk entry."};
  892|     63|    }
  893|       |
  894|    529|    if (entry.sample_description_index == 0) {
  ------------------
  |  Branch (894:9): [True: 0, False: 529]
  ------------------
  895|      0|      return {
  896|      0|      heif_error_Invalid_input,
  897|      0|      heif_suberror_Unspecified,
  898|      0|      "'sample_description_index' in 'stsc' must not be 0."};
  899|      0|    }
  900|       |
  901|    529|    if (limits->max_sequence_frames > 0 && entry.samples_per_chunk > limits->max_sequence_frames) {
  ------------------
  |  Branch (901:9): [True: 529, False: 0]
  |  Branch (901:44): [True: 50, False: 479]
  ------------------
  902|     50|      return {
  903|     50|        heif_error_Invalid_input,
  904|     50|        heif_suberror_Unspecified,
  905|     50|        "Number of chunk samples in `stsc` box exceeds security limits of maximum number of frames."};
  906|     50|    }
  907|       |
  908|    479|    m_entries[i] = entry;
  909|    479|  }
  910|       |
  911|     33|  return range.get_error();
  912|    146|}
_ZNK8Box_stsc4dumpER6Indent:
  916|     24|{
  917|     24|  std::ostringstream sstr;
  918|     24|  sstr << FullBox::dump(indent);
  919|    253|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (919:22): [True: 229, False: 24]
  ------------------
  920|    229|    sstr << indent << "[" << i << "]\n"
  921|    229|        << indent << "  first chunk: " << m_entries[i].first_chunk << "\n"
  922|    229|        << indent << "  samples per chunk: " << m_entries[i].samples_per_chunk << "\n"
  923|    229|        << indent << "  sample description index: " << m_entries[i].sample_description_index << "\n";
  924|    229|  }
  925|       |
  926|     24|  return sstr.str();
  927|     24|}
_ZN8Box_stco5parseER14BitstreamRangePK20heif_security_limits:
  979|  1.16k|{
  980|  1.16k|  parse_full_box_header(range);
  981|       |
  982|  1.16k|  if (get_version() > 0) {
  ------------------
  |  Branch (982:7): [True: 4, False: 1.16k]
  ------------------
  983|      4|    return unsupported_version_error("stco");
  984|      4|  }
  985|       |
  986|  1.16k|  uint32_t entry_count = range.read32();
  987|       |
  988|       |  // check required memory
  989|       |
  990|  1.16k|  uint64_t mem_size = entry_count * sizeof(uint32_t);
  991|  1.16k|  if (auto err = m_memory_handle.alloc(mem_size,
  ------------------
  |  Branch (991:12): [True: 14, False: 1.14k]
  ------------------
  992|  1.16k|                                       limits, "the 'stco' table")) {
  993|     14|    return err;
  994|     14|  }
  995|       |
  996|   237k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (996:24): [True: 236k, False: 1.10k]
  ------------------
  997|   236k|    m_offsets.push_back(range.read32());
  998|       |
  999|   236k|    if (range.error()) {
  ------------------
  |  Branch (999:9): [True: 45, False: 236k]
  ------------------
 1000|     45|      return range.get_error();
 1001|     45|    }
 1002|   236k|  }
 1003|       |
 1004|  1.10k|  return range.get_error();
 1005|  1.14k|}
_ZNK8Box_stco4dumpER6Indent:
 1009|    999|{
 1010|    999|  std::ostringstream sstr;
 1011|    999|  sstr << FullBox::dump(indent);
 1012|   161k|  for (size_t i = 0; i < m_offsets.size(); i++) {
  ------------------
  |  Branch (1012:22): [True: 160k, False: 999]
  ------------------
 1013|   160k|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_offsets[i] << std::dec << "\n";
 1014|   160k|  }
 1015|       |
 1016|    999|  return sstr.str();
 1017|    999|}
_ZN8Box_stsz5parseER14BitstreamRangePK20heif_security_limits:
 1059|  1.68k|{
 1060|  1.68k|  parse_full_box_header(range);
 1061|       |
 1062|  1.68k|  if (get_version() > 0) {
  ------------------
  |  Branch (1062:7): [True: 7, False: 1.67k]
  ------------------
 1063|      7|    return unsupported_version_error("stsz");
 1064|      7|  }
 1065|       |
 1066|  1.67k|  m_fixed_sample_size = range.read32();
 1067|  1.67k|  m_sample_count = range.read32();
 1068|       |
 1069|  1.67k|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1069:7): [True: 773, False: 900]
  ------------------
 1070|       |    // check required memory
 1071|       |
 1072|    773|    if (limits->max_sequence_frames > 0 && m_sample_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (1072:9): [True: 773, False: 0]
  |  Branch (1072:44): [True: 38, False: 735]
  ------------------
 1073|     38|      return {
 1074|     38|        heif_error_Memory_allocation_error,
 1075|     38|        heif_suberror_Security_limit_exceeded,
 1076|     38|        "Security limit for maximum number of sequence frames exceeded"
 1077|     38|      };
 1078|     38|    }
 1079|       |
 1080|    735|    uint64_t mem_size = m_sample_count * sizeof(uint32_t);
 1081|    735|    if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'stsz' table")) {
  ------------------
  |  Branch (1081:14): [True: 0, False: 735]
  ------------------
 1082|      0|      return err;
 1083|      0|    }
 1084|       |
 1085|   292k|    for (uint32_t i = 0; i < m_sample_count; i++) {
  ------------------
  |  Branch (1085:26): [True: 291k, False: 693]
  ------------------
 1086|   291k|      if (range.eof()) {
  ------------------
  |  Branch (1086:11): [True: 23, False: 291k]
  ------------------
 1087|     23|        std::stringstream sstr;
 1088|     23|        sstr << "stsz box should contain " << m_sample_count << " entries, but box only contained "
 1089|     23|            << i << " entries";
 1090|       |
 1091|     23|        return {
 1092|     23|          heif_error_Invalid_input,
 1093|     23|          heif_suberror_End_of_data,
 1094|     23|          sstr.str()
 1095|     23|        };
 1096|     23|      }
 1097|       |
 1098|   291k|      m_sample_sizes.push_back(range.read32());
 1099|       |
 1100|   291k|      if (range.error()) {
  ------------------
  |  Branch (1100:11): [True: 19, False: 291k]
  ------------------
 1101|     19|        return range.get_error();
 1102|     19|      }
 1103|   291k|    }
 1104|    735|  }
 1105|       |
 1106|  1.59k|  return range.get_error();
 1107|  1.67k|}
_ZNK8Box_stsz4dumpER6Indent:
 1111|  1.52k|{
 1112|  1.52k|  std::ostringstream sstr;
 1113|  1.52k|  sstr << FullBox::dump(indent);
 1114|  1.52k|  sstr << indent << "sample count: " << m_sample_count << "\n";
 1115|  1.52k|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1115:7): [True: 675, False: 852]
  ------------------
 1116|   101k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1116:24): [True: 101k, False: 675]
  ------------------
 1117|   101k|      sstr << indent << "[" << i << "] : " << m_sample_sizes[i] << "\n";
 1118|   101k|    }
 1119|    675|  }
 1120|    852|  else {
 1121|    852|    sstr << indent << "fixed sample size: " << m_fixed_sample_size << "\n";
 1122|    852|  }
 1123|       |
 1124|  1.52k|  return sstr.str();
 1125|  1.52k|}
_ZN8Box_stss5parseER14BitstreamRangePK20heif_security_limits:
 1177|    738|{
 1178|    738|  parse_full_box_header(range);
 1179|       |
 1180|    738|  if (get_version() > 0) {
  ------------------
  |  Branch (1180:7): [True: 8, False: 730]
  ------------------
 1181|      8|    return unsupported_version_error("stss");
 1182|      8|  }
 1183|       |
 1184|    730|  uint32_t sample_count = range.read32();
 1185|       |
 1186|       |  // check required memory
 1187|       |
 1188|    730|  uint64_t mem_size = sample_count * sizeof(uint32_t);
 1189|    730|  if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'stss' table")) {
  ------------------
  |  Branch (1189:12): [True: 36, False: 694]
  ------------------
 1190|     36|    return err;
 1191|     36|  }
 1192|       |
 1193|   459k|  for (uint32_t i = 0; i < sample_count; i++) {
  ------------------
  |  Branch (1193:24): [True: 458k, False: 650]
  ------------------
 1194|   458k|    m_sync_samples.push_back(range.read32());
 1195|       |
 1196|   458k|    if (range.error()) {
  ------------------
  |  Branch (1196:9): [True: 44, False: 458k]
  ------------------
 1197|     44|      return range.get_error();
 1198|     44|    }
 1199|   458k|  }
 1200|       |
 1201|    650|  return range.get_error();
 1202|    694|}
_ZNK8Box_stss4dumpER6Indent:
 1206|    638|{
 1207|    638|  std::ostringstream sstr;
 1208|    638|  sstr << FullBox::dump(indent);
 1209|   454k|  for (size_t i = 0; i < m_sync_samples.size(); i++) {
  ------------------
  |  Branch (1209:22): [True: 454k, False: 638]
  ------------------
 1210|   454k|    sstr << indent << "[" << i << "] : " << m_sync_samples[i] << "\n";
 1211|   454k|  }
 1212|       |
 1213|    638|  return sstr.str();
 1214|    638|}
_ZN17VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1244|  1.75k|{
 1245|  1.75k|  (void)limits;
 1246|       |
 1247|  1.75k|  range.skip(6);
 1248|  1.75k|  data_reference_index = range.read16();
 1249|       |
 1250|  1.75k|  pre_defined = range.read16();
 1251|  1.75k|  range.skip(2);
 1252|  5.26k|  for (uint32_t& p : pre_defined2) {
  ------------------
  |  Branch (1252:20): [True: 5.26k, False: 1.75k]
  ------------------
 1253|  5.26k|    p = range.read32();
 1254|  5.26k|  }
 1255|  1.75k|  width = range.read16();
 1256|  1.75k|  height = range.read16();
 1257|  1.75k|  horizresolution = range.read32();
 1258|  1.75k|  vertresolution = range.read32();
 1259|  1.75k|  range.skip(4);
 1260|  1.75k|  frame_count = range.read16();
 1261|  1.75k|  compressorname = range.read_fixed_string(32);
 1262|  1.75k|  depth = range.read16();
 1263|  1.75k|  pre_defined3 = range.read16s();
 1264|       |
 1265|       |  // other boxes from derived specifications
 1266|       |  //std::shared_ptr<Box_clap> clap; // optional // TODO
 1267|       |  //std::shared_ptr<Box_pixi> pixi; // optional // TODO
 1268|       |
 1269|  1.75k|  return Error::Ok;
 1270|  1.75k|}
_ZNK17VisualSampleEntry4dumpER6Indent:
 1300|  1.06k|{
 1301|  1.06k|  std::stringstream sstr;
 1302|  1.06k|  sstr << indent << "data reference index: " << data_reference_index << "\n"
 1303|  1.06k|       << indent << "width: " << width << "\n"
 1304|  1.06k|       << indent << "height: " << height << "\n"
 1305|  1.06k|       << indent << "horiz. resolution: " << get_horizontal_resolution() << "\n"
 1306|  1.06k|       << indent << "vert. resolution: " << get_vertical_resolution() << "\n"
 1307|  1.06k|       << indent << "frame count: " << frame_count << "\n"
 1308|  1.06k|       << indent << "compressorname: " << compressorname << "\n"
 1309|  1.06k|       << indent << "depth: " << depth << "\n";
 1310|       |
 1311|  1.06k|  return sstr.str();
 1312|  1.06k|}
_ZNK22Box_URIMetaSampleEntry4dumpER6Indent:
 1332|    763|{
 1333|    763|  std::stringstream sstr;
 1334|    763|  sstr << Box::dump(indent);
 1335|    763|  sstr << indent << "data reference index: " << data_reference_index << "\n";
 1336|    763|  sstr << dump_children(indent);
 1337|    763|  return sstr.str();
 1338|    763|}
_ZN22Box_URIMetaSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1342|    838|{
 1343|    838|  range.skip(6);
 1344|    838|  data_reference_index = range.read16();
 1345|       |
 1346|    838|  Error err = read_children(range, READ_CHILDREN_ALL, limits);
 1347|    838|  if (err) {
  ------------------
  |  Branch (1347:7): [True: 75, False: 763]
  ------------------
 1348|     75|    return err;
 1349|     75|  }
 1350|       |
 1351|    763|  return Error::Ok;
 1352|    838|}
_ZN7Box_uri5parseER14BitstreamRangePK20heif_security_limits:
 1356|    906|{
 1357|    906|  parse_full_box_header(range);
 1358|       |
 1359|    906|  if (get_version() > 0) {
  ------------------
  |  Branch (1359:7): [True: 4, False: 902]
  ------------------
 1360|      4|    return unsupported_version_error("uri ");
 1361|      4|  }
 1362|       |
 1363|    902|  m_uri = range.read_string();
 1364|       |
 1365|    902|  return range.get_error();
 1366|    906|}
_ZNK7Box_uri4dumpER6Indent:
 1370|    770|{
 1371|    770|  std::ostringstream sstr;
 1372|    770|  sstr << FullBox::dump(indent);
 1373|    770|  sstr << indent << "uri: " << m_uri << "\n";
 1374|       |
 1375|    770|  return sstr.str();
 1376|    770|}
_ZN8Box_ccst5parseER14BitstreamRangePK20heif_security_limits:
 1393|    598|{
 1394|    598|  parse_full_box_header(range);
 1395|       |
 1396|    598|  if (get_version() > 0) {
  ------------------
  |  Branch (1396:7): [True: 4, False: 594]
  ------------------
 1397|      4|    return unsupported_version_error("ccst");
 1398|      4|  }
 1399|       |
 1400|    594|  uint32_t bits = range.read32();
 1401|       |
 1402|    594|  auto& constraints = m_codingConstraints;
 1403|       |
 1404|    594|  constraints.all_ref_pics_intra = (bits & 0x80000000) != 0;
 1405|    594|  constraints.intra_pred_used = (bits & 0x40000000) != 0;
 1406|    594|  constraints.max_ref_per_pic = (bits >> 26) & 0x0F;
 1407|       |
 1408|    594|  return range.get_error();
 1409|    598|}
_ZNK8Box_ccst4dumpER6Indent:
 1413|    495|{
 1414|    495|  const auto& constraints = m_codingConstraints;
 1415|       |
 1416|    495|  std::ostringstream sstr;
 1417|    495|  sstr << FullBox::dump(indent);
 1418|    495|  sstr << indent << "all ref pics intra: " << std::boolalpha <<constraints.all_ref_pics_intra << "\n"
 1419|    495|       << indent << "intra pred used: " << constraints.intra_pred_used << "\n"
 1420|    495|       << indent << "max ref per pic: " << ((int) constraints.max_ref_per_pic) << "\n";
 1421|       |
 1422|    495|  return sstr.str();
 1423|    495|}
_ZN8Box_auxi5parseER14BitstreamRangePK20heif_security_limits:
 1453|    803|{
 1454|    803|  parse_full_box_header(range);
 1455|       |
 1456|    803|  if (get_version() > 0) {
  ------------------
  |  Branch (1456:7): [True: 7, False: 796]
  ------------------
 1457|      7|    return unsupported_version_error("auxi");
 1458|      7|  }
 1459|       |
 1460|    796|  m_aux_track_type = range.read_string();
 1461|       |
 1462|    796|  return range.get_error();
 1463|    803|}
_ZNK8Box_auxi4dumpER6Indent:
 1467|    563|{
 1468|    563|  std::ostringstream sstr;
 1469|    563|  sstr << FullBox::dump(indent);
 1470|    563|  sstr << indent << "aux track info type: " << m_aux_track_type << "\n";
 1471|       |
 1472|    563|  return sstr.str();
 1473|    563|}
_ZNK21Box_VisualSampleEntry4dumpER6Indent:
 1506|  1.06k|{
 1507|  1.06k|  std::stringstream sstr;
 1508|  1.06k|  sstr << Box::dump(indent);
 1509|  1.06k|  sstr << m_visualSampleEntry.dump(indent);
 1510|  1.06k|  sstr << dump_children(indent);
 1511|  1.06k|  return sstr.str();
 1512|  1.06k|}
_ZN21Box_VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1516|  1.75k|{
 1517|  1.75k|  auto err = m_visualSampleEntry.parse(range, limits);
 1518|  1.75k|  if (err) {
  ------------------
  |  Branch (1518:7): [True: 0, False: 1.75k]
  ------------------
 1519|      0|    return err;
 1520|      0|  }
 1521|       |
 1522|  1.75k|  err = read_children(range, READ_CHILDREN_ALL, limits);
 1523|  1.75k|  if (err) {
  ------------------
  |  Branch (1523:7): [True: 461, False: 1.29k]
  ------------------
 1524|    461|    return err;
 1525|    461|  }
 1526|       |
 1527|  1.29k|  return Error::Ok;
 1528|  1.75k|}
_ZNK8Box_sbgp4dumpER6Indent:
 1532|    828|{
 1533|    828|  std::stringstream sstr;
 1534|    828|  sstr << FullBox::dump(indent);
 1535|    828|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1536|       |
 1537|    828|  if (m_grouping_type_parameter) {
  ------------------
  |  Branch (1537:7): [True: 515, False: 313]
  ------------------
 1538|    515|    sstr << indent << "grouping_type_parameter: " << *m_grouping_type_parameter << "\n";
 1539|    515|  }
 1540|       |
 1541|    828|  uint32_t total_samples = 0;
 1542|  25.7k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (1542:22): [True: 24.9k, False: 828]
  ------------------
 1543|  24.9k|    sstr << indent << "[" << std::setw(2) << (i + 1) << "] : " << std::setw(3) << m_entries[i].sample_count << "x " << m_entries[i].group_description_index << "\n";
 1544|  24.9k|    total_samples += m_entries[i].sample_count;
 1545|  24.9k|  }
 1546|    828|  sstr << indent << "total samples: " << total_samples << "\n";
 1547|       |
 1548|    828|  return sstr.str();
 1549|    828|}
_ZN8Box_sbgp5parseER14BitstreamRangePK20heif_security_limits:
 1591|    960|{
 1592|    960|  parse_full_box_header(range);
 1593|       |
 1594|    960|  if (get_version() > 1) {
  ------------------
  |  Branch (1594:7): [True: 3, False: 957]
  ------------------
 1595|      3|    return unsupported_version_error("sbgp");
 1596|      3|  }
 1597|       |
 1598|    957|  m_grouping_type = range.read32();
 1599|       |
 1600|    957|  if (get_version() == 1) {
  ------------------
  |  Branch (1600:7): [True: 518, False: 439]
  ------------------
 1601|    518|    m_grouping_type_parameter = range.read32();
 1602|    518|  }
 1603|       |
 1604|    957|  uint32_t count = range.read32();
 1605|    957|  if (auto err = m_memory_handle.alloc(count * sizeof(Entry),
  ------------------
  |  Branch (1605:12): [True: 1, False: 956]
  ------------------
 1606|    957|                                       limits, "the 'sample to group' table")) {
 1607|      1|    return err;
 1608|      1|  }
 1609|       |
 1610|  30.4k|  for (uint32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1610:24): [True: 29.4k, False: 934]
  ------------------
 1611|  29.4k|    Entry e{};
 1612|  29.4k|    e.sample_count = range.read32();
 1613|  29.4k|    e.group_description_index = range.read32();
 1614|  29.4k|    m_entries.push_back(e);
 1615|  29.4k|    if (range.error()) {
  ------------------
  |  Branch (1615:9): [True: 22, False: 29.4k]
  ------------------
 1616|     22|      return range.get_error();
 1617|     22|    }
 1618|  29.4k|  }
 1619|       |
 1620|    934|  return range.get_error();
 1621|    956|}
_ZNK21SampleGroupEntry_refs4dumpEv:
 1625|   102k|{
 1626|   102k|  std::stringstream sstr;
 1627|   102k|  if (m_sample_id==0) {
  ------------------
  |  Branch (1627:7): [True: 99.4k, False: 3.18k]
  ------------------
 1628|  99.4k|    sstr << "0 (non-ref) refs =";
 1629|  99.4k|  }
 1630|  3.18k|  else {
 1631|  3.18k|    sstr << m_sample_id << " refs =";
 1632|  3.18k|  }
 1633|   261k|  for (uint32_t ref : m_direct_reference_sample_id) {
  ------------------
  |  Branch (1633:21): [True: 261k, False: 102k]
  ------------------
 1634|   261k|    sstr << ' ' << ref;
 1635|   261k|  }
 1636|       |
 1637|   102k|  return sstr.str();
 1638|   102k|}
_ZN21SampleGroupEntry_refs5parseER14BitstreamRangePK20heif_security_limits:
 1646|   102k|{
 1647|   102k|  m_sample_id = range.read32();
 1648|   102k|  uint8_t cnt = range.read8();
 1649|   364k|  for (uint8_t i = 0; i < cnt; i++) {
  ------------------
  |  Branch (1649:23): [True: 261k, False: 102k]
  ------------------
 1650|   261k|    m_direct_reference_sample_id.push_back(range.read32());
 1651|   261k|  }
 1652|       |
 1653|   102k|  return Error::Ok;
 1654|   102k|}
_ZNK8Box_sgpd4dumpER6Indent:
 1675|  1.69k|{
 1676|  1.69k|  std::stringstream sstr;
 1677|  1.69k|  sstr << FullBox::dump(indent);
 1678|       |
 1679|  1.69k|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1680|  1.69k|  if (m_default_length) {
  ------------------
  |  Branch (1680:7): [True: 540, False: 1.15k]
  ------------------
 1681|    540|    sstr << indent << "default_length: " << *m_default_length << "\n";
 1682|    540|  }
 1683|  1.69k|  if (m_default_sample_description_index) {
  ------------------
  |  Branch (1683:7): [True: 598, False: 1.09k]
  ------------------
 1684|    598|    sstr << indent << "default_sample_description_index: " << *m_default_sample_description_index << "\n";
 1685|    598|  }
 1686|       |
 1687|   251k|  for (size_t i=0; i<m_entries.size(); i++) {
  ------------------
  |  Branch (1687:20): [True: 249k, False: 1.69k]
  ------------------
 1688|   249k|    sstr << indent << "[" << (i+1) << "] : ";
 1689|   249k|    if (m_entries[i].sample_group_entry) {
  ------------------
  |  Branch (1689:9): [True: 102k, False: 147k]
  ------------------
 1690|   102k|      sstr << m_entries[i].sample_group_entry->dump() << "\n";
 1691|   102k|    }
 1692|   147k|    else {
 1693|   147k|      sstr << "empty (description_length=" << m_entries[i].description_length << ")\n";
 1694|   147k|    }
 1695|   249k|  }
 1696|       |
 1697|  1.69k|  return sstr.str();
 1698|  1.69k|}
_ZN8Box_sgpd5parseER14BitstreamRangePK20heif_security_limits:
 1708|  1.79k|{
 1709|  1.79k|  parse_full_box_header(range);
 1710|       |
 1711|  1.79k|  m_grouping_type = range.read32();
 1712|       |
 1713|  1.79k|  if (get_version() == 1) {
  ------------------
  |  Branch (1713:7): [True: 601, False: 1.19k]
  ------------------
 1714|    601|    m_default_length = range.read32();
 1715|    601|  }
 1716|       |
 1717|  1.79k|  if (get_version() >= 2) {
  ------------------
  |  Branch (1717:7): [True: 598, False: 1.19k]
  ------------------
 1718|    598|    m_default_sample_description_index = range.read32();
 1719|    598|  }
 1720|       |
 1721|  1.79k|  uint32_t entry_count = range.read32();
 1722|       |
 1723|  1.79k|  if (limits->max_sample_group_description_box_entries &&
  ------------------
  |  Branch (1723:7): [True: 1.79k, False: 0]
  ------------------
 1724|  1.79k|      entry_count > limits->max_sample_group_description_box_entries) {
  ------------------
  |  Branch (1724:7): [True: 44, False: 1.75k]
  ------------------
 1725|     44|    std::stringstream sstr;
 1726|     44|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample group description items exceeds the security limit of "
 1727|     44|         << limits->max_sample_group_description_box_entries << " items";
 1728|       |
 1729|     44|    return {heif_error_Memory_allocation_error,
 1730|     44|            heif_suberror_Security_limit_exceeded,
 1731|     44|            sstr.str()};
 1732|       |
 1733|     44|  }
 1734|       |
 1735|   251k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1735:24): [True: 249k, False: 1.75k]
  ------------------
 1736|   249k|    Entry entry;
 1737|       |
 1738|   249k|    if (get_version() == 1) {
  ------------------
  |  Branch (1738:9): [True: 29.9k, False: 219k]
  ------------------
 1739|  29.9k|      if (*m_default_length == 0) {
  ------------------
  |  Branch (1739:11): [True: 3.80k, False: 26.0k]
  ------------------
 1740|  3.80k|        entry.description_length = range.read32();
 1741|  3.80k|      }
 1742|  29.9k|    }
 1743|       |
 1744|   249k|    switch (m_grouping_type) {
 1745|   102k|      case fourcc("refs"): {
  ------------------
  |  Branch (1745:7): [True: 102k, False: 147k]
  ------------------
 1746|   102k|        entry.sample_group_entry = std::make_shared<SampleGroupEntry_refs>();
 1747|   102k|        Error err = entry.sample_group_entry->parse(range, limits);
 1748|   102k|        if (err) {
  ------------------
  |  Branch (1748:13): [True: 0, False: 102k]
  ------------------
 1749|      0|          return err;
 1750|      0|        }
 1751|       |
 1752|   102k|        break;
 1753|   102k|      }
 1754|       |
 1755|   147k|      default:
  ------------------
  |  Branch (1755:7): [True: 147k, False: 102k]
  ------------------
 1756|   147k|        break;
 1757|   249k|    }
 1758|       |
 1759|   249k|    m_entries.emplace_back(std::move(entry));
 1760|   249k|  }
 1761|       |
 1762|  1.75k|  return Error::Ok;
 1763|  1.75k|}
_ZNK8Box_btrt4dumpER6Indent:
 1767|    821|{
 1768|    821|  std::stringstream sstr;
 1769|    821|  sstr << FullBox::dump(indent);
 1770|       |
 1771|    821|  sstr << indent << "bufferSizeDB: " << m_bufferSizeDB << " bytes\n";
 1772|    821|  sstr << indent << "max bitrate: " << m_maxBitrate << " bits/sec\n";
 1773|    821|  sstr << indent << "avg bitrate: " << m_avgBitrate << " bits/sec\n";
 1774|       |
 1775|    821|  return sstr.str();
 1776|    821|}
_ZN8Box_btrt5parseER14BitstreamRangePK20heif_security_limits:
 1794|    836|{
 1795|    836|  m_bufferSizeDB = range.read32();
 1796|    836|  m_maxBitrate = range.read32();
 1797|    836|  m_avgBitrate = range.read32();
 1798|       |
 1799|    836|  return Error::Ok;
 1800|    836|}
_ZNK8Box_saiz4dumpER6Indent:
 1865|    945|{
 1866|    945|  std::stringstream sstr;
 1867|    945|  sstr << FullBox::dump(indent);
 1868|       |
 1869|    945|  sstr << indent << "aux_info_type: ";
 1870|    945|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (1870:7): [True: 778, False: 167]
  ------------------
 1871|    778|    sstr << "0\n";
 1872|    778|  }
 1873|    167|  else {
 1874|    167|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 1875|    167|  }
 1876|       |
 1877|    945|  sstr << indent << "aux_info_type_parameter: ";
 1878|    945|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (1878:7): [True: 777, False: 168]
  ------------------
 1879|    777|    sstr << "0\n";
 1880|    777|  }
 1881|    168|  else {
 1882|    168|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 1883|    168|  }
 1884|       |
 1885|    945|  sstr << indent << "default sample size: ";
 1886|    945|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1886:7): [True: 513, False: 432]
  ------------------
 1887|    513|    sstr << "0 (variable)\n";
 1888|    513|  }
 1889|    432|  else {
 1890|    432|    sstr << ((int)m_default_sample_info_size) << "\n";
 1891|    432|  }
 1892|       |
 1893|    945|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1893:7): [True: 513, False: 432]
  ------------------
 1894|   328k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1894:24): [True: 328k, False: 513]
  ------------------
 1895|   328k|      sstr << indent << "[" << i << "] : " << ((int) m_sample_sizes[i]) << "\n";
 1896|   328k|    }
 1897|    513|  }
 1898|       |
 1899|    945|  return sstr.str();
 1900|    945|}
_ZN8Box_saiz5parseER14BitstreamRangePK20heif_security_limits:
 1939|  1.18k|{
 1940|  1.18k|  parse_full_box_header(range);
 1941|       |
 1942|  1.18k|  if (get_flags() & 1) {
  ------------------
  |  Branch (1942:7): [True: 176, False: 1.00k]
  ------------------
 1943|    176|    m_aux_info_type = range.read32();
 1944|    176|    m_aux_info_type_parameter = range.read32();
 1945|    176|  }
 1946|       |
 1947|  1.18k|  m_default_sample_info_size = range.read8();
 1948|  1.18k|  m_num_samples = range.read32();
 1949|       |
 1950|  1.18k|  if (limits && limits->max_sequence_frames > 0 && m_num_samples > limits->max_sequence_frames) {
  ------------------
  |  Branch (1950:7): [True: 1.18k, False: 0]
  |  Branch (1950:17): [True: 1.18k, False: 0]
  |  Branch (1950:52): [True: 39, False: 1.14k]
  ------------------
 1951|     39|    return {
 1952|     39|      heif_error_Memory_allocation_error,
 1953|     39|      heif_suberror_Security_limit_exceeded,
 1954|     39|      "Number of 'saiz' samples exceeds the maximum number of sequence frames."
 1955|     39|    };
 1956|     39|  }
 1957|       |
 1958|  1.14k|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1958:7): [True: 708, False: 436]
  ------------------
 1959|       |    // check required memory
 1960|       |
 1961|    708|    uint64_t mem_size = m_num_samples;
 1962|    708|    if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'sample aux info sizes' (saiz) table")) {
  ------------------
  |  Branch (1962:14): [True: 0, False: 708]
  ------------------
 1963|      0|      return err;
 1964|      0|    }
 1965|       |
 1966|       |    // read whole table at once
 1967|       |
 1968|    708|    m_sample_sizes.resize(m_num_samples);
 1969|    708|    range.read(m_sample_sizes.data(), m_num_samples);
 1970|    708|  }
 1971|       |
 1972|  1.14k|  return range.get_error();
 1973|  1.14k|}
_ZNK8Box_saio4dumpER6Indent:
 2010|  1.15k|{
 2011|  1.15k|  std::stringstream sstr;
 2012|  1.15k|  sstr << FullBox::dump(indent);
 2013|       |
 2014|  1.15k|  sstr << indent << "aux_info_type: ";
 2015|  1.15k|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (2015:7): [True: 608, False: 547]
  ------------------
 2016|    608|    sstr << "0\n";
 2017|    608|  }
 2018|    547|  else {
 2019|    547|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 2020|    547|  }
 2021|       |
 2022|  1.15k|  sstr << indent << "aux_info_type_parameter: ";
 2023|  1.15k|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (2023:7): [True: 543, False: 612]
  ------------------
 2024|    543|    sstr << "0\n";
 2025|    543|  }
 2026|    612|  else {
 2027|    612|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 2028|    612|  }
 2029|       |
 2030|   142k|  for (size_t i = 0; i < m_chunk_offset.size(); i++) {
  ------------------
  |  Branch (2030:22): [True: 141k, False: 1.15k]
  ------------------
 2031|   141k|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_chunk_offset[i] << "\n";
 2032|   141k|  }
 2033|       |
 2034|  1.15k|  return sstr.str();
 2035|  1.15k|}
_ZN8Box_saio5parseER14BitstreamRangePK20heif_security_limits:
 2091|  1.31k|{
 2092|  1.31k|  parse_full_box_header(range);
 2093|       |
 2094|  1.31k|  if (get_flags() & 1) {
  ------------------
  |  Branch (2094:7): [True: 964, False: 355]
  ------------------
 2095|    964|    m_aux_info_type = range.read32();
 2096|    964|    m_aux_info_type_parameter = range.read32();
 2097|    964|  }
 2098|       |
 2099|  1.31k|  uint32_t num_chunks = range.read32();
 2100|       |
 2101|       |  // We have no explicit maximum on the number of chunks.
 2102|       |  // Use the maximum number of frames as an upper limit.
 2103|  1.31k|  if (limits && limits->max_sequence_frames > 0 && num_chunks > limits->max_sequence_frames) {
  ------------------
  |  Branch (2103:7): [True: 1.31k, False: 0]
  |  Branch (2103:17): [True: 1.31k, False: 0]
  |  Branch (2103:52): [True: 9, False: 1.31k]
  ------------------
 2104|      9|    return {
 2105|      9|      heif_error_Memory_allocation_error,
 2106|      9|      heif_suberror_Security_limit_exceeded,
 2107|      9|      "Number of 'saio' chunks exceeds the maximum number of sequence frames."
 2108|      9|    };
 2109|      9|  }
 2110|       |
 2111|       |  // check required memory
 2112|  1.31k|  uint64_t mem_size = num_chunks * sizeof(uint64_t);
 2113|       |
 2114|  1.31k|  if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'saio' table")) {
  ------------------
  |  Branch (2114:12): [True: 0, False: 1.31k]
  ------------------
 2115|      0|    return err;
 2116|      0|  }
 2117|       |
 2118|  1.31k|  m_chunk_offset.resize(num_chunks);
 2119|       |
 2120|   143k|  for (uint32_t i = 0; i < num_chunks; i++) {
  ------------------
  |  Branch (2120:24): [True: 142k, False: 1.25k]
  ------------------
 2121|   142k|    uint64_t offset;
 2122|   142k|    if (get_version() == 1) {
  ------------------
  |  Branch (2122:9): [True: 429, False: 142k]
  ------------------
 2123|    429|      offset = range.read64();
 2124|    429|    }
 2125|   142k|    else {
 2126|   142k|      offset = range.read32();
 2127|   142k|    }
 2128|       |
 2129|   142k|    m_chunk_offset[i] = offset;
 2130|       |
 2131|   142k|    if (range.error()) {
  ------------------
  |  Branch (2131:9): [True: 56, False: 142k]
  ------------------
 2132|     56|      return range.get_error();
 2133|     56|    }
 2134|   142k|  }
 2135|       |
 2136|  1.25k|  return Error::Ok;
 2137|  1.31k|}
_ZNK8Box_sdtp4dumpER6Indent:
 2141|    461|{
 2142|    461|  std::stringstream sstr;
 2143|    461|  sstr << FullBox::dump(indent);
 2144|       |
 2145|    461|  assert(m_sample_information.size() <= UINT32_MAX);
  ------------------
  |  Branch (2145:3): [True: 461, False: 0]
  ------------------
 2146|       |
 2147|  3.81M|  for (uint32_t i = 0; i < static_cast<uint32_t>(m_sample_information.size()); i++) {
  ------------------
  |  Branch (2147:24): [True: 3.81M, False: 461]
  ------------------
 2148|  3.81M|    const char* spaces = "            ";
 2149|  3.81M|    int nSpaces = 6;
 2150|  3.81M|    int k = i;
 2151|  20.0M|    while (k >= 10 && nSpaces < 12) {
  ------------------
  |  Branch (2151:12): [True: 16.2M, False: 3.81M]
  |  Branch (2151:23): [True: 16.2M, False: 0]
  ------------------
 2152|  16.2M|      k /= 10;
 2153|  16.2M|      nSpaces++;
 2154|  16.2M|    }
 2155|       |
 2156|  3.81M|    spaces = spaces + 12 - nSpaces;
 2157|       |
 2158|  3.81M|    sstr << indent << "[" << i << "] : is_leading=" << (int) get_is_leading(i) << "\n"
 2159|  3.81M|        << indent << spaces << "depends_on=" << (int) get_depends_on(i) << "\n"
 2160|  3.81M|        << indent << spaces << "is_depended_on=" << (int) get_is_depended_on(i) << "\n"
 2161|  3.81M|        << indent << spaces << "has_redundancy=" << (int) get_has_redundancy(i) << "\n";
 2162|  3.81M|  }
 2163|       |
 2164|    461|  return sstr.str();
 2165|    461|}
_ZN8Box_sdtp5parseER14BitstreamRangePK20heif_security_limits:
 2169|    461|{
 2170|    461|  parse_full_box_header(range);
 2171|       |
 2172|       |  // We have no easy way to get the number of samples from 'saiz' or 'stz2' as specified
 2173|       |  // in the standard. Instead, we read until the end of the box.
 2174|    461|  size_t nSamples = range.get_remaining_bytes();
 2175|       |
 2176|    461|  m_sample_information.resize(nSamples);
 2177|    461|  range.read(m_sample_information.data(), nSamples);
 2178|       |
 2179|    461|  return Error::Ok;
 2180|    461|}
_ZN8Box_tref5parseER14BitstreamRangePK20heif_security_limits:
 2184|  1.40k|{
 2185|  3.77k|  while (!range.eof()) {
  ------------------
  |  Branch (2185:10): [True: 2.52k, False: 1.25k]
  ------------------
 2186|  2.52k|    BoxHeader header;
 2187|  2.52k|    Error err = header.parse_header(range);
 2188|  2.52k|    if (err != Error::Ok) {
  ------------------
  |  Branch (2188:9): [True: 8, False: 2.51k]
  ------------------
 2189|      8|      return err;
 2190|      8|    }
 2191|       |
 2192|  2.51k|    if (header.get_box_size() < header.get_header_size()) {
  ------------------
  |  Branch (2192:9): [True: 1, False: 2.51k]
  ------------------
 2193|      1|      return {heif_error_Invalid_input,
 2194|      1|              heif_suberror_Unspecified,
 2195|      1|              "Invalid box size (smaller than header)"};
 2196|      1|    }
 2197|       |
 2198|  2.51k|    uint64_t dataSize = (header.get_box_size() - header.get_header_size());
 2199|       |
 2200|  2.51k|    if (dataSize % 4 != 0 || dataSize < 4) {
  ------------------
  |  Branch (2200:9): [True: 30, False: 2.48k]
  |  Branch (2200:30): [True: 1, False: 2.48k]
  ------------------
 2201|     31|      return {heif_error_Invalid_input,
 2202|     31|              heif_suberror_Unspecified,
 2203|     31|              "Input file has a 'tref' TrackReferenceTypeBox with invalid size."};
 2204|     31|    }
 2205|       |
 2206|  2.48k|    uint64_t nRefs = dataSize / 4;
 2207|       |
 2208|  2.48k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (2208:9): [True: 2.48k, False: 0]
  |  Branch (2208:30): [True: 86, False: 2.40k]
  ------------------
 2209|     86|      std::stringstream sstr;
 2210|     86|      sstr << "Number of references in tref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 2211|       |
 2212|     86|      return {heif_error_Invalid_input,
 2213|     86|              heif_suberror_Security_limit_exceeded,
 2214|     86|              sstr.str()};
 2215|     86|    }
 2216|       |
 2217|  2.40k|    Reference ref;
 2218|  2.40k|    ref.reference_type = header.get_short_type();
 2219|       |
 2220|  17.0k|    for (uint64_t i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (2220:26): [True: 14.6k, False: 2.37k]
  ------------------
 2221|  14.6k|      if (range.eof()) {
  ------------------
  |  Branch (2221:11): [True: 28, False: 14.6k]
  ------------------
 2222|     28|        std::stringstream sstr;
 2223|     28|        sstr << "tref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 2224|       |
 2225|     28|        return {heif_error_Invalid_input,
 2226|     28|                heif_suberror_End_of_data,
 2227|     28|                sstr.str()};
 2228|     28|      }
 2229|       |
 2230|  14.6k|      ref.to_track_id.push_back(static_cast<uint32_t>(range.read32()));
 2231|  14.6k|    }
 2232|       |
 2233|  2.37k|    m_references.push_back(ref);
 2234|  2.37k|  }
 2235|       |
 2236|       |
 2237|       |  // --- check for duplicate references
 2238|       |
 2239|  1.25k|  if (auto error = check_for_double_references()) {
  ------------------
  |  Branch (2239:12): [True: 18, False: 1.23k]
  ------------------
 2240|     18|    return error;
 2241|     18|  }
 2242|       |
 2243|  1.23k|  return range.get_error();
 2244|  1.25k|}
_ZNK8Box_tref27check_for_double_referencesEv:
 2248|  1.25k|{
 2249|  2.25k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2249:24): [True: 2.25k, False: 1.23k]
  ------------------
 2250|  2.25k|    std::set<uint32_t> to_ids;
 2251|  12.7k|    for (const auto to_id : ref.to_track_id) {
  ------------------
  |  Branch (2251:27): [True: 12.7k, False: 2.23k]
  ------------------
 2252|  12.7k|      if (to_ids.find(to_id) == to_ids.end()) {
  ------------------
  |  Branch (2252:11): [True: 12.7k, False: 18]
  ------------------
 2253|  12.7k|        to_ids.insert(to_id);
 2254|  12.7k|      }
 2255|     18|      else {
 2256|     18|        return {heif_error_Invalid_input,
 2257|     18|                heif_suberror_Unspecified,
 2258|     18|                "'tref' has double references"};
 2259|     18|      }
 2260|  12.7k|    }
 2261|  2.25k|  }
 2262|       |
 2263|  1.23k|  return Error::Ok;
 2264|  1.25k|}
_ZNK8Box_tref4dumpER6Indent:
 2294|  1.13k|{
 2295|  1.13k|  std::ostringstream sstr;
 2296|  1.13k|  sstr << Box::dump(indent);
 2297|       |
 2298|  1.81k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2298:24): [True: 1.81k, False: 1.13k]
  ------------------
 2299|  1.81k|    sstr << indent << "reference with type '" << fourcc_to_string(ref.reference_type) << "'"
 2300|  1.81k|         << " to track IDs: ";
 2301|  10.9k|    for (uint32_t id : ref.to_track_id) {
  ------------------
  |  Branch (2301:22): [True: 10.9k, False: 1.81k]
  ------------------
 2302|  10.9k|      sstr << id << " ";
 2303|  10.9k|    }
 2304|  1.81k|    sstr << "\n";
 2305|  1.81k|  }
 2306|       |
 2307|  1.13k|  return sstr.str();
 2308|  1.13k|}
_ZN8Box_elst5parseER14BitstreamRangePK20heif_security_limits:
 2365|  1.04k|{
 2366|  1.04k|  Error err = parse_full_box_header(range);
 2367|  1.04k|  if (err != Error::Ok) {
  ------------------
  |  Branch (2367:7): [True: 3, False: 1.03k]
  ------------------
 2368|      3|    return err;
 2369|      3|  }
 2370|       |
 2371|  1.03k|  if (get_version() > 1) {
  ------------------
  |  Branch (2371:7): [True: 6, False: 1.03k]
  ------------------
 2372|      6|    return unsupported_version_error("edts");
 2373|      6|  }
 2374|       |
 2375|  1.03k|  uint32_t nEntries = range.read32();
 2376|  1.03k|  m_entries.clear();
 2377|       |
 2378|   326k|  for (uint64_t i = 0; i < nEntries; i++) {
  ------------------
  |  Branch (2378:24): [True: 325k, False: 949]
  ------------------
 2379|   325k|    if (range.eof()) {
  ------------------
  |  Branch (2379:9): [True: 82, False: 325k]
  ------------------
 2380|     82|      std::stringstream sstr;
 2381|     82|      sstr << "edts box should contain " << nEntries << " entries, but we can only read " << i << " entries.";
 2382|       |
 2383|     82|      return {heif_error_Invalid_input,
 2384|     82|              heif_suberror_End_of_data,
 2385|     82|              sstr.str()};
 2386|     82|    }
 2387|       |
 2388|   325k|    Entry entry{};
 2389|   325k|    if (get_version() == 1) {
  ------------------
  |  Branch (2389:9): [True: 7.02k, False: 318k]
  ------------------
 2390|  7.02k|      entry.segment_duration = range.read64();
 2391|  7.02k|      entry.media_time = range.read64s();
 2392|  7.02k|    }
 2393|   318k|    else {
 2394|   318k|      entry.segment_duration = range.read32();
 2395|   318k|      entry.media_time = range.read32s();
 2396|   318k|    }
 2397|       |
 2398|   325k|    entry.media_rate_integer = range.read16s();
 2399|   325k|    entry.media_rate_fraction = range.read16s();
 2400|       |
 2401|   325k|    m_entries.push_back(entry);
 2402|   325k|  }
 2403|       |
 2404|    949|  return range.get_error();
 2405|  1.03k|}
_ZNK8Box_elst4dumpER6Indent:
 2445|    726|{
 2446|    726|  std::ostringstream sstr;
 2447|    726|  sstr << FullBox::dump(indent);
 2448|       |
 2449|    726|  sstr << indent << "repeat list: " << ((get_flags() & Flags::Repeat_EditList) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (2449:41): [True: 32, False: 694]
  ------------------
 2450|       |
 2451|  53.3k|  for (const auto& entry : m_entries) {
  ------------------
  |  Branch (2451:26): [True: 53.3k, False: 726]
  ------------------
 2452|  53.3k|    sstr << indent << "segment duration: " << entry.segment_duration << "\n";
 2453|  53.3k|    sstr << indent << "media time: " << entry.media_time << "\n";
 2454|  53.3k|    sstr << indent << "media rate integer: " << entry.media_rate_integer << "\n";
 2455|  53.3k|    sstr << indent << "media rate fraction: " << entry.media_rate_fraction << "\n";
 2456|  53.3k|  }
 2457|       |
 2458|    726|  return sstr.str();
 2459|    726|}

_ZN13Box_containerC2EPKc:
   36|  2.77k|  {
   37|  2.77k|    set_short_type(fourcc(type));
   38|  2.77k|  }
_ZN8Box_moovC2Ev:
   50|    542|  Box_moov() : Box_container("moov") {}
_ZNK8Box_moov14debug_box_nameEv:
   52|    406|  const char* debug_box_name() const override { return "Movie"; }
_ZN8Box_mvhdC2Ev:
   60|  1.29k|  {
   61|  1.29k|    set_short_type(fourcc("mvhd"));
   62|  1.29k|  }
_ZNK8Box_mvhd14debug_box_nameEv:
   66|  1.20k|  const char* debug_box_name() const override { return "Movie Header"; }
_ZNK8Box_mvhd8get_rateEv:
   72|  1.20k|  double get_rate() const { return m_rate / double(0x10000); }
_ZNK8Box_mvhd10get_volumeEv:
   74|  1.20k|  float get_volume() const { return float(m_volume) / float(0x100); }
_ZN8Box_trakC2Ev:
  120|    622|  Box_trak() : Box_container("trak") {}
_ZNK8Box_trak14debug_box_nameEv:
  122|    367|  const char* debug_box_name() const override { return "Track"; }
_ZN8Box_tkhdC2Ev:
  130|  1.49k|  {
  131|  1.49k|    set_short_type(fourcc("tkhd"));
  132|       |
  133|       |    // set default flags according to ISO 14496-12
  134|  1.49k|    set_flags(Track_enabled | Track_in_movie | Track_in_preview);
  135|  1.49k|  }
_ZNK8Box_tkhd14debug_box_nameEv:
  146|  1.42k|  const char* debug_box_name() const override { return "Track Header"; }
_ZNK8Box_tkhd10get_volumeEv:
  152|  1.42k|  float get_volume() const { return float(m_volume) / float(0x100); }
_ZNK8Box_tkhd9get_widthEv:
  156|  1.42k|  double get_width() const { return float(m_width) / double(0x10000); }
_ZNK8Box_tkhd10get_heightEv:
  158|  1.42k|  double get_height() const { return float(m_height) / double(0x10000); }
_ZN8Box_mdiaC2Ev:
  197|     69|  Box_mdia() : Box_container("mdia") {}
_ZNK8Box_mdia14debug_box_nameEv:
  199|     67|  const char* debug_box_name() const override { return "Media"; }
_ZN8Box_mdhdC2Ev:
  207|  1.07k|  {
  208|  1.07k|    set_short_type(fourcc("mdhd"));
  209|  1.07k|  }
_ZNK8Box_mdhd14debug_box_nameEv:
  213|    923|  const char* debug_box_name() const override { return "Media Header"; }
_ZN8Box_minfC2Ev:
  245|    258|  Box_minf() : Box_container("minf") {}
_ZNK8Box_minf14debug_box_nameEv:
  247|    250|  const char* debug_box_name() const override { return "Media Information"; }
_ZN8Box_vmhdC2Ev:
  255|    719|  {
  256|    719|    set_short_type(fourcc("vmhd"));
  257|    719|    set_flags(1);
  258|    719|  }
_ZNK8Box_vmhd14debug_box_nameEv:
  262|    613|  const char* debug_box_name() const override { return "Video Media Header"; }
_ZN8Box_nmhdC2Ev:
  279|    425|  {
  280|    425|    set_short_type(fourcc("nmhd"));
  281|    425|    set_flags(1);
  282|    425|  }
_ZNK8Box_nmhd14debug_box_nameEv:
  286|    411|  const char* debug_box_name() const override { return "Null Media Header"; }
_ZN8Box_stblC2Ev:
  298|    939|  Box_stbl() : Box_container("stbl") {}
_ZNK8Box_stbl14debug_box_nameEv:
  300|    772|  const char* debug_box_name() const override { return "Sample Table"; }
_ZN8Box_stsdC2Ev:
  308|  1.74k|  {
  309|  1.74k|    set_short_type(fourcc("stsd"));
  310|  1.74k|  }
_ZNK8Box_stsd14debug_box_nameEv:
  314|  1.26k|  const char* debug_box_name() const override { return "Sample Description"; }
_ZN8Box_sttsC2Ev:
  346|  1.13k|  {
  347|  1.13k|    set_short_type(fourcc("stts"));
  348|  1.13k|  }
_ZNK8Box_stts14debug_box_nameEv:
  352|    851|  const char* debug_box_name() const override { return "Decoding Time to Sample"; }
_ZN8Box_cttsC2Ev:
  382|  1.02k|  {
  383|  1.02k|    set_short_type(fourcc("ctts"));
  384|  1.02k|  }
_ZNK8Box_ctts14debug_box_nameEv:
  388|    855|  const char* debug_box_name() const override { return "Composition Time to Sample"; }
_ZN8Box_stscC2Ev:
  422|    224|  {
  423|    224|    set_short_type(fourcc("stsc"));
  424|    224|  }
_ZNK8Box_stsc14debug_box_nameEv:
  428|     24|  const char* debug_box_name() const override { return "Sample to Chunk"; }
_ZN8Box_stcoC2Ev:
  466|  1.17k|  {
  467|  1.17k|    set_short_type(fourcc("stco"));
  468|  1.17k|  }
_ZNK8Box_stco14debug_box_nameEv:
  472|    999|  const char* debug_box_name() const override { return "Sample Offset"; }
_ZN8Box_stszC2Ev:
  499|  1.68k|  {
  500|  1.68k|    set_short_type(fourcc("stsz"));
  501|  1.68k|  }
_ZNK8Box_stsz14debug_box_nameEv:
  505|  1.52k|  const char* debug_box_name() const override { return "Sample Size"; }
_ZN8Box_stssC2Ev:
  534|    739|  {
  535|    739|    set_short_type(fourcc("stss"));
  536|    739|  }
_ZNK8Box_stss14debug_box_nameEv:
  540|    638|  const char* debug_box_name() const override { return "Sync Sample"; }
_ZN8Box_ccstC2Ev:
  573|    601|  {
  574|    601|    set_short_type(fourcc("ccst"));
  575|    601|  }
_ZNK8Box_ccst14debug_box_nameEv:
  579|    495|  const char* debug_box_name() const override { return "Coding Constraints"; }
_ZN8Box_auxiC2Ev:
  598|    805|  {
  599|    805|    set_short_type(fourcc("auxi"));
  600|    805|  }
_ZNK8Box_auxi14debug_box_nameEv:
  604|    563|  const char* debug_box_name() const override { return "Auxiliary Info Type"; }
_ZNK17VisualSampleEntry25get_horizontal_resolutionEv:
  643|  1.06k|  double get_horizontal_resolution() const { return horizresolution / double(0x10000); }
_ZNK17VisualSampleEntry23get_vertical_resolutionEv:
  645|  1.06k|  double get_vertical_resolution() const { return vertresolution / double(0x10000); }
_ZN22Box_URIMetaSampleEntryC2Ev:
  676|    839|  {
  677|    839|    set_short_type(fourcc("urim"));
  678|    839|  }
_ZNK22Box_URIMetaSampleEntry14debug_box_nameEv:
  684|    763|  const char* debug_box_name() const override { return "URI Meta Sample Entry"; }
_ZN7Box_uriC2Ev:
  699|    912|  {
  700|    912|    set_short_type(fourcc("uri "));
  701|    912|  }
_ZNK7Box_uri14debug_box_nameEv:
  711|    770|  const char* debug_box_name() const override { return "URI"; }
_ZN8Box_sbgpC2Ev:
  725|    963|  {
  726|    963|    set_short_type(fourcc("sbgp"));
  727|    963|  }
_ZNK8Box_sbgp14debug_box_nameEv:
  733|    828|  const char* debug_box_name() const override { return "Sample to Group"; }
_ZN8Box_sgpdC2Ev:
  786|  1.79k|  {
  787|  1.79k|    set_short_type(fourcc("sgpd"));
  788|  1.79k|  }
_ZNK8Box_sgpd14debug_box_nameEv:
  794|  1.69k|  const char* debug_box_name() const override { return "Sample Group Description"; }
_ZN8Box_btrtC2Ev:
  818|    838|  {
  819|    838|    set_short_type(fourcc("btrt"));
  820|    838|  }
_ZNK8Box_btrt14debug_box_nameEv:
  824|    821|  const char* debug_box_name() const override { return "Bitrate"; }
_ZN8Box_saizC2Ev:
  841|  1.18k|  {
  842|  1.18k|    set_short_type(fourcc("saiz"));
  843|  1.18k|  }
_ZNK8Box_saiz14debug_box_nameEv:
  863|    945|  const char* debug_box_name() const override { return "Sample Auxiliary Information Sizes"; }
_ZN8Box_saioC2Ev:
  884|  1.32k|  {
  885|  1.32k|    set_short_type(fourcc("saio"));
  886|  1.32k|  }
_ZNK8Box_saio14debug_box_nameEv:
  903|  1.15k|  const char* debug_box_name() const override { return "Sample Auxiliary Information Offsets"; }
_ZN8Box_sdtpC2Ev:
  929|    462|  {
  930|    462|    set_short_type(fourcc("sdtp"));
  931|    462|  }
_ZNK8Box_sdtp14debug_box_nameEv:
  935|    461|  const char* debug_box_name() const override { return "Independent and Disposable Samples"; }
_ZNK8Box_sdtp14get_is_leadingEj:
  939|  3.81M|  uint8_t get_is_leading(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 6) & 3; }
_ZNK8Box_sdtp14get_depends_onEj:
  941|  3.81M|  uint8_t get_depends_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 4) & 3; }
_ZNK8Box_sdtp18get_is_depended_onEj:
  943|  3.81M|  uint8_t get_is_depended_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 2) & 3; }
_ZNK8Box_sdtp18get_has_redundancyEj:
  945|  3.81M|  uint8_t get_has_redundancy(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx]) & 3; }
_ZN8Box_trefC2Ev:
  959|  1.40k|  {
  960|  1.40k|    set_short_type(fourcc("tref"));
  961|  1.40k|  }
_ZNK8Box_tref14debug_box_nameEv:
  970|  1.13k|  const char* debug_box_name() const override { return "Track Reference"; }
_ZN8Box_edtsC2Ev:
  997|    344|  Box_edts() : Box_container("edts") {}
_ZNK8Box_edts14debug_box_nameEv:
  999|    339|  const char* debug_box_name() const override { return "Edit List Container"; }
_ZN8Box_elstC2Ev:
 1007|  1.04k|  {
 1008|  1.04k|    set_short_type(fourcc("elst"));
 1009|  1.04k|  }
_ZNK8Box_elst14debug_box_nameEv:
 1017|    726|  const char* debug_box_name() const override { return "Edit List"; }
_ZN16SampleGroupEntryD2Ev:
  757|   102k|  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:
  205|      2|{
  206|      2|  std::lock_guard<std::mutex> lock(de265_init_mutex());
  207|       |
  208|      2|  de265_init_count++;
  209|       |
  210|      2|  if (de265_init_count > 1) {
  ------------------
  |  Branch (210:7): [True: 0, False: 2]
  ------------------
  211|       |    // we are not the first -> already initialized
  212|       |
  213|      0|    return DE265_OK;
  214|      0|  }
  215|       |
  216|       |
  217|       |  // do initializations
  218|       |
  219|      2|  init_scan_orders();
  220|       |
  221|      2|  if (!alloc_and_init_significant_coeff_ctxIdx_lookupTable()) {
  ------------------
  |  Branch (221:7): [True: 0, False: 2]
  ------------------
  222|      0|    de265_init_count--;
  223|      0|    return DE265_ERROR_LIBRARY_INITIALIZATION_FAILED;
  224|      0|  }
  225|       |
  226|      2|  return DE265_OK;
  227|      2|}
de265.cc:_ZL16de265_init_mutexv:
  198|      2|{
  199|      2|  static std::mutex de265_init_mutex;
  200|      2|  return de265_init_mutex;
  201|      2|}

_Z14get_scan_orderii:
   81|  16.3k|{
   82|  16.3k|  switch (scanIdx) {
   83|  5.44k|  case 0: return scan_d[log2BlockSize];
  ------------------
  |  Branch (83:3): [True: 5.44k, False: 10.8k]
  ------------------
   84|  5.44k|  case 1: return scan_h[log2BlockSize];
  ------------------
  |  Branch (84:3): [True: 5.44k, False: 10.8k]
  ------------------
   85|  5.44k|  case 2: return scan_v[log2BlockSize];
  ------------------
  |  Branch (85:3): [True: 5.44k, False: 10.8k]
  ------------------
   86|      0|  default: return 0; // should never happen
  ------------------
  |  Branch (86:3): [True: 0, False: 16.3k]
  ------------------
   87|  16.3k|  }
   88|  16.3k|}
_Z16init_scan_ordersv:
  136|      2|{
  137|     12|  for (int log2size=1;log2size<=5;log2size++)
  ------------------
  |  Branch (137:23): [True: 10, False: 2]
  ------------------
  138|     10|    {
  139|     10|      init_scan_h(scan_h[log2size], 1<<log2size);
  140|     10|      init_scan_v(scan_v[log2size], 1<<log2size);
  141|     10|      init_scan_d(scan_d[log2size], 1<<log2size);
  142|     10|    }
  143|       |
  144|       |
  145|     10|  for (int log2size=2;log2size<=5;log2size++)
  ------------------
  |  Branch (145:23): [True: 8, False: 2]
  ------------------
  146|     32|    for (int scanIdx=0;scanIdx<3;scanIdx++)
  ------------------
  |  Branch (146:24): [True: 24, False: 8]
  ------------------
  147|    384|      for (int y=0;y<(1<<log2size);y++)
  ------------------
  |  Branch (147:20): [True: 360, False: 24]
  ------------------
  148|  8.52k|        for (int x=0;x<(1<<log2size);x++)
  ------------------
  |  Branch (148:22): [True: 8.16k, False: 360]
  ------------------
  149|  8.16k|          {
  150|  8.16k|            fill_scan_pos(&scanpos[scanIdx][log2size][ y*(1<<log2size) + x ],x,y,scanIdx,log2size);
  151|  8.16k|          }
  152|      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:_ZL13fill_scan_posP13scan_positioniiii:
  109|  8.16k|{
  110|  8.16k|  int lastScanPos = 16;
  111|  8.16k|  int lastSubBlock = (1<<(log2TrafoSize-2)) * (1<<(log2TrafoSize-2)) -1;
  112|       |
  113|  8.16k|  const position* ScanOrderSub = get_scan_order(log2TrafoSize-2, scanIdx);
  114|  8.16k|  const position* ScanOrderPos = get_scan_order(2, scanIdx);
  115|       |
  116|  8.16k|  int xC,yC;
  117|  3.35M|  do {
  118|  3.35M|    if (lastScanPos==0) {
  ------------------
  |  Branch (118:9): [True: 205k, False: 3.15M]
  ------------------
  119|   205k|      lastScanPos=16;
  120|   205k|      lastSubBlock--;
  121|   205k|    }
  122|  3.35M|    lastScanPos--;
  123|       |
  124|  3.35M|    position S = ScanOrderSub[lastSubBlock];
  125|  3.35M|    xC = (S.x<<2) + ScanOrderPos[lastScanPos].x;
  126|  3.35M|    yC = (S.y<<2) + ScanOrderPos[lastScanPos].y;
  127|       |
  128|  3.35M|  } while ( (xC != x) || (yC != y));
  ------------------
  |  Branch (128:13): [True: 3.24M, False: 116k]
  |  Branch (128:26): [True: 108k, False: 8.16k]
  ------------------
  129|       |
  130|  8.16k|  pos->subBlock = lastSubBlock;
  131|  8.16k|  pos->scanPos  = lastScanPos;
  132|  8.16k|}

_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:
  118|      2|    {
  119|      2|      const bool debug = false; //useful for checking 
  120|       |
  121|       |      //Data in the table is arranged in this format (taken from the standard)
  122|       |      // c_q is the context for a quad
  123|       |      // rho is the significance pattern for a quad
  124|       |      // u_off indicate if u value is 0 (u_off is 0), or communicated
  125|       |      // e_k, e_1 EMB patterns
  126|       |      // cwd VLC codeword
  127|       |      // cwd VLC codeword length
  128|      2|      struct vlc_src_table { int c_q, rho, u_off, e_k, e_1, cwd, cwd_len; };
  129|       |      // initial quad rows
  130|      2|      vlc_src_table tbl0[] = {
  131|      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}
  ------------------
  132|      2|      };
  133|       |      // number of entries in the table
  134|      2|      size_t tbl0_size = sizeof(tbl0) / sizeof(vlc_src_table); 
  135|       |
  136|       |      // nono-initial quad rows
  137|      2|      vlc_src_table tbl1[] = {
  138|      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}
  ------------------
  139|      2|      };
  140|       |      // number of entries in the table
  141|      2|      size_t tbl1_size = sizeof(tbl1) / sizeof(vlc_src_table);
  142|       |
  143|      2|      if (debug) memset(vlc_tbl0, 0, sizeof(vlc_tbl0)); //unnecessary
  ------------------
  |  Branch (143:11): [Folded, False: 2]
  ------------------
  144|       |
  145|       |      // this is to convert table entries into values for decoder look up
  146|       |      // There can be at most 1024 possibilities, not all of them are valid.
  147|       |      // 
  148|  2.05k|      for (int i = 0; i < 1024; ++i)
  ------------------
  |  Branch (148:23): [True: 2.04k, False: 2]
  ------------------
  149|  2.04k|      {
  150|  2.04k|        int cwd = i & 0x7F; // from i extract codeword
  151|  2.04k|        int c_q = i >> 7;   // from i extract context
  152|       |        // See if this case exist in the table, if so then set the entry in
  153|       |        // vlc_tbl0
  154|   911k|        for (size_t j = 0; j < tbl0_size; ++j) 
  ------------------
  |  Branch (154:28): [True: 909k, False: 2.04k]
  ------------------
  155|   909k|          if (tbl0[j].c_q == c_q) // this is an and operation
  ------------------
  |  Branch (155:15): [True: 113k, False: 795k]
  ------------------
  156|   113k|            if (tbl0[j].cwd == (cwd & ((1 << tbl0[j].cwd_len) - 1)))
  ------------------
  |  Branch (156:17): [True: 2.04k, False: 111k]
  ------------------
  157|  2.04k|            {
  158|  2.04k|              if (debug) assert(vlc_tbl0[i] == 0);
  ------------------
  |  Branch (158:19): [Folded, False: 2.04k]
  ------------------
  159|       |              // Put this entry into the table
  160|  2.04k|              vlc_tbl0[i] = (ui16)((tbl0[j].rho << 4) | (tbl0[j].u_off << 3)
  161|  2.04k|                | (tbl0[j].e_k << 12) | (tbl0[j].e_1 << 8) | tbl0[j].cwd_len);
  162|  2.04k|            }
  163|  2.04k|      }
  164|       |
  165|      2|      if (debug) memset(vlc_tbl1, 0, sizeof(vlc_tbl1)); //unnecessary
  ------------------
  |  Branch (165:11): [Folded, False: 2]
  ------------------
  166|       |
  167|       |      // this the same as above but for non-initial rows
  168|  2.05k|      for (int i = 0; i < 1024; ++i)
  ------------------
  |  Branch (168:23): [True: 2.04k, False: 2]
  ------------------
  169|  2.04k|      {
  170|  2.04k|        int cwd = i & 0x7F; //7 bits
  171|  2.04k|        int c_q = i >> 7;
  172|   735k|        for (size_t j = 0; j < tbl1_size; ++j)
  ------------------
  |  Branch (172:28): [True: 733k, False: 2.04k]
  ------------------
  173|   733k|          if (tbl1[j].c_q == c_q) // this is an and operation
  ------------------
  |  Branch (173:15): [True: 91.6k, False: 641k]
  ------------------
  174|  91.6k|            if (tbl1[j].cwd == (cwd & ((1 << tbl1[j].cwd_len) - 1)))
  ------------------
  |  Branch (174:17): [True: 2.04k, False: 89.6k]
  ------------------
  175|  2.04k|            {
  176|  2.04k|              if (debug) assert(vlc_tbl1[i] == 0);
  ------------------
  |  Branch (176:19): [Folded, False: 2.04k]
  ------------------
  177|  2.04k|              vlc_tbl1[i] = (ui16)((tbl1[j].rho << 4) | (tbl1[j].u_off << 3)
  178|  2.04k|                | (tbl1[j].e_k << 12) | (tbl1[j].e_1 << 8) | tbl1[j].cwd_len);
  179|  2.04k|            }
  180|  2.04k|      }
  181|       |
  182|      2|      return true;
  183|      2|    }
ojph_block_common.cpp:_ZN4ojph5localL16uvlc_init_tablesEv:
  190|      2|    {
  191|       |      // table stores possible decoding three bits from vlc
  192|       |      // there are 8 entries for xx1, x10, 100, 000, where x means do not
  193|       |      // care table value is made up of
  194|       |      // 2 bits in the LSB for prefix length 
  195|       |      // 3 bits for suffix length
  196|       |      // 3 bits in the MSB for prefix value (u_pfx in Table 3 of ITU T.814)
  197|      2|      static const ui8 dec[8] = { // the index is the prefix codeword
  198|      2|        3 | (5 << 2) | (5 << 5), //000 == 000, prefix codeword "000"
  199|      2|        1 | (0 << 2) | (1 << 5), //001 == xx1, prefix codeword "1"
  200|      2|        2 | (0 << 2) | (2 << 5), //010 == x10, prefix codeword "01"
  201|      2|        1 | (0 << 2) | (1 << 5), //011 == xx1, prefix codeword "1"
  202|      2|        3 | (1 << 2) | (3 << 5), //100 == 100, prefix codeword "001"
  203|      2|        1 | (0 << 2) | (1 << 5), //101 == xx1, prefix codeword "1"
  204|      2|        2 | (0 << 2) | (2 << 5), //110 == x10, prefix codeword "01"
  205|      2|        1 | (0 << 2) | (1 << 5)  //111 == xx1, prefix codeword "1"
  206|      2|      };
  207|       |
  208|    642|      for (ui32 i = 0; i < 256 + 64; ++i)
  ------------------
  |  Branch (208:24): [True: 640, False: 2]
  ------------------
  209|    640|      { 
  210|    640|        ui32 mode = i >> 6;
  211|    640|        ui32 vlc = i & 0x3F;
  212|       |
  213|    640|        if (mode == 0) {      // both u_off are 0
  ------------------
  |  Branch (213:13): [True: 128, False: 512]
  ------------------
  214|    128|          uvlc_tbl0[i] = 0;
  215|    128|          uvlc_bias[i] = 0;
  216|    128|        }
  217|    512|        else if (mode <= 2) // u_off are either 01 or 10
  ------------------
  |  Branch (217:18): [True: 256, False: 256]
  ------------------
  218|    256|        {
  219|    256|          ui32 d = dec[vlc & 0x7];   //look at the least significant 3 bits
  220|       |
  221|    256|          ui32 total_prefix = d & 0x3;
  222|    256|          ui32 total_suffix = (d >> 2) & 0x7;
  223|    256|          ui32 u0_suffix_len = (mode == 1) ? total_suffix : 0;
  ------------------
  |  Branch (223:32): [True: 128, False: 128]
  ------------------
  224|    256|          ui32 u0 = (mode == 1) ? (d >> 5) : 0;
  ------------------
  |  Branch (224:21): [True: 128, False: 128]
  ------------------
  225|    256|          ui32 u1 = (mode == 1) ? 0 : (d >> 5);
  ------------------
  |  Branch (225:21): [True: 128, False: 128]
  ------------------
  226|       |
  227|    256|          uvlc_tbl0[i] = (ui16)(total_prefix | 
  228|    256|                               (total_suffix << 3) |
  229|    256|                               (u0_suffix_len << 7) |
  230|    256|                               (u0 << 10) |
  231|    256|                               (u1 << 13));
  232|       |          
  233|    256|        }
  234|    256|        else if (mode == 3) // both u_off are 1, and MEL event is 0
  ------------------
  |  Branch (234:18): [True: 128, False: 128]
  ------------------
  235|    128|        {
  236|    128|          ui32 d0 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  237|    128|          vlc >>= d0 & 0x3;          // Consume bits
  238|    128|          ui32 d1 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  239|       |
  240|    128|          ui32 total_prefix, u0_suffix_len, total_suffix, u0, u1;
  241|    128|          if ((d0 & 0x3) == 3)
  ------------------
  |  Branch (241:15): [True: 32, False: 96]
  ------------------
  242|     32|          {
  243|     32|            total_prefix = (d0 & 0x3) + 1;
  244|     32|            u0_suffix_len = (d0 >> 2) & 0x7;
  245|     32|            total_suffix = u0_suffix_len;
  246|     32|            u0 = d0 >> 5;
  247|     32|            u1 = (vlc & 1) + 1;
  248|     32|            uvlc_bias[i] = 4; // 0b00 for u0 and 0b01 for u1
  249|     32|          }
  250|     96|          else
  251|     96|          {
  252|     96|            total_prefix = (d0 & 0x3) + (d1 & 0x3);
  253|     96|            u0_suffix_len = (d0 >> 2) & 0x7;
  254|     96|            total_suffix = u0_suffix_len + ((d1 >> 2) & 0x7);
  255|     96|            u0 = d0 >> 5;
  256|     96|            u1 = d1 >> 5;
  257|     96|            uvlc_bias[i] = 0;
  258|     96|          }
  259|       |
  260|    128|          uvlc_tbl0[i] = (ui16)(total_prefix | 
  261|    128|                               (total_suffix << 3) |
  262|    128|                               (u0_suffix_len << 7) |
  263|    128|                               (u0 << 10) |
  264|    128|                               (u1 << 13));
  265|    128|        }
  266|    128|        else if (mode == 4) // both u_off are 1, and MEL event is 1
  ------------------
  |  Branch (266:18): [True: 128, False: 0]
  ------------------
  267|    128|        {
  268|    128|          ui32 d0 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  269|    128|          vlc >>= d0 & 0x3;          // Consume bits
  270|    128|          ui32 d1 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  271|       |
  272|    128|          ui32 total_prefix = (d0 & 0x3) + (d1 & 0x3);
  273|    128|          ui32 u0_suffix_len = (d0 >> 2) & 0x7;
  274|    128|          ui32 total_suffix = u0_suffix_len + ((d1 >> 2) & 0x7);
  275|    128|          ui32 u0 = (d0 >> 5) + 2;
  276|    128|          ui32 u1 = (d1 >> 5) + 2;
  277|       |
  278|    128|          uvlc_tbl0[i] = (ui16)(total_prefix | 
  279|    128|                               (total_suffix << 3) |
  280|    128|                               (u0_suffix_len << 7) |
  281|    128|                               (u0 << 10) |
  282|    128|                               (u1 << 13));
  283|    128|          uvlc_bias[i] = 10; // 0b10 for u0 and 0b10 for u1
  284|    128|        }
  285|    640|      }
  286|       |
  287|    514|      for (ui32 i = 0; i < 256; ++i)
  ------------------
  |  Branch (287:24): [True: 512, False: 2]
  ------------------
  288|    512|      {
  289|    512|        ui32 mode = i >> 6;
  290|    512|        ui32 vlc = i & 0x3F;
  291|       |
  292|    512|        if (mode == 0)       // both u_off are 0
  ------------------
  |  Branch (292:13): [True: 128, False: 384]
  ------------------
  293|    128|          uvlc_tbl1[i] = 0;
  294|    384|        else if (mode <= 2)  // u_off are either 01 or 10
  ------------------
  |  Branch (294:18): [True: 256, False: 128]
  ------------------
  295|    256|        {
  296|    256|          ui32 d = dec[vlc & 0x7];   // look at the 3 LSB bits
  297|       |
  298|    256|          ui32 total_prefix = d & 0x3;
  299|    256|          ui32 total_suffix = (d >> 2) & 0x7;
  300|    256|          ui32 u0_suffix_len = (mode == 1) ? total_suffix : 0;
  ------------------
  |  Branch (300:32): [True: 128, False: 128]
  ------------------
  301|    256|          ui32 u0 = (mode == 1) ? (d >> 5) : 0;
  ------------------
  |  Branch (301:21): [True: 128, False: 128]
  ------------------
  302|    256|          ui32 u1 = (mode == 1) ? 0 : (d >> 5);
  ------------------
  |  Branch (302:21): [True: 128, False: 128]
  ------------------
  303|       |
  304|    256|          uvlc_tbl1[i] = (ui16)(total_prefix | 
  305|    256|                               (total_suffix << 3) |
  306|    256|                               (u0_suffix_len << 7) |
  307|    256|                               (u0 << 10) |
  308|    256|                               (u1 << 13));
  309|    256|        }
  310|    128|        else if (mode == 3) // both u_off are 1
  ------------------
  |  Branch (310:18): [True: 128, False: 0]
  ------------------
  311|    128|        {
  312|    128|          ui32 d0 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  313|    128|          vlc >>= d0 & 0x3;          // Consume bits
  314|    128|          ui32 d1 = dec[vlc & 0x7];  // LSBs of VLC are prefix codeword
  315|       |
  316|    128|          ui32 total_prefix = (d0 & 0x3) + (d1 & 0x3);
  317|    128|          ui32 u0_suffix_len = (d0 >> 2) & 0x7;
  318|    128|          ui32 total_suffix = u0_suffix_len + ((d1 >> 2) & 0x7);
  319|    128|          ui32 u0 = d0 >> 5;
  320|    128|          ui32 u1 = d1 >> 5;
  321|       |
  322|    128|          uvlc_tbl1[i] = (ui16)(total_prefix | 
  323|    128|                               (total_suffix << 3) |
  324|    128|                               (u0_suffix_len << 7) |
  325|    128|                               (u0 << 10) |
  326|    128|                               (u1 << 13));
  327|    128|        }
  328|    512|      }
  329|      2|      return true;
  330|      2|    }

ojph_codestream.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codestream_local.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_params.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_tile.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_tile_comp.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_file.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_mem.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_message.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_colour.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_transform.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_colour_sse.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_transform_sse.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_colour_sse2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_transform_sse2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_colour_avx.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_transform_avx.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_colour_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_transform_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_transform_avx512.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_resolution.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_subband.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_arch.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codeblock.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codeblock_fun.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codestream_gen.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_precinct.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_decoder32.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_decoder64.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_encoder.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codestream_sse.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codestream_sse2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_decoder_ssse3.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codestream_avx.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_codestream_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_decoder_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_encoder_avx2.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }
ojph_block_encoder_avx512.cpp:_ZN4ojphL19count_leading_zerosEj:
  178|      2|  {
  179|       |  #ifdef OJPH_COMPILER_MSVC
  180|       |    unsigned long result = 0;
  181|       |    _BitScanReverse(&result, val);
  182|       |    return 31 ^ (ui32)result;
  183|       |  #elif (defined OJPH_COMPILER_GNUC)
  184|       |    return (ui32)__builtin_clz(val);
  185|       |  #else
  186|       |    val |= (val >> 1);
  187|       |    val |= (val >> 2);
  188|       |    val |= (val >> 4);
  189|       |    val |= (val >> 8);
  190|       |    val |= (val >> 16);
  191|       |    return 32 - population_count(val);
  192|       |  #endif
  193|      2|  }

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

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

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

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

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

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

_ZN5vvenc12PelBufferOpsC2Ev:
  449|      2|{
  450|      2|  isInitX86Done = false;
  451|       |
  452|      2|  addAvg            = addAvgCore<Pel>;
  453|      2|  reco              = recoCore<Pel>;
  454|      2|  copyClip          = copyClipCore<Pel>;
  455|      2|  roundGeo          = roundGeoCore<Pel>;
  456|       |
  457|      2|  addAvg4           = addAvgCore<Pel>;
  458|      2|  addAvg8           = addAvgCore<Pel>;
  459|      2|  addAvg16          = addAvgCore<Pel>;
  460|       |
  461|      2|  sub4              = subsCore<Pel>;
  462|      2|  sub8              = subsCore<Pel>;
  463|       |
  464|      2|  wghtAvg4          = addWeightedAvgCore<Pel>;
  465|      2|  wghtAvg8          = addWeightedAvgCore<Pel>;
  466|       |
  467|      2|  copyClip4         = copyClipCore<Pel>;
  468|      2|  copyClip8         = copyClipCore<Pel>;
  469|       |
  470|      2|  reco4             = reconstructCore<Pel>;
  471|      2|  reco8             = reconstructCore<Pel>;
  472|       |
  473|      2|  linTf4            = linTfCore<Pel>;
  474|      2|  linTf8            = linTfCore<Pel>;
  475|       |
  476|      2|  copyBuffer        = copyBufferCore;
  477|       |
  478|      2|  removeHighFreq8   = removeHighFreq;
  479|      2|  removeHighFreq4   = removeHighFreq;
  480|       |
  481|      2|  transpose4x4      = transposeNxNCore<Pel,4>;
  482|      2|  transpose8x8      = transposeNxNCore<Pel,8>;
  483|      2|  mipMatrixMul_4_4  = mipMatrixMulCore<4,4>;
  484|      2|  mipMatrixMul_8_4  = mipMatrixMulCore<8,4>;
  485|      2|  mipMatrixMul_8_8  = mipMatrixMulCore<8,8>;
  486|      2|  weightCiip        = weightCiipCore;
  487|      2|  roundIntVector    = nullptr;
  488|       |
  489|      2|  applyLut          = applyLutCore;
  490|       |
  491|      2|  fillPtrMap        = fillMapPtr_Core;
  492|      2|  AvgHighPassWithDownsampling = AvgHighPassWithDownsamplingCore;
  493|      2|  AvgHighPass = AvgHighPassCore;
  494|      2|  AvgHighPassWithDownsamplingDiff1st = AvgHighPassWithDownsamplingDiff1stCore;
  495|      2|  AvgHighPassWithDownsamplingDiff2nd = AvgHighPassWithDownsamplingDiff2ndCore;
  496|      2|  HDHighPass = HDHighPassCore;
  497|      2|  HDHighPass2 = HDHighPass2Core;
  498|      2|}

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

Rom.cpp:_ZN5vvencL5Clip3IiEET_S1_S1_S1_:
  570|   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,
  ------------------
  |  |  647|    656|#define CHECK(c,x)          if(c){ THROW(x); }
  |  |  ------------------
  |  |  |  |  646|      0|#define THROW(x)            throw( Exception( "ERROR: In function \"" ) << __FUNCTION__ << "\" in " << __FILE__ << ":" << __LINE__ << ": " << x )
  |  |  ------------------
  |  |  |  Branch (647:32): [True: 0, False: 656]
  |  |  ------------------
  ------------------
  185|    656|           "Number of init values do not match for all sets (" << initSet.size() << " != " << numValues << ")." );
  186|    656|    initTable.resize( startIdx + numValues );
  187|    656|    std::size_t elemId = startIdx;
  188|  3.60k|    for( auto elemIter = ( *setIter ).begin(); elemIter != ( *setIter ).end(); elemIter++, elemId++ )
  ------------------
  |  Branch (188:48): [True: 2.95k, False: 656]
  ------------------
  189|  2.95k|    {
  190|  2.95k|      initTable[elemId] = *elemIter;
  191|  2.95k|    }
  192|    656|  }
  193|    164|  return CtxSet( (uint16_t)startIdx, (uint16_t)numValues );
  194|    164|}

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

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

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

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

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

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

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

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

