Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b78fa593
Commit
b78fa593
authored
Jan 05, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added AlignRect helper (msw).
It applies hardware overlay constraints on a RECT.
parent
d98e43b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
25 deletions
+13
-25
modules/video_output/msw/common.c
modules/video_output/msw/common.c
+12
-25
modules/video_output/msw/common.h
modules/video_output/msw/common.h
+1
-0
No files found.
modules/video_output/msw/common.c
View file @
b78fa593
...
...
@@ -222,6 +222,14 @@ void CommonDisplay(vout_display_t *vd)
sys
->
is_first_display
=
false
;
}
void
AlignRect
(
RECT
*
r
,
int
align_boundary
,
int
align_size
)
{
if
(
align_boundary
)
r
->
left
=
(
r
->
left
+
align_boundary
/
2
)
&
~
align_boundary
;
if
(
align_size
)
r
->
right
=
((
r
->
right
-
r
->
left
+
align_size
/
2
)
&
~
align_size
)
+
r
->
left
;
}
/*****************************************************************************
* UpdateRects: update clipping rectangles
*****************************************************************************
...
...
@@ -300,18 +308,8 @@ void UpdateRects(vout_display_t *vd,
#ifdef MODULE_NAME_IS_directx
/* Apply overlay hardware constraints */
if
(
sys
->
use_overlay
)
{
if
(
sys
->
i_align_dest_boundary
)
rect_dest
.
left
=
(
rect_dest
.
left
+
sys
->
i_align_dest_boundary
/
2
)
&
~
sys
->
i_align_dest_boundary
;
if
(
sys
->
i_align_dest_size
)
rect_dest
.
right
=
((
rect_dest
.
right
-
rect_dest
.
left
+
sys
->
i_align_dest_size
/
2
)
&
~
sys
->
i_align_dest_size
)
+
rect_dest
.
left
;
}
if
(
sys
->
use_overlay
)
AlignRect
(
&
rect_dest
,
sys
->
i_align_dest_boundary
,
sys
->
i_align_dest_size
);
#endif
#endif
...
...
@@ -373,19 +371,8 @@ void UpdateRects(vout_display_t *vd,
#ifdef MODULE_NAME_IS_directx
/* Apply overlay hardware constraints */
if
(
sys
->
use_overlay
)
{
if
(
sys
->
i_align_src_boundary
)
rect_src_clipped
.
left
=
(
rect_src_clipped
.
left
+
sys
->
i_align_src_boundary
/
2
)
&
~
sys
->
i_align_src_boundary
;
if
(
sys
->
i_align_src_size
)
rect_src_clipped
.
right
=
((
rect_src_clipped
.
right
-
rect_src_clipped
.
left
+
sys
->
i_align_src_size
/
2
)
&
~
sys
->
i_align_src_size
)
+
rect_src_clipped
.
left
;
}
if
(
sys
->
use_overlay
)
AlignRect
(
&
rect_src_clipped
,
sys
->
i_align_src_boundary
,
sys
->
i_align_src_size
);
#elif defined(MODULE_NAME_IS_direct3d)
/* Needed at least with YUV content */
rect_src_clipped
.
left
&=
~
1
;
...
...
modules/video_output/msw/common.h
View file @
b78fa593
...
...
@@ -241,6 +241,7 @@ void UpdateRects (vout_display_t *,
const
vout_display_cfg_t
*
,
const
video_format_t
*
,
bool
is_forced
);
void
AlignRect
(
RECT
*
,
int
align_boundary
,
int
align_size
);
/*****************************************************************************
* Constants
...
...
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