mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vf_pad/scale: use double precision for aspect ratios.
Fixes Bug 203. CC:libav-stable@libav.org
This commit is contained in:
parent
c07d56a684
commit
ba04177eeb
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user