Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
ecfd247f
Commit
ecfd247f
authored
Oct 31, 2010
by
Sebastian Dröge
Committed by
Wim Taymans
Jun 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MOVED FROM BAD 41/68] colorspace: Add support for A420
parent
395640e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
3 deletions
+60
-3
gst/colorspace/colorspace.c
gst/colorspace/colorspace.c
+23
-2
gst/colorspace/gstcolorspace.c
gst/colorspace/gstcolorspace.c
+1
-1
gst/colorspace/gstcolorspaceorc.orc
gst/colorspace/gstcolorspaceorc.orc
+36
-0
No files found.
gst/colorspace/colorspace.c
View file @
ecfd247f
...
...
@@ -707,6 +707,27 @@ putline_UYVP (ColorspaceConvert * convert, guint8 * dest, const guint8 * src,
}
}
static
void
getline_A420
(
ColorspaceConvert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
)
{
cogorc_getline_A420
(
dest
,
FRAME_GET_LINE
(
src
,
0
,
j
),
FRAME_GET_LINE
(
src
,
1
,
j
>>
1
),
FRAME_GET_LINE
(
src
,
2
,
j
>>
1
),
FRAME_GET_LINE
(
src
,
3
,
j
),
convert
->
width
);
}
static
void
putline_A420
(
ColorspaceConvert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
)
{
cogorc_putline_A420
(
FRAME_GET_LINE
(
dest
,
0
,
j
),
FRAME_GET_LINE
(
dest
,
1
,
j
>>
1
),
FRAME_GET_LINE
(
dest
,
2
,
j
>>
1
),
FRAME_GET_LINE
(
dest
,
3
,
j
),
src
,
convert
->
width
/
2
);
}
typedef
struct
{
GstVideoFormat
format
;
...
...
@@ -749,8 +770,8 @@ static const ColorspaceLine lines[] = {
//{GST_VIDEO_FORMAT_BGR16, getline_BGR16, putline_BGR16},
//{GST_VIDEO_FORMAT_RGB15, getline_RGB15, putline_RGB15},
//{GST_VIDEO_FORMAT_BGR15, getline_BGR15, putline_BGR15},
{
GST_VIDEO_FORMAT_UYVP
,
getline_UYVP
,
putline_UYVP
}
//
{GST_VIDEO_FORMAT_A420, getline_A420, putline_A420}
{
GST_VIDEO_FORMAT_UYVP
,
getline_UYVP
,
putline_UYVP
}
,
{
GST_VIDEO_FORMAT_A420
,
getline_A420
,
putline_A420
}
};
static
void
...
...
gst/colorspace/gstcolorspace.c
View file @
ecfd247f
...
...
@@ -47,7 +47,7 @@ GST_DEBUG_CATEGORY (colorspace_performance);
#define CSP_VIDEO_CAPS \
"video/x-raw-yuv, width = "GST_VIDEO_SIZE_RANGE" , " \
"height="GST_VIDEO_SIZE_RANGE",framerate="GST_VIDEO_FPS_RANGE"," \
"format= (fourcc) { I420 , NV12 , NV21 , YV12 , YUY2 , Y42B , Y444 , YUV9 , YVU9 , Y41B , Y800 , Y8 , GREY , Y16 , UYVY , YVYU , IYU1 , v308 , AYUV, v210 } ;" \
"format= (fourcc) { I420 , NV12 , NV21 , YV12 , YUY2 , Y42B , Y444 , YUV9 , YVU9 , Y41B , Y800 , Y8 , GREY , Y16 , UYVY , YVYU , IYU1 , v308 , AYUV, v210
, A420
} ;" \
GST_VIDEO_CAPS_RGB";" \
GST_VIDEO_CAPS_BGR";" \
GST_VIDEO_CAPS_RGBx";" \
...
...
gst/colorspace/gstcolorspaceorc.orc
View file @
ecfd247f
...
...
@@ -1488,6 +1488,22 @@ mergewl uvuv, uv, uv
x2 mergebw ay, c255, y
x2 mergewl d, ay, uvuv
.function cogorc_getline_A420
.dest 4 d guint8
.source 1 y guint8
.source 1 u guint8
.source 1 v guint8
.source 1 a guint8
.temp 2 uv
.temp 2 ay
.temp 1 tu
.temp 1 tv
loadupdb tu, u
loadupdb tv, v
mergebw uv, tu, tv
mergebw ay, a, y
mergewl d, ay, uv
.function cogorc_putline_I420
.dest 2 y guint8
...
...
@@ -1678,4 +1694,24 @@ splitlw uv1, uv2, uvuv
x2 avgub uv, uv1, uv2
swapw vu, uv
.function cogorc_putline_A420
.dest 2 y guint8
.dest 1 u guint8
.dest 1 v guint8
.dest 2 a guint8
.source 8 ayuv guint8
.temp 4 ay
.temp 4 uv
.temp 2 uu
.temp 2 vv
.temp 1 t1
.temp 1 t2
x2 splitlw uv, ay, ayuv
x2 select1wb y, ay
x2 select0wb a, ay
x2 splitwb vv, uu, uv
splitwb t1, t2, uu
avgub u, t1, t2
splitwb t1, t2, vv
avgub v, t1, t2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment