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|   110k|  for (;;) {
   41|   110k|    std::shared_ptr<Box> box;
   42|   110k|    Error error = Box::read(range, &box, ctx.get_security_limits());
   43|   110k|    if (error != Error::Ok || range.error()) {
  ------------------
  |  Branch (43:9): [True: 14.7k, False: 95.5k]
  |  Branch (43:31): [True: 0, False: 95.5k]
  ------------------
   44|  14.7k|      break;
   45|  14.7k|    }
   46|       |
   47|  95.5k|    box->get_type();
   48|  95.5k|    box->get_type_string();
   49|  95.5k|    Indent indent;
   50|  95.5k|    box->dump(indent);
   51|  95.5k|  }
   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|   957k|{
  101|   957k|  return m_position;
  102|   957k|}
_ZN19StreamReader_memory18wait_for_file_sizeEm:
  105|   867k|{
  106|   867k|  return (target_size > m_length) ? grow_status::size_beyond_eof : grow_status::size_reached;
  ------------------
  |  Branch (106:10): [True: 10.3k, False: 857k]
  ------------------
  107|   867k|}
_ZN19StreamReader_memory4readEPvm:
  110|  55.3M|{
  111|  55.3M|  uint64_t end_pos = m_position + size;
  112|  55.3M|  if (end_pos > m_length) {
  ------------------
  |  Branch (112:7): [True: 0, False: 55.3M]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|  55.3M|  memcpy(data, &m_data[m_position], size);
  117|  55.3M|  m_position += size;
  118|       |
  119|  55.3M|  return true;
  120|  55.3M|}
_ZN19StreamReader_memory4seekEm:
  123|  83.9k|{
  124|  83.9k|  if (position > m_length)
  ------------------
  |  Branch (124:7): [True: 0, False: 83.9k]
  ------------------
  125|      0|    return false;
  126|       |
  127|  83.9k|  m_position = position;
  128|  83.9k|  return true;
  129|  83.9k|}
_ZN14BitstreamRangeC2ENSt3__110shared_ptrI12StreamReaderEEmPS_:
  157|   444k|    : m_istr(std::move(istr)), m_parent_range(parent), m_remaining(length)
  158|   444k|{
  159|   444k|  if (parent) {
  ------------------
  |  Branch (159:7): [True: 429k, False: 14.7k]
  ------------------
  160|   429k|    m_nesting_level = parent->m_nesting_level + 1;
  161|   429k|  }
  162|   444k|}
_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: 24.1k, False: 8.11M]
  ------------------
  207|  24.1k|    return 0;
  208|  24.1k|  }
  209|       |
  210|  8.11M|  uint8_t buf[2];
  211|       |
  212|  8.11M|  auto istr = get_istream();
  213|  8.11M|  bool success = istr->read((char*) buf, 2);
  214|       |
  215|  8.11M|  if (!success) {
  ------------------
  |  Branch (215:7): [True: 0, False: 8.11M]
  ------------------
  216|      0|    set_eof_while_reading();
  217|      0|    return 0;
  218|      0|  }
  219|       |
  220|  8.11M|  return static_cast<uint16_t>((buf[0] << 8) | (buf[1]));
  221|  8.11M|}
_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.26M|{
  261|  4.26M|  if (!prepare_read(4)) {
  ------------------
  |  Branch (261:7): [True: 187k, False: 4.07M]
  ------------------
  262|   187k|    return 0;
  263|   187k|  }
  264|       |
  265|  4.07M|  uint8_t buf[4];
  266|       |
  267|  4.07M|  auto istr = get_istream();
  268|  4.07M|  bool success = istr->read((char*) buf, 4);
  269|       |
  270|  4.07M|  if (!success) {
  ------------------
  |  Branch (270:7): [True: 0, False: 4.07M]
  ------------------
  271|      0|    set_eof_while_reading();
  272|      0|    return 0;
  273|      0|  }
  274|       |
  275|  4.07M|  return four_bytes_to_uint32(buf[0], buf[1], buf[2], buf[3]);
  276|  4.07M|}
_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|    210|    case 64:
  ------------------
  |  Branch (291:5): [True: 210, False: 1.49M]
  ------------------
  292|    210|      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.5k|{
  315|  17.5k|  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|  19.9k|{
  391|  19.9k|  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|  19.9k|  if (eof()) {
  ------------------
  |  Branch (395:7): [True: 5.68k, False: 14.2k]
  ------------------
  396|  5.68k|    return std::string();
  397|  5.68k|  }
  398|       |
  399|  14.2k|  auto istr = get_istream();
  400|       |
  401|  23.0M|  for (;;) {
  402|  23.0M|    if (!prepare_read(1)) {
  ------------------
  |  Branch (402:9): [True: 0, False: 23.0M]
  ------------------
  403|      0|      return std::string();
  404|      0|    }
  405|       |
  406|  23.0M|    char c;
  407|  23.0M|    bool success = istr->read(&c, 1);
  408|       |
  409|  23.0M|    if (!success) {
  ------------------
  |  Branch (409:9): [True: 0, False: 23.0M]
  ------------------
  410|      0|      set_eof_while_reading();
  411|      0|      return std::string();
  412|      0|    }
  413|       |
  414|  23.0M|    if (c == 0 || m_remaining==0) {
  ------------------
  |  Branch (414:9): [True: 13.9k, False: 23.0M]
  |  Branch (414:19): [True: 298, False: 23.0M]
  ------------------
  415|  14.2k|      break;
  416|  14.2k|    }
  417|  23.0M|    else {
  418|  23.0M|      str += (char) c;
  419|  23.0M|    }
  420|  23.0M|  }
  421|       |
  422|  14.2k|  return str;
  423|  14.2k|}
_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|   147k|{
  477|   147k|  if (!prepare_read(n)) {
  ------------------
  |  Branch (477:7): [True: 69, False: 147k]
  ------------------
  478|     69|    return false;
  479|     69|  }
  480|       |
  481|   147k|  auto istr = get_istream();
  482|   147k|  bool success = istr->read(data, n);
  483|       |
  484|   147k|  if (!success) {
  ------------------
  |  Branch (484:7): [True: 0, False: 147k]
  ------------------
  485|      0|    set_eof_while_reading();
  486|      0|  }
  487|       |
  488|   147k|  return success;
  489|   147k|}
_ZN14BitstreamRange12prepare_readEm:
  493|   355M|{
  494|       |  // Note: we do not test for negative nBytes anymore because we now use the unsigned size_t
  495|       |
  496|   355M|  if (m_remaining < nBytes) {
  ------------------
  |  Branch (496:7): [True: 336k, False: 355M]
  ------------------
  497|       |    // --- not enough data left in box -> move to end of box and set error flag
  498|       |
  499|   336k|    skip_to_end_of_box();
  500|       |
  501|   336k|    m_error = true;
  502|   336k|    return false;
  503|   336k|  }
  504|   355M|  else {
  505|       |    // --- this is the normal case (m_remaining >= nBytes)
  506|       |
  507|   355M|    if (m_parent_range) {
  ------------------
  |  Branch (507:9): [True: 300M, False: 55.3M]
  ------------------
  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|   355M|    m_remaining -= nBytes;
  514|       |
  515|   355M|    return true;
  516|   355M|  }
  517|   355M|}
_ZN14BitstreamRange24wait_for_available_bytesEm:
  521|   867k|{
  522|   867k|  int64_t target_size = m_istr->get_position() + nBytes;
  523|       |
  524|   867k|  return m_istr->wait_for_file_size(target_size);
  525|   867k|}
_ZN14BitstreamRange31skip_without_advancing_file_posEm:
  529|   541k|{
  530|   541k|  assert(n <= m_remaining);
  ------------------
  |  Branch (530:3): [True: 541k, False: 0]
  ------------------
  531|       |
  532|   541k|  m_remaining -= n;
  533|       |
  534|   541k|  if (m_parent_range) {
  ------------------
  |  Branch (534:7): [True: 461k, False: 80.5k]
  ------------------
  535|   461k|    m_parent_range->skip_without_advancing_file_pos(n);
  536|   461k|  }
  537|   541k|}

_ZNK14BitstreamRange5errorEv:
  374|  8.24M|  {
  375|  8.24M|    return m_error;
  376|  8.24M|  }
_ZN12StreamReader8seek_curEm:
   62|  83.9k|  {
   63|  83.9k|    return seek(get_position() + position_offset);
   64|  83.9k|  }
_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|   770k|  {
  346|   770k|    if (m_remaining > 0) {
  ------------------
  |  Branch (346:9): [True: 58.5k, False: 711k]
  ------------------
  347|  58.5k|      if (m_parent_range) {
  ------------------
  |  Branch (347:11): [True: 58.5k, False: 2]
  ------------------
  348|       |        // also advance position in parent range
  349|  58.5k|        m_parent_range->skip_without_advancing_file_pos(m_remaining);
  350|  58.5k|      }
  351|       |
  352|  58.5k|      m_istr->seek_cur(m_remaining);
  353|  58.5k|      m_remaining = 0;
  354|  58.5k|    }
  355|   770k|  }
_ZNK14BitstreamRange3eofEv:
  369|  13.1M|  {
  370|  13.1M|    return m_remaining == 0;
  371|  13.1M|  }
_ZNK14BitstreamRange9get_errorEv:
  379|  2.35M|  {
  380|  2.35M|    if (m_error) {
  ------------------
  |  Branch (380:9): [True: 9.35k, False: 2.34M]
  ------------------
  381|  9.35k|      return Error(heif_error_Invalid_input,
  382|  9.35k|                   heif_suberror_End_of_data);
  383|  9.35k|    }
  384|  2.34M|    else {
  385|  2.34M|      return Error::Ok;
  386|  2.34M|    }
  387|  2.35M|  }
_ZN14BitstreamRange11get_istreamEv:
  389|  32.7M|  std::shared_ptr<StreamReader> get_istream() { return m_istr; }
_ZNK14BitstreamRange17get_nesting_levelEv:
  391|   432k|  int get_nesting_level() const { return m_nesting_level; }
_ZNK14BitstreamRange19get_remaining_bytesEv:
  393|   512k|  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|   954k|BoxHeader::BoxHeader() = default;
_ZNK9BoxHeader8get_typeEv:
  171|  95.5k|{
  172|  95.5k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (172:7): [True: 3.06k, False: 92.4k]
  ------------------
  173|  3.06k|    return m_uuid_type;
  174|  3.06k|  }
  175|  92.4k|  else {
  176|  92.4k|    std::vector<uint8_t> type(4);
  177|  92.4k|    type[0] = static_cast<uint8_t>((m_type >> 24) & 0xFF);
  178|  92.4k|    type[1] = static_cast<uint8_t>((m_type >> 16) & 0xFF);
  179|  92.4k|    type[2] = static_cast<uint8_t>((m_type >> 8) & 0xFF);
  180|  92.4k|    type[3] = static_cast<uint8_t>((m_type >> 0) & 0xFF);
  181|  92.4k|    return type;
  182|  92.4k|  }
  183|  95.5k|}
_ZNK9BoxHeader15get_type_stringEv:
  187|   871k|{
  188|   871k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (188:7): [True: 29.0k, False: 842k]
  ------------------
  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|   493k|    for (int i = 0; i < 16; i++) {
  ------------------
  |  Branch (195:21): [True: 464k, False: 29.0k]
  ------------------
  196|   464k|      if (i == 4 || i == 6 || i == 8 || i == 10) {
  ------------------
  |  Branch (196:11): [True: 29.0k, False: 435k]
  |  Branch (196:21): [True: 29.0k, False: 406k]
  |  Branch (196:31): [True: 29.0k, False: 377k]
  |  Branch (196:41): [True: 29.0k, False: 348k]
  ------------------
  197|   116k|        sstr << '-';
  198|   116k|      }
  199|       |
  200|   464k|      sstr << std::setw(2);
  201|   464k|      sstr << ((int) m_uuid_type[i]);
  202|   464k|    }
  203|       |
  204|  29.0k|    return sstr.str();
  205|  29.0k|  }
  206|   842k|  else {
  207|   842k|    return fourcc_to_string(m_type);
  208|   842k|  }
  209|   871k|}
_ZNK9BoxHeader13get_uuid_typeEv:
  213|  38.2k|{
  214|  38.2k|  if (m_type != fourcc("uuid")) {
  ------------------
  |  Branch (214:7): [True: 0, False: 38.2k]
  ------------------
  215|      0|    return {};
  216|      0|  }
  217|       |
  218|  38.2k|  return m_uuid_type;
  219|  38.2k|}
_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|   460k|{
  231|   460k|  StreamReader::grow_status status;
  232|   460k|  status = range.wait_for_available_bytes(8);
  233|   460k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (233:7): [True: 7.44k, False: 453k]
  ------------------
  234|       |    // TODO: return recoverable error at timeout
  235|  7.44k|    return Error(heif_error_Invalid_input,
  236|  7.44k|                 heif_suberror_End_of_data);
  237|  7.44k|  }
  238|       |
  239|   453k|  m_size = range.read32();
  240|   453k|  m_type = range.read32();
  241|       |
  242|   453k|  m_header_size = 8;
  243|       |
  244|   453k|  if (m_size == 1) {
  ------------------
  |  Branch (244:7): [True: 253, False: 452k]
  ------------------
  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|   453k|  if (m_type == fourcc("uuid")) {
  ------------------
  |  Branch (268:7): [True: 14.9k, False: 438k]
  ------------------
  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|   453k|  return range.get_error();
  287|   453k|}
_ZNK9BoxHeader4dumpER6Indent:
  392|   328k|{
  393|   328k|  std::ostringstream sstr;
  394|   328k|  sstr << indent << "Box: " << get_type_string();
  395|   328k|  const char* debug_name = debug_box_name();
  396|   328k|  if (debug_name) {
  ------------------
  |  Branch (396:7): [True: 167k, False: 160k]
  ------------------
  397|   167k|    sstr << " ----- (" << debug_name << ")\n";
  398|   167k|  }
  399|   160k|  else {
  400|   160k|    sstr << " -----\n";
  401|   160k|  }
  402|       |
  403|   328k|  sstr << indent << "size: " << get_box_size() << "   (header size: " << get_header_size() << ")\n";
  404|       |
  405|   328k|  return sstr.str();
  406|   328k|}
_ZN3Box5parseER14BitstreamRangePK20heif_security_limits:
  410|  2.10k|{
  411|       |  // skip box
  412|       |
  413|  2.10k|  if (get_box_size() == size_until_end_of_file) {
  ------------------
  |  Branch (413:7): [True: 9, False: 2.09k]
  ------------------
  414|      9|    range.skip_to_end_of_file();
  415|      9|  }
  416|  2.09k|  else {
  417|  2.09k|    uint64_t content_size = get_box_size() - get_header_size();
  418|       |
  419|  2.09k|    assert(MAX_BOX_SIZE <= SIZE_MAX);
  ------------------
  |  Branch (419:5): [True: 2.09k, Folded]
  ------------------
  420|       |
  421|  2.09k|    if (content_size > MAX_BOX_SIZE) {
  ------------------
  |  Branch (421:9): [True: 0, False: 2.09k]
  ------------------
  422|      0|      return Error(heif_error_Invalid_input,
  423|      0|                   heif_suberror_Invalid_box_size);
  424|      0|    }
  425|       |
  426|  2.09k|    if (range.prepare_read(static_cast<size_t>(content_size))) {
  ------------------
  |  Branch (426:9): [True: 2.09k, False: 0]
  ------------------
  427|  2.09k|      range.get_istream()->seek_cur(get_box_size() - get_header_size());
  428|  2.09k|    }
  429|  2.09k|  }
  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.10k|  return range.get_error();
  435|  2.10k|}
_ZN7FullBox21parse_full_box_headerER14BitstreamRange:
  439|  98.4k|{
  440|  98.4k|  uint32_t data = range.read32();
  441|  98.4k|  m_version = static_cast<uint8_t>(data >> 24);
  442|  98.4k|  m_flags = data & 0x00FFFFFF;
  443|       |  //m_is_full_box = true;
  444|       |
  445|  98.4k|  m_header_size += 4;
  446|       |
  447|  98.4k|  return range.get_error();
  448|  98.4k|}
_ZN3Box4readER14BitstreamRangePNSt3__110shared_ptrIS_EEPK20heif_security_limits:
  452|   440k|{
  453|   440k|  BoxHeader hdr;
  454|   440k|  Error err = hdr.parse_header(range);
  455|   440k|  if (err) {
  ------------------
  |  Branch (455:7): [True: 7.49k, False: 432k]
  ------------------
  456|  7.49k|    return err;
  457|  7.49k|  }
  458|       |
  459|   432k|  if (range.error()) {
  ------------------
  |  Branch (459:7): [True: 0, False: 432k]
  ------------------
  460|      0|    return range.get_error();
  461|      0|  }
  462|       |
  463|   432k|  result->reset();
  464|       |
  465|   432k|  std::shared_ptr<Box> box;
  466|       |
  467|   432k|  switch (hdr.get_short_type()) {
  468|  11.5k|    case fourcc("ftyp"):
  ------------------
  |  Branch (468:5): [True: 11.5k, False: 421k]
  ------------------
  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: 432k]
  ------------------
  473|  1.13k|    case fourcc("skip"):
  ------------------
  |  Branch (473:5): [True: 390, False: 432k]
  ------------------
  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: 429k]
  ------------------
  478|  2.93k|      box = std::make_shared<Box_meta>();
  479|  2.93k|      break;
  480|       |
  481|  1.67k|    case fourcc("hdlr"):
  ------------------
  |  Branch (481:5): [True: 1.67k, False: 431k]
  ------------------
  482|  1.67k|      box = std::make_shared<Box_hdlr>();
  483|  1.67k|      break;
  484|       |
  485|  3.20k|    case fourcc("pitm"):
  ------------------
  |  Branch (485:5): [True: 3.20k, False: 429k]
  ------------------
  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: 430k]
  ------------------
  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: 428k]
  ------------------
  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: 428k]
  ------------------
  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: 401k]
  ------------------
  502|  30.8k|      box = std::make_shared<Box_iprp>();
  503|  30.8k|      break;
  504|       |
  505|  10.7k|    case fourcc("ipco"):
  ------------------
  |  Branch (505:5): [True: 10.7k, False: 422k]
  ------------------
  506|  10.7k|      box = std::make_shared<Box_ipco>();
  507|  10.7k|      break;
  508|       |
  509|  2.87k|    case fourcc("ipma"):
  ------------------
  |  Branch (509:5): [True: 2.87k, False: 429k]
  ------------------
  510|  2.87k|      box = std::make_shared<Box_ipma>();
  511|  2.87k|      break;
  512|       |
  513|  2.45k|    case fourcc("ispe"):
  ------------------
  |  Branch (513:5): [True: 2.45k, False: 430k]
  ------------------
  514|  2.45k|      box = std::make_shared<Box_ispe>();
  515|  2.45k|      break;
  516|       |
  517|  1.06k|    case fourcc("auxC"):
  ------------------
  |  Branch (517:5): [True: 1.06k, False: 431k]
  ------------------
  518|  1.06k|      box = std::make_shared<Box_auxC>();
  519|  1.06k|      break;
  520|       |
  521|  5.47k|    case fourcc("irot"):
  ------------------
  |  Branch (521:5): [True: 5.47k, False: 427k]
  ------------------
  522|  5.47k|      box = std::make_shared<Box_irot>();
  523|  5.47k|      break;
  524|       |
  525|  2.17k|    case fourcc("imir"):
  ------------------
  |  Branch (525:5): [True: 2.17k, False: 430k]
  ------------------
  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: 415k]
  ------------------
  530|  17.7k|      box = std::make_shared<Box_clap>();
  531|  17.7k|      break;
  532|       |
  533|      0|    case fourcc("iscl"):
  ------------------
  |  Branch (533:5): [True: 0, False: 432k]
  ------------------
  534|      0|      box = std::make_shared<Box_iscl>();
  535|      0|      break;
  536|       |
  537|  16.1k|    case fourcc("iref"):
  ------------------
  |  Branch (537:5): [True: 16.1k, False: 416k]
  ------------------
  538|  16.1k|      box = std::make_shared<Box_iref>();
  539|  16.1k|      break;
  540|       |
  541|      0|    case fourcc("rref"):
  ------------------
  |  Branch (541:5): [True: 0, False: 432k]
  ------------------
  542|      0|      box = std::make_shared<Box_rref>();
  543|      0|      break;
  544|       |
  545|  3.30k|    case fourcc("hvcC"):
  ------------------
  |  Branch (545:5): [True: 3.30k, False: 429k]
  ------------------
  546|  3.30k|      box = std::make_shared<Box_hvcC>();
  547|  3.30k|      break;
  548|       |
  549|    113|    case fourcc("hvc1"):
  ------------------
  |  Branch (549:5): [True: 113, False: 432k]
  ------------------
  550|    113|      box = std::make_shared<Box_hvc1>();
  551|    113|      break;
  552|       |
  553|  3.90k|    case fourcc("av1C"):
  ------------------
  |  Branch (553:5): [True: 3.90k, False: 428k]
  ------------------
  554|  3.90k|      box = std::make_shared<Box_av1C>();
  555|  3.90k|      break;
  556|       |
  557|     83|    case fourcc("av01"):
  ------------------
  |  Branch (557:5): [True: 83, False: 432k]
  ------------------
  558|     83|      box = std::make_shared<Box_av01>();
  559|     83|      break;
  560|       |
  561|  2.51k|    case fourcc("vvcC"):
  ------------------
  |  Branch (561:5): [True: 2.51k, False: 430k]
  ------------------
  562|  2.51k|      box = std::make_shared<Box_vvcC>();
  563|  2.51k|      break;
  564|       |
  565|    150|    case fourcc("vvc1"):
  ------------------
  |  Branch (565:5): [True: 150, False: 432k]
  ------------------
  566|    150|      box = std::make_shared<Box_vvc1>();
  567|    150|      break;
  568|       |
  569|  5.99k|    case fourcc("idat"):
  ------------------
  |  Branch (569:5): [True: 5.99k, False: 426k]
  ------------------
  570|  5.99k|      box = std::make_shared<Box_idat>();
  571|  5.99k|      break;
  572|       |
  573|  1.66k|    case fourcc("grpl"):
  ------------------
  |  Branch (573:5): [True: 1.66k, False: 431k]
  ------------------
  574|  1.66k|      box = std::make_shared<Box_grpl>();
  575|  1.66k|      break;
  576|       |
  577|  1.29k|    case fourcc("pymd"):
  ------------------
  |  Branch (577:5): [True: 1.29k, False: 431k]
  ------------------
  578|  1.29k|      box = std::make_shared<Box_pymd>();
  579|  1.29k|      break;
  580|       |
  581|    225|    case fourcc("altr"):
  ------------------
  |  Branch (581:5): [True: 225, False: 432k]
  ------------------
  582|    225|      box = std::make_shared<Box_EntityToGroup>();
  583|    225|      break;
  584|       |
  585|    680|    case fourcc("ster"):
  ------------------
  |  Branch (585:5): [True: 680, False: 432k]
  ------------------
  586|    680|      box = std::make_shared<Box_ster>();
  587|    680|      break;
  588|       |
  589|  6.12k|    case fourcc("dinf"):
  ------------------
  |  Branch (589:5): [True: 6.12k, False: 426k]
  ------------------
  590|  6.12k|      box = std::make_shared<Box_dinf>();
  591|  6.12k|      break;
  592|       |
  593|  1.62k|    case fourcc("dref"):
  ------------------
  |  Branch (593:5): [True: 1.62k, False: 431k]
  ------------------
  594|  1.62k|      box = std::make_shared<Box_dref>();
  595|  1.62k|      break;
  596|       |
  597|  1.81k|    case fourcc("url "):
  ------------------
  |  Branch (597:5): [True: 1.81k, False: 431k]
  ------------------
  598|  1.81k|      box = std::make_shared<Box_url>();
  599|  1.81k|      break;
  600|       |
  601|  9.23k|    case fourcc("colr"):
  ------------------
  |  Branch (601:5): [True: 9.23k, False: 423k]
  ------------------
  602|  9.23k|      box = std::make_shared<Box_colr>();
  603|  9.23k|      break;
  604|       |
  605|  3.62k|    case fourcc("pixi"):
  ------------------
  |  Branch (605:5): [True: 3.62k, False: 429k]
  ------------------
  606|  3.62k|      box = std::make_shared<Box_pixi>();
  607|  3.62k|      break;
  608|       |
  609|  15.5k|    case fourcc("pasp"):
  ------------------
  |  Branch (609:5): [True: 15.5k, False: 417k]
  ------------------
  610|  15.5k|      box = std::make_shared<Box_pasp>();
  611|  15.5k|      break;
  612|       |
  613|  7.80k|    case fourcc("lsel"):
  ------------------
  |  Branch (613:5): [True: 7.80k, False: 425k]
  ------------------
  614|  7.80k|      box = std::make_shared<Box_lsel>();
  615|  7.80k|      break;
  616|       |
  617|  13.3k|    case fourcc("a1op"):
  ------------------
  |  Branch (617:5): [True: 13.3k, False: 419k]
  ------------------
  618|  13.3k|      box = std::make_shared<Box_a1op>();
  619|  13.3k|      break;
  620|       |
  621|  5.10k|    case fourcc("a1lx"):
  ------------------
  |  Branch (621:5): [True: 5.10k, False: 427k]
  ------------------
  622|  5.10k|      box = std::make_shared<Box_a1lx>();
  623|  5.10k|      break;
  624|       |
  625|  2.16k|    case fourcc("clli"):
  ------------------
  |  Branch (625:5): [True: 2.16k, False: 430k]
  ------------------
  626|  2.16k|      box = std::make_shared<Box_clli>();
  627|  2.16k|      break;
  628|       |
  629|  5.00k|    case fourcc("mdcv"):
  ------------------
  |  Branch (629:5): [True: 5.00k, False: 427k]
  ------------------
  630|  5.00k|      box = std::make_shared<Box_mdcv>();
  631|  5.00k|      break;
  632|       |
  633|  1.02k|    case fourcc("amve"):
  ------------------
  |  Branch (633:5): [True: 1.02k, False: 431k]
  ------------------
  634|  1.02k|      box = std::make_shared<Box_amve>();
  635|  1.02k|      break;
  636|       |
  637|      0|    case fourcc("ndwt"):
  ------------------
  |  Branch (637:5): [True: 0, False: 432k]
  ------------------
  638|      0|      box = std::make_shared<Box_ndwt>();
  639|      0|      break;
  640|       |
  641|  2.14k|    case fourcc("cmin"):
  ------------------
  |  Branch (641:5): [True: 2.14k, False: 430k]
  ------------------
  642|  2.14k|      box = std::make_shared<Box_cmin>();
  643|  2.14k|      break;
  644|       |
  645|  2.24k|    case fourcc("cmex"):
  ------------------
  |  Branch (645:5): [True: 2.24k, False: 430k]
  ------------------
  646|  2.24k|      box = std::make_shared<Box_cmex>();
  647|  2.24k|      break;
  648|       |
  649|  1.85k|    case fourcc("udes"):
  ------------------
  |  Branch (649:5): [True: 1.85k, False: 430k]
  ------------------
  650|  1.85k|      box = std::make_shared<Box_udes>();
  651|  1.85k|      break;
  652|       |
  653|  5.05k|    case fourcc("jpgC"):
  ------------------
  |  Branch (653:5): [True: 5.05k, False: 427k]
  ------------------
  654|  5.05k|      box = std::make_shared<Box_jpgC>();
  655|  5.05k|      break;
  656|       |
  657|    127|    case fourcc("mjpg"):
  ------------------
  |  Branch (657:5): [True: 127, False: 432k]
  ------------------
  658|    127|      box = std::make_shared<Box_mjpg>();
  659|    127|      break;
  660|       |
  661|    761|    case fourcc("elng"):
  ------------------
  |  Branch (661:5): [True: 761, False: 432k]
  ------------------
  662|    761|      box = std::make_shared<Box_elng>();
  663|    761|      break;
  664|       |
  665|       |
  666|      0|#if WITH_UNCOMPRESSED_CODEC
  667|    811|    case fourcc("cmpd"):
  ------------------
  |  Branch (667:5): [True: 811, False: 432k]
  ------------------
  668|    811|      box = std::make_shared<Box_cmpd>();
  669|    811|      break;
  670|       |
  671|  4.67k|    case fourcc("uncC"):
  ------------------
  |  Branch (671:5): [True: 4.67k, False: 428k]
  ------------------
  672|  4.67k|      box = std::make_shared<Box_uncC>();
  673|  4.67k|      break;
  674|       |
  675|    707|    case fourcc("cmpC"):
  ------------------
  |  Branch (675:5): [True: 707, False: 432k]
  ------------------
  676|    707|      box = std::make_shared<Box_cmpC>();
  677|    707|      break;
  678|       |
  679|    810|    case fourcc("icef"):
  ------------------
  |  Branch (679:5): [True: 810, False: 432k]
  ------------------
  680|    810|      box = std::make_shared<Box_icef>();
  681|    810|      break;
  682|       |
  683|    730|    case fourcc("cpat"):
  ------------------
  |  Branch (683:5): [True: 730, False: 432k]
  ------------------
  684|    730|      box = std::make_shared<Box_cpat>();
  685|    730|      break;
  686|       |
  687|      0|    case fourcc("splz"):
  ------------------
  |  Branch (687:5): [True: 0, False: 432k]
  ------------------
  688|      0|      box = std::make_shared<Box_splz>();
  689|      0|      break;
  690|       |
  691|      0|    case fourcc("sbpm"):
  ------------------
  |  Branch (691:5): [True: 0, False: 432k]
  ------------------
  692|      0|      box = std::make_shared<Box_sbpm>();
  693|      0|      break;
  694|       |
  695|      0|    case fourcc("snuc"):
  ------------------
  |  Branch (695:5): [True: 0, False: 432k]
  ------------------
  696|      0|      box = std::make_shared<Box_snuc>();
  697|      0|      break;
  698|       |
  699|      0|    case fourcc("cloc"):
  ------------------
  |  Branch (699:5): [True: 0, False: 432k]
  ------------------
  700|      0|      box = std::make_shared<Box_cloc>();
  701|      0|      break;
  702|       |
  703|  1.16k|    case fourcc("uncv"):
  ------------------
  |  Branch (703:5): [True: 1.16k, False: 431k]
  ------------------
  704|  1.16k|      box = std::make_shared<Box_uncv>();
  705|  1.16k|      break;
  706|      0|#endif
  707|       |
  708|       |    // --- JPEG 2000
  709|       |
  710|  4.78k|    case fourcc("j2kH"):
  ------------------
  |  Branch (710:5): [True: 4.78k, False: 428k]
  ------------------
  711|  4.78k|      box = std::make_shared<Box_j2kH>();
  712|  4.78k|      break;
  713|       |
  714|  9.58k|    case fourcc("cdef"):
  ------------------
  |  Branch (714:5): [True: 9.58k, False: 423k]
  ------------------
  715|  9.58k|      box = std::make_shared<Box_cdef>();
  716|  9.58k|      break;
  717|       |
  718|  3.21k|    case fourcc("cmap"):
  ------------------
  |  Branch (718:5): [True: 3.21k, False: 429k]
  ------------------
  719|  3.21k|      box = std::make_shared<Box_cmap>();
  720|  3.21k|      break;
  721|       |
  722|  1.81k|    case fourcc("pclr"):
  ------------------
  |  Branch (722:5): [True: 1.81k, False: 431k]
  ------------------
  723|  1.81k|      box = std::make_shared<Box_pclr>();
  724|  1.81k|      break;
  725|       |
  726|    573|    case fourcc("j2kL"):
  ------------------
  |  Branch (726:5): [True: 573, False: 432k]
  ------------------
  727|    573|      box = std::make_shared<Box_j2kL>();
  728|    573|      break;
  729|       |
  730|     66|    case fourcc("j2ki"):
  ------------------
  |  Branch (730:5): [True: 66, False: 432k]
  ------------------
  731|     66|      box = std::make_shared<Box_j2ki>();
  732|     66|      break;
  733|       |
  734|       |
  735|       |    // --- mski
  736|       |
  737|    503|    case fourcc("mskC"):
  ------------------
  |  Branch (737:5): [True: 503, False: 432k]
  ------------------
  738|    503|      box = std::make_shared<Box_mskC>();
  739|    503|      break;
  740|       |
  741|       |    // --- TAI timestamps
  742|       |
  743|    714|    case fourcc("itai"):
  ------------------
  |  Branch (743:5): [True: 714, False: 432k]
  ------------------
  744|    714|      box = std::make_shared<Box_itai>();
  745|    714|      break;
  746|       |
  747|  1.62k|    case fourcc("taic"):
  ------------------
  |  Branch (747:5): [True: 1.62k, False: 431k]
  ------------------
  748|  1.62k|      box = std::make_shared<Box_taic>();
  749|  1.62k|      break;
  750|       |
  751|       |    // --- AVC (H.264)
  752|       |
  753|  4.64k|    case fourcc("avcC"):
  ------------------
  |  Branch (753:5): [True: 4.64k, False: 428k]
  ------------------
  754|  4.64k|      box = std::make_shared<Box_avcC>();
  755|  4.64k|      break;
  756|       |
  757|     69|    case fourcc("avc1"):
  ------------------
  |  Branch (757:5): [True: 69, False: 432k]
  ------------------
  758|     69|      box = std::make_shared<Box_avc1>();
  759|     69|      break;
  760|       |
  761|      0|#if HEIF_ENABLE_EXPERIMENTAL_FEATURES
  762|  1.25k|    case fourcc("tilC"):
  ------------------
  |  Branch (762:5): [True: 1.25k, False: 431k]
  ------------------
  763|  1.25k|      box = std::make_shared<Box_tilC>();
  764|  1.25k|      break;
  765|      0|#endif
  766|       |
  767|      1|    case fourcc("mini"):
  ------------------
  |  Branch (767:5): [True: 1, False: 432k]
  ------------------
  768|      1|      box = std::make_shared<Box_mini>();
  769|      1|      break;
  770|       |
  771|  2.10k|    case fourcc("mdat"):
  ------------------
  |  Branch (771:5): [True: 2.10k, False: 430k]
  ------------------
  772|       |      // avoid generating a 'Box_other'
  773|  2.10k|      box = std::make_shared<Box>();
  774|  2.10k|      break;
  775|       |
  776|  14.6k|    case fourcc("uuid"):
  ------------------
  |  Branch (776:5): [True: 14.6k, False: 418k]
  ------------------
  777|  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 (777:11): [True: 2.84k, False: 11.7k]
  ------------------
  778|  2.84k|        box = std::make_shared<Box_cmin>();
  779|  2.84k|      }
  780|  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 (780:16): [True: 4.87k, False: 6.89k]
  ------------------
  781|  4.87k|        box = std::make_shared<Box_cmex>();
  782|  4.87k|      }
  783|  6.89k|      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 (783:16): [True: 1.88k, False: 5.01k]
  ------------------
  784|  1.88k|        box = std::make_shared<Box_gimi_content_id>();
  785|  1.88k|      }
  786|  5.01k|#if WITH_UNCOMPRESSED_CODEC
  787|  5.01k|      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 (787:16): [True: 0, False: 5.01k]
  ------------------
  788|      0|        box = std::make_shared<Box_gimi_component_content_ids>();
  789|      0|      }
  790|  5.01k|#endif
  791|  5.01k|      else {
  792|  5.01k|        box = std::make_shared<Box_other>(hdr.get_short_type());
  793|  5.01k|      }
  794|  14.6k|      break;
  795|       |
  796|       |    // --- sequences
  797|       |
  798|    542|    case fourcc("moov"):
  ------------------
  |  Branch (798:5): [True: 542, False: 432k]
  ------------------
  799|    542|      box = std::make_shared<Box_moov>();
  800|    542|      break;
  801|       |
  802|  1.29k|    case fourcc("mvhd"):
  ------------------
  |  Branch (802:5): [True: 1.29k, False: 431k]
  ------------------
  803|  1.29k|      box = std::make_shared<Box_mvhd>();
  804|  1.29k|      break;
  805|       |
  806|    622|    case fourcc("trak"):
  ------------------
  |  Branch (806:5): [True: 622, False: 432k]
  ------------------
  807|    622|      box = std::make_shared<Box_trak>();
  808|    622|      break;
  809|       |
  810|  1.49k|    case fourcc("tkhd"):
  ------------------
  |  Branch (810:5): [True: 1.49k, False: 431k]
  ------------------
  811|  1.49k|      box = std::make_shared<Box_tkhd>();
  812|  1.49k|      break;
  813|       |
  814|     69|    case fourcc("mdia"):
  ------------------
  |  Branch (814:5): [True: 69, False: 432k]
  ------------------
  815|     69|      box = std::make_shared<Box_mdia>();
  816|     69|      break;
  817|       |
  818|  1.07k|    case fourcc("mdhd"):
  ------------------
  |  Branch (818:5): [True: 1.07k, False: 431k]
  ------------------
  819|  1.07k|      box = std::make_shared<Box_mdhd>();
  820|  1.07k|      break;
  821|       |
  822|    258|    case fourcc("minf"):
  ------------------
  |  Branch (822:5): [True: 258, False: 432k]
  ------------------
  823|    258|      box = std::make_shared<Box_minf>();
  824|    258|      break;
  825|       |
  826|    719|    case fourcc("vmhd"):
  ------------------
  |  Branch (826:5): [True: 719, False: 432k]
  ------------------
  827|    719|      box = std::make_shared<Box_vmhd>();
  828|    719|      break;
  829|       |
  830|    939|    case fourcc("stbl"):
  ------------------
  |  Branch (830:5): [True: 939, False: 431k]
  ------------------
  831|    939|      box = std::make_shared<Box_stbl>();
  832|    939|      break;
  833|       |
  834|  1.74k|    case fourcc("stsd"):
  ------------------
  |  Branch (834:5): [True: 1.74k, False: 431k]
  ------------------
  835|  1.74k|      box = std::make_shared<Box_stsd>();
  836|  1.74k|      break;
  837|       |
  838|  1.13k|    case fourcc("stts"):
  ------------------
  |  Branch (838:5): [True: 1.13k, False: 431k]
  ------------------
  839|  1.13k|      box = std::make_shared<Box_stts>();
  840|  1.13k|      break;
  841|       |
  842|  1.02k|    case fourcc("ctts"):
  ------------------
  |  Branch (842:5): [True: 1.02k, False: 431k]
  ------------------
  843|  1.02k|      box = std::make_shared<Box_ctts>();
  844|  1.02k|      break;
  845|       |
  846|    210|    case fourcc("stsc"):
  ------------------
  |  Branch (846:5): [True: 210, False: 432k]
  ------------------
  847|    210|      box = std::make_shared<Box_stsc>();
  848|    210|      break;
  849|       |
  850|  1.17k|    case fourcc("stco"):
  ------------------
  |  Branch (850:5): [True: 1.17k, False: 431k]
  ------------------
  851|  1.17k|      box = std::make_shared<Box_stco>();
  852|  1.17k|      break;
  853|       |
  854|    580|    case fourcc("stsz"):
  ------------------
  |  Branch (854:5): [True: 580, False: 432k]
  ------------------
  855|    580|      box = std::make_shared<Box_stsz>();
  856|    580|      break;
  857|       |
  858|    739|    case fourcc("stss"):
  ------------------
  |  Branch (858:5): [True: 739, False: 432k]
  ------------------
  859|    739|      box = std::make_shared<Box_stss>();
  860|    739|      break;
  861|       |
  862|    287|    case fourcc("ccst"):
  ------------------
  |  Branch (862:5): [True: 287, False: 432k]
  ------------------
  863|    287|      box = std::make_shared<Box_ccst>();
  864|    287|      break;
  865|       |
  866|    805|    case fourcc("auxi"):
  ------------------
  |  Branch (866:5): [True: 805, False: 432k]
  ------------------
  867|    805|      box = std::make_shared<Box_auxi>();
  868|    805|      break;
  869|       |
  870|    344|    case fourcc("edts"):
  ------------------
  |  Branch (870:5): [True: 344, False: 432k]
  ------------------
  871|    344|      box = std::make_shared<Box_edts>();
  872|    344|      break;
  873|       |
  874|  1.04k|    case fourcc("elst"):
  ------------------
  |  Branch (874:5): [True: 1.04k, False: 431k]
  ------------------
  875|  1.04k|      box = std::make_shared<Box_elst>();
  876|  1.04k|      break;
  877|       |
  878|    963|    case fourcc("sbgp"):
  ------------------
  |  Branch (878:5): [True: 963, False: 431k]
  ------------------
  879|    963|      box = std::make_shared<Box_sbgp>();
  880|    963|      break;
  881|       |
  882|  1.79k|    case fourcc("sgpd"):
  ------------------
  |  Branch (882:5): [True: 1.79k, False: 431k]
  ------------------
  883|  1.79k|      box = std::make_shared<Box_sgpd>();
  884|  1.79k|      break;
  885|       |
  886|    838|    case fourcc("btrt"):
  ------------------
  |  Branch (886:5): [True: 838, False: 431k]
  ------------------
  887|    838|      box = std::make_shared<Box_btrt>();
  888|    838|      break;
  889|       |
  890|  1.18k|    case fourcc("saiz"):
  ------------------
  |  Branch (890:5): [True: 1.18k, False: 431k]
  ------------------
  891|  1.18k|      box = std::make_shared<Box_saiz>();
  892|  1.18k|      break;
  893|       |
  894|  1.32k|    case fourcc("saio"):
  ------------------
  |  Branch (894:5): [True: 1.32k, False: 431k]
  ------------------
  895|  1.32k|      box = std::make_shared<Box_saio>();
  896|  1.32k|      break;
  897|       |
  898|    839|    case fourcc("urim"):
  ------------------
  |  Branch (898:5): [True: 839, False: 431k]
  ------------------
  899|    839|      box = std::make_shared<Box_URIMetaSampleEntry>();
  900|    839|      break;
  901|       |
  902|    912|    case fourcc("uri "):
  ------------------
  |  Branch (902:5): [True: 912, False: 431k]
  ------------------
  903|    912|      box = std::make_shared<Box_uri>();
  904|    912|      break;
  905|       |
  906|    425|    case fourcc("nmhd"):
  ------------------
  |  Branch (906:5): [True: 425, False: 432k]
  ------------------
  907|    425|      box = std::make_shared<Box_nmhd>();
  908|    425|      break;
  909|       |
  910|  1.40k|    case fourcc("tref"):
  ------------------
  |  Branch (910:5): [True: 1.40k, False: 431k]
  ------------------
  911|  1.40k|      box = std::make_shared<Box_tref>();
  912|  1.40k|      break;
  913|       |
  914|    462|    case fourcc("sdtp"):
  ------------------
  |  Branch (914:5): [True: 462, False: 432k]
  ------------------
  915|    462|      box = std::make_shared<Box_sdtp>();
  916|    462|      break;
  917|       |
  918|       |    // OMAF
  919|      0|    case fourcc("prfr"):
  ------------------
  |  Branch (919:5): [True: 0, False: 432k]
  ------------------
  920|      0|      box = std::make_shared<Box_prfr>();
  921|      0|      break;
  922|       |
  923|   127k|    default:
  ------------------
  |  Branch (923:5): [True: 127k, False: 305k]
  ------------------
  924|   127k|      box = std::make_shared<Box_other>(hdr.get_short_type());
  925|   127k|      break;
  926|   432k|  }
  927|       |
  928|   432k|  box->set_short_header(hdr);
  929|       |
  930|   432k|  box->m_debug_box_type = hdr.get_type_string(); // only for debugging
  931|       |
  932|       |
  933|   432k|  if (range.get_nesting_level() > MAX_BOX_NESTING_LEVEL) {
  ------------------
  |  Branch (933:7): [True: 3, False: 432k]
  ------------------
  934|      3|    return Error(heif_error_Memory_allocation_error,
  935|      3|                 heif_suberror_Security_limit_exceeded,
  936|      3|                 "Security limit for maximum nesting of boxes has been exceeded");
  937|      3|  }
  938|       |
  939|   432k|  if (hdr.has_fixed_box_size()) {
  ------------------
  |  Branch (939:7): [True: 379k, False: 53.3k]
  ------------------
  940|       |    // Sanity checks
  941|   379k|    if (hdr.get_box_size() < hdr.get_header_size()) {
  ------------------
  |  Branch (941:9): [True: 21, False: 379k]
  ------------------
  942|     21|      std::stringstream sstr;
  943|     21|      sstr << "Box size (" << hdr.get_box_size() << " bytes) smaller than header size ("
  944|     21|           << hdr.get_header_size() << " bytes)";
  945|       |
  946|     21|      return {heif_error_Invalid_input,
  947|     21|              heif_suberror_Invalid_box_size,
  948|     21|              sstr.str()};
  949|     21|    }
  950|       |
  951|       |    // this is >= 0 because of above condition
  952|   379k|    auto nBytes = static_cast<uint64_t>(hdr.get_box_size() - hdr.get_header_size());
  953|   379k|    if (nBytes > SIZE_MAX) {
  ------------------
  |  Branch (953:9): [True: 0, False: 379k]
  ------------------
  954|      0|      return {heif_error_Memory_allocation_error,
  955|      0|              heif_suberror_Invalid_box_size,
  956|      0|              "Box size too large"};
  957|      0|    }
  958|       |
  959|       |    // Security check: make sure that box size does not exceed int64 size.
  960|       |
  961|   379k|    if (hdr.get_box_size() > (uint64_t) std::numeric_limits<int64_t>::max()) {
  ------------------
  |  Branch (961:9): [True: 0, False: 379k]
  ------------------
  962|      0|      return {heif_error_Invalid_input,
  963|      0|              heif_suberror_Invalid_box_size};
  964|      0|    }
  965|       |
  966|       |    // --- wait for data to arrive
  967|       |
  968|   379k|    auto status = range.wait_for_available_bytes(static_cast<size_t>(nBytes));
  969|   379k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (969:9): [True: 2.91k, False: 376k]
  ------------------
  970|       |      // TODO: return recoverable error at timeout
  971|  2.91k|      return {heif_error_Invalid_input,
  972|  2.91k|              heif_suberror_End_of_data};
  973|  2.91k|    }
  974|   379k|  }
  975|       |
  976|   429k|  auto box_size = static_cast<int64_t>(hdr.get_box_size());
  977|   429k|  int64_t box_size_without_header = hdr.has_fixed_box_size() ? (box_size - hdr.get_header_size()) : (int64_t)range.get_remaining_bytes();
  ------------------
  |  Branch (977:37): [True: 376k, False: 53.3k]
  ------------------
  978|       |
  979|       |  // Box size may not be larger than remaining bytes in parent box.
  980|       |
  981|   429k|  if ((int64_t)range.get_remaining_bytes() < box_size_without_header) {
  ------------------
  |  Branch (981:7): [True: 2, False: 429k]
  ------------------
  982|      2|    return {heif_error_Invalid_input,
  983|      2|            heif_suberror_Invalid_box_size};
  984|      2|  }
  985|       |
  986|       |
  987|       |  // Create child bitstream range and read box from that range.
  988|       |
  989|   429k|  BitstreamRange boxrange(range.get_istream(),
  990|   429k|                          box_size_without_header,
  991|   429k|                          &range);
  992|       |
  993|   429k|  err = box->parse(boxrange, limits);
  994|   429k|  boxrange.skip_to_end_of_box();
  995|       |
  996|   429k|  if (err == Error::Ok) {
  ------------------
  |  Branch (996:7): [True: 398k, False: 31.1k]
  ------------------
  997|   398k|    *result = std::move(box);
  998|   398k|  }
  999|  31.1k|  else {
 1000|  31.1k|    parse_error_fatality fatality = box->get_parse_error_fatality();
 1001|       |
 1002|  31.1k|    box = std::make_shared<Box_Error>(box->get_short_type(), err, fatality);
 1003|       |
 1004|       |    // We return a Box_Error that represents the parse error.
 1005|  31.1k|    *result = std::move(box);
 1006|  31.1k|  }
 1007|       |
 1008|   429k|  return err;
 1009|   429k|}
