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
18b56872
Commit
18b56872
authored
Feb 25, 2011
by
David Schleef
Committed by
Wim Taymans
Jun 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MOVED FROM BAD 62/68] colorspace: Add support for r210
parent
321cdc13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
gst/colorspace/colorspace.c
gst/colorspace/colorspace.c
+68
-1
gst/colorspace/gstcolorspace.c
gst/colorspace/gstcolorspace.c
+1
-0
No files found.
gst/colorspace/colorspace.c
View file @
18b56872
...
...
@@ -1250,6 +1250,71 @@ putline16_AY64 (ColorspaceConvert * convert, guint8 * dest, const guint16 * src,
memcpy
(
FRAME_GET_LINE
(
dest
,
0
,
j
),
src
,
convert
->
width
*
8
);
}
static
void
getline_r210
(
ColorspaceConvert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
)
{
int
i
;
const
guint8
*
srcline
=
FRAME_GET_LINE
(
src
,
0
,
j
);
for
(
i
=
0
;
i
<
convert
->
width
;
i
++
)
{
guint8
x
;
dest
[
i
*
4
+
0
]
=
0xff
;
x
=
GST_READ_UINT32_BE
(
srcline
+
i
*
4
);
dest
[
i
*
4
+
1
]
=
(
x
>>
22
)
&
0xff
;
dest
[
i
*
4
+
2
]
=
(
x
>>
12
)
&
0xff
;
dest
[
i
*
4
+
3
]
=
(
x
>>
2
)
&
0xff
;
}
}
static
void
putline_r210
(
ColorspaceConvert
*
convert
,
guint8
*
dest
,
const
guint8
*
src
,
int
j
)
{
int
i
;
guint8
*
destline
=
FRAME_GET_LINE
(
dest
,
0
,
j
);
for
(
i
=
0
;
i
<
convert
->
width
/
2
;
i
++
)
{
guint32
x
=
0
;
x
|=
src
[
i
*
4
+
1
]
<<
22
;
x
|=
(
src
[
i
*
4
+
1
]
&
0xc0
)
<<
14
;
x
|=
src
[
i
*
4
+
2
]
<<
12
;
x
|=
(
src
[
i
*
4
+
2
]
&
0xc0
)
<<
10
;
x
|=
src
[
i
*
4
+
3
]
<<
2
;
x
|=
(
src
[
i
*
4
+
3
]
&
0xc0
)
>>
6
;
GST_WRITE_UINT32_BE
(
destline
+
i
*
4
,
x
);
}
}
static
void
getline16_r210
(
ColorspaceConvert
*
convert
,
guint16
*
dest
,
const
guint8
*
src
,
int
j
)
{
int
i
;
const
guint8
*
srcline
=
FRAME_GET_LINE
(
src
,
0
,
j
);
for
(
i
=
0
;
i
<
convert
->
width
;
i
++
)
{
guint32
x
;
dest
[
i
*
4
+
0
]
=
0xffff
;
x
=
GST_READ_UINT32_BE
(
srcline
+
i
*
4
);
dest
[
i
*
4
+
1
]
=
((
x
>>
14
)
&
0xffc0
)
|
(
x
>>
24
);
dest
[
i
*
4
+
2
]
=
((
x
>>
4
)
&
0xffc0
)
|
((
x
>>
14
)
&
0x3f
);
dest
[
i
*
4
+
3
]
=
((
x
<<
6
)
&
0xffc0
)
|
((
x
>>
4
)
&
0x3f
);
}
}
static
void
putline16_r210
(
ColorspaceConvert
*
convert
,
guint8
*
dest
,
const
guint16
*
src
,
int
j
)
{
int
i
;
guint8
*
destline
=
FRAME_GET_LINE
(
dest
,
0
,
j
);
for
(
i
=
0
;
i
<
convert
->
width
/
2
;
i
++
)
{
guint32
x
=
0
;
x
|=
(
src
[
i
*
4
+
1
]
&
0xffc0
)
<<
14
;
x
|=
(
src
[
i
*
4
+
2
]
&
0xffc0
)
<<
4
;
x
|=
(
src
[
i
*
4
+
3
]
&
0xffc0
)
>>
6
;
GST_WRITE_UINT32_BE
(
destline
+
i
*
4
,
x
);
}
}
static
void
getline16_convert
(
ColorspaceConvert
*
convert
,
guint16
*
dest
,
const
guint8
*
src
,
int
j
)
...
...
@@ -1329,7 +1394,9 @@ static const ColorspaceLine lines[] = {
{
GST_VIDEO_FORMAT_ARGB64
,
getline_AY64
,
putline_AY64
,
getline16_AY64
,
putline16_AY64
},
{
GST_VIDEO_FORMAT_AYUV64
,
getline_AY64
,
putline_AY64
,
getline16_AY64
,
putline16_AY64
}
putline16_AY64
},
{
GST_VIDEO_FORMAT_r210
,
getline_r210
,
putline_r210
,
getline16_r210
,
putline16_r210
}
};
static
void
...
...
gst/colorspace/gstcolorspace.c
View file @
18b56872
...
...
@@ -74,6 +74,7 @@ enum
GST_VIDEO_CAPS_GRAY8";" \
GST_VIDEO_CAPS_GRAY16("BIG_ENDIAN")";" \
GST_VIDEO_CAPS_GRAY16("LITTLE_ENDIAN")";" \
GST_VIDEO_CAPS_r210";" \
GST_VIDEO_CAPS_ARGB_64
static
GstStaticPadTemplate
gst_csp_src_template
=
...
...
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