Commit Graph

114278 Commits

Author SHA1 Message Date
Andreas Rheinhardt
41ab25cb2d avformat/fifo_test: Move into tests/fifo_muxer.c
This muxer solely exists to test the fifo muxer via a dedicated
test tool in libavformat/tests/fifo_muxer.c. It fulfills no
other role and it is only designed with this role in mind.

The latter can be seen in two facts: The muxer uses printf
for logging and it simply presumes the packets' data to contain
a FailingMuxerPacketData (a struct duplicated in fifo_test.c
and tests/fifo_muxer.c.); in particular, it presumes packets
to have data at all, but this need not be true with side-data
only packets and a segfault can easily be triggered by e.g.
encoding flac (our native encoder sends a side-data only packet
with updated extradata at the end of encoding).

This patch fixes this by moving the test muxer into the fifo
test tool, making it inaccessible via the API (and actually
removing it from libavformat.so and libavformat.a).
While this muxer was accessible via e.g. av_guess_format(),
it was not really usable for an API user as FailingMuxerPacketData
was not public. Therefore this is not considered a breaking change.

In order to continue to use the test muxer in the test tool,
the ordinary fifo muxer had to be overridden: fifo_muxer.c
includes lavf/fifo.c but with FIFO_TEST defined which makes
it support the fifo_test muxer. This is possible because
test tools are always linked statically to their respective
library.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-12 22:39:54 +01:00
Leo Izen
a356815a31
avcodec/libjxlenc: add option to disable xyb encoding
Add an AVOption to the libjxl encoder wrapper, which exposes the flag
uses_original_profile in libjxl. For highly unusual ICC profiles where
the target needs to stay in the original space, this can be useful.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2024-03-12 17:36:05 -04:00
Andreas Rheinhardt
c9eb36e0a0 avcodec/tiff: Use ff_tget_long() where appropriate
No need to use the generic ff_tget() when we know the type.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-12 18:05:34 +01:00
James Almer
7cf4e305a2 fate/h264: add missing swscale dependency to h264-bsf-mp4toannexb-new-extradata
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-12 13:41:29 -03:00
Marth64
b3d87fb0c4 avformat/sccdec: remove unused bprint.h include
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-12 14:54:54 +01:00
Marth64
9b981e3112 avcodec/rcwtenc: canonize name and refresh documentation
The formal title of the muxer according to the specification
is "RCWT (Raw Captions With Time)", so canonize this
in the long name of the codec and docs.

In the documentation section, point #2 was wrong: ccextractor
extracts the Closed Captions data and stores normalized bits
similarly to this muxer.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-12 14:54:54 +01:00
Andreas Rheinhardt
c14dc99f44 avcodec/tiff: Improve inclusions
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-12 14:37:49 +01:00
Andreas Rheinhardt
f6f94c3357 avcodec/tiff: Don't check before av_freep()
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-12 14:37:45 +01:00
Andreas Rheinhardt
957053b52a avcodec/tiff: Avoid duplicating strings
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-12 14:37:33 +01:00
Andreas Rheinhardt
9b9b574191 avcodec/tiff: Fix handling of av_strdup() failures
For unknown geokey values, get_geokey_val() returns
"Unknown-%d" with val being used for %d. This string
is allocated and therefore all the known geokey values
(static strings) are strdup'ed. In case this fails
it is either ignored or treated as "Unknown-%d".
(Furthermore it is possible to call av_strdup(NULL),
although this is not documented to be legal.)

