]> granicus.if.org Git - handbrake/commitdiff
encx265: Use HB_PROJECT_FEATURE_X265 instead of USE_X265
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 17 Apr 2019 16:04:28 +0000 (10:04 -0600)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 17 Apr 2019 17:25:12 +0000 (11:25 -0600)
libhb/common.c
libhb/common.h
libhb/encx265.c
libhb/hb.c
libhb/hb_dict.c
libhb/module.defs
libhb/project.h.m4
libhb/work.c

index fa19a94352df289bf974595a5bafc7d6f13c0737..5efb9fee24dca3dbfe7c12e9628a92186a879674 100644 (file)
@@ -23,7 +23,7 @@
 #include "qsv_common.h"
 #endif
 
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
 #include "x265.h"
 #endif
 
@@ -318,7 +318,7 @@ static int hb_video_encoder_is_enabled(int encoder, int disable_hardware)
         case HB_VCODEC_FFMPEG_VP9:
             return 1;
 
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
         case HB_VCODEC_X265_8BIT:
         case HB_VCODEC_X265_10BIT:
         case HB_VCODEC_X265_12BIT:
@@ -1480,7 +1480,7 @@ const char* const* hb_video_encoder_get_presets(int encoder)
         case HB_VCODEC_X264_10BIT:
             return x264_preset_names;
 
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
         case HB_VCODEC_X265_8BIT:
         case HB_VCODEC_X265_10BIT:
         case HB_VCODEC_X265_12BIT:
@@ -1500,7 +1500,7 @@ const char* const* hb_video_encoder_get_tunes(int encoder)
         case HB_VCODEC_X264_10BIT:
             return x264_tune_names;
 
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
         case HB_VCODEC_X265_8BIT:
         case HB_VCODEC_X265_10BIT:
         case HB_VCODEC_X265_12BIT:
index 14a16f620a73901603f493716d981146d32c0f30..cb307e0794d81e3418da1697c082355966fcd8d1 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef HB_COMMON_H
 #define HB_COMMON_H
 
+#include "project.h"
 #include "hbtypes.h"
 #include "hb_dict.h"
 #include <math.h>
