<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-lim-apv-09" number="9924" category="info" submissionType="independent" tocInclude="true" sortRefs="true" symRefs="true" updates="" obsoletes="" xml:lang="en" prepTime="2026-02-10T13:57:11" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-lim-apv-09" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9924" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="APV">Advanced Professional Video</title>
    <seriesInfo name="RFC" value="9924" stream="independent"/>
    <author initials="Y." surname="Lim" fullname="Youngkwon Lim">
      <organization showOnFrontPage="true">Samsung Electronics</organization>
      <address>
        <postal>
          <street>6105 Tennyson Pkwy, Ste 300</street>
          <city>Plano</city>
          <region>TX</region>
          <code>75024</code>
          <country>United States of America</country>
        </postal>
        <email>yklwhite@gmail.com</email>
      </address>
    </author>
    <author initials="M." surname="Park" fullname="Minwoo Park">
      <organization showOnFrontPage="true">Samsung Electronics</organization>
      <address>
        <postal>
          <street>34, Seongchon-gil, Seocho-gu</street>
          <city>Seoul</city>
          <code>3573</code>
          <country>Republic of Korea</country>
        </postal>
        <email>m.w.park@samsung.com</email>
      </address>
    </author>
    <author initials="M." surname="Budagavi" fullname="Madhukar Budagavi">
      <organization showOnFrontPage="true">Samsung Electronics</organization>
      <address>
        <postal>
          <street>6105 Tennyson Pkwy, Ste 300</street>
          <city>Plano</city>
          <region>TX</region>
          <code>75024</code>
          <country>United States of America</country>
        </postal>
        <email>m.budagavi@samsung.com</email>
      </address>
    </author>
    <author initials="R." surname="Joshi" fullname="Rajan Joshi">
      <organization showOnFrontPage="true">Samsung Electronics</organization>
      <address>
        <postal>
          <street>11488 Tree Hollow Ln</street>
          <city>San Diego</city>
          <region>CA</region>
          <code>92128</code>
          <country>United States of America</country>
        </postal>
        <email>rajan_joshi@ieee.org</email>
      </address>
    </author>
    <author initials="K." surname="Choi" fullname="Kwang Pyo Choi">
      <organization showOnFrontPage="true">Samsung Electronics</organization>
      <address>
        <postal>
          <street>34 Seongchon-gil Seocho-gu</street>
          <city>Seoul</city>
          <code>3573</code>
          <country>Republic of Korea</country>
        </postal>
        <email>kwangpyo.choi@gmail.com</email>
      </address>
    </author>
    <date month="02" year="2026"/>
    <keyword>mezzanine codec</keyword>
    <keyword>visually lossless compression</keyword>
    <keyword>APV</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document describes the bitstream format of Advanced Professional Video (APV) and its decoding process. APV is a professional video codec providing visually lossless compression mainly for recording and post production.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for informational purposes.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This is a contribution to the RFC Series, independently of any
            other RFC stream.  The RFC Editor has chosen to publish this
            document at its discretion and makes no statement about its value
            for implementation or deployment.  Documents approved for
            publication by the RFC Editor are not candidates for any level of
            Internet Standard; see Section 2 of RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9924" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2026 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terms">Terms</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terms-and-definitions">Terms and Definitions</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-abbreviated-terms">Abbreviated Terms</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions-used-in-this-do">Conventions Used in This Document</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-general">General</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-operators">Operators</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.2.2">
                  <li pn="section-toc.1-1.3.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.2.2.1.1"><xref derivedContent="3.2.1" format="counter" sectionFormat="of" target="section-3.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-arithmetic-operators">Arithmetic Operators</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.3.2.2.2.2.1"><xref derivedContent="3.2.2" format="counter" sectionFormat="of" target="section-3.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-bitwise-operators">Bitwise Operators</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-range-notation">Range Notation</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.3.2">
                  <li pn="section-toc.1-1.3.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.3.2.1.1"><xref derivedContent="3.3.1" format="counter" sectionFormat="of" target="section-3.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-order-of-operations-precede">Order of Operations Precedence</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.4">
                <t indent="0" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-variables-syntax-elements-a">Variables, Syntax Elements, and Tables</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.5">
                <t indent="0" pn="section-toc.1-1.3.2.5.1"><xref derivedContent="3.5" format="counter" sectionFormat="of" target="section-3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-processes">Processes</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-formats-and-processes-used-">Formats and Processes Used in This Document</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-bitstream-formats">Bitstream Formats</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-source-decoded-and-output-f">Source, Decoded, and Output Frame Formats</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-partitioning-of-a-frame">Partitioning of a Frame</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.3.2">
                  <li pn="section-toc.1-1.4.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.3.2.1.1"><xref derivedContent="4.3.1" format="counter" sectionFormat="of" target="section-4.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-partitioning-of-a-frame-int">Partitioning of a Frame into Tiles</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.3.2.2.1"><xref derivedContent="4.3.2" format="counter" sectionFormat="of" target="section-4.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-spatial-or-component-wise-p">Spatial or Component-Wise Partitioning</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-scanning-processes">Scanning Processes</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.4.2">
                  <li pn="section-toc.1-1.4.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.4.2.1.1"><xref derivedContent="4.4.1" format="counter" sectionFormat="of" target="section-4.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-zig-zag-scan">Zig-Zag Scan</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.4.2.2.1"><xref derivedContent="4.4.2" format="counter" sectionFormat="of" target="section-4.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-inverse-scan">Inverse Scan</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-syntax-and-semantics">Syntax and Semantics</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-method-of-specifying-syntax">Method of Specifying Syntax</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-syntax-functions-and-descri">Syntax Functions and Descriptors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.2.2">
                  <li pn="section-toc.1-1.5.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.2.2.1.1"><xref derivedContent="5.2.1" format="counter" sectionFormat="of" target="section-5.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-byte_aligned">byte_aligned()</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.2.2.2.1"><xref derivedContent="5.2.2" format="counter" sectionFormat="of" target="section-5.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-more_data_in_tile">more_data_in_tile()</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.2.2.3.1"><xref derivedContent="5.2.3" format="counter" sectionFormat="of" target="section-5.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-next_bitsn">next_bits(n)</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.5.2.2.2.4.1"><xref derivedContent="5.2.4" format="counter" sectionFormat="of" target="section-5.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-read_bitsn">read_bits(n)</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.5">
                    <t indent="0" pn="section-toc.1-1.5.2.2.2.5.1"><xref derivedContent="5.2.5" format="counter" sectionFormat="of" target="section-5.2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-syntax-element-processing-f">Syntax Element Processing Functions</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-of-syntax-and-semantic">List of Syntax and Semantics</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.3.2">
                  <li pn="section-toc.1-1.5.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.1.1"><xref derivedContent="5.3.1" format="counter" sectionFormat="of" target="section-5.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-access-unit">Access Unit</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.2.1"><xref derivedContent="5.3.2" format="counter" sectionFormat="of" target="section-5.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-primitive-bitstream-unit">Primitive Bitstream Unit</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.3.1"><xref derivedContent="5.3.3" format="counter" sectionFormat="of" target="section-5.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-primitive-bitstream-unit-he">Primitive Bitstream Unit Header</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.4.1"><xref derivedContent="5.3.4" format="counter" sectionFormat="of" target="section-5.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-frame">Frame</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.5">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.5.1"><xref derivedContent="5.3.5" format="counter" sectionFormat="of" target="section-5.3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-frame-header">Frame Header</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.6">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.6.1"><xref derivedContent="5.3.6" format="counter" sectionFormat="of" target="section-5.3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-frame-information">Frame Information</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.7">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.7.1"><xref derivedContent="5.3.7" format="counter" sectionFormat="of" target="section-5.3.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-quantization-matrix">Quantization Matrix</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.8">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.8.1"><xref derivedContent="5.3.8" format="counter" sectionFormat="of" target="section-5.3.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tile-info">Tile Info</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.9">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.9.1"><xref derivedContent="5.3.9" format="counter" sectionFormat="of" target="section-5.3.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-access-unit-information">Access Unit Information</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.10">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.10.1"><xref derivedContent="5.3.10" format="counter" sectionFormat="of" target="section-5.3.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-metadata">Metadata</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.11">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.11.1"><xref derivedContent="5.3.11" format="counter" sectionFormat="of" target="section-5.3.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-filler">Filler</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.12">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.12.1"><xref derivedContent="5.3.12" format="counter" sectionFormat="of" target="section-5.3.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-tile">Tile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.13">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.13.1"><xref derivedContent="5.3.13" format="counter" sectionFormat="of" target="section-5.3.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-tile-header">Tile Header</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.14">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.14.1"><xref derivedContent="5.3.14" format="counter" sectionFormat="of" target="section-5.3.14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-tile-data">Tile Data</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.15">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.15.1"><xref derivedContent="5.3.15" format="counter" sectionFormat="of" target="section-5.3.15"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-macroblock-layer">Macroblock Layer</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.16">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.16.1"><xref derivedContent="5.3.16" format="counter" sectionFormat="of" target="section-5.3.16"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ac-coefficient-coding">AC Coefficient Coding</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.3.2.17">
                    <t indent="0" pn="section-toc.1-1.5.2.3.2.17.1"><xref derivedContent="5.3.17" format="counter" sectionFormat="of" target="section-5.3.17"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-byte-alignment">Byte Alignment</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-decoding-process">Decoding Process</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mb-decoding-process">MB Decoding Process</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-block-reconstruction-proces">Block Reconstruction Process</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.3">
                <t indent="0" pn="section-toc.1-1.6.2.3.1"><xref derivedContent="6.3" format="counter" sectionFormat="of" target="section-6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-scaling-and-transformation-">Scaling and Transformation Process</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2.3.2">
                  <li pn="section-toc.1-1.6.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.1.1"><xref derivedContent="6.3.1" format="counter" sectionFormat="of" target="section-6.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-scaling-process-for-transfo">Scaling Process for Transform Coefficients</xref></t>
                  </li>
                  <li pn="section-toc.1-1.6.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.6.2.3.2.2.1"><xref derivedContent="6.3.2" format="counter" sectionFormat="of" target="section-6.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-scaled-transfor">Process for Scaled Transform Coefficients</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-parsing-process">Parsing Process</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-syntax-element-">Process for Syntax Element Type h(v)</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2.1.2">
                  <li pn="section-toc.1-1.7.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.7.2.1.2.1.1"><xref derivedContent="7.1.1" format="counter" sectionFormat="of" target="section-7.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-abs_dc_coeff_di">Process for abs_dc_coeff_diff</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.7.2.1.2.2.1"><xref derivedContent="7.1.2" format="counter" sectionFormat="of" target="section-7.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-coeff_zero_run">Process for coeff_zero_run</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.7.2.1.2.3.1"><xref derivedContent="7.1.3" format="counter" sectionFormat="of" target="section-7.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-abs_ac_coeff_mi">Process for abs_ac_coeff_minus1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.1.2.4">
                    <t indent="0" pn="section-toc.1-1.7.2.1.2.4.1"><xref derivedContent="7.1.4" format="counter" sectionFormat="of" target="section-7.1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-variable-length">Process for Variable-Length Codes</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-codeword-generation-process">Codeword Generation Process for h(v) (Informative)</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2.2.2">
                  <li pn="section-toc.1-1.7.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.7.2.2.2.1.1"><xref derivedContent="7.2.1" format="counter" sectionFormat="of" target="section-7.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-abs_dc_coeff_dif">Process for abs_dc_coeff_diff</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.7.2.2.2.2.1"><xref derivedContent="7.2.2" format="counter" sectionFormat="of" target="section-7.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-coeff_zero_run-2">Process for coeff_zero_run</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.7.2.2.2.3.1"><xref derivedContent="7.2.3" format="counter" sectionFormat="of" target="section-7.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-abs_ac_coeff_min">Process for abs_ac_coeff_minus1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.7.2.2.2.4.1"><xref derivedContent="7.2.4" format="counter" sectionFormat="of" target="section-7.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-process-for-variable-length-">Process for Variable-Length Codes</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-metadata-information">Metadata Information</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-metadata-payload">Metadata Payload</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-list-of-metadata-syntax-and">List of Metadata Syntax and Semantics</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2.2.2">
                  <li pn="section-toc.1-1.8.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.1.1"><xref derivedContent="8.2.1" format="counter" sectionFormat="of" target="section-8.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-filler-metadata">Filler Metadata</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.2.1"><xref derivedContent="8.2.2" format="counter" sectionFormat="of" target="section-8.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-recommendation-itu-t-t35-me">Recommendation ITU-T T.35 Metadata</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.3.1"><xref derivedContent="8.2.3" format="counter" sectionFormat="of" target="section-8.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mastering-display-color-vol">Mastering Display Color Volume Metadata</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.4.1"><xref derivedContent="8.2.4" format="counter" sectionFormat="of" target="section-8.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-content-light-level-informa">Content Light-Level Information Metadata</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.5">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.5.1"><xref derivedContent="8.2.5" format="counter" sectionFormat="of" target="section-8.2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-user-defined-metadata">User-Defined Metadata</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.2.2.6">
                    <t indent="0" pn="section-toc.1-1.8.2.2.2.6.1"><xref derivedContent="8.2.6" format="counter" sectionFormat="of" target="section-8.2.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-undefined-metadata">Undefined Metadata</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-profiles-levels-and-bands">Profiles, Levels, and Bands</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-overview-of-profiles-levels">Overview of Profiles, Levels, and Bands</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-on-video-decod">Requirements on Video Decoder Capability</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.3">
                <t indent="0" pn="section-toc.1-1.9.2.3.1"><xref derivedContent="9.3" format="counter" sectionFormat="of" target="section-9.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-profiles">Profiles</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.3.2">
                  <li pn="section-toc.1-1.9.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.1.1"><xref derivedContent="9.3.1" format="counter" sectionFormat="of" target="section-9.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-general-3">General</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.2.1"><xref derivedContent="9.3.2" format="counter" sectionFormat="of" target="section-9.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-422-10-profile">422-10 Profile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.3.1"><xref derivedContent="9.3.3" format="counter" sectionFormat="of" target="section-9.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-422-12-profile">422-12 Profile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.4.1"><xref derivedContent="9.3.4" format="counter" sectionFormat="of" target="section-9.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-444-10-profile">444-10 Profile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.5">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.5.1"><xref derivedContent="9.3.5" format="counter" sectionFormat="of" target="section-9.3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-444-12-profile">444-12 Profile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.6">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.6.1"><xref derivedContent="9.3.6" format="counter" sectionFormat="of" target="section-9.3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-4444-10-profile">4444-10 Profile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.7">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.7.1"><xref derivedContent="9.3.7" format="counter" sectionFormat="of" target="section-9.3.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-4444-12-profile">4444-12 Profile</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.8">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.8.1"><xref derivedContent="9.3.8" format="counter" sectionFormat="of" target="section-9.3.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-400-10-profile">400-10 Profile</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.9.2.4">
                <t indent="0" pn="section-toc.1-1.9.2.4.1"><xref derivedContent="9.4" format="counter" sectionFormat="of" target="section-9.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-levels-and-bands">Levels and Bands</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.4.2">
                  <li pn="section-toc.1-1.9.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.4.2.1.1"><xref derivedContent="9.4.1" format="counter" sectionFormat="of" target="section-9.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-general-4">General</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.4.2.2.1"><xref derivedContent="9.4.2" format="counter" sectionFormat="of" target="section-9.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-limits-of-levels-and-bands">Limits of Levels and Bands</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="11" format="counter" sectionFormat="of" target="section-11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="12" format="counter" sectionFormat="of" target="section-12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2">
              <li pn="section-toc.1-1.12.2.1">
                <t indent="0" pn="section-toc.1-1.12.2.1.1"><xref derivedContent="12.1" format="counter" sectionFormat="of" target="section-12.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.12.2.2">
                <t indent="0" pn="section-toc.1-1.12.2.2.1"><xref derivedContent="12.2" format="counter" sectionFormat="of" target="section-12.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.13">
            <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-raw-bitstream-format">Raw Bitstream Format</xref></t>
          </li>
          <li pn="section-toc.1-1.14">
            <t indent="0" pn="section-toc.1-1.14.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-apv-implementations">APV Implementations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.14.2">
              <li pn="section-toc.1-1.14.2.1">
                <t indent="0" pn="section-toc.1-1.14.2.1.1"><xref derivedContent="B.1" format="counter" sectionFormat="of" target="section-appendix.b.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-openapv-open-source-project">OpenAPV Open Source Project</xref></t>
              </li>
              <li pn="section-toc.1-1.14.2.2">
                <t indent="0" pn="section-toc.1-1.14.2.2.1"><xref derivedContent="B.2" format="counter" sectionFormat="of" target="section-appendix.b.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-android-open-source-project">Android Open Source Project</xref></t>
              </li>
              <li pn="section-toc.1-1.14.2.3">
                <t indent="0" pn="section-toc.1-1.14.2.3.1"><xref derivedContent="B.3" format="counter" sectionFormat="of" target="section-appendix.b.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ffmpeg-open-source-project">FFmpeg Open Source Project</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.15">
            <t indent="0" pn="section-toc.1-1.15.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">This document defines the bitstream format  and decoding process for the Advanced Professional Video (APV) codec. The APV codec is a professional video codec that was developed in response to the need for professional-level, high-quality video recording and post production. The primary purpose of the APV codec is for use in professional video recording and editing workflows for various types of content.  This specification is neither the product of the IETF nor a consensus view of the community.</t>
      <t indent="0" pn="section-1-2">The APV codec supports the following features:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1-3">
        <li pn="section-1-3.1">
          <t indent="0" pn="section-1-3.1.1">Perceptually lossless video quality that is close to the original, uncompressed quality;</t>
        </li>
        <li pn="section-1-3.2">
          <t indent="0" pn="section-1-3.2.1">Low complexity and high throughput intra frame only coding without inter frame coding;</t>
        </li>
        <li pn="section-1-3.3">
          <t indent="0" pn="section-1-3.3.1">Intra frame coding without prediction between pixel values but with prediction between transformed values for low delay encoding;</t>
        </li>
        <li pn="section-1-3.4">
          <t indent="0" pn="section-1-3.4.1">High bit rates of up to a few Gbps for 2K, 4K, and 8K resolution content, enabled by a lightweight entropy coding scheme;</t>
        </li>
        <li pn="section-1-3.5">
          <t indent="0" pn="section-1-3.5.1">Frame tiling for immersive content and for enabling parallel encoding and decoding;</t>
        </li>
        <li pn="section-1-3.6">
          <t indent="0" pn="section-1-3.6.1">Various chroma sampling formats from 4:0:0 to 4:4:4:4, and bit depths from 10 to 16 (Note: Only the profiles supporting 10 bits and 12 bits are currently defined);</t>
        </li>
        <li pn="section-1-3.7">
          <t indent="0" pn="section-1-3.7.1">The ability to decode and re-encode multiple times without severe visual quality degradation; and</t>
        </li>
        <li pn="section-1-3.8">
          <t indent="0" pn="section-1-3.8.1">Various metadata including HDR10/10+ and user-defined formats.</t>
        </li>
      </ul>
    </section>
    <section anchor="terms" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-terms">Terms</name>
      <section anchor="terms-and-definitions" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-terms-and-definitions">Terms and Definitions</name>
        <dl spacing="normal" newline="false" indent="3" pn="section-2.1-1">
          <dt pn="section-2.1-1.1">access unit (AU):</dt>
          <dd pn="section-2.1-1.2">a collection of primitive bitstream
          units (PBU) including various types of frames, metadata, filler, and
          access unit information, associated with a specific time</dd>
          <dt pn="section-2.1-1.3">band:</dt>
          <dd pn="section-2.1-1.4">a defined set of constraints on the value of the
          maximum coded data rate of each level</dd>
          <dt pn="section-2.1-1.5">block:</dt>
          <dd pn="section-2.1-1.6">MxN (M-column by N-row) array of samples, or an MxN array of transform coefficients</dd>
          <dt pn="section-2.1-1.7">byte-aligned:</dt>
          <dd pn="section-2.1-1.8">a position in a bitstream that is an
          integer multiple of 8 bits from the position of the first bit in the
          bitstream</dd>
          <dt pn="section-2.1-1.9">chroma:</dt>
          <dd pn="section-2.1-1.10">a sample array or single sample representing one
          of the two color difference signals related to the primary colors,
          represented by the symbols Cb and Cr in 4:2:2 or 4:4:4 color
          format</dd>
          <dt pn="section-2.1-1.11">coded frame:</dt>
          <dd pn="section-2.1-1.12">a coded representation of a frame
          containing all macroblocks of the frame</dd>
          <dt pn="section-2.1-1.13">coded representation:</dt>
          <dd pn="section-2.1-1.14">a data element as represented in its coded form</dd>
          <dt pn="section-2.1-1.15">component:</dt>
          <dd pn="section-2.1-1.16">an array or a single sample from one of the
          three arrays (luma and two chroma) that compose a frame in 4:2:2, or
          4:4:4 color format, or an array or a single sample from an array
          that compose a frame in 4:0:0 color format, or an array or a single
          sample from one of the four arrays that compose a frame in 4:4:4:4
          color format.</dd>
          <dt pn="section-2.1-1.17">decoded frame:</dt>
          <dd pn="section-2.1-1.18">a frame derived by decoding a coded frame</dd>
          <dt pn="section-2.1-1.19">decoder:</dt>
          <dd pn="section-2.1-1.20">an embodiment of a decoding process</dd>
          <dt pn="section-2.1-1.21">decoding process:</dt>
          <dd pn="section-2.1-1.22">a process specified that reads a
          bitstream and derives decoded frames from it</dd>
          <dt pn="section-2.1-1.23">encoder:</dt>
          <dd pn="section-2.1-1.24">an embodiment of an encoding process</dd>
          <dt pn="section-2.1-1.25">encoding process:</dt>
          <dd pn="section-2.1-1.26">a process that produces a bitstream conforming to this document</dd>
          <dt pn="section-2.1-1.27">flag:</dt>
          <dd pn="section-2.1-1.28">a variable or single-bit syntax element that can take one of the two possible values: 0 and 1</dd>
          <dt pn="section-2.1-1.29">frame:</dt>
          <dd pn="section-2.1-1.30">an array of luma samples and two corresponding arrays of chroma samples in 4:2:2 and 4:4:4 color format, or an array of samples in 4:0:0 color format, or four arrays of samples in 4:4:4:4 color format</dd>
          <dt pn="section-2.1-1.31">level:</dt>
          <dd pn="section-2.1-1.32">a defined set of constraints on the values that are taken by the syntax elements and variables of this document, or the value of a transform coefficient prior to scaling</dd>
          <dt pn="section-2.1-1.33">luma:</dt>
          <dd pn="section-2.1-1.34">a sample array or single sample representing the monochrome signal related to the primary colors, represented by the symbol or subscript Y or L</dd>
          <dt pn="section-2.1-1.35">macroblock (MB):</dt>
          <dd pn="section-2.1-1.36">a square block of luma samples and two corresponding blocks of chroma samples of a frame in 4:2:2 or 4:4:4 color format, or a square block of samples of a frame in 4:0:0 color format, or four square blocks of samples of a frame in 4:4:4:4 color format</dd>
          <dt pn="section-2.1-1.37">metadata:</dt>
          <dd pn="section-2.1-1.38">data describing various characteristics related to a bitstream without directly affecting the decoding process of it.</dd>
          <dt pn="section-2.1-1.39">partitioning:</dt>
          <dd pn="section-2.1-1.40">a division of a set into subsets such that each element of the set is in exactly one of the subsets</dd>
          <dt pn="section-2.1-1.41">prediction:</dt>
          <dd pn="section-2.1-1.42">an embodiment of the prediction process</dd>
          <dt pn="section-2.1-1.43">prediction process:</dt>
          <dd pn="section-2.1-1.44">use of a predictor to provide an estimate of the data element currently being decoded</dd>
          <dt pn="section-2.1-1.45">predictor:</dt>
          <dd pn="section-2.1-1.46">a combination of specified values or previously decoded data elements used in the decoding process of subsequent data elements</dd>
          <dt pn="section-2.1-1.47">primitive bitstream unit (PBU):</dt>
          <dd pn="section-2.1-1.48">a data structure to construct an access unit with frame and metadata</dd>
          <dt pn="section-2.1-1.49">profile:</dt>
          <dd pn="section-2.1-1.50">a specified subset of the syntax of this document</dd>
          <dt pn="section-2.1-1.51">quantization parameter (QP):</dt>
          <dd pn="section-2.1-1.52">a variable used by the decoding process for the scaling value of transform coefficients</dd>
          <dt pn="section-2.1-1.53">raster scan:</dt>
          <dd pn="section-2.1-1.54">a mapping of a rectangular two-dimensional pattern to a one-dimensional pattern such that the first entries in the one-dimensional pattern are from the top row of the two-dimensional pattern scanned from left to right, followed by the second, third, etc., rows of the pattern each scanned from left to right</dd>
          <dt pn="section-2.1-1.55">raw bitstream:</dt>
          <dd pn="section-2.1-1.56">an encapsulation of a sequence of access units where a field indicating the size of an access unit precedes each access unit as defined in <xref target="appendix-rawbitstream" format="default" sectionFormat="of" derivedContent="Appendix A"/></dd>
          <dt pn="section-2.1-1.57">source:</dt>
          <dd pn="section-2.1-1.58">a term used to describe the video material or some of its attributes before the encoding process</dd>
          <dt pn="section-2.1-1.59">syntax element:</dt>
          <dd pn="section-2.1-1.60">an element of data represented in the bitstream</dd>
          <dt pn="section-2.1-1.61">syntax structure:</dt>
          <dd pn="section-2.1-1.62">zero or more syntax elements present together in a bitstream in a specified order</dd>
          <dt pn="section-2.1-1.63">tile:</dt>
          <dd pn="section-2.1-1.64">a rectangular region of MBs within a particular tile column and a particular tile row in a frame</dd>
          <dt pn="section-2.1-1.65">tile column:</dt>
          <dd pn="section-2.1-1.66">a rectangular region of MBs having a height equal to the height of the frame and width specified by syntax elements in the frame header</dd>
          <dt pn="section-2.1-1.67">tile row:</dt>
          <dd pn="section-2.1-1.68">a rectangular region of MBs having a height specified by syntax elements in the frame header and a width equal to the width of the frame</dd>
          <dt pn="section-2.1-1.69">tile scan:</dt>
          <dd pn="section-2.1-1.70">a specific sequential ordering of MBs partitioning a frame in which the MBs are ordered consecutively in MB raster scan in a tile and the tiles in a frame are ordered consecutively in a raster scan of the tiles of the frame</dd>
          <dt pn="section-2.1-1.71">transform coefficient:</dt>
          <dd pn="section-2.1-1.72">a scalar quantity, considered to be in a frequency domain, that is associated with a particular one-dimensional or two-dimensional index</dd>
        </dl>
      </section>
      <section anchor="abbreviated-terms" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-abbreviated-terms">Abbreviated Terms</name>
        <dl spacing="normal" newline="false" indent="3" pn="section-2.2-1">
          <dt pn="section-2.2-1.1">LSB:</dt>
          <dd pn="section-2.2-1.2">least significant bit</dd>
          <dt pn="section-2.2-1.3">MSB:</dt>
          <dd pn="section-2.2-1.4">most significant bit</dd>
          <dt pn="section-2.2-1.5">RGB:</dt>
          <dd pn="section-2.2-1.6">Red, Green and Blue</dd>
        </dl>
      </section>
    </section>
    <section anchor="conventions" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-conventions-used-in-this-do">Conventions Used in This Document</name>
      <section anchor="general" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-general">General</name>
        <t indent="0" pn="section-3.1-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
    "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be
    interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.
        </t>
      </section>
      <section anchor="operators" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-operators">Operators</name>
        <t indent="0" pn="section-3.2-1">The operators and the order of precedence are the same as used in the C programming language <xref target="ISO9899" format="default" sectionFormat="of" derivedContent="ISO9899"/>. However, there are some exceptions for the operators described in the <xref target="arith-operator" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/> and <xref target="bit-operator" format="default" sectionFormat="of" derivedContent="Section 3.2.2"/>, which follows widely used industry practices for video codecs.</t>
        <section anchor="arith-operator" numbered="true" removeInRFC="false" toc="include" pn="section-3.2.1">
          <name slugifiedName="name-arithmetic-operators">Arithmetic Operators</name>
          <dl spacing="normal" newline="true" indent="3" pn="section-3.2.1-1">
            <dt pn="section-3.2.1-1.1">//</dt>
            <dd pn="section-3.2.1-1.2">an integer division with rounding of the result toward
	    zero. For example, 7//4 and -7//-4 are rounded to 1 and -7//4 and
	    7//-4 are rounded to -1</dd>
            <dt pn="section-3.2.1-1.3">/ or div(x,y)</dt>
            <dd pn="section-3.2.1-1.4">a division in mathematical equations where no truncation or rounding is intended</dd>
            <dt pn="section-3.2.1-1.5">min(x,y)</dt>
            <dd pn="section-3.2.1-1.6">the minimum value of the values x and y</dd>
            <dt pn="section-3.2.1-1.7">max(x,y)</dt>
            <dd pn="section-3.2.1-1.8">the maximum value of the values x and y</dd>
            <dt pn="section-3.2.1-1.9">ceil(x)</dt>
            <dd pn="section-3.2.1-1.10">the smallest integer value that is larger than or equal to x</dd>
            <dt pn="section-3.2.1-1.11">clip(x,y,z)</dt>
            <dd pn="section-3.2.1-1.12">clip(x,y,z)=max(x,min(z,y))</dd>
            <dt pn="section-3.2.1-1.13">sum (i=x, y, f(i))</dt>
            <dd pn="section-3.2.1-1.14">a summation of f(i) with i taking all integer values from x up to and including y</dd>
            <dt pn="section-3.2.1-1.15">log2(x)</dt>
            <dd pn="section-3.2.1-1.16">the base-2 logarithm of x</dd>
          </dl>
        </section>
        <section anchor="bit-operator" numbered="true" removeInRFC="false" toc="include" pn="section-3.2.2">
          <name slugifiedName="name-bitwise-operators">Bitwise Operators</name>
          <dl spacing="normal" newline="true" indent="3" pn="section-3.2.2-1">
            <dt pn="section-3.2.2-1.1">&amp; (bitwise "and")</dt>
            <dd pn="section-3.2.2-1.2">When operating on integer arguments, operates on a two's complement representation of the integer value. When operating on arguments with unequal bit depths, the bit depths are equalized by adding zeros in significant positions to the argument with lower bit depth.</dd>
            <dt pn="section-3.2.2-1.3">| (bitwise "or")</dt>
            <dd pn="section-3.2.2-1.4">When operating on integer arguments, operates on a two's complement representation of the integer value. When operating on arguments with unequal bit depths, the bit depths are equalized by adding zeros in significant positions to the argument with lower bit depth.</dd>
            <dt pn="section-3.2.2-1.5">x &gt;&gt; y</dt>
            <dd pn="section-3.2.2-1.6">arithmetic right shift of a two's complement integer representation of x by y binary digits. This function is defined only for non-negative integer values of y. Bits shifted into the most significant bits (MSBs) as a result of the right shift have a value equal to the MSB of x prior to the shift operation.</dd>
            <dt pn="section-3.2.2-1.7">x &lt;&lt; y</dt>
            <dd pn="section-3.2.2-1.8">arithmetic left shift of a two's complement integer representation of x by y binary digits. This function is defined only for non-negative integer values of y. Bits shifted into the least significant bits (LSBs) as a result of the left shift have a value equal to 0.</dd>
          </dl>
        </section>
      </section>
      <section anchor="range-notation" numbered="true" removeInRFC="false" toc="include" pn="section-3.3">
        <name slugifiedName="name-range-notation">Range Notation</name>
        <dl spacing="normal" newline="true" indent="3" pn="section-3.3-1">
          <dt pn="section-3.3-1.1">x = y..z</dt>
          <dd pn="section-3.3-1.2">x takes on integer values starting from y to z, inclusive, with x, y, and z being integer numbers and z being greater than y.</dd>
        </dl>
        <section anchor="order-of-operations-precedence" numbered="true" removeInRFC="false" toc="include" pn="section-3.3.1">
          <name slugifiedName="name-order-of-operations-precede">Order of Operations Precedence</name>
          <t indent="0" pn="section-3.3.1-1">When order of precedence is not indicated explicitly by use of parentheses, operations are evaluated in the following order.</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.3.1-2">
            <li pn="section-3.3.1-2.1">
              <t indent="0" pn="section-3.3.1-2.1.1">Operations of a higher precedence are evaluated before any operation of a lower precedence. <xref target="_table-operation_order" format="default" sectionFormat="of" derivedContent="Table 1"/> specifies the precedence of operations from highest to lowest; operations closer to the top of the table indicate a higher precedence.</t>
            </li>
            <li pn="section-3.3.1-2.2">
              <t indent="0" pn="section-3.3.1-2.2.1">Operations of the same precedence are evaluated sequentially from left to right.</t>
            </li>
          </ul>
          <table anchor="_table-operation_order" align="center" pn="table-1">
            <name slugifiedName="name-operation-precedence-from-h">Operation precedence from highest (top of the table) to lowest (bottom of the table)</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">operations (with operands x, y, and z)</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x++", "x--"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"!x", "-x" (as a unary prefix operator)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">x^y (power)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x * y", "x / y", "x // y", "x % y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x + y", "x - y", "sum (i=x, y, f(i))"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x &lt;&lt; y", "x &gt;&gt; y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x &lt; y", "x &lt;= y", "x &gt; y", "x &gt;= y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x == y", "x != y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x &amp; y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x | y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x &amp;&amp; y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x || y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x ? y : z"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x..y"</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">"x = y", "x += y", "x -= y"</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="variables-syntax-elements-and-tables" numbered="true" removeInRFC="false" toc="include" pn="section-3.4">
        <name slugifiedName="name-variables-syntax-elements-a">Variables, Syntax Elements, and Tables</name>
        <t indent="0" pn="section-3.4-1">Each syntax element is described by its name in all lowercase letters and its type is provided next to the syntax code in each row. Each syntax element and multi-byte integers are written in big endian format. The decoding process behaves according to the value of the syntax element and to the values of previously decoded syntax elements.</t>
        <t indent="0" pn="section-3.4-2">In some cases, the syntax tables may use the values of other variables derived from syntax elements values. Such variables appear in the syntax tables or text, named by a mixture of lower case and uppercase letters and without any underscore characters. Variables with names starting with an uppercase letter are derived for the decoding of the current syntax structure and all dependent syntax structures. Variables with names starting with an uppercase letter may be used in the decoding process for later syntax structures without mentioning the originating syntax structure of the variable. Variables with names starting with a lowercase letter are only used within the section in which they are derived.</t>
        <t indent="0" pn="section-3.4-3">Functions that specify properties of the current position in the bitstream are referred to as syntax functions. These functions are specified in <xref target="syntax-func" format="default" sectionFormat="of" derivedContent="Section 5.2"/> and assume the existence of a bitstream pointer with an indication of the position of the next bit to be read by the decoding process from the bitstream.</t>
        <t indent="0" pn="section-3.4-4">A one-dimensional array is referred to as a list. A two-dimensional array is referred to as a matrix. Arrays can either be syntax elements or variables. Square brackets are used for the indexing of arrays. In reference to a visual depiction of a matrix, the first square bracket is used as a column (horizontal) index and the second square bracket is used as a row (vertical) index.</t>
        <t indent="0" pn="section-3.4-5">A specification of values of the entries in rows and columns of an array may be denoted by {{...}{...}}, where each inner pair of brackets specifies the values of the elements within a row in increasing column order and the rows are ordered in increasing row order. Thus, setting a matrix s equal to {{1 6}{4 9}} specifies that s[0][0] is set equal to 1, s[1][0] is set equal to 6, s[0][1] is set equal to 4, and s[1][1] is set equal to 9.</t>
        <t indent="0" pn="section-3.4-6">Binary notation is indicated by enclosing the string of bit values in single quote marks. For example, '0b01000001' represents an eight-bit string having only its second and its last bits (counted from the most to the least significant bit) equal to 1.</t>
        <t indent="0" pn="section-3.4-7">Hexadecimal notation, indicated by prefixing the hexadecimal number by "0x", may be used instead of binary notation when the number of bits is an integer multiple of 4. For example, 0x41 represents an eight-bit string having only its second and its last bits (counted from the most to the least significant bit) equal to 1.</t>
        <t indent="0" pn="section-3.4-8">A value equal to 0 represents a FALSE condition in a test statement. The value TRUE is represented by any value different from zero.</t>
      </section>
      <section anchor="processes" numbered="true" removeInRFC="false" toc="include" pn="section-3.5">
        <name slugifiedName="name-processes">Processes</name>
        <t indent="0" pn="section-3.5-1">Processes are used to describe the decoding of syntax elements. A process has a separate specification and invoking.
