From patchwork Wed Oct 9 14:48:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 15637 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 1A49C448481 for ; Wed, 9 Oct 2019 17:49:06 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E991468817D; Wed, 9 Oct 2019 17:49:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E84E680A43 for ; Wed, 9 Oct 2019 17:49:00 +0300 (EEST) Received: by mail-pg1-f195.google.com with SMTP id e1so1565700pgj.6 for ; Wed, 09 Oct 2019 07:49:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4SRSP41xgIN3BffhB/4YcJbd17i0aRcgbw92a0MiXnQ=; b=vY/m6i46DWrpEC2vWEzp5IjOCXGqIO8pHhE4K1uWZEvasrb/yTY9aX1j3T7H8aY/Zj QvSEllJDAApCruS/bOfpWXF1oRgmldZhnz8jF8BUT462Wa9sOOeTqfNu7VS/oHyHy4cL s7kEKUEWDf/0OBPh5vW8wi1REeq9ca/sKLy2otstmfzHjU8xgvHpQIjXl8OiALnSeA4n d3lvo8MswynKV7gte52V9bUUm+KfecT5pURku+akxTzH7b456G1yqS7MqTpJat+BgABL pgnPuY/BPE5CY3RLgeEhfwE/ID+lcL+t2GB7mryYHj/7ISd0mgfiKAI45HAEisLDpUTs 5g6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4SRSP41xgIN3BffhB/4YcJbd17i0aRcgbw92a0MiXnQ=; b=NDqmC9G3k7L2keaTa2F+/ZuyLxap+CKlfnIL9cEwIpnheQDzpYTjK/aQUm1enSr8Ur bu3YZonsfWZt8nZqWRv0MpKE9wwmavEZqw/D3ZS5Lmn/GVA0NI3177yREASaEGDY/Swt bCQAX67zBQyHemEGKwqjuATGazxxn9I+WpQMDSyhAX/p/givhoaksLhYuJqqdwUNCMSU hZ3XidMl5HFaS4v/XVHR+LWM9QcEAdYlRcMXOYInTErDwc5bqZa6HwmY5SNY521DJVb3 G58S3u3ipFtZNMGvRfMW4jgI4WZct7qIdEUdCypmcCum1cvTR2XDSeL6NoVYP7EpO5WO 5BRA== X-Gm-Message-State: APjAAAUUGlLO/ZvUgU4qooOzs1gyIE/ASXvf4weJiY+Uj/wRsDm6Czjb FUVCMbs2ydDhSeEGShJcT5yHDlfM X-Google-Smtp-Source: APXvYqzMYp9NH+g3/e6nQ0pflKJNAUn1aqkdM9DuaZVoGNFg96AXYSpPRvp5gna1xoBDcCrQm6RPTg== X-Received: by 2002:a65:5bca:: with SMTP id o10mr4674854pgr.74.1570632538613; Wed, 09 Oct 2019 07:48:58 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id b20sm2768929pff.158.2019.10.09.07.48.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 07:48:58 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Wed, 9 Oct 2019 22:48:50 +0800 Message-Id: <1570632533-16101-1-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 Subject: [FFmpeg-devel] [PATCH V1 1/4] lavfi/colorspace: typedef ThreadData as all other filters 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: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao typedef ThreadData as all other filters. Signed-off-by: Jun Zhao --- libavfilter/vf_colorspace.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 04954c1..db41f64 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -331,15 +331,15 @@ static void apply_lut(int16_t *buf[3], ptrdiff_t stride, } } -struct ThreadData { +typedef struct ThreadData { AVFrame *in, *out; ptrdiff_t in_linesize[3], out_linesize[3]; int in_ss_h, out_ss_h; -}; +} ThreadData; static int convert(AVFilterContext *ctx, void *data, int job_nr, int n_jobs) { - struct ThreadData *td = data; + const ThreadData *td = data; ColorSpaceContext *s = ctx->priv; uint8_t *in_data[3], *out_data[3]; int16_t *rgb[3]; @@ -771,7 +771,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) int res; ptrdiff_t rgb_stride = FFALIGN(in->width * sizeof(int16_t), 32); unsigned rgb_sz = rgb_stride * in->height; - struct ThreadData td; + ThreadData td; if (!out) { av_frame_free(&in);