summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-04-17 10:39:01 -0600
committerJohn Stebbins <[email protected]>2019-04-17 11:25:13 -0600
commit4f78a721fd33fc828e61f9ce9462b7ba06eccbbb (patch)
treed4586ec46aab311a1aa3fc81d2c87183bb3e256a /libhb
parent76e9755eb71c500ba6a69c97c959f118873e5389 (diff)
nvenc: use HB_PROJECT_FEATURE_NVENC instead of USE_NVENC
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c4
-rw-r--r--libhb/module.defs4
-rw-r--r--libhb/nvenc_common.c8
-rw-r--r--libhb/work.c2
4 files changed, 7 insertions, 11 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 2b303b03d..8ddb594ee 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -31,7 +31,7 @@
#include <windows.h>
#endif
-#ifdef USE_NVENC
+#if HB_PROJECT_FEATURE_NVENC
#include "nvenc_common.h"
#endif
@@ -291,7 +291,7 @@ static int hb_video_encoder_is_enabled(int encoder, int disable_hardware)
return hb_vce_h265_available();
#endif
-#ifdef USE_NVENC
+#if HB_PROJECT_FEATURE_NVENC
case HB_VCODEC_FFMPEG_NVENC_H264:
return hb_nvenc_h264_available();
case HB_VCODEC_FFMPEG_NVENC_H265:
diff --git a/libhb/module.defs b/libhb/module.defs
index e26b769bb..e6e88ae91 100644
--- a/libhb/module.defs
+++ b/libhb/module.defs
@@ -87,10 +87,6 @@ ifeq (1,$(FEATURE.vce))
LIBHB.GCC.D += USE_VCE
endif
-ifeq (1,$(FEATURE.nvenc))
- LIBHB.GCC.D += USE_NVENC
-endif
-
ifeq (1,$(COMPAT.strtok_r))
LIBHB.GCC.D += HB_NEED_STRTOK_R
endif
diff --git a/libhb/nvenc_common.c b/libhb/nvenc_common.c
index 478b2997e..15d839e2d 100644
--- a/libhb/nvenc_common.c
+++ b/libhb/nvenc_common.c
@@ -10,7 +10,7 @@
#include "hbffmpeg.h"
#include "hb.h"
-#ifdef USE_NVENC
+#if HB_PROJECT_FEATURE_NVENC
#include <ffnvcodec/nvEncodeAPI.h>
#include <ffnvcodec/dynlink_loader.h>
#endif
@@ -19,7 +19,7 @@ int hb_check_nvenc_available();
int hb_nvenc_h264_available()
{
- #ifdef USE_NVENC
+ #if HB_PROJECT_FEATURE_NVENC
return hb_check_nvenc_available();
#else
return 0;
@@ -28,7 +28,7 @@ int hb_nvenc_h264_available()
int hb_nvenc_h265_available()
{
- #ifdef USE_NVENC
+ #if HB_PROJECT_FEATURE_NVENC
return hb_check_nvenc_available();
#else
return 0;
@@ -42,7 +42,7 @@ int hb_check_nvenc_available()
return 0;
}
- #ifdef USE_NVENC
+ #if HB_PROJECT_FEATURE_NVENC
uint32_t nvenc_ver;
void *context = NULL;
NvencFunctions *nvenc_dl = NULL;
diff --git a/libhb/work.c b/libhb/work.c
index 41a705896..72a8cfd1b 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -274,7 +274,7 @@ hb_work_object_t* hb_video_encoder(hb_handle_t *h, int vcodec)
w->codec_param = AV_CODEC_ID_HEVC;
break;
#endif
-#ifdef USE_NVENC
+#if HB_PROJECT_FEATURE_NVENC
case HB_VCODEC_FFMPEG_NVENC_H264:
w = hb_get_work(h, WORK_ENCAVCODEC);
w->codec_param = AV_CODEC_ID_H264;