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
c021c39d
Commit
c021c39d
authored
Apr 30, 2014
by
Felix Abecassis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale: modify output aspect ratio if transformation is not homothetic
Close #10745
parent
5e4ff114
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
modules/video_chroma/swscale.c
modules/video_chroma/swscale.c
+20
-0
No files found.
modules/video_chroma/swscale.c
View file @
c021c39d
...
...
@@ -430,6 +430,26 @@ static int Init( filter_t *p_filter )
return
VLC_EGENERIC
;
}
if
(
p_filter
->
b_allow_fmt_out_change
)
{
/*
* If the transformation is not homothetic we must modify the
* aspect ratio of the output format in order to have the
* output picture displayed correctly and not stretched
* horizontally or vertically.
* WARNING: this is a hack, ideally this should not be needed
* and the vout should update its video format instead.
*/
unsigned
i_sar_num
=
p_fmti
->
i_sar_num
*
p_fmti
->
i_visible_width
;
unsigned
i_sar_den
=
p_fmti
->
i_sar_den
*
p_fmto
->
i_visible_width
;
vlc_ureduce
(
&
i_sar_num
,
&
i_sar_den
,
i_sar_num
,
i_sar_den
,
65536
);
i_sar_num
*=
p_fmto
->
i_visible_height
;
i_sar_den
*=
p_fmti
->
i_visible_height
;
vlc_ureduce
(
&
i_sar_num
,
&
i_sar_den
,
i_sar_num
,
i_sar_den
,
65536
);
p_fmto
->
i_sar_num
=
i_sar_num
;
p_fmto
->
i_sar_den
=
i_sar_den
;
}
p_sys
->
b_add_a
=
cfg
.
b_add_a
;
p_sys
->
b_copy
=
cfg
.
b_copy
;
p_sys
->
fmt_in
=
*
p_fmti
;
...
...
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