_ZNK3Box4dumpER6Indent:
 1013|   216k|{
 1014|   216k|  std::ostringstream sstr;
 1015|       |
 1016|   216k|  sstr << BoxHeader::dump(indent);
 1017|       |
 1018|   216k|  return sstr.str();
 1019|   216k|}
_ZNK7FullBox4dumpER6Indent:
 1023|  20.5k|{
 1024|  20.5k|  std::ostringstream sstr;
 1025|       |
 1026|  20.5k|  sstr << Box::dump(indent);
 1027|       |
 1028|  20.5k|  sstr << indent << "version: " << ((int) m_version) << "\n"
 1029|  20.5k|       << indent << "flags: " << std::hex << m_flags << "\n";
 1030|       |
 1031|  20.5k|  return sstr.str();
 1032|  20.5k|}
_ZN3Box13read_childrenER14BitstreamRangejPK20heif_security_limits:
 1093|  67.6k|{
 1094|  67.6k|  uint32_t count = 0;
 1095|       |
 1096|   389k|  while (!range.eof() && !range.error()) {
  ------------------
  |  Branch (1096:10): [True: 326k, False: 62.4k]
  |  Branch (1096:26): [True: 326k, False: 0]
  ------------------
 1097|   326k|    std::shared_ptr<Box> box;
 1098|   326k|    Error error = Box::read(range, &box, limits);
 1099|   326k|    if (error != Error::Ok && (!box || box->get_parse_error_fatality() == parse_error_fatality::fatal)) {
  ------------------
  |  Branch (1099:9): [True: 26.7k, False: 299k]
  |  Branch (1099:32): [True: 193, False: 26.5k]
  |  Branch (1099:40): [True: 2.27k, False: 24.2k]
  ------------------
 1100|  2.47k|      return error;
 1101|  2.47k|    }
 1102|       |
 1103|   324k|    if (max_number == READ_CHILDREN_ALL) {
  ------------------
  |  Branch (1103:9): [True: 109k, False: 215k]
  ------------------
 1104|   109k|      uint32_t max_children;
 1105|   109k|      if (get_short_type() == fourcc("iinf")) {
  ------------------
  |  Branch (1105:11): [True: 197, False: 108k]
  ------------------
 1106|    197|        max_children = limits->max_items;
 1107|    197|      }
 1108|   108k|      else {
 1109|   108k|        max_children = limits->max_children_per_box;
 1110|   108k|      }
 1111|       |
 1112|   109k|      if (max_children && m_children.size() > max_children) {
  ------------------
  |  Branch (1112:11): [True: 109k, False: 0]
  |  Branch (1112:27): [True: 64, False: 109k]
  ------------------
 1113|     64|        std::stringstream sstr;
 1114|     64|        sstr << "Maximum number of child boxes (" << max_children << ") in '" << get_type_string() << "' box exceeded.";
 1115|       |
 1116|       |        // Sanity check.
 1117|     64|        return Error(heif_error_Memory_allocation_error,
 1118|     64|                     heif_suberror_Security_limit_exceeded,
 1119|     64|                     sstr.str());
 1120|     64|      }
 1121|   109k|    }
 1122|       |
 1123|   324k|    m_children.push_back(std::move(box));
 1124|       |
 1125|       |
 1126|       |    // count the new child and end reading new children when we reached the expected number
 1127|       |
 1128|   324k|    count++;
 1129|       |
 1130|   324k|    if (max_number != READ_CHILDREN_ALL &&
  ------------------
  |  Branch (1130:9): [True: 215k, False: 109k]
  ------------------
 1131|   215k|        count == max_number) {
  ------------------
  |  Branch (1131:9): [True: 2.61k, False: 212k]
  ------------------
 1132|  2.61k|      break;
 1133|  2.61k|    }
 1134|   324k|  }
 1135|       |
 1136|  65.0k|  return range.get_error();
 1137|  67.6k|}
_ZNK3Box13dump_childrenER6Indentb:
 1154|  58.9k|{
 1155|  58.9k|  std::ostringstream sstr;
 1156|       |
 1157|  58.9k|  bool first = true;
 1158|  58.9k|  int idx=1;
 1159|       |
 1160|  58.9k|  indent++;
 1161|   236k|  for (const auto& childBox : m_children) {
  ------------------
  |  Branch (1161:29): [True: 236k, False: 58.9k]
  ------------------
 1162|   236k|    if (first) {
  ------------------
  |  Branch (1162:9): [True: 49.2k, False: 187k]
  ------------------
 1163|  49.2k|      first = false;
 1164|  49.2k|    }
 1165|   187k|    else {
 1166|   187k|      sstr << indent << "\n";
 1167|   187k|    }
 1168|       |
 1169|   236k|    if (with_index) {
  ------------------
  |  Branch (1169:9): [True: 24.8k, False: 211k]
  ------------------
 1170|  24.8k|      sstr << indent << "index: " << idx << "\n";
 1171|  24.8k|      idx++;
 1172|  24.8k|    }
 1173|       |
 1174|   236k|    sstr << childBox->dump(indent);
 1175|   236k|  }
 1176|  58.9k|  indent--;
 1177|       |
 1178|  58.9k|  return sstr.str();
 1179|  58.9k|}
_ZN9Box_other5parseER14BitstreamRangePK20heif_security_limits:
 1203|   129k|{
 1204|   129k|  if (has_fixed_box_size()) {
  ------------------
  |  Branch (1204:7): [True: 123k, False: 6.46k]
  ------------------
 1205|   123k|    size_t len;
 1206|   123k|    if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1206:9): [True: 123k, False: 0]
  ------------------
 1207|   123k|      auto len64 = get_box_size() - get_header_size();
 1208|   123k|      if (len64 > MAX_BOX_SIZE) {
  ------------------
  |  Branch (1208:11): [True: 0, False: 123k]
  ------------------
 1209|      0|        return {heif_error_Invalid_input,
 1210|      0|                heif_suberror_Security_limit_exceeded,
 1211|      0|                "Box size too large"};
 1212|      0|      }
 1213|       |
 1214|   123k|      len = static_cast<size_t>(len64);
 1215|       |
 1216|   123k|      m_data.resize(len);
 1217|   123k|      range.read(m_data.data(), len);
 1218|   123k|    }
 1219|      0|    else {
 1220|      0|      return {heif_error_Invalid_input,
 1221|      0|              heif_suberror_Invalid_box_size};
 1222|      0|    }
 1223|   123k|  }
 1224|  6.46k|  else {
 1225|       |    // TODO: boxes until end of file (we will probably never need this)
 1226|  6.46k|  }
 1227|       |
 1228|   129k|  return range.get_error();
 1229|   129k|}
_ZNK9Box_other4dumpER6Indent:
 1249|  99.9k|{
 1250|  99.9k|  std::ostringstream sstr;
 1251|       |
 1252|  99.9k|  sstr << BoxHeader::dump(indent);
 1253|       |
 1254|       |  // --- show raw box content
 1255|       |
 1256|  99.9k|  size_t len = 0;
 1257|  99.9k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (1257:7): [True: 94.6k, False: 5.29k]
  ------------------
 1258|       |    // We can cast because if it does not fit, it would fail during parsing.
 1259|  94.6k|    len = static_cast<size_t>(get_box_size() - get_header_size());
 1260|  94.6k|  }
 1261|  5.29k|  else {
 1262|  5.29k|    sstr << indent << "invalid box size " << get_box_size() << " (smaller than header)\n";
 1263|  5.29k|    return sstr.str();
 1264|  5.29k|  }
 1265|       |
 1266|  94.6k|  sstr << write_raw_data_as_hex(m_data.data(), len,
 1267|  94.6k|                                indent.get_string() + "data: ",
 1268|  94.6k|                                indent.get_string() + "      ");
 1269|       |
 1270|  94.6k|  return sstr.str();
 1271|  99.9k|}
_ZNK9Box_Error4dumpER6Indent:
 1275|  5.57k|{
 1276|  5.57k|  std::ostringstream sstr;
 1277|  5.57k|  sstr << indent << '\'' << fourcc_to_string(m_box_type_with_parse_error) << "' parse error: " << m_error.message << "\n";
 1278|  5.57k|  sstr << indent << "fatality: ";
 1279|  5.57k|  switch (m_fatality) {
  ------------------
  |  Branch (1279:11): [True: 5.57k, False: 0]
  ------------------
 1280|      0|    case parse_error_fatality::fatal: sstr << "fatal\n"; break;
  ------------------
  |  Branch (1280:5): [True: 0, False: 5.57k]
  ------------------
 1281|  2.51k|    case parse_error_fatality::ignorable: sstr << "ignorable\n"; break;
  ------------------
  |  Branch (1281:5): [True: 2.51k, False: 3.05k]
  ------------------
 1282|  3.05k|    case parse_error_fatality::optional: sstr << "optional\n"; break;
  ------------------
  |  Branch (1282:5): [True: 3.05k, False: 2.51k]
  ------------------
 1283|  5.57k|  }
 1284|       |
 1285|  5.57k|  return sstr.str();
 1286|  5.57k|}
_ZNK9Box_Error24get_parse_error_fatalityEv:
 1289|  26.5k|{
 1290|  26.5k|  return m_fatality;
 1291|  26.5k|}
_ZN8Box_ftyp5parseER14BitstreamRangePK20heif_security_limits:
 1295|  11.5k|{
 1296|  11.5k|  m_major_brand = range.read32();
 1297|  11.5k|  m_minor_version = range.read32();
 1298|       |
 1299|  11.5k|  uint64_t box_size = get_box_size();
 1300|  11.5k|  if (box_size < 8 || box_size - 8 < get_header_size()) {
  ------------------
  |  Branch (1300:7): [True: 7, False: 11.4k]
  |  Branch (1300:23): [True: 6, False: 11.4k]
  ------------------
 1301|       |    // Sanity check.
 1302|     13|    return Error(heif_error_Invalid_input,
 1303|     13|                 heif_suberror_Invalid_box_size,
 1304|     13|                 "ftyp box too small (less than 8 bytes)");
 1305|     13|  }
 1306|       |
 1307|  11.4k|  uint64_t n_minor_brands = (get_box_size() - get_header_size() - 8) / 4;
 1308|       |
 1309|  11.4k|  if (limits->max_number_of_file_brands && n_minor_brands > limits->max_number_of_file_brands) {
  ------------------
  |  Branch (1309:7): [True: 11.4k, False: 0]
  |  Branch (1309:44): [True: 16, False: 11.4k]
  ------------------
 1310|     16|    return {
 1311|     16|      heif_error_Memory_allocation_error,
 1312|     16|      heif_suberror_Security_limit_exceeded,
 1313|     16|      "Number of minor brands in file exceeds security limit"
 1314|     16|    };
 1315|     16|  }
 1316|       |
 1317|  46.5k|  for (uint64_t i = 0; i < n_minor_brands && !range.error(); i++) {
  ------------------
  |  Branch (1317:24): [True: 35.0k, False: 11.4k]
  |  Branch (1317:46): [True: 35.0k, False: 0]
  ------------------
 1318|  35.0k|    m_compatible_brands.push_back(range.read32());
 1319|  35.0k|  }
 1320|       |
 1321|  11.4k|  return range.get_error();
 1322|  11.4k|}
_ZNK8Box_ftyp4dumpER6Indent:
 1335|  10.0k|{
 1336|  10.0k|  std::ostringstream sstr;
 1337|       |
 1338|  10.0k|  sstr << BoxHeader::dump(indent);
 1339|       |
 1340|  10.0k|  sstr << indent << "major brand: " << fourcc_to_string(m_major_brand) << "\n"
 1341|  10.0k|       << indent << "minor version: ";
 1342|  10.0k|  if (m_minor_version < ('A' << 24)) {
  ------------------
  |  Branch (1342:7): [True: 8.04k, False: 2.03k]
  ------------------
 1343|       |    // This is probably a version number
 1344|  8.04k|    sstr << m_minor_version;
 1345|  8.04k|  } else {
 1346|       |    // probably a 4CC, as used for mif3
 1347|  2.03k|    sstr << fourcc_to_string(m_minor_version);
 1348|  2.03k|  }
 1349|  10.0k|  sstr << "\n" << indent << "compatible brands: ";
 1350|       |
 1351|  10.0k|  bool first = true;
 1352|  30.4k|  for (uint32_t brand : m_compatible_brands) {
  ------------------
  |  Branch (1352:23): [True: 30.4k, False: 10.0k]
  ------------------
 1353|  30.4k|    if (first) { first = false; }
  ------------------
  |  Branch (1353:9): [True: 9.19k, False: 21.2k]
  ------------------
 1354|  21.2k|    else { sstr << ','; }
 1355|       |
 1356|  30.4k|    sstr << fourcc_to_string(brand);
 1357|  30.4k|  }
 1358|  10.0k|  sstr << "\n";
 1359|       |
 1360|  10.0k|  return sstr.str();
 1361|  10.0k|}
_ZN8Box_free5parseER14BitstreamRangePK20heif_security_limits:
 1390|  1.13k|{
 1391|  1.13k|  range.skip_to_end_of_box();
 1392|  1.13k|  return range.get_error();
 1393|  1.13k|}
_ZNK8Box_free4dumpER6Indent:
 1397|  1.00k|{
 1398|  1.00k|  std::ostringstream sstr;
 1399|  1.00k|  sstr << BoxHeader::dump(indent);
 1400|  1.00k|  return sstr.str();
 1401|  1.00k|}
_ZN8Box_meta5parseER14BitstreamRangePK20heif_security_limits:
 1413|  2.93k|{
 1414|  2.93k|  parse_full_box_header(range);
 1415|       |
 1416|  2.93k|  if (get_version() != 0) {
  ------------------
  |  Branch (1416:7): [True: 7, False: 2.93k]
  ------------------
 1417|      7|    return unsupported_version_error("meta");
 1418|      7|  }
 1419|       |
 1420|       |  /*
 1421|       |  uint64_t boxSizeLimit;
 1422|       |  if (get_box_size() == BoxHeader::size_until_end_of_file) {
 1423|       |    boxSizeLimit = sizeLimit;
 1424|       |  }
 1425|       |  else {
 1426|       |    boxSizeLimit = get_box_size() - get_header_size();
 1427|       |  }
 1428|       |  */
 1429|       |
 1430|  2.93k|  return read_children(range, READ_CHILDREN_ALL, limits);
 1431|  2.93k|}
_ZNK8Box_meta4dumpER6Indent:
 1435|  2.70k|{
 1436|  2.70k|  std::ostringstream sstr;
 1437|  2.70k|  sstr << Box::dump(indent);
 1438|  2.70k|  sstr << dump_children(indent);
 1439|       |
 1440|  2.70k|  return sstr.str();
 1441|  2.70k|}
_ZNK7FullBox25unsupported_version_errorEPKc:
 1445|  2.16k|{
 1446|  2.16k|  std::stringstream sstr;
 1447|  2.16k|  sstr << box << " box data version " << ((int) m_version) << " is not implemented yet";
 1448|       |
 1449|  2.16k|  return {heif_error_Unsupported_feature,
 1450|  2.16k|          heif_suberror_Unsupported_data_version,
 1451|  2.16k|          sstr.str()};
 1452|  2.16k|}
_ZN8Box_hdlr5parseER14BitstreamRangePK20heif_security_limits:
 1456|  1.67k|{
 1457|  1.67k|  parse_full_box_header(range);
 1458|       |
 1459|  1.67k|  if (get_version() != 0) {
  ------------------
  |  Branch (1459:7): [True: 6, False: 1.66k]
  ------------------
 1460|      6|    return unsupported_version_error("hdlr");
 1461|      6|  }
 1462|       |
 1463|  1.66k|  m_pre_defined = range.read32();
 1464|  1.66k|  m_handler_type = range.read32();
 1465|       |
 1466|  6.66k|  for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1466:19): [True: 5.00k, False: 1.66k]
  ------------------
 1467|  5.00k|    m_reserved[i] = range.read32();
 1468|  5.00k|  }
 1469|       |
 1470|  1.66k|  m_name = range.read_string();
 1471|       |
 1472|  1.66k|  return range.get_error();
 1473|  1.67k|}
_ZNK8Box_hdlr4dumpER6Indent:
 1477|  1.27k|{
 1478|  1.27k|  std::ostringstream sstr;
 1479|  1.27k|  sstr << Box::dump(indent);
 1480|  1.27k|  sstr << indent << "pre_defined: " << m_pre_defined << "\n"
 1481|  1.27k|       << indent << "handler_type: " << fourcc_to_string(m_handler_type) << "\n"
 1482|  1.27k|       << indent << "name: " << m_name << "\n";
 1483|       |
 1484|  1.27k|  return sstr.str();
 1485|  1.27k|}
_ZN8Box_pitm5parseER14BitstreamRangePK20heif_security_limits:
 1508|  3.20k|{
 1509|  3.20k|  parse_full_box_header(range);
 1510|       |
 1511|  3.20k|  if (get_version() > 1) {
  ------------------
  |  Branch (1511:7): [True: 6, False: 3.19k]
  ------------------
 1512|      6|    return unsupported_version_error("pitm");
 1513|      6|  }
 1514|       |
 1515|       |
 1516|  3.19k|  if (get_version() == 0) {
  ------------------
  |  Branch (1516:7): [True: 2.99k, False: 205]
  ------------------
 1517|  2.99k|    m_item_ID = range.read16();
 1518|  2.99k|  }
 1519|    205|  else {
 1520|    205|    m_item_ID = range.read32();
 1521|    205|  }
 1522|       |
 1523|  3.19k|  return range.get_error();
 1524|  3.20k|}
_ZNK8Box_pitm4dumpER6Indent:
 1528|  2.59k|{
 1529|  2.59k|  std::ostringstream sstr;
 1530|  2.59k|  sstr << Box::dump(indent);
 1531|  2.59k|  sstr << indent << "item_ID: " << m_item_ID << "\n";
 1532|       |
 1533|  2.59k|  return sstr.str();
 1534|  2.59k|}
