From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A6B584457F for ; Fri, 18 Nov 2022 14:25:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DCF5D68BBEE; Fri, 18 Nov 2022 16:25:36 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B4D268B9E8 for ; Fri, 18 Nov 2022 16:25:30 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id A216247801; Fri, 18 Nov 2022 15:25:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1668781529; bh=Y05SccME0J6BBPPvZOnpmJPHIYntrhHcmZoCMSCQPdk=; h=From:To:Cc:Subject:Date:From; b=gDv9XyWCcwFMXUlNmghGcUbLPduYDqV1KxHQgNrWXho3tlzD5GxF2raFFc3j2M6Kn +Q3Dhq4XLMs5dOWH/3WdQkFuZbHNxu2K8FWN7M9JNAMFwi9InxgoG8gSDqBmPMjuLT DvKMDrsU/uUSItHKH4sQqZvcYda3/eYGTcTtKv78= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 18 Nov 2022 15:25:11 +0100 Message-Id: <20221118142512.72413-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_libplacebo: default to normalize_sar=0 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas 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 (and, upon reconsideration, probably preferred) behavior, explicitly change this default to 0. --- 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 e4da63cf48..d576e46d79 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15581,9 +15581,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 fa9a7675d1..d52833263d 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -626,7 +626,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"}, -- 2.38.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".