Skip to content

Commit

Permalink
mfx ai superresを使用可能にするための調整。 ( #212, #215 )
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Sep 23, 2024
1 parent 7a7451d commit 5b93c91
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion QSVEnc/QSVEnc_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,9 @@ API v1.1 … Intel Media SDK v2.0


【どうでもいいメモ】
2024.09.xx (7.70)
2024.09.23 (7.70)
[QSVEncC]
- libplaceboによるリサイズフィルタを追加。(Windows x64版)
- 使用するffmpegのライブラリを更新。(Windows版)
- ffmpeg 7.0 -> 20240902
- dav1d 1.4.1 -> 1.4.3
Expand Down
12 changes: 10 additions & 2 deletions QSVPipeline/qsv_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ mfxU64 CheckVppFeaturesInternal(MFXVideoSession& session, mfxVersion mfxVer) {
videoPrm.ExtParam = (buf.size()) ? &buf[0] : NULL;
videoPrm.AsyncDepth = 3;
videoPrm.IOPattern = (bHardware) ? MFX_IOPATTERN_IN_VIDEO_MEMORY | MFX_IOPATTERN_OUT_VIDEO_MEMORY : MFX_IOPATTERN_IN_SYSTEM_MEMORY | MFX_IOPATTERN_OUT_SYSTEM_MEMORY;
videoPrm.vpp.In.FrameRateExtN = 24000;
videoPrm.vpp.In.FrameRateExtN = 30000;
videoPrm.vpp.In.FrameRateExtD = 1001;
videoPrm.vpp.In.FourCC = MFX_FOURCC_NV12;
videoPrm.vpp.In.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
Expand All @@ -728,7 +728,7 @@ mfxU64 CheckVppFeaturesInternal(MFXVideoSession& session, mfxVersion mfxVer) {
videoPrm.vpp.Out.Width = 1920;
videoPrm.vpp.Out.Height = 1080;
videoPrm.vpp.Out.CropW = 1920;
videoPrm.vpp.Out.CropH = 1088;
videoPrm.vpp.Out.CropH = 1080;

auto check_feature = [&](mfxExtBuffer *structIn, mfxVersion requiredVer, mfxU64 featureNoErr, mfxU64 featureWarn) {
if (check_lib_version(mfxVer, requiredVer)) {
Expand All @@ -751,7 +751,15 @@ mfxU64 CheckVppFeaturesInternal(MFXVideoSession& session, mfxVersion mfxVer) {
check_feature((mfxExtBuffer *)&vppMctf, MFX_LIB_VERSION_1_26, VPP_FEATURE_MCTF, 0x00);
check_feature((mfxExtBuffer *)&vppDenoise2, MFX_LIB_VERSION_2_5, VPP_FEATURE_DENOISE2, 0x00);
check_feature((mfxExtBuffer *)&vppPercEncPre, MFX_LIB_VERSION_2_9, VPP_FEATURE_PERC_ENC_PRE, 0x00);
videoPrm.vpp.Out.Width = videoPrm.vpp.In.Width*2;
videoPrm.vpp.Out.Height = videoPrm.vpp.In.Height*2;
videoPrm.vpp.Out.CropW = videoPrm.vpp.In.Width*2;
videoPrm.vpp.Out.CropH = videoPrm.vpp.In.Height*2;
check_feature((mfxExtBuffer *)&vppAISuperRes, MFX_LIB_VERSION_2_11, VPP_FEATURE_AI_SUPRERES, 0x00);
videoPrm.vpp.Out.Width = 1920;
videoPrm.vpp.Out.Height = 1080;
videoPrm.vpp.Out.CropW = 1920;
videoPrm.vpp.Out.CropH = 1080;

videoPrm.vpp.Out.FrameRateExtN = 60000;
videoPrm.vpp.Out.FrameRateExtD = 1001;
Expand Down
3 changes: 2 additions & 1 deletion QSVPipeline/qsv_vpp_mfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,8 @@ RGY_ERR QSVVppMfx::SetVppExtBuffers(sVppParams& params) {
}
}

if (m_VppDoUseList.size()) {
// 最近はdo useは不要?
if (getCPUGen(&m_mfxSession) < CPU_GEN_HASWELL && m_VppDoUseList.size()) {
INIT_MFX_EXT_BUFFER(m_VppDoUse, MFX_EXTBUFF_VPP_DOUSE);
m_VppDoUse.NumAlg = (mfxU32)m_VppDoUseList.size();
m_VppDoUse.AlgList = &m_VppDoUseList[0];
Expand Down

0 comments on commit 5b93c91

Please sign in to comment.