Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 1/3] lavc/jpeg2000dsp: make coefficients extern
Date: Sat, 28 Oct 2023 22:04:52 +0300
Message-ID: <20231028190455.64807-1-remi@remlab.net> (raw)

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);
 
-- 
2.42.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2023-10-28 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28 19:04 Rémi Denis-Courmont [this message]
2023-10-28 19:04 ` [FFmpeg-devel] [PATCH 2/3] lavc/jpeg2000dsp: R-V V ict_float Rémi Denis-Courmont
2023-10-28 19:04 ` [FFmpeg-devel] [PATCH 3/3] lavc/jpeg2000dsp: R-V V rct_int Rémi Denis-Courmont
2023-10-30 12:33 ` [FFmpeg-devel] [PATCH 1/3] lavc/jpeg2000dsp: make coefficients extern Tomas Härdin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231028190455.64807-1-remi@remlab.net \
    --to=remi@remlab.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git