libscaler: resolve compilation errors
authorJan Altensen <info@stricted.net>
Sat, 4 Apr 2020 23:44:43 +0000 (01:44 +0200)
committerJan Altensen <info@stricted.net>
Sun, 5 Apr 2020 10:24:58 +0000 (12:24 +0200)
Change-Id: Icd12e4537ab32a4a874305970fd676bc6917a394

libscaler/libscaler-common.h
libscaler/libscaler-v4l2.h
libscaler/libscaler.cpp
libscaler/libscalerblend-v4l2.cpp

index 665436e4facd53baccc090aad3cca02c076392b6..ff218c38aef99920a12ca19b4327122047ad34c0 100644 (file)
@@ -77,7 +77,7 @@ static inline T min (T a, T b) {
 
 template <typename T>
 static inline void swap(T &a, T &b) {
-    T t = a;
+    T __unused t = a;
     a = b;
     b = a;
 }
index 2b70b2ecee4cf805efcabe7dc418014fbdf38c3f..417ebb24868aea5e96a6e015593b0f8c653245d6 100644 (file)
@@ -260,14 +260,6 @@ public:
         SetFlag(m_fStatus, SCF_CSC_FRESH);
     }
 
-    inline void SetCSCEq(unsigned int v4l2_colorspace) {
-        if (v4l2_colorspace == V4L2_COLORSPACE_SMPTE170M)
-            m_colorspace = V4L2_COLORSPACE_DEFAULT;
-        else
-            m_colorspace = v4l2_colorspace;
-        SetFlag(m_fStatus, SCF_CSC_FRESH);
-    }
-
     inline void SetFilter(unsigned int filter) {
         m_filter = filter;
     }
index 9ae68fcd7554c4982c36286312570234cf266211..a542b5841feb79265cce12c62fbe1b5a75ffd027 100644 (file)
@@ -178,7 +178,7 @@ int exynos_sc_destroy(void *handle)
 int exynos_sc_set_csc_property(
         void        *handle,
         unsigned int csc_range,
-        unsigned int v4l2_colorspace,
+        unsigned int v4l2_colorspace __unused,
         unsigned int filter)
 
 {
@@ -187,7 +187,6 @@ int exynos_sc_set_csc_property(
         return -1;
 
     sc->SetCSCWide(csc_range);
-    sc->SetCSCEq(v4l2_colorspace);
     sc->SetFilter(filter);
 
     return 0;
@@ -388,14 +387,13 @@ int exynos_sc_stop_exclusive(void *handle)
 
 int exynos_sc_csc_exclusive(void *handle,
                 unsigned int range_full,
-                unsigned int v4l2_colorspace)
+                unsigned int v4l2_colorspace __unused)
 {
     CScalerV4L2 *sc = GetScaler(handle);
     if (!sc)
         return -1;
 
     sc->SetCSCWide(range_full);
-    sc->SetCSCEq(v4l2_colorspace);
 
     return 0;
 }
index 6e3a40302ebc121a51cf07f8d546a6d81eb35bcf..ef55952b2a7cc0dd1588fb835a17890e701732f7 100644 (file)
@@ -103,37 +103,37 @@ void CScalerBlendV4L2::GetCustomAlphaBlendFmt(int32_t &src_color_space,
                                                      unsigned int srcblendfmt) {
 
     if (src_color_space == V4L2_PIX_FMT_NV12M) {
-        if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+        if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_NV12M_RGB32;
-        else if ((srcblendfmt == V4L2_PIX_FMT_BGR32))
+        else if (srcblendfmt == V4L2_PIX_FMT_BGR32)
             src_color_space = V4L2_PIX_FMT_NV12M_BGR32;
-        else if ((srcblendfmt == V4L2_PIX_FMT_RGB565))
+        else if (srcblendfmt == V4L2_PIX_FMT_RGB565)
             src_color_space = V4L2_PIX_FMT_NV12M_RGB565;
-        else if ((srcblendfmt == V4L2_PIX_FMT_RGB444))
+        else if (srcblendfmt == V4L2_PIX_FMT_RGB444)
             src_color_space = V4L2_PIX_FMT_NV12M_RGB444;
-        else if ((srcblendfmt == V4L2_PIX_FMT_RGB555X))
+        else if (srcblendfmt == V4L2_PIX_FMT_RGB555X)
             src_color_space = V4L2_PIX_FMT_NV12M_RGB555X;
     } else if (src_color_space == V4L2_PIX_FMT_NV12) {
-            if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+            if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_NV12_RGB32;
 #ifdef V4L2_PIX_FMT_NV12N
     } else if (src_color_space == V4L2_PIX_FMT_NV12N) {
-            if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+            if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_NV12N_RGB32;
 #endif
     } else if (src_color_space == V4L2_PIX_FMT_NV12MT_16X16) {
-            if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+            if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_NV12MT_16X16_RGB32;
     } else if (src_color_space == V4L2_PIX_FMT_NV21M) {
-        if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+        if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_NV21M_RGB32;
-        else if ((srcblendfmt == V4L2_PIX_FMT_BGR32))
+        else if (srcblendfmt == V4L2_PIX_FMT_BGR32)
             src_color_space = V4L2_PIX_FMT_NV21M_BGR32;
     } else if (src_color_space == V4L2_PIX_FMT_NV21) {
-        if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+        if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_NV21_RGB32;
     } else if (src_color_space == V4L2_PIX_FMT_YVU420) {
-        if ((srcblendfmt == V4L2_PIX_FMT_RGB32))
+        if (srcblendfmt == V4L2_PIX_FMT_RGB32)
             src_color_space = V4L2_PIX_FMT_YVU420_RGB32;
     } else {
         src_color_space = -1;