[FFmpeg-devel] [PATCH V1 01/11] lavfi/spp: add "quality" option in runtime change path

Jun Zhao mypopydev at gmail.com
Sat Jan 11 06:13:48 EET 2020


From: Jun Zhao <barryjzhao at tencent.com>

it's stranage to use option "level" in runtime change path but used
"quality" in option, add "quality" in runtime change path, it's more
intuitive and keep the "level" for compatibility.

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
---
 doc/filters.texi     |    9 +++++++++
 libavfilter/vf_spp.c |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index a2f862e..7459255 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -17271,6 +17271,15 @@ option may cause flicker since the B-Frames have often larger QP. Default is
 @code{0} (not enabled).
 @end table
 
+ at subsection Commands
+
+This filter supports the following commands:
+ at table @option
+ at item level
+ at item quality
+Same as quality option. And the command accepts the @code{max} same as the @code{6}.
+ at end table
+
 @section sr
 
 Scale the input by applying one of the super-resolution methods based on
diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
index fe579ce..db381cd 100644
--- a/libavfilter/vf_spp.c
+++ b/libavfilter/vf_spp.c
@@ -444,7 +444,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
 {
     SPPContext *s = ctx->priv;
 
-    if (!strcmp(cmd, "level")) {
+    if (!strcmp(cmd, "level") || !strcmp(cmd, "quality")) {
         if (!strcmp(args, "max"))
             s->log2_count = MAX_LEVEL;
         else
-- 
1.7.1



More information about the ffmpeg-devel mailing list