_ZN8Box_iloc5parseER14BitstreamRangePK20heif_security_limits:
 1567|  2.08k|{
 1568|  2.08k|  parse_full_box_header(range);
 1569|       |
 1570|  2.08k|  if (get_version() > 2) {
  ------------------
  |  Branch (1570:7): [True: 7, False: 2.07k]
  ------------------
 1571|      7|    return unsupported_version_error("iloc");
 1572|      7|  }
 1573|       |
 1574|  2.07k|  const int version = get_version();
 1575|       |
 1576|  2.07k|  uint16_t values4 = range.read16();
 1577|       |
 1578|  2.07k|  int offset_size = (values4 >> 12) & 0xF;
 1579|  2.07k|  int length_size = (values4 >> 8) & 0xF;
 1580|  2.07k|  int base_offset_size = (values4 >> 4) & 0xF;
 1581|  2.07k|  int index_size = 0;
 1582|       |
 1583|  2.07k|  if (version == 1 || version == 2) {
  ------------------
  |  Branch (1583:7): [True: 305, False: 1.76k]
  |  Branch (1583:23): [True: 248, False: 1.52k]
  ------------------
 1584|    553|    index_size = (values4 & 0xF);
 1585|    553|  }
 1586|       |
 1587|  2.07k|  uint32_t item_count = 0;
 1588|  2.07k|  if (version < 2) {
  ------------------
  |  Branch (1588:7): [True: 1.82k, False: 248]
  ------------------
 1589|  1.82k|    item_count = range.read16();
 1590|  1.82k|  }
 1591|    248|  else if (version == 2) {
  ------------------
  |  Branch (1591:12): [True: 248, False: 0]
  ------------------
 1592|    248|    item_count = range.read32();
 1593|    248|  }
 1594|       |
 1595|       |  // Sanity check. (This might be obsolete now as we check for range.error() below).
 1596|  2.07k|  if (limits->max_items && item_count > limits->max_items) {
  ------------------
  |  Branch (1596:7): [True: 2.07k, False: 0]
  |  Branch (1596:28): [True: 9, False: 2.06k]
  ------------------
 1597|      9|    std::stringstream sstr;
 1598|      9|    sstr << "iloc box contains " << item_count << " items, which exceeds the security limit of "
 1599|      9|         << limits->max_items << " items.";
 1600|       |
 1601|      9|    return Error(heif_error_Memory_allocation_error,
 1602|      9|                 heif_suberror_Security_limit_exceeded,
 1603|      9|                 sstr.str());
 1604|      9|  }
 1605|       |
 1606|  8.40k|  for (uint32_t i = 0; i < item_count; i++) {
  ------------------
  |  Branch (1606:24): [True: 6.50k, False: 1.89k]
  ------------------
 1607|  6.50k|    Item item;
 1608|       |
 1609|  6.50k|    if (range.eof()) {
  ------------------
  |  Branch (1609:9): [True: 113, False: 6.39k]
  ------------------
 1610|    113|      std::stringstream sstr;
 1611|    113|      sstr << "iloc box should contain " << item_count << " items, but we can only read " << i << " items.";
 1612|       |
 1613|    113|      return {heif_error_Invalid_input,
 1614|    113|              heif_suberror_End_of_data,
 1615|    113|              sstr.str()};
 1616|    113|    }
 1617|       |
 1618|  6.39k|    if (version < 2) {
  ------------------
  |  Branch (1618:9): [True: 6.30k, False: 85]
  ------------------
 1619|  6.30k|      item.item_ID = range.read16();
 1620|  6.30k|    }
 1621|     85|    else if (version == 2) {
  ------------------
  |  Branch (1621:14): [True: 85, False: 0]
  ------------------
 1622|     85|      item.item_ID = range.read32();
 1623|     85|    }
 1624|       |
 1625|  6.39k|    if (version >= 1) {
  ------------------
  |  Branch (1625:9): [True: 1.35k, False: 5.04k]
  ------------------
 1626|  1.35k|      values4 = range.read16();
 1627|  1.35k|      item.construction_method = (values4 & 0xF);
 1628|  1.35k|    }
 1629|       |
 1630|  6.39k|    item.data_reference_index = range.read16();
 1631|       |
 1632|  6.39k|    item.base_offset = 0;
 1633|  6.39k|    if (base_offset_size == 4) {
  ------------------
  |  Branch (1633:9): [True: 1.11k, False: 5.28k]
  ------------------
 1634|  1.11k|      item.base_offset = range.read32();
 1635|  1.11k|    }
 1636|  5.28k|    else if (base_offset_size == 8) {
  ------------------
  |  Branch (1636:14): [True: 199, False: 5.08k]
  ------------------
 1637|    199|      item.base_offset = ((uint64_t) range.read32()) << 32;
 1638|    199|      item.base_offset |= range.read32();
 1639|    199|    }
 1640|       |
 1641|  6.39k|    uint16_t extent_count = range.read16();
 1642|       |
 1643|       |    // Sanity check.
 1644|  6.39k|    auto max_iloc_extents = limits->max_iloc_extents_per_item;
 1645|  6.39k|    if (max_iloc_extents && extent_count > max_iloc_extents) {
  ------------------
  |  Branch (1645:9): [True: 6.39k, False: 0]
  |  Branch (1645:29): [True: 15, False: 6.37k]
  ------------------
 1646|     15|      std::stringstream sstr;
 1647|     15|      sstr << "Number of extents in iloc box (" << extent_count << ") exceeds security limit ("
 1648|     15|           << max_iloc_extents << ")\n";
 1649|       |
 1650|     15|      return Error(heif_error_Memory_allocation_error,
 1651|     15|                   heif_suberror_Security_limit_exceeded,
 1652|     15|                   sstr.str());
 1653|     15|    }
 1654|       |
 1655|  21.5k|    for (int e = 0; e < extent_count; e++) {
  ------------------
  |  Branch (1655:21): [True: 15.2k, False: 6.33k]
  ------------------
 1656|  15.2k|      Extent extent;
 1657|       |
 1658|  15.2k|      if (range.eof()) {
  ------------------
  |  Branch (1658:11): [True: 40, False: 15.2k]
  ------------------
 1659|     40|        std::stringstream sstr;
 1660|     40|        sstr << "iloc item should contain " << extent_count << " extents, but we can only read " << e << " extents.";
 1661|       |
 1662|     40|        return {heif_error_Invalid_input,
 1663|     40|                heif_suberror_End_of_data,
 1664|     40|                sstr.str()};
 1665|     40|      }
 1666|       |
 1667|  15.2k|      if ((version == 1 || version == 2) && index_size > 0) {
  ------------------
  |  Branch (1667:12): [True: 1.67k, False: 13.5k]
  |  Branch (1667:28): [True: 324, False: 13.2k]
  |  Branch (1667:45): [True: 953, False: 1.04k]
  ------------------
 1668|    953|        if (index_size == 4) {
  ------------------
  |  Branch (1668:13): [True: 278, False: 675]
  ------------------
 1669|    278|          extent.index = range.read32();
 1670|    278|        }
 1671|    675|        else if (index_size == 8) {
  ------------------
  |  Branch (1671:18): [True: 352, False: 323]
  ------------------
 1672|    352|          extent.index = ((uint64_t) range.read32()) << 32;
 1673|    352|          extent.index |= range.read32();
 1674|    352|        }
 1675|    953|      }
 1676|       |
 1677|  15.2k|      extent.offset = 0;
 1678|  15.2k|      if (offset_size == 4) {
  ------------------
  |  Branch (1678:11): [True: 1.01k, False: 14.1k]
  ------------------
 1679|  1.01k|        extent.offset = range.read32();
 1680|  1.01k|      }
 1681|  14.1k|      else if (offset_size == 8) {
  ------------------
  |  Branch (1681:16): [True: 194, False: 13.9k]
  ------------------
 1682|    194|        extent.offset = ((uint64_t) range.read32()) << 32;
 1683|    194|        extent.offset |= range.read32();
 1684|    194|      }
 1685|       |
 1686|       |
 1687|  15.2k|      extent.length = 0;
 1688|  15.2k|      if (length_size == 4) {
  ------------------
  |  Branch (1688:11): [True: 1.01k, False: 14.1k]
  ------------------
 1689|  1.01k|        extent.length = range.read32();
 1690|  1.01k|      }
 1691|  14.1k|      else if (length_size == 8) {
  ------------------
  |  Branch (1691:16): [True: 195, False: 13.9k]
  ------------------
 1692|    195|        extent.length = ((uint64_t) range.read32()) << 32;
 1693|    195|        extent.length |= range.read32();
 1694|    195|      }
 1695|       |
 1696|  15.2k|      item.extents.push_back(extent);
 1697|  15.2k|    }
 1698|       |
 1699|  6.33k|    if (!range.error()) {
  ------------------
  |  Branch (1699:9): [True: 6.25k, False: 87]
  ------------------
 1700|  6.25k|      m_items.push_back(item);
 1701|  6.25k|    }
 1702|  6.33k|  }
 1703|       |
 1704|  1.89k|  return range.get_error();
 1705|  2.06k|}
_ZN8Box_ilocC2Ev:
 1709|  2.08k|{
 1710|  2.08k|  set_short_type(fourcc("iloc"));
 1711|       |
 1712|  2.08k|  set_use_tmp_file(false);
 1713|  2.08k|}
_ZN8Box_ilocD2Ev:
 1717|  2.08k|{
 1718|  2.08k|  if (m_use_tmpfile) {
  ------------------
  |  Branch (1718:7): [True: 0, False: 2.08k]
  ------------------
 1719|      0|    unlink(m_tmp_filename);
 1720|      0|  }
 1721|  2.08k|}
_ZN8Box_iloc16set_use_tmp_fileEb:
 1725|  2.08k|{
 1726|  2.08k|  m_use_tmpfile = flag;
 1727|  2.08k|  if (flag) {
  ------------------
  |  Branch (1727:7): [True: 0, False: 2.08k]
  ------------------
 1728|      0|#if !defined(_WIN32)
 1729|      0|    strcpy(m_tmp_filename, "/tmp/libheif-XXXXXX");
 1730|      0|    m_tmpfile_fd = mkstemp(m_tmp_filename);
 1731|       |#else
 1732|       |    // TODO Currently unused code. Implement when needed.
 1733|       |    assert(false);
 1734|       |#  if 0
 1735|       |    char tmpname[L_tmpnam_s];
 1736|       |    // TODO: check return value (errno_t)
 1737|       |    tmpnam_s(tmpname, L_tmpnam_s);
 1738|       |    _sopen_s(&m_tmpfile_fd, tmpname, _O_CREAT | _O_TEMPORARY | _O_TRUNC | _O_RDWR, _SH_DENYRW, _S_IREAD | _S_IWRITE);
 1739|       |#  endif
 1740|       |#endif
 1741|      0|  }
 1742|  2.08k|}
_ZNK8Box_iloc4dumpER6Indent:
 1746|  1.58k|{
 1747|  1.58k|  std::ostringstream sstr;
 1748|  1.58k|  sstr << Box::dump(indent);
 1749|       |
 1750|  3.44k|  for (const Item& item : m_items) {
  ------------------
  |  Branch (1750:25): [True: 3.44k, False: 1.58k]
  ------------------
 1751|  3.44k|    sstr << indent << "item ID: " << item.item_ID << "\n"
 1752|  3.44k|         << indent << "  construction method: " << ((int) item.construction_method) << "\n"
 1753|  3.44k|         << indent << "  data_reference_index: " << std::hex
 1754|  3.44k|         << item.data_reference_index << std::dec << "\n"
 1755|  3.44k|         << indent << "  base_offset: " << item.base_offset << "\n";
 1756|       |
 1757|  3.44k|    sstr << indent << "  extents: ";
 1758|  7.60k|    for (const Extent& extent : item.extents) {
  ------------------
  |  Branch (1758:31): [True: 7.60k, False: 3.44k]
  ------------------
 1759|  7.60k|      sstr << extent.offset << "," << extent.length;
 1760|  7.60k|      if (extent.index != 0) {
  ------------------
  |  Branch (1760:11): [True: 298, False: 7.31k]
  ------------------
 1761|    298|        sstr << ";index=" << extent.index;
 1762|    298|      }
 1763|  7.60k|      sstr << " ";
 1764|  7.60k|    }
 1765|  3.44k|    sstr << "\n";
 1766|  3.44k|  }
 1767|       |
 1768|  1.58k|  return sstr.str();
 1769|  1.58k|}
_ZN8Box_infe5parseER14BitstreamRangePK20heif_security_limits:
 2388|  4.40k|{
 2389|  4.40k|  parse_full_box_header(range);
 2390|       |
 2391|       |  // only versions 2,3 are required by HEIF
 2392|  4.40k|  if (get_version() > 3) {
  ------------------
  |  Branch (2392:7): [True: 6, False: 4.39k]
  ------------------
 2393|      6|    return unsupported_version_error("infe");
 2394|      6|  }
 2395|       |
 2396|  4.39k|  if (get_version() <= 1) {
  ------------------
  |  Branch (2396:7): [True: 236, False: 4.16k]
  ------------------
 2397|    236|    m_item_ID = range.read16();
 2398|    236|    m_item_protection_index = range.read16();
 2399|       |
 2400|    236|    m_item_name = range.read_string();
 2401|    236|    m_content_type = range.read_string();
 2402|    236|    m_content_encoding = range.read_string();
 2403|    236|  }
 2404|       |
 2405|  4.39k|  m_item_type_4cc = 0;
 2406|       |
 2407|  4.39k|  if (get_version() >= 2) {
  ------------------
  |  Branch (2407:7): [True: 4.16k, False: 236]
  ------------------
 2408|  4.16k|    m_hidden_item = (get_flags() & 1);
 2409|       |
 2410|  4.16k|    if (get_version() == 2) {
  ------------------
  |  Branch (2410:9): [True: 3.95k, False: 202]
  ------------------
 2411|  3.95k|      m_item_ID = range.read16();
 2412|  3.95k|    }
 2413|    202|    else {
 2414|    202|      m_item_ID = range.read32();
 2415|    202|    }
 2416|       |
 2417|  4.16k|    m_item_protection_index = range.read16();
 2418|  4.16k|    m_item_type_4cc = range.read32();
 2419|       |
 2420|  4.16k|    m_item_name = range.read_string();
 2421|  4.16k|    if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2421:9): [True: 515, False: 3.64k]
  ------------------
 2422|    515|      m_content_type = range.read_string();
 2423|    515|      m_content_encoding = range.read_string();
 2424|    515|    }
 2425|  3.64k|    else if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2425:14): [True: 798, False: 2.84k]
  ------------------
 2426|    798|      m_item_uri_type = range.read_string();
 2427|    798|    }
 2428|  4.16k|  }
 2429|       |
 2430|  4.39k|  return range.get_error();
 2431|  4.40k|}
_ZNK8Box_infe4dumpER6Indent:
 2509|  3.85k|{
 2510|  3.85k|  std::ostringstream sstr;
 2511|  3.85k|  sstr << Box::dump(indent);
 2512|       |
 2513|  3.85k|  sstr << indent << "item_ID: " << m_item_ID << "\n"
 2514|  3.85k|       << indent << "item_protection_index: " << m_item_protection_index << "\n"
 2515|  3.85k|       << indent << "item_type: " << fourcc_to_string(m_item_type_4cc) << "\n"
 2516|  3.85k|       << indent << "item_name: " << m_item_name << "\n";
 2517|       |
 2518|  3.85k|  if (m_item_type_4cc == fourcc("mime")) {
  ------------------
  |  Branch (2518:7): [True: 470, False: 3.38k]
  ------------------
 2519|    470|    sstr << indent << "content_type: " << m_content_type << "\n"
 2520|    470|         << indent << "content_encoding: " << m_content_encoding << "\n";
 2521|    470|  }
 2522|       |
 2523|  3.85k|  if (m_item_type_4cc == fourcc("uri ")) {
  ------------------
  |  Branch (2523:7): [True: 798, False: 3.05k]
  ------------------
 2524|    798|    sstr << indent << "item uri type: " << m_item_uri_type << "\n";
 2525|    798|  }
 2526|       |
 2527|  3.85k|  sstr << indent << "hidden item: " << std::boolalpha << m_hidden_item << "\n";
 2528|       |
 2529|  3.85k|  return sstr.str();
 2530|  3.85k|}
_ZN8Box_iinf5parseER14BitstreamRangePK20heif_security_limits:
 2534|  3.92k|{
 2535|  3.92k|  parse_full_box_header(range);
 2536|       |
 2537|       |  // TODO: there are several images in circulation that have an iinf version=2. We should not enforce this with a hard error.
 2538|  3.92k|  if (false && get_version() > 1) {
  ------------------
  |  Branch (2538:7): [Folded, False: 3.92k]
  |  Branch (2538:16): [True: 0, False: 0]
  ------------------
 2539|      0|    return unsupported_version_error("iinf");
 2540|      0|  }
 2541|       |
 2542|  3.92k|  int nEntries_size = (get_version() > 0) ? 4 : 2;
  ------------------
  |  Branch (2542:23): [True: 909, False: 3.01k]
  ------------------
 2543|       |
 2544|  3.92k|  uint32_t item_count;
 2545|  3.92k|  if (nEntries_size == 2) {
  ------------------
  |  Branch (2545:7): [True: 3.01k, False: 909]
  ------------------
 2546|  3.01k|    item_count = range.read16();
 2547|  3.01k|  }
 2548|    909|  else {
 2549|    909|    item_count = range.read32();
 2550|    909|  }
 2551|       |
 2552|  3.92k|  if (item_count == 0) {
  ------------------
  |  Branch (2552:7): [True: 697, False: 3.22k]
  ------------------
 2553|    697|    return Error::Ok;
 2554|    697|  }
 2555|       |
 2556|  3.22k|  return read_children(range, item_count, limits);
 2557|  3.92k|}
_ZNK8Box_iinf4dumpER6Indent:
 2561|  3.12k|{
 2562|  3.12k|  std::ostringstream sstr;
 2563|  3.12k|  sstr << Box::dump(indent);
 2564|       |
 2565|  3.12k|  sstr << dump_children(indent);
 2566|       |
 2567|  3.12k|  return sstr.str();
 2568|  3.12k|}
_ZN8Box_iprp5parseER14BitstreamRangePK20heif_security_limits:
 2572|  30.8k|{
 2573|       |  //parse_full_box_header(range);
 2574|       |
 2575|  30.8k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2576|  30.8k|}
_ZNK8Box_iprp4dumpER6Indent:
 2608|  26.5k|{
 2609|  26.5k|  std::ostringstream sstr;
 2610|  26.5k|  sstr << Box::dump(indent);
 2611|       |
 2612|  26.5k|  sstr << dump_children(indent);
 2613|       |
 2614|  26.5k|  return sstr.str();
 2615|  26.5k|}
_ZN8Box_ipco5parseER14BitstreamRangePK20heif_security_limits:
 2630|  10.7k|{
 2631|       |  //parse_full_box_header(range);
 2632|       |
 2633|  10.7k|  return read_children(range, READ_CHILDREN_ALL, limits);
 2634|  10.7k|}
_ZNK8Box_ipco4dumpER6Indent:
 2638|  9.67k|{
 2639|  9.67k|  std::ostringstream sstr;
 2640|  9.67k|  sstr << Box::dump(indent);
 2641|       |
 2642|  9.67k|  sstr << dump_children(indent, true);
 2643|       |
 2644|  9.67k|  return sstr.str();
 2645|  9.67k|}
_ZN8Box_pixi5parseER14BitstreamRangePK20heif_security_limits:
 2649|  3.62k|{
 2650|  3.62k|  parse_full_box_header(range);
 2651|       |
 2652|  3.62k|  if (get_version() != 0) {
  ------------------
  |  Branch (2652:7): [True: 419, False: 3.20k]
  ------------------
 2653|    419|    return unsupported_version_error("pixi");
 2654|    419|  }
 2655|       |
 2656|  3.20k|  StreamReader::grow_status status;
 2657|  3.20k|  uint8_t num_channels = range.read8();
 2658|  3.20k|  status = range.wait_for_available_bytes(num_channels);
 2659|  3.20k|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (2659:7): [True: 27, False: 3.17k]
  ------------------
 2660|       |    // TODO: return recoverable error at timeout
 2661|     27|    return Error(heif_error_Invalid_input,
 2662|     27|                 heif_suberror_End_of_data);
 2663|     27|  }
 2664|       |
 2665|  3.17k|  m_bits_per_channel.resize(num_channels);
 2666|  30.0k|  for (int i = 0; i < num_channels; i++) {
  ------------------
  |  Branch (2666:19): [True: 26.8k, False: 3.17k]
  ------------------
 2667|  26.8k|    m_bits_per_channel[i] = range.read8();
 2668|  26.8k|  }
 2669|       |
 2670|  3.17k|  return range.get_error();
 2671|  3.20k|}
_ZNK8Box_pixi4dumpER6Indent:
 2675|  2.27k|{
 2676|  2.27k|  std::ostringstream sstr;
 2677|  2.27k|  sstr << Box::dump(indent);
 2678|       |
 2679|  2.27k|  sstr << indent << "bits_per_channel: ";
 2680|       |
 2681|  9.25k|  for (size_t i = 0; i < m_bits_per_channel.size(); i++) {
  ------------------
  |  Branch (2681:22): [True: 6.98k, False: 2.27k]
  ------------------
 2682|  6.98k|    if (i > 0) sstr << ",";
  ------------------
  |  Branch (2682:9): [True: 4.94k, False: 2.03k]
  ------------------
 2683|  6.98k|    sstr << ((int) m_bits_per_channel[i]);
 2684|  6.98k|  }
 2685|       |
 2686|  2.27k|  sstr << "\n";
 2687|       |
 2688|  2.27k|  return sstr.str();
 2689|  2.27k|}
_ZN8Box_pasp5parseER14BitstreamRangePK20heif_security_limits:
 2714|  15.5k|{
 2715|       |  //parse_full_box_header(range);
 2716|       |
 2717|  15.5k|  hSpacing = range.read32();
 2718|  15.5k|  vSpacing = range.read32();
 2719|       |
 2720|  15.5k|  return range.get_error();
 2721|  15.5k|}
_ZNK8Box_pasp4dumpER6Indent:
 2725|  13.4k|{
 2726|  13.4k|  std::ostringstream sstr;
 2727|  13.4k|  sstr << Box::dump(indent);
 2728|       |
 2729|  13.4k|  sstr << indent << "hSpacing: " << hSpacing << "\n";
 2730|  13.4k|  sstr << indent << "vSpacing: " << vSpacing << "\n";
 2731|       |
 2732|  13.4k|  return sstr.str();
 2733|  13.4k|}
_ZN8Box_lsel5parseER14BitstreamRangePK20heif_security_limits:
 2750|  7.79k|{
 2751|  7.79k|  layer_id = range.read16();
 2752|       |
 2753|  7.79k|  return range.get_error();
 2754|  7.79k|}
_ZNK8Box_lsel4dumpER6Indent:
 2758|  6.19k|{
 2759|  6.19k|  std::ostringstream sstr;
 2760|  6.19k|  sstr << Box::dump(indent);
 2761|       |
 2762|  6.19k|  sstr << indent << "layer_id: " << layer_id << "\n";
 2763|       |
 2764|  6.19k|  return sstr.str();
 2765|  6.19k|}
_ZN8Box_clli5parseER14BitstreamRangePK20heif_security_limits:
 2781|  2.16k|{
 2782|       |  //parse_full_box_header(range);
 2783|       |
 2784|  2.16k|  clli.max_content_light_level = range.read16();
 2785|  2.16k|  clli.max_pic_average_light_level = range.read16();
 2786|       |
 2787|  2.16k|  return range.get_error();
 2788|  2.16k|}
_ZNK8Box_clli4dumpER6Indent:
 2792|  1.91k|{
 2793|  1.91k|  std::ostringstream sstr;
 2794|  1.91k|  sstr << Box::dump(indent);
 2795|       |
 2796|  1.91k|  sstr << indent << "max_content_light_level: " << clli.max_content_light_level << "\n";
 2797|  1.91k|  sstr << indent << "max_pic_average_light_level: " << clli.max_pic_average_light_level << "\n";
 2798|       |
 2799|  1.91k|  return sstr.str();
 2800|  1.91k|}
_ZN8Box_mdcvC2Ev:
 2817|  5.00k|{
 2818|  5.00k|  set_short_type(fourcc("mdcv"));
 2819|       |
 2820|  5.00k|  memset(&mdcv, 0, sizeof(heif_mastering_display_colour_volume));
 2821|  5.00k|}
_ZN8Box_mdcv5parseER14BitstreamRangePK20heif_security_limits:
 2825|  5.00k|{
 2826|       |  //parse_full_box_header(range);
 2827|       |
 2828|  20.0k|  for (int c = 0; c < 3; c++) {
  ------------------
  |  Branch (2828:19): [True: 15.0k, False: 5.00k]
  ------------------
 2829|  15.0k|    mdcv.display_primaries_x[c] = range.read16();
 2830|  15.0k|    mdcv.display_primaries_y[c] = range.read16();
 2831|  15.0k|  }
 2832|       |
 2833|  5.00k|  mdcv.white_point_x = range.read16();
 2834|  5.00k|  mdcv.white_point_y = range.read16();
 2835|  5.00k|  mdcv.max_display_mastering_luminance = range.read32();
 2836|  5.00k|  mdcv.min_display_mastering_luminance = range.read32();
 2837|       |
 2838|  5.00k|  return range.get_error();
 2839|  5.00k|}
_ZNK8Box_mdcv4dumpER6Indent:
 2843|  3.10k|{
 2844|  3.10k|  std::ostringstream sstr;
 2845|  3.10k|  sstr << Box::dump(indent);
 2846|       |
 2847|  3.10k|  sstr << indent << "display_primaries (x,y): ";
 2848|  3.10k|  sstr << "(" << mdcv.display_primaries_x[0] << ";" << mdcv.display_primaries_y[0] << "), ";
 2849|  3.10k|  sstr << "(" << mdcv.display_primaries_x[1] << ";" << mdcv.display_primaries_y[1] << "), ";
 2850|  3.10k|  sstr << "(" << mdcv.display_primaries_x[2] << ";" << mdcv.display_primaries_y[2] << ")\n";
 2851|       |
 2852|  3.10k|  sstr << indent << "white point (x,y): (" << mdcv.white_point_x << ";" << mdcv.white_point_y << ")\n";
 2853|  3.10k|  sstr << indent << "max display mastering luminance: " << mdcv.max_display_mastering_luminance << "\n";
 2854|  3.10k|  sstr << indent << "min display mastering luminance: " << mdcv.min_display_mastering_luminance << "\n";
 2855|       |
 2856|  3.10k|  return sstr.str();
 2857|  3.10k|}
_ZN8Box_amveC2Ev:
 2881|  1.02k|{
 2882|  1.02k|  set_short_type(fourcc("amve"));
 2883|       |
 2884|       |  // These values are not valid.
 2885|  1.02k|  amve.ambient_illumination = 0;
 2886|  1.02k|  amve.ambient_light_x = 0;
 2887|  1.02k|  amve.ambient_light_y = 0;
 2888|  1.02k|}
_ZN8Box_amve5parseER14BitstreamRangePK20heif_security_limits:
 2891|  1.02k|{
 2892|  1.02k|  amve.ambient_illumination = range.read32();
 2893|  1.02k|  amve.ambient_light_x = range.read16();
 2894|  1.02k|  amve.ambient_light_y = range.read16();
 2895|       |
 2896|  1.02k|  return range.get_error();
 2897|  1.02k|}
_ZNK8Box_amve4dumpER6Indent:
 2901|    495|{
 2902|    495|  std::ostringstream sstr;
 2903|    495|  sstr << Box::dump(indent);
 2904|       |
 2905|    495|  sstr << indent << "ambient_illumination: " << amve.ambient_illumination << "\n";
 2906|    495|  sstr << indent << "ambient_light_x: " << amve.ambient_light_x << "\n";
 2907|    495|  sstr << indent << "ambient_light_y: " << amve.ambient_light_y << "\n";
 2908|       |
 2909|    495|  return sstr.str();
 2910|    495|}
_ZN8Box_ispe5parseER14BitstreamRangePK20heif_security_limits:
 3165|  2.45k|{
 3166|  2.45k|  parse_full_box_header(range);
 3167|       |
 3168|  2.45k|  if (get_version() != 0) {
  ------------------
  |  Branch (3168:7): [True: 2, False: 2.44k]
  ------------------
 3169|      2|    return unsupported_version_error("ispe");
 3170|      2|  }
 3171|       |
 3172|  2.44k|  m_image_width = range.read32();
 3173|  2.44k|  m_image_height = range.read32();
 3174|       |
 3175|  2.44k|  return range.get_error();
 3176|  2.45k|}
_ZNK8Box_ispe4dumpER6Indent:
 3180|  2.15k|{
 3181|  2.15k|  std::ostringstream sstr;
 3182|  2.15k|  sstr << Box::dump(indent);
 3183|       |
 3184|  2.15k|  sstr << indent << "image width: " << m_image_width << "\n"
 3185|  2.15k|       << indent << "image height: " << m_image_height << "\n";
 3186|       |
 3187|  2.15k|  return sstr.str();
 3188|  2.15k|}
_ZN8Box_ipma5parseER14BitstreamRangePK20heif_security_limits:
 3217|  2.87k|{
 3218|  2.87k|  parse_full_box_header(range);
 3219|       |
 3220|       |  // TODO: is there any specification of allowed values for the ipma version in the HEIF standards?
 3221|       |
 3222|  2.87k|  if (get_version() > 1) {
  ------------------
  |  Branch (3222:7): [True: 5, False: 2.86k]
  ------------------
 3223|      5|    return unsupported_version_error("ipma");
 3224|      5|  }
 3225|       |
 3226|  2.86k|  uint32_t entry_cnt = range.read32();
 3227|       |
 3228|  2.86k|  if (limits->max_items && entry_cnt > limits->max_items) {
  ------------------
  |  Branch (3228:7): [True: 2.86k, False: 0]
  |  Branch (3228:28): [True: 46, False: 2.82k]
  ------------------
 3229|     46|    std::stringstream sstr;
 3230|     46|    sstr << "ipma box wants to define properties for " << entry_cnt
 3231|     46|         << " items, but the security limit has been set to " << limits->max_items << " items";
 3232|     46|    return {heif_error_Invalid_input,
 3233|     46|            heif_suberror_Security_limit_exceeded,
 3234|     46|            sstr.str()};
 3235|     46|  }
 3236|       |
 3237|  26.7k|  for (uint32_t i = 0; i < entry_cnt && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (3237:24): [True: 24.2k, False: 2.47k]
  |  Branch (3237:41): [True: 24.2k, False: 60]
  |  Branch (3237:59): [True: 23.9k, False: 291]
  ------------------
 3238|  23.9k|    Entry entry;
 3239|  23.9k|    if (get_version() < 1) {
  ------------------
  |  Branch (3239:9): [True: 12.0k, False: 11.8k]
  ------------------
 3240|  12.0k|      entry.item_ID = range.read16();
 3241|  12.0k|    }
 3242|  11.8k|    else {
 3243|  11.8k|      entry.item_ID = range.read32();
 3244|  11.8k|    }
 3245|       |
 3246|  23.9k|    int assoc_cnt = range.read8();
 3247|  1.39M|    for (int k = 0; k < assoc_cnt; k++) {
  ------------------
  |  Branch (3247:21): [True: 1.36M, False: 23.9k]
  ------------------
 3248|  1.36M|      PropertyAssociation association{};
 3249|       |
 3250|  1.36M|      uint16_t index;
 3251|  1.36M|      if (get_flags() & 1) {
  ------------------
  |  Branch (3251:11): [True: 1.35k, False: 1.36M]
  ------------------
 3252|  1.35k|        index = range.read16();
 3253|  1.35k|        association.essential = !!(index & 0x8000);
 3254|  1.35k|        association.property_index = (index & 0x7fff);
 3255|  1.35k|      }
 3256|  1.36M|      else {
 3257|  1.36M|        index = range.read8();
 3258|  1.36M|        association.essential = !!(index & 0x80);
 3259|  1.36M|        association.property_index = (index & 0x7f);
 3260|  1.36M|      }
 3261|       |
 3262|  1.36M|      entry.associations.push_back(association);
 3263|  1.36M|    }
 3264|       |
 3265|  23.9k|    m_entries.push_back(entry);
 3266|  23.9k|  }
 3267|       |
 3268|  2.82k|  return range.get_error();
 3269|  2.86k|}
_ZNK8Box_ipma4dumpER6Indent:
 3333|  2.47k|{
 3334|  2.47k|  std::ostringstream sstr;
 3335|  2.47k|  sstr << Box::dump(indent);
 3336|       |
 3337|  21.9k|  for (const Entry& entry : m_entries) {
  ------------------
  |  Branch (3337:27): [True: 21.9k, False: 2.47k]
  ------------------
 3338|  21.9k|    sstr << indent << "associations for item ID: " << entry.item_ID << "\n";
 3339|  21.9k|    indent++;
 3340|  1.36M|    for (const auto& assoc : entry.associations) {
  ------------------
  |  Branch (3340:28): [True: 1.36M, False: 21.9k]
  ------------------
 3341|  1.36M|      sstr << indent << "property index: " << assoc.property_index
 3342|  1.36M|           << " (essential: " << std::boolalpha << assoc.essential << ")\n";
 3343|  1.36M|    }
 3344|  21.9k|    indent--;
 3345|  21.9k|  }
 3346|       |
 3347|  2.47k|  return sstr.str();
 3348|  2.47k|}
_ZN8Box_auxC5parseER14BitstreamRangePK20heif_security_limits:
 3443|  1.05k|{
 3444|  1.05k|  parse_full_box_header(range);
 3445|       |
 3446|  1.05k|  if (get_version() != 0) {
  ------------------
  |  Branch (3446:7): [True: 7, False: 1.05k]
  ------------------
 3447|      7|    return unsupported_version_error("auxC");
 3448|      7|  }
 3449|       |
 3450|  1.05k|  m_aux_type = range.read_string();
 3451|       |
 3452|  5.61M|  while (!range.eof()) {
  ------------------
  |  Branch (3452:10): [True: 5.61M, False: 1.05k]
  ------------------
 3453|  5.61M|    m_aux_subtypes.push_back(range.read8());
 3454|  5.61M|  }
 3455|       |
 3456|  1.05k|  return range.get_error();
 3457|  1.05k|}
