d3d11: Add support for GRAY and more YUV formats
authorSeungha Yang <seungha@centricular.com>
Mon, 21 Jun 2021 08:13:33 +0000 (17:13 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 23 Jun 2021 15:35:36 +0000 (15:35 +0000)
commit7c94b9c4b0d70366bd016f4d2e22f06e576323cd
tree5963b3c10dbc51935036ccd0c2214e614918df21
parent52a0c3659859f3f7896620042ba49bf2274a072a
d3d11: Add support for GRAY and more YUV formats

By this commit, following formats will be newly supported by d3d11 elements

* Y444_{8, 12, 16}LE formats:
  Similar to other planar formats. Such Y444 variants are not supported
  by Direct3D11 natively, but we can simply map each plane by
  using R8 and/or R16 texture.
* P012_LE:
  It is not different from P016_LE, but defining P012 and P016 separately
  for more explicit signalling. Note that DXVA uses P016 texture
  for 12bits encoded bitstreams.
* GRAY:
  This format is required for some codecs (e.g., AV1) if monochrome
  is supported
* 4:2:0 planar 12bits (I420_12LE) and 4:2:2 planar 8, 10, 12bits
  formats (Y42B, I422_10LE, and I422_12LE)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2346>
gst-libs/gst/d3d11/gstd3d11device.cpp
gst-libs/gst/d3d11/gstd3d11format.h
sys/d3d11/gstd3d11converter.cpp
sys/d3d11/gstd3d11deinterlace.cpp
tests/check/elements/d3d11colorconvert.c