]> granicus.if.org Git - handbrake/commitdiff
vce: use HB_PROJECT_FEATURE_VCE instead of USE_VCE
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 17 Apr 2019 16:43:25 +0000 (10:43 -0600)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 17 Apr 2019 17:25:13 +0000 (11:25 -0600)
libhb/common.c
libhb/module.defs
libhb/vce_common.c
libhb/work.c

index 8ddb594eeb65eb7850685e54869b7817895815f2..b99fc9fa01b69782b077543ae3561543cb51a22f 100644 (file)
@@ -34,8 +34,7 @@
 #if HB_PROJECT_FEATURE_NVENC
 #include "nvenc_common.h"
 #endif
-
-#ifdef USE_VCE
+#if HB_PROJECT_FEATURE_VCE
 #include "vce_common.h"
 #endif
 
@@ -284,7 +283,7 @@ static int hb_video_encoder_is_enabled(int encoder, int disable_hardware)
 #endif
 
         switch (encoder){
-#ifdef USE_VCE
+#if HB_PROJECT_FEATURE_VCE
             case HB_VCODEC_FFMPEG_VCE_H264:
                return hb_vce_h264_available();
             case HB_VCODEC_FFMPEG_VCE_H265:
@@ -1537,7 +1536,7 @@ const char* const* hb_video_encoder_get_profiles(int encoder)
         case HB_VCODEC_X265_16BIT:
             return hb_h265_profile_names_16bit;
 
-#ifdef USE_VCE
+#if HB_PROJECT_FEATURE_VCE
         case HB_VCODEC_FFMPEG_VCE_H264:
             return hb_vce_h264_profile_names;
         case HB_VCODEC_FFMPEG_VCE_H265:
@@ -1571,7 +1570,7 @@ const char* const* hb_video_encoder_get_levels(int encoder)
         case HB_VCODEC_FFMPEG_VT_H264:
             return hb_h264_level_names;
 
-#ifdef USE_VCE
+#if HB_PROJECT_FEATURE_VCE
      case HB_VCODEC_FFMPEG_VCE_H264:
             return hb_vce_h264_level_names; // Not quite the same as x264
 #endif
index e6e88ae919aa8b3a0ba4d9ae6ad2193a8fcd1b41..686e1279846a59827488da2570f7bb0d9883a031 100644 (file)
@@ -83,10 +83,6 @@ ifeq (1,$(FEATURE.qsv))
     LIBHB.GCC.D += HAVE_THREADS=1
 endif
 
-ifeq (1,$(FEATURE.vce))
-    LIBHB.GCC.D += USE_VCE
-endif
-
 ifeq (1,$(COMPAT.strtok_r))
     LIBHB.GCC.D += HB_NEED_STRTOK_R
 endif
index d0bb2a00589bbe0d37c86d8e8b994cbfaafbad02..632bf975726d925cb5800bc76e0c232dc0e7e9d1 100644 (file)
@@ -7,7 +7,9 @@
  * For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
  */
 
-#ifdef USE_VCE
+#include "project.h"
+
+#if HB_PROJECT_FEATURE_VCE
 #include "AMF/core/Factory.h"
 #include "AMF/components/VideoEncoderVCE.h"
 #include "AMF/components/VideoEncoderHEVC.h"
@@ -116,7 +118,7 @@ int hb_vce_h265_available()
     return (check_component_available(AMFVideoEncoder_HEVC) == AMF_OK) ? 1 : 0;
 }
 
-#else // !USE_VCE
+#else // !HB_PROJECT_FEATURE_VCE
 
 int hb_vce_h264_available()
 {
@@ -128,4 +130,4 @@ int hb_vce_h265_available()
     return 0;
 }
 
-#endif // USE_VCE
+#endif // HB_PROJECT_FEATURE_VCE
index 72a8cfd1b22b90437378ae4ad8db4e1ee3ffd960..a20f33dbd98431257817ec4e1cb7dfbc29a4c594 100644 (file)
@@ -264,7 +264,7 @@ hb_work_object_t* hb_video_encoder(hb_handle_t *h, int vcodec)
             w = hb_get_work(h, WORK_ENCX265);
             break;
 #endif
-#ifdef USE_VCE
+#if HB_PROJECT_FEATURE_VCE
         case HB_VCODEC_FFMPEG_VCE_H264:
             w = hb_get_work(h, WORK_ENCAVCODEC);
             w->codec_param = AV_CODEC_ID_H264;