105398 Commits

Author SHA1 Message Date
Andreas Rheinhardt
24f1997822 avformat/amr: Don't reset AVFormatContext.priv_data
The AMR muxer doesn't have a private context, so it's priv_data
will be NULL. If it weren't, simply setting it to NULL would lead
to a memleak.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit a5a99cc11c7aea587c871d6ca3fc80d9f9828e27)
2022-01-08 19:00:26 +01:00
Andreas Rheinhardt
a20d6eb223 avformat/Makefile, amr: Add missing amr-demuxers->rawdec.o dependency
Forgotten in 1f447fd95463bbf39a78d886359a3006d82f6a94.
Also only enable amr_probe() and amr_read_header() in case
the AMR demuxer is enabled; this avoids having to add
a rawdec.o dependency to the muxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 78a840e7a3b6c4b8d4f665208d4ef4506ef9f5b5)
2022-01-08 19:00:26 +01:00
Andreas Rheinhardt
359836ce6c avformat/Makefile: Add missing libamqp->urldecode dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 5bdd8e67e65db3fd623b1f6835eb8942f3a469bf)
2022-01-08 19:00:26 +01:00
Fei Wang
9b099a97f0 lavc/av1dec: use frame split bsf
Split packed data in case of its contains multiple show frame in some
non-standard bitstream. This can benefit decoder which can decode
continuously instead of interrupt with unexpected error.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
(cherry picked from commit 7787cca18016c1f8100ab158f3479ba4b7e70467)
2022-01-08 11:09:17 -03:00
Martin Storsjö
6ff38630e1 aarch64: Disable ff_hevc_sao_band_filter_8x8_8_neon out of precaution
While this function on its own passes all of fate-hevc, there's
indications that the function might need to handle widths that
aren't a multiple of 8 (noted in commit
f63f9be37c799ddc835af358034630d31fb7db02, which later was
reverted).

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 24b93022fee322c7a17e326e2d162a1fbc3698ee)
2022-01-07 22:36:47 +02:00
Andreas Rheinhardt
60d6efe218 avformat/matroskaenc: Fix build with only WebM muxer enabled
In this case ff_isom_put_dvcc_dvvc() might not be available, leading
to linking failures. Given that WebM currently doesn't support DOVI,
this is fixed by #if'ing the offending code away if the Matroska
muxer is not enabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 217c90aac70af35e34381d7a99b4407686a3f47b)
2022-01-07 13:27:41 +01:00
Andreas Rheinhardt
3975f9328a configure: Add missing AMV muxer->riffenc dependency
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 41c62207f641b5cf3ae656068652f7dc958d5e79)
2022-01-07 13:26:40 +01:00
Andreas Rheinhardt
743d26ca04 avformat/Makefile: Fix name of PhotoCD demuxer
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 6e163619e3e46e719903de3271e8c1b850b7d501)
2022-01-07 13:26:26 +01:00
James Almer
c8df72fce5 avcodec/libdav1d: honor the requested strict_std_compliance level on supported builds
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 3e17e0e5eff896f43654635bd3219da56f807f11)
2022-01-06 23:05:12 -03:00
Andreas Rheinhardt
761a65106b configure: Add missing libshine->mpegaudioheader dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit e228d7b0db7d6cb02a73bee6d3bf4f6ecf92d0bf)
2022-01-06 08:31:12 +01:00
Andreas Rheinhardt
f59e8666f9 avcodec/Makefile: Add missing entry for ADPCM_IMA_AMV_ENCODER
Forgotten in 555f5c1fc5ae0c4e7b0431dc3166c3fcf3f4e979.

Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit df4cb384fb68454e23f8cc2b369e344c1bd8be7d)
2022-01-06 08:31:12 +01:00
Andreas Rheinhardt
b04b475917 avcodec/Makefile: Only compile nvenc.o if needed
This fixes compilation errors in case nvenc is enabled
(e.g. autodected) with both nvenc-based encoders disabled
because nvenc uses ff_alloc_a53_sei(), yet only the nvenc-based
encoders require atsc_a53.
(This error does not manifest itself in case of static linking
(nothing pulls in nvenc.o), but it exists with shared builds.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-01-05 19:37:50 +01:00
Wu Jianhua
eb091d211f avfilter/vf_blend: fix un-checked potential memory allocation failure
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2022-01-05 15:17:35 +01:00
Andreas Rheinhardt
85fca9f92b avcodec/Makefile: Add missing HEVC decoder->h274.o dependency
Forgotten in 3cc3f5de2afda5b8f880c0817e9d67c2dafbfe1e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit aa8bb05d29599fb5372a715d30c290c7b723c24b)
2022-01-05 14:43:11 +01:00
Wu Jianhua
b4d254f2e6 avutil/hwcontext_vulkan: fixed incorrect memory offset
This commit fixed hwupload in Vulkan:

