1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

5491 Commits

Author SHA1 Message Date
James Almer
327efa6633 avutil/opt: add missing case for AV_OPT_TYPE_CHLAYOUT in av_opt_free()
Fixes potential memleaks for existing options of this type.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-18 18:59:03 -03:00
Martin Storsjö
bea841a743 Fix libversion.sh for split version headers, to unbreak shared library builds
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-17 11:11:17 +02:00
James Almer
8ddf1795b9 avutil/attributes: add support for clang in AV_NOWARN_DEPRECATED
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-16 12:29:37 -03:00
James Almer
f2fe17c56d avutil/channel_layout: remove duplicate stereo downmix entry
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 22:54:41 -03:00
Marton Balint
ab7a929684 avutil/channel_layout: do not copy alloc new map for extra channel layout
Also use av_channel_layout_bprint directly for describing channel layout for
extra channels.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-15 23:19:24 +01:00
Marton Balint
92f27c6728 avutil/channel_layout: fix av_channel_layout_describe_bprint with custom and ambisonic channels
bp->len cannot be used to detect if try_describe_ambisonic was successful
because the bprint buffer might contain other data as well.

Also describing an invalid ambisonic layout should not return 0 but
AVERROR(EINVAL) instead, so change try_describe_ambisonic to actually return
error on invalid ambisonics. This also allows us to fix the first issue.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-15 23:19:24 +01:00
Marton Balint
580f7b6c3a avutil/channel_layout: factorize ambisonic order detection
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-15 23:19:24 +01:00
Marton Balint
bd40375dd2 avutil/channel_layout: print channels using av_channel_name_bprint in av_channel_layout_describe_bprint
This reduces code duplication an allows printing AMBI%d channel names for
custom layouts for non-standard or partial ambisonic layouts.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-15 23:19:24 +01:00
Andreas Rheinhardt
9e241bdffd avutil/channel_layout: Fix leak of string
Fixes memleaks in the channel_layout FATE-test.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-15 16:18:10 +01:00
James Almer
cdba98bb80 Bump minor versions after the channel layout changes
Forgotten in the respective commits adding new API.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 11:12:21 -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
db6efa1815 avframe: switch to the new channel layout API
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
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
Anton Khirnov
086a804806 avutil/channel_layout: Add a new channel layout API
The new API is more extensible and allows for custom layouts.
More accurate information is exported, eg for decoders that do not
set a channel layout, lavc will not make one up for them.

Deprecate the old API working with just uint64_t bitmasks.

