video-chroma: Add support for any combination of chroma-site flags
authorSeungha Yang <seungha@centricular.com>
Tue, 10 Nov 2020 09:01:12 +0000 (18:01 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 8 Dec 2020 07:21:28 +0000 (07:21 +0000)
commit410efd196a00fafe6997f98abcd6c656d5ac0e4c
tree6325c390f66e1871ab87c78c3aa8d723caede718
parent6434db5298156ec41ddc21f18c8d57a02a9ce1c1
video-chroma: Add support for any combination of chroma-site flags

We've been allowing only a few known chroma-site values such as
jpeg (not co-sited), mpeg2 (horizontally co-sited) and
dv (co-sited on alternate lines). That's insufficient for
representing all possible chroma-site values. By this commit,
we can represent any combination of chroma-site flags.
But, an exception here is that any combination with
GST_VIDEO_CHROMA_SITE_NONE will be considered as invalid value.

For any combination of chroma-site flags,
gst_video_chroma_to_string() method is deprecated in order to
return newly allocated string via a new gst_video_chroma_site_to_string()
method. And for consistent API naming, gst_video_chroma_from_string()
is also deprecated. Newly written code should use
gst_video_chroma_site_from_string() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/927>
gst-libs/gst/video/video-chroma.c
gst-libs/gst/video/video-chroma.h
tests/check/libs/video.c