ffmpeg -init_hw_device vulkan -i test.jpg -vf hwupload,hwdownload,format=yuv420p -y out.jpg

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2022-01-05 14:14:54 +01:00
James Almer
b9dbb6c114 Changelog: replace <next> by 5.0
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 746df0a19aab263bdba26d3ea9ca7e05e95b9db6)
2022-01-05 08:39:53 -03:00
Zane van Iperen
d4baad9fe3
Changelog: add IMF demuxer
Suggested-By: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
(cherry picked from commit 21e25d2fe231ba6b9cb9809771ceb5a3f4f90410)
2022-01-05 21:23:29 +10:00
Pierre-Anthony Lemieux
2c1dd39a98
avformat/imf: Fix indentation
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
(cherry picked from commit 74afc3c6506df4a0b5c85ea84bfd485f3b8c9ecd)
2022-01-05 21:23:28 +10:00
Pierre-Anthony Lemieux
8d18c08f0c
avformat/imf: fix CPL parsing error handling
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
(cherry picked from commit 76ffe1c2f1432001f2cdde42d53c839247a43380)
2022-01-05 21:23:27 +10:00
Pierre-Anthony Lemieux
2186555bc9
avformat/imf: fix bad free() when directory name of the input url is empty
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
(cherry picked from commit 59f1a46048109b8ec9f953d0d9348f9f1ae2a8c2)
2022-01-05 21:23:26 +10:00
Pierre-Anthony Lemieux
5fd7b8e9b2
avformat/imf: fix error CPL root element is absent
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
(cherry picked from commit c1b55cb70ce748c1193d3251575b639daf9e96f0)
2022-01-05 21:23:24 +10:00
Andreas Rheinhardt
696079924a avcodec/Makefile: Add missing mpegaudiodata.o dependency to MPEGAUDIO
mpegaudiodec_template.c uses stuff from mpegaudiodata directly,
yet this dependency was only indirectly fulfilled via mpegaudio-headers
before 33e6d57f01dd4742a2e25ac5fa072b487d9d02ce. Since this commit,
the latter only needs (and therefore provides) mpegaudiotabs,
leading to compilation failures.
This commit adds this missing direct dependency directly.
(Sorry for not having checked indirect dependencies.)

Found-by: Zane van Iperen <zane@zanevaniperen.com>
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 07fd34aca744d6ae64cd4756943ce508ee0f9973)
2022-01-05 05:17:50 +01:00
Niklas Haas
660858a9e4 lavfi/libplacebo: support dovi metadata application
libplacebo supports automatic dolby vision application, but it requires
us to switch to a new API. Also add some logic to strip the dolby vision
metadata from the output frames in any case where we end up changing the
colorimetry.

