diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-05 14:45:30 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-10-19 19:23:14 +0200 |
commit | 0b923a2b72c103b29f4a0dc02676581a5eebcc43 (patch) | |
tree | 817cd16e36ea019cae9776f51f84030aa45893bc | |
parent | d792be5681b4e918bb575a9c74f9a561497a6a5f (diff) | |
download | ffmpeg-0b923a2b72c103b29f4a0dc02676581a5eebcc43.tar.gz |
vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203.
CC:libav-stable@libav.org
(cherry picked from commit ba04177eeb690ba4e93ec30fc8eb02f5319f844b)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r-- | libavfilter/vf_pad.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_scale.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 8f583da16d..0b60d5b4f9 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -156,7 +156,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; diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index dd2f7e18a5..ec69d7b89f 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -151,9 +151,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; |