qsvenc: remove vcm option on Linux

Message ID 1528361514-25993-1-git-send-email-zhong.li@intel.com
State Committed
Commit 4ce701b4e640d4723a4005d664f31f8342fac40e
Headers show
Series
  • qsvenc: remove vcm option on Linux
Related show

Commit Message

Li, Zhong June 7, 2018, 8:51 a.m.
1. vcm mode is only available for H264.
2. vcm is not supported on Linux, but it is shown when run "./avconv -h
encoder=h264_qsv |grep vcm". This shouldn't happen.

Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavcodec/qsvenc.h      | 1 -
 libavcodec/qsvenc_h264.c | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Luca Barbato June 7, 2018, 2:04 p.m. | #1
On 07/06/2018 10:51, Zhong Li wrote:
> 1. vcm mode is only available for H264.
> 2. vcm is not supported on Linux, but it is shown when run "./avconv -h
> encoder=h264_qsv |grep vcm". This shouldn't happen.
> 
> Signed-off-by: Zhong Li <zhong.li@intel.com>
> ---
>  libavcodec/qsvenc.h      | 1 -
>  libavcodec/qsvenc_h264.c | 3 +++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 

Sure
Maxym Dmytrychenko June 7, 2018, 9:51 p.m. | #2
agree, Luca.

will close it shortly.

On Thu, Jun 7, 2018 at 5:04 PM, Luca Barbato <lu_zero@gentoo.org> wrote:

> On 07/06/2018 10:51, Zhong Li wrote:
> > 1. vcm mode is only available for H264.
> > 2. vcm is not supported on Linux, but it is shown when run "./avconv -h
> > encoder=h264_qsv |grep vcm". This shouldn't happen.
> >
> > Signed-off-by: Zhong Li <zhong.li@intel.com>
> > ---
> >  libavcodec/qsvenc.h      | 1 -
> >  libavcodec/qsvenc_h264.c | 3 +++
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> >
>
> Sure
>
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel

Patch

diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index a7fc57b..bac172f 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -81,7 +81,6 @@ 
 { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_OFF }, INT_MIN, INT_MAX,                                          VE, "la_ds" }, \
 { "2x", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_2x }, INT_MIN, INT_MAX,                                            VE, "la_ds" }, \
 { "4x", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_4x }, INT_MIN, INT_MAX,                                            VE, "la_ds" }, \
-{ "vcm",      "Use the video conferencing mode ratecontrol",  OFFSET(qsv.vcm),      AV_OPT_TYPE_INT, { .i64 = 0  },  0, 1,         VE },        \
 { "rdo",            "Enable rate distortion optimization",    OFFSET(qsv.rdo),            AV_OPT_TYPE_INT, { .i64 = -1 }, -1,          1, VE }, \
 { "max_frame_size", "Maximum encoded frame size in bytes",    OFFSET(qsv.max_frame_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, \
 { "max_slice_size", "Maximum encoded slice size in bytes",    OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, \
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 2ecdb10..2b9401f 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -68,6 +68,9 @@  static const AVOption options[] = {
     QSV_COMMON_OPTS
 
     { "cavlc",          "Enable CAVLC",                           OFFSET(qsv.cavlc),          AV_OPT_TYPE_INT, { .i64 = 0 },   0,          1, VE },
+#if QSV_HAVE_VCM
+    { "vcm",      "Use the video conferencing mode ratecontrol",  OFFSET(qsv.vcm),      AV_OPT_TYPE_INT, { .i64 = 0  },  0, 1,         VE },
+#endif
     { "idr_interval", "Distance (in I-frames) between IDR frames", OFFSET(qsv.idr_interval), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
     { "single_sei_nal_unit",    "Put all the SEI messages into one NALU",        OFFSET(qsv.single_sei_nal_unit),     AV_OPT_TYPE_INT, { .i64 = -1 }, -1,          1, VE },
     { "max_dec_frame_buffering", "Maximum number of frames buffered in the DPB", OFFSET(qsv.max_dec_frame_buffering), AV_OPT_TYPE_INT, { .i64 = 0 },   0, UINT16_MAX, VE },