From 798c5e4ff0a9c0c172b860a02e4b7b67ca64a859 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Sun, 5 Apr 2020 01:36:52 +0200 Subject: [PATCH] libgscaler: resolve compilation errors Change-Id: Ife89ccd4b98197bbc9b077c8b251bb2968c83526 --- include/exynos_gscaler.h | 3 +++ libgscaler/libgscaler.cpp | 20 +------------------- libgscaler/libgscaler_obj.cpp | 26 +++++++------------------- 3 files changed, 11 insertions(+), 38 deletions(-) diff --git a/include/exynos_gscaler.h b/include/exynos_gscaler.h index fd98633..a7909a8 100644 --- a/include/exynos_gscaler.h +++ b/include/exynos_gscaler.h @@ -82,6 +82,9 @@ typedef struct { int releaseFenceFd; int mem_type; uint32_t pre_multi; +#ifdef USES_VR_FRONT_BUFFER + uint32_t use_sync; +#endif } exynos_mpp_img; enum SRC_BL_OP { diff --git a/libgscaler/libgscaler.cpp b/libgscaler/libgscaler.cpp index 8073e80..affd28a 100644 --- a/libgscaler/libgscaler.cpp +++ b/libgscaler/libgscaler.cpp @@ -50,9 +50,6 @@ void *exynos_gsc_create_exclusive( int out_mode, int allow_drm) { - int i = 0; - int op_id = 0; - unsigned int total_sleep_time = 0; int ret = 0; Exynos_gsc_In(); @@ -141,7 +138,6 @@ void exynos_gsc_destroy(void *handle) { Exynos_gsc_In(); - int i = 0; CGscaler* gsc = GetGscaler(handle); if (gsc == NULL) { ALOGE("%s::handle == NULL() fail", __func__); @@ -174,13 +170,6 @@ int exynos_gsc_set_csc_property( return -1; } - if (gsc->gsc_id >= HW_SCAL0) { - int ret; - ret = exynos_sc_csc_exclusive(gsc->scaler, - range_full, v4l2_colorspace); - Exynos_gsc_Out(); - return ret; - } gsc->eq_auto = eq_auto; gsc->range_full = range_full; gsc->v4l2_colorspace = v4l2_colorspace; @@ -386,7 +375,7 @@ done: } int exynos_gsc_subdev_s_crop(void *handle, - exynos_mpp_img *src_img, exynos_mpp_img *dst_img) + exynos_mpp_img *src_img __unused, exynos_mpp_img *dst_img) { struct v4l2_subdev_crop sd_crop; CGscaler *gsc = GetGscaler(handle); @@ -483,11 +472,6 @@ int exynos_gsc_run_exclusive(void *handle, void *exynos_gsc_create_blend_exclusive(int dev_num, int mode, int out_mode, int allow_drm) { - int i = 0; - int op_id = 0; - unsigned int total_sleep_time = 0; - int ret = 0; - Exynos_gsc_In(); if ((dev_num < 0) || (dev_num >= HW_SCAL_MAX)) { @@ -609,8 +593,6 @@ int exynos_gsc_free_and_close(void *handle) Exynos_gsc_In(); struct v4l2_requestbuffers reqbuf; - struct v4l2_buffer buf; - struct v4l2_plane planes[NUM_OF_GSC_PLANES]; int ret = 0; CGscaler* gsc = GetGscaler(handle); if (gsc == NULL) { diff --git a/libgscaler/libgscaler_obj.cpp b/libgscaler/libgscaler_obj.cpp index 19f0b5e..5220952 100644 --- a/libgscaler/libgscaler_obj.cpp +++ b/libgscaler/libgscaler_obj.cpp @@ -41,8 +41,7 @@ int CGscaler::m_gsc_output_create(void *handle, int dev_num, int out_mode) char node[32]; char devname[32]; unsigned int cap; - int i; - int fd = 0; + CGscaler* gsc = GetGscaler(handle); if (gsc == NULL) { ALOGE("%s::handle == NULL() fail", __func__); @@ -180,12 +179,9 @@ int CGscaler::m_gsc_capture_create(void *handle, int dev_num, int out_mode) struct media_entity *gsc_sd_entity; struct media_entity *gsc_vd_entity; struct media_entity *sink_sd_entity; - struct media_link *links; char node[32]; char devname[32]; unsigned int cap; - int i; - int fd = 0; CGscaler* gsc = GetGscaler(handle); if (gsc == NULL) { ALOGE("%s::handle == NULL() fail", __func__); @@ -282,7 +278,6 @@ int CGscaler::m_gsc_out_stop(void *handle) { Exynos_gsc_In(); - struct v4l2_requestbuffers reqbuf; CGscaler* gsc = GetGscaler(handle); if (gsc == NULL) { ALOGE("%s::handle == NULL() fail", __func__); @@ -345,7 +340,6 @@ bool CGscaler::m_gsc_out_destroy(void *handle) { Exynos_gsc_In(); - int i; CGscaler* gsc = GetGscaler(handle); if (gsc == NULL) { ALOGE("%s::handle == NULL() fail", __func__); @@ -846,7 +840,7 @@ done: bool CGscaler::m_gsc_check_src_size( unsigned int *w, unsigned int *h, - unsigned int *crop_x, unsigned int *crop_y, + unsigned int *crop_x __unused, unsigned int *crop_y __unused, unsigned int *crop_w, unsigned int *crop_h, int v4l2_colorformat, bool rotation) { @@ -878,10 +872,10 @@ bool CGscaler::m_gsc_check_src_size( bool CGscaler::m_gsc_check_dst_size( unsigned int *w, unsigned int *h, - unsigned int *crop_x, unsigned int *crop_y, + unsigned int *crop_x __unused, unsigned int *crop_y __unused, unsigned int *crop_w, unsigned int *crop_h, - int v4l2_colorformat, - int rotation) + int v4l2_colorformat __unused, + int rotation __unused) { if (*w < GSC_MIN_DST_W_SIZE || *h < GSC_MIN_DST_H_SIZE) { ALOGE("%s::too small size (w : %d < %d) (h : %d < %d)", @@ -1254,14 +1248,12 @@ int CGscaler::m_gsc_out_config(void *handle, struct v4l2_requestbuffers reqbuf; struct v4l2_subdev_format sd_fmt; struct v4l2_subdev_crop sd_crop; - int i; + unsigned int rotate; unsigned int hflip; unsigned int vflip; - unsigned int plane_size[NUM_OF_GSC_PLANES]; bool rgb; - struct v4l2_rect dst_rect; int32_t src_color_space; int32_t dst_color_space; int32_t src_planes; @@ -1497,14 +1489,11 @@ int CGscaler::m_gsc_cap_config(void *handle, struct v4l2_requestbuffers reqbuf; struct v4l2_subdev_format sd_fmt; struct v4l2_subdev_crop sd_crop; - int i; unsigned int rotate; unsigned int hflip; unsigned int vflip; - unsigned int plane_size[NUM_OF_GSC_PLANES]; bool rgb; - struct v4l2_rect dst_rect; int32_t src_color_space; int32_t dst_color_space; int32_t dst_planes; @@ -2053,10 +2042,9 @@ int CGscaler::FreeMpp(void *handle) } int CGscaler::SetInputCrop(void *handle, - exynos_mpp_img *src_img, exynos_mpp_img *dst_img) + exynos_mpp_img *src_img, exynos_mpp_img *dst_img __unused) { struct v4l2_crop crop; - int ret = 0; CGscaler *gsc = GetGscaler(handle); if (gsc == NULL) { ALOGE("%s::handle == NULL() fail", __func__); -- 2.20.1