When invoking a process, the assignment of variables is specified as follows:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.5-2">
          <li pn="section-3.5-2.1">
            <t indent="0" pn="section-3.5-2.1.1">If the variables at the invoking and the process specification do not have the same name, the variables are explicitly assigned to lower case input or output variables of the process specification.</t>
          </li>
          <li pn="section-3.5-2.2">
            <t indent="0" pn="section-3.5-2.2.1">Otherwise (the variables at the invoking and the process specification have the same name), the assignment is implied.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.5-3">In the specification of a process, a specific coding block is referred to by the variable name having a value equal to the address of the specific coding block.</t>
      </section>
    </section>
    <section anchor="Formats" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-formats-and-processes-used-">Formats and Processes Used in This Document</name>
      <section anchor="bitstream-formats" numbered="true" removeInRFC="false" toc="include" pn="section-4.1">
        <name slugifiedName="name-bitstream-formats">Bitstream Formats</name>
        <t indent="0" pn="section-4.1-1">This section specifies the bitstream format of the Advanced Professional Video (APV) codec.</t>
        <t indent="0" pn="section-4.1-2">A raw bitstream format consists of a sequence of AUs where the field indicating the size of access units precedes each of them. The raw bitstream format is specified in <xref target="appendix-rawbitstream" format="default" sectionFormat="of" derivedContent="Appendix A"/>.</t>
      </section>
      <section anchor="source-decoded-and-output-frame-formats" numbered="true" removeInRFC="false" toc="include" pn="section-4.2">
        <name slugifiedName="name-source-decoded-and-output-f">Source, Decoded, and Output Frame Formats</name>
        <t indent="0" pn="section-4.2-1">This section specifies the relationship between the source and decoded frames.</t>
        <t indent="0" pn="section-4.2-2">The video source that is represented by the bitstream is a sequence of frames.</t>
        <t indent="0" pn="section-4.2-3">Source and decoded frames are each comprised of one or more sample arrays:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-4">
          <li pn="section-4.2-4.1">
            <t indent="0" pn="section-4.2-4.1.1">Monochrome (for example, Luma only)</t>
          </li>
          <li pn="section-4.2-4.2">
            <t indent="0" pn="section-4.2-4.2.1">Luma and two chroma (for example, YCbCr or YCgCo as specified in <xref target="H273" format="default" sectionFormat="of" derivedContent="H273"/>).</t>
          </li>
          <li pn="section-4.2-4.3">
            <t indent="0" pn="section-4.2-4.3.1">Green, blue, and red (GBR, also known as RGB).</t>
          </li>
          <li pn="section-4.2-4.4">
            <t indent="0" pn="section-4.2-4.4.1">Arrays representing other unspecified tri-stimulus color samplings (for example, YZX, also known as XYZ as specified in <xref target="CIE15" format="default" sectionFormat="of" derivedContent="CIE15"/>).</t>
          </li>
          <li pn="section-4.2-4.5">
            <t indent="0" pn="section-4.2-4.5.1">Arrays representing other unspecified four color samplings</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.2-5">For the convenience of notation and terminology in this document, the variables and terms associated with these arrays can be referred to as luma and chroma regardless of the actual color representation method in use.</t>
        <t indent="0" pn="section-4.2-6">The values of the variables SubWidthC, SubHeightC, and NumComps depend on the chroma format sampling structure as specified in <xref target="_table-chroma_format_idc" format="default" sectionFormat="of" derivedContent="Table 2"/>. The chroma format sampling structure is signaled through chroma_format_idc. Other values of chroma_format_idc, SubWidthC, SubHeightC, and NumComps may be specified in future versions of this document.</t>
        <table anchor="_table-chroma_format_idc" align="center" pn="table-2">
          <name slugifiedName="name-subwidthc-subheightc-and-nu">SubWidthC, SubHeightC, and NumComps values derived from chroma_format_idc</name>
          <thead>
            <tr>
              <th align="center" colspan="1" rowspan="1">chroma_format_idc</th>
              <th align="center" colspan="1" rowspan="1">Chroma format</th>
              <th align="center" colspan="1" rowspan="1">SubWidthC</th>
              <th align="center" colspan="1" rowspan="1">SubHeightC</th>
              <th align="center" colspan="1" rowspan="1">NumComps</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="center" colspan="1" rowspan="1">0</td>
              <td align="center" colspan="1" rowspan="1">4:0:0</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">1</td>
            </tr>
            <tr>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
            </tr>
            <tr>
              <td align="center" colspan="1" rowspan="1">2</td>
              <td align="center" colspan="1" rowspan="1">4:2:2</td>
              <td align="center" colspan="1" rowspan="1">2</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">3</td>
            </tr>
            <tr>
              <td align="center" colspan="1" rowspan="1">3</td>
              <td align="center" colspan="1" rowspan="1">4:4:4</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">3</td>
            </tr>
            <tr>
              <td align="center" colspan="1" rowspan="1">4</td>
              <td align="center" colspan="1" rowspan="1">4:4:4:4</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">1</td>
              <td align="center" colspan="1" rowspan="1">4</td>
            </tr>
            <tr>
              <td align="center" colspan="1" rowspan="1">5..7</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
              <td align="center" colspan="1" rowspan="1">reserved</td>
            </tr>
          </tbody>
        </table>
        <t indent="0" pn="section-4.2-8">In 4:0:0 sampling, there is only one sample array that can be considered as the luma array.</t>
        <t indent="0" pn="section-4.2-9">In 4:2:2 sampling, each of the two chroma arrays has the same height and half the width of the luma array.</t>
        <t indent="0" pn="section-4.2-10">In 4:4:4 sampling and 4:4:4:4 sampling, all the sample arrays have the same height and width as the luma array.</t>
        <t indent="0" pn="section-4.2-11">The number of bits necessary for the representation of each of the samples in the luma and chroma arrays in a video sequence is in the range of 10 to 16, inclusive.</t>
        <t indent="0" pn="section-4.2-12">When the value of chroma_format_idc is equal to 2, the chroma samples are co-sited with the corresponding luma samples; the nominal locations in a frame are as shown in <xref target="_figure-format420" format="default" sectionFormat="of" derivedContent="Figure 1"/>.</t>
        <figure anchor="_figure-format420" align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-nominal-vertical-and-horizo">Nominal vertical and horizontal locations of 4:2:2 luma and chroma samples in a frame</name>
          <artwork align="left" pn="section-4.2-13.1">
              &amp; * &amp; * &amp; * &amp; * &amp; * ...

              &amp; * &amp; * &amp; * &amp; * &amp; * ...

              &amp; * &amp; * &amp; * &amp; * &amp; * ...

              &amp; * &amp; * &amp; * &amp; * &amp; * ...

                       ...

&amp; - location where both luma and chroma sample exist
* - location where only luma sample exist</artwork>
        </figure>
        <t indent="0" pn="section-4.2-14">For each frame, when the value of chroma_format_idc is equal to 3 or 4, all of the array samples are co-sited; the nominal locations in a frame are as shown in <xref target="_figure-format444" format="default" sectionFormat="of" derivedContent="Figure 2"/>.</t>
        <figure anchor="_figure-format444" align="left" suppress-title="false" pn="figure-2">
          <name slugifiedName="name-nominal-vertical-and-horizon">Nominal vertical and horizontal locations of 4:4:4 and 4:4:4:4 luma and chroma samples in a frame</name>
          <artwork align="left" pn="section-4.2-15.1">
              &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; ...

              &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; ...

              &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; ...

              &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; &amp; ...

                       ...

