diff --git a/NVEncCore/rgy_cmd.cpp b/NVEncCore/rgy_cmd.cpp index 9fea7bee..5131f75c 100644 --- a/NVEncCore/rgy_cmd.cpp +++ b/NVEncCore/rgy_cmd.cpp @@ -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; } @@ -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(); } @@ -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 [][,]...\n") _T(" check performance info of encoder and output to log file\n") diff --git a/NVEncCore/rgy_prm.cpp b/NVEncCore/rgy_prm.cpp index 481a3f35..99085a29 100644 --- a/NVEncCore/rgy_prm.cpp +++ b/NVEncCore/rgy_prm.cpp @@ -76,6 +76,7 @@ static const auto VPPTYPE_TO_STR = make_array>( 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")), @@ -99,6 +100,7 @@ static const auto VPPTYPE_TO_STR = make_array>( 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")); @@ -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 @@ -2287,6 +2289,7 @@ RGYParamControl::RGYParamControl() : avsdll(), vsdir(), enableOpenCL(true), + enableVulkan(true), avoidIdleClock(), outputBufSizeMB(RGY_OUTPUT_BUF_MB_DEFAULT) { diff --git a/NVEncCore/rgy_prm.h b/NVEncCore/rgy_prm.h index de30d1b9..350f5987 100644 --- a/NVEncCore/rgy_prm.h +++ b/NVEncCore/rgy_prm.h @@ -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) @@ -132,6 +132,7 @@ enum class VppType : int { CL_CROP, CL_COLORSPACE, + CL_LIBPLACEBO_TONEMAP, CL_AFS, CL_NNEDI, CL_YADIF, @@ -164,6 +165,7 @@ enum class VppType : int { CL_OVERLAY, CL_DEBAND, + CL_LIBPLACEBO_DEBAND, CL_FRUC, @@ -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, @@ -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 @@ -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); @@ -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 }, @@ -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 }, @@ -2446,6 +2448,7 @@ struct RGYParamControl { tstring avsdll; tstring vsdir; bool enableOpenCL; + bool enableVulkan; RGYParamAvoidIdleClock avoidIdleClock; int outputBufSizeMB; //出力バッファサイズ