Commit Graph

94 Commits

Author SHA1 Message Date
Pierre-Anthony Lemieux
7c2f029ede
avutil/tests/uuid: add uuid tests 2022-06-12 18:34:37 +10:00
softworkz
22ab2a375d libavutil/tests/md5: Remove 'volatile workaround' to avoid warnings
Those are always showing up on Patchwork when FATE tests are failing,
covering some possibly more useful information.

The volatile keyword was used as a workaround for an eight year old
clang version.

Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-08 22:24:31 +02:00
James Almer
7602b4e4c2 avutil/tests/channel_layout: also test ambisonic layouts in av_channel_layout_subset()
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 17:10:39 -03:00
James Almer
cbeb827cfb avutil/tests/channel_layout: test av_channel_layout_check()
Should increase test coverage

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 12:09:21 -03:00
James Almer
95ac380252 avutil/tests/channel_layout: test the output of av_channel_layout_subset()
Should increase test coverage a bit

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 12:09:19 -03:00
James Almer
167c5a6afc avutil/tests/channel_layout: test the output of av_channel_layout_standard()
Should increase test coverage.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 11:46:51 -03:00
James Almer
f9ed91abc9 avutil/tests/channel_layout: test generating a custom layout using ambisonic channels and a non diegetic channel with a custom name
Should increase test coverage a bit

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 11:46:48 -03:00
Vittorio Giovara
886847afa0 channel_layout: add support for Ambisonic
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:47 -03:00
Anton Khirnov
f423497b45 lavu: support AVChannelLayout AVOptions
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:29 -03:00
James Almer
f51e169d2b fate: add a channel_layout API test
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:29 -03:00
Andreas Rheinhardt
636631d9db Remove unnecessary libavutil/(avutil|common|internal).h inclusions
Some of these were made possible by moving several common macros to
libavutil/macros.h.

While just at it, also improve the other headers a bit.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Andreas Rheinhardt
84f16bb5e6 avutil/avassert: Don't include avutil.h
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Andreas Rheinhardt
b389ff9a85 avutil/display: Don't include avutil.h
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Andreas Rheinhardt
321a3c244d avutil/log: Don't include avutil.h
It has been included since af5f434f8c
for deprecation reasons, but removing it has been forgotten after
it had served is purpose. So remove it.

For convenience, include version.h instead as LIBAVUTIL_VERSION_INT
is supposed to be used when creating AVClasses.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Anton Khirnov
d512115267 lavu/fifo: add a test for _cb functions
Makes an auto-growing FIFO and performs a sequence of randomly-sized
writes/peeks/reads.
2022-02-15 10:16:16 +01:00
Anton Khirnov
93ed375574 lavu/tests/fifo: switch to the new API 2022-02-07 00:31:23 +01:00
Andreas Rheinhardt
98cef1ebbe avutil/tests/adler32: Remove unnecessary volatile
And use an ordinary stack variable.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-29 21:26:26 +01:00
Anton Khirnov
63b013aa68 lavu/fifo: deprecate av_fifo_peek2()
It returns a pointer inside the fifo's buffer, which cannot be safely
used without accessing AVFifoBuffer internals. It is easier and safer to
use av_fifo_generic_peek_at().
2022-01-10 16:04:19 +01:00
James Almer
e1d3ef9217 avutil/tests/cpu: add slowgather
Signed-off-by: James Almer <jamrial@gmail.com>
2021-12-21 17:52:09 -03:00
Sebastian Kirmayer
dfd06ee710 avutil/twofish: Fixed decryption
The previous implementation swapped the two halves of the plaintext. The
existing tests only decrypted data with a plaintext of all zeroes, which is
not affected by swapping the halves. Tests which detect the old buggy behavior
have been added.

