History

vf_pad/scale: use double precision for aspect ratios.

Fixes Bug 203.

Anton Khirnov committed 14 years ago

Commit ba041771 parent c07d56a2 files · +3 −3Browse files

Unified · Split

2 files
  1. libavfilter/vf_pad.c +1 −1
  2. libavfilter/vf_scale.c +2 −2
libavfilter/vf_pad.c+1−1
@@ -160,7 +160,7 @@ static int config_input(AVFilterLink *inlink) · 159 unmodified lines
160160 var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h;
161161 var_values[VAR_OUT_W] = var_values[VAR_OW] = NAN;
162162 var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN;
163− var_values[VAR_A] = (float) inlink->w / inlink->h;
163+ var_values[VAR_A] = (double) inlink->w / inlink->h;
164164 var_values[VAR_HSUB] = 1<<pad->hsub;
165165 var_values[VAR_VSUB] = 1<<pad->vsub;
166166
libavfilter/vf_scale.c+2−2
@@ -167,9 +167,9 @@ static int config_props(AVFilterLink *outlink) · 166 unmodified lines
167167 var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h;
168168 var_values[VAR_OUT_W] = var_values[VAR_OW] = NAN;
169169 var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN;
170− var_values[VAR_DAR] = var_values[VAR_A] = (float) inlink->w / inlink->h;
170+ var_values[VAR_DAR] = var_values[VAR_A] = (double) inlink->w / inlink->h;
171171 var_values[VAR_SAR] = inlink->sample_aspect_ratio.num ?
172− (float) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1;
172+ (double) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1;
173173 var_values[VAR_HSUB] = 1<<av_pix_fmt_descriptors[inlink->format].log2_chroma_w;
174174 var_values[VAR_VSUB] = 1<<av_pix_fmt_descriptors[inlink->format].log2_chroma_h;
175175

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t