summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorGyan Doshi <ffmpeg@gyani.pro>2021-07-11 10:08:33 +0530
committerGyan Doshi <ffmpeg@gyani.pro>2021-07-12 09:33:22 +0530
commit1aa9dcd091ed9cebf06c4c6a9c96ff80a54722f4 (patch)
tree0d8c7288a4d96e7e1d6508dffdadfb7a635bdfc8 /libavcodec
parent6f9570a63314051b3b333918eb13caae7498d6a4 (diff)
avcodec/qsvenc: clip global_quality for ICQ modes.
Allowed range is 1 to 51. Ref: https://software.intel.com/content/www/us/en/develop/articles/advanced-bitrate-control-methods-in-intel-media-sdk.html
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index ca2b42cafd..b9a922d6b9 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -650,7 +650,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
case MFX_RATECONTROL_LA_ICQ:
q->extco2.LookAheadDepth = q->look_ahead_depth;
case MFX_RATECONTROL_ICQ:
- q->param.mfx.ICQQuality = avctx->global_quality;
+ q->param.mfx.ICQQuality = av_clip(avctx->global_quality, 1, 51);
break;
#endif
#endif