[FFmpeg-devel] [PATCH 1/2] lavc/qsvenc: add detail options for MFE mode

Zhong Li zhong.li at intel.com
Sat May 5 01:11:39 EEST 2018


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).

Signed-off-by: Zhong Li <zhong.li at intel.com>
---
 libavcodec/qsvenc_h264.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 718bf9c..5278a04 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -146,7 +146,11 @@ 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_MANUAL, VE, "mfmode"},
+    { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_DEFAULT  }, INT_MIN, INT_MAX,     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" },
+    { "manual" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_MANUAL   }, INT_MIN, INT_MAX,     VE, "mfmode" },
 #endif
 
     { NULL },
-- 
2.7.4



More information about the ffmpeg-devel mailing list