_ZNK8Box_auxC4dumpER6Indent:
 3477|    836|{
 3478|    836|  std::ostringstream sstr;
 3479|    836|  sstr << Box::dump(indent);
 3480|       |
 3481|    836|  sstr << indent << "aux type: " << m_aux_type << "\n"
 3482|    836|       << indent << "aux subtypes: ";
 3483|  5.60M|  for (uint8_t subtype : m_aux_subtypes) {
  ------------------
  |  Branch (3483:24): [True: 5.60M, False: 836]
  ------------------
 3484|  5.60M|    sstr << std::hex << std::setw(2) << std::setfill('0') << ((int) subtype) << " ";
 3485|  5.60M|  }
 3486|       |
 3487|    836|  sstr << "\n";
 3488|       |
 3489|    836|  return sstr.str();
 3490|    836|}
_ZN8Box_irot5parseER14BitstreamRangePK20heif_security_limits:
 3494|  5.47k|{
 3495|       |  //parse_full_box_header(range);
 3496|       |
 3497|  5.47k|  uint16_t rotation = range.read8();
 3498|  5.47k|  rotation &= 0x03;
 3499|       |
 3500|  5.47k|  m_rotation = rotation * 90;
 3501|       |
 3502|  5.47k|  return range.get_error();
 3503|  5.47k|}
_ZNK8Box_irot4dumpER6Indent:
 3519|  4.15k|{
 3520|  4.15k|  std::ostringstream sstr;
 3521|  4.15k|  sstr << Box::dump(indent);
 3522|       |
 3523|  4.15k|  sstr << indent << "rotation: " << m_rotation << " degrees (CCW)\n";
 3524|       |
 3525|  4.15k|  return sstr.str();
 3526|  4.15k|}
_ZN8Box_imir5parseER14BitstreamRangePK20heif_security_limits:
 3530|  2.16k|{
 3531|       |  //parse_full_box_header(range);
 3532|       |
 3533|  2.16k|  uint8_t axis = range.read8();
 3534|  2.16k|  if (axis & 1) {
  ------------------
  |  Branch (3534:7): [True: 147, False: 2.02k]
  ------------------
 3535|    147|    m_axis = heif_transform_mirror_direction_horizontal;
 3536|    147|  }
 3537|  2.02k|  else {
 3538|  2.02k|    m_axis = heif_transform_mirror_direction_vertical;
 3539|  2.02k|  }
 3540|       |
 3541|  2.16k|  return range.get_error();
 3542|  2.16k|}
_ZNK8Box_imir4dumpER6Indent:
 3558|  1.58k|{
 3559|  1.58k|  std::ostringstream sstr;
 3560|  1.58k|  sstr << Box::dump(indent);
 3561|       |
 3562|  1.58k|  sstr << indent << "mirror direction: ";
 3563|  1.58k|  switch (m_axis) {
  ------------------
  |  Branch (3563:11): [True: 1.58k, False: 0]
  ------------------
 3564|  1.43k|    case heif_transform_mirror_direction_vertical:
  ------------------
  |  Branch (3564:5): [True: 1.43k, False: 147]
  ------------------
 3565|  1.43k|      sstr << "vertical\n";
 3566|  1.43k|      break;
 3567|    147|    case heif_transform_mirror_direction_horizontal:
  ------------------
  |  Branch (3567:5): [True: 147, False: 1.43k]
  ------------------
 3568|    147|      sstr << "horizontal\n";
 3569|    147|      break;
 3570|      0|    case heif_transform_mirror_direction_invalid:
  ------------------
  |  Branch (3570:5): [True: 0, False: 1.58k]
  ------------------
 3571|      0|      sstr << "invalid\n";
 3572|      0|      break;
 3573|  1.58k|  }
 3574|       |
 3575|  1.58k|  return sstr.str();
 3576|  1.58k|}
_ZN8Box_clap5parseER14BitstreamRangePK20heif_security_limits:
 3631|  17.7k|{
 3632|       |  //parse_full_box_header(range);
 3633|       |
 3634|  17.7k|  uint32_t clean_aperture_width_num = range.read32();
 3635|  17.7k|  uint32_t clean_aperture_width_den = range.read32();
 3636|  17.7k|  uint32_t clean_aperture_height_num = range.read32();
 3637|  17.7k|  uint32_t clean_aperture_height_den = range.read32();
 3638|       |
 3639|       |  // Note: in the standard document 14496-12(2015), it says that the offset values should also be unsigned integers,
 3640|       |  // but this is obviously an error. Even the accompanying standard text says that offsets may be negative.
 3641|  17.7k|  int32_t horizontal_offset_num = (int32_t) range.read32();
 3642|  17.7k|  uint32_t horizontal_offset_den = (uint32_t) range.read32();
 3643|  17.7k|  int32_t vertical_offset_num = (int32_t) range.read32();
 3644|  17.7k|  uint32_t vertical_offset_den = (uint32_t) range.read32();
 3645|       |
 3646|  17.7k|  if (clean_aperture_width_num > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3646:7): [True: 1.11k, False: 16.6k]
  ------------------
 3647|  16.6k|      clean_aperture_width_den > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3647:7): [True: 377, False: 16.2k]
  ------------------
 3648|  16.2k|      clean_aperture_height_num > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3648:7): [True: 116, False: 16.1k]
  ------------------
 3649|  16.1k|      clean_aperture_height_den > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3649:7): [True: 124, False: 16.0k]
  ------------------
 3650|  16.0k|      horizontal_offset_den > (uint32_t) std::numeric_limits<int32_t>::max() ||
  ------------------
  |  Branch (3650:7): [True: 119, False: 15.9k]
  ------------------
 3651|  15.9k|      vertical_offset_den > (uint32_t) std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (3651:7): [True: 95, False: 15.8k]
  ------------------
 3652|  1.94k|    return Error(heif_error_Invalid_input,
 3653|  1.94k|                 heif_suberror_Invalid_fractional_number,
 3654|  1.94k|                 "Exceeded supported value range.");
 3655|  1.94k|  }
 3656|       |
 3657|  15.8k|  m_clean_aperture_width = Fraction(clean_aperture_width_num,
 3658|  15.8k|                                    clean_aperture_width_den);
 3659|  15.8k|  m_clean_aperture_height = Fraction(clean_aperture_height_num,
 3660|  15.8k|                                     clean_aperture_height_den);
 3661|  15.8k|  m_horizontal_offset = Fraction(horizontal_offset_num, (int32_t) horizontal_offset_den);
 3662|  15.8k|  m_vertical_offset = Fraction(vertical_offset_num, (int32_t) vertical_offset_den);
 3663|  15.8k|  if (!m_clean_aperture_width.is_valid() || !m_clean_aperture_height.is_valid() ||
  ------------------
  |  Branch (3663:7): [True: 1.05k, False: 14.7k]
  |  Branch (3663:45): [True: 343, False: 14.4k]
  ------------------
 3664|  15.0k|      !m_horizontal_offset.is_valid() || !m_vertical_offset.is_valid()) {
  ------------------
  |  Branch (3664:7): [True: 511, False: 13.8k]
  |  Branch (3664:42): [True: 13.1k, False: 712]
  ------------------
 3665|  15.0k|    return Error(heif_error_Invalid_input,
 3666|  15.0k|                 heif_suberror_Invalid_fractional_number);
 3667|  15.0k|  }
 3668|       |
 3669|    712|  return range.get_error();
 3670|  15.8k|}
_ZNK8Box_clap4dumpER6Indent:
 3693|    524|{
 3694|    524|  std::ostringstream sstr;
 3695|    524|  sstr << Box::dump(indent);
 3696|       |
 3697|    524|  sstr << indent << "clean_aperture: " << m_clean_aperture_width.numerator
 3698|    524|       << "/" << m_clean_aperture_width.denominator << " x "
 3699|    524|       << m_clean_aperture_height.numerator << "/"
 3700|    524|       << m_clean_aperture_height.denominator << "\n";
 3701|    524|  sstr << indent << "offset: " << m_horizontal_offset.numerator << "/"
 3702|    524|       << m_horizontal_offset.denominator << " ; "
 3703|    524|       << m_vertical_offset.numerator << "/"
 3704|    524|       << m_vertical_offset.denominator << "\n";
 3705|       |
 3706|    524|  return sstr.str();
 3707|    524|}
_ZN8Box_iref5parseER14BitstreamRangePK20heif_security_limits:
 3785|  16.1k|{
 3786|  16.1k|  parse_full_box_header(range);
 3787|       |
 3788|  16.1k|  if (get_version() > 1) {
  ------------------
  |  Branch (3788:7): [True: 7, False: 16.0k]
  ------------------
 3789|      7|    return unsupported_version_error("iref");
 3790|      7|  }
 3791|       |
 3792|  33.7k|  while (!range.eof()) {
  ------------------
  |  Branch (3792:10): [True: 17.6k, False: 16.0k]
  ------------------
 3793|  17.6k|    Reference ref;
 3794|       |
 3795|  17.6k|    Error err = ref.header.parse_header(range);
 3796|  17.6k|    if (err != Error::Ok) {
  ------------------
  |  Branch (3796:9): [True: 12, False: 17.6k]
  ------------------
 3797|     12|      return err;
 3798|     12|    }
 3799|       |
 3800|  17.6k|    int read_len = (get_version() == 0) ? 16 : 32;
  ------------------
  |  Branch (3800:20): [True: 17.5k, False: 84]
  ------------------
 3801|       |
 3802|  17.6k|    ref.from_item_ID = static_cast<uint32_t>(range.read_uint(read_len));
 3803|  17.6k|    uint16_t nRefs = range.read16();
 3804|       |
 3805|  17.6k|    if (nRefs==0) {
  ------------------
  |  Branch (3805:9): [True: 2, False: 17.6k]
  ------------------
 3806|      2|      return {heif_error_Invalid_input,
 3807|      2|              heif_suberror_Unspecified,
 3808|      2|              "Input file has an 'iref' box with no references."};
 3809|      2|    }
 3810|       |
 3811|  17.6k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (3811:9): [True: 17.6k, False: 0]
  |  Branch (3811:30): [True: 16, False: 17.6k]
  ------------------
 3812|     16|      std::stringstream sstr;
 3813|     16|      sstr << "Number of references in iref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 3814|       |
 3815|     16|      return {heif_error_Invalid_input,
 3816|     16|              heif_suberror_Security_limit_exceeded,
 3817|     16|              sstr.str()};
 3818|     16|    }
 3819|       |
 3820|  96.2k|    for (int i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (3820:21): [True: 78.6k, False: 17.6k]
  ------------------
 3821|  78.6k|      if (range.eof()) {
  ------------------
  |  Branch (3821:11): [True: 28, False: 78.6k]
  ------------------
 3822|     28|        std::stringstream sstr;
 3823|     28|        sstr << "iref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 3824|       |
 3825|     28|        return {heif_error_Invalid_input,
 3826|     28|                heif_suberror_End_of_data,
 3827|     28|                sstr.str()};
 3828|     28|      }
 3829|       |
 3830|  78.6k|      ref.to_item_ID.push_back(static_cast<uint32_t>(range.read_uint(read_len)));
 3831|  78.6k|    }
 3832|       |
 3833|  17.6k|    m_references.push_back(ref);
 3834|  17.6k|  }
 3835|       |
 3836|       |
 3837|       |  // --- check for duplicate references
 3838|       |
 3839|  16.0k|  if (auto error = check_for_double_references()) {
  ------------------
  |  Branch (3839:12): [True: 46, False: 15.9k]
  ------------------
 3840|     46|    return error;
 3841|     46|  }
 3842|       |
 3843|       |
 3844|       |#if 0
 3845|       |  // Note: This input sanity check first did not work as expected.
 3846|       |  // Its idea was to prevent infinite recursions while decoding when the input file
 3847|       |  // contains cyclic references. However, apparently there are cases where cyclic
 3848|       |  // references are actually allowed, like with images that have premultiplied alpha channels:
 3849|       |  // | Box: iref -----
 3850|       |  // | size: 40   (header size: 12)
 3851|       |  // | reference with type 'auxl' from ID: 2 to IDs: 1
 3852|       |  // | reference with type 'prem' from ID: 1 to IDs: 2
 3853|       |  //
 3854|       |  // We now test for cyclic references during the image decoding.
 3855|       |  // We pass down the item IDs that have already been seen during the decoding process.
 3856|       |  // If we try to decode an image IDs that has already been seen previously, we throw an error.
 3857|       |  // The advantage is that the error only occurs when we are trying to decode the faulty image.
 3858|       |
 3859|       |  // --- check for cyclic references
 3860|       |
 3861|       |  for (const auto& ref : m_references) {
 3862|       |    if (ref.header.get_short_type() != fourcc("dimg") &&
 3863|       |        ref.header.get_short_type() != fourcc("auxl")) {
 3864|       |      continue;
 3865|       |    }
 3866|       |
 3867|       |    std::set<heif_item_id> reached_ids; // IDs that we have already reached in the DAG
 3868|       |    std::set<heif_item_id> todo;    // IDs that still need to be followed
 3869|       |
 3870|       |    bool reverse = (ref.header.get_short_type() != fourcc("auxl"));
 3871|       |
 3872|       |    if (!reverse) {
 3873|       |      todo.insert(ref.from_item_ID);  // start at base item
 3874|       |    }
 3875|       |    else {
 3876|       |      if (ref.to_item_ID.empty()) {
 3877|       |        continue;
 3878|       |      }
 3879|       |
 3880|       |      // TODO: what if aux image is assigned to multiple images?
 3881|       |      todo.insert(ref.to_item_ID[0]);  // start at base item
 3882|       |    }
 3883|       |
 3884|       |    while (!todo.empty()) {
 3885|       |      // transfer ID into set of reached IDs
 3886|       |      auto id = *todo.begin();
 3887|       |      todo.erase(id);
 3888|       |      reached_ids.insert(id);
 3889|       |
 3890|       |      // if this ID refers to another 'iref', follow it
 3891|       |
 3892|       |      for (const auto& succ_ref : m_references) {
 3893|       |        if (succ_ref.header.get_short_type() != fourcc("dimg") &&
 3894|       |            succ_ref.header.get_short_type() != fourcc("auxl")) {
 3895|       |          continue;
 3896|       |        }
 3897|       |
 3898|       |        heif_item_id from;
 3899|       |        std::vector<heif_item_id> to;
 3900|       |
 3901|       |        if (succ_ref.header.get_short_type() == fourcc("auxl")) {
 3902|       |          if (succ_ref.to_item_ID.empty()) {
 3903|       |            continue;
 3904|       |          }
 3905|       |
 3906|       |          from = succ_ref.to_item_ID[0];
 3907|       |          to = {succ_ref.from_item_ID};
 3908|       |        }
 3909|       |        else {
 3910|       |          from = succ_ref.from_item_ID;
 3911|       |          to = succ_ref.to_item_ID;
 3912|       |        }
 3913|       |
 3914|       |        if (from == id) {
 3915|       |
 3916|       |          // Check whether any successor IDs has been visited yet, which would be an error.
 3917|       |          // Otherwise, put that ID into the 'todo' set.
 3918|       |
 3919|       |          for (const auto& succ_ref_id : to) {
 3920|       |            if (reached_ids.find(succ_ref_id) != reached_ids.end()) {
 3921|       |              return Error(heif_error_Invalid_input,
 3922|       |                           heif_suberror_Unspecified,
 3923|       |                           "'iref' has cyclic references");
 3924|       |            }
 3925|       |
 3926|       |            todo.insert(succ_ref_id);
 3927|       |          }
 3928|       |        }
 3929|       |      }
 3930|       |    }
 3931|       |  }
 3932|       |#endif
 3933|       |
 3934|  15.9k|  return range.get_error();
 3935|  16.0k|}
_ZNK8Box_iref27check_for_double_referencesEv:
 3939|  16.0k|{
 3940|  17.0k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (3940:24): [True: 17.0k, False: 15.9k]
  ------------------
 3941|  17.0k|    std::set<heif_item_id> to_ids;
 3942|  74.6k|    for (const auto to_id : ref.to_item_ID) {
  ------------------
  |  Branch (3942:27): [True: 74.6k, False: 16.9k]
  ------------------
 3943|  74.6k|      if (to_ids.find(to_id) == to_ids.end()) {
  ------------------
  |  Branch (3943:11): [True: 74.6k, False: 46]
  ------------------
 3944|  74.6k|        to_ids.insert(to_id);
 3945|  74.6k|      }
 3946|     46|      else {
 3947|     46|        return {heif_error_Invalid_input,
 3948|     46|                heif_suberror_Unspecified,
 3949|     46|                "'iref' has double references"};
 3950|     46|      }
 3951|  74.6k|    }
 3952|  17.0k|  }
 3953|       |
 3954|  15.9k|  return Error::Ok;
 3955|  16.0k|}
_ZNK8Box_iref4dumpER6Indent:
 4012|  13.9k|{
 4013|  13.9k|  std::ostringstream sstr;
 4014|  13.9k|  sstr << Box::dump(indent);
 4015|       |
 4016|  14.4k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (4016:24): [True: 14.4k, False: 13.9k]
  ------------------
 4017|  14.4k|    sstr << indent << "reference with type '" << ref.header.get_type_string() << "'"
 4018|  14.4k|         << " from ID: " << ref.from_item_ID
 4019|  14.4k|         << " to IDs: ";
 4020|  57.4k|    for (uint32_t id : ref.to_item_ID) {
  ------------------
  |  Branch (4020:22): [True: 57.4k, False: 14.4k]
  ------------------
 4021|  57.4k|      sstr << id << " ";
 4022|  57.4k|    }
 4023|  14.4k|    sstr << "\n";
 4024|  14.4k|  }
 4025|       |
 4026|  13.9k|  return sstr.str();
 4027|  13.9k|}
_ZN8Box_idat5parseER14BitstreamRangePK20heif_security_limits:
 4234|  5.99k|{
 4235|       |  //parse_full_box_header(range);
 4236|       |
 4237|  5.99k|  m_data_start_pos = range.get_istream()->get_position();
 4238|       |
 4239|  5.99k|  return range.get_error();
 4240|  5.99k|}
_ZNK8Box_idat4dumpER6Indent:
 4256|  4.40k|{
 4257|  4.40k|  std::ostringstream sstr;
 4258|  4.40k|  sstr << Box::dump(indent);
 4259|       |
 4260|  4.40k|  if (get_box_size() >= get_header_size()) {
  ------------------
  |  Branch (4260:7): [True: 3.97k, False: 429]
  ------------------
 4261|  3.97k|    sstr << indent << "number of data bytes: " << get_box_size() - get_header_size() << "\n";
 4262|  3.97k|  } else {
 4263|    429|     sstr << indent << "number of data bytes is invalid\n";
 4264|    429|  }
 4265|       |
 4266|  4.40k|  return sstr.str();
 4267|  4.40k|}
_ZN8Box_grpl5parseER14BitstreamRangePK20heif_security_limits:
 4330|  1.66k|{
 4331|       |  //parse_full_box_header(range);
 4332|       |
 4333|  1.66k|  return read_children(range, READ_CHILDREN_ALL, limits); // should we pass the parsing context 'grpl' or are the box types unique?
 4334|  1.66k|}
_ZNK8Box_grpl4dumpER6Indent:
 4338|  1.46k|{
 4339|  1.46k|  std::ostringstream sstr;
 4340|  1.46k|  sstr << Box::dump(indent);
 4341|  1.46k|  sstr << dump_children(indent);
 4342|  1.46k|  return sstr.str();
 4343|  1.46k|}
_ZN17Box_EntityToGroup5parseER14BitstreamRangePK20heif_security_limits:
 4347|  2.19k|{
 4348|  2.19k|  Error err = parse_full_box_header(range);
 4349|  2.19k|  if (err != Error::Ok) {
  ------------------
  |  Branch (4349:7): [True: 73, False: 2.12k]
  ------------------
 4350|     73|    return err;
 4351|     73|  }
 4352|       |
 4353|  2.12k|  group_id = range.read32();
 4354|  2.12k|  uint32_t nEntities = range.read32();
 4355|       |
 4356|  2.12k|  if (nEntities > range.get_remaining_bytes() / 4) {
  ------------------
  |  Branch (4356:7): [True: 82, False: 2.03k]
  ------------------
 4357|     82|    std::stringstream sstr;
 4358|     82|    size_t maxEntries = range.get_remaining_bytes() / 4;
 4359|     82|    sstr << "entity group box should contain " << nEntities << " entities, but we can only read " << maxEntries << " entities.";
 4360|       |
 4361|     82|    return {heif_error_Invalid_input,
 4362|     82|            heif_suberror_End_of_data,
 4363|     82|            sstr.str()};
 4364|     82|  }
 4365|       |
 4366|  2.03k|  if (limits->max_size_entity_group && nEntities > limits->max_size_entity_group) {
  ------------------
  |  Branch (4366:7): [True: 2.03k, False: 0]
  |  Branch (4366:40): [True: 70, False: 1.96k]
  ------------------
 4367|     70|    std::stringstream sstr;
 4368|     70|    sstr << "entity group box contains " << nEntities << " entities, but the security limit is set to " << limits->max_size_entity_group << " entities.";
 4369|       |
 4370|     70|    return {heif_error_Invalid_input,
 4371|     70|            heif_suberror_Security_limit_exceeded,
 4372|     70|            sstr.str()};
 4373|     70|  }
 4374|       |
 4375|  1.96k|  entity_ids.resize(nEntities);
 4376|  5.93k|  for (uint32_t i = 0; i < nEntities; i++) {
  ------------------
  |  Branch (4376:24): [True: 3.96k, False: 1.96k]
  ------------------
 4377|  3.96k|    entity_ids[i] = range.read32();
 4378|  3.96k|  }
 4379|       |
 4380|  1.96k|  return Error::Ok;
 4381|  2.03k|}
_ZNK17Box_EntityToGroup4dumpER6Indent:
 4410|  1.00k|{
 4411|  1.00k|  std::ostringstream sstr;
 4412|  1.00k|  sstr << Box::dump(indent);
 4413|       |
 4414|  1.00k|  sstr << indent << "group id: " << group_id << "\n"
 4415|  1.00k|       << indent << "entity IDs: ";
 4416|       |
 4417|  1.00k|  bool first = true;
 4418|  2.48k|  for (uint32_t id : entity_ids) {
  ------------------
  |  Branch (4418:20): [True: 2.48k, False: 1.00k]
  ------------------
 4419|  2.48k|    if (first) {
  ------------------
  |  Branch (4419:9): [True: 516, False: 1.96k]
  ------------------
 4420|    516|      first = false;
 4421|    516|    }
 4422|  1.96k|    else {
 4423|  1.96k|      sstr << ' ';
 4424|  1.96k|    }
 4425|       |
 4426|  2.48k|    sstr << id;
 4427|  2.48k|  }
 4428|       |
 4429|  1.00k|  sstr << "\n";
 4430|       |
 4431|  1.00k|  return sstr.str();
 4432|  1.00k|}
_ZN8Box_ster5parseER14BitstreamRangePK20heif_security_limits:
 4436|    677|{
 4437|    677|  Error err = Box_EntityToGroup::parse(range, limits);
 4438|    677|  if (err) {
  ------------------
  |  Branch (4438:7): [True: 9, False: 668]
  ------------------
 4439|      9|    return err;
 4440|      9|  }
 4441|       |
 4442|    668|  if (entity_ids.size() != 2) {
  ------------------
  |  Branch (4442:7): [True: 2, False: 666]
  ------------------
 4443|      2|    return {heif_error_Invalid_input,
 4444|      2|            heif_suberror_Invalid_box_size,
 4445|      2|            "'ster' entity group does not exists of exactly two images"};
 4446|      2|  }
 4447|       |
 4448|    666|  return Error::Ok;
 4449|    668|}
_ZNK8Box_ster4dumpER6Indent:
 4453|    644|{
 4454|    644|  std::ostringstream sstr;
 4455|    644|  sstr << Box::dump(indent);
 4456|       |
 4457|    644|  sstr << indent << "group id: " << group_id << "\n"
 4458|    644|       << indent << "left image ID: " << entity_ids[0] << "\n"
 4459|    644|       << indent << "right image ID: " << entity_ids[1] << "\n";
 4460|       |
 4461|    644|  return sstr.str();
 4462|    644|}
_ZN8Box_pymd5parseER14BitstreamRangePK20heif_security_limits:
 4467|  1.29k|{
 4468|  1.29k|  Error err = Box_EntityToGroup::parse(range, limits);
 4469|  1.29k|  if (err) {
  ------------------
  |  Branch (4469:7): [True: 212, False: 1.08k]
  ------------------
 4470|    212|    return err;
 4471|    212|  }
 4472|       |
 4473|  1.08k|  tile_size_x = range.read16();
 4474|  1.08k|  tile_size_y = range.read16();
 4475|       |
 4476|  3.44k|  for (size_t i = 0; i < entity_ids.size(); i++) {
  ------------------
  |  Branch (4476:22): [True: 2.36k, False: 1.08k]
  ------------------
 4477|  2.36k|    LayerInfo layer{};
 4478|  2.36k|    layer.layer_binning = range.read16();
 4479|  2.36k|    layer.tiles_in_layer_row_minus1 = range.read16();
 4480|  2.36k|    layer.tiles_in_layer_column_minus1 = range.read16();
 4481|       |
 4482|  2.36k|    m_layer_infos.push_back(layer);
 4483|  2.36k|  }
 4484|       |
 4485|  1.08k|  return Error::Ok;
 4486|  1.29k|}
_ZNK8Box_pymd4dumpER6Indent:
 4513|    876|{
 4514|    876|  std::ostringstream sstr;
 4515|    876|  sstr << Box_EntityToGroup::dump(indent);
 4516|       |
 4517|    876|  sstr << indent << "tile size: " << tile_size_x << "x" << tile_size_y << "\n";
 4518|       |
 4519|    876|  int layerNr = 0;
 4520|  2.36k|  for (const auto& layer : m_layer_infos) {
  ------------------
  |  Branch (4520:26): [True: 2.36k, False: 876]
  ------------------
 4521|  2.36k|    sstr << indent << "layer " << layerNr << ":\n"
 4522|  2.36k|         << indent << "| binning: " << layer.layer_binning << "\n"
 4523|  2.36k|         << indent << "| tiles: " << (layer.tiles_in_layer_row_minus1 + 1) << "x" << (layer.tiles_in_layer_column_minus1 + 1) << "\n";
 4524|       |
 4525|  2.36k|    layerNr++;
 4526|  2.36k|  }
 4527|       |
 4528|    876|  return sstr.str();
 4529|    876|}
_ZN8Box_dinf5parseER14BitstreamRangePK20heif_security_limits:
 4533|  6.11k|{
 4534|       |  //parse_full_box_header(range);
 4535|       |
 4536|  6.11k|  return read_children(range, READ_CHILDREN_ALL, limits);
 4537|  6.11k|}
_ZNK8Box_dinf4dumpER6Indent:
 4541|  5.05k|{
 4542|  5.05k|  std::ostringstream sstr;
 4543|  5.05k|  sstr << Box::dump(indent);
 4544|  5.05k|  sstr << dump_children(indent);
 4545|       |
 4546|  5.05k|  return sstr.str();
 4547|  5.05k|}
_ZN8Box_dref5parseER14BitstreamRangePK20heif_security_limits:
 4551|  1.62k|{
 4552|  1.62k|  parse_full_box_header(range);
 4553|       |
 4554|  1.62k|  if (get_version() != 0) {
  ------------------
  |  Branch (4554:7): [True: 2, False: 1.62k]
  ------------------
 4555|      2|    return unsupported_version_error("dref");
 4556|      2|  }
 4557|       |
 4558|  1.62k|  uint32_t nEntities = range.read32();
 4559|       |
 4560|       |  /*
 4561|       |  for (int i=0;i<nEntities;i++) {
 4562|       |    if (range.eof()) {
 4563|       |      break;
 4564|       |    }
 4565|       |  }
 4566|       |  */
 4567|       |
 4568|  1.62k|  if (nEntities > (uint32_t)std::numeric_limits<int>::max()) {
  ------------------
  |  Branch (4568:7): [True: 20, False: 1.60k]
  ------------------
 4569|     20|    return Error(heif_error_Memory_allocation_error,
 4570|     20|                 heif_suberror_Security_limit_exceeded,
 4571|     20|                 "Too many entities in dref box.");
 4572|     20|  }
 4573|       |
 4574|  1.60k|  Error err = read_children(range, (int)nEntities, limits);
 4575|  1.60k|  if (err) {
  ------------------
  |  Branch (4575:7): [True: 77, False: 1.52k]
  ------------------
 4576|     77|    return err;
 4577|     77|  }
 4578|       |
 4579|  1.52k|  if (m_children.size() != nEntities) {
  ------------------
  |  Branch (4579:7): [True: 1.13k, False: 394]
  ------------------
 4580|       |    // TODO return Error(
 4581|  1.13k|  }
 4582|       |
 4583|  1.52k|  return err;
 4584|  1.60k|}
_ZNK8Box_dref4dumpER6Indent:
 4608|  1.31k|{
 4609|  1.31k|  std::ostringstream sstr;
 4610|  1.31k|  sstr << Box::dump(indent);
 4611|  1.31k|  sstr << dump_children(indent);
 4612|       |
 4613|  1.31k|  return sstr.str();
 4614|  1.31k|}
_ZN7Box_url5parseER14BitstreamRangePK20heif_security_limits:
 4618|  1.80k|{
 4619|  1.80k|  parse_full_box_header(range);
 4620|       |
 4621|  1.80k|  if (get_version() > 0) {
  ------------------
  |  Branch (4621:7): [True: 7, False: 1.80k]
  ------------------
 4622|      7|    return unsupported_version_error("url");
 4623|      7|  }
 4624|       |
 4625|  1.80k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4625:7): [True: 1.19k, False: 609]
  ------------------
 4626|       |    // data in same file
 4627|  1.19k|    m_location.clear();
 4628|  1.19k|  }
 4629|    609|  else {
 4630|    609|    m_location = range.read_string();
 4631|    609|  }
 4632|       |
 4633|  1.80k|  return range.get_error();
 4634|  1.80k|}
_ZNK7Box_url4dumpER6Indent:
 4655|  1.19k|{
 4656|  1.19k|  std::ostringstream sstr;
 4657|  1.19k|  sstr << Box::dump(indent);
 4658|       |  //sstr << dump_children(indent);
 4659|       |
 4660|  1.19k|  sstr << indent << "location: " << m_location << "\n";
 4661|       |
 4662|  1.19k|  return sstr.str();
 4663|  1.19k|}
_ZN8Box_udes5parseER14BitstreamRangePK20heif_security_limits:
 4667|  1.85k|{
 4668|  1.85k|  parse_full_box_header(range);
 4669|       |
 4670|  1.85k|  if (get_version() > 0) {
  ------------------
  |  Branch (4670:7): [True: 378, False: 1.47k]
  ------------------
 4671|    378|    return unsupported_version_error("udes");
 4672|    378|  }
 4673|       |
 4674|  1.47k|  m_lang = range.read_string();
 4675|  1.47k|  m_name = range.read_string();
 4676|  1.47k|  m_description = range.read_string();
 4677|  1.47k|  m_tags = range.read_string();
 4678|  1.47k|  return range.get_error();
 4679|  1.85k|}
_ZNK8Box_udes4dumpER6Indent:
 4682|  1.36k|{
 4683|  1.36k|  std::ostringstream sstr;
 4684|  1.36k|  sstr << Box::dump(indent);
 4685|  1.36k|  sstr << indent << "lang: " << m_lang << "\n";
 4686|  1.36k|  sstr << indent << "name: " << m_name << "\n";
 4687|  1.36k|  sstr << indent << "description: " << m_description << "\n";
 4688|  1.36k|  sstr << indent << "tags: " << m_lang << "\n";
 4689|  1.36k|  return sstr.str();
 4690|  1.36k|}
_ZNK8Box_cmin4dumpER6Indent:
 4738|  2.81k|{
 4739|  2.81k|  std::ostringstream sstr;
 4740|  2.81k|  sstr << Box::dump(indent);
 4741|  2.81k|  sstr << indent << "principal-point: " << m_matrix.principal_point_x << ", " << m_matrix.principal_point_y << "\n";
 4742|  2.81k|  if (m_matrix.is_anisotropic) {
  ------------------
  |  Branch (4742:7): [True: 545, False: 2.26k]
  ------------------
 4743|    545|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << ", " << m_matrix.focal_length_y << "\n";
 4744|    545|    sstr << indent << "skew: " << m_matrix.skew << "\n";
 4745|    545|  }
 4746|  2.26k|  else {
 4747|  2.26k|    sstr << indent << "focal-length: " << m_matrix.focal_length_x << "\n";
 4748|  2.26k|    sstr << indent << "no skew\n";
 4749|  2.26k|  }
 4750|       |
 4751|  2.81k|  return sstr.str();
 4752|  2.81k|}
