aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/tests
Commit message (Collapse)AuthorAgeFilesLines
* all: fix typos found by codespellTimo Rothenpieler8 days2-2/+2
|
* all: fix whitespace/new-line issuesTimo Rothenpieler8 days1-1/+0
|
* avutil/tests/channel_layout: Improve enum range checkAndreas Rheinhardt2025-04-091-1/+1
| | | | | | | | | | Both GCC and Clang use unsigned as underlying type of an enum with no negative enumeration constants, making checks like "layout->order >= 0" here tautologically true. Clang warns about this. Combine both range checks by casting to unsigned to suppress this warning. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tests/aes_ctr: also randomize the encryption keyJames Almer2025-04-051-3/+24
| | | | | | And not just the IV. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/aes_ctr: reindent after the previous commitJames Almer2025-04-051-17/+17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/aes_ctr: also check the encrypted bufferJames Almer2025-04-051-0/+23
| | | | | | | | | | | | | | The test in its current form is just ensuring the plain text output is the same as the plain text input, not bothering to check if anything was done with the latter. av_aes_ctr_crypt() could be a simple memcpy under the hood and this test would still succeed. To check the integrity of the encrypted buffer, both the IV and the key need to be fixed. As such, and in order to not remove the existing randomization of the input IV, do two runs, one with random initialization data, and one with static data. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/aes_ctr: test more than a single block worth of dataJames Almer2025-04-051-2/+3
| | | | | | | This should exercise the implementation more thoroughly after an upcoming change. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/libm: Only include intfloat.h when neededAndreas Rheinhardt2025-03-221-0/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tests/pixfmt_best: add more semi planar format testsJames Almer2025-03-191-0/+22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/color_utils: reduce accuracy threshold to pass to 1e-7Hendrik Leppkes2024-12-071-1/+1
| | | | | | | | Fixes FATE on a variety of configurations due to accuracy problems in floating point math. Most constants tested against here are not even specified with 7 decimal digits. Reviewed-by: Niklas Haas <git@haasn.dev>
* avutil/tests/color_utils: add tests for av_csp_itu_eotfNiklas Haas2024-12-051-0/+110
|
* avutil/csp: add av_csp_trc_inv_from_id()Niklas Haas2024-12-051-2/+11
| | | | | Mathematical inverse of av_csp_trc_from_id(), plus testing to make sure it roundtrips correctly with the corresponding TRC.
* avutil/tests/color_utils: clean up slightly (cosmetic)Niklas Haas2024-12-051-16/+18
| | | | | Rewrite this test slightly to fix the formatting, improve the readability of the output, and eliminate some unnecessary branching.
* configure: Add wasm as a fake archZhao Zhili2024-12-041-0/+2
| | | | | | | | | And add wasm simd128 flag, so we can add simd128 optimizations. It can be enabled by put -msimd128 to extra cflags. There is no runtime detection on simd128 support yet. I think that needs to be done with JavaScript. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* tests/cpu: print the RISC-V Vector lengthRémi Denis-Courmont2024-11-171-0/+8
|
* avutil/pixfmt: add XV48 pixel formatJames Almer2024-10-261-0/+2
| | | | | | | Much like XV30 and XV36 in d75c4693fef51e8f0a1b88798530f4c5147ea906, XV48 is added to support 16bit 4:4:4 as defined by Microsoft. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixfmt: add Y216 pixel formatJames Almer2024-10-231-0/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixdesc: add alpha component information to pixfmts with reserved but ↵James Almer2024-10-211-2/+1
| | | | | | | | | | | | undefined alpha bits This can be useful to simplify certain processes that need to know how many reserved bits there are and where they are placed, even if they are ultimately unused, as will be shown in the next commit. For any other case where the user simply looks at nb_components components, it will make no difference. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixfmt: add VYU444 pixel formatJames Almer2024-10-081-0/+1
| | | | | | | This maps to the 444YpCbCr8 pixel format as defined by Apple, which is ordered Cr Y' Cb. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixfmt: add UYVA pixel formatJames Almer2024-10-081-0/+1
| | | | | | | This maps to the 4444YpCbCrA8 pixel format as defined by Apple, which is ordered Cb Y' Cr A. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixfmt: add AYUV pixel formatJames Almer2024-10-081-0/+1
| | | | | | | This maps to the 4444AYpCbCr8 pixel format as defined by Apple, which is ordered A Y’ Cb Cr. Signed-off-by: James Almer <jamrial@gmail.com>
* ppc: Recognize the PPC VSX and Power8 CPU flagsBrad Smith2024-09-281-0/+2
| | | | Signed-off-by: Brad Smith <brad@comstyle.com>
* libavutil: Fix building libavutil/tests/cpu for aarch64 without SVEMartin Storsjö2024-09-271-1/+1
| | | | | | | | This adds a condition that was missed in b1ee2af8432e2720009df92f4ee49d98b05dc2ce, fixing compilation on toolchains that don't support SVE. Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Print the SVE vector length in libavutil/tests/cpu.cMartin Storsjö2024-09-271-0/+8
| | | | | | This makes this aspect more visible in test logs. Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Add CPU feature flags for SVE and SVE2Martin Storsjö2024-09-271-0/+2
| | | | | | Add code for detecting the feature on Linux and Windows. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavu/opt: add API for retrieving array-type option valuesAnton Khirnov2024-08-271-0/+63
| | | | | Previously one could only convert the entire array to a string, not access individual elements.
* lavu/riscv: drop probing for zba CPU capabilityRémi Denis-Courmont2024-08-051-1/+0
|
* lavc/riscv: drop probing for F & D extensionsRémi Denis-Courmont2024-08-011-2/+0
| | | | | | | | | | F and D extensions are included in all RISC-V application profiles ever made (so starting from RV64GC a.k.a. RVA20). Realistically they need to be selected at compilation time. Currently, there are no consumers for these two flags. If there is ever a need to reintroduce F- or D-specific optimisations, we can always use __riscv_f or __riscv_d compiler predefined macros respectively.
* lavu/riscv: add CPU flag for B bit manipulationsRémi Denis-Courmont2024-07-251-0/+1
| | | | | | | | The B extension was finally ratified in May 2024, encompassing: - Zba (addresses), - Zbb (basics) and - Zbs (single bits). It does not include Zbc (base-2 polynomials).
* avutil/tests/opt: Check av_set_options_string() for failureMichael Niedermayer2024-05-281-1/+4
| | | | | | | | | This is test code after all so it should test things Fixes: CID1518990 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/tests/dict: Check av_dict_set() before get for failureMichael Niedermayer2024-05-281-3/+6
| | | | | | | | | Failure is possible due to strdup() Fixes: CID1516764 Dereference null return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu/riscv: CPU flag for fast misaligned accessesRémi Denis-Courmont2024-05-141-1/+2
|
* avutil/tests/base64: Check with too short output arrayMichael Niedermayer2024-05-131-0/+10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* riscv: add Zvbb vector bit manipulation extensionRémi Denis-Courmont2024-05-111-0/+1
|
* avutil/opt: add an unsigned option typeJames Almer2024-05-041-0/+9
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/opt: test values > INT_MAX for INT64 typeJames Almer2024-05-041-2/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/opt: test negative values for INT and INT64 typesJames Almer2024-05-041-2/+9
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/opt: add support for children objects in av_opt_serializeJames Almer2024-04-231-3/+46
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/opt: test av_opt_find2()James Almer2024-04-231-0/+49
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/test/opt: test the AV_OPT_SERIALIZE_SKIP_DEFAULTS flagJames Almer2024-04-231-0/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add a flag to allow overwritting existing entriesJames Almer2024-04-111-22/+30
| | | | | | Enable it only for side data types that don't allow more than one entry. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-315-0/+6
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tests/.gitignore: Add side_data_arrayAndreas Rheinhardt2024-03-281-0/+1
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/frame: add helper for adding side data to arrayJan Ekström2024-03-201-0/+103
| | | | | Additionally, add an API test to check that the no-duplicates addition works after duplicates have been inserted.
* avutil/channel_layout: add specific text versions for unknown and unused ↵Marton Balint2024-03-161-0/+2
| | | | | | channels Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/tests/channel_layout: add some av_channel_from_string and ↵Marton Balint2024-03-161-0/+26
| | | | | | | | | av_channel_layout_from_string tests We lacked tests which supposed to fail, and there are some which should fail but right now it does not. This will be fixed in a later commit. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/tests/channel_layout: make printing results part of the testsMarton Balint2024-03-161-185/+98
| | | | | | | | | | Deduplicates a lot of code. Some minor differences (mostly white space and inconsistent use of quotes) are expected in the fate tests, there was no point aiming for exactly the same formatting. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavu/opt: add array optionsAnton Khirnov2024-03-081-0/+49
|
* avutil/tests/pixelutils: Remove dead codeAndreas Rheinhardt2024-02-211-8/+0
| | | | | | Forgotten in e6b125e3be19fb341fd9a759ad0af3b39ba35e0c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tests/channel_layout: add tests for av_channel_order_retypeMarton Balint2024-02-181-0/+63
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>