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
a40c82c8
Commit
a40c82c8
authored
Dec 18, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made SpuRegionPlace() code a bit more obvious.
parent
8f85c827
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
32 deletions
+27
-32
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+27
-32
No files found.
src/video_output/vout_subpictures.c
View file @
a40c82c8
...
...
@@ -530,45 +530,40 @@ static void SpuRegionPlace( int *pi_x, int *pi_y,
const
subpicture_t
*
p_subpic
,
const
subpicture_region_t
*
p_region
)
{
const
int
i_delta_x
=
p_region
->
i_x
;
const
int
i_delta_y
=
p_region
->
i_y
;
int
i_x
,
i_y
;
assert
(
p_region
->
i_x
!=
INT_MAX
&&
p_region
->
i_y
!=
INT_MAX
);
if
(
p_subpic
->
b_absolute
)
{
*
pi_x
=
p_region
->
i_x
;
*
pi_y
=
p_region
->
i_y
;
}
else
{
if
(
p_region
->
i_align
&
SUBPICTURE_ALIGN_TOP
)
{
i_y
=
i_delta
_y
;
*
pi_y
=
p_region
->
i
_y
;
}
else
if
(
p_region
->
i_align
&
SUBPICTURE_ALIGN_BOTTOM
)
{
i_y
=
p_subpic
->
i_original_picture_height
-
p_region
->
fmt
.
i_height
-
i_delta
_y
;
*
pi_y
=
p_subpic
->
i_original_picture_height
-
p_region
->
fmt
.
i_height
-
p_region
->
i
_y
;
}
else
{
i_y
=
p_subpic
->
i_original_picture_height
/
2
-
p_region
->
fmt
.
i_height
/
2
;
*
p
i_y
=
p_subpic
->
i_original_picture_height
/
2
-
p_region
->
fmt
.
i_height
/
2
;
}
if
(
p_region
->
i_align
&
SUBPICTURE_ALIGN_LEFT
)
{
i_x
=
i_delta
_x
;
*
pi_x
=
p_region
->
i
_x
;
}
else
if
(
p_region
->
i_align
&
SUBPICTURE_ALIGN_RIGHT
)
{
i_x
=
p_subpic
->
i_original_picture_width
-
p_region
->
fmt
.
i_width
-
i_delta
_x
;
*
pi_x
=
p_subpic
->
i_original_picture_width
-
p_region
->
fmt
.
i_width
-
p_region
->
i
_x
;
}
else
{
i_x
=
p_subpic
->
i_original_picture_width
/
2
-
p_region
->
fmt
.
i_width
/
2
;
*
p
i_x
=
p_subpic
->
i_original_picture_width
/
2
-
p_region
->
fmt
.
i_width
/
2
;
}
if
(
p_subpic
->
b_absolute
)
{
i_x
=
i_delta_x
;
i_y
=
i_delta_y
;
}
*
pi_x
=
i_x
;
*
pi_y
=
i_y
;
}
/**
...
...
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