105164 Commits

Author SHA1 Message Date
Zhao Zhili
ce1558e66b avformat/movenc: fix duration in mdhd box
mvhd and tkhd present the post-editlist duration, while mdhd should
have the pre-editlist duration. Regression since c2424b1f3.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit f37e66b3937a914e16d89a9050f042ad89567245)
2022-01-10 12:42:51 +02:00
Niklas Haas
fb840a79b9 lavfi/vf_libplacebo: fix side data stripping logic
This was accidentally comparing s->colorspace against out->colorspace,
which is wrong - the intent was to compare in->colorspace against
out->colorspace.

We also forgot to strip mastering metadata. Finally, the order is sort
of wrong - we should strip this side data *before* process_frames,
because otherwise it may end up being seen and used by libplacebo.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-01-10 09:11:18 +01:00
Andreas Rheinhardt
0acca1791e avformat/amr: Return error upon error
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit abc7d1c697e0dbe463ca6632e45142ae72d139a9)
2022-01-09 21:26:58 +01:00
Marc-Antoine Arnaud
e53ab575da avformat/mxfdec: support MCA audio information
Channel reordering is removed from this patch because the new channel layout
API will support it properly.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 47c4df2203f774f6a62391e1de770cf5b9dddcbd)
2022-01-09 18:28:18 +01:00
Ming Qian
832aae6c86 avcodec/v4l2_context: send start decode command after dynamic resolution change event
Fixes decoding of sample https://streams.videolan.org/ffmpeg/incoming/720p60.mp4
on RPi4 after kernel driver commit:
staging: bcm2835-codec: Format changed should trigger drain

Reference:
linux/Documentation/userspace-api/media/v4l/dev-decoder.rst
    "A source change triggers an implicit decoder drain, similar to the
     explicit Drain sequence. The decoder is stopped after it completes.
     The decoding process must be resumed with either a pair of calls to
     VIDIOC_STREAMOFF and VIDIOC_STREAMON on the CAPTURE queue, or a call to
     VIDIOC_DECODER_CMD with the V4L2_DEC_CMD_START command."

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
2022-01-09 11:47:26 -05:00
Ming Qian
91b459ab23 avcodec/v4l2_context: don't reinit output queue on dynamic resolution change event
Reference:
linux/Documentation/userspace-api/media/v4l/dev-decoder.rst
    "During the resolution change sequence, the OUTPUT queue must remain
     streaming. Calling VIDIOC_STREAMOFF() on the OUTPUT queue would
     abort the sequence and initiate a seek.

     In principle, the OUTPUT queue operates separately from the CAPTURE
     queue and this remains true for the duration of the entire
     resolution change sequence as well."

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
2022-01-09 11:47:09 -05:00
Gyan Doshi
1c2d1d988a avformat/hlsenc: convey stream id to segment streams 2022-01-09 10:38:04 +05:30
Andreas Rheinhardt
4eb182b714 avformat/matroskaenc: Disable MKV-only code if MKV muxer is disabled
The Matroska muxer has quite a lot of dependencies and lots of them
are unnecessary for WebM. By disabling the Matroska-only code
at compile time one can get rid of them.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 52c1e9e530a46ba62b974f121c9d28a86900a632)
2022-01-08 19:11:17 +01:00
Andreas Rheinhardt
201a486a11 fate/subtitles: Fix check for fate-binsub-mksenc test
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit e852b1b0631c14c81d49230931fac4593e7467e1)
2022-01-08 19:11:17 +01:00
Andreas Rheinhardt
48e85918b8 avformat/matroskaenc: Move AAC extradata check to other audio checks
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit d266bf17988271d529fd2209681889a78b9f259c)
2022-01-08 19:11:17 +01:00
Andreas Rheinhardt
60604702cd avdevice/iec61883: #if unused code away, fix -O0 compilation
iec61883_parse_queue_hdv() is only called when the mpegts-demuxer
is available and can be optimized away when not. Yet this
optimization is not a given and it fails with e.g. GCC 11 when
using -O0 in which case one will get a compilation error
because the call to the unavailable avpriv_mpegts_parse_packet()
is not optimized away. Therefore #if the offending code away
in this case.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit ad0b4afec57381c74f57dd3f3c65c49cc406c9fd)
2022-01-08 19:11:17 +01:00
Andreas Rheinhardt
fbbbe73b0f configure: Let decklink indev suggest libzvbi
Fixes build errors if libzvbi is enabled while libzvbi_teletextdec
is disabled.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 2d0b17e820b84cceb95c29557e168a6ef98d4ce1)
2022-01-08 19:11:17 +01:00
Andreas Rheinhardt
e9b7e781d7 avformat/rtsp: #if unused functions away, fix -O0 compilation
parse_rtsp_message() is only called if the rtsp demuxer is enabled
and so it is normally compiled away if said demuxer is disabled.
Yet this does not happen when compiling with -O0 and this leads
to a linking failure because parse_rtsp_message() calls functions
that may not be available if the rtsp demuxer is disabled.
Fix this by properly #if'ing the unused functions away.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit aeb5d943c613f50611ca49f5ffbfa8b24820b61d)
2022-01-08 19:11:17 +01:00
Andreas Rheinhardt
6d2317a611 avformat/Makefile: Add entries for CRI, GEM and PGX image pipe demuxers
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 99f3fb8ea1d0f67c7fd0fda2fce136b5c71fc65e)
2022-01-08 19:01:10 +01:00
Andreas Rheinhardt
237268f6df avformat/Makefile: Add missing alp-muxer->rawenc.o dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 1beeeaf23ddb1630a66ec762a2270e46b76000d0)
2022-01-08 19:01:10 +01:00
Andreas Rheinhardt
519e22b31e avformat/amr: Fix writing AMR header
Regression since f282c34c009e3653ec160c3880e64fc1a9300d0e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit a22a71eb2c633335a037983fda0badc1863fc529)
2022-01-08 19:00:26 +01:00
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