Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
88d0393a
Commit
88d0393a
authored
Aug 27, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VAAPI spu: as of libva API version 0.33.0 chroma keying and alpha are supported.
parent
c2eac703
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
modules/video_output/vaapi/spu.c
modules/video_output/vaapi/spu.c
+7
-0
No files found.
modules/video_output/vaapi/spu.c
View file @
88d0393a
...
@@ -266,6 +266,7 @@ out_warning:
...
@@ -266,6 +266,7 @@ out_warning:
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
#if !VA_CHECK_VERSION(0,33,0)
static
inline
void
vaapi_fixup_alpha
(
uint8_t
*
p_pixel
,
size_t
i_size
)
static
inline
void
vaapi_fixup_alpha
(
uint8_t
*
p_pixel
,
size_t
i_size
)
{
{
for
(
size_t
p
=
0
;
p
<
i_size
;
p
+=
4
)
for
(
size_t
p
=
0
;
p
<
i_size
;
p
+=
4
)
...
@@ -285,6 +286,7 @@ static inline void vaapi_fixup_alpha(uint8_t *p_pixel, size_t i_size)
...
@@ -285,6 +286,7 @@ static inline void vaapi_fixup_alpha(uint8_t *p_pixel, size_t i_size)
}
}
}
}
}
}
#endif
static
int
CopyRGBAToVAImage
(
vlc_object_t
*
obj
,
VADisplay
p_display
,
static
int
CopyRGBAToVAImage
(
vlc_object_t
*
obj
,
VADisplay
p_display
,
picture_t
*
pic
,
VAImage
*
image
,
VAImageFormat
*
fmt
,
picture_t
*
pic
,
VAImage
*
image
,
VAImageFormat
*
fmt
,
...
@@ -292,6 +294,9 @@ static int CopyRGBAToVAImage(vlc_object_t *obj, VADisplay p_display,
...
@@ -292,6 +294,9 @@ static int CopyRGBAToVAImage(vlc_object_t *obj, VADisplay p_display,
{
{
assert
(
image
);
assert
(
image
);
assert
(
pic
->
format
.
i_chroma
==
VLC_CODEC_RGBA
);
assert
(
pic
->
format
.
i_chroma
==
VLC_CODEC_RGBA
);
#if VA_CHECK_VERSION(0,33,0)
VLC_UNUSED
(
fixup_alpha
);
#endif
/* Only supports RGBA images */
/* Only supports RGBA images */
if
(
!
image
||
!
fmt
||
if
(
!
image
||
!
fmt
||
...
@@ -368,6 +373,7 @@ static int CopyRGBAToVAImage(vlc_object_t *obj, VADisplay p_display,
...
@@ -368,6 +373,7 @@ static int CopyRGBAToVAImage(vlc_object_t *obj, VADisplay p_display,
bytes_copied
+=
i_size
;
bytes_copied
+=
i_size
;
assert
(
bytes_copied
<=
image
->
data_size
);
assert
(
bytes_copied
<=
image
->
data_size
);
#if !VA_CHECK_VERSION(0,33,0)
/* FIXME: Remove this code when VDPAU and XvBA backends for
/* FIXME: Remove this code when VDPAU and XvBA backends for
* VAAPI properly support alpha or chroma keying in subpictures. */
* VAAPI properly support alpha or chroma keying in subpictures. */
if
(
fixup_alpha
)
if
(
fixup_alpha
)
...
@@ -375,6 +381,7 @@ static int CopyRGBAToVAImage(vlc_object_t *obj, VADisplay p_display,
...
@@ -375,6 +381,7 @@ static int CopyRGBAToVAImage(vlc_object_t *obj, VADisplay p_display,
uint8_t
*
p_pixel
=
p_out
+
(
i_line
*
image
->
pitches
[
0
]);
uint8_t
*
p_pixel
=
p_out
+
(
i_line
*
image
->
pitches
[
0
]);
vaapi_fixup_alpha
(
p_pixel
,
i_size
);
vaapi_fixup_alpha
(
p_pixel
,
i_size
);
}
}
#endif
}
}
}
}
...
...
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