From d899e6df5ac162709f8d2cf53c23d0fa8ce3f09f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 3 Jan 2014 22:36:13 +0100 Subject: [PATCH] video: rename NV12T -> NV12_64Z32 Is a bit more descriptive and allows us to add more tiled types later. https://bugzilla.gnome.org/show_bug.cgi?id=707361 --- docs/design/part-mediatype-video-raw.txt | 2 +- gst-libs/gst/video/video-format.c | 10 +++++----- gst-libs/gst/video/video-format.h | 6 +++--- gst-libs/gst/video/video-info.c | 2 +- tests/check/elements/videoscale.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/design/part-mediatype-video-raw.txt b/docs/design/part-mediatype-video-raw.txt index c66a075c7b..99771e96ff 100644 --- a/docs/design/part-mediatype-video-raw.txt +++ b/docs/design/part-mediatype-video-raw.txt @@ -1200,7 +1200,7 @@ Formats "NV24" planar 4:4:4 YUV with interleaved UV plane - "NV12T" planar 4:2:0 YUV with interleaved UV plane in 64x32 tiles zigzag + "NV12_64Z32" planar 4:2:0 YUV with interleaved UV plane in 64x32 tiles zigzag Component 0: Y depth: 8 diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c index 97070a927a..2e2317d42c 100644 --- a/gst-libs/gst/video/video-format.c +++ b/gst-libs/gst/video/video-format.c @@ -2110,9 +2110,9 @@ get_tile_NV12 (gint tile_width, gint ts, gint tx, tile_stride[0] = tile_stride[1] = tile_width; } -#define PACK_NV12T GST_VIDEO_FORMAT_AYUV, unpack_NV12T, 1, pack_NV12T +#define PACK_NV12_64Z32 GST_VIDEO_FORMAT_AYUV, unpack_NV12_64Z32, 1, pack_NV12_64Z32 static void -unpack_NV12T (const GstVideoFormatInfo * info, GstVideoPackFlags flags, +unpack_NV12_64Z32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags, gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES], const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width) { @@ -2171,7 +2171,7 @@ unpack_NV12T (const GstVideoFormatInfo * info, GstVideoPackFlags flags, } static void -pack_NV12T (const GstVideoFormatInfo * info, GstVideoPackFlags flags, +pack_NV12_64Z32 (const GstVideoFormatInfo * info, GstVideoPackFlags flags, const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES], const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site, gint y, gint width) @@ -2472,9 +2472,9 @@ static VideoFormat formats[] = { DPTH888, PSTR111, PLANE011, OFFS001, SUB422, PACK_NV16), MAKE_YUV_FORMAT (NV24, "raw video", GST_MAKE_FOURCC ('N', 'V', '2', '4'), DPTH888, PSTR111, PLANE011, OFFS001, SUB444, PACK_NV24), - MAKE_YUV_T_FORMAT (NV12T, "raw video", + MAKE_YUV_T_FORMAT (NV12_64Z32, "raw video", GST_MAKE_FOURCC ('T', 'M', '1', '2'), DPTH8880, PSTR122T (ZFLIPZ_2X2), - PLANE0110, OFFS001, SUB420T64x32, PACK_NV12T), + PLANE0110, OFFS001, SUB420T64x32, PACK_NV12_64Z32), }; static GstVideoFormat diff --git a/gst-libs/gst/video/video-format.h b/gst-libs/gst/video/video-format.h index a9cf0775a2..5870a16a5d 100644 --- a/gst-libs/gst/video/video-format.h +++ b/gst-libs/gst/video/video-format.h @@ -84,7 +84,7 @@ G_BEGIN_DECLS * @GST_VIDEO_FORMAT_GBR_10LE: planar 4:4:4 RGB, 10 bits per channel * @GST_VIDEO_FORMAT_NV16: planar 4:2:2 YUV with interleaved UV plane * @GST_VIDEO_FORMAT_NV24: planar 4:4:4 YUV with interleaved UV plane - * @GST_VIDEO_FORMAT_NV12T: NV12 with tiling + * @GST_VIDEO_FORMAT_NV12_64Z32: NV12 with 64x32 tiling in zigzag pattern * * Enum value describing the most common video formats. */ @@ -142,7 +142,7 @@ typedef enum { GST_VIDEO_FORMAT_GBR_10LE, GST_VIDEO_FORMAT_NV16, GST_VIDEO_FORMAT_NV24, - GST_VIDEO_FORMAT_NV12T, + GST_VIDEO_FORMAT_NV12_64Z32, } GstVideoFormat; #define GST_VIDEO_MAX_PLANES 4 @@ -454,7 +454,7 @@ gconstpointer gst_video_format_get_palette (GstVideoFormat format, gsi "YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8, GRAY16_BE, GRAY16_LE, " \ "v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \ "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, " \ - " Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12T }" + " Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32 }" /** * GST_VIDEO_CAPS_MAKE: diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index 6234b37bbd..ed8c0251c0 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -573,7 +573,7 @@ fill_planes (GstVideoInfo * info) info->offset[2] = info->offset[1] * 2; info->size = info->stride[0] * height * 3; break; - case GST_VIDEO_FORMAT_NV12T: + case GST_VIDEO_FORMAT_NV12_64Z32: info->stride[0] = GST_ROUND_UP_128 (width); info->stride[1] = info->stride[0]; info->stride[2] = GST_ROUND_UP_32 (height) / 32; diff --git a/tests/check/elements/videoscale.c b/tests/check/elements/videoscale.c index 881eda5a0c..1fd48248de 100644 --- a/tests/check/elements/videoscale.c +++ b/tests/check/elements/videoscale.c @@ -120,7 +120,7 @@ check_pad_template (GstPadTemplate * tmpl) case GST_VIDEO_FORMAT_GBR: case GST_VIDEO_FORMAT_GBR_10BE: case GST_VIDEO_FORMAT_GBR_10LE: - case GST_VIDEO_FORMAT_NV12T: + case GST_VIDEO_FORMAT_NV12_64Z32: GST_LOG ("Ignoring lack of support for format %s", fmt_str); break; default: -- 2.34.1