_ZN8Box_cmin5parseER14BitstreamRangePK20heif_security_limits:
 4756|  4.97k|{
 4757|  4.97k|  parse_full_box_header(range);
 4758|       |
 4759|  4.97k|  if (get_version() > 0) {
  ------------------
  |  Branch (4759:7): [True: 138, False: 4.84k]
  ------------------
 4760|    138|    return unsupported_version_error("cmin");
 4761|    138|  }
 4762|       |
 4763|  4.84k|  m_denominatorShift = (get_flags() & 0x1F00) >> 8;
 4764|  4.84k|  uint32_t denominator = (1U << m_denominatorShift);
 4765|       |
 4766|  4.84k|  m_matrix.focal_length_x = range.read32s() / (double)denominator;
 4767|  4.84k|  m_matrix.principal_point_x = range.read32s() / (double)denominator;
 4768|  4.84k|  m_matrix.principal_point_y = range.read32s() / (double)denominator;
 4769|       |
 4770|  4.84k|  if (get_flags() & 1) {
  ------------------
  |  Branch (4770:7): [True: 566, False: 4.27k]
  ------------------
 4771|    566|    m_skewDenominatorShift = ((get_flags()) & 0x1F0000) >> 16;
 4772|    566|    uint32_t skewDenominator = (1U << m_skewDenominatorShift);
 4773|       |
 4774|    566|    m_matrix.focal_length_y = range.read32s() / (double)denominator;
 4775|    566|    m_matrix.skew = range.read32s() / (double)skewDenominator;
 4776|       |
 4777|    566|    m_matrix.is_anisotropic = true;
 4778|    566|  }
 4779|  4.27k|  else {
 4780|  4.27k|    m_matrix.is_anisotropic = false;
 4781|  4.27k|    m_matrix.focal_length_y = 0;
 4782|  4.27k|    m_matrix.skew = 0;
 4783|  4.27k|  }
 4784|  4.84k|  return range.get_error();
 4785|  4.97k|}
_ZN8Box_cmex5parseER14BitstreamRangePK20heif_security_limits:
 4943|  7.10k|{
 4944|  7.10k|  parse_full_box_header(range);
 4945|       |
 4946|  7.10k|  if (get_version() > 0) {
  ------------------
  |  Branch (4946:7): [True: 1.01k, False: 6.09k]
  ------------------
 4947|  1.01k|    return unsupported_version_error("cmex");
 4948|  1.01k|  }
 4949|       |
 4950|  6.09k|  m_matrix = ExtrinsicMatrix{};
 4951|       |
 4952|  6.09k|  if (get_flags() & pos_x_present) {
  ------------------
  |  Branch (4952:7): [True: 4.87k, False: 1.21k]
  ------------------
 4953|  4.87k|    m_has_pos_x = true;
 4954|  4.87k|    m_matrix.pos_x = range.read32s();
 4955|  4.87k|  }
 4956|       |
 4957|  6.09k|  if (get_flags() & pos_y_present) {
  ------------------
  |  Branch (4957:7): [True: 5.27k, False: 818]
  ------------------
 4958|  5.27k|    m_has_pos_y = true;
 4959|  5.27k|    m_matrix.pos_y = range.read32s();
 4960|  5.27k|  }
 4961|       |
 4962|  6.09k|  if (get_flags() & pos_z_present) {
  ------------------
  |  Branch (4962:7): [True: 708, False: 5.38k]
  ------------------
 4963|    708|    m_has_pos_z = true;
 4964|    708|    m_matrix.pos_z = range.read32s();
 4965|    708|  }
 4966|       |
 4967|  6.09k|  if (get_flags() & orientation_present) {
  ------------------
  |  Branch (4967:7): [True: 1.27k, False: 4.82k]
  ------------------
 4968|  1.27k|    m_has_orientation = true;
 4969|       |
 4970|  1.27k|    if (get_version() == 0) {
  ------------------
  |  Branch (4970:9): [True: 1.27k, False: 0]
  ------------------
 4971|  1.27k|      bool use32bit = (get_flags() & rot_large_field_size);
 4972|  1.27k|      int32_t quat_x = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (4972:24): [True: 535, False: 739]
  ------------------
 4973|  1.27k|      int32_t quat_y = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (4973:24): [True: 535, False: 739]
  ------------------
 4974|  1.27k|      int32_t quat_z = use32bit ? range.read32s() : range.read16s();
  ------------------
  |  Branch (4974:24): [True: 535, False: 739]
  ------------------
 4975|       |
 4976|  1.27k|      uint32_t div = 1U << (14 + (use32bit ? 16 : 0));
  ------------------
  |  Branch (4976:35): [True: 535, False: 739]
  ------------------
 4977|       |
 4978|  1.27k|      m_matrix.rotation_as_quaternions = true;
 4979|  1.27k|      m_matrix.quaternion_x = quat_x / (double)div;
 4980|  1.27k|      m_matrix.quaternion_y = quat_y / (double)div;
 4981|  1.27k|      m_matrix.quaternion_z = quat_z / (double)div;
 4982|       |
 4983|  1.27k|      double q_sum = (m_matrix.quaternion_x * m_matrix.quaternion_x +
 4984|  1.27k|                      m_matrix.quaternion_y * m_matrix.quaternion_y +
 4985|  1.27k|                      m_matrix.quaternion_z * m_matrix.quaternion_z);
 4986|       |
 4987|  1.27k|      if (q_sum > 1.0) {
  ------------------
  |  Branch (4987:11): [True: 196, False: 1.07k]
  ------------------
 4988|    196|        return Error(heif_error_Invalid_input,
 4989|    196|                     heif_suberror_Unspecified,
 4990|    196|                     "Invalid quaternion in extrinsic rotation matrix");
 4991|    196|      }
 4992|       |
 4993|  1.07k|      m_matrix.quaternion_w = sqrt(1 - q_sum);
 4994|       |
 4995|  1.07k|    } else if (get_version() == 1) {
  ------------------
  |  Branch (4995:16): [True: 0, False: 0]
  ------------------
 4996|      0|      uint32_t div = 1<<16;
 4997|      0|      m_matrix.rotation_yaw = range.read32s() / (double)div;
 4998|      0|      m_matrix.rotation_pitch = range.read32s() / (double)div;
 4999|      0|      m_matrix.rotation_roll = range.read32s() / (double)div;
 5000|      0|    }
 5001|  1.27k|  }
 5002|       |
 5003|  5.90k|  if (get_flags() & id_present) {
  ------------------
  |  Branch (5003:7): [True: 4.86k, False: 1.03k]
  ------------------
 5004|  4.86k|    m_has_world_coordinate_system_id = true;
 5005|  4.86k|    m_matrix.world_coordinate_system_id = range.read32();
 5006|  4.86k|  }
 5007|       |
 5008|  5.90k|  return range.get_error();
 5009|  6.09k|}
_ZNK8Box_cmex4dumpER6Indent:
 5013|  4.15k|{
 5014|  4.15k|  std::ostringstream sstr;
 5015|  4.15k|  sstr << Box::dump(indent);
 5016|  4.15k|  sstr << indent << "camera position (um): ";
 5017|  4.15k|  sstr << m_matrix.pos_x << " ; ";
 5018|  4.15k|  sstr << m_matrix.pos_y << " ; ";
 5019|  4.15k|  sstr << m_matrix.pos_z << "\n";
 5020|       |
 5021|  4.15k|  sstr << indent << "orientation ";
 5022|  4.15k|  if (m_matrix.rotation_as_quaternions) {
  ------------------
  |  Branch (5022:7): [True: 4.15k, False: 0]
  ------------------
 5023|  4.15k|    sstr << "(quaterion)\n";
 5024|  4.15k|    sstr << indent << "  q = ["
 5025|  4.15k|         << m_matrix.quaternion_x << ";"
 5026|  4.15k|         << m_matrix.quaternion_y << ";"
 5027|  4.15k|         << m_matrix.quaternion_z << ";"
 5028|  4.15k|         << m_matrix.quaternion_w << "]\n";
 5029|  4.15k|  }
 5030|      0|  else {
 5031|      0|    sstr << "(angles)\n";
 5032|      0|    sstr << indent << "  yaw:   " << m_matrix.rotation_yaw << "\n";
 5033|      0|    sstr << indent << "  pitch: " << m_matrix.rotation_pitch << "\n";
 5034|      0|    sstr << indent << "  roll:  " << m_matrix.rotation_roll << "\n";
 5035|      0|  }
 5036|       |
 5037|  4.15k|  sstr << indent << "world coordinate system id: " << m_matrix.world_coordinate_system_id << "\n";
 5038|       |
 5039|  4.15k|  return sstr.str();
 5040|  4.15k|}
_ZN8Box_taic4dumpERK19heif_tai_clock_infoR6Indent:
 5180|  1.51k|{
 5181|  1.51k|  std::ostringstream sstr;
 5182|  1.51k|  sstr << indent << "time_uncertainty: ";
 5183|  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 (5183:7): [True: 68, False: 1.44k]
  ------------------
 5184|     68|    sstr << "unknown\n";
 5185|     68|  }
 5186|  1.44k|  else {
 5187|  1.44k|    sstr << info.time_uncertainty << "\n";
 5188|  1.44k|  }
 5189|  1.51k|  sstr << indent << "clock_resolution: " << info.clock_resolution << "\n";
 5190|  1.51k|  sstr << indent << "clock_drift_rate: ";
 5191|  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 (5191:7): [True: 112, False: 1.40k]
  ------------------
 5192|    112|    sstr << "undefined\n";
 5193|    112|  }
 5194|  1.40k|  else {
 5195|  1.40k|    sstr << info.clock_drift_rate << "\n";
 5196|  1.40k|  }
 5197|       |
 5198|  1.51k|  sstr << indent << "clock_type: " << int(info.clock_type) << " ";
 5199|  1.51k|  switch (info.clock_type) {
 5200|    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 (5200:5): [True: 419, False: 1.09k]
  ------------------
 5201|      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 (5201:5): [True: 4, False: 1.51k]
  ------------------
 5202|     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 (5202:5): [True: 13, False: 1.50k]
  ------------------
 5203|  1.08k|    default: sstr << "(illegal value)\n"; break;;
  ------------------
  |  Branch (5203:5): [True: 1.08k, False: 436]
  ------------------
 5204|  1.51k|  }
 5205|  1.51k|  return sstr.str();
 5206|  1.51k|}
_ZNK8Box_taic4dumpER6Indent:
 5209|  1.51k|std::string Box_taic::dump(Indent& indent) const {
 5210|  1.51k|  std::ostringstream sstr;
 5211|  1.51k|  sstr << Box::dump(indent);
 5212|  1.51k|  sstr << dump(m_info, indent);
 5213|       |
 5214|  1.51k|  return sstr.str();
 5215|  1.51k|}
_ZN8Box_taic5parseER14BitstreamRangePK20heif_security_limits:
 5229|  1.61k|Error Box_taic::parse(BitstreamRange& range, const heif_security_limits*) {
 5230|  1.61k|  parse_full_box_header(range);
 5231|       |
 5232|  1.61k|  m_info.time_uncertainty = range.read64();
 5233|  1.61k|  m_info.clock_resolution = range.read32();
 5234|       |
 5235|  1.61k|  m_info.clock_drift_rate = range.read32s();
 5236|  1.61k|  m_info.clock_type = range.read8();
 5237|  1.61k|  return range.get_error();
 5238|  1.61k|}
_ZNK8Box_itai4dumpER6Indent:
 5262|    554|std::string Box_itai::dump(Indent& indent) const {
 5263|    554|  std::ostringstream sstr;
 5264|    554|  sstr << Box::dump(indent);
 5265|    554|  sstr << indent << "tai_timestamp: " << m_timestamp.tai_timestamp << "\n";
 5266|    554|  sstr << indent << "synchronization_state: " << int(m_timestamp.synchronization_state) << "\n";
 5267|    554|  sstr << indent << "timestamp_generation_failure: " << int(m_timestamp.timestamp_generation_failure) << "\n";
 5268|    554|  sstr << indent << "timestamp_is_modified: " << int(m_timestamp.timestamp_is_modified) << "\n";
 5269|    554|  return sstr.str();
 5270|    554|}
_ZN8Box_itai5parseER14BitstreamRangePK20heif_security_limits:
 5357|    712|Error Box_itai::parse(BitstreamRange& range, const heif_security_limits*) {
 5358|    712|  parse_full_box_header(range);
 5359|       |
 5360|    712|  m_timestamp.version = 1;
 5361|    712|  m_timestamp.tai_timestamp = range.read64();
 5362|       |
 5363|    712|  uint8_t status_bits = range.read8();
 5364|       |
 5365|    712|  m_timestamp.synchronization_state = !!(status_bits & 0x80);
 5366|    712|  m_timestamp.timestamp_generation_failure = !!(status_bits & 0x40);
 5367|    712|  m_timestamp.timestamp_is_modified = !!(status_bits & 0x20);
 5368|       |
 5369|    712|  return range.get_error();
 5370|    712|}
_ZN8Box_elng5parseER14BitstreamRangePK20heif_security_limits:
 5373|    756|{
 5374|    756|  parse_full_box_header(range);
 5375|       |
 5376|    756|  if (get_version() > 0) {
  ------------------
  |  Branch (5376:7): [True: 70, False: 686]
  ------------------
 5377|     70|    return unsupported_version_error("elng");
 5378|     70|  }
 5379|       |
 5380|    686|  m_lang = range.read_string();
 5381|    686|  return range.get_error();
 5382|    756|}
_ZNK8Box_elng4dumpER6Indent:
 5385|    592|{
 5386|    592|  std::ostringstream sstr;
 5387|    592|  sstr << Box::dump(indent);
 5388|    592|  sstr << indent << "extended_language: " << m_lang << "\n";
 5389|    592|  return sstr.str();
 5390|    592|}
_ZN19Box_gimi_content_id5parseER14BitstreamRangePK20heif_security_limits:
 5402|  1.88k|{
 5403|  1.88k|  m_content_id = range.read_string_until_eof();
 5404|       |
 5405|  1.88k|  return range.get_error();
 5406|  1.88k|}
_ZNK19Box_gimi_content_id4dumpER6Indent:
 5422|  1.41k|{
 5423|  1.41k|  std::ostringstream sstr;
 5424|  1.41k|  sstr << Box::dump(indent);
 5425|       |
 5426|  1.41k|  sstr << indent << "content ID: " << m_content_id << "\n";
 5427|       |
 5428|  1.41k|  return sstr.str();
 5429|  1.41k|}

_ZNK9BoxHeader12get_box_sizeEv:
  119|  2.39M|  uint64_t get_box_size() const { return m_size; }
_ZNK9BoxHeader18has_fixed_box_sizeEv:
  121|  1.00M|  bool has_fixed_box_size() const { return m_size != 0; }
_ZNK9BoxHeader15get_header_sizeEv:
  123|  1.95M|  uint32_t get_header_size() const { return m_header_size; }
_ZNK9BoxHeader14get_short_typeEv:
  125|   707k|  uint32_t get_short_type() const { return m_type; }
_ZNK9BoxHeader14debug_box_nameEv:
  131|   160k|  virtual const char* debug_box_name() const { return nullptr; }
_ZN9BoxHeader14set_short_typeEj:
  133|   483k|  void set_short_type(uint32_t type) { m_type = type; }
_ZN3Box16set_short_headerERK9BoxHeader:
  183|   432k|  {
  184|   432k|    *(BoxHeader*) this = hdr;
  185|   432k|  }
_ZN3Box19set_output_positionEm:
  262|  14.7k|  void set_output_position(uint64_t pos) { m_output_position = pos; }
_ZNK3Box24get_parse_error_fatalityEv:
  264|  6.57k|  virtual parse_error_fatality get_parse_error_fatality() const { return parse_error_fatality::fatal; }
_ZNK7FullBox11get_versionEv:
  322|   731k|  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|   132k|  {
  351|   132k|    set_short_type(short_type);
  352|   132k|  }
_ZN9Box_ErrorC2Ej5Error20parse_error_fatality:
  374|  31.1k|  {
  375|  31.1k|    set_short_type(fourcc("ERR "));
  376|       |
  377|  31.1k|    m_box_type_with_parse_error = box4cc;
  378|  31.1k|    m_error = std::move(err);
  379|  31.1k|    m_fatality = fatality;
  380|  31.1k|  }
_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|  1.67k|  {
  482|  1.67k|    set_short_type(fourcc("hdlr"));
  483|  1.67k|  }
_ZNK8Box_hdlr14debug_box_nameEv:
  487|  1.27k|  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.12k|  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.5k|  const char* debug_box_name() const override { return "Item Properties"; }
_ZN8Box_ipcoC2Ev:
  745|  10.7k|  {
  746|  10.7k|    set_short_type(fourcc("ipco"));
  747|  10.7k|  }
_ZNK8Box_ipco14debug_box_nameEv:
  765|  9.67k|  const char* debug_box_name() const override { return "Item Property Container"; }
_ZN8Box_ispeC2Ev:
  776|  2.45k|  {
  777|  2.45k|    set_short_type(fourcc("ispe"));
  778|  2.45k|  }
_ZNK8Box_ispe14debug_box_nameEv:
  792|  2.15k|  const char* debug_box_name() const override { return "Image Spatial Extents"; }
_ZN8Box_ipmaC2Ev:
  814|  2.87k|  {
  815|  2.87k|    set_short_type(fourcc("ipma"));
  816|  2.87k|  }
_ZNK8Box_ipma14debug_box_nameEv:
  820|  2.47k|  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|  5.47k|  {
  893|  5.47k|    set_short_type(fourcc("irot"));
  894|  5.47k|  }
_ZNK8Box_irot14debug_box_nameEv:
  902|  4.15k|  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:
 1001|  17.7k|  {
 1002|  17.7k|    set_short_type(fourcc("clap"));
 1003|  17.7k|  }
_ZNK8Box_clap14debug_box_nameEv:
 1011|    524|  const char* debug_box_name() const override { return "Clean Aperture"; }
_ZNK8Box_clap24get_parse_error_fatalityEv:
 1028|  17.0k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_irefC2Ev:
 1047|  16.1k|  {
 1048|  16.1k|    set_short_type(fourcc("iref"));
 1049|  16.1k|  }
_ZNK8Box_iref14debug_box_nameEv:
 1062|  13.9k|  const char* debug_box_name() const override { return "Item Reference"; }
_ZNK8Box_idat14debug_box_nameEv:
 1125|  4.40k|  const char* debug_box_name() const override { return "Item Data"; }
_ZN8Box_grplC2Ev:
 1158|  1.66k|  {
 1159|  1.66k|    set_short_type(fourcc("grpl"));
 1160|  1.66k|  }
_ZNK8Box_grpl14debug_box_nameEv:
 1164|  1.46k|  const char* debug_box_name() const override { return "Groups List"; }
_ZN8Box_sterC2Ev:
 1200|    680|  {
 1201|    680|    set_short_type(fourcc("ster"));
 1202|    680|  }
_ZNK8Box_ster14debug_box_nameEv:
 1206|    644|  const char* debug_box_name() const override { return "Stereo pair"; }
_ZN8Box_pymdC2Ev:
 1221|  1.29k|  {
 1222|  1.29k|    set_short_type(fourcc("pymd"));
 1223|  1.29k|  }
_ZNK8Box_pymd14debug_box_nameEv:
 1227|    876|  const char* debug_box_name() const override { return "Image pyramid group"; }
_ZNK8Box_pymd24get_parse_error_fatalityEv:
 1250|    212|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::ignorable; }
_ZN8Box_dinfC2Ev:
 1268|  6.12k|  {
 1269|  6.12k|    set_short_type(fourcc("dinf"));
 1270|  6.12k|  }
_ZNK8Box_dinf14debug_box_nameEv:
 1274|  5.05k|  const char* debug_box_name() const override { return "Data Information"; }
_ZN8Box_drefC2Ev:
 1285|  1.62k|  {
 1286|  1.62k|    set_short_type(fourcc("dref"));
 1287|  1.62k|  }
_ZNK8Box_dref14debug_box_nameEv:
 1291|  1.31k|  const char* debug_box_name() const override { return "Data Reference"; }
_ZN7Box_urlC2Ev:
 1304|  1.81k|  {
 1305|  1.81k|    set_short_type(fourcc("url "));
 1306|  1.81k|    set_flags(1);
 1307|  1.81k|  }
_ZNK7Box_url14debug_box_nameEv:
 1311|  1.19k|  const char* debug_box_name() const override { return "Data Entry URL"; }
_ZN8Box_pixiC2Ev:
 1331|  3.62k|  {
 1332|  3.62k|    set_short_type(fourcc("pixi"));
 1333|  3.62k|  }
_ZNK8Box_pixi14debug_box_nameEv:
 1352|  2.27k|  const char* debug_box_name() const override { return "Pixel Information"; }
_ZNK8Box_pixi24get_parse_error_fatalityEv:
 1356|    778|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_paspC2Ev:
 1370|  15.5k|  {
 1371|  15.5k|    set_short_type(fourcc("pasp"));
 1372|  15.5k|  }
_ZNK8Box_pasp14debug_box_nameEv:
 1379|  13.4k|  const char* debug_box_name() const override { return "Pixel Aspect Ratio"; }
_ZNK8Box_pasp24get_parse_error_fatalityEv:
 1383|    119|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_lselC2Ev:
 1394|  7.80k|  {
 1395|  7.80k|    set_short_type(fourcc("lsel"));
 1396|  7.80k|  }
_ZNK8Box_lsel14debug_box_nameEv:
 1402|  6.19k|  const char* debug_box_name() const override { return "Layer Selection"; }
_ZNK8Box_lsel24get_parse_error_fatalityEv:
 1406|    618|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_clliC2Ev:
 1417|  2.16k|  {
 1418|  2.16k|    set_short_type(fourcc("clli"));
 1419|       |
 1420|  2.16k|    clli.max_content_light_level = 0;
 1421|  2.16k|    clli.max_pic_average_light_level = 0;
 1422|  2.16k|  }
_ZNK8Box_clli14debug_box_nameEv:
 1428|  1.91k|  const char* debug_box_name() const override { return "Content Light Level Information"; }
_ZNK8Box_clli24get_parse_error_fatalityEv:
 1432|    164|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_mdcv14debug_box_nameEv:
 1448|  3.10k|  const char* debug_box_name() const override { return "Master Display Colour Volume"; }
_ZNK8Box_mdcv24get_parse_error_fatalityEv:
 1452|    516|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZNK8Box_amve14debug_box_nameEv:
 1468|    495|  const char* debug_box_name() const override { return "Ambient Viewing Environment"; }
_ZNK8Box_amve24get_parse_error_fatalityEv:
 1472|    503|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_cminC2Ev:
 1561|  4.98k|  {
 1562|  4.98k|    set_short_type(fourcc("cmin"));
 1563|  4.98k|  }
_ZNK8Box_cmin14debug_box_nameEv:
 1618|  2.81k|  const char* debug_box_name() const override { return "Camera Intrinsic Matrix"; }
_ZNK8Box_cmin24get_parse_error_fatalityEv:
 1624|  1.52k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_cmexC2Ev:
 1643|  7.11k|  {
 1644|  7.11k|    set_short_type(fourcc("cmex"));
 1645|  7.11k|  }
_ZNK8Box_cmex14debug_box_nameEv:
 1675|  4.15k|  const char* debug_box_name() const override { return "Camera Extrinsic Matrix"; }
_ZNK8Box_cmex24get_parse_error_fatalityEv:
 1681|  2.01k|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_udesC2Ev:
 1723|  1.85k|  {
 1724|  1.85k|    set_short_type(fourcc("udes"));
 1725|  1.85k|  }
_ZNK8Box_udes14debug_box_nameEv:
 1729|  1.36k|  const char* debug_box_name() const override { return "User Description"; }
_ZNK8Box_udes24get_parse_error_fatalityEv:
 1795|    485|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN8Box_taicC2Ev:
 1816|  1.62k|  {
 1817|  1.62k|    set_short_type(fourcc("taic"));
 1818|  1.62k|    initialize_heif_tai_clock_info(&m_info);
 1819|  1.62k|  }
_ZNK8Box_taic14debug_box_nameEv:
 1825|  1.51k|  const char* debug_box_name() const override { return "TAI Clock Information"; }
_ZN8Box_itaiC2Ev:
 1896|    714|  {
 1897|    714|    set_short_type(fourcc("itai"));
 1898|    714|    initialize_heif_tai_timestamp_packet(&m_timestamp);
 1899|    714|  }
_ZNK8Box_itai14debug_box_nameEv:
 1903|    554|  const char* debug_box_name() const override { return "Item TAI Timestamp"; }
_ZN19Box_gimi_content_idC2Ev:
 1961|  1.88k|  {
 1962|  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});
 1963|  1.88k|  }
_ZNK19Box_gimi_content_id14debug_box_nameEv:
 1971|  1.41k|  const char* debug_box_name() const override { return "GIMI Content ID"; }
_ZN8Box_elngC2Ev:
 2004|    761|  {
 2005|    761|    set_short_type(fourcc("elng"));
 2006|    761|  }
_ZNK8Box_elng14debug_box_nameEv:
 2010|    592|  const char* debug_box_name() const override { return "Extended language"; }
_ZNK8Box_elng24get_parse_error_fatalityEv:
 2030|     73|  [[nodiscard]] parse_error_fatality get_parse_error_fatality() const override { return parse_error_fatality::optional; }
_ZN9BoxHeaderD2Ev:
  115|   976k|  virtual ~BoxHeader() = default;
