Chapter 4: Overview of Compressed Data Format / 4章 圧縮データフォーマットの概要

The input to a VP8 decoder is a sequence of compressed frames whose order matches their order in time. Issues such as the duration of frames, the corresponding audio, and synchronization are generally provided by the playback environment and are irrelevant to the decoding process itself, however, to aid in fast seekinga start code is included in the header of each key frame.

VP8復号器への入力は圧縮フレームのシーケンスであり,その順序は時系列と一致している.フレーム群の継続時間,対応する音声,そして同期といった問題は一般的に再生環境によって提供され,復号処理それ自体には無関係である.とはいえ,高速な開始符号の探索を支援することはそれぞれのキーフレームのヘッダに含まれる.

The decoder is simply presented with a sequence of compressed frames and produces a sequence of decompressed (reconstructed) YUV frames corresponding to the input sequence. As stated in the introduction, the exact pixel values in the reconstructed frame are part of VP8’s specification. This document specifies the layout of the compressed frames and gives unambiguous algorithms for the correct production of reconstructed frames.

復号器は単に圧縮フレームのシーケンスが提供され,入力シーケンスに対応する復号(再構成)YUVフレームのシーケンスを生成する.はじめにで言明されたように,再構成フレームの正確な画素値はVP8定義の一部である.本稿は圧縮フレームのレイアウトと,再構成フレームの正確な生成のための一意なアルゴリズムを与える.

The first frame presented to the decompressor is of course a key frame. This may be followed by any number of interframes; the correct reconstruction of each frame depends on all prior frames up to the key frame. The next key frame restarts this process: The decompressor resets to its default initial condition upon reception of a key frame and the decoding of a key frame (and its ensuing interframes) is completely independent of any prior decoding.

 復号器に提供される最初のフレームはもちろんキーフレームである.任意の数のインターフレームが後続にあっても良い.それぞれのフレームの正確な再構成はキーフレームまでの全ての先行フレームに依存している.次のキーフレームはこの処理が再スタートする.復号器はキーフレーム受信のときに状態を初期規定値へと戻し,キーフレームの復号(そしてその後のインターフレームも含む)は先行復号とは完全に独立している.

At the highest level, every compressed frame has three or more pieces. It begins with an uncompressed data chunk comprising 10 bytes in the case of key frames and 3-bytes for inter frames. This is followed by two or more blocks of compressed data (called partitions). These compressed data partitions begin and end on byte boundaries.

 最高レベルにおいて,全て圧縮フレームは3個以上の部品を有している.キーフレームの場合には10バイト,インターフレームの場合は3バイトの非圧縮データチャンクから始まる.このあと二個以上の圧縮データ(区画と呼ばれる)が続く.これらの圧縮データパーティションはバイト境界で始まり,終わる.

The first compressed partition has two subsections:

 最初の圧縮区画は二つの小領域を持っている.

1. Header information that applies to the frame as a whole.

1. ヘッダ情報:フレーム全体に適用される

2. Per-macroblock information specifying how each macroblock is predicted from the already reconstructed data that is available to the decompressor.

2. マクロブロック用情報:すでに再構成されて復号器で利用可能なデータから,それぞれのマクロブロックがどのように予測されるかを特定する

As stated above, the macroblock-level information occurs in raster-scan order.

 上記で言明したように,マクロブロックレベル情報はラスタスキャン順に発生する.

The rest of the partitions contain, for each block, the DCT/WHT coefficients (quantized and logically compressed) of the residue signal to be added to the predicted block values. It typically accounts for roughly 70% of the overall datarate. VP8 supports packing the compressed DCT/WHT coefficients’ data from macroblock rows into separate partitions. If there is more than one partition for these coefficients, the sizes of the partitions ― except the last partition ― in bytes are also present in the bitstream right after the above first partition. Each of the sizes is a 3-byte data item written in little endian format. These sizes provide the decoder direct access to all DCT/WHT coefficient partitions, which enables parallel processing of the coefficients in a decoder.

 それぞれのブロックにおいて,区画に含まれる残りは予測ブロック値に加算される符号付き差分値のDCT/WHT係数である.典型的にこれらの情報はビットレートのおおよそ70%に対応する.VP8はマクロブロック行から生じる圧縮DCT/WHT係数データを分割区分にまとめることをサポートしている.これらの係数に一つ以上の区分が存在すると,区分群の大きさ(ただし最後の区分を除いて)のバイト数が最初の区分のまさに後ろに配置される.それぞれのサイズはリトルエンディアン形式の3バイトで書かれる.これらのサイズは復号器が全てのDCT/WHT係数区分へ直接アクセスできるようようにし,復号において係数の並列処理を可能とする.

The separate partitioning of the prediction data and coefficient data also allows flexibility in the implementation of a decompressor: An implementation may decode and store the prediction information for the whole frame and then decode, transform, and add the residue signal to the entire frame, or it may simultaneously decode both partitions, calculating prediction information and adding in the residue signal for each block in order. The length field in the frame tag, which allows decoding of the second partition to begin before the first partition has been completely decoded, is necessary for the second “block-at-a-time” decoder implementation.

 予測データと係数データの分割区分もまた復号器の実装に柔軟性を与える.ある実装はフレーム全体のための予測情報を復号,蓄積してから復号,変換,画像全体に差分信号を加算するかもしれないし,両方の区分を同時に復号し,予測情報を計算し,それぞれのブロックに順番に差分を加算するかもしれない.フレームタグに含まれる長さフィールドは,最初の区分が完全に復号される前に2番目の区分を復号することを可能にするが,二つめのブロック復号実装を必要とする.

All partitions are decoded using separate instances of the boolean entropy decoder described in Chapter 7. Although some of the data represented within the partitions is conceptually “flat” (a bit is just a bit with no probabilistic expectation one way or the other), because of the way such coders work, there is never a direct correspondence between a “conceptual bit” and an actual physical bit in the compressed data partitions. Only in the 3 or 10 byte uncompressed chunk described above is there such a physical correspondence.

 全ての区分は7章で詳述される2値エントロピー復号器の異なる実態を使って復号される.区分の中のいくつかのデータはすでに概念的に平坦(ビットはある方法による確率的な予測も他の手法もされていない素のビット)である.符号化器の動作に起因しているため,圧縮データ区分の中の概念的なビットと実際の物理ビットとの間にはなんら直接的な対応は存在しない.上記のような3または10バイトの非圧縮チャンクのみ,物理的な対応が存在する.

A related matter, which is true for most lossless compression formats, is that seeking within a partition is not supported. The data must be decompressed and processed (or at least stored) in the order in which it occurs in the partition.

 関連事項として,たいていの無歪み圧縮フォーマットで真実であるが,区分内での探索はサポートしていないことがある.区分内で発生する順序で圧縮され,処理されなければならない.

While this document specifies the ordering of the partition data correctly, the details and semantics of this data are discussed in a more logical fashion to facilitate comprehension. For example, the frame header contains updates to many probability tables used in decoding per-macroblock data. The latter is often described before the layouts of the probabilities and their updates, even though this is the opposite of their order in the bitstream.

 本稿は区分データの順序を正しく定義したが,理解を促進するためにより論理的な趣向でこのデータの詳細と意味は検討される.例えば,フレームヘッダはマクロブロック毎のデータの復号で使われる大量の確率表の更新情報を含んでいる.ビットストリームの順序が逆であったとしても,確率とその更新の配置図の前に後者はしばしば記述される.