1
0
Fork 0
Commit Graph

9 Commits

Author SHA1 Message Date
Rémi Denis-Courmont 73dea2bb91 lavc/jpeg2000dsp: R-V V ict_float
jpeg2000_ict_float_c:       3112.2
jpeg2000_ict_float_rvv_f32: 1225.0
2023-11-01 18:52:55 +02:00
Rémi Denis-Courmont b2a441a3be lavc/jpeg2000dsp: make coefficients extern
This is so that they can be loaded from assembler, rather than
duplicated.
2023-11-01 18:52:55 +02:00
Andreas Rheinhardt 3b09e8f5e9 avcodec/jpeg2000dsp: Use unsigned to avoid overflow
Affected the jpeg2000dsp checkasm test.

Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-04 18:00:43 +02:00
Andreas Rheinhardt 40e6575aa3 all: Replace if (ARCH_FOO) checks by #if ARCH_FOO
This is more spec-compliant because it does not rely
on dead-code elimination by the compiler. Especially
MSVC has problems with this, as can be seen in
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html
or
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html

This commit does not eliminate every instance where we rely
on dead code elimination: It only tackles branching to
the initialization of arch-specific dsp code, not e.g. all
uses of CONFIG_ and HAVE_ checks. But maybe it is already
enough to compile FFmpeg with MSVC with whole-programm-optimizations
enabled (if one does not disable too many components).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15 04:56:37 +02:00
Michael Niedermayer b3192c64b5 avcodec/jpeg2000dsp: Fix integer overflows in ict_int()
Fixes: signed integer overflow: 46802 * -71230 cannot be represented in type 'int'
Fixes: 4756/clusterfuzz-testcase-minimized-4812495563784192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-08 18:57:22 +01:00
Michael Niedermayer 2d025e7428 avcodec/jpeg2000dsp: Fix multiple integer overflows in ict_int()
Fixes: runtime error: signed integer overflow: 22553 * -188962 cannot be represented in type 'int'
Fixes: 3042/clusterfuzz-testcase-minimized-5174210131394560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:28:23 +02:00
Michael Niedermayer c746f92a8e avcodec/jpeg2000dsp: Reorder operations in ict_int() to avoid 2 integer overflows
Fixes: runtime error: signed integer overflow: 58065 * 51981 cannot be represented in type 'int'
Fixes: 2271/clusterfuzz-testcase-minimized-5778297776504832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-17 22:36:54 +02:00
James Almer 7912a6830d avcodec/jpeg200dsp: add ff_ict_float_{sse,avx}
Original intrinsics version by Nicolas Bertrand.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-06-13 16:53:27 -03:00
James Almer c9f2ec8a34 jpeg2000: split off inverse MCT decoding as Jpeg2000DSP
This makes the addition of arch optimized functions easier.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-02 03:21:45 -03:00