]> granicus.if.org Git - handbrake/commitdiff
libhb: test: Guard VCE encoders behind USE_VCE.
authorBradley Sepos <bradley@bradleysepos.com>
Fri, 8 Jun 2018 20:33:23 +0000 (16:33 -0400)
committerBradley Sepos <bradley@bradleysepos.com>
Fri, 8 Jun 2018 20:34:52 +0000 (16:34 -0400)
Fixes #1403.

libhb/common.c
libhb/module.defs
libhb/work.c
test/module.defs

index 9c1c42f320c67d865a5cb427cae0c64aafec5dd3..a552444270ac65eff233ec6f818685be8ba7d810 100644 (file)
@@ -267,9 +267,13 @@ static int hb_video_encoder_is_enabled(int encoder)
         case HB_VCODEC_FFMPEG_MPEG2:
         case HB_VCODEC_FFMPEG_VP8:
         case HB_VCODEC_FFMPEG_VP9:
+            return 1;
+
+#ifdef USE_VCE
         case HB_VCODEC_FFMPEG_VCE_H264:
         case HB_VCODEC_FFMPEG_VCE_H265:
             return 1;
+#endif
 
 #ifdef USE_X265
         case HB_VCODEC_X265_8BIT:
index 99e2b4cfa20e0690ed39a35d23b677d757fb568b..6afb6f403aee8806c973705a18fc506ffc81d5ea 100644 (file)
@@ -82,6 +82,10 @@ ifeq (1,$(FEATURE.qsv))
     LIBHB.GCC.D += USE_QSV HAVE_THREADS=1
 endif
 
+ifeq (1,$(FEATURE.vce))
+    LIBHB.GCC.D += USE_VCE
+endif
+
 ifeq (1,$(FEATURE.x265))
     LIBHB.GCC.D += USE_X265
 endif
index 19d78b2e43bed80ce08ecce52de74d025e7ec057..1400fee1f07195c33b347082e44555077586a4fc 100644 (file)
@@ -243,6 +243,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
         case HB_VCODEC_FFMPEG_VCE_H264:
             w = hb_get_work(h, WORK_ENCAVCODEC);
             w->codec_param = AV_CODEC_ID_H264;
@@ -251,6 +252,7 @@ hb_work_object_t* hb_video_encoder(hb_handle_t *h, int vcodec)
             w = hb_get_work(h, WORK_ENCAVCODEC);
             w->codec_param = AV_CODEC_ID_HEVC;
             break;
+#endif
         default:
             hb_error("Unknown video codec (0x%x)", vcodec );
     }
index 459571067ed67de7a88dcfb8afcfed274af52d88..85b13793d1666b985953f804156ef0cbd2c57b01 100644 (file)
@@ -30,6 +30,10 @@ ifeq ($(BUILD.system),linux)
 endif
 endif
 
+ifeq (1,$(FEATURE.vce))
+    TEST.GCC.D += USE_VCE
+endif
+
 ifeq (1,$(FEATURE.x265))
     TEST.GCC.D += USE_X265
 endif