This commit changes this by only returning the static strings
in get_geokey_val(); the unknown handling and strdup'ing
is moved out of it.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-12 14:35:52 +01:00
Fei Wang
4027c2e1d0 lavc/vvc_ps: Correct NoOutputBeforeRecoveryFlag of IDR
The NoOutputBeforeRecoveryFlag of an IDR frame should be set to 1 as
spec says in 8.1.1.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-03-12 20:25:25 +08:00
Fei Wang
c252d2b84a lavc/vvcdec: Add missed chroma sampling factor for crop offset
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-03-12 20:25:25 +08:00
asivery
9124d807dc avformat/aea: add aea muxer
Signed-off-by: asivery <asivery@protonmail.com>
2024-03-12 11:26:13 +01:00
hung kuishing
78803a4b8a doc/examples/qsv_decode: remove unused config.h header file
Signed-off-by: clarkh <hungkuishing@outlook.com>
2024-03-12 11:26:06 +01:00
Marth64
275877b981 avformat/dvdvideodec: add menu demuxing support
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-12 11:14:16 +01:00
Marth64
b8cbaad2ac avformat/dvdvideodec: add CLUT utilities and subtitle color support
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-12 11:14:16 +01:00
Stefano Sabatini
75dd083904 doc/muxers/fifo: review documentation
Apply consistency fixes, sort options, clarify example.
2024-03-12 11:13:31 +01:00
Stefano Sabatini
5828aaa2b5 lavf/fifo: sort options by name 2024-03-12 11:05:01 +01:00
Anton Khirnov
f344277a88 fftools/ffmpeg_filter: merge block with the enclosing one
It has no reason to exist.
2024-03-12 09:47:56 +01:00
Anton Khirnov
639208cc6a fftools/ffmpeg_filter: don't forward EOF in close_output()
The caller does not need or expect it, and it can lead to terminating
filtering prematurely in case there is more than one output.
2024-03-12 09:47:56 +01:00
Anton Khirnov
ce178be8b0 fftools/ffmpeg_filter: do not assume av_buffersrc_get_nb_failed_requests()>0
Apparently it can happen that avfilter_graph_request_oldest() returns
EAGAIN, yet av_buffersrc_get_nb_failed_requests() returns 0 for every
input.

Works around #10795, though the root issue is most likely in the
scale2ref filter.
2024-03-12 09:47:14 +01:00
Stefano Sabatini
53a952a731 lavf/fifo: fix typo 2024-03-11 16:52:42 +01:00
Stefano Sabatini
bce9234f10 lavf/dvenc: improve error messaging
Provide useful information about the failure in the error message, do
not let the user guess.
2024-03-11 16:52:42 +01:00
Stefano Sabatini
58a1386eaf fftools/opt_common: show if muxer is device 2024-03-11 16:52:42 +01:00
Niklas Haas
da39a19aad avcodec/av1dec: parse DV profile 10 T.35 OBU
See previous commit.
2024-03-11 11:40:09 +01:00
Niklas Haas
a5d1e69b3b avcodec/libdav1d: parse DV profile 10 T.35 OBU
This is thankfully passed through verbatim by libdav1d, so we can parse
it in our own code.

In theory, taking the DV profile from the packet-level configuration
struct is redundant since there is currently only one possible DV level
for AV1 (and all others would fail parsing), but this marginally
future-proofs it against possible new AV1-specific profiles being added
in the future.
2024-03-11 11:40:09 +01:00
Niklas Haas
9aecd717ab avcodec/dovi_rpu: implement support for profile 10
Instead of the nal_prefix, this profile inside wraps the RPU inside an
EMDF container, as specified in ETSI TS 102 366. However, this
DV-specific EMDF container is restricted (by the specification) to
a fixed set of hard-coded parameters, which we can effecitvely treat as
a magic byte sequence.

Validated and tested using official Dolby sample files, which
I unfortunately cannot share. However, there are public sample files
available at the merge request link below.

Relevant links:
- https://www.etsi.org/deliver/etsi_ts/102300_102399/102366/01.04.01_60/ts_102366v010401p.pdf
- https://patentimages.storage.googleapis.com/8a/0b/da/28294acaed2182/EP3588964A1.pdf
- https://www.etsi.org/deliver/etsi_ts/103500_103599/103572/01.03.01_60/ts_103572v010301p.pdf
- https://gitlab.com/mbunkus/mkvtoolnix/-/merge_requests/2254
2024-03-11 11:40:09 +01:00
Gyan Doshi
3d1860ec8d avfilter: update filter timeline state only on main link
At present, consume_update evaluates timeline state on all links for
a multi-input filter. This can lead to the filter being incorrectly
en/dis-abled when evaluation on a frame on a secondary link leads to
a different result than the frame on the current main link next in
line for processing.
2024-03-11 15:38:13 +05:30
Martin Storsjö
c31d232656 libavcodec: Don't include libavcodec/x86/vvc/Makefile on any architecture
This currently builds files in the libavcodec/x86/{vvc,h26x}
subdirectories, which is somewhat unexpected when building for
another architecture than x86.

The regular arch subdirectories are handled with

    -include $(SRC_PATH)/$(1)/$(ARCH)/Makefile

