Skip to content

Commit

Permalink
QSVEncの更新を反映。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Oct 21, 2024
1 parent 9fbc037 commit 440c6cf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
11 changes: 11 additions & 0 deletions NVEncCore/rgy_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6768,6 +6768,14 @@ int parse_one_ctrl_option(const TCHAR *option_name, const TCHAR *strInput[], int
return 0;
}
#endif
if (IS_OPTION("disable-vulkan")) {
ctrl->enableVulkan = false;
return 0;
}
if (IS_OPTION("enable-vulkan")) {
ctrl->enableVulkan = true;
return 0;
}
return -10;
}

Expand Down Expand Up @@ -8111,6 +8119,7 @@ tstring gen_cmd(const RGYParamControl *param, const RGYParamControl *defaultPrm,
#if ENCODER_QSV || ENCODER_VCEENC || ENCODER_MPP
OPT_BOOL(_T("--enable-opencl"), _T("--disable-opencl"), enableOpenCL);
#endif
OPT_BOOL(_T("--enable-vulkan"), _T("--disable-vulkan"), enableVulkan);
return cmd.str();
}

Expand Down Expand Up @@ -9217,6 +9226,8 @@ tstring gen_cmd_help_ctrl() {
str += strsprintf(_T("\n")
_T(" --disable-opencl disable opencl features.\n"));
#endif
str += strsprintf(_T("\n")
_T(" --disable-vulkan disable vulkan features.\n"));
str += strsprintf(_T("\n")
_T(" --perf-monitor [<string>][,<string>]...\n")
_T(" check performance info of encoder and output to log file\n")
Expand Down
5 changes: 4 additions & 1 deletion NVEncCore/rgy_prm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static const auto VPPTYPE_TO_STR = make_array<std::pair<VppType, tstring>>(
std::make_pair(VppType::RGA_RESIZE, _T("rga_resize")),
#endif //#if ENCODER_VCEENC
std::make_pair(VppType::CL_COLORSPACE, _T("colorspace")),
std::make_pair(VppType::CL_LIBPLACEBO_TONEMAP, _T("libplacebo-tonemapping")),
std::make_pair(VppType::CL_AFS, _T("afs")),
std::make_pair(VppType::CL_NNEDI, _T("nnedi")),
std::make_pair(VppType::CL_YADIF, _T("yadif")),
Expand All @@ -99,6 +100,7 @@ static const auto VPPTYPE_TO_STR = make_array<std::pair<VppType, tstring>>(
std::make_pair(VppType::CL_CURVES, _T("curves")),
std::make_pair(VppType::CL_TWEAK, _T("tweak")),
std::make_pair(VppType::CL_DEBAND, _T("deband")),
std::make_pair(VppType::CL_LIBPLACEBO_DEBAND, _T("libplacebo-deband")),
std::make_pair(VppType::CL_PAD, _T("pad"))
);
MAP_PAIR_0_1(vppfilter, type, VppType, str, tstring, VPPTYPE_TO_STR, VppType::VPP_NONE, _T("none"));
Expand Down Expand Up @@ -231,7 +233,7 @@ RGY_VPP_RESIZE_TYPE getVppResizeType(RGY_VPP_RESIZE_ALGO resize) {
} else if (resize < RGY_VPP_RESIZE_NGX_MAX) {
return RGY_VPP_RESIZE_TYPE_NGX;
#endif
#if (ENCODER_NVENC && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
#if ((ENCODER_NVENC || ENCODER_QSV) && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
} else if (resize < RGY_VPP_RESIZE_LIBPLACEBO_MAX) {
return RGY_VPP_RESIZE_TYPE_LIBPLACEBO;
#endif
Expand Down Expand Up @@ -2287,6 +2289,7 @@ RGYParamControl::RGYParamControl() :
avsdll(),
vsdir(),
enableOpenCL(true),
enableVulkan(true),
avoidIdleClock(),
outputBufSizeMB(RGY_OUTPUT_BUF_MB_DEFAULT) {

Expand Down
15 changes: 9 additions & 6 deletions NVEncCore/rgy_prm.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static const int RGY_AUDIO_QUALITY_DEFAULT = 0;
#define ENABLE_VPP_FILTER_TWEAK (ENCODER_QSV || ENCODER_NVENC || ENCODER_VCEENC || ENCODER_MPP || CLFILTERS_AUF)
#define ENABLE_VPP_FILTER_OVERLAY (ENCODER_QSV || ENCODER_NVENC || ENCODER_VCEENC || ENCODER_MPP)
#define ENABLE_VPP_FILTER_DEBAND (ENCODER_QSV || ENCODER_NVENC || ENCODER_VCEENC || ENCODER_MPP || CLFILTERS_AUF)
#define ENABLE_VPP_FILTER_LIBPLACEBO (ENABLE_LIBPLACEBO && ENCODER_NVENC)
#define ENABLE_VPP_FILTER_LIBPLACEBO (ENABLE_LIBPLACEBO && (ENCODER_QSV || ENCODER_NVENC))
#define ENABLE_VPP_FILTER_FRUC ( ENCODER_NVENC)
#define ENABLE_VPP_FILTER_DELOGO_MULTIADD ( ENCODER_NVENC)
#define ENABLE_VPP_ORDER (CLFILTERS_AUF)
Expand Down Expand Up @@ -132,6 +132,7 @@ enum class VppType : int {

CL_CROP,
CL_COLORSPACE,
CL_LIBPLACEBO_TONEMAP,
CL_AFS,
CL_NNEDI,
CL_YADIF,
Expand Down Expand Up @@ -164,6 +165,7 @@ enum class VppType : int {
CL_OVERLAY,

CL_DEBAND,
CL_LIBPLACEBO_DEBAND,

CL_FRUC,

Expand Down Expand Up @@ -529,7 +531,7 @@ enum RGY_VPP_RESIZE_ALGO {
RGY_VPP_RESIZE_NGX_VSR,
RGY_VPP_RESIZE_NGX_MAX,
#endif
#if (ENCODER_NVENC && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
#if ((ENCODER_NVENC || ENCODER_QSV) && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
RGY_VPP_RESIZE_LIBPLACEBO_SPLINE16,
RGY_VPP_RESIZE_LIBPLACEBO_SPLINE36,
RGY_VPP_RESIZE_LIBPLACEBO_SPLINE64,
Expand Down Expand Up @@ -589,7 +591,7 @@ enum RGY_VPP_RESIZE_TYPE {
RGY_VPP_RESIZE_TYPE_NVVFX,
RGY_VPP_RESIZE_TYPE_NGX,
#endif
#if (ENCODER_NVENC && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
#if ((ENCODER_NVENC || ENCODER_QSV) && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
RGY_VPP_RESIZE_TYPE_LIBPLACEBO,
#endif
#if ENCODER_VCEENC
Expand Down Expand Up @@ -632,7 +634,7 @@ static bool isNgxResizeFiter(const RGY_VPP_RESIZE_ALGO interp) {
}

static bool isLibplaceboResizeFiter(const RGY_VPP_RESIZE_ALGO interp) {
#if (ENCODER_NVENC && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
#if ((ENCODER_NVENC || ENCODER_QSV) && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
return getVppResizeType(interp) == RGY_VPP_RESIZE_TYPE_LIBPLACEBO;
#else
UNREFERENCED_PARAMETER(interp);
Expand Down Expand Up @@ -691,7 +693,7 @@ const CX_DESC list_vpp_resize[] = {
#if ENCODER_NVENC && (!defined(_M_IX86) || FOR_AUO) || CUFILTERS || CLFILTERS_AUF
{ _T("ngx-vsr"), RGY_VPP_RESIZE_NGX_VSR },
#endif
#if (ENCODER_NVENC && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
#if ((ENCODER_NVENC || ENCODER_QSV) && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
{ _T("libplacebo-spline16"), RGY_VPP_RESIZE_LIBPLACEBO_SPLINE16 },
{ _T("libplacebo-spline36"), RGY_VPP_RESIZE_LIBPLACEBO_SPLINE36 },
{ _T("libplacebo-spline64"), RGY_VPP_RESIZE_LIBPLACEBO_SPLINE64 },
Expand Down Expand Up @@ -772,7 +774,7 @@ const CX_DESC list_vpp_resize_help[] = {
#if ENCODER_NVENC && (!defined(_M_IX86) || FOR_AUO) || CUFILTERS || CLFILTERS_AUF
{ _T("ngx-vsr"), RGY_VPP_RESIZE_NGX_VSR },
#endif
#if (ENCODER_NVENC && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
#if ((ENCODER_NVENC || ENCODER_QSV) && (ENABLE_VPP_FILTER_LIBPLACEBO || FOR_AUO)) || CUFILTERS || CLFILTERS_AUF
{ _T("libplacebo-spline16"), RGY_VPP_RESIZE_LIBPLACEBO_SPLINE16 },
{ _T("libplacebo-spline36"), RGY_VPP_RESIZE_LIBPLACEBO_SPLINE36 },
{ _T("libplacebo-spline64"), RGY_VPP_RESIZE_LIBPLACEBO_SPLINE64 },
Expand Down Expand Up @@ -2446,6 +2448,7 @@ struct RGYParamControl {
tstring avsdll;
tstring vsdir;
bool enableOpenCL;
bool enableVulkan;
RGYParamAvoidIdleClock avoidIdleClock;

int outputBufSizeMB; //出力バッファサイズ
Expand Down

0 comments on commit 440c6cf

Please sign in to comment.