[FFmpeg-cvslog] lavfi/scale: document behavior with regards to the output sample aspect ratio
Stefano Sabatini
git at videolan.org
Sun Mar 18 10:46:50 CET 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Mar 17 12:28:35 2012 +0100| [fdffaa6b11eea2082c7a61ba2524d224039568e9] | committer: Stefano Sabatini
lavfi/scale: document behavior with regards to the output sample aspect ratio
Also show the input and output sample aspect ratio in the log.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fdffaa6b11eea2082c7a61ba2524d224039568e9
---
doc/filters.texi | 3 +++
libavfilter/vf_scale.c | 10 ++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index dc3e5c0..0a6af05 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -2212,6 +2212,9 @@ can be used to test the monowhite pixel format descriptor definition.
Scale the input video to @var{width}:@var{height}[:@var{interl}=@{1|-1@}] and/or convert the image format.
+The scale filter forces the output display aspect ratio to be the same
+of the input, by changing the output sample aspect ratio.
+
The parameters @var{width} and @var{height} are expressions containing
the following constants:
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index af08a82..692e2c5 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -207,10 +207,6 @@ static int config_props(AVFilterLink *outlink)
outlink->h = h;
/* TODO: make algorithm configurable */
- av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:0x%0x\n",
- inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name,
- outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name,
- scale->flags);
scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL ||
av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PSEUDOPAL;
@@ -239,6 +235,12 @@ static int config_props(AVFilterLink *outlink)
} else
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
+ 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",
+ inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name,
+ inlink->sample_aspect_ratio.num, inlink->sample_aspect_ratio.den,
+ outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name,
+ outlink->sample_aspect_ratio.num, outlink->sample_aspect_ratio.den,
+ scale->flags);
return 0;
fail:
More information about the ffmpeg-cvslog
mailing list