_ZN3BoxC2Ev:
  180|   493k|  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.89k|{
   38|       |  //parse_full_box_header(range);
   39|       |
   40|  3.89k|  if (!has_fixed_box_size()) {
  ------------------
  |  Branch (40:7): [True: 1, False: 3.89k]
  ------------------
   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.89k|  uint8_t byte;
   48|       |
   49|  3.89k|  auto& c = m_configuration; // abbreviation
   50|       |
   51|  3.89k|  byte = range.read8();
   52|  3.89k|  if ((byte & 0x80) == 0) {
  ------------------
  |  Branch (52:7): [True: 1.83k, False: 2.06k]
  ------------------
   53|       |    // error: marker bit not set
   54|  1.83k|  }
   55|       |
   56|  3.89k|  c.version = byte & 0x7F;
   57|       |
   58|  3.89k|  byte = range.read8();
   59|  3.89k|  c.seq_profile = (byte >> 5) & 0x7;
   60|  3.89k|  c.seq_level_idx_0 = byte & 0x1f;
   61|       |
   62|  3.89k|  byte = range.read8();
   63|  3.89k|  c.seq_tier_0 = (byte >> 7) & 1;
   64|  3.89k|  c.high_bitdepth = (byte >> 6) & 1;
   65|  3.89k|  c.twelve_bit = (byte >> 5) & 1;
   66|  3.89k|  c.monochrome = (byte >> 4) & 1;
   67|  3.89k|  c.chroma_subsampling_x = (byte >> 3) & 1;
   68|  3.89k|  c.chroma_subsampling_y = (byte >> 2) & 1;
   69|  3.89k|  c.chroma_sample_position = byte & 3;
   70|       |
   71|  3.89k|  byte = range.read8();
   72|  3.89k|  c.initial_presentation_delay_present = (byte >> 4) & 1;
   73|  3.89k|  if (c.initial_presentation_delay_present) {
  ------------------
  |  Branch (73:7): [True: 380, False: 3.51k]
  ------------------
   74|    380|    c.initial_presentation_delay_minus_one = byte & 0x0F;
   75|    380|  }
   76|       |
   77|  3.89k|  const size_t configOBUs_bytes = range.get_remaining_bytes();
   78|  3.89k|  m_config_OBUs.resize(configOBUs_bytes);
   79|       |
   80|  3.89k|  if (!range.read(m_config_OBUs.data(), configOBUs_bytes)) {
  ------------------
  |  Branch (80:7): [True: 0, False: 3.89k]
  ------------------
   81|       |    // error
   82|      0|  }
   83|       |
   84|  3.89k|  return range.get_error();
   85|  3.89k|}
_ZNK8Box_av1C4dumpER6Indent:
  116|  3.42k|{
  117|  3.42k|  std::ostringstream sstr;
  118|  3.42k|  sstr << Box::dump(indent);
  119|       |
  120|  3.42k|  const auto& c = m_configuration; // abbreviation
  121|       |
  122|  3.42k|  sstr << indent << "version: " << ((int) c.version) << "\n"
  123|  3.42k|       << indent << "seq_profile: " << ((int) c.seq_profile) << "\n"
  124|  3.42k|       << indent << "seq_level_idx_0: " << ((int) c.seq_level_idx_0) << "\n"
  125|  3.42k|       << indent << "high_bitdepth: " << ((int) c.high_bitdepth) << "\n"
  126|  3.42k|       << indent << "twelve_bit: " << ((int) c.twelve_bit) << "\n"
  127|  3.42k|       << indent << "monochrome: " << ((int) c.monochrome) << "\n"
  128|  3.42k|       << indent << "chroma_subsampling_x: " << ((int) c.chroma_subsampling_x) << "\n"
  129|  3.42k|       << indent << "chroma_subsampling_y: " << ((int) c.chroma_subsampling_y) << "\n"
  130|  3.42k|       << indent << "chroma_sample_position: " << ((int) c.chroma_sample_position) << "\n"
  131|  3.42k|       << indent << "initial_presentation_delay: ";
  132|       |
  133|  3.42k|  if (c.initial_presentation_delay_present) {
  ------------------
  |  Branch (133:7): [True: 376, False: 3.04k]
  ------------------
  134|    376|    sstr << c.initial_presentation_delay_minus_one + 1 << "\n";
  135|    376|  }
  136|  3.04k|  else {
  137|  3.04k|    sstr << "not present\n";
  138|  3.04k|  }
  139|       |
  140|  3.42k|  sstr << indent << "config OBUs:";
  141|   863k|  for (size_t i = 0; i < m_config_OBUs.size(); i++) {
  ------------------
  |  Branch (141:22): [True: 859k, False: 3.42k]
  ------------------
  142|   859k|    sstr << " " << std::hex << std::setfill('0') << std::setw(2)
  143|   859k|         << ((int) m_config_OBUs[i]);
  144|   859k|  }
  145|  3.42k|  sstr << std::dec << "\n";
  146|       |
  147|  3.42k|  return sstr.str();
  148|  3.42k|}
_ZN8Box_a1op5parseER14BitstreamRangePK20heif_security_limits:
  194|  13.3k|{
  195|  13.3k|  op_index = range.read8();
  196|       |
  197|  13.3k|  return range.get_error();
  198|  13.3k|}
_ZNK8Box_a1op4dumpER6Indent:
  202|  11.1k|{
  203|  11.1k|  std::ostringstream sstr;
  204|  11.1k|  sstr << Box::dump(indent);
  205|       |
  206|  11.1k|  sstr << indent << "op-index: " << ((int) op_index) << "\n";
  207|       |
  208|  11.1k|  return sstr.str();
  209|  11.1k|}
_ZN8Box_a1lx5parseER14BitstreamRangePK20heif_security_limits:
  225|  5.10k|{
  226|  5.10k|  uint8_t flags = range.read8();
  227|       |
  228|  20.4k|  for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (228:19): [True: 15.3k, False: 5.10k]
  ------------------
  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.10k|  return range.get_error();
  238|  5.10k|}
_ZNK8Box_a1lx4dumpER6Indent:
  242|  3.83k|{
  243|  3.83k|  std::ostringstream sstr;
  244|  3.83k|  sstr << Box::dump(indent);
  245|       |
  246|  3.83k|  sstr << indent << "layer-sizes: [" << layer_size[0] << "," << layer_size[1] << "," << layer_size[2] << "]\n";
  247|       |
  248|  3.83k|  return sstr.str();
  249|  3.83k|}

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

_ZN30HEVCDecoderConfigurationRecord5parseER14BitstreamRangePK20heif_security_limits:
   38|  3.30k|{
   39|  3.30k|  uint8_t byte;
   40|       |
   41|  3.30k|  configuration_version = range.read8();
   42|  3.30k|  byte = range.read8();
   43|  3.30k|  general_profile_space = (byte >> 6) & 3;
   44|  3.30k|  general_tier_flag = (byte >> 5) & 1;
   45|  3.30k|  general_profile_idc = (byte & 0x1F);
   46|       |
   47|  3.30k|  general_profile_compatibility_flags = range.read32();
   48|       |
   49|  23.1k|  for (int i = 0; i < 6; i++) {
  ------------------
  |  Branch (49:19): [True: 19.8k, False: 3.30k]
  ------------------
   50|  19.8k|    byte = range.read8();
   51|       |
   52|   178k|    for (int b = 0; b < 8; b++) {
  ------------------
  |  Branch (52:21): [True: 158k, False: 19.8k]
  ------------------
   53|   158k|      general_constraint_indicator_flags[i * 8 + b] = (byte >> (7 - b)) & 1;
   54|   158k|    }
   55|  19.8k|  }
   56|       |
   57|  3.30k|  general_level_idc = range.read8();
   58|  3.30k|  min_spatial_segmentation_idc = range.read16() & 0x0FFF;
   59|  3.30k|  parallelism_type = range.read8() & 0x03;
   60|  3.30k|  chroma_format = range.read8() & 0x03;
   61|  3.30k|  bit_depth_luma = static_cast<uint8_t>((range.read8() & 0x07) + 8);
   62|  3.30k|  bit_depth_chroma = static_cast<uint8_t>((range.read8() & 0x07) + 8);
   63|  3.30k|  avg_frame_rate = range.read16();
   64|       |
   65|  3.30k|  byte = range.read8();
   66|  3.30k|  constant_frame_rate = (byte >> 6) & 0x03;
   67|  3.30k|  num_temporal_layers = (byte >> 3) & 0x07;
   68|  3.30k|  temporal_id_nested = (byte >> 2) & 1;
   69|       |
   70|  3.30k|  m_length_size = static_cast<uint8_t>((byte & 0x03) + 1);
   71|       |
   72|  3.30k|  int nArrays = range.read8();
   73|       |
   74|  7.29k|  for (int i = 0; i < nArrays && !range.error(); i++) {
  ------------------
  |  Branch (74:19): [True: 4.06k, False: 3.23k]
  |  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.30k|  range.skip_to_end_of_box();
  107|       |
  108|  3.30k|  return range.get_error();
  109|  3.30k|}
_ZN8Box_hvcC5parseER14BitstreamRangePK20heif_security_limits:
  195|  3.30k|{
  196|  3.30k|  return m_configuration.parse(range, limits);
  197|  3.30k|}
_ZNK8Box_hvcC4dumpER6Indent:
  201|  3.00k|{
  202|  3.00k|  std::ostringstream sstr;
  203|  3.00k|  sstr << Box::dump(indent);
  204|       |
  205|  3.00k|  const auto& c = m_configuration; // abbreviation
  206|       |
  207|  3.00k|  sstr << indent << "configuration_version: " << ((int) c.configuration_version) << "\n"
  208|  3.00k|       << indent << "general_profile_space: " << ((int) c.general_profile_space) << "\n"
  209|  3.00k|       << indent << "general_tier_flag: " << c.general_tier_flag << "\n"
  210|  3.00k|       << indent << "general_profile_idc: " << ((int) c.general_profile_idc) << "\n";
  211|       |
  212|  3.00k|  sstr << indent << "general_profile_compatibility_flags: ";
  213|  99.1k|  for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (213:19): [True: 96.1k, False: 3.00k]
  ------------------
  214|  96.1k|    sstr << ((c.general_profile_compatibility_flags >> (31 - i)) & 1);
  215|  96.1k|    if ((i % 8) == 7) sstr << ' ';
  ------------------
  |  Branch (215:9): [True: 12.0k, False: 84.1k]
  ------------------
  216|  84.1k|    else if ((i % 4) == 3) sstr << '.';
  ------------------
  |  Branch (216:14): [True: 12.0k, False: 72.0k]
  ------------------
  217|  96.1k|  }
  218|  3.00k|  sstr << "\n";
  219|       |
  220|  3.00k|  sstr << indent << "general_constraint_indicator_flags: ";
  221|  3.00k|  int cnt = 0;
  222|   147k|  for (int i = 0; i < HEVCDecoderConfigurationRecord::NUM_CONSTRAINT_INDICATOR_FLAGS; i++) {
  ------------------
  |  Branch (222:19): [True: 144k, False: 3.00k]
  ------------------
  223|   144k|    bool b = c.general_constraint_indicator_flags[i];
  224|       |
  225|   144k|    sstr << (b ? 1 : 0);
  ------------------
  |  Branch (225:14): [True: 99.0k, False: 45.1k]
  ------------------
  226|   144k|    cnt++;
  227|   144k|    if ((cnt % 8) == 0)
  ------------------
  |  Branch (227:9): [True: 18.0k, False: 126k]
  ------------------
  228|  18.0k|      sstr << ' ';
  229|   144k|  }
  230|  3.00k|  sstr << "\n";
  231|       |
  232|  3.00k|  sstr << indent << "general_level_idc: " << ((int) c.general_level_idc) << "\n"
  233|  3.00k|       << indent << "min_spatial_segmentation_idc: " << c.min_spatial_segmentation_idc << "\n"
  234|  3.00k|       << indent << "parallelism_type: " << ((int) c.parallelism_type) << "\n"
  235|  3.00k|       << indent << "chroma_format: ";
  236|       |
  237|  3.00k|  switch (c.chroma_format) {
  238|    503|    case 0:
  ------------------
  |  Branch (238:5): [True: 503, False: 2.50k]
  ------------------
  239|    503|      sstr << "monochrome";
  240|    503|      break;
  241|    217|    case 1:
  ------------------
  |  Branch (241:5): [True: 217, False: 2.78k]
  ------------------
  242|    217|      sstr << "4:2:0";
  243|    217|      break;
  244|     74|    case 2:
  ------------------
  |  Branch (244:5): [True: 74, False: 2.93k]
  ------------------
  245|     74|      sstr << "4:2:2";
  246|     74|      break;
  247|  2.21k|    case 3:
  ------------------
  |  Branch (247:5): [True: 2.21k, False: 794]
  ------------------
  248|  2.21k|      sstr << "4:4:4";
  249|  2.21k|      break;
  250|      0|    default:
  ------------------
  |  Branch (250:5): [True: 0, False: 3.00k]
  ------------------
  251|      0|      sstr << ((int) c.chroma_format);
  252|      0|      break;
  253|  3.00k|  }
  254|       |
  255|  3.00k|  sstr << "\n"
  256|  3.00k|       << indent << "bit_depth_luma: " << ((int) c.bit_depth_luma) << "\n"
  257|  3.00k|       << indent << "bit_depth_chroma: " << ((int) c.bit_depth_chroma) << "\n"
  258|  3.00k|       << indent << "avg_frame_rate: " << c.avg_frame_rate << "\n"
  259|  3.00k|       << indent << "constant_frame_rate: " << ((int) c.constant_frame_rate) << "\n"
  260|  3.00k|       << indent << "num_temporal_layers: " << ((int) c.num_temporal_layers) << "\n"
  261|  3.00k|       << indent << "temporal_id_nested: " << ((int) c.temporal_id_nested) << "\n"
  262|  3.00k|       << indent << "length_size: " << ((int) c.m_length_size) << "\n";
  263|       |
  264|  3.00k|  for (const auto& array : c.m_nal_array) {
  ------------------
  |  Branch (264:26): [True: 3.00k, False: 3.00k]
  ------------------
  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.00k|  return sstr.str();
  285|  3.00k|}

_ZN8Box_hvcCC2Ev:
   97|  3.30k|  {
   98|  3.30k|    set_short_type(fourcc("hvcC"));
   99|  3.30k|  }
_ZN8Box_hvc1C2Ev:
  138|    113|  {
  139|    113|    set_short_type(fourcc("hvc1"));
  140|    113|  }
_ZNK8Box_hvcC14debug_box_nameEv:
  106|  3.00k|  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.25k|{
  341|  4.25k|  std::ostringstream sstr;
  342|  4.25k|  sstr << Box::dump(indent);
  343|       |
  344|  4.25k|  sstr << dump_children(indent);
  345|       |
  346|  4.25k|  return sstr.str();
  347|  4.25k|}

_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|  1.81k|{
   44|  1.81k|  return format <= component_format_max_valid;
   45|  1.81k|}
_Z24is_valid_interleave_modeh:
   62|    168|{
   63|    168|  return interleave <= interleave_mode_max_valid;
   64|    168|}
_Z22is_valid_sampling_modeh:
   83|    169|{
   84|    169|  return sampling <= sampling_mode_max_valid;
   85|    169|}
_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_cmpd_component_type_max_valid;
  ------------------
  |  |   29|  4.88k|#define heif_cmpd_component_type_max_valid heif_cmpd_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_cmpd_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|  4.67k|{
  241|  4.67k|  parse_full_box_header(range);
  242|       |
  243|  4.67k|  m_profile = range.read32();
  244|       |
  245|  4.67k|  if (get_version() == 1) {
  ------------------
  |  Branch (245:7): [True: 2.01k, False: 2.65k]
  ------------------
  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|  2.65k|  } else if (get_version() == 0) {
  ------------------
  |  Branch (270:14): [True: 218, False: 2.43k]
  ------------------
  271|       |
  272|    218|    uint32_t component_count = range.read32();
  273|       |
  274|    218|    if (limits->max_components && component_count > limits->max_components) {
  ------------------
  |  Branch (274:9): [True: 218, False: 0]
  |  Branch (274:35): [True: 24, False: 194]
  ------------------
  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|  1.98k|    for (uint32_t i = 0; i < component_count && !range.error() && !range.eof(); i++) {
  ------------------
  |  Branch (284:26): [True: 1.83k, False: 144]
  |  Branch (284:49): [True: 1.82k, False: 17]
  |  Branch (284:67): [True: 1.81k, False: 8]
  ------------------
  285|  1.81k|      Component component;
  286|  1.81k|      component.component_index = range.read16();
  287|  1.81k|      component.component_bit_depth = uint16_t(range.read8() + 1);
  288|  1.81k|      component.component_format = range.read8();
  289|  1.81k|      component.component_align_size = range.read8();
  290|  1.81k|      m_components.push_back(component);
  291|       |
  292|  1.81k|      if (!is_valid_component_format(component.component_format)) {
  ------------------
  |  Branch (292:11): [True: 12, False: 1.80k]
  ------------------
  293|     12|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid component format"};
  294|     12|      }
  295|       |
  296|       |      // When component_align_size != 0, the component is padded up to that many bytes.
  297|       |      // It therefore must be large enough to hold the component's bit depth; otherwise
  298|       |      // the decoder computes a negative pad-bits count and shifts by a negative amount.
  299|  1.80k|      if (component.component_align_size != 0 &&
  ------------------
  |  Branch (299:11): [True: 160, False: 1.64k]
  ------------------
  300|    160|          uint32_t(component.component_align_size) * 8 < component.component_bit_depth) {
  ------------------
  |  Branch (300:11): [True: 13, False: 147]
  ------------------
  301|     13|        std::stringstream sstr;
  302|     13|        sstr << "Component alignment (" << int(component.component_align_size)
  303|     13|             << " bytes) is too small for component bit depth (" << component.component_bit_depth << " bits)";
  304|     13|        return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, sstr.str()};
  305|     13|      }
  306|  1.80k|    }
  307|       |
  308|    169|    m_sampling_type = range.read8();
  309|    169|    if (!is_valid_sampling_mode(m_sampling_type)) {
  ------------------
  |  Branch (309:9): [True: 1, False: 168]
  ------------------
  310|      1|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid sampling mode"};
  311|      1|    }
  312|       |
  313|    168|    m_interleave_type = range.read8();
  314|    168|    if (!is_valid_interleave_mode(m_interleave_type)) {
  ------------------
  |  Branch (314:9): [True: 1, False: 167]
  ------------------
  315|      1|      return {heif_error_Invalid_input, heif_suberror_Invalid_parameter_value, "Invalid interleave mode"};
  316|      1|    }
  317|       |
  318|    167|    m_block_size = range.read8();
  319|       |
  320|    167|    uint8_t flags = range.read8();
  321|    167|    m_components_little_endian = !!(flags & 0x80);
  322|    167|    m_block_pad_lsb = !!(flags & 0x40);
  323|    167|    m_block_little_endian = !!(flags & 0x20);
  324|    167|    m_block_reversed = !!(flags & 0x10);
  325|    167|    m_pad_unknown = !!(flags & 0x08);
  326|       |
  327|    167|    m_pixel_size = range.read32();
  328|       |
  329|    167|    if (limits->version >= 4 &&
  ------------------
  |  Branch (329:9): [True: 167, False: 0]
  ------------------
  330|    167|        limits->max_iso23001_17_pixel_size_bytes != 0 &&
  ------------------
  |  Branch (330:9): [True: 167, False: 0]
  ------------------
  331|    167|        m_pixel_size > limits->max_iso23001_17_pixel_size_bytes) {
  ------------------
  |  Branch (331:9): [True: 66, False: 101]
  ------------------
  332|     66|      std::stringstream sstr;
  333|     66|      sstr << "uncC pixel_size (" << m_pixel_size << " bytes) exceeds security limit of "
  334|     66|           << limits->max_iso23001_17_pixel_size_bytes << " bytes";
  335|     66|      return {heif_error_Memory_allocation_error,
  336|     66|              heif_suberror_Security_limit_exceeded,
  337|     66|              sstr.str()};
  338|     66|    }
  339|       |
  340|    101|    m_row_align_size = range.read32();
  341|       |
  342|    101|    m_tile_align_size = range.read32();
  343|       |
  344|    101|    uint32_t num_tile_cols_minus_one = range.read32();
  345|    101|    uint32_t num_tile_rows_minus_one = range.read32();
  346|       |
  347|       |    // The field is stored as `count - 1`, so 0xFFFFFFFF would mean 2^32 tiles,
  348|       |    // which we cannot represent in our uint32 m_num_tile_cols/rows. Reject this
  349|       |    // before the security-limit check so that disabling the security limit does
  350|       |    // not silently turn this into a divide-by-zero in get_heif_image_tiling().
  351|    101|    if (num_tile_cols_minus_one == 0xFFFFFFFF || num_tile_rows_minus_one == 0xFFFFFFFF) {
  ------------------
  |  Branch (351:9): [True: 0, False: 101]
  |  Branch (351:50): [True: 0, False: 101]
  ------------------
  352|      0|      return {heif_error_Unsupported_feature,
  353|      0|              heif_suberror_Invalid_parameter_value,
  354|      0|              "uncC num_tile_cols/rows_minus_one of 0xFFFFFFFF (2^32 tiles) exceeds the supported range"};
  355|      0|    }
  356|       |
  357|    101|    if (limits->max_number_of_tiles &&
  ------------------
  |  Branch (357:9): [True: 101, False: 0]
  ------------------
  358|    101|        static_cast<uint64_t>(num_tile_cols_minus_one) + 1 > limits->max_number_of_tiles / (static_cast<uint64_t>(num_tile_rows_minus_one) + 1)) {
  ------------------
  |  Branch (358:9): [True: 0, False: 101]
  ------------------
  359|      0|      std::stringstream sstr;
  360|      0|      sstr << "Tiling size "
  361|      0|           << ((uint64_t)num_tile_cols_minus_one + 1) << " x " << ((uint64_t)num_tile_rows_minus_one + 1)
  362|      0|           << " exceeds the maximum allowed number " << limits->max_number_of_tiles << " set as security limit";
  363|      0|      return {heif_error_Memory_allocation_error,
  364|      0|              heif_suberror_Security_limit_exceeded,
  365|      0|              sstr.str()};
  366|      0|    }
  367|       |
  368|    101|    m_num_tile_cols = num_tile_cols_minus_one + 1;
  369|    101|    m_num_tile_rows = num_tile_rows_minus_one + 1;
  370|    101|  }
  371|       |
  372|  3.99k|  return range.get_error();
  373|  4.67k|}
_ZNK8Box_uncC4dumpER6Indent:
  378|  2.22k|{
  379|  2.22k|  std::ostringstream sstr;
  380|  2.22k|  sstr << Box::dump(indent);
  381|       |
  382|  2.22k|  sstr << indent << "profile: " << m_profile;
  383|  2.22k|  if (m_profile != 0) {
  ------------------
  |  Branch (383:7): [True: 1.84k, False: 385]
  ------------------
  384|  1.84k|    sstr << " (" << fourcc_to_string(m_profile) << ")";
  385|  1.84k|  }
  386|  2.22k|  sstr << "\n";
  387|  2.22k|  if (get_version() == 0) {
  ------------------
  |  Branch (387:7): [True: 61, False: 2.16k]
  ------------------
  388|    513|    for (const auto& component : m_components) {
  ------------------
  |  Branch (388:32): [True: 513, False: 61]
  ------------------
  389|    513|      sstr << indent << "component_index: " << component.component_index << "\n";
  390|    513|      indent++;
  391|    513|      sstr << indent << "component_bit_depth: " << (int) component.component_bit_depth << "\n";
  392|    513|      sstr << indent << "component_format: " << get_name(heif_uncompressed_component_format(component.component_format), sNames_uncompressed_component_format) << "\n";
  393|    513|      sstr << indent << "component_align_size: " << (int) component.component_align_size << "\n";
  394|    513|      indent--;
  395|    513|    }
  396|       |
  397|     61|    sstr << indent << "sampling_type: " << get_name(heif_uncompressed_sampling_mode(m_sampling_type), sNames_uncompressed_sampling_mode) << "\n";
  398|       |
  399|     61|    sstr << indent << "interleave_type: " << get_name(heif_uncompressed_interleave_mode(m_interleave_type), sNames_uncompressed_interleave_mode) << "\n";
  400|       |
  401|     61|    sstr << indent << "block_size: " << (int) m_block_size << "\n";
  402|       |
  403|     61|    sstr << indent << "components_little_endian: " << m_components_little_endian << "\n";
  404|     61|    sstr << indent << "block_pad_lsb: " << m_block_pad_lsb << "\n";
  405|     61|    sstr << indent << "block_little_endian: " << m_block_little_endian << "\n";
  406|     61|    sstr << indent << "block_reversed: " << m_block_reversed << "\n";
  407|     61|    sstr << indent << "pad_unknown: " << m_pad_unknown << "\n";
  408|       |
  409|     61|    sstr << indent << "pixel_size: " << m_pixel_size << "\n";
  410|       |
  411|     61|    sstr << indent << "row_align_size: " << m_row_align_size << "\n";
  412|       |
  413|     61|    sstr << indent << "tile_align_size: " << m_tile_align_size << "\n";
  414|       |
  415|     61|    sstr << indent << "num_tile_cols: " << m_num_tile_cols << "\n";
  416|       |
  417|     61|    sstr << indent << "num_tile_rows: " << m_num_tile_rows << "\n";
  418|     61|  }
  419|  2.22k|  return sstr.str();
  420|  2.22k|}
_ZN8Box_cmpC5parseER14BitstreamRangePK20heif_security_limits:
  750|    705|{
  751|    705|  parse_full_box_header(range);
  752|       |
  753|    705|  if (get_version() != 0) {
  ------------------
  |  Branch (753:7): [True: 6, False: 699]
  ------------------
  754|      6|    return unsupported_version_error("cmpC");
  755|      6|  }
  756|       |
  757|    699|  m_compression_type = range.read32();
  758|       |
  759|    699|  uint8_t unit_type = range.read8();
  760|    699|  if (unit_type > heif_cmpC_compressed_unit_type_image_pixel) {
  ------------------
  |  Branch (760:7): [True: 2, False: 697]
  ------------------
  761|      2|    return {heif_error_Invalid_input,
  762|      2|            heif_suberror_Unsupported_parameter,
  763|      2|            "Unsupported cmpC compressed unit type"};
  764|    697|  };
  765|       |
  766|    697|  m_compressed_unit_type = static_cast<heif_cmpC_compressed_unit_type>(unit_type);
  767|       |
  768|    697|  return range.get_error();
  769|    699|}
_ZNK8Box_cmpC4dumpER6Indent:
  773|    599|{
  774|    599|  std::ostringstream sstr;
  775|    599|  sstr << Box::dump(indent);
  776|    599|  sstr << indent << "compression_type: " << fourcc_to_string(m_compression_type) << "\n";
  777|    599|  sstr << indent << "compressed_entity_type: " << (int)m_compressed_unit_type << "\n";
  778|    599|  return sstr.str();
  779|    599|}
_ZN8Box_icef5parseER14BitstreamRangePK20heif_security_limits:
  798|    805|{
  799|    805|  parse_full_box_header(range);
  800|       |
  801|    805|  if (get_version() != 0) {
  ------------------
  |  Branch (801:7): [True: 3, False: 802]
  ------------------
  802|      3|    return unsupported_version_error("icef");
  803|      3|  }
  804|    802|  uint8_t codes = range.read8();
  805|    802|  uint8_t unit_offset_code = (codes & 0b11100000) >> 5;
  806|    802|  uint8_t unit_size_code = (codes & 0b00011100) >> 2;
  807|    802|  uint32_t num_compressed_units = range.read32();
  808|    802|  uint64_t implied_offset = 0;
  809|       |
  810|    802|  if (unit_offset_code > 4) {
  ------------------
  |  Branch (810:7): [True: 2, False: 800]
  ------------------
  811|      2|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit offset code"};
  812|      2|  }
  813|       |
  814|    800|  if (unit_size_code > 4) {
  ------------------
  |  Branch (814:7): [True: 5, False: 795]
  ------------------
  815|      5|    return {heif_error_Usage_error, heif_suberror_Unsupported_parameter, "Unsupported icef unit size code"};
  816|      5|  }
  817|       |
  818|       |  // --- precompute fields lengths
  819|       |
  820|    795|  uint8_t unit_offset_bits = unit_offset_bits_table[unit_offset_code];
  821|    795|  uint8_t unit_size_bits = unit_size_bits_table[unit_size_code];
  822|       |
  823|       |  // --- check if box is large enough for all the data
  824|       |
  825|    795|  uint64_t data_size_bytes = static_cast<uint64_t>(num_compressed_units) * (unit_offset_bits + unit_size_bits) / 8;
  826|    795|  if (data_size_bytes > range.get_remaining_bytes()) {
  ------------------
  |  Branch (826:7): [True: 15, False: 780]
  ------------------
  827|     15|    uint64_t contained_units = range.get_remaining_bytes() / ((unit_offset_bits + unit_size_bits) * 8);
  828|     15|    std::stringstream sstr;
  829|     15|    sstr << "icef box declares " << num_compressed_units << " units, but only " << contained_units
  830|     15|         << " were contained in the file";
  831|     15|    return {heif_error_Invalid_input,
  832|     15|            heif_suberror_End_of_data,
  833|     15|            sstr.str()};
  834|     15|  }
  835|       |
  836|       |  // TODO: should we impose some security limit?
  837|       |
  838|       |  // --- read box content
  839|       |
  840|    780|  m_unit_infos.resize(num_compressed_units);
  841|       |
  842|  1.40M|  for (uint32_t r = 0; r < num_compressed_units; r++) {
  ------------------
  |  Branch (842:24): [True: 1.40M, False: 776]
  ------------------
  843|  1.40M|    CompressedUnitInfo unitInfo;
  844|  1.40M|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (844:9): [True: 1.40M, False: 377]
  ------------------
  845|  1.40M|      unitInfo.unit_offset = implied_offset;
  846|  1.40M|    } else {
  847|    377|      unitInfo.unit_offset = range.read_uint(unit_offset_bits);
  848|    377|    }
  849|       |
  850|  1.40M|    unitInfo.unit_size = range.read_uint(unit_size_bits);
  851|       |
  852|       |    // Reject unit_offset + unit_size wrapping past the 64 bit range.
  853|  1.40M|    if (unitInfo.unit_size >= UINT64_MAX - unitInfo.unit_offset) {
  ------------------
  |  Branch (853:9): [True: 4, False: 1.40M]
  ------------------
  854|      4|      return {heif_error_Invalid_input,
  855|      4|              heif_suberror_Invalid_parameter_value,
  856|      4|              "icef unit offset + size exceeds 64 bit range"};
  857|      4|    }
  858|       |
  859|       |    // implied_offset is only used as unit_offset when unit_offset_code==0.
  860|       |    // Accumulating it for other offset codes would be unused and could overflow, so only do it if needed.
  861|  1.40M|    if (unit_offset_code == 0) {
  ------------------
  |  Branch (861:9): [True: 1.40M, False: 375]
  ------------------
  862|  1.40M|      implied_offset += unitInfo.unit_size;
  863|  1.40M|    }
  864|       |
  865|  1.40M|    if (range.get_error() != Error::Ok) {
  ------------------
  |  Branch (865:9): [True: 0, False: 1.40M]
  ------------------
  866|      0|      return range.get_error();
  867|      0|    }
  868|       |
  869|  1.40M|    m_unit_infos[r] = unitInfo;
  870|  1.40M|  }
  871|       |
  872|    776|  return range.get_error();
  873|    780|}
_ZNK8Box_icef4dumpER6Indent:
  877|    770|{
  878|    770|  std::ostringstream sstr;
  879|    770|  sstr << Box::dump(indent);
  880|    770|  sstr << indent << "num_compressed_units: " << m_unit_infos.size() << "\n";
  881|  1.40M|  for (CompressedUnitInfo unit_info: m_unit_infos) {
  ------------------
  |  Branch (881:36): [True: 1.40M, False: 770]
  ------------------
  882|  1.40M|    sstr << indent << "unit_offset: " << unit_info.unit_offset << ", unit_size: " << unit_info.unit_size << "\n";
  883|  1.40M|  }
  884|    770|  return sstr.str();
  885|    770|}
_ZN8Box_cpat5parseER14BitstreamRangePK20heif_security_limits:
 1002|    724|{
 1003|    724|  parse_full_box_header(range);
 1004|       |
 1005|    724|  if (get_version() != 0) {
  ------------------
  |  Branch (1005:7): [True: 1, False: 723]
  ------------------
 1006|      1|    return unsupported_version_error("cpat");
 1007|      1|  }
 1008|       |
 1009|    723|  m_pattern.pattern_width = range.read16();
 1010|    723|  m_pattern.pattern_height = range.read16();
 1011|       |
 1012|    723|  if (m_pattern.pattern_width == 0 || m_pattern.pattern_height == 0) {
  ------------------
  |  Branch (1012:7): [True: 4, False: 719]
  |  Branch (1012:39): [True: 13, False: 706]
  ------------------
 1013|     17|    return {heif_error_Invalid_input,
 1014|     17|            heif_suberror_Invalid_parameter_value,
 1015|     17|            "Zero Bayer pattern size."};
 1016|     17|  }
 1017|       |
 1018|    706|  auto max_bayer_pattern_size = limits->max_bayer_pattern_pixels;
 1019|    706|  if (max_bayer_pattern_size && m_pattern.pattern_height > max_bayer_pattern_size / m_pattern.pattern_width) {
  ------------------
  |  Branch (1019:7): [True: 706, False: 0]
  |  Branch (1019:33): [True: 11, False: 695]
  ------------------
 1020|     11|    return {heif_error_Invalid_input,
 1021|     11|            heif_suberror_Security_limit_exceeded,
 1022|     11|            "Maximum Bayer pattern size exceeded."};
 1023|     11|  }
 1024|       |
 1025|    695|  size_t num_pixels = size_t{m_pattern.pattern_width} * m_pattern.pattern_height;
 1026|    695|  m_pattern.pixels.resize(num_pixels);
 1027|       |
 1028|  5.62k|  for (size_t i = 0; i < num_pixels; i++) {
  ------------------
  |  Branch (1028:22): [True: 4.92k, False: 695]
  ------------------
 1029|  4.92k|    BayerPatternPixelCmpd pixel{};
 1030|  4.92k|    pixel.cmpd_index = range.read32();
 1031|  4.92k|    pixel.component_gain = range.read_float32();
 1032|  4.92k|    m_pattern.pixels[i] = pixel;
 1033|  4.92k|  }
 1034|       |
 1035|    695|  return range.get_error();
 1036|    706|}
_ZNK8Box_cpat4dumpER6Indent:
 1040|    530|{
 1041|    530|  std::ostringstream sstr;
 1042|       |
 1043|    530|  sstr << FullBox::dump(indent);
 1044|    530|  sstr << indent << "pattern_width: " << get_pattern_width() << "\n";
 1045|    530|  sstr << indent << "pattern_height: " << get_pattern_height() << "\n";
 1046|       |
 1047|  2.56k|  for (const auto& pixel : m_pattern.pixels) {
  ------------------
  |  Branch (1047:26): [True: 2.56k, False: 530]
  ------------------
 1048|  2.56k|    sstr << indent << "component index: " << pixel.cmpd_index << ", gain: " << pixel.component_gain << "\n";
 1049|  2.56k|  }
 1050|    530|  return sstr.str();
 1051|    530|}
_Z8get_nameI24heif_cmpd_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|    513|{
  124|    513|  auto iter = table.find(val);
  125|    513|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 513]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|    513|  else {
  129|    513|    return iter->second;
  130|    513|  }
  131|    513|}
_Z8get_nameI31heif_uncompressed_sampling_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|     61|{
  124|     61|  auto iter = table.find(val);
  125|     61|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 61]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|     61|  else {
  129|     61|    return iter->second;
  130|     61|  }
  131|     61|}
_Z8get_nameI33heif_uncompressed_interleave_modeEPKcT_RKNSt3__13mapIS3_S2_NS4_4lessIS3_EENS4_9allocatorINS4_4pairIKS3_S2_EEEEEE:
  123|     61|{
  124|     61|  auto iter = table.find(val);
  125|     61|  if (iter == table.end()) {
  ------------------
  |  Branch (125:7): [True: 0, False: 61]
  ------------------
  126|      0|    return "unknown";
  127|      0|  }
  128|     61|  else {
  129|     61|    return iter->second;
  130|     61|  }
  131|     61|}

_ZN8Box_cmpdC2Ev:
   45|    811|  {
   46|    811|    set_short_type(fourcc("cmpd"));
   47|    811|  }
_ZN8Box_uncCC2Ev:
   90|  4.67k|  Box_uncC() {
   91|  4.67k|    set_short_type(fourcc("uncC"));
   92|  4.67k|  }
_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|   911k|{
  153|   911k|  std::string str("    ");
  154|   911k|  str[0] = static_cast<char>((code >> 24) & 0xFF);
  155|   911k|  str[1] = static_cast<char>((code >> 16) & 0xFF);
  156|   911k|  str[2] = static_cast<char>((code >> 8) & 0xFF);
  157|   911k|  str[3] = static_cast<char>((code >> 0) & 0xFF);
  158|       |
  159|   911k|  return str;
  160|   911k|}

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

_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:
  280|  14.7k|{
  281|  14.7k|  m_heif_file = std::make_shared<HeifFile>();
  282|  14.7k|  m_heif_file->set_security_limits(&m_limits);
  283|  14.7k|  m_heif_file->new_empty_file();
  284|       |
  285|  14.7k|  m_all_images.clear();
  286|  14.7k|  m_top_level_images.clear();
  287|  14.7k|  m_primary_image.reset();
  288|  14.7k|}

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

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

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

_ZN8HeifFileC2Ev:
   66|  14.7k|{
   67|  14.7k|  m_file_layout = std::make_shared<FileLayout>();
   68|  14.7k|}
_ZN8HeifFileD2Ev:
   70|  14.7k|HeifFile::~HeifFile() = default;