Expanded and completed by Vittorio Giovara <vittorio.giovara@gmail.com>
and James Almer <jamrial@gmail.com>.
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
Martin Storsjö
c3fea6d83b aarch64: Only emit the PAC/BTI note section when targeting ELF
This avoids build errors if such features are enabled while targeting
another binary format. (Using such features on other platforms
might require some other form of signaling/setup though, but
the ELF specific .note section isn't applicable at least.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-15 00:44:28 +02:00
Zhao Zhili
910a24eb33 avutil/hwcontext_vulkan: fix typo in undef 2022-03-14 17:50:07 +01:00
Wu Jianhua
f629ea2e18 avutil/cpu: add AVX512 Icelake flag
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-10 16:45:48 -03:00
Andre Kempe
248986a0db arm64: Add Armv8.3-A PAC support to assembly files
This patch adds optional support for Arm Pointer Authentication Codes.

PAC support is turned on or off at compile time using additional
compiler flags. Unless any of these is enabled explicitly, no additional
code will be emitted at all.

Signed-off-by: André Kempe <andre.kempe@arm.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-09 15:04:25 +02:00
Hao Chen
5b812acdea avutil: [loongarch] Update loongson_intrinsics.h to v1.1.0
The loongson_intrinsics.h file is updated from v1.0.3 version
to v1.1.0. Some spelling mistakes are fixed and new functions are added.

Signed-off-by: Hao Chen <chenhao@loongson.cn>
Reviewed-by: 殷时友 <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-01 23:53:40 +01:00
Limin Wang
188faab2bb avutil: support for CUVA Vivid HDR metadata
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-03-01 09:08:43 +08:00
James Almer
ff145498b2 avutil: make lzo always compile
Having optionally installed headers is a bad idea as there's no way to know
if they are present or not (unless a define is added to avconfig.h, but that's
just ugly).

Signed-off-by: James Almer <jamrial@gmail.com>
2022-02-26 14:17:00 -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
155cd6baa4 Remove obsolete version.h inclusions
Forgotten in e7bd47e657.

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
2c2d76b50d avutil/integer: Don't include common.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
94d5892bea avutil/pixelutils: Don't include common.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
8e7d2e4621 avutil/samplefmt: Don't include attributes.h, 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
e82d94ee46 avutil/imgutils: Don't include avutil.h
It is a remnant of an FF_API_* inclusion (back from when they were in
avutil.h and not in version.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
9d78acd861 avutil/eval: Don't include avutil.h
It has been added for an FF_API_* at a time when these were in 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
eaba16ba70 avutil/file: 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
0a1a8fcd56 avutil/fifo: 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
99b5956af1 avutil/audio_fifo: Avoid avutil.h inclusion
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
Lynne
9e2deba9a9
lavu/vulkan: avoid using strlen as a loop condition
Whatever.
2022-02-22 06:30:12 +01:00
Andreas Rheinhardt
6c694074e1 avutil/x86/emms: Don't unnecessarily include lavu/cpu.h
Only include it if it is needed, namely if __MMX__ is undefined.

X86 is currently the only arch where lavu/cpu.h is basically
automatically included (for internal development): #if ARCH_X86
is true, lavu/internal.h (which is basically included everywhere)
includes lavu/x86/emms.h which can mask missing inclusions
of lavu/cpu.h if the developer works on x86/x64. This has happened
in 8e825ec3ab and also earlier
(see 6d2365882f).
By including said header only if necessary ordinary developer machines
will behave like non-x86 arches, so that missing inclusions of cpu.h
won't go unnoticed any more.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-21 12:37:51 +01:00
Anton Khirnov
09ca2f1950 lavu/hwcontext: clarify behavior on av_hwframe_map() failure
Clear anything that av_hwframe_map() might have done to the destination
frame, but leave caller-provided fields unchanged.
2022-02-17 11:05:44 +01:00
Anton Khirnov
6fc5e5a52c lavu/hwcontext_opencl: clear dangling pointers on map failure 2022-02-17 11:05:44 +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
e9acff8a01 lavu/fifo: fix a corner case in av_fifo_grow2()
When the fifo is grown by exactly the current write offset, it would end
up with offset_w = nb_elems. If av_fifo_write_from_cb() is called in
such a state, the user callback would get callled with *nb_elems=0,
which will then cause the write to return without writing anything.
2022-02-15 10:16:16 +01:00
Anton Khirnov
73b01844c2 lavu/hwcontext_qsv: fix a potential infinite loop
Current code will loop forever if MFXVideoVPP_Init() fails.
Also, simplify the code.
2022-02-15 10:16:16 +01:00
Anton Khirnov
cefa595361 lavu/pixfmt: deprecate AV_PIX_FMT_XVMC
It is no longer used for anything.
2022-02-15 10:16:16 +01:00
Andreas Rheinhardt
d75c4cc7c1 avutil/tx: Fix documentation of av_tx_uninit()
Adapt it to the actual (sane) behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-11 19:38:41 +01:00
Haihao Xiang
2727ff069e lavu/fifo: fix regression
offset_w might be updated after growing the FIFO

Fix ticket #9630

Tested-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: mkver
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-02-09 11:04:47 +08:00
Alexander Kanavin
91326dc942 libavutil: include assembly with full path from source root
Otherwise nasm writes the full host-specific paths into .o
output, which breaks binary reproducibility.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-02-08 10:42:26 +01:00
Aman Karmani
2f299c0b8b avutil: use getauxval(3) for CPU capabilities on linux/android ARM
getauxval is marginally faster, and works even when procfs is not mounted

support on Linux was added in glibc 2.16
support on Android was added in 4.4 (API 20)
fixes #6578

Signed-off-by: Aman Karmani <aman@tmm1.net>
2022-02-07 13:42:40 -08:00
Lynne
04cc7a5548
lavu/tx: wrap missed string in NULL_IF_CONFIG_SMALL
It's the only one that isn't defined through the macros used elsewhere.
2022-02-07 04:23:31 +01:00
Lynne
eac4c3574b
lavu/tx: disable debugging information when CONFIG_SMALL 2022-02-07 03:56:47 +01:00
Lynne
3bbe9c5e38
lavu/tx: refactor assembly codelet definition
This commit does some refactoring to make defining assembly codelets
smaller, and fixes compiler redefinition warnings. It also allows
for other assembly versions to reuse the same boilerplate code as
x86.

Finally, it also adds the out_of_place flag to all assembly codelets.
This changes nothing, as out-of-place operation was assumed to be
available anyway, but this makes it more explicit.
2022-02-07 03:56:45 +01:00