[FFmpeg-cvslog] lavc/jpeg2000dsp: make coefficients extern
Rémi Denis-Courmont
git at videolan.org
Wed Nov 1 19:07:06 EET 2023
ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 28 18:57:11 2023 +0300| [b2a441a3bed281a74b7fced77ef974897e407e32] | committer: Rémi Denis-Courmont
lavc/jpeg2000dsp: make coefficients extern
This is so that they can be loaded from assembler, rather than
duplicated.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b2a441a3bed281a74b7fced77ef974897e407e32
---
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);
More information about the ffmpeg-cvslog
mailing list