[FFmpeg-devel] [PATCH 2/2] lavc/qsvenc: add error messeage if ICQ unsupported.
Zhong Li
zhong.li at intel.com
Thu Dec 7 08:24:20 EET 2017
Signed-off-by: Zhong Li <zhong.li at intel.com>
---
libavcodec/qsvenc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index fbd4d85..f4c8df4 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -287,6 +287,12 @@ static int select_rc_mode(AVCodecContext *avctx, QSVEncContext *q)
return AVERROR(EINVAL);
}
+ if (!want_qscale && avctx->global_quality > 0 && !QSV_HAVE_ICQ){
+ av_log(avctx, AV_LOG_ERROR,
+ "ICQ ratecontrol mode requested, but is not supported by this SDK version\n");
+ return AVERROR(ENOSYS);
+ }
+
if (want_qscale) {
rc_mode = MFX_RATECONTROL_CQP;
rc_desc = "constant quantization parameter (CQP)";
--
1.8.3.1
More information about the ffmpeg-devel
mailing list