Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
9442de70
Commit
9442de70
authored
Mar 11, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdpau: adjust SPU position and size (fixes #10909)
parent
2c8bd7d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
modules/hw/vdpau/display.c
modules/hw/vdpau/display.c
+16
-10
No files found.
modules/hw/vdpau/display.c
View file @
9442de70
...
...
@@ -166,7 +166,8 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned requested_count)
}
static
void
RenderRegion
(
vout_display_t
*
vd
,
VdpOutputSurface
target
,
const
subpicture_region_t
*
reg
,
int
alpha
)
const
subpicture_t
*
subpic
,
const
subpicture_region_t
*
reg
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
VdpBitmapSurface
surface
;
...
...
@@ -185,9 +186,9 @@ static void RenderRegion(vout_display_t *vd, VdpOutputSurface target,
}
/* Upload sub-picture to GPU surface */
picture_t
*
sub
pic
=
reg
->
p_picture
;
const
void
*
data
=
sub
pic
->
p
[
0
].
p_pixels
;
uint32_t
pitch
=
sub
pic
->
p
[
0
].
i_pitch
;
picture_t
*
pic
=
reg
->
p_picture
;
const
void
*
data
=
pic
->
p
[
0
].
p_pixels
;
uint32_t
pitch
=
pic
->
p
[
0
].
i_pitch
;
err
=
vdp_bitmap_surface_put_bits_native
(
sys
->
vdp
,
surface
,
&
data
,
&
pitch
,
NULL
);
...
...
@@ -200,12 +201,17 @@ static void RenderRegion(vout_display_t *vd, VdpOutputSurface target,
/* Render onto main surface */
VdpRect
area
=
{
reg
->
i_x
,
reg
->
i_y
,
reg
->
i_x
+
reg
->
fmt
.
i_visible_width
,
reg
->
i_y
+
reg
->
fmt
.
i_visible_height
,
reg
->
i_x
*
vd
->
fmt
.
i_visible_width
/
subpic
->
i_original_picture_width
,
reg
->
i_y
*
vd
->
fmt
.
i_visible_height
/
subpic
->
i_original_picture_height
,
(
reg
->
i_x
+
reg
->
fmt
.
i_visible_width
)
*
vd
->
fmt
.
i_visible_width
/
subpic
->
i_original_picture_width
,
(
reg
->
i_y
+
reg
->
fmt
.
i_visible_height
)
*
vd
->
fmt
.
i_visible_height
/
subpic
->
i_original_picture_height
,
};
VdpColor
color
=
{
1
.
f
,
1
.
f
,
1
.
f
,
reg
->
i_alpha
*
alpha
/
65535
.
f
};
VdpColor
color
=
{
1
.
f
,
1
.
f
,
1
.
f
,
reg
->
i_alpha
*
subpic
->
i_alpha
/
65535
.
f
};
VdpOutputSurfaceRenderBlendState
state
=
{
.
struct_version
=
VDP_OUTPUT_SURFACE_RENDER_BLEND_STATE_VERSION
,
.
blend_factor_source_color
=
...
...
@@ -247,7 +253,7 @@ static void Queue(vout_display_t *vd, picture_t *pic, subpicture_t *subpic)
if
(
subpic
!=
NULL
)
for
(
subpicture_region_t
*
r
=
subpic
->
p_region
;
r
!=
NULL
;
r
=
r
->
p_next
)
RenderRegion
(
vd
,
surface
,
r
,
subpic
->
i_alpha
);
RenderRegion
(
vd
,
surface
,
subpic
,
r
);
/* Compute picture presentation time */
mtime_t
now
=
mdate
();
...
...
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