AV1 specification を読む 2018-04-17 (7.10.2.1. Rounding Variables Derivation Process)


AV1 specification 日本語訳 (2018-04-17)

2018-04-17

この節では、演算途中での丸めをする桁の位置を計算しています。
内部演算精度16ビットを超えないよう、ビット深度に依存して桁を調整しています。


7.10.2.1. Rounding Variables Derivation Process

The input to this process is a variable isCompound.

この処理の入力は isCompound です。

The rounding variables InterRound0, InterRound1, and InterPostRound are derived as follows:

  • InterRound0 (representing the amount to round by after horizontal filtering) is set equal to 3.
  • InterRound1 (representing the amount to round by after vertical filtering) is set equal to ( isCompound ? 7 : 11).
  • If BitDepth is equal to 12, InterRound0 is set equal to InterRound0 + 2.
  • If BitDepth is equal to 12 and isCompound is equal to 0, InterRound1 is set equal to InterRound1 - 2.
  • InterPostRound (representing the amount to round by at the end of the prediction process) is set equal to 2 * FILTER_BITS - ( InterRound0 + InterRound1 ).

丸め変数 InterRound0, InterRound1, InterPostRound を以下のように求めます。

  • InterRound0=3 (水平フィルタ後の丸め量)
  • InterRound1=( isCompound ? 7 : 11) (垂直フィルタ後の丸め量)
  • BitDepth==12 ならば、InterRound0 = InterRound0 + 2
  • BitDepth==12 && isCompound==0 ならば、InterRound1 = InterRound1 - 2
  • InterPostRound=2 * FILTER_BITS - ( InterRound0 + InterRound1 ) (インター予測終了時の丸め量)

Note: The rounding is chosen to ensure that the output of the horizontal filter always fits within 16 bits.

注意:
水平フィルタ出力が16ビット以内に収まるよう、丸め量が選択されています。