Marvin Scholz
81747b5259
avutil: use av_dict_iterate
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Lynne
710d83bdde
lavu/tx: zero-out imaginary of last coefficient in forward RDFTs
...
We didn't do this, because it's zero anyway, but it prevents users from using
uninitialized memory in calculations.
2 years ago
Michael Niedermayer
7792825ad6
avutil/tx: Use unsigned in ff_tx_fft_sr_combine() to avoid undefined behavior
...
Fixes: signed integer overflow: -1284837070 - 982101618 cannot be represented in type 'int'
Fixes: 53105/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-4848015827664896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Lynne
90c17a05aa
x86/tx_float: fix stray change in 15xM FFT and replace imul->lea
...
Thanks to rorgoroth for bisecting and kurosu for the lea suggestion.
2 years ago
Andreas Rheinhardt
1a7efafd33
avutil/tx: Use proper deallocator
...
May fix the FATE failures on x64 Windows here:
https://fate.ffmpeg.org/report.cgi?slot=x86_64-msvc17-windows-native&time=20221125130443
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Lynne
a56d7e0ca3
lavu/tx: add DCT-III implementation
2 years ago
Lynne
504b7bec1a
lavu/tx: add DCT-II implementation
2 years ago
Lynne
93c30bd6f0
lavu/tx: clarify stride for RDFT transforms
2 years ago
Lynne
43d285a40f
lavu/tx: fix last coefficient scaling for R2C transforms
...
This was a typo.
2 years ago
Lynne
8547123f3b
lavu/tx: generalize PFA FFTs
...
This commit permits any stacking of FFTs of any size.
2 years ago
Lynne
7f019e7758
lavu/tx: add length decomposition function
...
Rather than using a list of lengths supported, this goes a step beyond
and uses all registered codelets to come up with a good decomposition.
2 years ago
Lynne
87bae6b018
lavu/tx: refactor to explicitly track and convert lookup table order
...
Necessary for generalizing PFAs.
2 years ago
Lynne
1c8d77a2bf
lavu/tx: refactor and separate codelet list and prio code
2 years ago
Lynne
958b3760b5
lavu/tx: improve transform tree logging
...
Now prints the actual codelet size used, as well as the number of
allowed factors.
2 years ago
Lynne
6ddd10c3e2
lavu/tx: allow codelets to specify a minimum number of matching factors
2 years ago
Lynne
dd77e61182
lavu/tx: add ff_tx_clear_ctx()
...
This function allows implementations to clean up a context after
successfully initializing subcontexts.
2 years ago
Lynne
fab97faf02
x86/tx_float: implement striding in fft_15xM
2 years ago
Lynne
92100eee5b
x86/tx_float_init: properly specify the supported factors of 15xM FFTs
...
Only powers of two are currently supported.
2 years ago
Lynne
cc1df4045e
x86/tx_float: add a standalone 15-point AVX2 transform
...
Enables its use everywhere else in the framework.
2 years ago
Lynne
877e575b5d
x86/tx_float: optimize and macro out FFT15
2 years ago
Lynne
fbe4fd992f
lavu/tx: support output stride in naive transforms
...
Allows them to be used in general PFAs.
2 years ago
Lynne
68cabf8750
lavu/tx: add fft_inplace_small transforms
...
This is much faster than the loop.
2 years ago
Lynne
d4e39cae2e
lavu/tx: drop requirement of input == output for in-place transforms
...
No longer necessary.
2 years ago
Lynne
fff3e1d848
lavu/tx: support out-of-place transforms in fft_inplace
...
This makes testing easier, as a unified path can be used for in/out of
place transforms.
2 years ago
Lynne
d260796f11
lavu/tx: make C ptwo transforms in+out of place
...
We assume that _all_ in-place transforms can operate out of place,
which isn't true, because the C ptwo transforms were always in-place (dst).
2 years ago
Lynne
37008dc402
lavu/tx: add naive_small FFT
...
The same as naive but with precomputed tables. Makes it more useful
for odd-factors we don't support yet.
2 years ago
Lynne
e8a9b7b298
lavu/tx: list all odd-length FFT factors as regular codelets
...
Allows them to be picked just like any other transform.
2 years ago
Lynne
45bd4bf79f
lavu/tx: generalize single-factor transforms
...
Not that useful, but it gives us fast small odd-length transforms.
2 years ago
Lynne
79f11e2409
lavu/tx: make prime factor transforms truly in-place
...
They all overwrote in[0] and then used it as a DC.
2 years ago
Haihao Xiang
3dc8bceabe
lavu/pixfmt: Update the description for AV_PIX_FMT_QSV
...
Since D3D11 was introduced for QSV in FFmpeg 5.0, there is an implied
API/ABI change for user-supplied frames [1], hence update the
description for AV_PIX_FMT_QSV.
[1] https://ffmpeg.org/pipermail/ffmpeg-devel/2021-December/290444.html
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2 years ago
Zhao Zhili
b7a3f16957
avutil/hwcontext: verify hw_frames_ctx in transfer_data_alloc
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2 years ago
Zhao Zhili
2697f23f4e
avutil/hwcontext_mediacodec: add ANativeWindow support
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2 years ago
James Almer
84fe53f6e1
avutil/hwcontext_cuda: fix compilation without Vulkan after last commit
...
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
f4aa5c275f
avutil/hwcontext_cuda: fix mixed declarations and code warning
...
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
Andreas Rheinhardt
c124981b79
avutil/cast5: Avoid undefined shift of uint32_t by 32 places
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
James Almer
86157f5a25
avutil/tx: use llrintf() to convert a float into a 64 bit integer
...
Should fix fate failures on Windowx x86 targets, where long is 32 bits.
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
d5c7970a27
avutil/tx: use a lower log level for the debug messages
...
The amount of lines printed is too high for the verbose level, and the debug
level is a better fit for their content.
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
Marvin Scholz
2508e846a8
avutil/dict: Improve documentation
...
Mostly consistent formatting and consistently ordering of
warnings/notes to be next to the description.
Additionally group the AV_DICT_* macros.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years ago
Marvin Scholz
3101b8afb3
avutil/dict: Use av_dict_iterate in av_dict_get_string
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years ago
Marvin Scholz
3c2050b749
avutil/dict: Use av_dict_iterate in av_dict_copy
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years ago
Marvin Scholz
5f7c5a0bd7
avutil/dict: Use av_dict_iterate in av_dict_get
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years ago
Marvin Scholz
9dad237928
avutil/dict: Add av_dict_iterate
...
This is a more explicit iteration API rather than using the "magic"
av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX) which is not really
trivial to grasp what it does when casually reading through code.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years ago
James Darnley
0f252dfa95
avutil/tests/cpu: print the avx512icl flag
2 years ago
James Almer
6228ba141d
avutil/channel_layout: add a 7.1(top) channel layout
...
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
James Almer
83e918de71
avutil/channel_layout: add a cube channel layout
...
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
Andreas Rheinhardt
f8efd890bf
avutil/tx_template: Move function pointers to const memory
...
This can be achieved by moving the AVOnce out of the structure
containing the function pointers; the latter can then be made
const.
This also has the advantage of eliminating padding in the structure
(sizeof(AVOnce) is four here) and allowing the AVOnces to be put
into .bss (dependening upon the implementation).
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
188216581b
avutil/tx_template: Avoid code duplication
...
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
2af5f55b2e
avutil/tx_template: Don't waste space for inexistent factors
...
It is possible to avoid the factors array for the power-of-two
tables for which said array is unused by using a different
structure for initialization for power-of-two tables than for
non-power-of-two-tables. This saves 3*15*16B from .data.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
d7c3e52fbf
avutil/integer: Use '|' instead of '+' where it is more natural
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
9a6cdd1ba3
avutil/integer: Fix undefined left shifts of negative numbers
...
Affected the integers FATE-test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago