summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-03-28 11:48:50 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-13 15:11:56 +0200
commit2f24290c8edd14262ee8a674a64b1223e1cbbf41 (patch)
tree5a41c74ef47c7bd8c810eb8957a334eaf000fdb4 /fftools/ffmpeg_opt.c
parent952110f9746034224e6c31961f106a9f139652fb (diff)
downloadffmpeg-2f24290c8edd14262ee8a674a64b1223e1cbbf41.tar.gz
fftools/ffmpeg: disable and deprecate -qphist
This option adds a long string of numbers to the progress line, where i-th number contains the base-2 logarithm of the number of times a frame with this QP value was seen by print_report(). There are multiple problems with this feature: * despite this existing since 2005, web search shows no indication that it was ever useful for any meaningful purpose; * the format of what is printed is entirely undocumented, one has to find it out from the source code; * QP values above 31 are silently ignored; * it only works with one video stream; * as it relies on global state, it is in conflict with ongoing architectural changes. It then seems that the nontrivial cost of maintaining this option is not worth its negligible (or possibly negative - since it pollutes the already large option space) value. Users who really need similar functionality can also implement it themselves using -vstats.
Diffstat (limited to 'fftools/ffmpeg_opt.c')
-rw-r--r--fftools/ffmpeg_opt.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 055275d813..aa9aa0e9b4 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -80,7 +80,6 @@ int debug_ts = 0;
int exit_on_error = 0;
int abort_on_flags = 0;
int print_stats = -1;
-int qp_hist = 0;
int stdin_interaction = 1;
float max_error_rate = 2.0/3;
char *filter_nbthreads;
@@ -1344,6 +1343,14 @@ int opt_timelimit(void *optctx, const char *opt, const char *arg)
return 0;
}
+#if FFMPEG_OPT_QPHIST
+static int opt_qphist(void *optctx, const char *opt, const char *arg)
+{
+ av_log(NULL, AV_LOG_WARNING, "Option -%s is deprecated and has no effect\n", opt);
+ return 0;
+}
+#endif
+
#define OFFSET(x) offsetof(OptionsContext, x)
const OptionDef options[] = {
/* main options */
@@ -1627,8 +1634,10 @@ const OptionDef options[] = {
{ "vtag", OPT_VIDEO | HAS_ARG | OPT_EXPERT | OPT_PERFILE |
OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_old2new },
"force video tag/fourcc", "fourcc/tag" },
- { "qphist", OPT_VIDEO | OPT_BOOL | OPT_EXPERT , { &qp_hist },
- "show QP histogram" },
+#if FFMPEG_OPT_QPHIST
+ { "qphist", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_qphist },
+ "deprecated, does nothing" },
+#endif
{ "fps_mode", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_EXPERT |
OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(fps_mode) },
"set framerate mode for matching video streams; overrides vsync" },