]> granicus.if.org Git - handbrake/commitdiff
QSV: fix ICQ availability detection for HEVC encoder.
authorTim Walker <tdskywalker@gmail.com>
Thu, 4 Jan 2018 00:02:42 +0000 (01:02 +0100)
committerTim Walker <tdskywalker@gmail.com>
Thu, 4 Jan 2018 00:08:50 +0000 (01:08 +0100)
Explicitly set all relevant rate control parameters when
querying for availability of a given rate control method.

I still "blame" Intel, as the existing code managed to
query ICQ availability for the H.264 encoder just fine.

libhb/qsv_common.c

index 0d82274fdf045084a18d9b304ed37c04f2e9e934..3470f49e3ba82f66d7c6940d2a17a0c8e8e37885 100644 (file)
@@ -397,6 +397,7 @@ static int query_capabilities(mfxSession session, mfxVersion version, hb_qsv_inf
             init_video_param(&inputParam);
             inputParam.mfx.CodecId           = info->codec_id;
             inputParam.mfx.RateControlMethod = MFX_RATECONTROL_LA;
+            inputParam.mfx.TargetKbps        = 5000;
 
             memset(&videoParam, 0, sizeof(mfxVideoParam));
             videoParam.mfx.CodecId = inputParam.mfx.CodecId;
@@ -411,6 +412,7 @@ static int query_capabilities(mfxSession session, mfxVersion version, hb_qsv_inf
                 inputParam.mfx.CodecId             = info->codec_id;
                 inputParam.mfx.RateControlMethod   = MFX_RATECONTROL_LA;
                 inputParam.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_TFF;
+                inputParam.mfx.TargetKbps          = 5000;
 
                 memset(&videoParam, 0, sizeof(mfxVideoParam));
                 videoParam.mfx.CodecId = inputParam.mfx.CodecId;
@@ -428,6 +430,7 @@ static int query_capabilities(mfxSession session, mfxVersion version, hb_qsv_inf
             init_video_param(&inputParam);
             inputParam.mfx.CodecId           = info->codec_id;
             inputParam.mfx.RateControlMethod = MFX_RATECONTROL_ICQ;
+            inputParam.mfx.ICQQuality        = 20;
 
             memset(&videoParam, 0, sizeof(mfxVideoParam));
             videoParam.mfx.CodecId = inputParam.mfx.CodecId;