summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2013-09-06 12:43:27 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2013-09-06 12:45:36 +0200
commitfae9d82515cba6d799dc83f093a7685aadb94e9e (patch)
tree9437d2d3dd357ee3c2a16929caa069705181d1fc
parent26d04c7582c9d01c40ce36bf99be24124e3dd344 (diff)
video-format: fix NV24 pack/unpack function
We can't reuse the NV12 functions, we need to make new ones.
-rw-r--r--gst-libs/gst/video/video-format.c4
-rw-r--r--gst-libs/gst/video/video-orc.orc19
2 files changed, 21 insertions, 2 deletions
diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c
index 286f6ad3c..2b3f4b0f6 100644
--- a/gst-libs/gst/video/video-format.c
+++ b/gst-libs/gst/video/video-format.c
@@ -1179,7 +1179,7 @@ unpack_NV24 (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)
{
- video_orc_unpack_NV12 (dest,
+ video_orc_unpack_NV24 (dest,
GET_PLANE_LINE (0, y), GET_PLANE_LINE (1, y), width);
}
@@ -1189,7 +1189,7 @@ pack_NV24 (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
gint y, gint width)
{
- video_orc_pack_NV12 (GET_PLANE_LINE (0, y),
+ video_orc_pack_NV24 (GET_PLANE_LINE (0, y),
GET_PLANE_LINE (1, y), src, width);
}
diff --git a/gst-libs/gst/video/video-orc.orc b/gst-libs/gst/video/video-orc.orc
index 533d9d3f1..1f673271c 100644
--- a/gst-libs/gst/video/video-orc.orc
+++ b/gst-libs/gst/video/video-orc.orc
@@ -423,6 +423,25 @@ x2 select1wb y, ay
select0lw uv, uvuv
swapw vu, uv
+.function video_orc_unpack_NV24
+.dest 4 d guint8
+.source 1 y guint8
+.source 2 uv guint8
+.const 1 c255 255
+.temp 2 ay
+
+mergebw ay, c255, y
+mergewl d, ay, uv
+
+.function video_orc_pack_NV24
+.dest 1 y guint8
+.dest 2 uv guint8
+.source 4 ayuv guint8
+.temp 2 ay
+
+splitlw uv, ay, ayuv
+select1wb y, ay
+
.function video_orc_unpack_A420
.dest 4 d guint8
.source 1 y guint8