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
89e1637e
Commit
89e1637e
authored
Feb 11, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Round scaled sizes to 16 (Closes:#524)
parent
54f1118b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+16
-1
No files found.
modules/stream_out/transcode.c
View file @
89e1637e
...
...
@@ -1547,9 +1547,24 @@ static int transcode_video_encoder_open( sout_stream_t *p_stream,
if
(
id
->
p_encoder
->
fmt_out
.
video
.
i_width
<=
0
&&
id
->
p_encoder
->
fmt_out
.
video
.
i_height
<=
0
&&
p_sys
->
f_scale
)
{
/* Apply the scaling */
/* Apply the scaling
and round at the nearest 16. Don't allow 0 size
*/
id
->
p_encoder
->
fmt_out
.
video
.
i_width
=
i_width
*
p_sys
->
f_scale
;
if
(
id
->
p_encoder
->
fmt_out
.
video
.
i_width
%
16
<=
7
&&
id
->
p_encoder
->
fmt_out
.
video
.
i_width
>=
16
)
id
->
p_encoder
->
fmt_out
.
video
.
i_width
-=
id
->
p_encoder
->
fmt_out
.
video
.
i_width
%
16
;
else
id
->
p_encoder
->
fmt_out
.
video
.
i_width
+=
16
-
id
->
p_encoder
->
fmt_out
.
video
.
i_width
%
16
;
id
->
p_encoder
->
fmt_out
.
video
.
i_height
=
i_height
*
p_sys
->
f_scale
;
if
(
id
->
p_encoder
->
fmt_out
.
video
.
i_height
%
16
<=
7
&&
id
->
p_encoder
->
fmt_out
.
video
.
i_height
>=
16
)
id
->
p_encoder
->
fmt_out
.
video
.
i_height
-=
id
->
p_encoder
->
fmt_out
.
video
.
i_height
%
16
;
else
id
->
p_encoder
->
fmt_out
.
video
.
i_height
+=
16
-
id
->
p_encoder
->
fmt_out
.
video
.
i_height
%
16
;
}
else
if
(
id
->
p_encoder
->
fmt_out
.
video
.
i_width
>
0
&&
id
->
p_encoder
->
fmt_out
.
video
.
i_height
<=
0
)
...
...
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