summaryrefslogtreecommitdiff
path: root/libavcodec/idctdsp.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/idctdsp: Move ScanTable to mpegvideoAndreas Rheinhardt2022-10-241-21/+0
| | | | | | | Only used there. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/idctdsp: Add function to apply permutation to arrayAndreas Rheinhardt2022-10-241-0/+9
| | | | | | | | It is the part of ff_init_scantable() that is used by all users of said function. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/idctdsp: RISC-V V put_pixels_clamped functionRémi Denis-Courmont2022-09-281-0/+2
|
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-151-19/+21
| | | | | | | | | | | | | | | | | | 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>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-161-0/+1
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: deprecate FF_IDCT_NONEAnton Khirnov2022-02-151-1/+0
| | | | It was only used by XvMC.
* avcodec/idctdsp: Constify the permutation parameter of ff_init_scantableAndreas Rheinhardt2022-02-131-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: [loongarch] Optimize idctdstp with LASX.Hao Chen2022-01-041-0/+2
| | | | | | | | | ./ffmpeg -i 8_mpeg4_1080p_24fps_12Mbps.avi -f rawvideo -y /dev/null -an before:433fps after :552fps Reviewed-by: 殷时友 <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/idctdsp: Clear idct/idct_add for studio profileMichael Niedermayer2018-05-301-2/+4
| | | | | | This does not leave them "as before" which may be a value from a previous profile Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/idctdsp: Transmit studio_profile to init instead of using ↵Michael Niedermayer2018-05-301-1/+1
| | | | | | | | | | | | | AVCodecContext profile These 2 fields are not always the same, it is simpler to always use the same field for detecting studio profile Fixes: null pointer dereference Fixes: ffmpeg_crash_3.avi Found-by: Thuan Pham <thuanpv@comp.nus.edu.sg>, Marcel Böhme, Andrew Santosa and Alexandru RazvanCaciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpeg4video: Add support for MPEG-4 Simple Studio Profile.Kieran Kunhya2018-04-021-3/+9
| | | | This is a profile supporting > 8-bit video and has a higher quality DCT
* simple_idct: Template functions to support an input bitdepth parameterKieran Kunhya2018-04-021-9/+9
|
* Fix visual glitch with XvMC, caused by wrong idct permutation.Ivan Kalvachev2017-10-121-0/+1
| | | | | | | | | | | | | | | In the past XvMC forced simple_idct since it was using FF_IDCT_PERM_NONE. However now we have SIMD variants of simple_idct that are using FF_IDCT_PERM_TRANSPOSE and if they are selected XvMC would get coefficients in the wrong order. The patch creates new FF_IDCT_NONE that is used only for this kind of hardware decoding and that fallbacks to the old C only simple idct. Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* jrev/xvid: hardcode use of C put/add_pixels_clamped.Ronald S. Bultje2017-04-061-12/+6
| | | | | | | | | | | | | | | | | | | This removes the last use of the ff_put/add_pixels_clamped global function pointers, and as such they are removed. This patch has a negative effect on performance on MIPS, since there's a SIMD-optimized put/add_pixels_clamped, but no xvid or jrev. From a code maintenance point of view, that is probably acceptable. Because the global function pointers are removed, this fixes the following tsan warnings when running e.g. fate-dnxhr-parse: WARNING: ThreadSanitizer: data race (pid=29917) Write of size 8 at 0x0000025b12d8 by thread T2 (mutexes: write M1543): #0 ff_idctdsp_init src/libavcodec/idctdsp.c:313 (ffmpeg+0x00000044b68e) [..] Previous write of size 8 at 0x0000025b12d8 by thread T1 (mutexes: write M1541): #0 ff_idctdsp_init src/libavcodec/idctdsp.c:313 (ffmpeg+0x00000044b68e)
* Merge commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428'James Almer2017-03-211-6/+6
|\ | | | | | | | | | | | | * commit '2ec9fa5ec60dcd10e1cb10d8b4e4437e634ea428': idct: Change type of array stride parameters to ptrdiff_t Merged-by: James Almer <jamrial@gmail.com>
| * idct: Change type of array stride parameters to ptrdiff_tDiego Biurrun2016-09-291-5/+5
| | | | | | | | ptrdiff_t is the correct type for array strides and similar.
* | lavc/aarch64: add ff_simple_idct{,_add,_put}_neon functionsMatthieu Bouron2017-03-161-0/+2
| |
* | avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for idctdsp functionsShivraj Patil2015-07-071-0/+2
| | | | | | | | | | | | | | This patch adds MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions in new file idctdsp_msa.c and simple_idct_msa.c Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/idctdsp: use the 10bit code for 9 bit tooMichael Niedermayer2014-12-201-1/+1
| | | | | | | | | | | | 9bit is currently not used Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_sizeJames Almer2014-09-241-5/+5
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '1274ea8dbaec44355bde07f6bb31fec0c4e6fd2d'Michael Niedermayer2014-09-081-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '1274ea8dbaec44355bde07f6bb31fec0c4e6fd2d': Split off floating point AAN (I)DCT into separate components Conflicts: configure libavcodec/Makefile libavcodec/dct-test.c libavcodec/idctdsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Split off floating point AAN (I)DCT into separate componentsDiego Biurrun2014-09-071-0/+2
| |
* | avcodec/idctdsp: Initialize ff_put/add_pixels_clamped correctly so that the ↵Michael Niedermayer2014-09-031-3/+3
| | | | | | | | | | | | optimized functions are also used Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '95c0cec03acec0a80cc1c7db48f3b2355d9e767b'Michael Niedermayer2014-09-031-19/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '95c0cec03acec0a80cc1c7db48f3b2355d9e767b': idctdsp: Add global function pointers for {add|put}_pixels_clamped functions Conflicts: libavcodec/arm/idctdsp_init_arm.c libavcodec/dct.h libavcodec/idctdsp.c libavcodec/jrevdct.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * idctdsp: Add global function pointers for {add|put}_pixels_clamped functionsDiego Biurrun2014-09-021-14/+8
| | | | | | | | | | | | These function pointers already existed in the ARM code. Adding them globally allows calls to the function pointers to access arch-optimized versions of the functions transparently.
* | Merge commit 'dcb7c868ec7af7d3a138b3254ef2e08f074d8ec5'Michael Niedermayer2014-08-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dcb7c868ec7af7d3a138b3254ef2e08f074d8ec5': cosmetics: Make naming scheme of Xvid IDCT consistent with other IDCTs Conflicts: libavcodec/mpeg4videodec.c libavcodec/x86/Makefile libavcodec/x86/dct-test.c libavcodec/x86/xvididct_sse2.c libavcodec/xvididct.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/idctdsp: make add/put_pixels_clamped_c internal functionsJames Almer2014-08-131-4/+45
| | | | | | | | | | | | | | This reduces code duplication and differences with the fork. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/idctdsp: move add/put_pixels_clamped_c to headerMichael Niedermayer2014-08-111-41/+0
| | | | | | | | | | | | This allows sharing them with the xvid IDCT Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: remove deprecated use of FF_IDCT_XVIDMMXMichael Niedermayer2014-08-091-1/+1
| | | | | | | | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit eedc3f36532e4c6de782fe1c2dc59d192418a8fc) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6f1960ab71b4f18551243ce22d01913108265233'Michael Niedermayer2014-08-081-16/+16
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '6f1960ab71b4f18551243ce22d01913108265233': idct: cosmetics: Drop one unnecessary if-block level Conflicts: libavcodec/idctdsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * idct: cosmetics: Drop one unnecessary if-block levelDiego Biurrun2014-08-081-17/+15
| |
* | Merge commit 'a786c8259dafeca9744252230b5d78f67810770c'Michael Niedermayer2014-08-011-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a786c8259dafeca9744252230b5d78f67810770c': idct: Split off Xvid IDCT Conflicts: libavcodec/Makefile libavcodec/mpeg4videodec.c libavcodec/x86/Makefile libavcodec/x86/idctdsp_init.c This split is somewhat restructured leaving the xvid IDCT available outside mpeg4 if manually selected. The code also could not be merged unchanged as it conflicted with a bugfix in FFmpeg Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '8b0dd4942aac320d1ca3c40fa7ea1be342c71273'Michael Niedermayer2014-07-181-24/+24
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '8b0dd4942aac320d1ca3c40fa7ea1be342c71273': idctdsp: prettyprinting cosmetics Conflicts: libavcodec/idctdsp.c libavcodec/ppc/idctdsp.c libavcodec/x86/idctdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * idctdsp: prettyprinting cosmeticsDiego Biurrun2014-07-181-16/+16
| |
* | Merge commit 'b4987f72197e0c62cf2633bf835a9c32d2a445ae'Michael Niedermayer2014-07-181-16/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'b4987f72197e0c62cf2633bf835a9c32d2a445ae': idct: Convert IDCT permutation #defines to an enum Conflicts: libavcodec/idctdsp.c libavcodec/x86/cavsdsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * idct: Convert IDCT permutation #defines to an enumDiego Biurrun2014-07-181-12/+12
| | | | | | | | Also rename the enum values to be consistent with other DCT permutations.
* | alpha/idctdsp: move idct init code out of dsputilJames Almer2014-07-081-0/+2
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'Michael Niedermayer2014-07-011-11/+125
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* dsputil: Split off IDCT bits into their own contextDiego Biurrun2014-06-301-0/+197