@@ -1432,7 +1433,7 @@ char * hb_x264_param_unparse(int bit_depth, const char *x264_preset,
 // x264 option name/synonym helper
 const char * hb_x264_encopt_name( const char * name );
 
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
 // x265 option name/synonym helper
 const char * hb_x265_encopt_name( const char * name );
 #endif
index 5e6600819eb6d17f00ed1efd22e89d79885c3b78..30bde6565d8f6ac23f4c85c4f0e614a2ad8feb7d 100644 (file)
@@ -6,7 +6,10 @@
    It may be used under the terms of the GNU General Public License v2.
    For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
  */
-#ifdef USE_X265
+
+#include "project.h"
+
+#if HB_PROJECT_FEATURE_X265
 
 #include "hb.h"
 #include "hb_dict.h"
index 2032a42eef7feea4f7629a10386080ce19df15ca..ba40d9c37a283c6023537e3c50d644d87f95a918 100644 (file)
@@ -1703,7 +1703,7 @@ int hb_global_init()
     hb_register(&hb_enctheora);
     hb_register(&hb_encvorbis);
     hb_register(&hb_encx264);
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
     hb_register(&hb_encx265);
 #endif
 #ifdef USE_QSV
index 2f26f14264c1a43764fb1dbd65407ab4451f58e0..2894c62ac7a46a53777408880800ef2af435e146 100644 (file)
@@ -826,7 +826,7 @@ hb_dict_t * hb_encopts_to_dict(const char * encopts, int encoder)
                 // x264 has multiple names for some options
                 if (encoder & HB_VCODEC_X264_MASK)
                     name = hb_x264_encopt_name(name);
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
                 // x265 has multiple names for some options
                 if (encoder & HB_VCODEC_X265_MASK)
                     name = hb_x265_encopt_name(name);
index a97b59d94d3d765ba19d5bf8959eea62837598b8..9e3f3dad4192f3cc1adc77348e658a6e072ebbe2 100644 (file)
@@ -91,10 +91,6 @@ ifeq (1,$(FEATURE.nvenc))
     LIBHB.GCC.D += USE_NVENC
 endif
 
-ifeq (1,$(FEATURE.x265))
-    LIBHB.GCC.D += USE_X265
-endif
-
 ifeq (1,$(COMPAT.strtok_r))
     LIBHB.GCC.D += HB_NEED_STRTOK_R
 endif
index 8558890e1defdcce0c023ad5c06bcf2aa9100985..ff727e006a5f8a55d97ce74068908b1bb1e60277 100644 (file)
@@ -39,18 +39,18 @@ dnl
 <<#>>define HB_PROJECT_HOST_TITLE                "__HOST_title"
 <<#>>define HB_PROJECT_HOST_ARCH                 "__HOST_arch"
 
-<<#>>define HB_PROJECT_FEATURE_asm               __FEATURE_asm
-<<#>>define HB_PROJECT_FEATURE_fdk_aac           __FEATURE_fdk_aac
-<<#>>define HB_PROJECT_FEATURE_ffmpeg_aac        __FEATURE_ffmpeg_aac
-<<#>>define HB_PROJECT_FEATURE_flatpak           __FEATURE_flatpak
-<<#>>define HB_PROJECT_FEATURE_gtk               __FEATURE_gtk
-<<#>>define HB_PROJECT_FEATURE_gtk_mingw         __FEATURE_gtk_mingw
-<<#>>define HB_PROJECT_FEATURE_gtk_update_checks __FEATURE_gtk_update_checks
-<<#>>define HB_PROJECT_FEATURE_gst               __FEATURE_gst
-<<#>>define HB_PROJECT_FEATURE_nvenc             __FEATURE_nvenc
-<<#>>define HB_PROJECT_FEATURE_qsv               __FEATURE_qsv
-<<#>>define HB_PROJECT_FEATURE_vce               __FEATURE_vce
-<<#>>define HB_PROJECT_FEATURE_x265              __FEATURE_x265
-<<#>>define HB_PROJECT_FEATURE_numa              __FEATURE_numa
+<<#>>define HB_PROJECT_FEATURE_ASM               __FEATURE_asm
+<<#>>define HB_PROJECT_FEATURE_FDK_AAC           __FEATURE_fdk_aac
+<<#>>define HB_PROJECT_FEATURE_FFMPEG_AAC        __FEATURE_ffmpeg_aac
+<<#>>define HB_PROJECT_FEATURE_FLATPAK           __FEATURE_flatpak
+<<#>>define HB_PROJECT_FEATURE_GTK               __FEATURE_gtk
+<<#>>define HB_PROJECT_FEATURE_GTK_MINGW         __FEATURE_gtk_mingw
+<<#>>define HB_PROJECT_FEATURE_GTK_UPDATE_CHECKS __FEATURE_gtk_update_checks
+<<#>>define HB_PROJECT_FEATURE_GST               __FEATURE_gst
+<<#>>define HB_PROJECT_FEATURE_NVENC             __FEATURE_nvenc
+<<#>>define HB_PROJECT_FEATURE_QSV               __FEATURE_qsv
+<<#>>define HB_PROJECT_FEATURE_VCE               __FEATURE_vce
+<<#>>define HB_PROJECT_FEATURE_X265              __FEATURE_x265
+<<#>>define HB_PROJECT_FEATURE_NUMA              __FEATURE_numa
 
 #endif /* HB_PROJECT_PROJECT_H */
index 76fef1bf35d0fe6131c66c502fec265f258b738f..4d7ceba423f3aaf060df4a68f114a2d3411461ad 100644 (file)
@@ -256,7 +256,7 @@ hb_work_object_t* hb_video_encoder(hb_handle_t *h, int vcodec)
         case HB_VCODEC_THEORA:
             w = hb_get_work(h, WORK_ENCTHEORA);
             break;
-#ifdef USE_X265
+#if HB_PROJECT_FEATURE_X265
         case HB_VCODEC_X265_8BIT:
         case HB_VCODEC_X265_10BIT:
         case HB_VCODEC_X265_12BIT: