Commit 017f2b1d authored by Sebastian Dröge's avatar Sebastian Dröge Committed by Wim Taymans

[MOVED FROM BAD 43/68] colorspace: Add support for Y16

parent 09e9e554
......@@ -526,6 +526,20 @@ putline_Y800 (ColorspaceConvert * convert, guint8 * dest, const guint8 * src,
cogorc_putline_Y800 (FRAME_GET_LINE (dest, 0, j), src, convert->width);
}
static void
getline_Y16 (ColorspaceConvert * convert, guint8 * dest, const guint8 * src,
int j)
{
cogorc_getline_Y16 (dest, FRAME_GET_LINE (src, 0, j), convert->width);
}
static void
putline_Y16 (ColorspaceConvert * convert, guint8 * dest, const guint8 * src,
int j)
{
cogorc_putline_Y16 (FRAME_GET_LINE (dest, 0, j), src, convert->width);
}
static void
getline_BGRA (ColorspaceConvert * convert, guint8 * dest, const guint8 * src,
int j)
......@@ -765,7 +779,7 @@ static const ColorspaceLine lines[] = {
//{GST_VIDEO_FORMAT_GRAY16_LE, getline_GRAY16_LE, putline_GRAY16_LE},
{GST_VIDEO_FORMAT_v308, getline_v308, putline_v308},
{GST_VIDEO_FORMAT_Y800, getline_Y800, putline_Y800},
//{GST_VIDEO_FORMAT_Y16, getline_Y16, putline_Y16},
{GST_VIDEO_FORMAT_Y16, getline_Y16, putline_Y16},
//{GST_VIDEO_FORMAT_RGB16, getline_RGB16, putline_RGB16},
//{GST_VIDEO_FORMAT_BGR16, getline_BGR16, putline_BGR16},
//{GST_VIDEO_FORMAT_RGB15, getline_RGB15, putline_RGB15},
......
......@@ -1413,6 +1413,17 @@ mergewl ayuv, ay, uv
mergebw ay, c255, y
mergewl ayuv, ay, c0x8080
.function cogorc_getline_Y16
.dest 4 ayuv guint8
.source 2 y guint8
.const 1 c255 255
.const 2 c0x8080 0x8080
.temp 2 ay
.temp 1 yb
convhwb yb, y
mergebw ay, c255, yb
mergewl ayuv, ay, c0x8080
.function cogorc_getline_BGRA
.dest 4 argb guint8
......@@ -1615,6 +1626,16 @@ select1wb y, ay
select0lw ay, ayuv
select1wb y, ay
.function cogorc_putline_Y16
.dest 2 y guint8
.source 4 ayuv guint8
.temp 2 ay
.temp 1 yb
select0lw ay, ayuv
select1wb yb, ay
convubw ay, yb
shlw y, ay, 8
.function cogorc_putline_BGRA
.dest 4 bgra guint8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment