CQMはカスタム量子化マトリクス(Custom Quantisation Matrix)。
量子化マトリクスは格子状にならんだ数字(*数学で言う行列*)で、個々の数字をquantum(*量子/量子化マトリクスの値*)として扱う。この個々
の数字が元の映像データをどのくらい破棄するかを決める。個々の数字が大きなマトリクスは映像がソフトになり、小さなマトリクスは映像のディテイル保持率
があがる。x264のデフォルトは "flat 16"
マトリクスを使う。これは全ての数字が16で埋まっているもので、デコードの際に特別な扱いが不要なものだ(*Main
Profile以下*)。カスタム量子化マトリクスはHigh
Profileの機能で、実際にはデコード負荷は増えも減りもしないのだが、デコーダ側のサポートが必要となる。XviDのカスタム量子化マトリクスを覚
えている人もあるだろう。大半のケースでデフォルトのH.263量子化で充分だったが[*1]、x264でもflat
16で充分な場合が多いと思われる。しかし中には高周波領域に高い係数が入ったマトリクスを使いたい事があるかもしれない。細かいディテイルがややスムー
スになり圧縮しやすくなる(*ノイズなどの細かい部分を潰せる*)。
--cqmはデフォルトのflatマトリクスか、jvtマトリクスの選択。
flatマトリクスは数字が全て16で埋まっているもので、jvtマトリクスはH.264規格の技術的な作業に当ったJoint Video
Teamが作ったものだ。このコマンドは外部ファイルを用意する必要が無いので使い易い。
*手許ではXviDのMPEG量子化マトリクスはブロックノイズが激減した記憶がある。
CQM is the abbreviation for Custom Quantisation Matrix (or Matrices). A quantisation matrix is made up from a grid of numbers and each one is referred to as a quantum. It is these numbers that define how image data is discarded. A grid with large quantums will produce a softer image, and a grid with lower quantums will retain more detail. x264 by default uses a "flat 16" matrix, which is simply a matrix with all quantums set at 16 and does not require any special decoding. In contrast to this, custom quantisation matrices are a high profile feature and require special decoding support, though the actual decoding of them should require no more or no less resources. You might remember custom matrices from XviD, for most cases the default H.263 quantisation type worked fine, and in the case of x264, flat 16 is probably fine most of the time. In some cases you might want to use a matrix with a lot of high quantums in the high frequency co-efficient areas so that fine details become smoothed slightly and easier to compress.
There are numerous ways to define what CQM you want to use, here are the options available:
--cqm <string> (Presets=jvt, flat)This allows you to select the flat matrix (which is default) or the included JVT matrix (the matrix produced by the Joint Video Team, who is a joint partner in H.264). This is fairly simple to use and the matrices are included in the x264 executable so no external files are required.
■まるも製作所
・2007/06/22(金) H.264 での量子化処理とか量子化行列とか:http://www.marumo.ne.jp/db2007_6.htm#22
■覚書(なるPさん)http://www.geocities.jp/encmemo5whf6jvag8/index2.html#06-02
・cqm アナライズさせるのに使うマトリクスの指定。
x264内には、flatとjvtの2つのプリセットが入っている。
default値は、flatで全部16で埋まってるマトリクスを使っている。