diff mbox

[FFmpeg-devel,V2] lavc/qsvenc: add an option to disable MFE mode

Message ID 1526885000-21470-1-git-send-email-zhong.li@intel.com
State Accepted
Commit 35ed7f93dbc72d733e454ae464b1324f38af62a0
Headers show

Commit Message

Zhong Li May 21, 2018, 6:43 a.m. UTC
Not convenient if using numerals to set MFE mode. It is ambiguous
and misleading (e.g: user may misunderstand setting mfmode to 1 is to
enable MFE but actually it is to disable MFE, and set it to be 5 or above is meaningless).

V2: remove the manual option since it is not supported now.

Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavcodec/qsvenc_h264.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 718bf9c..4d327c2 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -146,7 +146,9 @@  static const AVOption options[] = {
     { "aud", "Insert the Access Unit Delimiter NAL", OFFSET(qsv.aud), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE},
 
 #if QSV_HAVE_MF
-    { "mfmode", "Multi-Frame Mode", OFFSET(qsv.mfmode), AV_OPT_TYPE_INT, { .i64 = MFX_MF_AUTO }, 0, INT_MAX, VE },
+    { "mfmode", "Multi-Frame Mode", OFFSET(qsv.mfmode), AV_OPT_TYPE_INT, { .i64 = MFX_MF_AUTO }, MFX_MF_DEFAULT, MFX_MF_AUTO, VE, "mfmode"},
+    { "off"    , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_DISABLED }, INT_MIN, INT_MAX,     VE, "mfmode" },
+    { "auto"   , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_AUTO     }, INT_MIN, INT_MAX,     VE, "mfmode" },
 #endif
 
     { NULL },