Signed-off-by: Sebastian Kirmayer <ffmpeg@kirmayer.eu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-19 01:02:59 +01:00
Shiyou Yin
9a840ffa17 avutil: [loongarch] Add support for loongarch SIMD.
LSX and LASX is loongarch SIMD extention.
They are enabled by default if compiler support it, and can be disabled
with '--disable-lsx' '--disable-lasx'.

Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Reviewed-by: guxiwei <guxiwei-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-12-15 18:37:40 +01:00
Andreas Rheinhardt
4e135347a7 avutil/tests/opt: Set AVClass.version
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-27 05:51:44 +02:00
Andreas Rheinhardt
2934a4b9a5 Remove unnecessary avassert.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:30 +02:00
Andreas Rheinhardt
4608f7cc6a Remove unnecessary mem.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:47:57 +02:00
Matthieu Patou
163559ed62 avutil/tests/audio_ffio: add missing header
Needed for HAVE_BIGENDIAN

Suggested-by: ffmpeg@fb.com
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-13 13:39:57 -03:00
James Almer
75f0bc651f avutil/tests/lzo: remove timer macros
Suggested-by: ffmpeg@fb.com
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-13 13:39:57 -03:00
Anton Khirnov
e15371061d lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
They are not properly namespaced and not intended for public use.
2021-01-01 14:14:57 +01:00
Anton Khirnov
c8c2dfbc37 lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h
That is a more appropriate place for it.
2021-01-01 14:11:01 +01:00
Nicolas George
06f2651204 lavu/avstring: deprecate av_d2str().
It is no longer used in our code base and does not seem
to be used much in other projects.
2020-08-21 11:01:39 +02:00
James Almer
134a48a880 tests/imgutils: test the output of av_image_fill_* functions
Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-30 19:33:09 -03:00
Jiaxun Yang
e387fcd01c libavutil: Detect MMI and MSA flags for MIPS
Add MMI & MSA runtime detection for MIPS.

Basically there are two code pathes. For systems that
natively support CPUCFG instruction or kernel emulated
that instruction, we'll sense this feature from HWCAP and
report the flags according to values grab from CPUCFG. For
systems that have no CPUCFG (or not export it in HWCAP),
we'll parse /proc/cpuinfo instead.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-23 17:21:58 +02:00
Marton Balint
a619787a9c avutil/tests/opt: add av_opt_get/av_opt_set tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-27 21:52:21 +01:00
Marton Balint
672b925e8a avutil/tests/opt: add tests for AV_OPT_TYPE_DICT
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-27 21:52:21 +01:00
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.
2019-05-12 07:51:02 -07:00
Peter Ross
436bffaca2 avutil/tests/random_seed: seeds[] is uint32_t, therefore use PRIX32 macro
squelch format type warning
2018-12-16 13:52:21 +11:00
Marton Balint
416804fe41 avutil/tests/parseutils: add some big duration tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-07 20:26:29 +02:00
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>
2018-07-31 19:09:35 +08:00
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>
2018-06-27 13:43:39 +02:00
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>
2018-06-27 13:43:38 +02:00
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>
2018-06-17 09:59:33 +08:00
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.
2018-05-21 20:54:52 +01:00
Marton Balint
56b081da57 avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:51:31 +02:00
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>
2018-03-20 23:27:58 -03:00
Aurelien Jacobs
0b4ad86959 crc: add AV_CRC_8_SBC as a 8 bits CRC with polynomial 0x1D 2018-03-07 22:26:53 +01:00
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>
2018-01-23 21:48:31 +01:00
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>
2018-01-05 14:06:02 -03:00
James Darnley
8b81eabe57 avutil: add AVX-512 flags 2017-12-24 22:02:41 +01:00
James Almer
e621b1ca64 Merge commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24'
* commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24':
  Convert all AVClass struct declarations to designated initializers.

Merged-by: James Almer <jamrial@gmail.com>
2017-11-01 20:05:09 -03:00
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>
2017-10-22 20:25:38 -03:00
Jesse Liu
8e17cd20b9 add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-10 19:08:33 +02:00