From patchwork Fri Jul 13 14:37:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruiling Song X-Patchwork-Id: 9718 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp1010843jad; Fri, 13 Jul 2018 10:38:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeNRdEHGdo0/bFiOYg2q2MnlboEeYuLKYREcQK42P/kU07RuMwCHLV5qo4CHowvi/4TCpy3 X-Received: by 2002:a1c:7d47:: with SMTP id y68-v6mr4251909wmc.62.1531503486163; Fri, 13 Jul 2018 10:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531503486; cv=none; d=google.com; s=arc-20160816; b=yNQmj1Hnj7L9CCsGV5Jvw67jNhYgBscbpGuAFMocx86nWywWI3GvLiMsamwP45V0UF MOLImJo0bLroLk0I2sjbPjd2NuA8c4kJ3EKoPJQD6hb1fFqYem5+U8MuP4pf1qj/nhES sihyE4Ohs6e0zW3BtVWR6P8B3FbxrfJfKdbC6XuQX/4qPgUijUFOTUcejIcoN4DdxFWW 7PJJRHGJYsKrvCHl6c433z41G2zZVQGKquYB7qfSNU0drfsvyBIueVV/49h14yw/oR1+ muPsNvGhMZCHxaLcdFxqJPFznSfFZ00aQdZrIe+xdxNYQnMK8c6VEojWkaiQ5mPqeiKc 2wYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=SN6lGfHWnWVcg0FFccxle6VXLWHCBhMh4scgBWjS5xg=; b=TDS/Y5Bxvo5FsKqLJsbtl+MoVtc8FAz3DRgoB3itLTPkbVc3XgYRR0ehP9Ws08SaKM VA02BmGcoQnabVjGFXW8JfOSdoKmY0bOOjKIj6WmdHobZjTeI1XCzrSaf/u0l7TTaqao ru2KreghzBhYIWF3rw0TFrzwFGrM6kG85TXEUPr7w6bNEJakChmaXOsMfFSI1L/u4/RV 9hW2JEDAq5cRC779KxqruneYmwTmnlFEIskUn5RNyB0cd0atwN4jiw1+CkTfjuNsJfsL Yd8ubHPaHCgEnhRlQERtuqUE9yyBVdMTdUIUtsbKHbsxqMZB+l+yWrtcn/HPwKIA40v1 lUBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h6-v6si8468606wri.153.2018.07.13.10.38.05; Fri, 13 Jul 2018 10:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8279268A519; Fri, 13 Jul 2018 20:37:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3032E68A391 for ; Fri, 13 Jul 2018 20:37:47 +0300 (EEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2018 10:37:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,348,1526367600"; d="scan'208";a="240112757" Received: from ruiling-kabylake.jf.intel.com ([10.7.199.51]) by orsmga005.jf.intel.com with ESMTP; 13 Jul 2018 10:37:53 -0700 From: Ruiling Song To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Jul 2018 07:37:17 -0700 Message-Id: <20180713143717.19036-1-ruiling.song@intel.com> X-Mailer: git-send-email 2.17.0 Subject: [FFmpeg-devel] [PATCH] lavfi/colorspace: Suppress compile warning on incompatible pointer type. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Ruiling Song MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Ruiling Song --- Sorry I have not verified this patch, I don't know how to reproduce the gcc warning. Thanks! Ruiling libavfilter/vf_colorspace.c | 16 ++++++++-------- libavfilter/vf_tonemap_opencl.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 56621d15e2..69c7674a7b 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -382,8 +382,8 @@ static void fill_whitepoint_conv_table(double out[3][3], enum WhitepointAdaptati fac[1][1] = gd / gs; fac[2][2] = bd / bs; fac[0][1] = fac[0][2] = fac[1][0] = fac[1][2] = fac[2][0] = fac[2][1] = 0.0; - ff_matrix_mul_3x3(tmp, ma, fac); - ff_matrix_mul_3x3(out, tmp, mai); + ff_matrix_mul_3x3(tmp, ma, (void *)fac); + ff_matrix_mul_3x3(out, (void *)tmp, (void *)mai); } static void apply_lut(int16_t *buf[3], ptrdiff_t stride, @@ -589,7 +589,7 @@ static int create_filtergraph(AVFilterContext *ctx, wp_out = &whitepoint_coefficients[s->out_primaries->wp]; wp_in = &whitepoint_coefficients[s->in_primaries->wp]; ff_fill_rgb2xyz_table(&s->out_primaries->coeff, wp_out, rgb2xyz); - ff_matrix_invert_3x3(rgb2xyz, xyz2rgb); + ff_matrix_invert_3x3((void *)rgb2xyz, xyz2rgb); ff_fill_rgb2xyz_table(&s->in_primaries->coeff, wp_in, rgb2xyz); if (s->out_primaries->wp != s->in_primaries->wp && s->wp_adapt != WP_ADAPT_IDENTITY) { @@ -597,10 +597,10 @@ static int create_filtergraph(AVFilterContext *ctx, fill_whitepoint_conv_table(wpconv, s->wp_adapt, s->in_primaries->wp, s->out_primaries->wp); - ff_matrix_mul_3x3(tmp, rgb2xyz, wpconv); - ff_matrix_mul_3x3(rgb2rgb, tmp, xyz2rgb); + ff_matrix_mul_3x3(tmp, (void *)rgb2xyz, (void *)wpconv); + ff_matrix_mul_3x3(rgb2rgb, (void *)tmp, (void *)xyz2rgb); } else { - ff_matrix_mul_3x3(rgb2rgb, rgb2xyz, xyz2rgb); + ff_matrix_mul_3x3(rgb2rgb, (void *)rgb2xyz, (void *)xyz2rgb); } for (m = 0; m < 3; m++) for (n = 0; n < 3; n++) { @@ -725,7 +725,7 @@ static int create_filtergraph(AVFilterContext *ctx, for (n = 0; n < 8; n++) s->yuv_offset[0][n] = off; fill_rgb2yuv_table(s->in_lumacoef, rgb2yuv); - ff_matrix_invert_3x3(rgb2yuv, yuv2rgb); + ff_matrix_invert_3x3((void *)rgb2yuv, yuv2rgb); bits = 1 << (in_desc->comp[0].depth - 1); for (n = 0; n < 3; n++) { for (in_rng = s->in_y_rng, m = 0; m < 3; m++, in_rng = s->in_uv_rng) { @@ -781,7 +781,7 @@ static int create_filtergraph(AVFilterContext *ctx, double yuv2yuv[3][3]; int in_rng, out_rng; - ff_matrix_mul_3x3(yuv2yuv, yuv2rgb, rgb2yuv); + ff_matrix_mul_3x3(yuv2yuv, (void *)yuv2rgb, (void *)rgb2yuv); for (out_rng = s->out_y_rng, m = 0; m < 3; m++, out_rng = s->out_uv_rng) { for (in_rng = s->in_y_rng, n = 0; n < 3; n++, in_rng = s->in_uv_rng) { s->yuv2yuv_coeffs[m][n][0] = diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index 241f95e6c3..0cb2da0da2 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -125,9 +125,9 @@ static void get_rgb2rgb_matrix(enum AVColorPrimaries in, enum AVColorPrimaries o double rgb2xyz[3][3], xyz2rgb[3][3]; ff_fill_rgb2xyz_table(&primaries_table[out], &whitepoint_table[out], rgb2xyz); - ff_matrix_invert_3x3(rgb2xyz, xyz2rgb); + ff_matrix_invert_3x3((void *)rgb2xyz, xyz2rgb); ff_fill_rgb2xyz_table(&primaries_table[in], &whitepoint_table[in], rgb2xyz); - ff_matrix_mul_3x3(rgb2rgb, rgb2xyz, xyz2rgb); + ff_matrix_mul_3x3(rgb2rgb, (void *)rgb2xyz, (void *)xyz2rgb); } #define OPENCL_SOURCE_NB 3