[FFmpeg-cvslog] avfilter/vf_libplacebo: default to normalize_sar=0
Niklas Haas
git at videolan.org
Sat Nov 19 15:18:58 EET 2022
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Fri Nov 18 14:56:03 2022 +0100| [05d390890a8b37add02fa8d742335006c7e67c9f] | committer: Niklas Haas
avfilter/vf_libplacebo: default to normalize_sar=0
As a result of a typo in the source code, this option was completely
non-functional. In order to fix it, without breaking the current default
behavior, explicitly change this default to 0.
This behavior is also consistent with how other scale filters behave by
default, so it's probably best to enshrine it anyways.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05d390890a8b37add02fa8d742335006c7e67c9f
---
doc/filters.texi | 7 ++++---
libavfilter/version.h | 2 +-
libavfilter/vf_libplacebo.c | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index f6385a597c..ecf8dfa47a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -15587,9 +15587,10 @@ will be performed.
Work the same as the identical @ref{scale} filter options.
@item normalize_sar
-If enabled (the default), output frames will always have a pixel aspect ratio
-of 1:1. If disabled, any aspect ratio mismatches, including those from e.g.
-anamorphic video sources, are forwarded to the output pixel aspect ratio.
+If enabled, output frames will always have a pixel aspect ratio of 1:1. This
+will introduce padding/cropping as necessary. If disabled (the default), any
+aspect ratio mismatches, including those from e.g. anamorphic video sources,
+are forwarded to the output pixel aspect ratio.
@item pad_crop_ratio
Specifies a ratio (between @code{0.0} and @code{1.0}) between padding and
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 436c2b8b17..1553e7fecf 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -32,7 +32,7 @@
#include "version_major.h"
#define LIBAVFILTER_VERSION_MINOR 50
-#define LIBAVFILTER_VERSION_MICRO 100
+#define LIBAVFILTER_VERSION_MICRO 101
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 92f859fd94..47a55ac311 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -632,7 +632,7 @@ static const AVOption libplacebo_options[] = {
{ "decrease", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, 0, 0, STATIC, "force_oar" },
{ "increase", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 2 }, 0, 0, STATIC, "force_oar" },
{ "force_divisible_by", "enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used", OFFSET(force_divisible_by), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 256, STATIC },
- { "normalize_sar", "force SAR normalization to 1:1", OFFSET(normalize_sar), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, STATIC },
+ { "normalize_sar", "force SAR normalization to 1:1", OFFSET(normalize_sar), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, STATIC },
{ "pad_crop_ratio", "ratio between padding and cropping when normalizing SAR (0=pad, 1=crop)", OFFSET(pad_crop_ratio), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, 1.0, DYNAMIC },
{"colorspace", "select colorspace", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_SPC_NB-1, DYNAMIC, "colorspace"},
More information about the ffmpeg-cvslog
mailing list