_ZN8HeifFile14new_empty_fileEv:
  160|  14.7k|{
  161|       |  //m_input_stream.reset();
  162|  14.7k|  m_top_level_boxes.clear();
  163|       |
  164|  14.7k|  m_ftyp_box = std::make_shared<Box_ftyp>();
  165|  14.7k|  m_top_level_boxes.push_back(m_ftyp_box);
  166|  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:
  115|  1.25k|{
  116|  1.25k|  params.version = 1;
  117|       |
  118|  1.25k|  params.image_width = 0;
  119|  1.25k|  params.image_height = 0;
  120|  1.25k|  params.tile_width = 0;
  121|  1.25k|  params.tile_height = 0;
  122|  1.25k|  params.compression_format_fourcc = 0;
  123|  1.25k|  params.offset_field_length = 40;
  124|  1.25k|  params.size_field_length = 24;
  125|  1.25k|  params.number_of_extra_dimensions = 0;
  126|       |
  127|  10.0k|  for (uint32_t& dim : params.extra_dimensions) {
  ------------------
  |  Branch (127:22): [True: 10.0k, False: 1.25k]
  ------------------
  128|  10.0k|    dim = 0;
  129|  10.0k|  }
  130|       |
  131|  1.25k|  params.tiles_are_sequential = false;
  132|  1.25k|}
_ZNK8Box_tilC4dumpER6Indent:
  222|    814|{
  223|    814|  std::ostringstream sstr;
  224|       |
  225|    814|  sstr << BoxHeader::dump(indent);
  226|       |
  227|    814|  sstr << indent << "version: " << ((int) get_version()) << "\n"
  228|       |       //<< indent << "image size: " << m_parameters.image_width << "x" << m_parameters.image_height << "\n"
  229|    814|       << indent << "tile size: " << m_parameters.tile_width << "x" << m_parameters.tile_height << "\n"
  230|    814|       << indent << "compression: " << fourcc_to_string(m_parameters.compression_format_fourcc) << "\n"
  231|    814|       << indent << "tiles are sequential: " << (m_parameters.tiles_are_sequential ? "yes" : "no") << "\n"
  ------------------
  |  Branch (231:50): [True: 40, False: 774]
  ------------------
  232|    814|       << indent << "offset field length: " << ((int) m_parameters.offset_field_length) << " bits\n"
  233|    814|       << indent << "size field length: " << ((int) m_parameters.size_field_length) << " bits\n"
  234|    814|       << indent << "number of extra dimensions: " << ((int) m_parameters.number_of_extra_dimensions) << "\n";
  235|       |
  236|    814|  sstr << indent << "tile properties:\n"
  237|    814|       << dump_children(indent, true);
  238|       |
  239|    814|  return sstr.str();
  240|       |
  241|    814|}
_ZN8Box_tilC5parseER14BitstreamRangePK20heif_security_limits:
  245|  1.25k|{
  246|  1.25k|  parse_full_box_header(range);
  247|       |
  248|       |  // Note: actually, we should allow 0 only, but there are a few images around that use version 1.
  249|  1.25k|  if (get_version() > 1) {
  ------------------
  |  Branch (249:7): [True: 6, False: 1.24k]
  ------------------
  250|      6|    std::stringstream sstr;
  251|      6|    sstr << "'tili' image version " << ((int) get_version()) << " is not implemented yet";
  252|       |
  253|      6|    return {heif_error_Unsupported_feature,
  254|      6|            heif_suberror_Unsupported_data_version,
  255|      6|            sstr.str()};
  256|      6|  }
  257|       |
  258|  1.24k|  m_parameters.version = get_version();
  259|       |
  260|  1.24k|  uint32_t flags = get_flags();
  261|       |
  262|  1.24k|  switch (flags & 0x03) {
  ------------------
  |  Branch (262:11): [True: 1.24k, False: 0]
  ------------------
  263|    758|    case 0:
  ------------------
  |  Branch (263:5): [True: 758, False: 488]
  ------------------
  264|    758|      m_parameters.offset_field_length = 32;
  265|    758|      break;
  266|     69|    case 1:
  ------------------
  |  Branch (266:5): [True: 69, False: 1.17k]
  ------------------
  267|     69|      m_parameters.offset_field_length = 40;
  268|     69|      break;
  269|    192|    case 2:
  ------------------
  |  Branch (269:5): [True: 192, False: 1.05k]
  ------------------
  270|    192|      m_parameters.offset_field_length = 48;
  271|    192|      break;
  272|    227|    case 3:
  ------------------
  |  Branch (272:5): [True: 227, False: 1.01k]
  ------------------
  273|    227|      m_parameters.offset_field_length = 64;
  274|    227|      break;
  275|  1.24k|  }
  276|       |
  277|  1.24k|  switch (flags & 0x0c) {
  ------------------
  |  Branch (277:11): [True: 1.24k, False: 0]
  ------------------
  278|    471|    case 0x00:
  ------------------
  |  Branch (278:5): [True: 471, False: 775]
  ------------------
  279|    471|      m_parameters.size_field_length = 0;
  280|    471|      break;
  281|     97|    case 0x04:
  ------------------
  |  Branch (281:5): [True: 97, False: 1.14k]
  ------------------
  282|     97|      m_parameters.size_field_length = 24;
  283|     97|      break;
  284|    505|    case 0x08:
  ------------------
  |  Branch (284:5): [True: 505, False: 741]
  ------------------
  285|    505|      m_parameters.size_field_length = 32;
  286|    505|      break;
  287|    173|    case 0x0c:
  ------------------
  |  Branch (287:5): [True: 173, False: 1.07k]
  ------------------
  288|    173|      m_parameters.size_field_length = 64;
  289|    173|      break;
  290|  1.24k|  }
  291|       |
  292|  1.24k|  m_parameters.tiles_are_sequential = !!(flags & 0x10);
  293|       |
  294|       |
  295|  1.24k|  m_parameters.tile_width = range.read32();
  296|  1.24k|  m_parameters.tile_height = range.read32();
  297|  1.24k|  m_parameters.compression_format_fourcc = range.read32();
  298|       |
  299|  1.24k|  if (m_parameters.tile_width == 0 || m_parameters.tile_height == 0) {
  ------------------
  |  Branch (299:7): [True: 6, False: 1.24k]
  |  Branch (299:39): [True: 46, False: 1.19k]
  ------------------
  300|     52|    return {heif_error_Invalid_input,
  301|     52|            heif_suberror_Unspecified,
  302|     52|            "Tile with zero width or height."};
  303|     52|  }
  304|       |
  305|       |
  306|       |  // --- extra dimensions
  307|       |
  308|  1.19k|  m_parameters.number_of_extra_dimensions = range.read8();
  309|       |
  310|  1.92k|  for (int i = 0; i < m_parameters.number_of_extra_dimensions; i++) {
  ------------------
  |  Branch (310:19): [True: 781, False: 1.14k]
  ------------------
  311|    781|    uint32_t size = range.read32();
  312|       |
  313|    781|    if (size == 0) {
  ------------------
  |  Branch (313:9): [True: 50, False: 731]
  ------------------
  314|     50|      return {heif_error_Invalid_input,
  315|     50|              heif_suberror_Unspecified,
  316|     50|              "'tili' extra dimension may not be zero."};
  317|     50|    }
  318|       |
  319|    731|    if (i < 8) {
  ------------------
  |  Branch (319:9): [True: 393, False: 338]
  ------------------
  320|    393|      m_parameters.extra_dimensions[i] = size;
  321|    393|    }
  322|    338|    else {
  323|       |      // TODO: error: too many dimensions (not supported)
  324|    338|    }
  325|    731|  }
  326|       |
  327|       |  // --- read tile properties
  328|       |
  329|       |  // Check version for backwards compatibility with old format.
  330|       |  // TODO: remove when spec is final and old test images have been converted
  331|  1.14k|  if (get_version() == 0) {
  ------------------
  |  Branch (331:7): [True: 304, False: 840]
  ------------------
  332|    304|    uint8_t num_properties = range.read8();
  333|       |
  334|    304|    Error error = read_children(range, num_properties, limits);
  335|    304|    if (error) {
  ------------------
  |  Branch (335:9): [True: 97, False: 207]
  ------------------
  336|     97|      return error;
  337|     97|    }
  338|    304|  }
  339|       |
  340|  1.04k|  return range.get_error();
  341|  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.2M|{
   28|  27.2M|  std::stringstream sstr;
   29|       |
   30|   187M|  for (int i = 0; i < get_indent(); i++) {
  ------------------
  |  Branch (30:19): [True: 160M, False: 27.2M]
  ------------------
   31|   160M|    sstr << "| ";
   32|   160M|  }
   33|       |
   34|  27.2M|  return sstr.str();
   35|  27.2M|}
_Z21write_raw_data_as_hexPKhmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   41|  96.8k|{
   42|  96.8k|  std::stringstream sstr;
   43|       |
   44|  96.8k|  sstr << std::hex << std::setfill('0');
   45|       |
   46|  9.27M|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (46:22): [True: 9.17M, False: 96.8k]
  ------------------
   47|  9.17M|    if (i % 16 == 0) {
  ------------------
  |  Branch (47:9): [True: 610k, False: 8.56M]
  ------------------
   48|       |      // start of line
   49|       |
   50|   610k|      if (i == 0) {
  ------------------
  |  Branch (50:11): [True: 69.0k, False: 541k]
  ------------------
   51|  69.0k|        sstr << firstLineIndent;
   52|  69.0k|      }
   53|   541k|      else {
   54|   541k|        sstr << remainingLinesIndent;
   55|   541k|      }
   56|   610k|      sstr << std::setw(4) << i << ": "; // address
   57|   610k|    }
   58|  8.56M|    else if (i % 16 == 8) {
  ------------------
  |  Branch (58:14): [True: 561k, False: 8.00M]
  ------------------
   59|       |      // space in middle
   60|   561k|      sstr << "  ";
   61|   561k|    }
   62|  8.00M|    else {
   63|       |      // space between bytes
   64|  8.00M|      sstr << " ";
   65|  8.00M|    }
   66|       |
   67|  9.17M|    sstr << std::setw(2) << ((int) data[i]);
   68|       |
   69|  9.17M|    if (i % 16 == 15 || i == len - 1) {
  ------------------
  |  Branch (69:9): [True: 546k, False: 8.63M]
  |  Branch (69:25): [True: 63.8k, False: 8.56M]
  ------------------
   70|   610k|      sstr << "\n";
   71|   610k|    }
   72|  9.17M|  }
   73|       |
   74|  96.8k|  return sstr.str();
   75|  96.8k|}

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

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

_ZN18color_profile_nclx5parseER14BitstreamRange:
  223|    593|{
  224|    593|  StreamReader::grow_status status;
  225|    593|  status = range.wait_for_available_bytes(7);
  226|    593|  if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (226:7): [True: 3, False: 590]
  ------------------
  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|    590|  m_profile.m_colour_primaries = range.read16();
  233|    590|  m_profile.m_transfer_characteristics = range.read16();
  234|    590|  m_profile.m_matrix_coefficients = range.read16();
  235|    590|  m_profile.m_full_range_flag = (range.read8() & 0x80 ? true : false);
  ------------------
  |  Branch (235:34): [True: 64, False: 526]
  ------------------
  236|       |
  237|    590|  return Error::Ok;
  238|    593|}
_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|    677|{
  316|       |  // sRGB defaults
  317|    677|  m_colour_primaries = 1;
  318|    677|  m_transfer_characteristics = 13;
  319|    677|  m_matrix_coefficients = 6;
  320|    677|  m_full_range_flag = true;
  321|    677|}
_ZN8Box_colr5parseER14BitstreamRangePK20heif_security_limits:
  385|  9.23k|{
  386|  9.23k|  StreamReader::grow_status status;
  387|  9.23k|  uint32_t colour_type = range.read32();
  388|       |
  389|  9.23k|  if (colour_type == fourcc("nclx")) {
  ------------------
  |  Branch (389:7): [True: 593, False: 8.63k]
  ------------------
  390|    593|    auto color_profile = std::make_shared<color_profile_nclx>();
  391|    593|    m_color_profile = color_profile;
  392|    593|    Error err = color_profile->parse(range);
  393|    593|    if (err) {
  ------------------
  |  Branch (393:9): [True: 3, False: 590]
  ------------------
  394|      3|      return err;
  395|      3|    }
  396|    593|  }
  397|  8.63k|  else if (colour_type == fourcc("nclc")) {
  ------------------
  |  Branch (397:12): [True: 84, False: 8.55k]
  ------------------
  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|  8.55k|  else if (colour_type == fourcc("prof") ||
  ------------------
  |  Branch (405:12): [True: 2.47k, False: 6.08k]
  ------------------
  406|  8.43k|           colour_type == fourcc("rICC")) {
  ------------------
  |  Branch (406:12): [True: 5.96k, False: 116]
  ------------------
  407|  8.43k|    if (!has_fixed_box_size()) {
  ------------------
  |  Branch (407:9): [True: 2, False: 8.43k]
  ------------------
  408|      2|      return Error(heif_error_Unsupported_feature, heif_suberror_Unspecified, "colr boxes with undefined box size are not supported");
  409|      2|    }
  410|       |
  411|  8.43k|    uint64_t profile_size_64 = get_box_size() - get_header_size() - 4;
  412|  8.43k|    if (limits->max_color_profile_size && profile_size_64 > limits->max_color_profile_size) {
  ------------------
  |  Branch (412:9): [True: 8.43k, False: 0]
  |  Branch (412:43): [True: 0, False: 8.43k]
  ------------------
  413|      0|      return Error(heif_error_Invalid_input, heif_suberror_Security_limit_exceeded, "Color profile exceeds maximum supported size");
  414|      0|    }
  415|       |
  416|  8.43k|    size_t profile_size = static_cast<size_t>(profile_size_64);
  417|       |
  418|  8.43k|    status = range.wait_for_available_bytes(profile_size);
  419|  8.43k|    if (status != StreamReader::grow_status::size_reached) {
  ------------------
  |  Branch (419:9): [True: 0, False: 8.43k]
  ------------------
  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|  8.43k|    std::vector<uint8_t> rawData(profile_size);
  426|   172k|    for (size_t i = 0; i < profile_size; i++) {
  ------------------
  |  Branch (426:24): [True: 163k, False: 8.43k]
  ------------------
  427|   163k|      rawData[i] = range.read8();
  428|   163k|    }
  429|       |
  430|  8.43k|    m_color_profile = std::make_shared<color_profile_raw>(colour_type, rawData);
  431|  8.43k|  }
  432|    116|  else {
  433|    116|    return Error(heif_error_Invalid_input,
  434|    116|                 heif_suberror_Unknown_color_profile_type);
  435|    116|  }
  436|       |
  437|  9.10k|  return range.get_error();
  438|  9.23k|}
_ZNK8Box_colr4dumpER6Indent:
  442|  7.30k|{
  443|  7.30k|  std::ostringstream sstr;
  444|  7.30k|  sstr << Box::dump(indent);
  445|       |
  446|  7.30k|  if (m_color_profile) {
  ------------------
  |  Branch (446:7): [True: 7.30k, False: 0]
  ------------------
  447|  7.30k|    sstr << indent << "colour_type: " << fourcc_to_string(get_color_profile_type()) << "\n";
  448|  7.30k|    sstr << m_color_profile->dump(indent);
  449|  7.30k|  }
  450|      0|  else {
  451|      0|    sstr << indent << "colour_type: ---\n";
  452|      0|    sstr << "no color profile\n";
  453|      0|  }
  454|       |
  455|  7.30k|  return sstr.str();
  456|  7.30k|}
_ZNK17color_profile_raw4dumpER6Indent:
  460|  6.68k|{
  461|  6.68k|  std::ostringstream sstr;
  462|  6.68k|  sstr << indent << "profile size: " << m_data.size() << "\n";
  463|  6.68k|  return sstr.str();
  464|  6.68k|}
_ZNK18color_profile_nclx4dumpER6Indent:
  468|    618|{
  469|    618|  std::ostringstream sstr;
  470|    618|  sstr << indent << "colour_primaries: " << m_profile.m_colour_primaries << "\n"
  471|    618|       << indent << "transfer_characteristics: " << m_profile.m_transfer_characteristics << "\n"
  472|    618|       << indent << "matrix_coefficients: " << m_profile.m_matrix_coefficients << "\n"
  473|    618|       << indent << "full_range_flag: " << m_profile.m_full_range_flag << "\n";
  474|    618|  return sstr.str();
  475|    618|}

_ZN17color_profile_rawC2EjRKNSt3__16vectorIhNS0_9allocatorIhEEEE:
  105|  8.43k|      : m_type(type), m_data(data) {}
_ZNK17color_profile_raw8get_typeEv:
  107|  6.68k|  uint32_t get_type() const override { return m_type; }
_ZN18color_profile_nclxC2Ev:
  175|    677|  color_profile_nclx() { m_profile.set_sRGB_defaults(); }
_ZNK18color_profile_nclx8get_typeEv:
  184|    618|  uint32_t get_type() const override { return fourcc("nclx"); }
_ZN8Box_colrC2Ev:
  205|  9.23k|  {
  206|  9.23k|    set_short_type(fourcc("colr"));
  207|  9.23k|  }
_ZNK8Box_colr22get_color_profile_typeEv:
  211|  7.30k|  uint32_t get_color_profile_type() const { return m_color_profile->get_type(); }
_ZN13color_profileD2Ev:
   92|  9.11k|  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:
  495|      2|{
  496|      2|  return &decoder_jpeg;
  497|      2|}
decoder_jpeg.cc:_ZL16jpeg_init_pluginv:
   70|      2|{
   71|      2|}

_Z27get_decoder_plugin_libde265v:
  522|      2|{
  523|      2|  return &decoder_libde265;
  524|      2|}
decoder_libde265.cc:_ZL20libde265_init_pluginv:
   67|      2|{
   68|      2|  de265_init();
   69|      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:
  438|      2|{
  439|      2|  return &decoder_vvdec;
  440|      2|}
decoder_vvdec.cc:_ZL17vvdec_init_pluginv:
   84|      2|{
   85|      2|}

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

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

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

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

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

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

_ZN12MemoryHandleD2Ev:
   85|  10.1k|  ~MemoryHandle() { free(); }
_ZN12MemoryHandleC2Ev:
   84|  10.1k|  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.19k|{
   37|  2.19k|  std::ostringstream sstr;
   38|  2.19k|  sstr << Box::dump(indent);
   39|  2.19k|  sstr << dump_children(indent);
   40|       |
   41|  2.19k|  return sstr.str();
   42|  2.19k|}
_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.77k|  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|    209|{
  851|    209|  parse_full_box_header(range);
  852|       |
  853|    209|  if (get_version() > 0) {
  ------------------
  |  Branch (853:7): [True: 1, False: 208]
  ------------------
  854|      1|    return unsupported_version_error("stsc");
  855|      1|  }
  856|       |
  857|    208|  uint32_t entry_count = range.read32();
  858|    208|  if (entry_count == 0) {
  ------------------
  |  Branch (858:7): [True: 30, False: 178]
  ------------------
  859|     30|    return {
  860|     30|      heif_error_Invalid_input,
  861|     30|      heif_suberror_Unspecified,
  862|     30|      "'stsc' box with zero entries."};
  863|     30|  }
  864|       |
  865|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
  866|    178|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (866:7): [True: 178, False: 0]
  |  Branch (866:42): [True: 39, False: 139]
  ------------------
  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|    139|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(SampleToChunk),
  ------------------
  |  Branch (874:12): [True: 0, False: 139]
  ------------------
  875|    139|                                       limits, "the 'stsc' table")) {
  876|      0|    return err;
  877|      0|  }
  878|       |
  879|    139|  m_entries.resize(entry_count);
  880|       |
  881|    611|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (881:24): [True: 585, False: 26]
  ------------------
  882|    585|    SampleToChunk entry{};
  883|    585|    entry.first_chunk = range.read32();
  884|    585|    entry.samples_per_chunk = range.read32();
  885|    585|    entry.sample_description_index = range.read32();
  886|       |
  887|    585|    if (entry.samples_per_chunk == 0) {
  ------------------
  |  Branch (887:9): [True: 63, False: 522]
  ------------------
  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|    522|    if (entry.sample_description_index == 0) {
  ------------------
  |  Branch (894:9): [True: 0, False: 522]
  ------------------
  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|    522|    if (limits->max_sequence_frames > 0 && entry.samples_per_chunk > limits->max_sequence_frames) {
  ------------------
  |  Branch (901:9): [True: 522, False: 0]
  |  Branch (901:44): [True: 50, False: 472]
  ------------------
  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|    472|    m_entries[i] = entry;
  909|    472|  }
  910|       |
  911|     26|  return range.get_error();
  912|    139|}
_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|       |  // Note: test against maximum number of frames (upper limit) since we have no limit on maximum number of chunks
  989|  1.16k|  if (limits->max_sequence_frames > 0 && entry_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (989:7): [True: 1.16k, False: 0]
  |  Branch (989:42): [True: 26, False: 1.13k]
  ------------------
  990|     26|    return {
  991|     26|      heif_error_Invalid_input,
  992|     26|      heif_suberror_Unspecified,
  993|     26|      "Number of chunks in 'stco' box exceeds security limits of maximum number of frames."
  994|     26|    };
  995|     26|  }
  996|       |
  997|       |  // check required memory
  998|       |
  999|  1.13k|  uint64_t mem_size = static_cast<uint64_t>(entry_count) * sizeof(uint32_t);
 1000|  1.13k|  if (auto err = m_memory_handle.alloc(mem_size,
  ------------------
  |  Branch (1000:12): [True: 0, False: 1.13k]
  ------------------
 1001|  1.13k|                                       limits, "the 'stco' table")) {
 1002|      0|    return err;
 1003|      0|  }
 1004|       |
 1005|   237k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1005:24): [True: 236k, False: 1.10k]
  ------------------
 1006|   236k|    m_offsets.push_back(range.read32());
 1007|       |
 1008|   236k|    if (range.error()) {
  ------------------
  |  Branch (1008:9): [True: 33, False: 235k]
  ------------------
 1009|     33|      return range.get_error();
 1010|     33|    }
 1011|   236k|  }
 1012|       |
 1013|  1.10k|  return range.get_error();
 1014|  1.13k|}
_ZNK8Box_stco4dumpER6Indent:
 1018|    999|{
 1019|    999|  std::ostringstream sstr;
 1020|    999|  sstr << FullBox::dump(indent);
 1021|   161k|  for (size_t i = 0; i < m_offsets.size(); i++) {
  ------------------
  |  Branch (1021:22): [True: 160k, False: 999]
  ------------------
 1022|   160k|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_offsets[i] << std::dec << "\n";
 1023|   160k|  }
 1024|       |
 1025|    999|  return sstr.str();
 1026|    999|}
_ZN8Box_stsz5parseER14BitstreamRangePK20heif_security_limits:
 1068|    578|{
 1069|    578|  parse_full_box_header(range);
 1070|       |
 1071|    578|  if (get_version() > 0) {
  ------------------
  |  Branch (1071:7): [True: 7, False: 571]
  ------------------
 1072|      7|    return unsupported_version_error("stsz");
 1073|      7|  }
 1074|       |
 1075|    571|  m_fixed_sample_size = range.read32();
 1076|    571|  m_sample_count = range.read32();
 1077|       |
 1078|    571|  if (limits->max_sequence_frames > 0 && m_sample_count > limits->max_sequence_frames) {
  ------------------
  |  Branch (1078:7): [True: 571, False: 0]
  |  Branch (1078:42): [True: 87, False: 484]
  ------------------
 1079|     87|    return {
 1080|     87|      heif_error_Memory_allocation_error,
 1081|     87|      heif_suberror_Security_limit_exceeded,
 1082|     87|      "Security limit for maximum number of sequence frames exceeded"
 1083|     87|    };
 1084|     87|  }
 1085|       |
 1086|    484|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1086:7): [True: 384, False: 100]
  ------------------
 1087|       |    // check required memory
 1088|       |
 1089|    384|    if (auto err = m_memory_handle.alloc(m_sample_count, sizeof(uint32_t),
  ------------------
  |  Branch (1089:14): [True: 0, False: 384]
  ------------------
 1090|    384|                                         limits, "the 'stsz' table")) {
 1091|      0|      return err;
 1092|      0|    }
 1093|       |
 1094|   291k|    for (uint32_t i = 0; i < m_sample_count; i++) {
  ------------------
  |  Branch (1094:26): [True: 291k, False: 343]
  ------------------
 1095|   291k|      if (range.eof()) {
  ------------------
  |  Branch (1095:11): [True: 22, False: 291k]
  ------------------
 1096|     22|        std::stringstream sstr;
 1097|     22|        sstr << "stsz box should contain " << m_sample_count << " entries, but box only contained "
 1098|     22|            << i << " entries";
 1099|       |
 1100|     22|        return {
 1101|     22|          heif_error_Invalid_input,
 1102|     22|          heif_suberror_End_of_data,
 1103|     22|          sstr.str()
 1104|     22|        };
 1105|     22|      }
 1106|       |
 1107|   291k|      m_sample_sizes.push_back(range.read32());
 1108|       |
 1109|   291k|      if (range.error()) {
  ------------------
  |  Branch (1109:11): [True: 19, False: 291k]
  ------------------
 1110|     19|        return range.get_error();
 1111|     19|      }
 1112|   291k|    }
 1113|    384|  }
 1114|       |
 1115|    443|  return range.get_error();
 1116|    484|}
_ZNK8Box_stsz4dumpER6Indent:
 1120|    381|{
 1121|    381|  std::ostringstream sstr;
 1122|    381|  sstr << FullBox::dump(indent);
 1123|    381|  sstr << indent << "sample count: " << m_sample_count << "\n";
 1124|    381|  if (m_fixed_sample_size == 0) {
  ------------------
  |  Branch (1124:7): [True: 330, False: 51]
  ------------------
 1125|   101k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1125:24): [True: 100k, False: 330]
  ------------------
 1126|   100k|      sstr << indent << "[" << i << "] : " << m_sample_sizes[i] << "\n";
 1127|   100k|    }
 1128|    330|  }
 1129|     51|  else {
 1130|     51|    sstr << indent << "fixed sample size: " << m_fixed_sample_size << "\n";
 1131|     51|  }
 1132|       |
 1133|    381|  return sstr.str();
 1134|    381|}
_ZN8Box_stss5parseER14BitstreamRangePK20heif_security_limits:
 1186|    738|{
 1187|    738|  parse_full_box_header(range);
 1188|       |
 1189|    738|  if (get_version() > 0) {
  ------------------
  |  Branch (1189:7): [True: 8, False: 730]
  ------------------
 1190|      8|    return unsupported_version_error("stss");
 1191|      8|  }
 1192|       |
 1193|    730|  uint32_t sample_count = range.read32();
 1194|       |
 1195|       |  // check required memory
 1196|       |
 1197|    730|  if (auto err = m_memory_handle.alloc(sample_count, sizeof(uint32_t),
  ------------------
  |  Branch (1197:12): [True: 36, False: 694]
  ------------------
 1198|    730|                                       limits, "the 'stss' table")) {
 1199|     36|    return err;
 1200|     36|  }
 1201|       |
 1202|   459k|  for (uint32_t i = 0; i < sample_count; i++) {
  ------------------
  |  Branch (1202:24): [True: 458k, False: 650]
  ------------------
 1203|   458k|    m_sync_samples.push_back(range.read32());
 1204|       |
 1205|   458k|    if (range.error()) {
  ------------------
  |  Branch (1205:9): [True: 44, False: 458k]
  ------------------
 1206|     44|      return range.get_error();
 1207|     44|    }
 1208|   458k|  }
 1209|       |
 1210|    650|  return range.get_error();
 1211|    694|}
_ZNK8Box_stss4dumpER6Indent:
 1215|    638|{
 1216|    638|  std::ostringstream sstr;
 1217|    638|  sstr << FullBox::dump(indent);
 1218|   454k|  for (size_t i = 0; i < m_sync_samples.size(); i++) {
  ------------------
  |  Branch (1218:22): [True: 454k, False: 638]
  ------------------
 1219|   454k|    sstr << indent << "[" << i << "] : " << m_sync_samples[i] << "\n";
 1220|   454k|  }
 1221|       |
 1222|    638|  return sstr.str();
 1223|    638|}
_ZN17VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1253|  1.75k|{
 1254|  1.75k|  (void)limits;
 1255|       |
 1256|  1.75k|  range.skip(6);
 1257|  1.75k|  data_reference_index = range.read16();
 1258|       |
 1259|  1.75k|  pre_defined = range.read16();
 1260|  1.75k|  range.skip(2);
 1261|  5.26k|  for (uint32_t& p : pre_defined2) {
  ------------------
  |  Branch (1261:20): [True: 5.26k, False: 1.75k]
  ------------------
 1262|  5.26k|    p = range.read32();
 1263|  5.26k|  }
 1264|  1.75k|  width = range.read16();
 1265|  1.75k|  height = range.read16();
 1266|  1.75k|  horizresolution = range.read32();
 1267|  1.75k|  vertresolution = range.read32();
 1268|  1.75k|  range.skip(4);
 1269|  1.75k|  frame_count = range.read16();
 1270|  1.75k|  compressorname = range.read_fixed_string(32);
 1271|  1.75k|  depth = range.read16();
 1272|  1.75k|  pre_defined3 = range.read16s();
 1273|       |
 1274|       |  // other boxes from derived specifications
 1275|       |  //std::shared_ptr<Box_clap> clap; // optional // TODO
 1276|       |  //std::shared_ptr<Box_pixi> pixi; // optional // TODO
 1277|       |
 1278|  1.75k|  return Error::Ok;
 1279|  1.75k|}
_ZNK17VisualSampleEntry4dumpER6Indent:
 1309|  1.06k|{
 1310|  1.06k|  std::stringstream sstr;
 1311|  1.06k|  sstr << indent << "data reference index: " << data_reference_index << "\n"
 1312|  1.06k|       << indent << "width: " << width << "\n"
 1313|  1.06k|       << indent << "height: " << height << "\n"
 1314|  1.06k|       << indent << "horiz. resolution: " << get_horizontal_resolution() << "\n"
 1315|  1.06k|       << indent << "vert. resolution: " << get_vertical_resolution() << "\n"
 1316|  1.06k|       << indent << "frame count: " << frame_count << "\n"
 1317|  1.06k|       << indent << "compressorname: " << compressorname << "\n"
 1318|  1.06k|       << indent << "depth: " << depth << "\n";
 1319|       |
 1320|  1.06k|  return sstr.str();
 1321|  1.06k|}
_ZNK22Box_URIMetaSampleEntry4dumpER6Indent:
 1341|    763|{
 1342|    763|  std::stringstream sstr;
 1343|    763|  sstr << Box::dump(indent);
 1344|    763|  sstr << indent << "data reference index: " << data_reference_index << "\n";
 1345|    763|  sstr << dump_children(indent);
 1346|    763|  return sstr.str();
 1347|    763|}
_ZN22Box_URIMetaSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1351|    838|{
 1352|    838|  range.skip(6);
 1353|    838|  data_reference_index = range.read16();
 1354|       |
 1355|    838|  Error err = read_children(range, READ_CHILDREN_ALL, limits);
 1356|    838|  if (err) {
  ------------------
  |  Branch (1356:7): [True: 75, False: 763]
  ------------------
 1357|     75|    return err;
 1358|     75|  }
 1359|       |
 1360|    763|  return Error::Ok;
 1361|    838|}
_ZN7Box_uri5parseER14BitstreamRangePK20heif_security_limits:
 1365|    906|{
 1366|    906|  parse_full_box_header(range);
 1367|       |
 1368|    906|  if (get_version() > 0) {
  ------------------
  |  Branch (1368:7): [True: 4, False: 902]
  ------------------
 1369|      4|    return unsupported_version_error("uri ");
 1370|      4|  }
 1371|       |
 1372|    902|  m_uri = range.read_string();
 1373|       |
 1374|    902|  return range.get_error();
 1375|    906|}
_ZNK7Box_uri4dumpER6Indent:
 1379|    770|{
 1380|    770|  std::ostringstream sstr;
 1381|    770|  sstr << FullBox::dump(indent);
 1382|    770|  sstr << indent << "uri: " << m_uri << "\n";
 1383|       |
 1384|    770|  return sstr.str();
 1385|    770|}
_ZN8Box_ccst5parseER14BitstreamRangePK20heif_security_limits:
 1402|    284|{
 1403|    284|  parse_full_box_header(range);
 1404|       |
 1405|    284|  if (get_version() > 0) {
  ------------------
  |  Branch (1405:7): [True: 4, False: 280]
  ------------------
 1406|      4|    return unsupported_version_error("ccst");
 1407|      4|  }
 1408|       |
 1409|    280|  uint32_t bits = range.read32();
 1410|       |
 1411|    280|  auto& constraints = m_codingConstraints;
 1412|       |
 1413|    280|  constraints.all_ref_pics_intra = (bits & 0x80000000) != 0;
 1414|    280|  constraints.intra_pred_used = (bits & 0x40000000) != 0;
 1415|    280|  constraints.max_ref_per_pic = (bits >> 26) & 0x0F;
 1416|       |
 1417|    280|  return range.get_error();
 1418|    284|}
_ZNK8Box_ccst4dumpER6Indent:
 1422|    181|{
 1423|    181|  const auto& constraints = m_codingConstraints;
 1424|       |
 1425|    181|  std::ostringstream sstr;
 1426|    181|  sstr << FullBox::dump(indent);
 1427|    181|  sstr << indent << "all ref pics intra: " << std::boolalpha <<constraints.all_ref_pics_intra << "\n"
 1428|    181|       << indent << "intra pred used: " << constraints.intra_pred_used << "\n"
 1429|    181|       << indent << "max ref per pic: " << ((int) constraints.max_ref_per_pic) << "\n";
 1430|       |
 1431|    181|  return sstr.str();
 1432|    181|}
_ZN8Box_auxi5parseER14BitstreamRangePK20heif_security_limits:
 1462|    803|{
 1463|    803|  parse_full_box_header(range);
 1464|       |
 1465|    803|  if (get_version() > 0) {
  ------------------
  |  Branch (1465:7): [True: 7, False: 796]
  ------------------
 1466|      7|    return unsupported_version_error("auxi");
 1467|      7|  }
 1468|       |
 1469|    796|  m_aux_track_type = range.read_string();
 1470|       |
 1471|    796|  return range.get_error();
 1472|    803|}
_ZNK8Box_auxi4dumpER6Indent:
 1476|    563|{
 1477|    563|  std::ostringstream sstr;
 1478|    563|  sstr << FullBox::dump(indent);
 1479|    563|  sstr << indent << "aux track info type: " << m_aux_track_type << "\n";
 1480|       |
 1481|    563|  return sstr.str();
 1482|    563|}
_ZNK21Box_VisualSampleEntry4dumpER6Indent:
 1515|  1.06k|{
 1516|  1.06k|  std::stringstream sstr;
 1517|  1.06k|  sstr << Box::dump(indent);
 1518|  1.06k|  sstr << m_visualSampleEntry.dump(indent);
 1519|  1.06k|  sstr << dump_children(indent);
 1520|  1.06k|  return sstr.str();
 1521|  1.06k|}
_ZN21Box_VisualSampleEntry5parseER14BitstreamRangePK20heif_security_limits:
 1525|  1.75k|{
 1526|  1.75k|  auto err = m_visualSampleEntry.parse(range, limits);
 1527|  1.75k|  if (err) {
  ------------------
  |  Branch (1527:7): [True: 0, False: 1.75k]
  ------------------
 1528|      0|    return err;
 1529|      0|  }
 1530|       |
 1531|  1.75k|  err = read_children(range, READ_CHILDREN_ALL, limits);
 1532|  1.75k|  if (err) {
  ------------------
  |  Branch (1532:7): [True: 461, False: 1.29k]
  ------------------
 1533|    461|    return err;
 1534|    461|  }
 1535|       |
 1536|  1.29k|  return Error::Ok;
 1537|  1.75k|}
_ZNK8Box_sbgp4dumpER6Indent:
 1541|    828|{
 1542|    828|  std::stringstream sstr;
 1543|    828|  sstr << FullBox::dump(indent);
 1544|    828|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1545|       |
 1546|    828|  if (m_grouping_type_parameter) {
  ------------------
  |  Branch (1546:7): [True: 515, False: 313]
  ------------------
 1547|    515|    sstr << indent << "grouping_type_parameter: " << *m_grouping_type_parameter << "\n";
 1548|    515|  }
 1549|       |
 1550|    828|  uint32_t total_samples = 0;
 1551|  25.7k|  for (size_t i = 0; i < m_entries.size(); i++) {
  ------------------
  |  Branch (1551:22): [True: 24.9k, False: 828]
  ------------------
 1552|  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";
 1553|  24.9k|    total_samples += m_entries[i].sample_count;
 1554|  24.9k|  }
 1555|    828|  sstr << indent << "total samples: " << total_samples << "\n";
 1556|       |
 1557|    828|  return sstr.str();
 1558|    828|}