The libplacebo dependency bump is justified because neither 184 nor 192
are part of any stable libplacebo release, so users have to build from
git anyways for this filter to exist.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-01-05 03:16:35 +01:00
rcombs
1477386ca2 lavfi/drawutils: re-enable P010 and P016 support
These formats now work as expected.
2022-01-04 20:01:10 -06:00
rcombs
052ee78d14 lavfi/drawutils: overhaul to improve pixel format support
- No longer mixes u8 and u16 component accesses (this was UB)
- De-duplicated 8->16 conversion
- De-duplicated component -> plane+offset conversion
- De-duplicated planar + packed RGB
- No longer calls ff_fill_rgba_map
- Removed redundant comp_mask data member
- RGB0 and related formats no longer write an alpha value to the 0 byte
- Non-planar YA formats now work correctly
- High-bit-depth semi-planar YUV now works correctly
2022-01-04 20:01:10 -06:00
rcombs
8688209176 lavfi/drawutils: ensure we don't support formats with non-pixel-sized offsets 2022-01-04 20:01:10 -06:00
rcombs
55ff7356bf lavfi/drawutils: ensure we can't overflow a component 2022-01-04 20:01:10 -06:00
rcombs
c327743ee0 lavfi/drawutils: ensure we don't allow mixed-byte-depth formats
These could be hazardous because of FFDrawColor's union
2022-01-04 20:01:10 -06:00
rcombs
74210138a4 lavfi/drawutils: reimplement ff_fill_rgba_map without hardcoding the list
Same outputs, but computed instead of statically known, so new formats will be
supported more easily. Asserts in place to ensure we update this if we add
anything incompatible with its logic.
2022-01-04 20:01:10 -06:00
rcombs
b059ded2a9 lavfi/drawutils: reject shift-packed formats
Disables x2bgr10/x2rgb10 (which did not behave correctly before).
2022-01-04 20:01:10 -06:00
rcombs
2641f7338d lavfi/drawutils: remove redundant BE format checks
We already explicitly don't support big-endian in general
2022-01-04 20:01:10 -06:00
rcombs
3cad1f756e lavfi/drawutils: move BE check out of loop 2022-01-04 20:01:10 -06:00
rcombs
9f7875c18e swscale/output: use isSwappedChroma 2022-01-04 20:01:10 -06:00
rcombs
656ffdbd28 swscale/output: use isSemiPlanarYUV for NV12/21/24/42 case 2022-01-04 20:01:10 -06:00
rcombs
df94cdde4b swscale: introduce isSwappedChroma 2022-01-04 20:01:10 -06:00
rcombs
1292a8d91b swscale/output: use isDataInHighBits for 10-bit case
This code will need fleshing-out (probably templating) if we ever add
e.g. a P012 format.
2022-01-04 20:01:10 -06:00
rcombs
795f803a47 swscale/output: use isSemiPlanarYUV for 16-bit case 2022-01-04 20:01:10 -06:00
rcombs
a5f1f0558f swscale: introduce isDataInHighBits 2022-01-04 20:01:10 -06:00
rcombs
ff9bb93145 swscale/output: template-ize yuv2nv12cX 10-bit and 16-bit cases
Fixes incorrect big-endian output introduced in 88d804b7ffa20caab2e8e2809da974c41f7fd8fc

Avoids making the filter-time BE check more expensive
2022-01-04 20:01:10 -06:00
Limin Wang
f582e40595 avcodec/videotoolbox: Fix undefined symbol with minimal configuration
Please reproduced with the following minimal configure command:
./configure --enable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-hwaccel=h264_videotoolbox

You'll get below error:

Undefined symbols for architecture x86_64:
  "_ff_videotoolbox_vpcc_extradata_create", referenced from:
      _videotoolbox_start in videotoolbox.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Reported-by: Cameron Gutman <aicommander@gmail.com>
Tested-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-01-05 09:34:22 +08:00
Niklas Haas
a02d3054ea lavfi/showinfo: fix printf precision for dovi metadata
Fix warning caused by this field changing from uint64_t to uint16_t.

Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 10e4b2b1d243435445ff537cc9e3948b7490eb5b)
2022-01-04 14:43:53 +01:00
Andreas Rheinhardt
312060ecfc Merge branch 'master' into release/5.0
This is necessary to have the recent DOVI additions
in the 5.0 release.

Merged-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 14:26:04 +01:00
Andreas Rheinhardt
c512be9a90 lib*/version.h: Bump Versions before release/5.0 branch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:40:03 +01:00
Andreas Rheinhardt
d61240f8c9 avcodec/packet_internal: Add proper PacketList struct
Up until now, we had a PacketList structure which is actually
a PacketListEntry; a proper PacketList did not exist
and all the related functions just passed pointers to pointers
to the head and tail elements around. All these pointers were
actually consecutive elements of their containing structs,
i.e. the users already treated them as if they were a struct.