&amp; - location where both luma and chroma sample exist</artwork>
        </figure>
        <t indent="0" pn="section-4.2-16">Samples are processed in units of MBs. The variables MbWidth and MbHeight, which specify the width and height of the luma arrays for each MB, are defined as follows:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-17">
          <li pn="section-4.2-17.1">
            <t indent="0" pn="section-4.2-17.1.1">MbWidth = 16</t>
          </li>
          <li pn="section-4.2-17.2">
            <t indent="0" pn="section-4.2-17.2.1">MbHeight = 16</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.2-18">The variables MbWidthC and MbHeightC, which specify the width and height of the chroma arrays for each MB, are derived as follows:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-19">
          <li pn="section-4.2-19.1">
            <t indent="0" pn="section-4.2-19.1.1">MbWidthC = MbWidth // SubWidthC</t>
          </li>
          <li pn="section-4.2-19.2">
            <t indent="0" pn="section-4.2-19.2.1">MbHeightC = MbHeight // SubHeightC</t>
          </li>
        </ul>
      </section>
      <section anchor="partitioning-of-a-frame" numbered="true" removeInRFC="false" toc="include" pn="section-4.3">
        <name slugifiedName="name-partitioning-of-a-frame">Partitioning of a Frame</name>
        <section anchor="partitioning-of-a-frame-into-tiles" numbered="true" removeInRFC="false" toc="include" pn="section-4.3.1">
          <name slugifiedName="name-partitioning-of-a-frame-int">Partitioning of a Frame into Tiles</name>
          <t indent="0" pn="section-4.3.1-1">This section specifies how a frame is partitioned into tiles.</t>
          <t indent="0" pn="section-4.3.1-2">A frame is divided into tiles. A tile is a group of MBs that cover a rectangular region of a frame and is processed independently of other tiles. Every tile has the same width and height, except possibly tiles at the right or bottom frame boundary when the frame width or height is not a multiple of the tile width or height, respectively. The tiles in a frame are scanned in raster order. Within a tile, the MBs are scanned in raster order. Each MB is comprised of one (MbWidth) x (MbHeight) luma array and zero, two, or three corresponding chroma sample arrays.</t>
          <t indent="0" pn="section-4.3.1-3">For example, a frame is divided into 6 tiles (3 tile columns and 2 tile rows) as shown in <xref target="_figure-tile_examaple" format="default" sectionFormat="of" derivedContent="Figure 3"/>. In this example, the tile size is defined as 4 column MBs and 4 row MBs. In case of the third and sixth tiles (in raster order), the tile size is 2 column MBs and 4 row MBs since the frame width is not a multiple of the tile width.</t>
          <figure anchor="_figure-tile_examaple" align="left" suppress-title="false" pn="figure-3">
            <name slugifiedName="name-frame-with-10-by-8-mbs-that">Frame with 10 by 8 MBs that is partitioned into 6 tiles</name>
            <artwork align="left" pn="section-4.3.1-4.1">
+===================+===================+=========+
#    |    |    |    # MB | MB | MB | MB # MB | MB #
+-------------------+-------------------+---------+
#    |    |    |    # MB | MB | MB | MB # MB | MB #
+-----   tile  -----+-------------------+---------+
#    |    |    |    # MB | MB | MB | MB # MB | MB #
+-------------------+-------------------+---------+
#    |    |    |    # MB | MB | MB | MB # MB | MB #
+===================+===================+=========+
# MB | MB | MB | MB # MB | MB | MB | MB # MB | MB #
+-------------------+-------------------+---------+
# MB | MB | MB | MB # MB | MB | MB | MB # MB | MB #
+-------------------+-------------------+---------+
# MB | MB | MB | MB # MB | MB | MB | MB # MB | MB #
+-------------------+-------------------+---------+
# MB | MB | MB | MB # MB | MB | MB | MB # MB | MB #
+===================+===================+=========+

            #,=  tile boundary
            |,-  MB boundary
</artwork>
          </figure>
        </section>
        <section anchor="spatial-or-component-wise-partitioning" numbered="true" removeInRFC="false" toc="include" pn="section-4.3.2">
          <name slugifiedName="name-spatial-or-component-wise-p">Spatial or Component-Wise Partitioning</name>
          <t indent="0" pn="section-4.3.2-1">The following divisions of processing elements form spatial or component-wise partitioning:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.3.2-2">
            <li pn="section-4.3.2-2.1">
              <t indent="0" pn="section-4.3.2-2.1.1">the division of each frame into components;</t>
            </li>
            <li pn="section-4.3.2-2.2">
              <t indent="0" pn="section-4.3.2-2.2.1">the division of each frame into tile columns;</t>
            </li>
            <li pn="section-4.3.2-2.3">
              <t indent="0" pn="section-4.3.2-2.3.1">the division of each frame into tile rows;</t>
            </li>
            <li pn="section-4.3.2-2.4">
              <t indent="0" pn="section-4.3.2-2.4.1">the division of each tile column into tiles;</t>
            </li>
            <li pn="section-4.3.2-2.5">
              <t indent="0" pn="section-4.3.2-2.5.1">the division of each tile row into tiles;</t>
            </li>
            <li pn="section-4.3.2-2.6">
              <t indent="0" pn="section-4.3.2-2.6.1">the division of each tile into color components;</t>
            </li>
            <li pn="section-4.3.2-2.7">
              <t indent="0" pn="section-4.3.2-2.7.1">the division of each tile into MBs;</t>
            </li>
            <li pn="section-4.3.2-2.8">
              <t indent="0" pn="section-4.3.2-2.8.1">the division of each MB into blocks.</t>
            </li>
          </ul>
        </section>
      </section>
      <section anchor="scanning-processes" numbered="true" removeInRFC="false" toc="include" pn="section-4.4">
        <name slugifiedName="name-scanning-processes">Scanning Processes</name>
        <section anchor="zig-zag" numbered="true" removeInRFC="false" toc="include" pn="section-4.4.1">
          <name slugifiedName="name-zig-zag-scan">Zig-Zag Scan</name>
          <t indent="0" pn="section-4.4.1-1">This process converts a two dimensional array into an one-dimensional array. The process starts at the top-left position in the block and then moves diagonally, changing direction at the edges of the block until it reaches the bottom-right position. <xref target="_figure-zz" format="default" sectionFormat="of" derivedContent="Figure 4"/> shows an example of scanning order for 4x4 size block.</t>
          <figure anchor="_figure-zz" align="left" suppress-title="false" pn="figure-4">
            <name slugifiedName="name-example-of-zig-zag-scanning">Example of zig-zag scanning order for 4x4 block</name>
            <artwork align="left" pn="section-4.4.1-2.1">
+===================+
# 00 | 01 | 05 | 06 #
+-------------------+
# 02 | 04 | 07 | 12 #
+-------------------+
# 03 | 08 | 11 | 13 #
+-------------------+
# 09 | 10 | 14 | 15 #
+===================+
</artwork>
          </figure>
          <t indent="0" pn="section-4.4.1-3">Inputs to this process are:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4.1-4">
            <li pn="section-4.4.1-4.1">
              <t indent="0" pn="section-4.4.1-4.1.1">a variable blkWidth specifying the width of a block, and</t>
            </li>
            <li pn="section-4.4.1-4.2">
              <t indent="0" pn="section-4.4.1-4.2.1">a variable blkHeight specifying the height of a block.</t>
            </li>
          </ul>
          <t indent="0" pn="section-4.4.1-5">Output of this process is the array zigZagScan[sPos].</t>
          <t indent="0" pn="section-4.4.1-6">The array index sPos specifies the scan position ranging from 0 to (blkWidth * blkHeight)-1. Depending on the value of blkWidth and blkHeight, the array zigZagScan is derived as follows:</t>
          <figure anchor="_figure-zzscan" align="left" suppress-title="false" pn="figure-5">
            <name slugifiedName="name-pseudocode-for-zig-zag-scan">Pseudocode for zig-zag scan</name>
            <artwork align="left" pn="section-4.4.1-7.1">
pos = 0
zigZagScan[pos] = 0
pos++
for(line = 1; line &lt; (blkWidth + blkHeight - 1); line++){
  if(line % 2){
    x = min(line, blkWidth - 1)
    y = max(0, line - (blkWidth - 1))
    while(x &gt;=0 &amp;&amp; y &lt; blkHeight){
      zigZagScan[pos] = y * blkWidth + x
      pos++
      x--
      y++
    }
  }
  else{
    y = min(line, blkHeight - 1)
    x = max(0, line - (blkHeight - 1))
    while(y &gt;= 0 &amp;&amp; x &lt; blkWidth){
      zigZagScan[pos] = y * blkWidth + x
      pos++
      x++
      y--
    }
  }
}</artwork>
          </figure>
        </section>
        <section anchor="inverse-scan" numbered="true" removeInRFC="false" toc="include" pn="section-4.4.2">
          <name slugifiedName="name-inverse-scan">Inverse Scan</name>
          <t indent="0" pn="section-4.4.2-1">Inputs to this process are:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4.2-2">
            <li pn="section-4.4.2-2.1">
              <t indent="0" pn="section-4.4.2-2.1.1">a variable blkWidth specifying the width of a block, and</t>
            </li>
            <li pn="section-4.4.2-2.2">
              <t indent="0" pn="section-4.4.2-2.2.1">a variable blkHeight specifying the height of a block.</t>
            </li>
          </ul>
          <t indent="0" pn="section-4.4.2-3">Output of this process is the array inverseScan[rPos].</t>
          <t indent="0" pn="section-4.4.2-4">The array index rPos specifies the raster scan position ranging from 0 to (blkWidth * blkHeight)-1. Depending on the value of blkWidth and blkHeight, the array inverseScan is derived as follows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4.2-5">
            <li pn="section-4.4.2-5.1">
              <t indent="0" pn="section-4.4.2-5.1.1">The variable forwardScan is derived by invoking the zig-zag scan order initialization process as specified in <xref target="zig-zag" format="default" sectionFormat="of" derivedContent="Section 4.4.1"/> with input parameters blkWidth and blkHeight.</t>
            </li>
            <li pn="section-4.4.2-5.2">
              <t indent="0" pn="section-4.4.2-5.2.1">The output variable inverseScan is derived as follows:</t>
            </li>
          </ul>
          <figure anchor="_figure-inv_zzscan" align="left" suppress-title="false" pn="figure-6">
            <name slugifiedName="name-pseudocode-for-inverse-zig-">Pseudocode for inverse zig-zag scan</name>
            <artwork align="left" pn="section-4.4.2-6.1">
for(pos = 0; pos &lt; blkWidth * blkHeight; pos++){
  inverseScan[forwardScan[pos]] = pos
}</artwork>
          </figure>
        </section>
      </section>
    </section>
    <section anchor="syntax" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-syntax-and-semantics">Syntax and Semantics</name>
      <section anchor="method-of-specifying-syntax" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-method-of-specifying-syntax">Method of Specifying Syntax</name>
        <t indent="0" pn="section-5.1-1">The syntax tables specify a superset of the syntax of all allowed bitstreams. Note that a decoder <bcp14>MUST</bcp14> implement some means for identifying entry points into the bitstream and some means to identify and handle non-conforming bitstreams. The methods for identifying and handling errors and other such situations are not specified in this document.</t>
        <t indent="0" pn="section-5.1-2">The APV bitstream is described using syntax code based on the C programming language <xref target="ISO9899" format="default" sectionFormat="of" derivedContent="ISO9899"/> -- including use of if/else, while, and for -- as well as functions defined within this document.</t>
        <t indent="0" pn="section-5.1-3">The syntax table in syntax code is presented in a two-column format such as shown in <xref target="syntax-examplecode" format="default" sectionFormat="of" derivedContent="Figure 7"/>. In this form, the type column provides a type referenced in that same line of syntax code by using the syntax elements processing functions defined in <xref target="syntax-process-func" format="default" sectionFormat="of" derivedContent="Section 5.2.5"/>.</t>
        <figure anchor="syntax-examplecode" align="left" suppress-title="false" pn="figure-7">
          <name slugifiedName="name-a-depiction-of-type-labeled">A depiction of type-labeled syntax code for syntax description in this document</name>
          <artwork align="left" pn="section-5.1-4.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
ExampleSyntaxCode(){                                          |
       operations                                             |
       syntax_element                                         | u(n)
}                                                             |</artwork>
        </figure>
      </section>
      <section anchor="syntax-func" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-syntax-functions-and-descri">Syntax Functions and Descriptors</name>
        <t indent="0" pn="section-5.2-1">The functions presented in this document are used in the syntactical description. These functions are expressed in terms of the value of a bitstream pointer that indicates the position of the next bit to be read by the decoding process from the bitstream.</t>
        <section anchor="bytealigned" numbered="true" removeInRFC="false" toc="include" pn="section-5.2.1">
          <name slugifiedName="name-byte_aligned">byte_aligned()</name>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-1">
            <li pn="section-5.2.1-1.1">
              <t indent="0" pn="section-5.2.1-1.1.1">If the current position in the bitstream is on the last bit of a byte, i.e., the next bit in the bitstream is the first bit in a byte, the return value of byte_aligned() is equal to TRUE.</t>
            </li>
            <li pn="section-5.2.1-1.2">
              <t indent="0" pn="section-5.2.1-1.2.1">Otherwise, the return value of byte_aligned() is equal to FALSE.</t>
            </li>
          </ul>
        </section>
        <section anchor="moredataintile" numbered="true" removeInRFC="false" toc="include" pn="section-5.2.2">
          <name slugifiedName="name-more_data_in_tile">more_data_in_tile()</name>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.2-1">
            <li pn="section-5.2.2-1.1">
              <t indent="0" pn="section-5.2.2-1.1.1">If the current position in the i-th tile() syntax structure is less than TileSize[i] in bytes from the beginning of the tile_header() syntax structure of the i-th tile, the return value of more_data_in_tile() is equal to TRUE.</t>
            </li>
            <li pn="section-5.2.2-1.2">
              <t indent="0" pn="section-5.2.2-1.2.1">Otherwise, the return value of more_data_in_tile() is equal to FALSE.</t>
            </li>
          </ul>
        </section>
        <section anchor="nextbitsn" numbered="true" removeInRFC="false" toc="include" pn="section-5.2.3">
          <name slugifiedName="name-next_bitsn">next_bits(n)</name>
          <t indent="0" pn="section-5.2.3-1">This function provides the next n bits in the bitstream for comparison purposes, without advancing the bitstream pointer.</t>
        </section>
        <section anchor="readbitsn" numbered="true" removeInRFC="false" toc="include" pn="section-5.2.4">
          <name slugifiedName="name-read_bitsn">read_bits(n)</name>
          <t indent="0" pn="section-5.2.4-1">This function indicates that the next n bits from the bitstream are to be read and it advances the bitstream pointer by n bit positions. When n is equal to 0, read_bits(n) is specified to return a value equal to 0 and to not advance the bitstream pointer.</t>
        </section>
        <section anchor="syntax-process-func" numbered="true" removeInRFC="false" toc="include" pn="section-5.2.5">
          <name slugifiedName="name-syntax-element-processing-f">Syntax Element Processing Functions</name>
          <dl spacing="normal" newline="false" indent="3" pn="section-5.2.5-1">
            <dt pn="section-5.2.5-1.1">b(8):</dt>
            <dd pn="section-5.2.5-1.2">byte having any pattern of bit string (8
            bits). The parsing process for this descriptor is specified by the
            return value of the function read_bits(8).</dd>
            <dt pn="section-5.2.5-1.3">f(n):</dt>
            <dd pn="section-5.2.5-1.4">fixed-pattern bit string using n bits written
            (from left to right) with the left bit first, i.e., big endian
            format. The parsing process for this descriptor is specified by
            the return value of the function read_bits(n).</dd>
            <dt pn="section-5.2.5-1.5">u(n):</dt>
            <dd pn="section-5.2.5-1.6">unsigned integer using n bits. The parsing
            process for this descriptor is specified by the return value of
            the function read_bits(n) interpreted as a binary representation
            of an unsigned integer with the most significant bit written
            first.</dd>
            <dt pn="section-5.2.5-1.7">h(v):</dt>
            <dd pn="section-5.2.5-1.8">variable-length entropy coded syntax element
            with the left bit first, i.e., big endian format. The parsing
            process for this descriptor is specified in <xref target="process_h" format="default" sectionFormat="of" derivedContent="Section 7.1"/>.</dd>
          </dl>
        </section>
      </section>
      <section anchor="list-of-syntax-and-semantics" numbered="true" removeInRFC="false" toc="include" pn="section-5.3">
        <name slugifiedName="name-list-of-syntax-and-semantic">List of Syntax and Semantics</name>
        <section anchor="access-unit" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.1">
          <name slugifiedName="name-access-unit">Access Unit</name>
          <figure anchor="syntaxcode-access_unit" align="left" suppress-title="false" pn="figure-8">
            <name slugifiedName="name-access-unit-syntax-code">access unit syntax code</name>
            <artwork align="left" pn="section-5.3.1-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