in the toplevel Makefile. Switch this to a similar optional
inclusion, using $(ARCH).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-03-10 23:46:48 +02:00
Martin Storsjö
cd420c2949 makefile: Clean up missed object files with "make clean"
In some builds, the following object files could be left behind
after make clean:

./libavfilter/metal/utils.o
./libavfilter/metal/vf_yadif_videotoolbox.metallib.o
./libavcodec/x86/h26x/h2656dsp.o
./libavcodec/neon/mpegvideo.o
./ffbuild/bin2c_host.o

Fixes: http://trac.ffmpeg.org/ticket/10895

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-03-10 23:45:51 +02:00
Michael Niedermayer
e0e30e07a1
avcodec/proresenc_kostya: Remove bug similarity text
According to kostya, it is not based on Wassermans encoder

CC: Kostya Shishkov <kostya.shishkov@gmail.com>
CC: Anatoliy Wasserman <anatoliy.wasserman@yandex.ru>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-10 19:49:05 +01:00
Michael Niedermayer
dc89cf804a
avcodec/vorbisdec: Check remaining data in vorbis_residue_decode_internal()
Fixes: timeout
Fixes: 66326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-6295291863040000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-10 19:49:04 +01:00
Michael Niedermayer
b2d7cbc378
avformat/concatdec: Check in and outpoints to be to produce a positive representable duration
Fixes: signed integer overflow: -93000000 - 9223372036839000000 cannot be represented in type 'long'
Fixes: 64546/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-5110813828186112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-10 19:49:04 +01:00
Michael Niedermayer
5db09574df
avcodec/8bps: Consider width in the minimal size check
Fixes: Timeout
Fixes: 64479/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EIGHTBPS_fuzzer-5434435386081280

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-03-10 19:49:03 +01:00
Andreas Rheinhardt
cc95fd4531 doc/bitstream_filters.texi: Document types used by filter_units
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Reviewed-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 17:49:16 +01:00
Marth64
2c82ec9b4a doc/bitstream_filters: add filter_units practical examples for removing closed captions
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-10 16:01:18 +01:00
Marth64
590b2d6517 avcodec/ccaption_dec: use consistent naming convention of Closed Captions
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-10 15:21:23 +01:00
Marth64
8991cedd6a avcodec/ccaption_dec: clarify log message when out-of-display columns are ignored
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-10 15:21:23 +01:00
Marth64
e68f57d89e MAINTAINERS: add myself as dvdvideo demuxer, rcwt muxer maintainer
I am willing to maintain these into the future as needed.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-10 15:21:23 +01:00
Marth64
ffc3f2a350 avformat/dvdvideodec: assign mono channel layout explicitly
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-10 15:01:11 +01:00
Andreas Rheinhardt
ac61231757 avutil/avstring: Use proper types
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 13:51:37 +01:00
Andreas Rheinhardt
9e36e2fb7b avcodec/xpmdec: Use LUT for hex char->number conversion
Speeds up decoding and also reduces binary size.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 13:51:37 +01:00
Andreas Rheinhardt
0b2ed7f6c7 avcodec/xbmdec: Use LUT for hex char->number conversion
Improves performance by about 30%.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 13:51:37 +01:00
Andreas Rheinhardt
8fb89790af avcodec/h264_ps: Fix shadowing
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 13:51:37 +01:00
Andreas Rheinhardt
878f8cabe8 avcodec/xbmenc: Avoid snprintf() for data->hex conversion
Use a small LUT instead. Improves performance.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 13:50:26 +01:00
Andreas Rheinhardt
357e339898 avcodec/xpmdec: Avoid unnecessary size_t->int conversion
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-10 13:50:26 +01:00
Marton Balint
64634e809f avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing h264
Partially fixes ticket #10395.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-08 20:22:32 +01:00
James Almer
901165516c fate/flvenc: force the av1 decoder in all steps for fate-enhanced-flv-av1
Tested-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-08 10:38:55 -03:00
联盟少侠
e6d933404f avfilter/avfilter: Fix for Incorrect Parameter in ff_filter_config_links
src/libavfilter/internal.h:255:45: note: passing argument to parameter 'filter' here
int ff_filter_config_links(AVFilterContext *filter);

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-08 13:12:21 +01:00
Martin Storsjö
71e871280d libavdevice: Fix the avfoundation device after switching to FFInputFormat
This was missed in b800327f4c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-03-08 12:48:59 +02:00