Marton Balint
a619787a9c
avutil/tests/opt: add av_opt_get/av_opt_set tests
...
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
Marton Balint
672b925e8a
avutil/tests/opt: add tests for AV_OPT_TYPE_DICT
...
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
Philip Langdale
5de4f1d871
avutil: Add NV24 and NV42 pixel formats
...
These are the 4:4:4 variants of the semi-planar NV12/NV21 formats.
These formats are not used much, so we've never had a reason to add
them until now. VDPAU recently added support HEVC 4:4:4 content
and when you use the OpenGL interop, the returned surfaces are in
NV24 format, so we need the pixel format for media players, even
if there's no direct use within ffmpeg.
Separately, there are apparently webcams that use NV24, but I've
never seen one.
6 years ago
Peter Ross
436bffaca2
avutil/tests/random_seed: seeds[] is uint32_t, therefore use PRIX32 macro
...
squelch format type warning
6 years ago
Marton Balint
416804fe41
avutil/tests/parseutils: add some big duration tests
...
Signed-off-by: Marton Balint <cus@passwd.hu>
6 years ago
Jun Zhao
b8bf7408dc
lavutil/pixelutils: add sad_32x32 in pixelutils API.
...
add sad_32x32 in pixelutils API, and update the fate.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
7 years ago
Jacob Trimble
69bd73b3ff
libavutil/encryption_info: Add unit tests.
...
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Jacob Trimble
96281ed689
avutil/gitignore: Ignore integer test binary.
...
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Jun Zhao
7f5b8f0883
tests/bprint: Replace the number by macro for bprint init
...
Replace the number by macro for bprint init.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
7 years ago
Mark Thompson
ba7d1377e8
hwcontext: Add test for device creation and derivation
...
This uses any devices it can find on the host system - on a system with no
hardware device support or in builds with no support included it will do
nothing and pass.
7 years ago
Marton Balint
56b081da57
avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8
...
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years ago
James Almer
72bb955625
avutil/integer: move the test to the corresponding subdirectory
...
And actually enable it.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Aurelien Jacobs
0b4ad86959
crc: add AV_CRC_8_SBC as a 8 bits CRC with polynomial 0x1D
7 years ago
Jacob Trimble
9f07cf7c00
avutil/aes_ctr: Add method to set 16-byte IV.
...
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Anton Khirnov
89b84cb18b
It has been replaced by C11 stdatomic.h and is now unused.
...
(cherry picked from commit 5cc0057f49
)
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
James Darnley
8b81eabe57
avutil: add AVX-512 flags
7 years ago
James Almer
90eb0a2180
avutil/tests/hmac: remove superfluous loop
...
The gap in enum values has been removed.
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Jesse Liu
8e17cd20b9
add missing ignore files
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Clément Bœsch
e0b9b3e60e
lavu/tests: move timer.h include earlier
...
In the next commit, timer.h will require a _GNU_SOURCE to be set before
including system headers. This commit prevents compilation failures.
7 years ago
Clément Bœsch
dc27df47ff
lavu/tests/des: rename crypt to crypt_ref
...
This will prevent a symbol clash with crypt(3) after unistd.h is
included.
7 years ago
Tobias Rapp
60008c0fe9
fate: update pixfmt_best test to check for endianness
...
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
8 years ago
Mark Thompson
3192821237
pixdesc: Add a test for av_find_best_pix_fmt_of_2()
8 years ago
James Almer
e53c9065ca
avutil/tests: remove float_dsp test
...
It's been ported to checkasm.
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Diego Biurrun
97cfe1d8bd
Convert all AVClass struct declarations to designated initializers.
8 years ago
Steven Liu
44cd7502c7
avutil/avstring: improve av_strreplace implement
...
Use AVBprint to implement av_strreplace
add av_strreplace test case TEST_STRREPLACE
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
8 years ago
James Almer
128e1fbf13
avutil/float_dsp: add test for vector_dmac_scalar
8 years ago
Michael Niedermayer
afebf470ca
avutil/tests/dict: Check return of av_dict_parse_string()
...
Fixes: CID1396402
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
1d0bad421c
avutil/tests/lfg: Remove debugging start/stop timer
...
Fixes code with qemu ARM
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
a50ccbd240
avutil/tests/lfg.c: added proper normality test
...
The Chen-Shapiro(CS) test was used to test normality for
Lagged Fibonacci PRNG.
Normality Hypothesis Test:
The null hypothesis formally tests if the population
the sample represents is normally-distributed. For
CS, when the normality hypothesis is True, the
distribution of QH will have a mean close to 1.
Information on CS can be found here:
http://www.stata-journal.com/sjpdf.html?articlenum=st0264
http://www.originlab.com/doc/Origin-Help/NormalityTest-Algorithm
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Micah Galizia
489c09ad4b
add locale month names to av_small_strptime
...
Signed-off-by: Micah Galizia <micahgalizia@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Diego Biurrun
b83aea7340
des-test: Pass the proper types to av_des_*() functions
...
Fixes a number of incompatible pointer type warnings.
8 years ago
Matthieu Bouron
adf5dc90a9
avutil/tests: add aes_ctr, audio_fifo and imgutils to .gitignore
8 years ago
Thomas Turner
08fdf965c9
avutil/tests/audio_fifo.c: pass by reference for efficiency and change datatype to const
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
3126ca2825
avutil/tests: added selftest for aes_ctr.c
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
b7a6d28e5e
avutil/tests: improved code coverage for atomic
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
1bfb4587a2
avutil/tests/audio_fifo.c: Memory leak and tab space fixes
...
Prevents memory leak when read_samples_from_audio_fifo() is
called more than once by deallocating before reallocating
more memory.
Fixes space indentation for contents in ERROR().
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
11b7cad3dc
avutil/tests/audio_fifo.c: use av_malloc() family of functions
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
d7a3c7427f
avutil/tests/audio_fifo.c: Corrected test error messages
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
James Almer
94eb600f35
tests/audio_fifo: fix buffer allocation for non planar formats
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Michael Niedermayer
c193132ce5
avutil/tests/random_seed: eliminate goto
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
8dcb28cf6d
avutil/tests: Improved code coverage for random_seed
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
James Almer
0abcebe3d6
tests/avstring: free the pointer after calls to av_d2str()
...
Fixes memleaks.
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Thomas Turner
9f76ad2a46
avutil: Added selftest for libavutil/audio_fifo.c
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Thomas Turner
e303e3d4b9
avutil: Improved test coverage for avstring.c
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
4cf3def805
avutil/tests/imgutils: Remove unused variable
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Wan-Teh Chang
3703f13333
avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADS
...
Suggested by Diego Biurrun and James Almer.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Wan-Teh Chang
8986885801
avutil/cpu_init: remove unnecessary arguments to the main() function
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Michael Niedermayer
1b39a30247
fate: add av_image_check_size() test
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Wan-Teh Chang
2170017a1c
avutil: fix data race in av_get_cpu_flags()
...
Make the one-time initialization in av_get_cpu_flags() thread-safe. The
static variables |flags|, |cpuflags_mask|, and |checked| in
libavutil/cpu.c are read and written using normal load and store
operations. These are considered as data races. The fix is to use atomic
load and store operations.
Remove the |checked| variable because the invalid value of -1 for
|flags| can be used to indicate the same condition. Rename |flags| to
|cpu_flags| and move it to file scope.
The fix can be verified by running the libavutil/tests/cpu_init.c test
program under ThreadSanitizer:
./configure --toolchain=clang-tsan
make libavutil/tests/cpu_init
libavutil/tests/cpu_init
There should be no warnings from ThreadSanitizer.
Co-author: Dmitry Vyukov of Google, who suggested the data race fix.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
8 years ago
Wan-Teh Chang
048b46b4e2
avutil/tests: add cpu_init to .gitignore and tests/fate
...
This is a follow-up to commit d84a21207e
,
which added the libavutil/tests/cpu_init.c.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago