[FFmpeg-cvslog] lavc/qsvenc_h264: remove the privite option trellis

Zhong Li git at videolan.org
Thu Mar 28 16:01:00 EET 2019


ffmpeg | branch: master | Zhong Li <zhong.li at intel.com> | Wed Mar 27 19:39:41 2019 +0800| [391f884675f319b95f5a72a410178516e11c557d] | committer: Zhong Li

lavc/qsvenc_h264: remove the privite option trellis

There are many problems of current qsv trellis option:
1. Duplicated with AVCodecContext definition
2. MFX_TRELLIS_XXX is introduced by MSDK API 1.17
   Currently Without MSDK API checking thus may cause compilation issue.
3. user is inclined to enable trellis when set "-trellis 1", but
   actually it is to disable since MFX_TRELLIS_OFF is equal to 1.
4. It is too complex for user to enable trellis for every frame(I/P/B).

Just simply remove the private option, and switch to the AVCodecContext
definition. Compatibility should not a big problem (except can't exact map)
since the option name is same as AVCodecContext.

Signed-off-by: Zhong Li <zhong.li at intel.com>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg at gmail.com>
Reviewed-by: Moritz Barsnick <barsnick at gmx.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=391f884675f319b95f5a72a410178516e11c557d
---

 libavcodec/qsvenc.h      | 1 -
 libavcodec/qsvenc_h264.c | 6 ------
 libavcodec/version.h     | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index fcd01f4a61..eed6f2c2c2 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -153,7 +153,6 @@ typedef struct QSVEncContext {
 
     int single_sei_nal_unit;
     int max_dec_frame_buffering;
-    int trellis;
 
     int bitrate_limit;
     int mbbrc;
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 4fea69fb2c..2bf3419d27 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -132,12 +132,6 @@ static const AVOption options[] = {
     { "int_ref_qp_delta",   "QP difference for the refresh MBs",                 OFFSET(qsv.int_ref_qp_delta),        AV_OPT_TYPE_INT, { .i64 = INT16_MIN }, INT16_MIN,  INT16_MAX, VE },
     { "recovery_point_sei", "Insert recovery point SEI messages",                OFFSET(qsv.recovery_point_sei),      AV_OPT_TYPE_INT, { .i64 = -1 },               -1,          1, VE },
 
-    { "trellis",             "Trellis quantization",                             OFFSET(qsv.trellis),                 AV_OPT_TYPE_FLAGS, { .i64 = 0 }, 0, UINT_MAX, VE, "trellis" },
-        { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_OFF }, .flags = VE, "trellis" },
-        { "I",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_I },   .flags = VE, "trellis" },
-        { "P",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_P },   .flags = VE, "trellis" },
-        { "B",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TRELLIS_B },   .flags = VE, "trellis" },
-
     { "profile", NULL, OFFSET(qsv.profile), AV_OPT_TYPE_INT, { .i64 = MFX_PROFILE_UNKNOWN }, 0, INT_MAX, VE, "profile" },
     { "unknown" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_UNKNOWN      }, INT_MIN, INT_MAX,     VE, "profile" },
     { "baseline", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_AVC_BASELINE }, INT_MIN, INT_MAX,     VE, "profile" },
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 348b4d0300..e73390e21f 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  47
-#define LIBAVCODEC_VERSION_MICRO 105
+#define LIBAVCODEC_VERSION_MICRO 106
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list