So add a proper PacketList struct and rename the current PacketList
to PacketListEntry; also make the functions use this structure
instead of the pair of pointers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00
Andreas Rheinhardt
b74e47c4ff avcodec/utils: Unavpriv avpriv_toupper4()
This function is quite small (96B with GCC 11.2 on x64 Ubuntu 21.10
at -O3), making it more economical to duplicate it into libavformat
instead of exporting it as avpriv: Doing so saves 2x24B in .dynsim,
2x16B in .dynstr, 2x2B .gnu.version, 24B in .rela.plt, 16B in .plt,
16B in .plt.sec (if enabled), 4B .gnu.hash; besides the actual
duplicated code this also adds 2x8B .eh_frame_hdr and 24B .eh_frame.

In other words: Duplicating is neutral size-wise (it is also presumed
neutral for other systems). Given that it avoids the runtime
overhead of dynamic symbols, it is advantageouos to duplicate the
function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00
Andreas Rheinhardt
007ffbeb53 avcodec/internal: Remove unused av_export_avcodec
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00
Andreas Rheinhardt
33e6d57f01 avcodec/mpegaudiodata: Unavpriv mpa_bitrate and mpa_frequency tabs
These arrays have a size of 180 resp. six bytes. This does not
make it worthwhile to export them due to the overhead this occurs;
for x64 Elf/Linux/GNU: 2x2B version, 2x24B .dynsym, 24B .rela.dyn,
8B .got, 4B hash + twice the size of the name (here 20+23B).
Therefore these symbols are unavprived and duplicated for shared
builds.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00
Andreas Rheinhardt
49bf94536f avcodec/mpeg4audio: Unavpriv and deduplicate mpeg4audio_sample_rates
avpriv_mpeg4audio_sample_rates has a size of 64B and it is currently
avpriv; a clone of it exists in aacenctab.h and from there it is inlined
in aacenc.c (which also uses the avpriv version) and in the FLV muxer.
This means that despite it being avpriv both libavformat as well as
libavcodec have copies already.

This situation is clearly suboptimal. Given the overhead of exporting
symbols (for x64 Elf/Linux/GNU: 2x2B version, 2x24B .dynsym, 24B .rela.dyn,
8B .got, 4B hash + twice the size of the name (here 31B)) the object is
unavprived, i.e. duplicated into libavformat when creating a shared
build; but the duplicates in the AAC encoder and FLV muxer are removed.

This involves splitting of the sample rate table into a file of its own;
this allowed to break some spurious dependencies (e.g. both the AAC
encoder as well as the Matroska demuxer actually don't need the
mpeg4audio_get_config stuff).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00
Andreas Rheinhardt
d82c91ba2f configure, avcodec/Makefile: Add new mpeg4audio CONFIG_EXTRA group
This group is mainly for the users of *_mpeg4audio_get_config2();
it is not for those who only use avpriv_mpeg4audio_sample_rates.
This is in preparation for splitting the latter into a file of its own;
if there were no CONFIG_EXTRA group for *_mpeg4audio_get_config2()
users, one would have to add a dependency to the new file for all
these users on top of the existing dependency on mpeg4audio.o.

Adding a new CONFIG_EXTRA group only takes effect after a reconfigure;
so in order to force a reconfigure some unnecessary headers from
libavdevice/alldevices.c have been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00
Andreas Rheinhardt
1d333c1547 avcodec/jpegtables: Unavpriv MJPEG-tables
There are seven MJPEG-tables, five small (1x12, 4x17) and two
not small (2x162). These are all avpriv, despite this not being
worthwhile due to the overhead of exporting a symbol: The total
overhead for each symbol consists of two entries in .dynsym (24B each),
one entry in the importing library's .rela.dyn (24B) and one in .got
(8B) as well as 2x2B for symbol versions and 4B for symbol hashes
in the exporting library; in addition to that, the name of the symbol
is included in both exporting and importing libraries, using 2x210 bytes
in this case.
(The above numbers are for a x64 Elf/Linux/GNU system. Other platforms
will give different numbers.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 13:16:50 +01:00