From 94e3a1af2af0e06a1c1363d4f9d04243fbd6dcd2 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Thu, 15 Nov 2018 11:28:11 +0200 Subject: [PATCH] video-format: Move Y210 format declaration to avoid ABI break The Y210 format was added in the middle of the formats enum and list, introducing an ABI break. This issue was detected thanks to the gstreamer-rs test harness. --- gst-libs/gst/video/video-format.c | 4 ++-- gst-libs/gst/video/video-format.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c index a0fe6f56e1..7b578a5e53 100644 --- a/gst-libs/gst/video/video-format.c +++ b/gst-libs/gst/video/video-format.c @@ -5328,8 +5328,6 @@ static const VideoFormat formats[] = { DPTH10_10_10, PSTR0, PLANE0, OFFS0, SUB422, PACK_v210), MAKE_YUV_FORMAT (v216, "raw video", GST_MAKE_FOURCC ('v', '2', '1', '6'), DPTH16_16_16, PSTR488, PLANE0, OFFS204, SUB422, PACK_v216), - MAKE_YUV_FORMAT (Y210, "raw video", GST_MAKE_FOURCC ('Y', '2', '1', '0'), - DPTH10_10_10, PSTR488, PLANE0, OFFS0, SUB422, PACK_Y210), MAKE_YUV_FORMAT (NV12, "raw video", GST_MAKE_FOURCC ('N', 'V', '1', '2'), DPTH888, PSTR122, PLANE011, OFFS001, SUB420, PACK_NV12), MAKE_YUV_FORMAT (NV21, "raw video", GST_MAKE_FOURCC ('N', 'V', '2', '1'), @@ -5476,6 +5474,8 @@ static const VideoFormat formats[] = { MAKE_YUV_C_LE_FORMAT (NV12_10LE40, "raw video", GST_MAKE_FOURCC ('R', 'K', '2', '0'), DPTH10_10_10, PSTR0, PLANE011, OFFS0, SUB420, PACK_NV12_10LE40), + MAKE_YUV_FORMAT (Y210, "raw video", GST_MAKE_FOURCC ('Y', '2', '1', '0'), + DPTH10_10_10, PSTR488, PLANE0, OFFS0, SUB422, PACK_Y210), }; static GstVideoFormat diff --git a/gst-libs/gst/video/video-format.h b/gst-libs/gst/video/video-format.h index df116cf5de..1212fcb5fc 100644 --- a/gst-libs/gst/video/video-format.h +++ b/gst-libs/gst/video/video-format.h @@ -114,6 +114,7 @@ G_BEGIN_DECLS * @GST_VIDEO_FORMAT_Y444_12BE: planar 4:4:4 YUV, 12 bits per channel (Since: 1.12) * @GST_VIDEO_FORMAT_Y444_12LE: planar 4:4:4 YUV, 12 bits per channel (Since: 1.12) * @GST_VIDEO_FORMAT_NV12_10LE40: Fully packed variant of NV12_10LE32 (Since: 1.16) + * @GST_VIDEO_FORMAT_Y210: packed 4:2:2 YUV, 10 bits per channel (Since: 1.16) * * Enum value describing the most common video formats. */ @@ -141,7 +142,6 @@ typedef enum { GST_VIDEO_FORMAT_Y444, GST_VIDEO_FORMAT_v210, GST_VIDEO_FORMAT_v216, - GST_VIDEO_FORMAT_Y210, GST_VIDEO_FORMAT_NV12, GST_VIDEO_FORMAT_NV21, GST_VIDEO_FORMAT_GRAY8, @@ -201,6 +201,7 @@ typedef enum { GST_VIDEO_FORMAT_NV12_10LE32, GST_VIDEO_FORMAT_NV16_10LE32, GST_VIDEO_FORMAT_NV12_10LE40, + GST_VIDEO_FORMAT_Y210, } GstVideoFormat; #define GST_VIDEO_MAX_PLANES 4