colorspace: Add support for Y16

This commit is contained in:
Sebastian Dröge 2010-10-31 23:25:57 +01:00
parent 52f3e1351a
commit 3c8e0286dc
2 changed files with 36 additions and 1 deletions

View file

@ -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},

View file

@ -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