Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
ba04177e
Commit
ba04177e
authored
Oct 05, 2012
by
Anton Khirnov
Browse files
vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203. CC:libav-stable@libav.org
parent
c07d56a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
libavfilter/vf_pad.c
libavfilter/vf_pad.c
+1
-1
libavfilter/vf_scale.c
libavfilter/vf_scale.c
+2
-2
No files found.
libavfilter/vf_pad.c
View file @
ba04177e
...
...
@@ -160,7 +160,7 @@ static int config_input(AVFilterLink *inlink)
var_values
[
VAR_IN_H
]
=
var_values
[
VAR_IH
]
=
inlink
->
h
;
var_values
[
VAR_OUT_W
]
=
var_values
[
VAR_OW
]
=
NAN
;
var_values
[
VAR_OUT_H
]
=
var_values
[
VAR_OH
]
=
NAN
;
var_values
[
VAR_A
]
=
(
float
)
inlink
->
w
/
inlink
->
h
;
var_values
[
VAR_A
]
=
(
double
)
inlink
->
w
/
inlink
->
h
;
var_values
[
VAR_HSUB
]
=
1
<<
pad
->
hsub
;
var_values
[
VAR_VSUB
]
=
1
<<
pad
->
vsub
;
...
...
libavfilter/vf_scale.c
View file @
ba04177e
...
...
@@ -167,9 +167,9 @@ static int config_props(AVFilterLink *outlink)
var_values
[
VAR_IN_H
]
=
var_values
[
VAR_IH
]
=
inlink
->
h
;
var_values
[
VAR_OUT_W
]
=
var_values
[
VAR_OW
]
=
NAN
;
var_values
[
VAR_OUT_H
]
=
var_values
[
VAR_OH
]
=
NAN
;
var_values
[
VAR_DAR
]
=
var_values
[
VAR_A
]
=
(
float
)
inlink
->
w
/
inlink
->
h
;
var_values
[
VAR_DAR
]
=
var_values
[
VAR_A
]
=
(
double
)
inlink
->
w
/
inlink
->
h
;
var_values
[
VAR_SAR
]
=
inlink
->
sample_aspect_ratio
.
num
?
(
float
)
inlink
->
sample_aspect_ratio
.
num
/
inlink
->
sample_aspect_ratio
.
den
:
1
;
(
double
)
inlink
->
sample_aspect_ratio
.
num
/
inlink
->
sample_aspect_ratio
.
den
:
1
;
var_values
[
VAR_HSUB
]
=
1
<<
av_pix_fmt_descriptors
[
inlink
->
format
].
log2_chroma_w
;
var_values
[
VAR_VSUB
]
=
1
<<
av_pix_fmt_descriptors
[
inlink
->
format
].
log2_chroma_h
;
...
...
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