_ZN8Box_sbgp5parseER14BitstreamRangePK20heif_security_limits:
 1600|    960|{
 1601|    960|  parse_full_box_header(range);
 1602|       |
 1603|    960|  if (get_version() > 1) {
  ------------------
  |  Branch (1603:7): [True: 3, False: 957]
  ------------------
 1604|      3|    return unsupported_version_error("sbgp");
 1605|      3|  }
 1606|       |
 1607|    957|  m_grouping_type = range.read32();
 1608|       |
 1609|    957|  if (get_version() == 1) {
  ------------------
  |  Branch (1609:7): [True: 518, False: 439]
  ------------------
 1610|    518|    m_grouping_type_parameter = range.read32();
 1611|    518|  }
 1612|       |
 1613|    957|  uint32_t count = range.read32();
 1614|    957|  if (auto err = m_memory_handle.alloc(count, sizeof(Entry),
  ------------------
  |  Branch (1614:12): [True: 1, False: 956]
  ------------------
 1615|    957|                                       limits, "the 'sample to group' table")) {
 1616|      1|    return err;
 1617|      1|  }
 1618|       |
 1619|  30.4k|  for (uint32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1619:24): [True: 29.4k, False: 934]
  ------------------
 1620|  29.4k|    Entry e{};
 1621|  29.4k|    e.sample_count = range.read32();
 1622|  29.4k|    e.group_description_index = range.read32();
 1623|  29.4k|    m_entries.push_back(e);
 1624|  29.4k|    if (range.error()) {
  ------------------
  |  Branch (1624:9): [True: 22, False: 29.4k]
  ------------------
 1625|     22|      return range.get_error();
 1626|     22|    }
 1627|  29.4k|  }
 1628|       |
 1629|    934|  return range.get_error();
 1630|    956|}
_ZNK21SampleGroupEntry_refs4dumpEv:
 1634|   102k|{
 1635|   102k|  std::stringstream sstr;
 1636|   102k|  if (m_sample_id==0) {
  ------------------
  |  Branch (1636:7): [True: 99.4k, False: 3.18k]
  ------------------
 1637|  99.4k|    sstr << "0 (non-ref) refs =";
 1638|  99.4k|  }
 1639|  3.18k|  else {
 1640|  3.18k|    sstr << m_sample_id << " refs =";
 1641|  3.18k|  }
 1642|   261k|  for (uint32_t ref : m_direct_reference_sample_id) {
  ------------------
  |  Branch (1642:21): [True: 261k, False: 102k]
  ------------------
 1643|   261k|    sstr << ' ' << ref;
 1644|   261k|  }
 1645|       |
 1646|   102k|  return sstr.str();
 1647|   102k|}
_ZN21SampleGroupEntry_refs5parseER14BitstreamRangePK20heif_security_limits:
 1655|   102k|{
 1656|   102k|  m_sample_id = range.read32();
 1657|   102k|  uint8_t cnt = range.read8();
 1658|   364k|  for (uint8_t i = 0; i < cnt; i++) {
  ------------------
  |  Branch (1658:23): [True: 261k, False: 102k]
  ------------------
 1659|   261k|    m_direct_reference_sample_id.push_back(range.read32());
 1660|   261k|  }
 1661|       |
 1662|   102k|  return Error::Ok;
 1663|   102k|}
_ZNK8Box_sgpd4dumpER6Indent:
 1684|  1.73k|{
 1685|  1.73k|  std::stringstream sstr;
 1686|  1.73k|  sstr << FullBox::dump(indent);
 1687|       |
 1688|  1.73k|  sstr << indent << "grouping_type: " << fourcc_to_string(m_grouping_type) << "\n";
 1689|  1.73k|  if (m_default_length) {
  ------------------
  |  Branch (1689:7): [True: 39, False: 1.69k]
  ------------------
 1690|     39|    sstr << indent << "default_length: " << *m_default_length << "\n";
 1691|     39|  }
 1692|  1.73k|  if (m_default_sample_description_index) {
  ------------------
  |  Branch (1692:7): [True: 70, False: 1.66k]
  ------------------
 1693|     70|    sstr << indent << "default_sample_description_index: " << *m_default_sample_description_index << "\n";
 1694|     70|  }
 1695|       |
 1696|   104k|  for (size_t i=0; i<m_entries.size(); i++) {
  ------------------
  |  Branch (1696:20): [True: 102k, False: 1.73k]
  ------------------
 1697|   102k|    sstr << indent << "[" << (i+1) << "] : ";
 1698|   102k|    if (m_entries[i].sample_group_entry) {
  ------------------
  |  Branch (1698:9): [True: 102k, False: 0]
  ------------------
 1699|   102k|      sstr << m_entries[i].sample_group_entry->dump() << "\n";
 1700|   102k|    }
 1701|      0|    else {
 1702|      0|      sstr << "empty (description_length=" << m_entries[i].description_length << ")\n";
 1703|      0|    }
 1704|   102k|  }
 1705|       |
 1706|  1.73k|  return sstr.str();
 1707|  1.73k|}
_ZN8Box_sgpd5parseER14BitstreamRangePK20heif_security_limits:
 1717|  1.79k|{
 1718|  1.79k|  parse_full_box_header(range);
 1719|       |
 1720|  1.79k|  m_grouping_type = range.read32();
 1721|       |
 1722|       |  // Readers are expected to ignore sgpd boxes with grouping_types they don't
 1723|       |  // understand. Skip parsing of unknown types to avoid allocating Entry objects
 1724|       |  // for entries whose payload we wouldn't read anyway (and which, with
 1725|       |  // version==1 + default_length!=0 or version>=2, would consume zero bytes per
 1726|       |  // iteration and allow unbounded allocation from a tiny box).
 1727|  1.79k|  if (m_grouping_type != fourcc("refs")) {
  ------------------
  |  Branch (1727:7): [True: 1.60k, False: 187]
  ------------------
 1728|  1.60k|    return Error::Ok;
 1729|  1.60k|  }
 1730|       |
 1731|    187|  if (get_version() == 1) {
  ------------------
  |  Branch (1731:7): [True: 39, False: 148]
  ------------------
 1732|     39|    m_default_length = range.read32();
 1733|     39|  }
 1734|       |
 1735|    187|  if (get_version() >= 2) {
  ------------------
  |  Branch (1735:7): [True: 70, False: 117]
  ------------------
 1736|     70|    m_default_sample_description_index = range.read32();
 1737|     70|  }
 1738|       |
 1739|    187|  uint32_t entry_count = range.read32();
 1740|       |
 1741|    187|  if (limits->max_sample_group_description_box_entries &&
  ------------------
  |  Branch (1741:7): [True: 187, False: 0]
  ------------------
 1742|    187|      entry_count > limits->max_sample_group_description_box_entries) {
  ------------------
  |  Branch (1742:7): [True: 5, False: 182]
  ------------------
 1743|      5|    std::stringstream sstr;
 1744|      5|    sstr << "Allocating " << static_cast<uint64_t>(entry_count) << " sample group description items exceeds the security limit of "
 1745|      5|         << limits->max_sample_group_description_box_entries << " items";
 1746|       |
 1747|      5|    return {heif_error_Memory_allocation_error,
 1748|      5|            heif_suberror_Security_limit_exceeded,
 1749|      5|            sstr.str()};
 1750|       |
 1751|      5|  }
 1752|       |
 1753|    182|  if (auto err = m_memory_handle.alloc(entry_count, sizeof(Entry),
  ------------------
  |  Branch (1753:12): [True: 0, False: 182]
  ------------------
 1754|    182|                                       limits, "the 'sgpd' table")) {
 1755|      0|    return err;
 1756|      0|  }
 1757|       |
 1758|   102k|  for (uint32_t i = 0; i < entry_count; i++) {
  ------------------
  |  Branch (1758:24): [True: 102k, False: 182]
  ------------------
 1759|   102k|    Entry entry;
 1760|       |
 1761|   102k|    if (get_version() == 1) {
  ------------------
  |  Branch (1761:9): [True: 9.66k, False: 92.9k]
  ------------------
 1762|  9.66k|      if (*m_default_length == 0) {
  ------------------
  |  Branch (1762:11): [True: 10, False: 9.65k]
  ------------------
 1763|     10|        entry.description_length = range.read32();
 1764|     10|      }
 1765|  9.66k|    }
 1766|       |
 1767|   102k|    switch (m_grouping_type) {
 1768|   102k|      case fourcc("refs"): {
  ------------------
  |  Branch (1768:7): [True: 102k, False: 0]
  ------------------
 1769|   102k|        entry.sample_group_entry = std::make_shared<SampleGroupEntry_refs>();
 1770|   102k|        Error err = entry.sample_group_entry->parse(range, limits);
 1771|   102k|        if (err) {
  ------------------
  |  Branch (1771:13): [True: 0, False: 102k]
  ------------------
 1772|      0|          return err;
 1773|      0|        }
 1774|       |
 1775|   102k|        break;
 1776|   102k|      }
 1777|       |
 1778|   102k|      default:
  ------------------
  |  Branch (1778:7): [True: 0, False: 102k]
  ------------------
 1779|      0|        break;
 1780|   102k|    }
 1781|       |
 1782|   102k|    m_entries.emplace_back(std::move(entry));
 1783|   102k|  }
 1784|       |
 1785|    182|  return Error::Ok;
 1786|    182|}
_ZNK8Box_btrt4dumpER6Indent:
 1790|    821|{
 1791|    821|  std::stringstream sstr;
 1792|    821|  sstr << FullBox::dump(indent);
 1793|       |
 1794|    821|  sstr << indent << "bufferSizeDB: " << m_bufferSizeDB << " bytes\n";
 1795|    821|  sstr << indent << "max bitrate: " << m_maxBitrate << " bits/sec\n";
 1796|    821|  sstr << indent << "avg bitrate: " << m_avgBitrate << " bits/sec\n";
 1797|       |
 1798|    821|  return sstr.str();
 1799|    821|}
_ZN8Box_btrt5parseER14BitstreamRangePK20heif_security_limits:
 1817|    836|{
 1818|    836|  m_bufferSizeDB = range.read32();
 1819|    836|  m_maxBitrate = range.read32();
 1820|    836|  m_avgBitrate = range.read32();
 1821|       |
 1822|    836|  return Error::Ok;
 1823|    836|}
_ZNK8Box_saiz4dumpER6Indent:
 1888|    945|{
 1889|    945|  std::stringstream sstr;
 1890|    945|  sstr << FullBox::dump(indent);
 1891|       |
 1892|    945|  sstr << indent << "aux_info_type: ";
 1893|    945|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (1893:7): [True: 778, False: 167]
  ------------------
 1894|    778|    sstr << "0\n";
 1895|    778|  }
 1896|    167|  else {
 1897|    167|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 1898|    167|  }
 1899|       |
 1900|    945|  sstr << indent << "aux_info_type_parameter: ";
 1901|    945|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (1901:7): [True: 777, False: 168]
  ------------------
 1902|    777|    sstr << "0\n";
 1903|    777|  }
 1904|    168|  else {
 1905|    168|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 1906|    168|  }
 1907|       |
 1908|    945|  sstr << indent << "default sample size: ";
 1909|    945|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1909:7): [True: 513, False: 432]
  ------------------
 1910|    513|    sstr << "0 (variable)\n";
 1911|    513|  }
 1912|    432|  else {
 1913|    432|    sstr << ((int)m_default_sample_info_size) << "\n";
 1914|    432|  }
 1915|       |
 1916|    945|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1916:7): [True: 513, False: 432]
  ------------------
 1917|   328k|    for (size_t i = 0; i < m_sample_sizes.size(); i++) {
  ------------------
  |  Branch (1917:24): [True: 328k, False: 513]
  ------------------
 1918|   328k|      sstr << indent << "[" << i << "] : " << ((int) m_sample_sizes[i]) << "\n";
 1919|   328k|    }
 1920|    513|  }
 1921|       |
 1922|    945|  return sstr.str();
 1923|    945|}
_ZN8Box_saiz5parseER14BitstreamRangePK20heif_security_limits:
 1962|  1.18k|{
 1963|  1.18k|  parse_full_box_header(range);
 1964|       |
 1965|  1.18k|  if (get_flags() & 1) {
  ------------------
  |  Branch (1965:7): [True: 176, False: 1.00k]
  ------------------
 1966|    176|    m_aux_info_type = range.read32();
 1967|    176|    m_aux_info_type_parameter = range.read32();
 1968|    176|  }
 1969|       |
 1970|  1.18k|  m_default_sample_info_size = range.read8();
 1971|  1.18k|  m_num_samples = range.read32();
 1972|       |
 1973|  1.18k|  if (limits && limits->max_sequence_frames > 0 && m_num_samples > limits->max_sequence_frames) {
  ------------------
  |  Branch (1973:7): [True: 1.18k, False: 0]
  |  Branch (1973:17): [True: 1.18k, False: 0]
  |  Branch (1973:52): [True: 39, False: 1.14k]
  ------------------
 1974|     39|    return {
 1975|     39|      heif_error_Memory_allocation_error,
 1976|     39|      heif_suberror_Security_limit_exceeded,
 1977|     39|      "Number of 'saiz' samples exceeds the maximum number of sequence frames."
 1978|     39|    };
 1979|     39|  }
 1980|       |
 1981|  1.14k|  if (m_default_sample_info_size == 0) {
  ------------------
  |  Branch (1981:7): [True: 708, False: 436]
  ------------------
 1982|       |    // check required memory
 1983|       |
 1984|    708|    uint64_t mem_size = m_num_samples;
 1985|    708|    if (auto err = m_memory_handle.alloc(mem_size, limits, "the 'sample aux info sizes' (saiz) table")) {
  ------------------
  |  Branch (1985:14): [True: 0, False: 708]
  ------------------
 1986|      0|      return err;
 1987|      0|    }
 1988|       |
 1989|       |    // read whole table at once
 1990|       |
 1991|    708|    m_sample_sizes.resize(m_num_samples);
 1992|    708|    range.read(m_sample_sizes.data(), m_num_samples);
 1993|    708|  }
 1994|       |
 1995|  1.14k|  return range.get_error();
 1996|  1.14k|}
_ZNK8Box_saio4dumpER6Indent:
 2033|  1.15k|{
 2034|  1.15k|  std::stringstream sstr;
 2035|  1.15k|  sstr << FullBox::dump(indent);
 2036|       |
 2037|  1.15k|  sstr << indent << "aux_info_type: ";
 2038|  1.15k|  if (m_aux_info_type == 0) {
  ------------------
  |  Branch (2038:7): [True: 608, False: 547]
  ------------------
 2039|    608|    sstr << "0\n";
 2040|    608|  }
 2041|    547|  else {
 2042|    547|    sstr << fourcc_to_string(m_aux_info_type) << "\n";
 2043|    547|  }
 2044|       |
 2045|  1.15k|  sstr << indent << "aux_info_type_parameter: ";
 2046|  1.15k|  if (m_aux_info_type_parameter == 0) {
  ------------------
  |  Branch (2046:7): [True: 543, False: 612]
  ------------------
 2047|    543|    sstr << "0\n";
 2048|    543|  }
 2049|    612|  else {
 2050|    612|    sstr << fourcc_to_string(m_aux_info_type_parameter) << "\n";
 2051|    612|  }
 2052|       |
 2053|   142k|  for (size_t i = 0; i < m_chunk_offset.size(); i++) {
  ------------------
  |  Branch (2053:22): [True: 141k, False: 1.15k]
  ------------------
 2054|   141k|    sstr << indent << "[" << i << "] : 0x" << std::hex << m_chunk_offset[i] << "\n";
 2055|   141k|  }
 2056|       |
 2057|  1.15k|  return sstr.str();
 2058|  1.15k|}
_ZN8Box_saio5parseER14BitstreamRangePK20heif_security_limits:
 2114|  1.31k|{
 2115|  1.31k|  parse_full_box_header(range);
 2116|       |
 2117|  1.31k|  if (get_flags() & 1) {
  ------------------
  |  Branch (2117:7): [True: 964, False: 355]
  ------------------
 2118|    964|    m_aux_info_type = range.read32();
 2119|    964|    m_aux_info_type_parameter = range.read32();
 2120|    964|  }
 2121|       |
 2122|  1.31k|  uint32_t num_chunks = range.read32();
 2123|       |
 2124|       |  // We have no explicit maximum on the number of chunks.
 2125|       |  // Use the maximum number of frames as an upper limit.
 2126|  1.31k|  if (limits && limits->max_sequence_frames > 0 && num_chunks > limits->max_sequence_frames) {
  ------------------
  |  Branch (2126:7): [True: 1.31k, False: 0]
  |  Branch (2126:17): [True: 1.31k, False: 0]
  |  Branch (2126:52): [True: 9, False: 1.31k]
  ------------------
 2127|      9|    return {
 2128|      9|      heif_error_Memory_allocation_error,
 2129|      9|      heif_suberror_Security_limit_exceeded,
 2130|      9|      "Number of 'saio' chunks exceeds the maximum number of sequence frames."
 2131|      9|    };
 2132|      9|  }
 2133|       |
 2134|  1.31k|  if (auto err = m_memory_handle.alloc(num_chunks, sizeof(uint64_t),
  ------------------
  |  Branch (2134:12): [True: 0, False: 1.31k]
  ------------------
 2135|  1.31k|                                       limits, "the 'saio' table")) {
 2136|      0|    return err;
 2137|      0|  }
 2138|       |
 2139|  1.31k|  m_chunk_offset.resize(num_chunks);
 2140|       |
 2141|   143k|  for (uint32_t i = 0; i < num_chunks; i++) {
  ------------------
  |  Branch (2141:24): [True: 142k, False: 1.25k]
  ------------------
 2142|   142k|    uint64_t offset;
 2143|   142k|    if (get_version() == 1) {
  ------------------
  |  Branch (2143:9): [True: 429, False: 142k]
  ------------------
 2144|    429|      offset = range.read64();
 2145|    429|    }
 2146|   142k|    else {
 2147|   142k|      offset = range.read32();
 2148|   142k|    }
 2149|       |
 2150|   142k|    m_chunk_offset[i] = offset;
 2151|       |
 2152|   142k|    if (range.error()) {
  ------------------
  |  Branch (2152:9): [True: 56, False: 142k]
  ------------------
 2153|     56|      return range.get_error();
 2154|     56|    }
 2155|   142k|  }
 2156|       |
 2157|  1.25k|  return Error::Ok;
 2158|  1.31k|}
_ZNK8Box_sdtp4dumpER6Indent:
 2162|    461|{
 2163|    461|  std::stringstream sstr;
 2164|    461|  sstr << FullBox::dump(indent);
 2165|       |
 2166|    461|  assert(m_sample_information.size() <= UINT32_MAX);
  ------------------
  |  Branch (2166:3): [True: 461, False: 0]
  ------------------
 2167|       |
 2168|  3.81M|  for (uint32_t i = 0; i < static_cast<uint32_t>(m_sample_information.size()); i++) {
  ------------------
  |  Branch (2168:24): [True: 3.81M, False: 461]
  ------------------
 2169|  3.81M|    const char* spaces = "            ";
 2170|  3.81M|    int nSpaces = 6;
 2171|  3.81M|    int k = i;
 2172|  20.0M|    while (k >= 10 && nSpaces < 12) {
  ------------------
  |  Branch (2172:12): [True: 16.2M, False: 3.81M]
  |  Branch (2172:23): [True: 16.2M, False: 0]
  ------------------
 2173|  16.2M|      k /= 10;
 2174|  16.2M|      nSpaces++;
 2175|  16.2M|    }
 2176|       |
 2177|  3.81M|    spaces = spaces + 12 - nSpaces;
 2178|       |
 2179|  3.81M|    sstr << indent << "[" << i << "] : is_leading=" << (int) get_is_leading(i) << "\n"
 2180|  3.81M|        << indent << spaces << "depends_on=" << (int) get_depends_on(i) << "\n"
 2181|  3.81M|        << indent << spaces << "is_depended_on=" << (int) get_is_depended_on(i) << "\n"
 2182|  3.81M|        << indent << spaces << "has_redundancy=" << (int) get_has_redundancy(i) << "\n";
 2183|  3.81M|  }
 2184|       |
 2185|    461|  return sstr.str();
 2186|    461|}
_ZN8Box_sdtp5parseER14BitstreamRangePK20heif_security_limits:
 2190|    461|{
 2191|    461|  parse_full_box_header(range);
 2192|       |
 2193|       |  // We have no easy way to get the number of samples from 'saiz' or 'stz2' as specified
 2194|       |  // in the standard. Instead, we read until the end of the box.
 2195|    461|  size_t nSamples = range.get_remaining_bytes();
 2196|       |
 2197|    461|  m_sample_information.resize(nSamples);
 2198|    461|  range.read(m_sample_information.data(), nSamples);
 2199|       |
 2200|    461|  return Error::Ok;
 2201|    461|}
_ZN8Box_tref5parseER14BitstreamRangePK20heif_security_limits:
 2205|  1.40k|{
 2206|  3.77k|  while (!range.eof()) {
  ------------------
  |  Branch (2206:10): [True: 2.52k, False: 1.25k]
  ------------------
 2207|  2.52k|    BoxHeader header;
 2208|  2.52k|    Error err = header.parse_header(range);
 2209|  2.52k|    if (err != Error::Ok) {
  ------------------
  |  Branch (2209:9): [True: 8, False: 2.51k]
  ------------------
 2210|      8|      return err;
 2211|      8|    }
 2212|       |
 2213|  2.51k|    if (header.get_box_size() < header.get_header_size()) {
  ------------------
  |  Branch (2213:9): [True: 1, False: 2.51k]
  ------------------
 2214|      1|      return {heif_error_Invalid_input,
 2215|      1|              heif_suberror_Unspecified,
 2216|      1|              "Invalid box size (smaller than header)"};
 2217|      1|    }
 2218|       |
 2219|  2.51k|    uint64_t dataSize = (header.get_box_size() - header.get_header_size());
 2220|       |
 2221|  2.51k|    if (dataSize % 4 != 0 || dataSize < 4) {
  ------------------
  |  Branch (2221:9): [True: 30, False: 2.48k]
  |  Branch (2221:30): [True: 1, False: 2.48k]
  ------------------
 2222|     31|      return {heif_error_Invalid_input,
 2223|     31|              heif_suberror_Unspecified,
 2224|     31|              "Input file has a 'tref' TrackReferenceTypeBox with invalid size."};
 2225|     31|    }
 2226|       |
 2227|  2.48k|    uint64_t nRefs = dataSize / 4;
 2228|       |
 2229|  2.48k|    if (limits->max_items && nRefs > limits->max_items) {
  ------------------
  |  Branch (2229:9): [True: 2.48k, False: 0]
  |  Branch (2229:30): [True: 86, False: 2.40k]
  ------------------
 2230|     86|      std::stringstream sstr;
 2231|     86|      sstr << "Number of references in tref box (" << nRefs << ") exceeds the security limits of " << limits->max_items << " references.";
 2232|       |
 2233|     86|      return {heif_error_Invalid_input,
 2234|     86|              heif_suberror_Security_limit_exceeded,
 2235|     86|              sstr.str()};
 2236|     86|    }
 2237|       |
 2238|  2.40k|    Reference ref;
 2239|  2.40k|    ref.reference_type = header.get_short_type();
 2240|       |
 2241|  17.0k|    for (uint64_t i = 0; i < nRefs; i++) {
  ------------------
  |  Branch (2241:26): [True: 14.6k, False: 2.37k]
  ------------------
 2242|  14.6k|      if (range.eof()) {
  ------------------
  |  Branch (2242:11): [True: 28, False: 14.6k]
  ------------------
 2243|     28|        std::stringstream sstr;
 2244|     28|        sstr << "tref box should contain " << nRefs << " references, but we can only read " << i << " references.";
 2245|       |
 2246|     28|        return {heif_error_Invalid_input,
 2247|     28|                heif_suberror_End_of_data,
 2248|     28|                sstr.str()};
 2249|     28|      }
 2250|       |
 2251|  14.6k|      ref.to_track_id.push_back(static_cast<uint32_t>(range.read32()));
 2252|  14.6k|    }
 2253|       |
 2254|  2.37k|    m_references.push_back(ref);
 2255|  2.37k|  }
 2256|       |
 2257|       |
 2258|       |  // --- check for duplicate references
 2259|       |
 2260|  1.25k|  if (auto error = check_for_double_references()) {
  ------------------
  |  Branch (2260:12): [True: 18, False: 1.23k]
  ------------------
 2261|     18|    return error;
 2262|     18|  }
 2263|       |
 2264|  1.23k|  return range.get_error();
 2265|  1.25k|}
_ZNK8Box_tref27check_for_double_referencesEv:
 2269|  1.25k|{
 2270|  2.25k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2270:24): [True: 2.25k, False: 1.23k]
  ------------------
 2271|  2.25k|    std::set<uint32_t> to_ids;
 2272|  12.7k|    for (const auto to_id : ref.to_track_id) {
  ------------------
  |  Branch (2272:27): [True: 12.7k, False: 2.23k]
  ------------------
 2273|  12.7k|      if (to_ids.find(to_id) == to_ids.end()) {
  ------------------
  |  Branch (2273:11): [True: 12.7k, False: 18]
  ------------------
 2274|  12.7k|        to_ids.insert(to_id);
 2275|  12.7k|      }
 2276|     18|      else {
 2277|     18|        return {heif_error_Invalid_input,
 2278|     18|                heif_suberror_Unspecified,
 2279|     18|                "'tref' has double references"};
 2280|     18|      }
 2281|  12.7k|    }
 2282|  2.25k|  }
 2283|       |
 2284|  1.23k|  return Error::Ok;
 2285|  1.25k|}
_ZNK8Box_tref4dumpER6Indent:
 2315|  1.13k|{
 2316|  1.13k|  std::ostringstream sstr;
 2317|  1.13k|  sstr << Box::dump(indent);
 2318|       |
 2319|  1.81k|  for (const auto& ref : m_references) {
  ------------------
  |  Branch (2319:24): [True: 1.81k, False: 1.13k]
  ------------------
 2320|  1.81k|    sstr << indent << "reference with type '" << fourcc_to_string(ref.reference_type) << "'"
 2321|  1.81k|         << " to track IDs: ";
 2322|  10.9k|    for (uint32_t id : ref.to_track_id) {
  ------------------
  |  Branch (2322:22): [True: 10.9k, False: 1.81k]
  ------------------
 2323|  10.9k|      sstr << id << " ";
 2324|  10.9k|    }
 2325|  1.81k|    sstr << "\n";
 2326|  1.81k|  }
 2327|       |
 2328|  1.13k|  return sstr.str();
 2329|  1.13k|}
_ZN8Box_elst5parseER14BitstreamRangePK20heif_security_limits:
 2386|  1.04k|{
 2387|  1.04k|  Error err = parse_full_box_header(range);
 2388|  1.04k|  if (err != Error::Ok) {
  ------------------
  |  Branch (2388:7): [True: 3, False: 1.03k]
  ------------------
 2389|      3|    return err;
 2390|      3|  }
 2391|       |
 2392|  1.03k|  if (get_version() > 1) {
  ------------------
  |  Branch (2392:7): [True: 6, False: 1.03k]
  ------------------
 2393|      6|    return unsupported_version_error("edts");
 2394|      6|  }
 2395|       |
 2396|  1.03k|  uint32_t nEntries = range.read32();
 2397|  1.03k|  m_entries.clear();
 2398|       |
 2399|   326k|  for (uint64_t i = 0; i < nEntries; i++) {
  ------------------
  |  Branch (2399:24): [True: 325k, False: 949]
  ------------------
 2400|   325k|    if (range.eof()) {
  ------------------
  |  Branch (2400:9): [True: 82, False: 325k]
  ------------------
 2401|     82|      std::stringstream sstr;
 2402|     82|      sstr << "edts box should contain " << nEntries << " entries, but we can only read " << i << " entries.";
 2403|       |
 2404|     82|      return {heif_error_Invalid_input,
 2405|     82|              heif_suberror_End_of_data,
 2406|     82|              sstr.str()};
 2407|     82|    }
 2408|       |
 2409|   325k|    Entry entry{};
 2410|   325k|    if (get_version() == 1) {
  ------------------
  |  Branch (2410:9): [True: 7.02k, False: 318k]
  ------------------
 2411|  7.02k|      entry.segment_duration = range.read64();
 2412|  7.02k|      entry.media_time = range.read64s();
 2413|  7.02k|    }
 2414|   318k|    else {
 2415|   318k|      entry.segment_duration = range.read32();
 2416|   318k|      entry.media_time = range.read32s();
 2417|   318k|    }
 2418|       |
 2419|   325k|    entry.media_rate_integer = range.read16s();
 2420|   325k|    entry.media_rate_fraction = range.read16s();
 2421|       |
 2422|   325k|    m_entries.push_back(entry);
 2423|   325k|  }
 2424|       |
 2425|    949|  return range.get_error();
 2426|  1.03k|}
_ZNK8Box_elst4dumpER6Indent:
 2466|    726|{
 2467|    726|  std::ostringstream sstr;
 2468|    726|  sstr << FullBox::dump(indent);
 2469|       |
 2470|    726|  sstr << indent << "repeat list: " << ((get_flags() & Flags::Repeat_EditList) ? "yes" : "no") << "\n";
  ------------------
  |  Branch (2470:41): [True: 32, False: 694]
  ------------------
 2471|       |
 2472|  53.3k|  for (const auto& entry : m_entries) {
  ------------------
  |  Branch (2472:26): [True: 53.3k, False: 726]
  ------------------
 2473|  53.3k|    sstr << indent << "segment duration: " << entry.segment_duration << "\n";
 2474|  53.3k|    sstr << indent << "media time: " << entry.media_time << "\n";
 2475|  53.3k|    sstr << indent << "media rate integer: " << entry.media_rate_integer << "\n";
 2476|  53.3k|    sstr << indent << "media rate fraction: " << entry.media_rate_fraction << "\n";
 2477|  53.3k|  }
 2478|       |
 2479|    726|  return sstr.str();
 2480|    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|    365|  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|    210|  {
  423|    210|    set_short_type(fourcc("stsc"));
  424|    210|  }
_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|    580|  {
  500|    580|    set_short_type(fourcc("stsz"));
  501|    580|  }
_ZNK8Box_stsz14debug_box_nameEv:
  505|    381|  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|    287|  {
  574|    287|    set_short_type(fourcc("ccst"));
  575|    287|  }
_ZNK8Box_ccst14debug_box_nameEv:
  579|    181|  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.73k|  const char* debug_box_name() const override { return "Sample Group Description"; }
_ZN8Box_btrtC2Ev:
  819|    838|  {
  820|    838|    set_short_type(fourcc("btrt"));
  821|    838|  }
_ZNK8Box_btrt14debug_box_nameEv:
  825|    821|  const char* debug_box_name() const override { return "Bitrate"; }
_ZN8Box_saizC2Ev:
  842|  1.18k|  {
  843|  1.18k|    set_short_type(fourcc("saiz"));
  844|  1.18k|  }
_ZNK8Box_saiz14debug_box_nameEv:
  864|    945|  const char* debug_box_name() const override { return "Sample Auxiliary Information Sizes"; }
_ZN8Box_saioC2Ev:
  885|  1.32k|  {
  886|  1.32k|    set_short_type(fourcc("saio"));
  887|  1.32k|  }
_ZNK8Box_saio14debug_box_nameEv:
  904|  1.15k|  const char* debug_box_name() const override { return "Sample Auxiliary Information Offsets"; }
_ZN8Box_sdtpC2Ev:
  930|    462|  {
  931|    462|    set_short_type(fourcc("sdtp"));
  932|    462|  }
_ZNK8Box_sdtp14debug_box_nameEv:
  936|    461|  const char* debug_box_name() const override { return "Independent and Disposable Samples"; }
_ZNK8Box_sdtp14get_is_leadingEj:
  940|  3.81M|  uint8_t get_is_leading(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 6) & 3; }
_ZNK8Box_sdtp14get_depends_onEj:
  942|  3.81M|  uint8_t get_depends_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 4) & 3; }
_ZNK8Box_sdtp18get_is_depended_onEj:
  944|  3.81M|  uint8_t get_is_depended_on(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx] >> 2) & 3; }
_ZNK8Box_sdtp18get_has_redundancyEj:
  946|  3.81M|  uint8_t get_has_redundancy(uint32_t sampleIdx) const { return (m_sample_information[sampleIdx]) & 3; }
_ZN8Box_trefC2Ev:
  960|  1.40k|  {
  961|  1.40k|    set_short_type(fourcc("tref"));
  962|  1.40k|  }
_ZNK8Box_tref14debug_box_nameEv:
  971|  1.13k|  const char* debug_box_name() const override { return "Track Reference"; }
_ZN8Box_edtsC2Ev:
  998|    344|  Box_edts() : Box_container("edts") {}
_ZNK8Box_edts14debug_box_nameEv:
 1000|    339|  const char* debug_box_name() const override { return "Edit List Container"; }
_ZN8Box_elstC2Ev:
 1008|  1.04k|  {
 1009|  1.04k|    set_short_type(fourcc("elst"));
 1010|  1.04k|  }
_ZNK8Box_elst14debug_box_nameEv:
 1018|    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:
  209|      2|{
  210|      2|  std::lock_guard<std::mutex> lock(de265_init_mutex());
  211|       |
  212|      2|  de265_init_count++;
  213|       |
  214|      2|  if (de265_init_count > 1) {
  ------------------
  |  Branch (214:7): [True: 0, False: 2]
  ------------------
  215|       |    // we are not the first -> already initialized
  216|       |
  217|      0|    return DE265_OK;
  218|      0|  }
  219|       |
  220|       |
  221|       |  // do initializations
  222|       |
  223|      2|  init_scan_orders();
  224|       |
  225|      2|  if (!alloc_and_init_significant_coeff_ctxIdx_lookupTable()) {
  ------------------
  |  Branch (225:7): [True: 0, False: 2]
  ------------------
  226|      0|    de265_init_count--;
  227|      0|    return DE265_ERROR_LIBRARY_INITIALIZATION_FAILED;
  228|      0|  }
  229|       |
  230|      2|  return DE265_OK;
  231|      2|}
de265.cc:_ZL16de265_init_mutexv:
  202|      2|{
  203|      2|  static std::mutex de265_init_mutex;
  204|      2|  return de265_init_mutex;
  205|      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)  {}

