From: rcombs via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Cc: rcombs <rcombs@rcombs.me> Subject: [FFmpeg-devel] [PATCH] swscale/options: use accurate rounding and full chroma by default Date: Sun, 8 Jun 2025 14:23:40 -0700 Message-ID: <mailman.2596.1749417834.1384.ffmpeg-devel@ffmpeg.org> (raw) [-- Attachment #1: Type: message/rfc822, Size: 5937 bytes --] From: rcombs <rcombs@rcombs.me> To: ffmpeg-devel@ffmpeg.org Subject: [PATCH] swscale/options: use accurate rounding and full chroma by default Date: Sun, 8 Jun 2025 14:23:40 -0700 Message-ID: <20250608212340.37328-1-rcombs@rcombs.me> This has been causing quality degradation for people since the dawn of sws, and the performance concerns that originally led to this default have been soundly defeated by the march of time. --- doc/APIchanges | 3 +++ libswscale/options.c | 4 +++- libswscale/version.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 91710bb27d..6d81048e48 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28 API changes, most recent first: +2024-12-xx - xxxxxxxxxx - lsws 9.0.101 - swscale.h + Use accurate rounding and full chroma by default. + 2025-05-21 - xxxxxxxxxx - lavu 60.3.100 - avassert.h Add av_unreachable() and av_assume() macros. diff --git a/libswscale/options.c b/libswscale/options.c index feecae8c89..7d29a416cb 100644 --- a/libswscale/options.c +++ b/libswscale/options.c @@ -31,8 +31,10 @@ static const char *sws_context_to_name(void *ptr) #define DEFAULT 0 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +#define DEFAULT_FLAGS SWS_BICUBIC | SWS_ACCURATE_RND | SWS_FULL_CHR_H_INT | SWS_FULL_CHR_H_INP + static const AVOption swscale_options[] = { - { "sws_flags", "swscale flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = SWS_BICUBIC }, .flags = VE, .unit = "sws_flags", .max = UINT_MAX }, + { "sws_flags", "swscale flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, { .i64 = DEFAULT_FLAGS }, .flags = VE, .unit = "sws_flags", .max = UINT_MAX }, { "fast_bilinear", "fast bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_FAST_BILINEAR }, .flags = VE, .unit = "sws_flags" }, { "bilinear", "bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_BILINEAR }, .flags = VE, .unit = "sws_flags" }, { "bicubic", "bicubic", 0, AV_OPT_TYPE_CONST, { .i64 = SWS_BICUBIC }, .flags = VE, .unit = "sws_flags" }, diff --git a/libswscale/version.h b/libswscale/version.h index 148efd83eb..02baedad5b 100644 --- a/libswscale/version.h +++ b/libswscale/version.h @@ -29,7 +29,7 @@ #include "version_major.h" #define LIBSWSCALE_VERSION_MINOR 0 -#define LIBSWSCALE_VERSION_MICRO 100 +#define LIBSWSCALE_VERSION_MICRO 101 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ LIBSWSCALE_VERSION_MINOR, \ -- 2.45.1 [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next reply other threads:[~2025-06-08 21:23 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-06-08 21:23 rcombs via ffmpeg-devel [this message] 2025-06-08 23:52 rcombs via ffmpeg-devel 2025-06-09 12:17 ` Michael Niedermayer 2025-06-09 22:02 ` Ridley Combs via ffmpeg-devel 2025-06-09 22:30 ` Michael Niedermayer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=mailman.2596.1749417834.1384.ffmpeg-devel@ffmpeg.org \ --to=ffmpeg-devel@ffmpeg.org \ --cc=rcombs@rcombs.me \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git