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
49acb531
Commit
49acb531
authored
Feb 21, 2005
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wall.c: handle some rounding error causing a integer overflow. more window
size constrain fixes
parent
75dd79c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
modules/video_filter/wall.c
modules/video_filter/wall.c
+15
-9
No files found.
modules/video_filter/wall.c
View file @
49acb531
...
...
@@ -246,31 +246,37 @@ static int Init( vout_thread_t *p_vout )
var_Create
(
p_vout
,
"align"
,
VLC_VAR_INTEGER
);
w1
=
p_vout
->
output
.
i_width
/
p_vout
->
p_sys
->
i_col
;
h1
=
w1
*
VOUT_ASPECT_FACTOR
/
i_aspect
;
w1
&=
~
1
;
h1
&=
~
1
;
w1
&=
~
1
;
h1
=
w1
*
VOUT_ASPECT_FACTOR
/
i_aspect
&~
1
;
h1
&=
~
1
;
h2
=
p_vout
->
output
.
i_height
/
p_vout
->
p_sys
->
i_row
;
w2
=
h2
*
i_aspect
/
VOUT_ASPECT_FACTOR
;
w2
&=
~
1
;
h2
&=
~
1
;
h2
=
p_vout
->
output
.
i_height
/
p_vout
->
p_sys
->
i_row
&~
1
;
h2
&=
~
1
;
w2
=
h2
*
i_aspect
/
VOUT_ASPECT_FACTOR
&~
1
;
w2
&=
~
1
;
if
(
h1
*
p_vout
->
p_sys
->
i_row
<
p_vout
->
output
.
i_height
)
{
int
i_tmp
;
i_target_width
=
w2
;
i_target_height
=
h2
;
i_vstart
=
0
;
i_vend
=
p_vout
->
output
.
i_height
;
i_hstart
=
(
i_target_width
*
p_vout
->
p_sys
->
i_col
-
p_vout
->
output
.
i_width
)
/
2
;
i_tmp
=
i_target_width
*
p_vout
->
p_sys
->
i_col
;
while
(
i_tmp
<
p_vout
->
output
.
i_width
)
i_tmp
+=
p_vout
->
p_sys
->
i_col
;
i_hstart
=
((
i_tmp
-
p_vout
->
output
.
i_width
)
/
2
)
&~
1
;
i_hend
=
i_hstart
+
p_vout
->
output
.
i_width
;
}
else
{
int
i_tmp
;
i_target_height
=
h1
;
i_target_width
=
w1
;
i_hstart
=
0
;
i_hend
=
p_vout
->
output
.
i_width
;
i_vstart
=
(
i_target_height
*
p_vout
->
p_sys
->
i_row
-
p_vout
->
output
.
i_height
)
/
2
;
i_tmp
=
i_target_height
*
p_vout
->
p_sys
->
i_row
;
while
(
i_tmp
<
p_vout
->
output
.
i_height
)
i_tmp
+=
p_vout
->
p_sys
->
i_row
;
i_vstart
=
(
(
i_tmp
-
p_vout
->
output
.
i_height
)
/
2
)
&
~
1
;
i_vend
=
i_vstart
+
p_vout
->
output
.
i_height
;
}
msg_Dbg
(
p_vout
,
"target resolution %dx%d"
,
i_target_width
,
i_target_height
);
...
...
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