libs: decoder: vp9: support 422/444 8bit/10bit chroma type.
authorWangfei <fei.w.wang@intel.com>
Tue, 7 May 2019 03:03:51 +0000 (11:03 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 8 May 2019 10:08:55 +0000 (10:08 +0000)
commita4e2db4c0bd1a81047c657e458cdbbf8cd2d6cd2
tree27a8327c828b67ac216b2163de32afc9337fa829
parentd38f0bbb1d9437acc9e751f1926edd870309796d
libs: decoder: vp9: support 422/444 8bit/10bit chroma type.

According to the vp9 sepc, profile 1/3 support 422/440/444 chroma
type, so we need to add subsampling_x&subsampling_y to fix it.

Here is the relationship between chroma type and profile and
subsampling_x&subsampling_y according to vp9 spec:
------------------------------------------
Profile | Bit depth | Chroma subsampling |
------------------------------------------
 0      | 8         | 420                |
------------------------------------------
 1      | 8         | 422,440,444        |
------------------------------------------
 2      | 10, 12    | 420                |
------------------------------------------
 3      | 10, 12    | 422,440,444        |
------------------------------------------

-----------------------------------------------
Subsampling_x | Subsampling_y | Chroma format |
-----------------------------------------------
 0            | 0             | 444           |
-----------------------------------------------
 0            | 1             | 440           |
-----------------------------------------------
 1            | 0             | 422           |
-----------------------------------------------
 1            | 1             | 420           |
-----------------------------------------------
gst-libs/gst/vaapi/gstvaapidecoder_vp9.c