[FFmpeg-devel] [PATCH 2/2] ffplay: set default scaling_quality to "best" instead of "linear"

Ramiro Polla ramiro.polla at gmail.com
Fri May 31 00:36:57 EEST 2024


These values are aliases in SDL, but "best" is a more intuitive name.
---
 doc/ffplay.texi  | 2 +-
 fftools/ffplay.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/ffplay.texi b/doc/ffplay.texi
index 60f883e159..e7ff62ae16 100644
--- a/doc/ffplay.texi
+++ b/doc/ffplay.texi
@@ -73,7 +73,7 @@ Force format.
 @item -window_title @var{title}
 Set window title (default is the input filename).
 @item -scaling_quality @var{value}
-Set SDL_HINT_RENDER_SCALE_QUALITY value (default is "linear").
+Set SDL_HINT_RENDER_SCALE_QUALITY value (default is "best").
 @item -left @var{title}
 Set the x position for the left of the window (default is a centered window).
 @item -top @var{title}
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 75d2bec777..6575ad14a7 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3684,7 +3684,7 @@ static const OptionDef options[] = {
     { "framedrop",          OPT_TYPE_BOOL,   OPT_EXPERT, { &framedrop }, "drop frames when cpu is too slow", "" },
     { "infbuf",             OPT_TYPE_BOOL,   OPT_EXPERT, { &infinite_buffer }, "don't limit the input buffer size (useful with realtime streams)", "" },
     { "window_title",       OPT_TYPE_STRING,          0, { &window_title }, "set window title", "window title" },
-    { "scaling_quality",    OPT_TYPE_STRING, OPT_EXPERT, { &scaling_quality }, "set SDL_HINT_RENDER_SCALE_QUALITY value (default=linear)", "value" },
+    { "scaling_quality",    OPT_TYPE_STRING, OPT_EXPERT, { &scaling_quality }, "set SDL_HINT_RENDER_SCALE_QUALITY value (default=best)", "value" },
     { "left",               OPT_TYPE_INT,    OPT_EXPERT, { &screen_left }, "set the x position for the left of the window", "x pos" },
     { "top",                OPT_TYPE_INT,    OPT_EXPERT, { &screen_top }, "set the y position for the top of the window", "y pos" },
     { "vf",                 OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = opt_add_vfilter }, "set video filters", "filter_graph" },
@@ -3834,7 +3834,7 @@ int main(int argc, char **argv)
         }
         window = SDL_CreateWindow(program_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, default_width, default_height, flags);
         if (!scaling_quality)
-            scaling_quality = "linear";
+            scaling_quality = "best";
         SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaling_quality);
         if (!window) {
             av_log(NULL, AV_LOG_FATAL, "Failed to create window: %s", SDL_GetError());
-- 
2.39.2



More information about the ffmpeg-devel mailing list