Also show the input and output sample aspect ratio in the log.
Stefano Sabatini authored on 2012/03/17 20:28:35... | ... |
@@ -2212,6 +2212,9 @@ can be used to test the monowhite pixel format descriptor definition. |
2212 | 2212 |
|
2213 | 2213 |
Scale the input video to @var{width}:@var{height}[:@var{interl}=@{1|-1@}] and/or convert the image format. |
2214 | 2214 |
|
2215 |
+The scale filter forces the output display aspect ratio to be the same |
|
2216 |
+of the input, by changing the output sample aspect ratio. |
|
2217 |
+ |
|
2215 | 2218 |
The parameters @var{width} and @var{height} are expressions containing |
2216 | 2219 |
the following constants: |
2217 | 2220 |
|
... | ... |
@@ -207,10 +207,6 @@ static int config_props(AVFilterLink *outlink) |
207 | 207 |
outlink->h = h; |
208 | 208 |
|
209 | 209 |
/* TODO: make algorithm configurable */ |
210 |
- av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:0x%0x\n", |
|
211 |
- inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name, |
|
212 |
- outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name, |
|
213 |
- scale->flags); |
|
214 | 210 |
|
215 | 211 |
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL || |
216 | 212 |
av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PSEUDOPAL; |
... | ... |
@@ -239,6 +235,12 @@ static int config_props(AVFilterLink *outlink) |
239 | 239 |
} else |
240 | 240 |
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; |
241 | 241 |
|
242 |
+ av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s sar:%d/%d -> w:%d h:%d fmt:%s sar:%d/%d flags:0x%0x\n", |
|
243 |
+ inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name, |
|
244 |
+ inlink->sample_aspect_ratio.num, inlink->sample_aspect_ratio.den, |
|
245 |
+ outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name, |
|
246 |
+ outlink->sample_aspect_ratio.num, outlink->sample_aspect_ratio.den, |
|
247 |
+ scale->flags); |
|
242 | 248 |
return 0; |
243 | 249 |
|
244 | 250 |
fail: |