aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLi, Zhong <zhong.li@intel.com>2017-12-07 14:44:27 +0800
committerMaxym Dmytrychenko <maxim.d33@gmail.com>2017-12-12 13:58:18 +0100
commit7c65a76b16bc3a44f1592acde2176f187a058797 (patch)
treedd13ad0f52a059eeb8823513f6c279264fc7908b /libavcodec
parentbddb2ce179c57db6e3c79fdc3363c165d90850b0 (diff)
downloadffmpeg-7c65a76b16bc3a44f1592acde2176f187a058797.tar.gz
lavc/qsvenc: add error messeage if ICQ unsupported.
Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index f6034c443d..5eacf3ca88 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -295,6 +295,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)";