From e54e193db9f374a9a184be1458daee4f039b7279 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Sun, 5 Apr 2020 01:44:43 +0200 Subject: [PATCH] libscaler: resolve compilation errors Change-Id: Icd12e4537ab32a4a874305970fd676bc6917a394 --- libscaler/libscaler-common.h | 2 +- libscaler/libscaler-v4l2.h | 8 -------- libscaler/libscaler.cpp | 6 ++---- libscaler/libscalerblend-v4l2.cpp | 24 ++++++++++++------------ 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/libscaler/libscaler-common.h b/libscaler/libscaler-common.h index 665436e..ff218c3 100644 --- a/libscaler/libscaler-common.h +++ b/libscaler/libscaler-common.h @@ -77,7 +77,7 @@ static inline T min (T a, T b) { template static inline void swap(T &a, T &b) { - T t = a; + T __unused t = a; a = b; b = a; } diff --git a/libscaler/libscaler-v4l2.h b/libscaler/libscaler-v4l2.h index 2b70b2e..417ebb2 100644 --- a/libscaler/libscaler-v4l2.h +++ b/libscaler/libscaler-v4l2.h @@ -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; } diff --git a/libscaler/libscaler.cpp b/libscaler/libscaler.cpp index 9ae68fc..a542b58 100644 --- a/libscaler/libscaler.cpp +++ b/libscaler/libscaler.cpp @@ -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; } diff --git a/libscaler/libscalerblend-v4l2.cpp b/libscaler/libscalerblend-v4l2.cpp index 6e3a403..ef55952 100644 --- a/libscaler/libscalerblend-v4l2.cpp +++ b/libscaler/libscalerblend-v4l2.cpp @@ -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; -- 2.20.1