libscaler: properly guard M2M1SHOT
authorJan Altensen <info@stricted.net>
Sun, 4 Oct 2020 09:36:34 +0000 (11:36 +0200)
committerJan Altensen <info@stricted.net>
Thu, 8 Oct 2020 03:38:41 +0000 (05:38 +0200)
Change-Id: Ibf32554e0d6ba087ea36a610051fb588eaa4958e

include/exynos_scaler.h
libscaler/Android.mk
libscaler/libscaler.cpp

index d6246c6ece42b436e4370f2a869ec992fcbb7972..ab08b9a19199c43fca85ffbed20d569cc0c7b436 100644 (file)
@@ -444,10 +444,11 @@ enum SC_FMT_PXINFO {
  *   true on success in copying pixel data.
  *   false on failure.
  */
+#ifdef SCALER_USE_M2M1SHOT
 bool exynos_sc_copy_pixels(
     struct exynos_sc_pxinfo *pxinfo,
     int dev_num);
-
+#endif
 #ifdef __cplusplus
 }
 #endif
index 6c58b90848d39948dbb8474de5d7a4a846133237..563cadc5977991bbc9f38c0b921204e5bff042a0 100644 (file)
@@ -27,9 +27,10 @@ LOCAL_C_INCLUDES := \
 LOCAL_ADDITIONAL_DEPENDENCIES += \
        $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
 
-LOCAL_SRC_FILES := libscaler.cpp libscaler-v4l2.cpp libscalerblend-v4l2.cpp libscaler-m2m1shot.cpp libscaler-swscaler.cpp
+LOCAL_SRC_FILES := libscaler.cpp libscaler-v4l2.cpp libscalerblend-v4l2.cpp libscaler-swscaler.cpp
 ifeq ($(BOARD_USES_SCALER_M2M1SHOT), true)
 LOCAL_CFLAGS += -DSCALER_USE_M2M1SHOT
+LOCAL_SRC_FILES += libscaler-m2m1shot.cpp
 endif
 
 # since 3.18 kernel
index a542b5841feb79265cce12c62fbe1b5a75ffd027..67d1a138e18d1894575557e2f8ff1ccddf3577a7 100644 (file)
@@ -40,6 +40,8 @@
 #include "libscaler-common.h"
 #include "libscalerblend-v4l2.h"
 #include "libscaler-v4l2.h"
+
+#ifdef SCALER_USE_M2M1SHOT
 #include "libscaler-m2m1shot.h"
 
 static bool find_pixel(unsigned int sc_pxfmt, unsigned int __out *v4l2_pxfmt)
@@ -117,7 +119,6 @@ bool exynos_sc_copy_pixels(exynos_sc_pxinfo *pxinfo, int dev_num)
     return sc.Run();
 }
 
-#ifdef SCALER_USE_M2M1SHOT
 typedef CScalerM2M1SHOT CScalerNonStream;
 #else
 typedef CScalerV4L2 CScalerNonStream;