From patchwork Sat Oct 28 19:04:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 44417 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dd83:b0:15d:8365:d4b8 with SMTP id kw3csp603803pzb; Sat, 28 Oct 2023 12:05:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IER3XZXpF4H/iz4NO793Xv0tNzIDwCJ9RFHjrI8110+AinRmzlUMVdSqO8v+QusHOwqCVxJ X-Received: by 2002:a17:907:3115:b0:9d2:bf19:88aa with SMTP id wl21-20020a170907311500b009d2bf1988aamr91618ejb.59.1698519906336; Sat, 28 Oct 2023 12:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698519906; cv=none; d=google.com; s=arc-20160816; b=dXr8B3EGP/hRbUPPCTAi9/KJ+VUuTtG3HALYmh6PglXKofvIXuSEBu4C/LYyZRS7G7 9XlGxv57V9waqbLTruEYP9d2QWl3/NlNXG3nMrZj2tsDxhgQiMJgrU66Dqn5rKkPWfWB J8Rp1pKC0nALpXx6k2j2WV31gFdGculAbmTokOphXFpqRMZdAm1r4ukPppgWjS8dezXF np2rCZmhP5Z8f0GeYYpQf+Z44Io972IckVpGN+bWYHwtkPMXrMmf7eZrO4mMIO8UqHVq wFCrn6vKjNoAJb7VGe2RvsewXt543DE1BR0qSYZRO64WaPY7d383UvPNLn4f2KY9JU24 apEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=0LYOJHtWVJZESv8j5hB5DTadGyA5bdX+5BiGPHRRDSc=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=dXcIUpl4BF5jywloTqD6cnE5EZhIKyxqxrwZZ5hGfSBCOVrH65tcPlAemqCZ+UE+L/ 5xbfdxSl+cUGcXmG3R2yzynODW67lI81njWeKbTKhgnTy/tjKmXI7tNLiLAuOmuBHCyG YbcdDw5/R6AbX71yIVU60pNvFj2ki//BEPysu9Wfp57shH5OktOPDk5H26uvZbpav7JH gDJTeCs67mpDhqmKwN6pTXWrNTpSjLOctsF2QkuxPv3lm2b9hcl4uAQoowJcS6/T/hZc /IKL4tlmEY4hpfnIEo64baKezFlK1J1HqcAKIkijE4agu73mtb6Y6+71/Ks/qYrjFdo4 6H6Q== 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bp14-20020a17090726ce00b00993150ec3c7si2003854ejc.966.2023.10.28.12.05.05; Sat, 28 Oct 2023 12:05: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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9C6B968CBC8; Sat, 28 Oct 2023 22:05:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 280D968CB27 for ; Sat, 28 Oct 2023 22:04:56 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id AD887C006B for ; Sat, 28 Oct 2023 22:04:55 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Sat, 28 Oct 2023 22:04:52 +0300 Message-ID: <20231028190455.64807-1-remi@remlab.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] lavc/jpeg2000dsp: make coefficients extern X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vnLirUg8hJ03 This is so that they can be loaded from assembler, rather than duplicated. --- libavcodec/jpeg2000dsp.c | 3 ++- libavcodec/jpeg2000dsp.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dsp.c b/libavcodec/jpeg2000dsp.c index b1bff6d5b1..50bc1ecee6 100644 --- a/libavcodec/jpeg2000dsp.c +++ b/libavcodec/jpeg2000dsp.c @@ -26,7 +26,7 @@ /* Inverse ICT parameters in float and integer. * int value = (float value) * (1<<16) */ -static const float f_ict_params[4] = { +const float ff_jpeg2000_f_ict_params[4] = { 1.402f, 0.34413f, 0.71414f, @@ -42,6 +42,7 @@ static const int i_ict_params[4] = { static void ict_float(void *_src0, void *_src1, void *_src2, int csize) { + const float *const f_ict_params = ff_jpeg2000_f_ict_params; float *src0 = _src0, *src1 = _src1, *src2 = _src2; float i0f, i1f, i2f; int i; diff --git a/libavcodec/jpeg2000dsp.h b/libavcodec/jpeg2000dsp.h index 1ae5b95d9a..932dbb2102 100644 --- a/libavcodec/jpeg2000dsp.h +++ b/libavcodec/jpeg2000dsp.h @@ -30,6 +30,8 @@ typedef struct Jpeg2000DSPContext { void (*mct_decode[FF_DWT_NB])(void *src0, void *src1, void *src2, int csize); } Jpeg2000DSPContext; +extern const float ff_jpeg2000_f_ict_params[4]; + void ff_jpeg2000dsp_init(Jpeg2000DSPContext *c); void ff_jpeg2000dsp_init_x86(Jpeg2000DSPContext *c);