access_unit(au_size){                                         |
    signature                                                 | f(32)
    currReadSize = 4                                          |
    do(){                                                     |
        pbu_size                                              | u(32)
        currReadSize += 4                                     |
        pbu()                                                 |
        currReadSize += pbu_size                              |
    } while (au_size &gt; currReadSize)                          |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.1-2">
            <dt pn="section-5.3.1-2.1">signature</dt>
            <dd pn="section-5.3.1-2.2">A four-character code that identifies the bitstream as an APV AU. The value <bcp14>MUST</bcp14> be 'aPv1' (0x61507631).</dd>
            <dt pn="section-5.3.1-2.3">pbu_size</dt>
            <dd pn="section-5.3.1-2.4">the size of a primitive bitstream unit in bytes. A value of 0 is prohibited and the value of 0xFFFFFFFF for pbu_size is reserved for future use.</dd>
          </dl>
          <t indent="0" pn="section-5.3.1-3">Note: An AU consists of one primary frame, zero or more non-primary frames such as a frame for additional view, zero or more alpha frames, zero or more depth frames, zero or more preview frames such as a frame with smaller resolution, zero or more metadata, and zero or more fillers.</t>
        </section>
        <section anchor="pbu" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.2">
          <name slugifiedName="name-primitive-bitstream-unit">Primitive Bitstream Unit</name>
          <figure anchor="syntaxcode-pbu" align="left" suppress-title="false" pn="figure-9">
            <name slugifiedName="name-primitive-bitstream-unit-sy">primitive bitstream unit syntax code</name>
            <artwork align="left" pn="section-5.3.2-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
pbu(){                                                        |
    pbu_header()                                              |
    if((1 &lt;= pbu_type &amp;&amp; pbu_type &lt;=2) ||                     |
      (25 &lt;= pbu_type &amp;&amp; pbu_type &lt;= 27))                     |
      frame()                                                 |
    else if(pbu_type == 65)                                   |
      au_info()                                               |
    else if(pbu_type == 66)                                   |
      metadata()                                              |
    else if (pbu_type == 67)                                  |
      filler()                                                |
}                                                             |</artwork>
          </figure>
        </section>
        <section anchor="pbu-header" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.3">
          <name slugifiedName="name-primitive-bitstream-unit-he">Primitive Bitstream Unit Header</name>
          <figure anchor="syntaxcode-pbu_header" align="left" suppress-title="false" pn="figure-10">
            <name slugifiedName="name-primitive-bitstream-unit-hea">primitive bitstream unit header syntax code</name>
            <artwork align="left" pn="section-5.3.3-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
pbu_header(){                                                 |
    pbu_type                                                  | u(8)
    group_id                                                  | u(16)
    reserved_zero_8bits                                       | u(8)
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.3-2">
            <dt pn="section-5.3.3-2.1">pbu_type</dt>
            <dd pn="section-5.3.3-2.2">
              <t indent="0" pn="section-5.3.3-2.2.1">indicates the type of data in a PBU listed in <xref target="_table-pbu_type" format="default" sectionFormat="of" derivedContent="Table 3"/>. Other values of pbu_type are reserved
            for future use.</t>
              <table anchor="_table-pbu_type" align="center" pn="table-3">
                <name slugifiedName="name-list-of-pbu-types">List of PBU types</name>
                <thead>
                  <tr>
                    <th align="center" colspan="1" rowspan="1">pbu_type</th>
                    <th align="center" colspan="1" rowspan="1">meaning</th>
                    <th align="center" colspan="1" rowspan="1">notes</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">0</td>
                    <td align="center" colspan="1" rowspan="1">reserved</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">1</td>
                    <td align="center" colspan="1" rowspan="1">primary frame</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">2</td>
                    <td align="center" colspan="1" rowspan="1">non-primary frame</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">3...24</td>
                    <td align="center" colspan="1" rowspan="1">reserved</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">25</td>
                    <td align="center" colspan="1" rowspan="1">preview frame</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">26</td>
                    <td align="center" colspan="1" rowspan="1">depth frame</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">27</td>
                    <td align="center" colspan="1" rowspan="1">alpha frame</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">28...64</td>
                    <td align="center" colspan="1" rowspan="1">reserved</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">65</td>
                    <td align="center" colspan="1" rowspan="1">access unit information</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">66</td>
                    <td align="center" colspan="1" rowspan="1">metadata</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">67</td>
                    <td align="center" colspan="1" rowspan="1">filler</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                  <tr>
                    <td align="center" colspan="1" rowspan="1">68...255</td>
                    <td align="center" colspan="1" rowspan="1">reserved</td>
                    <td align="center" colspan="1" rowspan="1"> </td>
                  </tr>
                </tbody>
              </table>
              <t indent="0" pn="section-5.3.3-2.2.3">Note: A PBU with pbu_type equal to 65 (access unit information) may happen in an AU. If it exists, it <bcp14>MUST</bcp14> be the first PBU in an AU, and it can be ignored by a decoder.</t>
            </dd>
            <dt pn="section-5.3.3-2.3">group_id</dt>
            <dd pn="section-5.3.3-2.4">indicates the identifier to associate a coded frame with metadata. More than two frames can have the same group_id in a single AU. A primary frame and a non-primary frame <bcp14>MUST</bcp14> have different group_id values, and two non-primary frames <bcp14>MUST</bcp14> have different group_id values. When the value of group_id is equal to 0, the value of pbu_type <bcp14>MUST</bcp14> be greater than 64. The value of 0xFFFF for group_id is reserved for future use.</dd>
            <dt pn="section-5.3.3-2.5">reserved_zero_8bits</dt>
            <dd pn="section-5.3.3-2.6">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are reserved for future use. Decoders conforming to the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of reserved_zero_8bits greater than 0.</dd>
          </dl>
        </section>
        <section anchor="frame" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.4">
          <name slugifiedName="name-frame">Frame</name>
          <figure anchor="syntaxcode-frame" align="left" suppress-title="false" pn="figure-11">
            <name slugifiedName="name-frame-syntax-code">frame() syntax code</name>
            <artwork align="left" pn="section-5.3.4-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
frame(){                                                      |
    frame_header()                                            |
    for(i = 0; i &lt; NumTiles; i++){                            |
        tile_size[i]                                          | u(32)
        tile(i)                                               |
    }                                                         |
    filler()                                                  |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.4-2">
            <dt pn="section-5.3.4-2.1">tile_size[i]</dt>
            <dd pn="section-5.3.4-2.2">
              <t indent="0" pn="section-5.3.4-2.2.1">indicates the size in bytes of i-th tile data (i.e.,
            tile(i)) in raster order in a frame. The value of 0 for
            tile_size[i] is reserved for future use.</t>
              <t indent="0" pn="section-5.3.4-2.2.2">The variable TileSize[i] is set equal to tile_size[i].</t>
            </dd>
          </dl>
        </section>
        <section anchor="frame-header" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.5">
          <name slugifiedName="name-frame-header">Frame Header</name>
          <figure anchor="syntaxcode-frame_header" align="left" suppress-title="false" pn="figure-12">
            <name slugifiedName="name-frame_header-syntax-code">frame_header() syntax code</name>
            <artwork align="left" pn="section-5.3.5-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
frame_header(){                                               |
  frame_info()                                                |
  reserved_zero_8bits                                         | u(8)
  color_description_present_flag                              | u(1)
  if(color_description_present_flag){                         |
    color_primaries                                           | u(8)
    transfer_characteristics                                  | u(8)
    matrix_coefficients                                       | u(8)
    full_range_flag                                           | u(1)
  }                                                           |
  use_q_matrix                                                | u(1)
  if(use_q_matrix){                                           |
    quantization_matrix()                                     |
  }                                                           |
  tile_info()                                                 |
  reserved_zero_8bits                                         | u(8)
  byte_alignment()                                            |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.5-2">
            <dt pn="section-5.3.5-2.1">reserved_zero_8bits</dt>
            <dd pn="section-5.3.5-2.2">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to
            the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are
            reserved for future use. Decoders conforming to the profiles
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of 
            reserved_zero_8bits greater than 0.</dd>
            <dt pn="section-5.3.5-2.3">color_description_present_flag equal to 1</dt>
            <dd pn="section-5.3.5-2.4">specifies that color_primaries, transfer_characteristics, and
            matrix_coefficients are present. color_description_present_flag
            equal to 0 specifies that color_primaries,
            transfer_characteristics, and matrix_coefficients are not
            present.</dd>
            <dt pn="section-5.3.5-2.5">color_primaries</dt>
            <dd pn="section-5.3.5-2.6">
              <bcp14>MUST</bcp14> have the semantics of ColourPrimaries as
            specified in <xref target="H273" format="default" sectionFormat="of" derivedContent="H273"/>. When the color_primaries
            syntax element is not present, the value of color_primaries is
            inferred to be equal to 2.</dd>
            <dt pn="section-5.3.5-2.7">transfer_characteristics</dt>
            <dd pn="section-5.3.5-2.8">
              <bcp14>MUST</bcp14> have the semantics of
            TransferCharacteristics as specified in <xref target="H273" format="default" sectionFormat="of" derivedContent="H273"/>. When the transfer_characteristics syntax element
            is not present, the value of transfer_characteristics is inferred
            to be equal to 2.</dd>
            <dt pn="section-5.3.5-2.9">matrix_coefficients</dt>
            <dd pn="section-5.3.5-2.10">
              <bcp14>MUST</bcp14> have the semantics of MatrixCoefficients
            as specified in <xref target="H273" format="default" sectionFormat="of" derivedContent="H273"/>. When the
            matrix_coefficients syntax element is not present, the value of
            matrix_coefficients is inferred to be equal to 2.</dd>
            <dt pn="section-5.3.5-2.11">full_range_flag</dt>
            <dd pn="section-5.3.5-2.12">
              <bcp14>MUST</bcp14> have the semantics of VideoFullRangeFlag
            as specified in <xref target="H273" format="default" sectionFormat="of" derivedContent="H273"/>. When the full_range_flag
            syntax element is not present, the value of full_range_flag is
            inferred to be equal to 0.</dd>
            <dt pn="section-5.3.5-2.13">use_q_matrix</dt>
            <dd pn="section-5.3.5-2.14">with a value of 1 specifies that the quantization matrices are
            present. A value of 0 specifies that the quantization matrices are
            not present.</dd>
            <dt pn="section-5.3.5-2.15">reserved_zero_8bits</dt>
            <dd pn="section-5.3.5-2.16">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to
            the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are
            reserved for future use. Decoders conforming to the profiles
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of
            reserved_zero_8bits greater than 0.</dd>
          </dl>
        </section>
        <section anchor="frame-info" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.6">
          <name slugifiedName="name-frame-information">Frame Information</name>
          <figure anchor="syntaxcode-frame_info" align="left" suppress-title="false" pn="figure-13">
            <name slugifiedName="name-frame_info-syntax-code">frame_info() syntax code</name>
            <artwork align="left" pn="section-5.3.6-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
frame_info(){                                                 |
  profile_idc                                                 | u(8)
  level_idc                                                   | u(8)
  band_idc                                                    | u(3)
  reserved_zero_5bits                                         | u(5)
  frame_width                                                 | u(24)
  frame_height                                                | u(24)
  chroma_format_idc                                           | u(4)
  bit_depth_minus8                                            | u(4)
  capture_time_distance                                       | u(8)
  reserved_zero_8bits                                         | u(8)
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.6-2">
            <dt pn="section-5.3.6-2.1">profile_idc</dt>
            <dd pn="section-5.3.6-2.2">indicates a profile to which the coded frame conforms as
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Bitstreams <bcp14>SHALL NOT</bcp14> contain values of profiles_idc other than those
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Other
            values of profile_idc are reserved for future use.</dd>
            <dt pn="section-5.3.6-2.3">level_idc</dt>
            <dd pn="section-5.3.6-2.4">indicates a level to which the coded frame conforms as
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Bitstreams <bcp14>SHALL NOT</bcp14> contain values of level_idc other than those specified
            in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Other values of
            level_idc are reserved for future use.</dd>
            <dt pn="section-5.3.6-2.5">band_idc</dt>
            <dd pn="section-5.3.6-2.6">specifies a maximum coded data rate of level_idc as specified
            in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Bitstreams
            <bcp14>SHALL NOT</bcp14> contain values of band_idc other than
            those specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. The value of band_idc
            <bcp14>MUST</bcp14> be in the range of 0 to 3. Other values of
            band_idc are reserved for future use.</dd>
            <dt pn="section-5.3.6-2.7">reserved_zero_5bits</dt>
            <dd pn="section-5.3.6-2.8">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to
            the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are
            reserved for future use. Decoders conforming to the profiles
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of
            reserved_zero_8bits greater than 0.</dd>
            <dt pn="section-5.3.6-2.9">frame_width</dt>
            <dd pn="section-5.3.6-2.10">specifies the width of the frame in units of luma
            samples. frame_width <bcp14>MUST</bcp14> be a multiple of 2 when
            chroma_format_idc has a value of 2. The value 0 is reserved for
            future use.</dd>
            <dt pn="section-5.3.6-2.11">frame_height</dt>
            <dd pn="section-5.3.6-2.12">specifies the height of the frame in units of luma samples. The value 0 is reserved for future use.</dd>
            <dt pn="section-5.3.6-2.13">The variables FrameWidthInMbsY, FrameHeightInMbsY,
            FrameWidthInSamplesY, FrameHeightInSamplesY, FrameWidthInSamplesC,
            FrameHeightInSamplesC, FrameSizeInMbsY, and FrameSizeInSamplesY
            are derived as follows:</dt>
            <dd pn="section-5.3.6-2.14">
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.6-2.14.1">
                <li pn="section-5.3.6-2.14.1.1">FrameWidthInSamplesY = frame_width</li>
                <li pn="section-5.3.6-2.14.1.2">FrameHeightInSamplesY = frame_height</li>
                <li pn="section-5.3.6-2.14.1.3">FrameWidthInMbsY = ceil(FrameWidthInSamplesY / MbWidth)</li>
                <li pn="section-5.3.6-2.14.1.4">FrameHeightInMbsY = ceil(FrameHeightInSamplesY / MbHeight)</li>
                <li pn="section-5.3.6-2.14.1.5">FrameWidthInSamplesC = FrameWidthInSamplesY // SubWidthC</li>
                <li pn="section-5.3.6-2.14.1.6">FrameHeightInSamplesC = FrameHeightInSamplesY // SubHeightC</li>
                <li pn="section-5.3.6-2.14.1.7">FrameSizeInMbsY = FrameWidthInMbsY * FrameHeightInMbsY</li>
                <li pn="section-5.3.6-2.14.1.8">FrameSizeInSamplesY = FrameWidthInSamplesY * FrameHeightInSamplesY</li>
              </ul>
            </dd>
            <dt pn="section-5.3.6-2.15">chroma_format_idc</dt>
            <dd pn="section-5.3.6-2.16">specifies the chroma sampling relative to the luma sampling as
            specified in <xref target="_table-chroma_format_idc" format="default" sectionFormat="of" derivedContent="Table 2"/>. The value
            of chroma_format_idc <bcp14>MUST</bcp14> be 0, 2, 3, or 4. Other
            values are reserved for future use.</dd>
            <dt pn="section-5.3.6-2.17">bit_depth_minus8</dt>
            <dd pn="section-5.3.6-2.18">
              <t indent="0" pn="section-5.3.6-2.18.1">specifies the bit depth of the samples. The variables BitDepth and QpBdOffset are derived as follows:</t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.6-2.18.2">
                <li pn="section-5.3.6-2.18.2.1">BitDepth = bit_depth_minus8 + 8</li>
                <li pn="section-5.3.6-2.18.2.2">QpBdOffset = bit_depth_minus8 * 6</li>
              </ul>
              <t indent="0" pn="section-5.3.6-2.18.3">bit_depth_minus8 <bcp14>MUST</bcp14> be in the range of 2 to 8, inclusive. Other values are reserved for future use.</t>
            </dd>
            <dt pn="section-5.3.6-2.19">capture_time_distance</dt>
            <dd pn="section-5.3.6-2.20">indicates the time difference between the capture time of the
            frames in the previous access unit and frames in the current
            access unit in milliseconds if there has been any access unit
            preceding the access unit this frame belongs to.</dd>
            <dt pn="section-5.3.6-2.21">reserved_zero_8bits</dt>
            <dd pn="section-5.3.6-2.22">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to
            the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are
            reserved for future use. Decoders conforming to the profiles
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of
            reserved_zero_8bits greater than 0.</dd>
          </dl>
        </section>
        <section anchor="quantization-matrix" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.7">
          <name slugifiedName="name-quantization-matrix">Quantization Matrix</name>
          <figure anchor="syntaxcode-quantization_matrix" align="left" suppress-title="false" pn="figure-14">
            <name slugifiedName="name-quantization_matrix-syntax-">quantization_matrix() syntax code</name>
            <artwork align="left" pn="section-5.3.7-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
quantization_matrix(){                                        |
  for(i = 0; i &lt; NumComps; i++){                              |
    for(y = 0; y &lt; 8; y++){                                   |
      for(x = 0; x &lt; 8; x++){                                 |
        q_matrix[i][x][y]                                     | u(8)
      }                                                       |
    }                                                         |
  }                                                           |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.7-2">
            <dt pn="section-5.3.7-2.1">q_matrix[i][x][y]</dt>
            <dd pn="section-5.3.7-2.2">
              <t indent="0" pn="section-5.3.7-2.2.1">specifies a scaling value in the quantization matrices. When
            q_matrix[i][x][y] is not present, it is inferred to be equal to
            16. The array index i specifies an indicator for the color
            component; when chroma_format_idc is equal to 2 or 3, the value of the index i is equal to 0 for Y component, 1
            for Cb, and 2 for Cr. The value of 0 for q_matrix[i][x][y] is
            reserved for future use.</t>
              <t indent="0" pn="section-5.3.7-2.2.2">The quantization matrix, QMatrix[i][x][y], is derived as follows:</t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.7-2.2.3">
                <li pn="section-5.3.7-2.2.3.1">QMatrix[i][x][y] = q_matrix[i][x][y]</li>
              </ul>
            </dd>
          </dl>
        </section>
        <section anchor="tile-info" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.8">
          <name slugifiedName="name-tile-info">Tile Info</name>
          <figure anchor="syntaxcode-tile_info" align="left" suppress-title="false" pn="figure-15">
            <name slugifiedName="name-tile_info-syntax-code">tile_info() syntax code</name>
            <artwork align="left" pn="section-5.3.8-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
tile_info(){                                                  |
  tile_width_in_mbs                                           | u(20)
  tile_height_in_mbs                                          | u(20)
  startMb = 0                                                 |
  for(i = 0; startMb &lt; FrameWidthInMbsY; i++){                |
    ColStarts[i] = startMb * MbWidth                          |
    startMb += tile_width_in_mbs                              |
  }                                                           |
  ColStarts[i] = FrameWidthInMbsY*MbWidth                     |
  TileCols = i                                                |
  startMb = 0                                                 |
  for(i = 0; startMb &lt; FrameHeightInMbsY; i++){               |
    RowStarts[i] = startMb * MbHeight                         |
    startMb += tile_height_in_mbs                             |
  }                                                           |
  RowStarts[i] = FrameHeightInMbsY*MbHeight                   |
  TileRows = i                                                |
  NumTiles = TileCols * TileRows                              |
  tile_size_present_in_fh_flag                                | u(1)
  if(tile_size_present_in_fh_flag){                           |
    for(i = 0; i &lt; NumTiles; i++){                            |
      tile_size_in_fh[i]                                      | u(32)
    }                                                         |
  }                                                           |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.8-2">
            <dt pn="section-5.3.8-2.1">tile_width_in_mbs</dt>
            <dd pn="section-5.3.8-2.2">specifies the width of a tile in units of MBs.</dd>
            <dt pn="section-5.3.8-2.3">tile_height_in_mbs</dt>
            <dd pn="section-5.3.8-2.4">specifies the height of a tile in units of MBs.</dd>
            <dt pn="section-5.3.8-2.5">tile_size_present_in_fh_flag</dt>
            <dd pn="section-5.3.8-2.6">equal to 1 specifies that tile_size_in_fh[i] is present in the
            frame header. tile_size_present_in_fh_flag equal to 0 specifies
            that tile_size_in_fh[i] is not present in the frame header.</dd>
            <dt pn="section-5.3.8-2.7">tile_size_in_fh[i]</dt>
            <dd pn="section-5.3.8-2.8">indicates the size in bytes of i-th tile data in raster order
            in a frame. The value of tile_size_in_fh[i] <bcp14>MUST</bcp14>
            have the same value with tile_size[i]. When it is not present, the
            value of tile_size_in_fh[i] is inferred to be equal to
            tile_size[i]. The value of 0 for tile_size_in_fh[i] is reserved
            for future use.</dd>
          </dl>
        </section>
        <section anchor="au-info" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.9">
          <name slugifiedName="name-access-unit-information">Access Unit Information</name>
          <figure anchor="syntaxcode-au_info" align="left" suppress-title="false" pn="figure-16">
            <name slugifiedName="name-au_info-syntax-code">au_info() syntax code</name>
            <artwork align="left" pn="section-5.3.9-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
au_info(){                                                    |
  num_frames                                                  | u(16)
  for(i = 0; i &lt; num_frames; i++){                            |
    pbu_type                                                  | u(8)
    group_id                                                  | u(16)
    reserved_zero_8bits                                       | u(8)
    frame_info()                                              |
  }                                                           |
  reserved_zero_8bits                                         | u(8)
  byte_alignment()                                            |
  filler()                                                    |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.9-2">
            <dt pn="section-5.3.9-2.1">num_frames</dt>
            <dd pn="section-5.3.9-2.2">indicates the number of frames contained in the current AU.</dd>
            <dt pn="section-5.3.9-2.3">pbu_type</dt>
            <dd pn="section-5.3.9-2.4">
              <t indent="0" pn="section-5.3.9-2.4.1">has the same semantics as pbu_type in the pbu_header() syntax.</t>
              <t indent="0" pn="section-5.3.9-2.4.2">Note: The value of pbu_type <bcp14>MUST</bcp14> be 1, 2, 25,
	    26, or 27 in bitstreams conforming to this document.</t>
            </dd>
            <dt pn="section-5.3.9-2.5">group_id</dt>
            <dd pn="section-5.3.9-2.6">has the same semantics as group_id in the pbu_header() syntax.</dd>
            <dt pn="section-5.3.9-2.7">reserved_zero_8bits</dt>
            <dd pn="section-5.3.9-2.8">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to
            the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are
            reserved for future use. Decoders conforming to the profiles
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of
            reserved_zero_8bits greater than 0.</dd>
          </dl>
        </section>
        <section anchor="metadata" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.10">
          <name slugifiedName="name-metadata">Metadata</name>
          <figure anchor="syntaxcode-metadata" align="left" suppress-title="false" pn="figure-17">
            <name slugifiedName="name-metadata-syntax-code">metadata() syntax code</name>
            <artwork align="left" pn="section-5.3.10-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata(){                                                   |
  metadata_size                                               | u(32)
  currReadSize = 0                                            |
  do{                                                         |
    payloadType = 0                                           |
    while(next_bits(8) == 0xFF){                              |
      ff_byte                                                 | f(8)
      payloadType += ff_byte                                  |
      currReadSize++                                          |
    }                                                         |
    metadata_payload_type                                     | u(8)
    payloadType += metadata_payload_type                      |
    currReadSize++                                            |
                                                              |
    payloadSize = 0                                           |
    while(next_bits(8) == 0xFF){                              |
      ff_byte                                                 | f(8)
      payloadSize += ff_byte                                  |
      currReadSize++                                          |
    }                                                         |
    metadata_payload_size                                     | u(8)
    payloadSize += metadata_payload_size                      |
    currReadSize++                                            |
                                                              |
    metadata_payload(payloadType, payloadSize)                |
    currReadSize += payloadSize                               |
  } while(metadata_size &gt; currReadSize)                       |
  filler()                                                    |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.10-2">
            <dt pn="section-5.3.10-2.1">metadata_size</dt>
            <dd pn="section-5.3.10-2.2">specifies the size of metadata before filler() in the current PBU.</dd>
            <dt pn="section-5.3.10-2.3">ff_byte</dt>
            <dd pn="section-5.3.10-2.4">is a byte equal to 0xFF.</dd>
            <dt pn="section-5.3.10-2.5">metadata_payload_type</dt>
            <dd pn="section-5.3.10-2.6">specifies the last byte of the payload type of a metadata.</dd>
            <dt pn="section-5.3.10-2.7">metadata_payload_size</dt>
            <dd pn="section-5.3.10-2.8">specifies the last byte of the payload size of a metadata.</dd>
          </dl>
          <t indent="0" pn="section-5.3.10-3">Syntax and semantics of metadata_payload() are specified in <xref target="appendix-metadata" format="default" sectionFormat="of" derivedContent="Section 8"/>.</t>
        </section>
        <section anchor="filler" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.11">
          <name slugifiedName="name-filler">Filler</name>
          <figure anchor="syntaxcode-filler" align="left" suppress-title="false" pn="figure-18">
            <name slugifiedName="name-filler-syntax-code">filler() syntax code</name>
            <artwork align="left" pn="section-5.3.11-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
filler(){                                                     |
  while(next_bits(8) == 0xFF)                                 |
    ff_byte                                                   | f(8)
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.11-2">
            <dt pn="section-5.3.11-2.1">ff_byte</dt>
            <dd pn="section-5.3.11-2.2">is a byte equal to 0xFF.</dd>
          </dl>
        </section>
        <section anchor="tile" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.12">
          <name slugifiedName="name-tile">Tile</name>
          <figure anchor="syntaxcode-tile" align="left" suppress-title="false" pn="figure-19">
            <name slugifiedName="name-tile-syntax-code">tile() syntax code</name>
            <artwork align="left" pn="section-5.3.12-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
tile(tileIdx){                                                |
  tile_header(tileIdx)                                        |
  for(i = 0; i &lt; NumComps; i++){                              |
    tile_data(tileIdx, i)                                     |
  }                                                           |
  while(more_data_in_tile()){                                 |
    tile_dummy_byte                                           | b(8)
  }                                                           |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.12-2">
            <dt pn="section-5.3.12-2.1">tile_dummy_byte</dt>
            <dd pn="section-5.3.12-2.2">has any pattern of 8-bit string.</dd>
          </dl>
        </section>
        <section anchor="tile-header" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.13">
          <name slugifiedName="name-tile-header">Tile Header</name>
          <figure anchor="syntaxcode-tileheader" align="left" suppress-title="false" pn="figure-20">
            <name slugifiedName="name-tile_header-syntax-code">tile_header() syntax code</name>
            <artwork align="left" pn="section-5.3.13-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
tile_header(tileIdx){                                         |
  tile_header_size                                            | u(16)
  tile_index                                                  | u(16)
  for(i = 0; i &lt; NumComps; i++){                              |
    tile_data_size[i]                                         | u(32)
  }                                                           |
  for(i = 0; i &lt; NumComps; i++){                              |
    tile_qp[i]                                                | u(8)
  }                                                           |
  reserved_zero_8bits                                         | u(8)
  byte_alignment()                                            |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.13-2">
            <dt pn="section-5.3.13-2.1">tile_header_size</dt>
            <dd pn="section-5.3.13-2.2">indicates the size of the tile header in bytes.</dd>
            <dt pn="section-5.3.13-2.3">tile_index</dt>
            <dd pn="section-5.3.13-2.4">specifies the tile index in raster order in a frame. tile_index <bcp14>MUST</bcp14> have the same value as tileIdx.</dd>
            <dt pn="section-5.3.13-2.5">tile_data_size[i]</dt>
            <dd pn="section-5.3.13-2.6">indicates the size of the i-th color component data in a tile in
            bytes. The array index i specifies an indicator for the color
            component; when chroma_format_idc is equal to 2 or 3, the value of the index i is equal to 0 for Y component, 1 for Cb, and 2 for Cr.
            The value of 0 for tile_data_size[i] is
            reserved for future use.</dd>
            <dt pn="section-5.3.13-2.7">tile_qp[i]</dt>
            <dd pn="section-5.3.13-2.8">
              <t indent="0" pn="section-5.3.13-2.8.1">specifies the quantization parameter value for i-th color
            component. The array index i specifies an indicator for the color
            component; when chroma_format_idc is equal to 2 or 3, the value of the index i is equal to 0 for Y component, 1 for Cb, and 2 for Cr. The Qp[i] to be used for the MBs in the tile are
            derived as follows:</t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.13-2.8.2">
                <li pn="section-5.3.13-2.8.2.1">Qp[i] = tile_qp[i] - QpBdOffset</li>
                <li pn="section-5.3.13-2.8.2.2">Qp[i] <bcp14>MUST</bcp14> be in the range of -QpBdOffset to 51, inclusive.</li>
              </ul>
            </dd>
            <dt pn="section-5.3.13-2.9">reserved_zero_8bits</dt>
            <dd pn="section-5.3.13-2.10">
              <bcp14>MUST</bcp14> be equal to 0 in bitstreams conforming to
            the profiles specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/>. Values of reserved_zero_8bits greater than 0 are
            reserved for future use. Decoders conforming to the profiles
            specified in <xref target="appendix-profile-level-band" format="default" sectionFormat="of" derivedContent="Section 9"/> <bcp14>MUST</bcp14> ignore PBU with values of
            reserved_zero_8bits greater than 0.</dd>
          </dl>
        </section>
        <section anchor="tile-data" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.14">
          <name slugifiedName="name-tile-data">Tile Data</name>
          <figure anchor="syntaxcode-tiledata" align="left" suppress-title="false" pn="figure-21">
            <name slugifiedName="name-tile_data-syntax-code">tile_data() syntax code</name>
            <artwork align="left" pn="section-5.3.14-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
tile_data(tileIdx, cIdx){                                     |
  x0 = ColStarts[tileIdx % TileCols]                          |
  y0 = RowStarts[tileIdx // TileCols]                         |
  numMbColsInTile = (ColStarts[tileIdx % TileCols + 1] -      |
          ColStarts[tileIdx % TileCols]) // MbWidth           |
  numMbRowsInTile = (RowStarts[tileIdx // TileCols + 1] -     |
          RowStarts[tileIdx // TileCols]) // MbHeight         |
  numMbsInTile = numMbColsInTile * numMbRowsInTile            |
  PrevDC = 0                                                  |
  PrevDcDiff = 20                                             |
  Prev1stAcLevel = 0                                          |
  for(i = 0; i &lt; numMbsInTile; i++){                          |
    xMb = x0 + ((i % numMbColsInTile) * MbWidth)              |
    yMb = y0 + ((i // numMbColsInTile) * MbHeight)            |
    macroblock_layer(xMb, yMb, cIdx)                          |
  }                                                           |
  byte_alignment()                                            |
}                                                             |</artwork>
          </figure>
          <t indent="0" pn="section-5.3.14-2">The tile_data() syntax calculates the location of the macroblocks belonging to each tile and collects them.</t>
        </section>
        <section anchor="mb-layer" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.15">
          <name slugifiedName="name-macroblock-layer">Macroblock Layer</name>
          <figure anchor="syntaxcode-macroblock_layer" align="left" suppress-title="false" pn="figure-22">
            <name slugifiedName="name-macroblock_layer-syntax-cod">macroblock_layer() syntax code</name>
            <artwork align="left" pn="section-5.3.15-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
macroblock_layer(xMb, yMb, cIdx){                             |
  subW = (cIdx == 0)? 1 : SubWidthC                           |
  subH = (cIdx == 0)? 1 : SubHeightC                          |
  blkWidth = (cIdx == 0)? MbWidth : MbWidthC                  |
  blkHeight = (cIdx == 0)? MbHeight : MbHeightC               |
  TrSize = 8                                                  |
  for(y = 0; y &lt; blkHeight; y += TrSize){                     |
    for(x = 0; x &lt; blkWidth; x += TrSize){                    |
      abs_dc_coeff_diff                                       | h(v)
      if(abs_dc_coeff_diff)                                   |
        sign_dc_coeff_diff                                    | u(1)
      TransCoeff[cIdx][xMb // subW + x][yMb // subH + y] =    |
            PrevDC + abs_dc_coeff_diff *                      |
            (1 - 2*sign_dc_coeff_diff)                        |
      PrevDC =                                                |
        TransCoeff[cIdx][xMb // subW + x][yMb // subH + y]    |
      PrevDcDiff = abs_dc_coeff_diff                          |
      ac_coeff_coding(xMb // subW + x, yMb // subH + y,       |
            log2(TrSize), log2(TrSize), cIdx)                 |
    }                                                         |
  }                                                           |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.15-2">
            <dt pn="section-5.3.15-2.1">abs_dc_coeff_diff</dt>
            <dd pn="section-5.3.15-2.2">specifies the absolute value of the difference between the current DC transform coefficient level and PrevDC.</dd>
            <dt pn="section-5.3.15-2.3">sign_dc_coeff_diff</dt>
            <dd pn="section-5.3.15-2.4">specifies the sign of the difference between the current DC
            transform coefficient level and PrevDC. sign_dc_coeff_diff equal
            to 0 specifies that the difference has a positive
            value. sign_dc_coeff_diff equal to 1 specifies that the difference
            has a negative value.</dd>
          </dl>
          <t indent="0" pn="section-5.3.15-3">The transform coefficients are represented by the arrays TransCoeff[cIdx][x0][y0]. The array indices x0, y0 specify the location (x0, y0) relative to the top-left sample for each component of the frame. The array index cIdx specifies an indicator for the color component; when chroma_format_idc is equal to 2 or 3, the value of the index i is equal to 0 for Y component, 1 for Cb, and 2 for Cr. The value of TransCoeff[cIdx][x0][y0] <bcp14>MUST</bcp14> be in the range of -32768 to 32767, inclusive.</t>
        </section>
        <section anchor="ac-coding" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.16">
          <name slugifiedName="name-ac-coefficient-coding">AC Coefficient Coding</name>
          <figure anchor="syntaxcode-ac_coeff_coding" align="left" suppress-title="false" pn="figure-23">
            <name slugifiedName="name-ac_coeff_coding-syntax-code">ac_coeff_coding() syntax code</name>
            <artwork align="left" pn="section-5.3.16-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
ac_coeff_coding(x0, y0, log2BlkWidth, log2BlkHeight, cIdx){   |
  scanPos = 1                                                 |
  firstAC = 1                                                 |
  PrevLevel = Prev1stAcLevel                                  |
  PrevRun = 0                                                 |
  do{                                                         |
    coeff_zero_run                                            | h(v)
    for(i = 0; i &lt; coeff_zero_run; i++){                      |
      blkPos = ScanOrder[scanPos]                             |
      xC = blkPos &amp; ((1 &lt;&lt; log2BlkWidth) - 1)                 |
      yC = blkPos &gt;&gt; log2BlkWidth                             |
      TransCoeff[cIdx][x0+xC][y0 + yC] = 0                    |
      scanPos++                                               |
    }                                                         |
    PrevRun = coeff_zero_run                                  |
    if(scanPos &lt; (1 &lt;&lt; (log2BlkWidth + log2BlkHeight))){      |
      abs_ac_coeff_minus1                                     | h(v)
      sign_ac_coeff                                           | u(1)
      level = (abs_ac_coeff_minus1 + 1) *                     |
        (1 - 2 * sign_ac_coeff)                               |
      blkPos = ScanOrder[scanPos]                             |
      xC = blkPos &amp; ((1 &lt;&lt; log2BlkWidth) - 1)                 |
      yC = blkPos &gt;&gt; log2BlkWidth                             |
      TransCoeff[cIdx][x0 + xC][y0 + yC] = level              |
      scanPos++                                               |
      PrevLevel = abs_ac_coeff_minus1 + 1                     |
      if(firstAC == 1){                                       |
        firstAC = 0                                           |
        Prev1stAcLevel = PrevLevel                            |
      }                                                       |
    }                                                         |
  } while(scanPos &lt; (1 &lt;&lt; (log2BlkWidth + log2BlkHeight)))    |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.16-2">
            <dt pn="section-5.3.16-2.1">coeff_zero_run</dt>
            <dd pn="section-5.3.16-2.2">specifies the number of zero-valued transform coefficient
            levels that are located before the position of the next non-zero
            transform coefficient level in a scan of transform coefficient
            levels.</dd>
            <dt pn="section-5.3.16-2.3">abs_ac_coeff_minus1</dt>
            <dd pn="section-5.3.16-2.4">plus 1 specifies the absolute value of an AC transform coefficient level at the given scanning position.</dd>
            <dt pn="section-5.3.16-2.5">sign_ac_coeff</dt>
            <dd pn="section-5.3.16-2.6">specifies the sign of an AC transform coefficient level for
            the given scanning position. sign_ac_coeff equal to 0 specifies
            that the corresponding AC transform coefficient level has a
            positive value. sign_ac_coeff equal to 1 specifies that the
            corresponding AC transform coefficient level has a negative
            value.</dd>
          </dl>
          <t indent="0" pn="section-5.3.16-3">The array ScanOrder[sPos] specifies the mapping of the zig-zag scan position sPos, ranging from 0 to (1 &lt;&lt; log2BlkWidth) * (1 &lt;&lt; log2BlkHeight) - 1, inclusive, to a raster scan position rPos. ScanOrder is derived by invoking <xref target="zig-zag" format="default" sectionFormat="of" derivedContent="Section 4.4.1"/> with input parameters blkWidth equal to (1 &lt;&lt; log2BlkWidth) and blkHeight equal to (1 &lt;&lt; log2BlkHeight).</t>
        </section>
        <section anchor="byte-alignment" numbered="true" removeInRFC="false" toc="include" pn="section-5.3.17">
          <name slugifiedName="name-byte-alignment">Byte Alignment</name>
          <figure anchor="syntaxcode-byte_alignment" align="left" suppress-title="false" pn="figure-24">
            <name slugifiedName="name-byte_alignment-syntax-code">byte_alignment() syntax code</name>
            <artwork align="left" pn="section-5.3.17-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
byte_alignment(){                                             |
  while(!byte_aligned())                                      |
    alignment_bit_equal_to_zero                               | f(1)
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-5.3.17-2">
            <dt pn="section-5.3.17-2.1">alignment_bit_equal_to_zero</dt>
            <dd pn="section-5.3.17-2.2">
              <bcp14>MUST</bcp14> be equal to 0.</dd>
          </dl>
        </section>
      </section>
    </section>
    <section anchor="decoding-process" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-decoding-process">Decoding Process</name>
      <t indent="0" pn="section-6-1">This process is invoked to obtain a decoded frame from a bitstream. Input to this process is a bitstream of a coded frame. Output of this process is a decoded frame.</t>
      <t indent="0" pn="section-6-2">The decoding process operates as follows for the current frame:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6-3">
        <li pn="section-6-3.1">
          <t indent="0" pn="section-6-3.1.1">The syntax structure for a coded frame is parsed to obtain the parsed syntax structures.</t>
        </li>
        <li pn="section-6-3.2">
          <t indent="0" pn="section-6-3.2.1">The processes in Sections <xref target="mb-decoding" format="counter" sectionFormat="of" derivedContent="6.1"/>, <xref target="block-recon" format="counter" sectionFormat="of" derivedContent="6.2"/>, and <xref target="scaling-transform" format="counter" sectionFormat="of" derivedContent="6.3"/> specify the decoding processes using syntax elements in all syntax structures. For bitstreams conforming to this document, the coded tiles of the frame <bcp14>MUST</bcp14> contain tile data for every MB of the frame, such that the division of the frame into tiles and the division of the tiles into MBs form a partitioning of the frame.</t>
        </li>
        <li pn="section-6-3.3">
          <t indent="0" pn="section-6-3.3.1">After all the tiles in the current frame have been decoded, the decoded frame is cropped using the cropping rectangle if FrameWidthInSamplesY is not equal to FrameWidthInMbsY * MbWidth or FrameHeightInSamplesY is not equal to FrameHeightInMbsY * MbHeight.</t>
        </li>
        <li pn="section-6-3.4">
          <t indent="0" pn="section-6-3.4.1">The cropping rectangle, which specifies the samples of a frame that are output, is derived as follows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6-3.4.2">
            <li pn="section-6-3.4.2.1">
              <t indent="0" pn="section-6-3.4.2.1.1">The cropping rectangle contains the luma samples with horizontal frame coordinates from 0 to FrameWidthInSampleY - 1 and vertical frame coordinates from 0 to FrameHeightInSamplesY - 1, inclusive.</t>
            </li>
            <li pn="section-6-3.4.2.2">
              <t indent="0" pn="section-6-3.4.2.2.1">The cropping rectangle contains the two chroma arrays having frame coordinates (x//SubWidthC, y//SubHeightC), where (x,y) are the frame coordinates of the specified luma samples.</t>
            </li>
          </ul>
        </li>
      </ul>
      <section anchor="mb-decoding" numbered="true" removeInRFC="false" toc="include" pn="section-6.1">
        <name slugifiedName="name-mb-decoding-process">MB Decoding Process</name>
        <t indent="0" pn="section-6.1-1">This process is invoked for each MB.</t>
        <t indent="0" pn="section-6.1-2">Input to this process is a luma location (xMb, yMb) specifying the top-left sample of the current luma MB relative to the top-left luma sample of the current frame.
Outputs of this process are the reconstructed samples of all color components. The total number of color components is indicated by the value of NumComps for the current MB. For example, when chroma_format_idc is equal to 2 or 3, the value of NumComps is equal to 3 and three components, Y component, Cb component, and Cr component, are reconstructed </t>
        <t indent="0" pn="section-6.1-3">The following steps apply:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.1-4">
          <li pn="section-6.1-4.1">
            <t indent="0" pn="section-6.1-4.1.1">Let recSamples[0] be a (MbWidth)x(MbHeight) array of the reconstructed samples of the first color component (when chroma_format_idc is equal to 2 or 3, Y).</t>
          </li>
          <li pn="section-6.1-4.2">
            <t indent="0" pn="section-6.1-4.2.1">The block reconstruction process as specified in <xref target="block-recon" format="default" sectionFormat="of" derivedContent="Section 6.2"/> is invoked with the luma location (xMb, yMb), the variable nBlkW set equal to MbWidth, the variable nBlkH set equal to MbHeight, the variable cIdx set equal to 0, and the (MbWidth)x(MbHeight) array recSamples[0] as inputs. The output is a modified version of the (MbWidth)x(MbHeight) array recSamples[0], which is the reconstructed samples of the first color component for the current MB.</t>
          </li>
          <li pn="section-6.1-4.3">
            <t indent="0" pn="section-6.1-4.3.1">When chroma_format_idc is not equal to 0, let recSamples[1] be a (MbWidthC)x(MbHeightC) array of the reconstructed samples of the second color component. For example, when chroma_format_idc is equal to 2 or 3, recSamples[1] is the Cb color component.</t>
          </li>
          <li pn="section-6.1-4.4">
            <t indent="0" pn="section-6.1-4.4.1">When chroma_format_idc is not equal to 0, the block reconstruction process as specified in <xref target="block-recon" format="default" sectionFormat="of" derivedContent="Section 6.2"/> is invoked with the luma location (xMb, yMb), the variable nBlkW set equal to MbWidthC, the variable nBlkH set equal to MbHeightC, the variable cIdx set equal to 1, and the (MbWidthC)x(MbHeightC) array recSamples[1] as inputs.  The output is a modified version of the (MbWidthC)x(MbHeightC) array recSamples[1], which is the reconstructed samples of the second color component for the current MB.</t>
          </li>
          <li pn="section-6.1-4.5">
            <t indent="0" pn="section-6.1-4.5.1">When chroma_format_idc is not equal to 0, let recSamples[2] be a (MbWidthC)x(MbHeightC) array of the reconstructed samples of the third color component. For example, when chroma_format_idc is equal to 2 or 3, recSamples[2] is the Cr color component.</t>
          </li>
          <li pn="section-6.1-4.6">
            <t indent="0" pn="section-6.1-4.6.1">When chroma_format_idc is not equal to 0, the block reconstruction process as specified in <xref target="block-recon" format="default" sectionFormat="of" derivedContent="Section 6.2"/> is invoked with the luma location (xMb, yMb), the variable nBlkW set equal to MbWidthC, the variable nBlkH set equal to MbHeightC, the variable cIdx set equal to 2, and the (MbWidthC)x(MbHeightC) array recSamples[2] as inputs. The output is a modified version of the (MbWidthC)x(MbHeightC) array recSamples[2], which is the reconstructed samples of the third color component for the current MB.</t>
          </li>
          <li pn="section-6.1-4.7">
            <t indent="0" pn="section-6.1-4.7.1">When chroma_format_idc is equal to 4, let recSamples[3] be a (MbWidthC)x(MbHeightC) array of the reconstructed samples of the fourth color component.</t>
          </li>
          <li pn="section-6.1-4.8">
            <t indent="0" pn="section-6.1-4.8.1">When chroma_format_idc is equal to 4, the block reconstruction process as specified in <xref target="block-recon" format="default" sectionFormat="of" derivedContent="Section 6.2"/> is invoked with the luma location (xMb, yMb), the variable nBlkW set equal to MbWidthC, the variable nBlkH set equal to MbHeightC, the variable cIdx set equal to 3, and the (MbWidthC)x(MbHeightC) array recSamples[3] as inputs. The output is a modified version of the (MbWidthC)x(MbHeightC) array recSamples[3], which is the reconstructed samples of the fourth color component for the current MB.</t>
          </li>
        </ul>
      </section>
      <section anchor="block-recon" numbered="true" removeInRFC="false" toc="include" pn="section-6.2">
        <name slugifiedName="name-block-reconstruction-proces">Block Reconstruction Process</name>
        <t indent="0" pn="section-6.2-1">Inputs to this process are:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-2">
          <li pn="section-6.2-2.1">
            <t indent="0" pn="section-6.2-2.1.1">a luma location (xMb, yMb) specifying the top-left sample of the current MB relative to the top-left luma sample of the current frame,</t>
          </li>
          <li pn="section-6.2-2.2">
            <t indent="0" pn="section-6.2-2.2.1">two variables nBlkW and nBlkH specifying the width and the height of the current block,</t>
          </li>
          <li pn="section-6.2-2.3">
            <t indent="0" pn="section-6.2-2.3.1">a variable cIdx specifying the color component of the current block, and</t>
          </li>
          <li pn="section-6.2-2.4">
            <t indent="0" pn="section-6.2-2.4.1">an (nBlkW)x(nBlkH) array of recSamples of a reconstructed block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-6.2-3">Output of this process is a modified version of the (nBlkW)x(nBlkH) array recSamples of reconstructed samples.</t>
        <t indent="0" pn="section-6.2-4">The following applies:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-5">
          <li pn="section-6.2-5.1">
            <t indent="0" pn="section-6.2-5.1.1">The variables numBlkX and numBlkY are derived as follows:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-5.1.2">
              <li pn="section-6.2-5.1.2.1">
                <t indent="0" pn="section-6.2-5.1.2.1.1">numBlkX = nBlkW // TrSize</t>
              </li>
              <li pn="section-6.2-5.1.2.2">
                <t indent="0" pn="section-6.2-5.1.2.2.1">numBlkY = nBlkH // TrSize</t>
              </li>
            </ul>
          </li>
          <li pn="section-6.2-5.2">
            <t indent="0" pn="section-6.2-5.2.1">For yIdx = 0..numBlkY - 1, the following applies:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-5.2.2">
              <li pn="section-6.2-5.2.2.1">
                <t indent="0" pn="section-6.2-5.2.2.1.1">For xIdx = 0..numBlkX - 1, the following applies:</t>
                <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-5.2.2.1.2">
                  <li pn="section-6.2-5.2.2.1.2.1">
                    <t indent="0" pn="section-6.2-5.2.2.1.2.1.1">The variables xBlk and yBlk are derived as follows:</t>
                    <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-5.2.2.1.2.1.2">
                      <li pn="section-6.2-5.2.2.1.2.1.2.1">
                        <t indent="0" pn="section-6.2-5.2.2.1.2.1.2.1.1">xBlk = xMb // (cIdx==0? 1: SubWidthC) + xIdx*TrSize</t>
                      </li>
                      <li pn="section-6.2-5.2.2.1.2.1.2.2">
                        <t indent="0" pn="section-6.2-5.2.2.1.2.1.2.2.1">yBlk = yMb // (cIdx==0? 1: SubHeightC) + yIdx*TrSize</t>
                      </li>
                    </ul>
                  </li>
                  <li pn="section-6.2-5.2.2.1.2.2">
                    <t indent="0" pn="section-6.2-5.2.2.1.2.2.1">The scaling and transformation process as specified in <xref target="scaling-transform" format="default" sectionFormat="of" derivedContent="Section 6.3"/> is invoked with the location (xBlk, yBlk), the variable cIdx set equal to cIdx, the transform width nBlkW set equal to TrSize, and the transform height nBlkH set equal to TrSize as inputs. The output is a (TrSize)x(TrSize) array r of a reconstructed block.</t>
                  </li>
                  <li pn="section-6.2-5.2.2.1.2.3">
                    <t indent="0" pn="section-6.2-5.2.2.1.2.3.1">The (TrSize)x(TrSize) array recSamples is modified as follows:</t>
                    <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.2-5.2.2.1.2.3.2">
                      <li pn="section-6.2-5.2.2.1.2.3.2.1">
                        <t indent="0" pn="section-6.2-5.2.2.1.2.3.2.1.1">recSamples[(xIdx * TrSize) + i, (yIdx * TrSize) + j] = r[i,j], with i=0..TrSize-1, j=0..TrSize-1</t>
                      </li>
                    </ul>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </section>
      <section anchor="scaling-transform" numbered="true" removeInRFC="false" toc="include" pn="section-6.3">
        <name slugifiedName="name-scaling-and-transformation-">Scaling and Transformation Process</name>
        <t indent="0" pn="section-6.3-1">Inputs to this process are:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3-2">
          <li pn="section-6.3-2.1">
            <t indent="0" pn="section-6.3-2.1.1">a location (xBlkY, yBlkY) of the current color component specifying the top-left sample of the current block relative to the top-left sample of the current frame,</t>
          </li>
          <li pn="section-6.3-2.2">
            <t indent="0" pn="section-6.3-2.2.1">a variable cIdx specifying the color component of the current block,</t>
          </li>
          <li pn="section-6.3-2.3">
            <t indent="0" pn="section-6.3-2.3.1">a variable nBlkW specifying the width of the current block, and</t>
          </li>
          <li pn="section-6.3-2.4">
            <t indent="0" pn="section-6.3-2.4.1">a variable nBlkH specifying the height of the current block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-6.3-3">Output of this process is the (nBlkW)x(nBlkH) array of reconstructed samples r with elements r[x][y].</t>
        <t indent="0" pn="section-6.3-4">The quantization parameter qP is derived as follows:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3-5">
          <li pn="section-6.3-5.1">
            <t indent="0" pn="section-6.3-5.1.1">qP = Qp[cIdx] + QpBdOffset</t>
          </li>
        </ul>
        <t indent="0" pn="section-6.3-6">The (nBlKW)x(nBlkH) array of reconstructed samples r is derived as follows:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3-7">
          <li pn="section-6.3-7.1">
            <t indent="0" pn="section-6.3-7.1.1">The scaling process for transform coefficients as specified in <xref target="scaling-process" format="default" sectionFormat="of" derivedContent="Section 6.3.1"/> is invoked with the block location (xBlkY, yBlkY), the block width nBlkW and the block height nBlkH, the color component variable cIdx, and the quantization parameter qP as inputs. The output is an (nBlkW)x(nBlkH) array of scaled transform coefficients d.</t>
          </li>
          <li pn="section-6.3-7.2">
            <t indent="0" pn="section-6.3-7.2.1">The transformation process for scaled transform coefficients as specified in <xref target="process-coeff" format="default" sectionFormat="of" derivedContent="Section 6.3.2"/> is invoked with the block location (xBlkY, yBlkY), the block width nBlkW and the block height nBlkH, the color component variable cIdx, and the (nBlkW)x(nBlkH) array of scaled transform coefficients d as inputs. The output is an (nBlkW)x(nBlkH) array of reconstructed samples r.</t>
          </li>
          <li pn="section-6.3-7.3">
            <t indent="0" pn="section-6.3-7.3.1">The variable bdShift is derived as follows:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3-7.3.2">
              <li pn="section-6.3-7.3.2.1">
                <t indent="0" pn="section-6.3-7.3.2.1.1">bdShift = 20 - BitDepth</t>
              </li>
            </ul>
          </li>
          <li pn="section-6.3-7.4">
            <t indent="0" pn="section-6.3-7.4.1">The reconstructed sample values r[x][y] with x = 0..nBlkW - 1, y = 0..nBlkH - 1 are modified as follows:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3-7.4.2">
              <li pn="section-6.3-7.4.2.1">
                <t indent="0" pn="section-6.3-7.4.2.1.1">r[x][y] = clip(0, (1 &lt;&lt; BitDepth)-1, ((r[x][y]+(1 &lt;&lt; (bdShift-1)))&gt;&gt;bdShift) + (1 &lt;&lt; (BitDepth-1)))</t>
              </li>
            </ul>
          </li>
        </ul>
        <section anchor="scaling-process" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.1">
          <name slugifiedName="name-scaling-process-for-transfo">Scaling Process for Transform Coefficients</name>
          <t indent="0" pn="section-6.3.1-1">Inputs to this process are:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.1-2">
            <li pn="section-6.3.1-2.1">
              <t indent="0" pn="section-6.3.1-2.1.1">a location (xBlkY, yBlkY) of the current color component specifying the top-left sample of the current block relative to the top-left sample of the current frame,</t>
            </li>
            <li pn="section-6.3.1-2.2">
              <t indent="0" pn="section-6.3.1-2.2.1">a variable nBlkW specifying the width of the current block,</t>
            </li>
            <li pn="section-6.3.1-2.3">
              <t indent="0" pn="section-6.3.1-2.3.1">a variable nBlkH specifying the height of the current block,</t>
            </li>
            <li pn="section-6.3.1-2.4">
              <t indent="0" pn="section-6.3.1-2.4.1">a variable cIdx specifying the color component of the current block, and</t>
            </li>
            <li pn="section-6.3.1-2.5">
              <t indent="0" pn="section-6.3.1-2.5.1">a variable qP specifying the quantization parameter.</t>
            </li>
          </ul>
          <t indent="0" pn="section-6.3.1-3">Output of this process is the (nBlkW)x(nBlkH) array d of scaled transform coefficients with elements d[x][y].</t>
          <t indent="0" pn="section-6.3.1-4">The variable bdShift is derived as follows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.1-5">
            <li pn="section-6.3.1-5.1">
              <t indent="0" pn="section-6.3.1-5.1.1">bdShift = BitDepth + ((log2(nBlkW) + log2(nBlkH)) // 2) - 5</t>
            </li>
          </ul>
          <t indent="0" pn="section-6.3.1-6">The list levelScale[] is specified as follows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.1-7">
            <li pn="section-6.3.1-7.1">
              <t indent="0" pn="section-6.3.1-7.1.1">levelScale[k] = {40, 45, 51, 57, 64, 71} with k = 0..5.</t>
            </li>
          </ul>
          <t indent="0" pn="section-6.3.1-8">For the derivation of the scaled transform coefficients d[x][y] with x = 0..nBlkW - 1, y = 0..nBlkH - 1, the following applies:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.1-9">
            <li pn="section-6.3.1-9.1">
              <t indent="0" pn="section-6.3.1-9.1.1">The scaled transform coefficient d[x][y] is derived as follows:</t>
              <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.1-9.1.2">
                <li pn="section-6.3.1-9.1.2.1">
                  <t indent="0" pn="section-6.3.1-9.1.2.1.1">d[x][y] = clip(-32768, 32767, ((TransCoeff[cIdx][xBlkY][yBlkY] * QMatrix[cIdx][x][y] * levelScale[qP % 6] &lt;&lt; (qP//6)) + (1 &lt;&lt; (bdShift-1)) &gt;&gt; bdShift))</t>
                </li>
              </ul>
            </li>
          </ul>
        </section>
        <section anchor="process-coeff" numbered="true" removeInRFC="false" toc="include" pn="section-6.3.2">
          <name slugifiedName="name-process-for-scaled-transfor">Process for Scaled Transform Coefficients</name>
          <section anchor="general-1" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.3.2.1">
            <name slugifiedName="name-general-2">General</name>
            <t indent="0" pn="section-6.3.2.1-1">Inputs to this process are:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.2.1-2">
              <li pn="section-6.3.2.1-2.1">
                <t indent="0" pn="section-6.3.2.1-2.1.1">a location (xBlkY, yBlkY) of the current color component specifying the top-left sample of the current block relative to the top-left sample of the current frame,</t>
              </li>
              <li pn="section-6.3.2.1-2.2">
                <t indent="0" pn="section-6.3.2.1-2.2.1">a variable nBlkW specifying the width of the current block,</t>
              </li>
              <li pn="section-6.3.2.1-2.3">
                <t indent="0" pn="section-6.3.2.1-2.3.1">a variable nBlkH specifying the height of the current block, and</t>
              </li>
              <li pn="section-6.3.2.1-2.4">
                <t indent="0" pn="section-6.3.2.1-2.4.1">an (nBlkW)x(nBlkH) array d of scaled transform coefficients with elements d[x][y].</t>
              </li>
            </ul>
            <t indent="0" pn="section-6.3.2.1-3">Output of this process is the (nBlkW)x(nBlkH) array r of reconstructed samples with elements r[x][y].</t>
            <t indent="0" pn="section-6.3.2.1-4">The (nBlkW)x(nBlkH) array r of reconstructed samples is derived as follows:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.2.1-5">
              <li pn="section-6.3.2.1-5.1">
                <t indent="0" pn="section-6.3.2.1-5.1.1">Each (vertical) column of scaled transform coefficients d[x][y] with x = 0..nBlkW - 1, y = 0..nBlkH - 1 is transformed to e[x][y] with x = 0..nBlkW - 1, y = 0..nBlkH - 1 by invoking the one-dimensional transformation process as specified in <xref target="transform-process" format="default" sectionFormat="of" derivedContent="Section 6.3.2.2"/> for each column x = 0..nBlkW - 1 with the size of the transform block nBlkH, and the list d[x][y] with y = 0..nBlkH - 1 as inputs. The output is the list e[x][y] with y = 0..nBlkH - 1.</t>
              </li>
              <li pn="section-6.3.2.1-5.2">
                <t indent="0" pn="section-6.3.2.1-5.2.1">The following applies:</t>
                <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.2.1-5.2.2">
                  <li pn="section-6.3.2.1-5.2.2.1">
                    <t indent="0" pn="section-6.3.2.1-5.2.2.1.1">g[x][y] = (e[x][y] + 64) &gt;&gt; 7</t>
                  </li>
                </ul>
              </li>
              <li pn="section-6.3.2.1-5.3">
                <t indent="0" pn="section-6.3.2.1-5.3.1">Each (horizontal) row of the resulting array g[x][y] with x = 0..nBlkW - 1, y = 0..nBlkH - 1 is transformed to r[x][y] with x = 0..nBlkW - 1, y = 0..nBlkH - 1 by invoking the one-dimensional transformation process as specified in <xref target="transform-process" format="default" sectionFormat="of" derivedContent="Section 6.3.2.2"/> for each row y = 0..nBlkH - 1 with the size of the transform block nBlkW, and the list g[x][y] with x = 0..nBlkW - 1 as inputs. The output is the list r[x][y] with x = 0..nBlkW - 1.</t>
              </li>
            </ul>
          </section>
          <section anchor="transform-process" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.3.2.2">
            <name slugifiedName="name-transformation-process">Transformation Process</name>
            <t indent="0" pn="section-6.3.2.2-1">Inputs to this process are:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.2.2-2">
              <li pn="section-6.3.2.2-2.1">
                <t indent="0" pn="section-6.3.2.2-2.1.1">a variable nTbS specifying the sample size of scaled transform coefficients, and</t>
              </li>
              <li pn="section-6.3.2.2-2.2">
                <t indent="0" pn="section-6.3.2.2-2.2.1">a list of scaled transform coefficients x with elements x[j], with j = 0..(nTbS - 1).</t>
              </li>
            </ul>
            <t indent="0" pn="section-6.3.2.2-3">Output of this process is the list of transformed samples y with elements y[i], with i = 0..(nTbS - 1).</t>
            <t indent="0" pn="section-6.3.2.2-4">The transformation matrix derivation process as specified in <xref target="matrix-process" format="default" sectionFormat="of" derivedContent="Section 6.3.2.3"/> is invoked with the transform size nTbS as input, and the transformation matrix transMatrix as output.</t>
            <t indent="0" pn="section-6.3.2.2-5">The list of transformed samples y[i] with i = 0..(nTbS - 1) is derived as follows:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.2.2-6">
              <li pn="section-6.3.2.2-6.1">
                <t indent="0" pn="section-6.3.2.2-6.1.1">y[i] = sum(j = 0, nTbS - 1, transMatrix[i][j] * x[j])</t>
              </li>
            </ul>
          </section>
          <section anchor="matrix-process" numbered="true" removeInRFC="false" toc="exclude" pn="section-6.3.2.3">
            <name slugifiedName="name-transformation-matrix-deriv">Transformation Matrix Derivation Process</name>
            <t indent="0" pn="section-6.3.2.3-1">Input to this process is a variable nTbS specifying the horizontal sample size of scaled transform coefficients.</t>
            <t indent="0" pn="section-6.3.2.3-2">Output of this process is the transformation matrix transMatrix.</t>
            <t indent="0" pn="section-6.3.2.3-3">The transformation matrix transMatrix is derived based on nTbs as follows:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6.3.2.3-4">
              <li pn="section-6.3.2.3-4.1">
                <t indent="0" pn="section-6.3.2.3-4.1.1">If nTbS is equal to 8, the following applies:</t>
                <figure anchor="transmatrix" align="left" suppress-title="false" pn="figure-25">
                  <name slugifiedName="name-transform-matrix-for-ntbs-8">Transform matrix for nTbS == 8</name>
                  <artwork align="left" pn="section-6.3.2.3-4.1.2.1">
transMatrix[m][n] =
   {
    {  64,  64,  64,  64,  64,  64,  64,  64 }
    {  89,  75,  50,  18, -18, -50, -75, -89 }
    {  84,  35, -35, -84, -84, -35,  35,  84 }
    {  75, -18, -89, -50,  50,  89,  18, -75 }
    {  64, -64, -64,  64,  64, -64, -64,  64 }
    {  50, -89,  18,  75, -75, -18,  89, -50 }
    {  35, -84,  84, -35, -35,  84, -84,  35 }
    {  18, -50,  75, -89,  89, -75,  50, -18 }
   }</artwork>
                </figure>
              </li>
            </ul>
          </section>
        </section>
      </section>
    </section>
    <section anchor="parsing-process" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-parsing-process">Parsing Process</name>
      <section anchor="process_h" numbered="true" removeInRFC="false" toc="include" pn="section-7.1">
        <name slugifiedName="name-process-for-syntax-element-">Process for Syntax Element Type h(v)</name>
        <t indent="0" pn="section-7.1-1">This process is invoked for the parsing of syntax elements with descriptor h(v) in <xref target="mb-layer" format="default" sectionFormat="of" derivedContent="Section 5.3.15"/> and <xref target="ac-coding" format="default" sectionFormat="of" derivedContent="Section 5.3.16"/>.</t>
        <section anchor="process-for-absdccoeffdiff" numbered="true" removeInRFC="false" toc="include" pn="section-7.1.1">
          <name slugifiedName="name-process-for-abs_dc_coeff_di">Process for abs_dc_coeff_diff</name>
          <t indent="0" pn="section-7.1.1-1">Inputs to this process are bits for the abs_dc_coeff_diff syntax element.
 Output of this process is a value of the abs_dc_coeff_diff syntax element.
 The variable kParam is derived as follows:</t>
          <t indent="3" pn="section-7.1.1-2">kParam = clip(0, 5, PrevDcDiff &gt;&gt; 1)</t>
          <t indent="0" pn="section-7.1.1-3">The value of syntax element abs_dc_coeff_diff is obtained by invoking the parsing process for variable-length codes as specified in <xref target="process-vlc" format="default" sectionFormat="of" derivedContent="Section 7.1.4"/> with kParam.</t>
        </section>
        <section anchor="process-for-coeffzerorun" numbered="true" removeInRFC="false" toc="include" pn="section-7.1.2">
          <name slugifiedName="name-process-for-coeff_zero_run">Process for coeff_zero_run</name>
          <t indent="0" pn="section-7.1.2-1">Inputs to this process are bits for the coeff_zero_run syntax element.</t>
          <t indent="0" pn="section-7.1.2-2">Output of this process is a value of the coeff_zero_run syntax element.</t>
          <t indent="0" pn="section-7.1.2-3">The variable kParam is derived as follows:</t>
          <t indent="3" pn="section-7.1.2-4">kParam = clip(0, 2, PrevRun &gt;&gt; 2)</t>
          <t indent="0" pn="section-7.1.2-5">The value of syntax element coeff_zero_run is obtained by invoking the parsing process for variable-length codes as specified in <xref target="process-vlc" format="default" sectionFormat="of" derivedContent="Section 7.1.4"/> with kParam.</t>
        </section>
        <section anchor="process-for-absaccoeffminus1" numbered="true" removeInRFC="false" toc="include" pn="section-7.1.3">
          <name slugifiedName="name-process-for-abs_ac_coeff_mi">Process for abs_ac_coeff_minus1</name>
          <t indent="0" pn="section-7.1.3-1">Inputs to this process are bits for the abs_ac_coeff_minus1 syntax element.</t>
          <t indent="0" pn="section-7.1.3-2">Output of this process is a value of the abs_ac_coeff_minus1 syntax element.</t>
          <t indent="0" pn="section-7.1.3-3">The variable kParam is derived as follows:</t>
          <t indent="3" pn="section-7.1.3-4">kParam = clip(0, 4, PrevLevel &gt;&gt; 2)</t>
          <t indent="0" pn="section-7.1.3-5">The value of syntax element abs_ac_coeff_minus1 is obtained by invoking the parsing process for variable-length codes as specified in <xref target="process-vlc" format="default" sectionFormat="of" derivedContent="Section 7.1.4"/> with kParam.</t>
        </section>
        <section anchor="process-vlc" numbered="true" removeInRFC="false" toc="include" pn="section-7.1.4">
          <name slugifiedName="name-process-for-variable-length">Process for Variable-Length Codes</name>
          <t indent="0" pn="section-7.1.4-1">Input to this process is kParam.</t>
          <t indent="0" pn="section-7.1.4-2">Output of this process is a value, symbolValue, of a syntax element.</t>
          <t indent="0" pn="section-7.1.4-3">The symbolValue is derived as follows:</t>
          <figure anchor="parse_symbolValue" align="left" suppress-title="false" pn="figure-26">
            <name slugifiedName="name-parsing-process-of-symbolva">Parsing process of symbolValue</name>
            <artwork align="left" pn="section-7.1.4-4.1">
symbolValue = 0
parseExpGolomb = 1
k = kParam
stopLoop = 0

if(read_bits(1) == 1){
  parseExpGolomb = 0
}
else{
  if(read_bits (1) == 0){
    symbolValue += (1 &lt;&lt; k)
    parseExpGolomb = 0
  }
  else{
    symbolValue += (2 &lt;&lt; k)
    parseExpGolomb = 1
  }
}

if(parseExpGolomb){
  do{
    if(read_bits(1) == 1){
      stopLoop = 1
    }
    else{
      symbolValue += (1 &lt;&lt; k)
      k++
    }
  } while(!stopLoop)
}

if(k &gt; 0)
  symbolValue += read_bits(k)</artwork>
          </figure>
          <t indent="0" pn="section-7.1.4-5">where the value returned from read_bits(n) is interpreted as a binary representation of an n-bit unsigned integer with the most significant bit written first.</t>
        </section>
      </section>
      <section anchor="codeword-generation-process-for-hv-informative" numbered="true" removeInRFC="false" toc="include" pn="section-7.2">
        <name slugifiedName="name-codeword-generation-process">Codeword Generation Process for h(v) (Informative)</name>
        <t indent="0" pn="section-7.2-1">This process specifies the code generation process for syntax elements with descriptor h(v).</t>
        <section anchor="process-for-absdccoeffdiff-1" numbered="true" removeInRFC="false" toc="include" pn="section-7.2.1">
          <name slugifiedName="name-process-for-abs_dc_coeff_dif">Process for abs_dc_coeff_diff</name>
          <t indent="0" pn="section-7.2.1-1">Input to this process is a symbol value of the abs_dc_coeff_diff syntax element.</t>
          <t indent="0" pn="section-7.2.1-2">Output of this process is a codeword of the abs_dc_coeff_diff syntax element.</t>
          <t indent="0" pn="section-7.2.1-3">The variable kParam is derived as follows:</t>
          <t indent="3" pn="section-7.2.1-4">kParam = clip(0, 5, PrevDcDiff &gt;&gt; 1)</t>
          <t indent="0" pn="section-7.2.1-5">The codeword of syntax element abs_dc_coeff_diff is obtained by invoking the generation process for variable-length codes as specified in <xref target="process-generate-vlc" format="default" sectionFormat="of" derivedContent="Section 7.2.4"/> with the symbol value symbolValue and kParam.</t>
        </section>
        <section anchor="process-for-coeffzerorun-1" numbered="true" removeInRFC="false" toc="include" pn="section-7.2.2">
          <name slugifiedName="name-process-for-coeff_zero_run-2">Process for coeff_zero_run</name>
          <t indent="0" pn="section-7.2.2-1">Input to this process is a symbol value of the coeff_zero_run syntax element.</t>
          <t indent="0" pn="section-7.2.2-2">Output of this process is a codeword of the coeff_zero_run syntax element.</t>
          <t indent="0" pn="section-7.2.2-3">The variable kParam is derived as follows:</t>
          <t indent="3" pn="section-7.2.2-4">kParam = clip(0, 2, PrevRun &gt;&gt; 2)</t>
          <t indent="0" pn="section-7.2.2-5">The codeword of syntax element coeff_zero_run is obtained by invoking the generation process for variable-length codes as specified in <xref target="process-generate-vlc" format="default" sectionFormat="of" derivedContent="Section 7.2.4"/> with the symbol value symbolValue and kParam.</t>
        </section>
        <section anchor="process-for-absaccoeffminus1-1" numbered="true" removeInRFC="false" toc="include" pn="section-7.2.3">
          <name slugifiedName="name-process-for-abs_ac_coeff_min">Process for abs_ac_coeff_minus1</name>
          <t indent="0" pn="section-7.2.3-1">Input to this process is a symbol value of the abs_ac_coeff_minus1 syntax element.</t>
          <t indent="0" pn="section-7.2.3-2">Output of this process is a codeword of the abs_ac_coeff_minus1 syntax element.</t>
          <t indent="0" pn="section-7.2.3-3">The variable kParam is derived as follows:</t>
          <t indent="3" pn="section-7.2.3-4">kParam = clip(0, 4, PrevLevel &gt;&gt; 2)</t>
          <t indent="0" pn="section-7.2.3-5">The codeword of syntax element abs_ac_coeff_minus1 is obtained by invoking the generation for variable-length codes as specified in <xref target="process-generate-vlc" format="default" sectionFormat="of" derivedContent="Section 7.2.4"/> with the symbol value symbolValue and kParam.</t>
        </section>
        <section anchor="process-generate-vlc" numbered="true" removeInRFC="false" toc="include" pn="section-7.2.4">
          <name slugifiedName="name-process-for-variable-length-">Process for Variable-Length Codes</name>
          <t indent="0" pn="section-7.2.4-1">Inputs to this process are symbolVal and kParam</t>
          <t indent="0" pn="section-7.2.4-2">Output of this process is a codeword of a syntax element.</t>
          <t indent="0" pn="section-7.2.4-3">The codeword is derived as follows:</t>
          <figure anchor="gen_symbolValue" align="left" suppress-title="false" pn="figure-27">
            <name slugifiedName="name-generating-bits-from-symbol">Generating bits from symbolValue</name>
            <artwork align="left" pn="section-7.2.4-4.1">
PrefixVLCTable[3][2] = {{1, 0}, {0, 0}, {0, 1}}

symbolValue = symbolVal
valPrefixVLC = clip(0, 2, symbolVal &gt;&gt; kParam)
bitCount = 0
k = kParam

while(symbolValue &gt;= (1 &lt;&lt; k)){
  symbolValue -= (1 &lt;&lt; k)
  if(bitCount &lt; 2)
    put_bits(PrefixVLCTable[valPrefixVLC][bitCount], 1)
  else
    put_bits(0, 1)
  if(bitCount &gt;= 2)
    k++
  bitCount++
}

if(bitCount &lt; 2)
  put_bits(PrefixVLCTable[valPrefixVLC][bitCount], 1)
else
  put_bits(1, 1)

if(k &gt; 0)
  put_bits(symbolValue, k)</artwork>
          </figure>
          <t indent="0" pn="section-7.2.4-5">where a codeword generated from put_bits(v, n) is interpreted as a binary representation of an n-bit unsigned integer value v with the most significant bit written first.</t>
        </section>
      </section>
    </section>
    <section anchor="appendix-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8">
      <name slugifiedName="name-metadata-information">Metadata Information</name>
      <section anchor="metadata-payload" numbered="true" removeInRFC="false" toc="include" pn="section-8.1">
        <name slugifiedName="name-metadata-payload">Metadata Payload</name>
        <figure anchor="syntax-metadatapayload" align="left" suppress-title="false" pn="figure-28">
          <name slugifiedName="name-metadata_payload-syntax-cod">metadata_payload() syntax code</name>
          <artwork align="left" pn="section-8.1-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata_payload(payloadType, payloadSize){                   |
  if(payloadType == 4){                                       |
    metadata_itu_t_t35(payloadSize)                           |
  }                                                           |
  else if(payloadType == 5){                                  |
    metadata_mdcv(payloadSize)                                |
  }                                                           |
  else if(payloadType == 6){                                  |
    metadata_cll(payloadSize)                                 |
  }                                                           |
  else if(payloadType == 10){                                 |
    metadata_filler(payloadSize)                              |
  }                                                           |
  else if(payloadType == 170){                                |
    metadata_user_defined(payloadSize)                        |
  }                                                           |
  else{                                                       |
    metadata_undefined(payloadSize)                           |
  }                                                           |
  byte_alignment()                                            |
}                                                             |</artwork>
        </figure>
        <t indent="0" pn="section-8.1-2"> The syntax and semantics of each type of metadata are defined in <xref target="list-of-metadata-syntax-and-semantics" format="default" sectionFormat="of" derivedContent="Section 8.2"/>. </t>
      </section>
      <section anchor="list-of-metadata-syntax-and-semantics" numbered="true" removeInRFC="false" toc="include" pn="section-8.2">
        <name slugifiedName="name-list-of-metadata-syntax-and">List of Metadata Syntax and Semantics</name>
        <section anchor="filler-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.1">
          <name slugifiedName="name-filler-metadata">Filler Metadata</name>
          <artwork align="left" pn="section-8.2.1-1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata_filler(payloadSize){                                 |
  for(i = 0; i &lt; payloadSize; i++){                           |
    ff_byte                                                   | f(8)
  }                                                           |
}                                                             |</artwork>
          <dl spacing="normal" newline="true" indent="3" pn="section-8.2.1-2">
            <dt pn="section-8.2.1-2.1">ff_byte</dt>
            <dd pn="section-8.2.1-2.2">is a byte equal to 0xFF.</dd>
          </dl>
        </section>
        <section anchor="recommendation-itu-t-t35-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.2">
          <name slugifiedName="name-recommendation-itu-t-t35-me">Recommendation ITU-T T.35 Metadata</name>
          <t indent="0" pn="section-8.2.2-1">This metadata contains information registered as specified in <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/>.</t>
          <figure anchor="syntax-metat35" align="left" suppress-title="false" pn="figure-29">
            <name slugifiedName="name-metadata_itu_t_t35-syntax-c">metadata_itu_t_t35() syntax code</name>
            <artwork align="left" pn="section-8.2.2-2.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata_itu_t_t35(payloadSize){                              |
  itu_t_t35_country_code                                      | b(8)
  readSize = payloadSize - 1                                  |
                                                              |
  if(itu_t_t35_country_code == 0xFF){                         |
    itu_t_t35_country_code_extension                          | b(8)
    readSize--                                                |
  }                                                           |
                                                              |
  for(i = 0; i &lt; readSize; i++){                              |
    itu_t_t35_payload[i]                                      | b(8)
  }                                                           |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-8.2.2-3">
            <dt pn="section-8.2.2-3.1">itu_t_t35_country_code</dt>
            <dd pn="section-8.2.2-3.2">
              <bcp14>MUST</bcp14> be a byte having the semantics of country code as specified in Annex A of <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/>.</dd>
            <dt pn="section-8.2.2-3.3">itu_t_t35_country_code_extension</dt>
            <dd pn="section-8.2.2-3.4">
              <bcp14>MUST</bcp14> be a byte having the semantics of country code as specified in Annex B of <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/>.</dd>
            <dt pn="section-8.2.2-3.5">itu_t_t35_payload[i]</dt>
            <dd pn="section-8.2.2-3.6">
              <bcp14>MUST</bcp14> be a byte having the semantics of data registered as specified in <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/>.</dd>
          </dl>
          <t indent="0" pn="section-8.2.2-4">The terminal provider code and terminal provider oriented code as specified in <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/> <bcp14>MUST</bcp14> be contained in the first one or more bytes of the itu_t_t35_payload. Any remaining bytes in itu_t_t35_payload data <bcp14>MUST</bcp14> be data having syntax and semantics as specified by the entity identified by the <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/> country code and terminal provider code. Note that any metadata to be carried with this type of payload is expected to have been registered through either national administrator, the Alliance for Telecommunications Industry Solutions (ATIS) or the ITUT-T Telecommunication Standardization Bureau (TSB) as specified in <xref target="ITUT-T35" format="default" sectionFormat="of" derivedContent="ITUT-T35"/>.</t>
        </section>
        <section anchor="mastering-display-color-volume-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.3">
          <name slugifiedName="name-mastering-display-color-vol">Mastering Display Color Volume Metadata</name>
          <figure anchor="syntax-metamdcv" align="left" suppress-title="false" pn="figure-30">
            <name slugifiedName="name-metadata_mdcv-syntax-code">metadata_mdcv() syntax code</name>
            <artwork align="left" pn="section-8.2.3-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata_mdcv(payloadSize){                                   |
  for(i = 0; i &lt; 3; i++){                                     |
    primary_chromaticity_x[i]                                 | u(16)
    primary_chromaticity_y[i]                                 | u(16)
  }                                                           |
  white_point_chromaticity_x                                  | u(16)
  white_point_chromaticity_y                                  | u(16)
  max_mastering_luminance                                     | u(32)
  min_mastering_luminance                                     | u(32)
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-8.2.3-2">
            <dt pn="section-8.2.3-2.1">primary_chromaticity_x[i]</dt>
            <dd pn="section-8.2.3-2.2">specifies a 0.16 fixed-point format of X chromaticity
            coordinate of mastering display in terms of CIE 1931 as specified in <xref target="ISO11664-1" format="default" sectionFormat="of" derivedContent="ISO11664-1"/>, where i =
            0, 1, 2 specifies Red, Green, Blue, respectively.</dd>
            <dt pn="section-8.2.3-2.3">primary_chromaticity_y[i]</dt>
            <dd pn="section-8.2.3-2.4">specifies a 0.16 fixed-point format of Y chromaticity
            coordinate of mastering display in terms of CIE 1931 as specified in <xref target="ISO11664-1" format="default" sectionFormat="of" derivedContent="ISO11664-1"/>, where i =
            0, 1, 2 specifies Red, Green, Blue, respectively.</dd>
            <dt pn="section-8.2.3-2.5">white_point_chromaticity_x</dt>
            <dd pn="section-8.2.3-2.6">specifies a 0.16 fixed-point format of white point X
            chromaticity coordinate of mastering display in terms of CIE 1931 as specified in <xref target="ISO11664-1" format="default" sectionFormat="of" derivedContent="ISO11664-1"/>.</dd>
            <dt pn="section-8.2.3-2.7">white_point_chromaticity_y</dt>
            <dd pn="section-8.2.3-2.8">specifies a 0.16 fixed-point format of white point Y
            chromaticity coordinate as mastering display in terms of CIE 1931 as specified in <xref target="ISO11664-1" format="default" sectionFormat="of" derivedContent="ISO11664-1"/>.</dd>
            <dt pn="section-8.2.3-2.9">max_mastering_luminance</dt>
            <dd pn="section-8.2.3-2.10">is a 24.8 fixed-point format of maximum display mastering
            luminance, represented in candelas per square meter.</dd>
            <dt pn="section-8.2.3-2.11">min_mastering_luminance</dt>
            <dd pn="section-8.2.3-2.12">is an 18.14 fixed-point format of minimum display mastering
            luminance, represented in candelas per square meter.</dd>
          </dl>
        </section>
        <section anchor="content-light-level-information-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.4">
          <name slugifiedName="name-content-light-level-informa">Content Light-Level Information Metadata</name>
          <figure anchor="syntax-metatcontentlight" align="left" suppress-title="false" pn="figure-31">
            <name slugifiedName="name-metadata_cll-syntax-code">metadata_cll() syntax code</name>
            <artwork align="left" pn="section-8.2.4-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata_cll(payloadSize){                                    |
  max_cll                                                     | u(16)
  max_fall                                                    | u(16)
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-8.2.4-2">
            <dt pn="section-8.2.4-2.1">max_cll</dt>
            <dd pn="section-8.2.4-2.2">specifies the maximum content light level information as specified in <xref target="CTA-861.3" format="default" sectionFormat="of" derivedContent="CTA-861.3"/>, Appendix A.</dd>
            <dt pn="section-8.2.4-2.3">max_fall</dt>
            <dd pn="section-8.2.4-2.4">specifies the maximum frame-average light level information as specified in <xref target="CTA-861.3" format="default" sectionFormat="of" derivedContent="CTA-861.3"/>, Appendix A.</dd>
          </dl>
        </section>
        <section anchor="user-defined-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.5">
          <name slugifiedName="name-user-defined-metadata">User-Defined Metadata</name>
          <t indent="0" pn="section-8.2.5-1">This metadata has user data identified by a universal unique identifier as specified in <xref target="RFC9562" format="default" sectionFormat="of" derivedContent="RFC9562"/>, the contents of which are not specified in this document.</t>
          <figure anchor="syntax-metauserdef" align="left" suppress-title="false" pn="figure-32">
            <name slugifiedName="name-metadata_user_defined-synta">metadata_user_defined() syntax code</name>
            <artwork align="left" pn="section-8.2.5-2.1">
syntax code                                                 | type
------------------------------------------------------------|-----
metadata_user_defined(payloadSize){                         |
  uuid                                                      | u(128)
  for(i = 0; i &lt; (payloadSize - 16); i++)                   |
    user_defined_data_payload[i]                            | b(8)
}                                                           |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-8.2.5-3">
            <dt pn="section-8.2.5-3.1">uuid</dt>
            <dd pn="section-8.2.5-3.2">
              <bcp14>MUST</bcp14> be a 128-bit value specified as a
            generated Universally Unique Identifier (UUID) according to the procedures specified in <xref target="RFC9562" format="default" sectionFormat="of" derivedContent="RFC9562"/>.</dd>
            <dt pn="section-8.2.5-3.3">user_defined_data_payload[i]</dt>
            <dd pn="section-8.2.5-3.4">
              <bcp14>MUST</bcp14> be a byte having user-defined syntax and
            semantics as specified by the UUID generator.</dd>
          </dl>
        </section>
        <section anchor="undefined-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-8.2.6">
          <name slugifiedName="name-undefined-metadata">Undefined Metadata</name>
          <figure anchor="syntax-metaund" align="left" suppress-title="false" pn="figure-33">
            <name slugifiedName="name-metadata_undefined-syntax-c">metadata_undefined() syntax code</name>
            <artwork align="left" pn="section-8.2.6-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
metadata_undefined(payloadSize){                              |
  for(i = 0; i &lt; payloadSize; i++){                           |
    undefined_metadata_payload_byte[i]                        | b(8)
  }                                                           |
}                                                             |</artwork>
          </figure>
          <dl spacing="normal" newline="true" indent="3" pn="section-8.2.6-2">
            <dt pn="section-8.2.6-2.1">undefined_metadata_payload_byte[i]</dt>
            <dd pn="section-8.2.6-2.2">is a byte reserved for future use.</dd>
          </dl>
        </section>
      </section>
    </section>
    <section anchor="appendix-profile-level-band" numbered="true" removeInRFC="false" toc="include" pn="section-9">
      <name slugifiedName="name-profiles-levels-and-bands">Profiles, Levels, and Bands</name>
      <section anchor="overview-of-profiles-levels-and-bands" numbered="true" removeInRFC="false" toc="include" pn="section-9.1">
        <name slugifiedName="name-overview-of-profiles-levels">Overview of Profiles, Levels, and Bands</name>
        <t indent="0" pn="section-9.1-1">Profiles, levels, and bands specify restrictions on a coded frame and hence limits on the capabilities needed to decode the coded frame. Profiles, levels, and bands are also used to indicate interoperability points between individual decoder implementations.</t>
        <t indent="0" pn="section-9.1-2">Each profile specifies a subset of algorithmic features and limits that <bcp14>MUST</bcp14> be supported by all decoders conforming to that profile.</t>
        <t indent="3" pn="section-9.1-3">NOTE: This document does not include individually selectable "options" at the decoder, as this would increase interoperability difficulties.</t>
        <t indent="3" pn="section-9.1-4">NOTE: Encoders are not required to make use of any particular subset of features supported in a profile.</t>
        <t indent="0" pn="section-9.1-5">Each level with a band specifies a set of limits on the values that may be taken by the syntax elements of this document. For any given profile, a level with a band generally corresponds to a particular decoder processing load and memory capability. The constraints set by levels and bands are orthogonal to the constraints defined by profiles so that the same set of level and band definitions is used with all profiles. For example, a certain level L and a certain band B can be combined with either profile X or profile Y to specifically define two different sets of constraints.</t>
        <t indent="3" pn="section-9.1-6">NOTE: Individual implementations may support a different level for each supported profile.</t>
      </section>
      <section anchor="requirements-on-video-decoder-capability" numbered="true" removeInRFC="false" toc="include" pn="section-9.2">
        <name slugifiedName="name-requirements-on-video-decod">Requirements on Video Decoder Capability</name>
        <t indent="0" pn="section-9.2-1">Capabilities of video decoders conforming to this document are specified in terms of the ability to decode video streams conforming to the constraints of profiles, levels, and bands specified in this section. When expressing the capabilities of a decoder for a specified profile, the level and the band supported for that profile <bcp14>MUST</bcp14> also be expressed.</t>
        <t indent="0" pn="section-9.2-2">Specific values are specified for the syntax elements profile_idc, level_idc, and band_idc. All other values of profile_idc, level_idc, and band_idc are reserved for future use.</t>
        <t indent="3" pn="section-9.2-3">NOTE: Decoders <bcp14>SHALL NOT</bcp14> infer that a reserved value of profile_idc between the values specified in this document indicates intermediate capabilities between the specified profiles, as there are no restrictions on the method to be chosen for the use of such future reserved values. However, decoders <bcp14>MUST</bcp14> infer that a reserved value of level_idc and a reserved value of band_idc between the values specified in this document indicates intermediate capabilities between the specified levels.</t>
      </section>
      <section anchor="profiles" numbered="true" removeInRFC="false" toc="include" pn="section-9.3">
        <name slugifiedName="name-profiles">Profiles</name>
        <section anchor="general-2" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.1">
          <name slugifiedName="name-general-3">General</name>
          <t indent="0" pn="section-9.3.1-1">All constraints for a coded frame that are specified are constraints for the coded frame that are activated when the bitstream of the access unit is decoded.</t>
        </section>
        <section anchor="profile" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.2">
          <name slugifiedName="name-422-10-profile">422-10 Profile</name>
          <t indent="0" pn="section-9.3.2-1">Conformance of a coded frame to the 422-10 profile is indicated by profile_idc equal to 33.</t>
          <t indent="0" pn="section-9.3.2-2">Coded frames conforming to the 422-10 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.2-3">
            <li pn="section-9.3.2-3.1">
              <t indent="0" pn="section-9.3.2-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be equal to 2.</t>
            </li>
            <li pn="section-9.3.2-3.2">
              <t indent="0" pn="section-9.3.2-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be equal to 2.</t>
            </li>
            <li pn="section-9.3.2-3.3">
              <t indent="0" pn="section-9.3.2-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.2-4">Coded frames conforming to the 422-10 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 422-10 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.2-5">
            <li pn="section-9.3.2-5.1">
              <t indent="0" pn="section-9.3.2-5.1.1">The coded frame is indicated to conform to the 422-10 profile.</t>
            </li>
            <li pn="section-9.3.2-5.2">
              <t indent="0" pn="section-9.3.2-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.2-5.3">
              <t indent="0" pn="section-9.3.2-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
        <section anchor="profile-1" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.3">
          <name slugifiedName="name-422-12-profile">422-12 Profile</name>
          <t indent="0" pn="section-9.3.3-1">Conformance of a coded frame to the 422-12 profile is indicated by profile_idc equal to 44.</t>
          <t indent="0" pn="section-9.3.3-2">Coded frames conforming to the 422-12 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.3-3">
            <li pn="section-9.3.3-3.1">
              <t indent="0" pn="section-9.3.3-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be equal to 2.</t>
            </li>
            <li pn="section-9.3.3-3.2">
              <t indent="0" pn="section-9.3.3-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be in the range of 2 to 4.</t>
            </li>
            <li pn="section-9.3.3-3.3">
              <t indent="0" pn="section-9.3.3-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.3-4">Coded frames conforming to the 422-12 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 422-12 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.3-5">
            <li pn="section-9.3.3-5.1">
              <t indent="0" pn="section-9.3.3-5.1.1">The coded frame is indicated to conform to the 422-12 profile or the 422-10 profile.</t>
            </li>
            <li pn="section-9.3.3-5.2">
              <t indent="0" pn="section-9.3.3-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.3-5.3">
              <t indent="0" pn="section-9.3.3-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
        <section anchor="profile-2" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.4">
          <name slugifiedName="name-444-10-profile">444-10 Profile</name>
          <t indent="0" pn="section-9.3.4-1">Conformance of a coded frame to the 444-10 profile is indicated by profile_idc equal to 55.</t>
          <t indent="0" pn="section-9.3.4-2">Coded frames conforming to the 444-10 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.4-3">
            <li pn="section-9.3.4-3.1">
              <t indent="0" pn="section-9.3.4-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be in the range of 2 to 3.</t>
            </li>
            <li pn="section-9.3.4-3.2">
              <t indent="0" pn="section-9.3.4-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be equal to 2.</t>
            </li>
            <li pn="section-9.3.4-3.3">
              <t indent="0" pn="section-9.3.4-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.4-4">Coded frames conforming to the 444-10 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 444-10 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.4-5">
            <li pn="section-9.3.4-5.1">
              <t indent="0" pn="section-9.3.4-5.1.1">The coded frame is indicated to conform to the 444-10 profile or the 422-10 profile.</t>
            </li>
            <li pn="section-9.3.4-5.2">
              <t indent="0" pn="section-9.3.4-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.4-5.3">
              <t indent="0" pn="section-9.3.4-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
        <section anchor="profile-3" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.5">
          <name slugifiedName="name-444-12-profile">444-12 Profile</name>
          <t indent="0" pn="section-9.3.5-1">Conformance of a coded frame to the 444-12 profile is indicated by profile_idc equal to 66.</t>
          <t indent="0" pn="section-9.3.5-2">Coded frames conforming to the 444-12 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.5-3">
            <li pn="section-9.3.5-3.1">
              <t indent="0" pn="section-9.3.5-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be in the range of 2 to 3.</t>
            </li>
            <li pn="section-9.3.5-3.2">
              <t indent="0" pn="section-9.3.5-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be in the range of 2 to 4.</t>
            </li>
            <li pn="section-9.3.5-3.3">
              <t indent="0" pn="section-9.3.5-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.5-4">Coded frames conforming to the 444-12 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 444-12 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.5-5">
            <li pn="section-9.3.5-5.1">
              <t indent="0" pn="section-9.3.5-5.1.1">The coded frame is indicated to conform to the 444-12 profile, the 444-10 profile, the 422-12 profile, or the 422-10 profile.</t>
            </li>
            <li pn="section-9.3.5-5.2">
              <t indent="0" pn="section-9.3.5-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.5-5.3">
              <t indent="0" pn="section-9.3.5-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
        <section anchor="profile-4" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.6">
          <name slugifiedName="name-4444-10-profile">4444-10 Profile</name>
          <t indent="0" pn="section-9.3.6-1">Conformance of a coded frame to the 4444-10 profile is indicated by profile_idc equal to 77.</t>
          <t indent="0" pn="section-9.3.6-2">Coded frames conforming to the 4444-10 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.6-3">
            <li pn="section-9.3.6-3.1">
              <t indent="0" pn="section-9.3.6-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be in the range of 2 to 4.</t>
            </li>
            <li pn="section-9.3.6-3.2">
              <t indent="0" pn="section-9.3.6-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be equal to 2.</t>
            </li>
            <li pn="section-9.3.6-3.3">
              <t indent="0" pn="section-9.3.6-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.6-4">Coded frames conforming to the 4444-10 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 4444-10 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.6-5">
            <li pn="section-9.3.6-5.1">
              <t indent="0" pn="section-9.3.6-5.1.1">The coded frame is indicated to conform to the 4444-10 profile, the 444-10 profile, or the 422-10 profile.</t>
            </li>
            <li pn="section-9.3.6-5.2">
              <t indent="0" pn="section-9.3.6-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.6-5.3">
              <t indent="0" pn="section-9.3.6-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
        <section anchor="profile-5" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.7">
          <name slugifiedName="name-4444-12-profile">4444-12 Profile</name>
          <t indent="0" pn="section-9.3.7-1">Conformance of a coded frame to the 4444-12 profile is indicated by profile_idc equal to 88.</t>
          <t indent="0" pn="section-9.3.7-2">Coded frames conforming to the 4444-12 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.7-3">
            <li pn="section-9.3.7-3.1">
              <t indent="0" pn="section-9.3.7-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be in the range of 2 to 4.</t>
            </li>
            <li pn="section-9.3.7-3.2">
              <t indent="0" pn="section-9.3.7-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be in the range of 2 to 4.</t>
            </li>
            <li pn="section-9.3.7-3.3">
              <t indent="0" pn="section-9.3.7-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.7-4">Coded frames conforming to the 4444-12 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 4444-12 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.7-5">
            <li pn="section-9.3.7-5.1">
              <t indent="0" pn="section-9.3.7-5.1.1">The coded frame is indicated to conform to the 4444-12 profile, the 4444-10 profile, the 444-12 profile, the 444-10 profile, the 422-12 profile, or the 422-10 profile.</t>
            </li>
            <li pn="section-9.3.7-5.2">
              <t indent="0" pn="section-9.3.7-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.7-5.3">
              <t indent="0" pn="section-9.3.7-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
        <section anchor="profile-6" numbered="true" removeInRFC="false" toc="include" pn="section-9.3.8">
          <name slugifiedName="name-400-10-profile">400-10 Profile</name>
          <t indent="0" pn="section-9.3.8-1">Conformance of a coded frame to the 400-10 profile is indicated by profile_idc equal to 99.</t>
          <t indent="0" pn="section-9.3.8-2">Coded frames conforming to the 400-10 profile <bcp14>MUST</bcp14> obey the following constraints:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.8-3">
            <li pn="section-9.3.8-3.1">
              <t indent="0" pn="section-9.3.8-3.1.1">chroma_format_idc <bcp14>MUST</bcp14> be equal to 0.</t>
            </li>
            <li pn="section-9.3.8-3.2">
              <t indent="0" pn="section-9.3.8-3.2.1">bit_depth_minus8 <bcp14>MUST</bcp14> be equal to 2.</t>
            </li>
            <li pn="section-9.3.8-3.3">
              <t indent="0" pn="section-9.3.8-3.3.1">pbu_type <bcp14>MUST</bcp14> be equal to 1.</t>
            </li>
          </ul>
          <t indent="0" pn="section-9.3.8-4">Coded frames conforming to the 400-10 profile <bcp14>MUST</bcp14> also conform to any levels and bands constraints specified in <xref target="levels_and_bands" format="default" sectionFormat="of" derivedContent="Section 9.4"/>. Decoders conforming to the 400-10 profile at a specific level (identified by a specific value of L) and a specific band (identified by a specific value of B) <bcp14>MUST</bcp14> be capable of decoding all coded frames for which all of the following conditions apply:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.3.8-5">
            <li pn="section-9.3.8-5.1">
              <t indent="0" pn="section-9.3.8-5.1.1">The coded frame is indicated to conform to the 400-10 profile.</t>
            </li>
            <li pn="section-9.3.8-5.2">
              <t indent="0" pn="section-9.3.8-5.2.1">The coded frame is indicated to conform to a level (by a specific value of level_idc) that is lower than or equal to level L.</t>
            </li>
            <li pn="section-9.3.8-5.3">
              <t indent="0" pn="section-9.3.8-5.3.1">The coded frame is indicated to conform to a band (by a specific value of band_idc) that is lower than or equal to band B.</t>
            </li>
          </ul>
        </section>
      </section>
      <section anchor="levels_and_bands" numbered="true" removeInRFC="false" toc="include" pn="section-9.4">
        <name slugifiedName="name-levels-and-bands">Levels and Bands</name>
        <section anchor="general-3" numbered="true" removeInRFC="false" toc="include" pn="section-9.4.1">
          <name slugifiedName="name-general-4">General</name>
          <t indent="0" pn="section-9.4.1-1">For purposes of comparison of level capabilities, a particular level of each band is considered to be a lower level than some other level when the value of the level_idc of the particular level of each band is less than that of the other level.</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.4.1-2">
            <li pn="section-9.4.1-2.1">
              <t indent="0" pn="section-9.4.1-2.1.1">The luma sample rate (luma samples per second) <bcp14>MUST</bcp14> be less than or equal to the "Max luma sample rate".</t>
            </li>
            <li pn="section-9.4.1-2.2">
              <t indent="0" pn="section-9.4.1-2.2.1">The coded data rate (bits per second) <bcp14>MUST</bcp14> be less than or equal to the "Max coded data rate".</t>
            </li>
            <li pn="section-9.4.1-2.3">
              <t indent="0" pn="section-9.4.1-2.3.1">The value of tile_width_in_mbs <bcp14>MUST</bcp14> be greater than or equal to 16.</t>
            </li>
            <li pn="section-9.4.1-2.4">
              <t indent="0" pn="section-9.4.1-2.4.1">The value of tile_height_in_mbs <bcp14>MUST</bcp14> be greater than or equal to 8.</t>
            </li>
            <li pn="section-9.4.1-2.5">
              <t indent="0" pn="section-9.4.1-2.5.1">The value of TileCols <bcp14>MUST</bcp14> be less than or equal to 20.</t>
            </li>
            <li pn="section-9.4.1-2.6">
              <t indent="0" pn="section-9.4.1-2.6.1">The value of TileRows <bcp14>MUST</bcp14> be less than or equal to 20.</t>
            </li>
          </ul>
        </section>
        <section anchor="limits-of-levels-and-bands" numbered="true" removeInRFC="false" toc="include" pn="section-9.4.2">
          <name slugifiedName="name-limits-of-levels-and-bands">Limits of Levels and Bands</name>
          <t indent="0" pn="section-9.4.2-1"><xref target="_table-levels" format="default" sectionFormat="of" derivedContent="Table 4"/> specifies the limits for each level of each band.
A level to which a coded frame conforms is indicated by the syntax elements level_idc and band_idc as follows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-9.4.2-2">
            <li pn="section-9.4.2-2.1">
              <t indent="0" pn="section-9.4.2-2.1.1">level_idc <bcp14>MUST</bcp14> be set equal to a value of 30 times the level number specified in <xref target="_table-levels" format="default" sectionFormat="of" derivedContent="Table 4"/>.</t>
            </li>
          </ul>
          <table anchor="_table-levels" align="center" pn="table-4">
            <name slugifiedName="name-general-level-limits">General level limits</name>
            <thead>
              <tr>
                <th align="left" rowspan="3" colspan="1">level</th>
                <th align="center" rowspan="3" colspan="1">Max luma sample rate (samples/s)</th>
                <th align="center" colspan="4" rowspan="1">Max coded data rate (Mbit/s)</th>
              </tr>
              <tr>
                <th align="center" colspan="4" rowspan="1">band_idc==</th>
              </tr>
              <tr>
                <th align="right" colspan="1" rowspan="1">0</th>
                <th align="right" colspan="1" rowspan="1">1</th>
                <th align="right" colspan="1" rowspan="1">2</th>
                <th align="right" colspan="1" rowspan="1">3</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">1</td>
                <td align="right" colspan="1" rowspan="1">3,041,280</td>
                <td align="right" colspan="1" rowspan="1">8</td>
                <td align="right" colspan="1" rowspan="1">11</td>
                <td align="right" colspan="1" rowspan="1">15</td>
                <td align="right" colspan="1" rowspan="1">23</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">1.1</td>
                <td align="right" colspan="1" rowspan="1">6,082,560</td>
                <td align="right" colspan="1" rowspan="1">16</td>
                <td align="right" colspan="1" rowspan="1">21</td>
                <td align="right" colspan="1" rowspan="1">30</td>
                <td align="right" colspan="1" rowspan="1">45</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">2</td>
                <td align="right" colspan="1" rowspan="1">15,667,200</td>
                <td align="right" colspan="1" rowspan="1">39</td>
                <td align="right" colspan="1" rowspan="1">54</td>
                <td align="right" colspan="1" rowspan="1">76</td>
                <td align="right" colspan="1" rowspan="1">114</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">2.1</td>
                <td align="right" colspan="1" rowspan="1">31,334,400</td>
                <td align="right" colspan="1" rowspan="1">78</td>
                <td align="right" colspan="1" rowspan="1">108</td>
                <td align="right" colspan="1" rowspan="1">152</td>
                <td align="right" colspan="1" rowspan="1">227</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">3</td>
                <td align="right" colspan="1" rowspan="1">66,846,720</td>
                <td align="right" colspan="1" rowspan="1">114</td>
                <td align="right" colspan="1" rowspan="1">159</td>
                <td align="right" colspan="1" rowspan="1">222</td>
                <td align="right" colspan="1" rowspan="1">333</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">3.1</td>
                <td align="right" colspan="1" rowspan="1">133,693,440</td>
                <td align="right" colspan="1" rowspan="1">227</td>
                <td align="right" colspan="1" rowspan="1">317</td>
                <td align="right" colspan="1" rowspan="1">444</td>
                <td align="right" colspan="1" rowspan="1">666</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">4</td>
                <td align="right" colspan="1" rowspan="1">265,420,800</td>
                <td align="right" colspan="1" rowspan="1">455</td>
                <td align="right" colspan="1" rowspan="1">637</td>
                <td align="right" colspan="1" rowspan="1">892</td>
                <td align="right" colspan="1" rowspan="1">1,338</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">4.1</td>
                <td align="right" colspan="1" rowspan="1">530,841,600</td>
                <td align="right" colspan="1" rowspan="1">910</td>
                <td align="right" colspan="1" rowspan="1">1,274</td>
                <td align="right" colspan="1" rowspan="1">1,784</td>
                <td align="right" colspan="1" rowspan="1">2,675</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">5</td>
                <td align="right" colspan="1" rowspan="1">1,061,683,200</td>
                <td align="right" colspan="1" rowspan="1">1,820</td>
                <td align="right" colspan="1" rowspan="1">2,548</td>
                <td align="right" colspan="1" rowspan="1">3,567</td>
                <td align="right" colspan="1" rowspan="1">5,350</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">5.1</td>
                <td align="right" colspan="1" rowspan="1">2,123,366,400</td>
                <td align="right" colspan="1" rowspan="1">3,639</td>
                <td align="right" colspan="1" rowspan="1">5,095</td>
                <td align="right" colspan="1" rowspan="1">7,133</td>
                <td align="right" colspan="1" rowspan="1">10,699</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">6</td>
                <td align="right" colspan="1" rowspan="1">4,777,574,400</td>
                <td align="right" colspan="1" rowspan="1">7,278</td>
                <td align="right" colspan="1" rowspan="1">10,189</td>
                <td align="right" colspan="1" rowspan="1">14,265</td>
                <td align="right" colspan="1" rowspan="1">21,397</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">6.1</td>
                <td align="right" colspan="1" rowspan="1">8,493,465,600</td>
                <td align="right" colspan="1" rowspan="1">14,556</td>
                <td align="right" colspan="1" rowspan="1">20,378</td>
                <td align="right" colspan="1" rowspan="1">28,529</td>
                <td align="right" colspan="1" rowspan="1">42,793</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">7</td>
                <td align="right" colspan="1" rowspan="1">16,986,931,200</td>
                <td align="right" colspan="1" rowspan="1">29,111</td>
                <td align="right" colspan="1" rowspan="1">40,756</td>
                <td align="right" colspan="1" rowspan="1">57,058</td>
                <td align="right" colspan="1" rowspan="1">85,586</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">7.1</td>
                <td align="right" colspan="1" rowspan="1">33,973,862,400</td>
                <td align="right" colspan="1" rowspan="1">58,222</td>
                <td align="right" colspan="1" rowspan="1">81,511</td>
                <td align="right" colspan="1" rowspan="1">114,115</td>
                <td align="right" colspan="1" rowspan="1">171,172</td>
              </tr>
            </tbody>
          </table>
          <t indent="0" pn="section-9.4.2-4"><xref target="_table-level_ex" format="default" sectionFormat="of" derivedContent="Table 5"/> shows widely used typical configurations of resolution and frame rates of video and corresponding levels for them.</t>
          <table anchor="_table-level_ex" align="center" pn="table-5">
            <name slugifiedName="name-example-of-typical-video-co">Example of typical video configurations and corresponding levels (informative)</name>
            <thead>
              <tr>
                <th align="center" colspan="1" rowspan="1">use case</th>
                <th align="center" colspan="1" rowspan="1">resolution</th>
                <th align="right" colspan="1" rowspan="1">frame per second</th>
                <th align="right" colspan="1" rowspan="1">luma sample per second</th>
                <th align="left" colspan="1" rowspan="1">level</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center" colspan="1" rowspan="1">720p</td>
                <td align="center" colspan="1" rowspan="1">1280 x 720</td>
                <td align="right" colspan="1" rowspan="1">30</td>
                <td align="right" colspan="1" rowspan="1">27,648,000</td>
                <td align="left" colspan="1" rowspan="1">2.1</td>
              </tr>
              <tr>
                <td align="center" colspan="1" rowspan="1">FHD</td>
                <td align="center" colspan="1" rowspan="1">1920 x 1080</td>
                <td align="right" colspan="1" rowspan="1">30</td>
                <td align="right" colspan="1" rowspan="1">62,208,000</td>
                <td align="left" colspan="1" rowspan="1">3</td>
              </tr>
              <tr>
                <td align="center" colspan="1" rowspan="1">UHD 4K</td>
                <td align="center" colspan="1" rowspan="1">3840 x 2160</td>
                <td align="right" colspan="1" rowspan="1">60</td>
                <td align="right" colspan="1" rowspan="1">497,664,000</td>
                <td align="left" colspan="1" rowspan="1">4.1</td>
              </tr>
              <tr>
                <td align="center" colspan="1" rowspan="1">UHD 4K</td>
                <td align="center" colspan="1" rowspan="1">3840 x 2160</td>
                <td align="right" colspan="1" rowspan="1">120</td>
                <td align="right" colspan="1" rowspan="1">995,328,000</td>
                <td align="left" colspan="1" rowspan="1">5</td>
              </tr>
              <tr>
                <td align="center" colspan="1" rowspan="1">UHD 8K</td>
                <td align="center" colspan="1" rowspan="1">7680 x 4320</td>
                <td align="right" colspan="1" rowspan="1">60</td>
                <td align="right" colspan="1" rowspan="1">1,990,656,000</td>
                <td align="left" colspan="1" rowspan="1">5.1</td>
              </tr>
              <tr>
                <td align="center" colspan="1" rowspan="1">UHD 8K</td>
                <td align="center" colspan="1" rowspan="1">7680 x 4320</td>
                <td align="right" colspan="1" rowspan="1">120</td>
                <td align="right" colspan="1" rowspan="1">3,981,312,000</td>
                <td align="left" colspan="1" rowspan="1">6</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-10">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-10-1">Like any other audio or video codec, APV should not be used with insecure ciphers or cipher modes that are vulnerable to known    plaintext attacks.  Some of the header bits as well as the padding are easily predictable.</t>
      <t indent="0" pn="section-10-2">A decoder <bcp14>MUST</bcp14> be robust against any non-compliant or malicious payloads. Malicious payloads <bcp14>MUST NOT</bcp14> cause the decoder to overrun its allocated memory or to take an excessive amount of resources to decode. An overrun in allocated memory could lead to arbitrary code execution by an attacker. The same applies to the encoder, even though problems in encoders are typically rare.  Malicious video streams <bcp14>MUST NOT</bcp14> cause the encoder to misbehave because this would allow an attacker to attack transcoding gateways.  A frequent security problem in image and video codecs is failure to check for integer overflows.  An example is allocating "frame_width * frame_height" in pixel count computations without considering that the multiplication result may have overflowed the range of the arithmetic type. The implementation <bcp14>MUST</bcp14> ensure that any data outside of allocated and initialized memory cannot be read.</t>
      <t indent="0" pn="section-10-3">A decoder <bcp14>MUST NOT</bcp14> try to process the metadata whose type is not recognized by the implementation. Failure to process any metadata exactly according to the syntax structure specified <bcp14>MAY</bcp14> put a decoder in an unknown status.</t>
      <t indent="0" pn="section-10-4">None of the content carried in APV is intended to be executable.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-11">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-11-1">This document has no actions for IANA.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references" pn="section-12">
      <name slugifiedName="name-references">References</name>
      <references anchor="sec-normative-references" pn="section-12.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="CIE15" target="https://cie.co.at/publications/colorimetry-4th-edition" quoteTitle="true" derivedAnchor="CIE15">
          <front>
            <title>Colorimetry, 4th Edition</title>
            <author>
              <organization showOnFrontPage="true">CIE</organization>
            </author>
            <date year="2018"/>
          </front>
          <seriesInfo name="DOI" value="10.25039/TR.015.2018"/>
        </reference>
        <reference anchor="CTA-861.3" quoteTitle="true" derivedAnchor="CTA-861.3">
          <front>
            <title>HDR Static Metadata Extensions</title>
            <author>
              <organization showOnFrontPage="true">CTA</organization>
            </author>
            <date year="2019" month="September"/>
          </front>
          <refcontent>CTA-861.3-A</refcontent>
        </reference>
        <reference anchor="H273" target="https://www.itu.int/rec/T-REC-H.273" quoteTitle="true" derivedAnchor="H273">
          <front>
            <title>Coding-independent code points for video signal type identification</title>
            <author>
              <organization showOnFrontPage="true">ITU-T</organization>
            </author>
            <date year="2024" month="July"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="H.273"/>
          <seriesInfo name="ISO/IEC" value="23091-2:2025"/>
        </reference>
        <reference anchor="ISO11664-1" target="https://www.iso.org/standard/74164.html" quoteTitle="true" derivedAnchor="ISO11664-1">
          <front>
            <title>Colorimetry - Part 1: CIE standard colorimetric observers</title>
            <author>
              <organization showOnFrontPage="true">ISO</organization>
            </author>
            <date year="2019"/>
          </front>
          <seriesInfo name="ISO/CIE" value="11664-1:2019"/>
        </reference>
        <reference anchor="ISO9899" target="https://www.iso.org/standard/82075.html" quoteTitle="true" derivedAnchor="ISO9899">
          <front>
            <title>Information technology - Programming languages - C</title>
            <author>
              <organization showOnFrontPage="true">ISO/IEC</organization>
            </author>
            <date year="2024"/>
          </front>
          <seriesInfo name="ISO/IEC" value="9899:2024"/>
        </reference>
        <reference anchor="ITUT-T35" target="https://www.itu.int/rec/T-REC-T.35" quoteTitle="true" derivedAnchor="ITUT-T35">
          <front>
            <title>Procedure for the allocation of ITU-T defined codes for non-standard facilities</title>
            <author>
              <organization showOnFrontPage="true">ITU-T</organization>
            </author>
            <date year="2000" month="February"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="T.35"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t indent="0">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC9562" target="https://www.rfc-editor.org/info/rfc9562" quoteTitle="true" derivedAnchor="RFC9562">
          <front>
            <title>Universally Unique IDentifiers (UUIDs)</title>
            <author fullname="K. Davis" initials="K." surname="Davis"/>
            <author fullname="B. Peabody" initials="B." surname="Peabody"/>
            <author fullname="P. Leach" initials="P." surname="Leach"/>
            <date month="May" year="2024"/>
            <abstract>
              <t indent="0">This specification defines UUIDs (Universally Unique IDentifiers) --
also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform
Resource Name namespace for UUIDs. A UUID is 128 bits long and is
intended to guarantee uniqueness across space and time. UUIDs were
originally used in the Apollo Network Computing System (NCS), later
in the Open Software Foundation's (OSF's) Distributed Computing
Environment (DCE), and then in Microsoft Windows platforms.</t>
              <t indent="0">This specification is derived from the OSF DCE specification with the
kind permission of the OSF (now known as "The Open Group"). Information from earlier versions of the OSF DCE specification have
been incorporated into this document. This document obsoletes RFC
4122.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9562"/>
          <seriesInfo name="DOI" value="10.17487/RFC9562"/>
        </reference>
      </references>
      <references anchor="sec-informative-references" pn="section-12.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="AMPAS" target="https://www.oscars.org/" quoteTitle="true" derivedAnchor="AMPAS">
          <front>
            <title>Academy of Motion Picture Arts and Sciences</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="AOSP16APV" target="https://developer.android.com/about/versions/16/features#apv" quoteTitle="true" derivedAnchor="AOSP16APV">
          <front>
            <title>Android open source project version 16</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="ASWF" target="https://www.aswf.io/" quoteTitle="true" derivedAnchor="ASWF">
          <front>
            <title>The Academy Software Foundation</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="FFmpegAPVdec" target="https://ffmpeg.org/download.html#release_8.0" quoteTitle="true" derivedAnchor="FFmpegAPVdec">
          <front>
            <title>FFmpeg implementation of APV decoder</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
            <date day="20" month="November" year="2025"/>
          </front>
        </reference>
        <reference anchor="FFmpegAPVenc" target="https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/fab691edaf53bbf10429ef3448f1f274e5078395" quoteTitle="true" derivedAnchor="FFmpegAPVenc">
          <front>
            <title>FFmpeg implementation of APV encoder</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
            <date day="4" month="May" year="2025"/>
          </front>
        </reference>
        <reference anchor="OpenAPV" target="https://github.com/AcademySoftwareFoundation/openapv" quoteTitle="true" derivedAnchor="OpenAPV">
          <front>
            <title>OpenAPV</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
            <date day="16" month="12" year="2025"/>
          </front>
          <refcontent>commit 1a7845a</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="appendix-rawbitstream" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-raw-bitstream-format">Raw Bitstream Format</name>
      <figure anchor="syntax-rawbitstream" align="left" suppress-title="false" pn="figure-34">
        <name slugifiedName="name-raw_bitstream_access_unit-s">raw_bitstream_access_unit() syntax code</name>
        <artwork align="left" pn="section-appendix.a-1.1">
syntax code                                                   | type
--------------------------------------------------------------|-----
raw_bitstream_access_unit(){                                  |
    au_size                                                   | u(32)
    access_unit(au_size)                                      |
}                                                             |</artwork>
      </figure>
      <dl spacing="normal" newline="true" indent="3" pn="section-appendix.a-2">
        <dt pn="section-appendix.a-2.1">au_size</dt>
        <dd pn="section-appendix.a-2.2">indicates the size of access unit in bytes. 0 is prohibited and 0xFFFFFFFF is reserved.</dd>
      </dl>
    </section>
    <section anchor="apv-implementations" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-apv-implementations">APV Implementations</name>
      <section anchor="openapv-open-source-project" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.1">
        <name slugifiedName="name-openapv-open-source-project">OpenAPV Open Source Project</name>
        <t indent="0" pn="section-appendix.b.1-1">The Academy Software Foundation (ASWF) <xref target="ASWF" format="default" sectionFormat="of" derivedContent="ASWF"/>, jointly founded  by the Academy of Motion Picture Arts and Science (AMPAS) <xref target="AMPAS" format="default" sectionFormat="of" derivedContent="AMPAS"/> and the Linux Foundation, has created an open source software development project conformant to this document <xref target="OpenAPV" format="default" sectionFormat="of" derivedContent="OpenAPV"/>. The project also provides various test vectors for verification of the implementations at <eref brackets="angle" target="https://github.com/AcademySoftwareFoundation/openapv/tree/main/test/bitstream"/>.</t>
      </section>
      <section anchor="android-open-source-project" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.2">
        <name slugifiedName="name-android-open-source-project">Android Open Source Project</name>
        <t indent="0" pn="section-appendix.b.2-1">The Android open source project (AOSP) has implemented Advanced Professional Video (APV) conformant to this document <xref target="AOSP16APV" format="default" sectionFormat="of" derivedContent="AOSP16APV"/>.</t>
      </section>
      <section anchor="ffmpeg-open-source-project" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.3">
        <name slugifiedName="name-ffmpeg-open-source-project">FFmpeg Open Source Project</name>
        <t indent="0" pn="section-appendix.b.3-1">The FFmpeg project is developing an APV decoder <xref target="FFmpegAPVdec" format="default" sectionFormat="of" derivedContent="FFmpegAPVdec"/> and an APV encoder <xref target="FFmpegAPVenc" format="default" sectionFormat="of" derivedContent="FFmpegAPVenc"/> conformant to this document.</t>
      </section>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="Y." surname="Lim" fullname="Youngkwon Lim">
        <organization showOnFrontPage="true">Samsung Electronics</organization>
        <address>
          <postal>
            <street>6105 Tennyson Pkwy, Ste 300</street>
            <city>Plano</city>
            <region>TX</region>
            <code>75024</code>
            <country>United States of America</country>
          </postal>
          <email>yklwhite@gmail.com</email>
        </address>
      </author>
      <author initials="M." surname="Park" fullname="Minwoo Park">
        <organization showOnFrontPage="true">Samsung Electronics</organization>
        <address>
          <postal>
            <street>34, Seongchon-gil, Seocho-gu</street>
            <city>Seoul</city>
            <code>3573</code>
            <country>Republic of Korea</country>
          </postal>
          <email>m.w.park@samsung.com</email>
        </address>
      </author>
      <author initials="M." surname="Budagavi" fullname="Madhukar Budagavi">
        <organization showOnFrontPage="true">Samsung Electronics</organization>
        <address>
          <postal>
            <street>6105 Tennyson Pkwy, Ste 300</street>
            <city>Plano</city>
            <region>TX</region>
            <code>75024</code>
            <country>United States of America</country>
          </postal>
          <email>m.budagavi@samsung.com</email>
        </address>
      </author>
      <author initials="R." surname="Joshi" fullname="Rajan Joshi">
        <organization showOnFrontPage="true">Samsung Electronics</organization>
        <address>
          <postal>
            <street>11488 Tree Hollow Ln</street>
            <city>San Diego</city>
            <region>CA</region>
            <code>92128</code>
            <country>United States of America</country>
          </postal>
          <email>rajan_joshi@ieee.org</email>
        </address>
      </author>
      <author initials="K." surname="Choi" fullname="Kwang Pyo Choi">
        <organization showOnFrontPage="true">Samsung Electronics</organization>
        <address>
          <postal>
            <street>34 Seongchon-gil Seocho-gu</street>
            <city>Seoul</city>
            <code>3573</code>
            <country>Republic of Korea</country>
          </postal>
          <email>kwangpyo.choi@gmail.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
