Skip to content

Commit

Permalink
vppの登録時にMedia SDKのバージョンチェックを追加。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Oct 19, 2018
1 parent a8b1056 commit 04025cd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 19 deletions.
50 changes: 34 additions & 16 deletions QSVPipeline/qsv_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,10 @@ mfxStatus CQSVPipeline::CreateVppExtBuffers(sInputParams *pParams) {
}

if (pParams->vpp.mirrorType != MFX_MIRRORING_DISABLED) {
if (check_lib_version(m_mfxVer, MFX_LIB_VERSION_1_19)) {
PrintMes(RGY_LOG_ERROR, _T("--vpp-mirror not supported on this platform, disabled.\n"));
return MFX_ERR_UNSUPPORTED;
}
INIT_MFX_EXT_BUFFER(m_ExtMirror, MFX_EXTBUFF_VPP_MIRRORING);
m_ExtMirror.Type = (mfxU16)pParams->vpp.mirrorType;
m_VppExtParams.push_back((mfxExtBuffer*)&m_ExtMirror);
Expand Down Expand Up @@ -1438,29 +1442,43 @@ mfxStatus CQSVPipeline::CreateVppExtBuffers(sInputParams *pParams) {
m_VppDoNotUseList.push_back(MFX_EXTBUFF_VPP_DENOISE);
}

if (pParams->vpp.mctf.enable) {
INIT_MFX_EXT_BUFFER(m_ExtMctf, MFX_EXTBUFF_VPP_MCTF);
m_ExtMctf.FilterStrength = (mfxU16)clamp_param_int(pParams->vpp.mctf.strength, 0, QSV_VPP_MCTF_MAX, _T("vpp-mctf"));
m_VppExtParams.push_back((mfxExtBuffer*)&m_ExtMctf);
if (check_lib_version(m_mfxVer, MFX_LIB_VERSION_1_26)) {
if (pParams->vpp.mctf.enable) {
INIT_MFX_EXT_BUFFER(m_ExtMctf, MFX_EXTBUFF_VPP_MCTF);
m_ExtMctf.FilterStrength = (mfxU16)clamp_param_int(pParams->vpp.mctf.strength, 0, QSV_VPP_MCTF_MAX, _T("vpp-mctf"));
m_VppExtParams.push_back((mfxExtBuffer*)&m_ExtMctf);

if (m_ExtMctf.FilterStrength == 0) {
vppExtAddMes(_T("mctf, strength auto\n"));
if (m_ExtMctf.FilterStrength == 0) {
vppExtAddMes(_T("mctf, strength auto\n"));
} else {
vppExtAddMes(strsprintf(_T("mctf, strength %d\n"), m_ExtMctf.FilterStrength));
}
m_VppDoUseList.push_back(MFX_EXTBUFF_VPP_MCTF);
} else {
vppExtAddMes(strsprintf(_T("mctf, strength %d\n"), m_ExtMctf.FilterStrength));
m_VppDoNotUseList.push_back(MFX_EXTBUFF_VPP_MCTF);
}
m_VppDoUseList.push_back(MFX_EXTBUFF_VPP_MCTF);
} else {
m_VppDoNotUseList.push_back(MFX_EXTBUFF_VPP_MCTF);
if (pParams->vpp.mctf.enable) {
PrintMes(RGY_LOG_WARN, _T("--vpp-mctf not supported on this platform, disabled.\n"));
pParams->vpp.mctf.enable = false;
}
}

if (pParams->vpp.imageStabilizer) {
CHECK_RANGE_LIST(pParams->vpp.imageStabilizer, list_vpp_image_stabilizer, "vpp-image-stab");
INIT_MFX_EXT_BUFFER(m_ExtImageStab, MFX_EXTBUFF_VPP_IMAGE_STABILIZATION);
m_ExtImageStab.Mode = (mfxU16)pParams->vpp.imageStabilizer;
m_VppExtParams.push_back((mfxExtBuffer*)&m_ExtImageStab);
if (check_lib_version(m_mfxVer, MFX_LIB_VERSION_1_6)) {
if (pParams->vpp.imageStabilizer) {
CHECK_RANGE_LIST(pParams->vpp.imageStabilizer, list_vpp_image_stabilizer, "vpp-image-stab");
INIT_MFX_EXT_BUFFER(m_ExtImageStab, MFX_EXTBUFF_VPP_IMAGE_STABILIZATION);
m_ExtImageStab.Mode = (mfxU16)pParams->vpp.imageStabilizer;
m_VppExtParams.push_back((mfxExtBuffer*)&m_ExtImageStab);

vppExtAddMes(strsprintf(_T("Stabilizer, mode %s\n"), get_vpp_image_stab_mode_str(m_ExtImageStab.Mode)));
m_VppDoUseList.push_back(MFX_EXTBUFF_VPP_IMAGE_STABILIZATION);
vppExtAddMes(strsprintf(_T("Stabilizer, mode %s\n"), get_vpp_image_stab_mode_str(m_ExtImageStab.Mode)));
m_VppDoUseList.push_back(MFX_EXTBUFF_VPP_IMAGE_STABILIZATION);
}
} else {
if (pParams->vpp.imageStabilizer) {
PrintMes(RGY_LOG_WARN, _T("--vpp-image-stab not supported on this platform, disabled.\n"));
pParams->vpp.imageStabilizer = false;
}
}

m_VppDoNotUseList.push_back(MFX_EXTBUFF_VPP_SCENE_ANALYSIS);
Expand Down
6 changes: 3 additions & 3 deletions QSVPipeline/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

#include "rgy_rev.h"

#define VER_FILEVERSION 0,3,10,0
#define VER_STR_FILEVERSION "3.10"
#define VER_STR_FILEVERSION_TCHAR _T("3.10")
#define VER_FILEVERSION 0,3,11,0
#define VER_STR_FILEVERSION "3.11"
#define VER_STR_FILEVERSION_TCHAR _T("3.11")

#ifdef _M_IX86
#define BUILD_ARCH_STR _T("x86")
Expand Down

0 comments on commit 04025cd

Please sign in to comment.