Commit Graph

114640 Commits

Author SHA1 Message Date
Andreas Rheinhardt
7eff280599 fate/libswscale: Disable ffmpeg-dependent tests without ffmpeg
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:10:23 +02:00
Niklas Haas
9073f49e6e avcodec/dovi_rpu: attach ext blocks to frames 2024-04-03 16:16:55 +02:00
Niklas Haas
f46fff27d0 avcodec/dovi_rpu: parse extension blocks
We split the inner loop between v1 and v2 extension blocks to print
a warning where an extension block was encountered in an unexpected
context.

Co-authored-by: quietvoid <tcChlisop0@gmail.com>
2024-04-03 16:16:55 +02:00
Niklas Haas
3a1916c38a avcodec/dovi_rpu: add ext_blocks array to DOVIContext 2024-04-03 16:16:55 +02:00
Niklas Haas
b90c18b38c avcodec/dovi_rpu: verify RPU data CRC32
The Dolby Vision RPU contains a CRC32 to validate the payload against.
The implementation is CRC32/MPEG-2.

The CRC is only verified with the AV_EF_CRCCHECK flag.

Co-authored-by: quietvoid <tcChlisop0@gmail.com>
2024-04-03 16:16:53 +02:00
Niklas Haas
a6c624f8f7 avcodec/dovi_rpu: strip container in separate step
This ensures that `gb` in the following section is fully byte-aligned,
points at the start of the actual RPU, and ends on the CRC terminator.

This is important for both calculation of the CRC, as well as dovi
extension block parsing (which aligns to byte boundaries in various
places).
2024-04-03 16:16:25 +02:00
Niklas Haas
0473270a34 avcodec/dovi_rpu: switch to AVERROR_INVALIDDATA
Instead of AVERROR(EINVAL)
2024-04-03 16:16:25 +02:00
Niklas Haas
4f55e16f2b avutil/dovi_meta: add dolby vision extension blocks
As well as accessors plus a function for allocating this struct with
extension blocks,

Definitions generously taken from quietvoid/dovi_tool, which is
assembled as a collection of various patent fragments, as well as output
by the official Dolby Vision bitstream verifier tool.
2024-04-03 16:16:25 +02:00
quietvoid
78076ede29 avutil/dovi_meta: add AVDOVIDataMapping.nlq_pivots
The NLQ pivots are not documented but should be present in the header
for profile 7 RPU format. It has been verified using Dolby's
verification toolkit.

Signed-off-by: quietvoid <tcChlisop0@gmail.com>
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-04-03 16:16:23 +02:00
Eugene Zemtsov
591e27d1e7 configure: Separate subsystem for Immersive Audio Model
This change allows users to build libavfomat without support
for Immersive Audio Model by specifying --disable-iamf.
It helps to save on binary size in cases where it's important.

Co-authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: Eugene Zemtsov <eugene@chromium.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-03 09:57:52 -03:00
Haihao Xiang
1590a96adc lavc/vaapi_encode: convert from lambda to qp
When AV_CODEC_FLAG_QSCALE is set, the value of avctx->global_quality is
lambda.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2024-04-03 10:26:33 +08:00
Fei Wang
09377887df lavc/vaapi_encode: Add VAAPI version check for BLBRC
Fix build fail when VAAPI version less than 0.39.2.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-04-03 10:23:05 +08:00
Tong Wu
0faf2ca98a avcodec/d3d12va_decode: remove extra spaces for declaration
Signed-off-by: Tong Wu <tong1.wu@intel.com>
2024-04-03 10:23:05 +08:00
James Almer
50458b7fa1 avformat/isom: don't drop the known layout when parsing AAC decSpecificInfo
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 20:21:13 -03:00
Michael Niedermayer
d157725cf7 avformat/isom: Uninit layout in ff_mp4_read_dec_config_descr()
Fixes: memleak
Fixes: 67442/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5068813261406208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 20:20:04 -03:00
Michael Niedermayer
e3984de6ff
avcodec/exr: Dont use 64bits to hold 6bits
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 00:44:38 +02:00
Michael Niedermayer
589fa8a027
avcodec/exr: Check for remaining bits in huf_unpack_enc_table()
Fixes: Timeout
Fixes: 67645/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6308760977997824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 00:44:38 +02:00
Michael Niedermayer
1887ff250c
avcodec/apedec: Use NABS to avoid undefined negation
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 67738/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5444313212321792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 00:44:38 +02:00
Michael Niedermayer
d58037c18e
avcodec/hevc_ps: --typo
Fixes: null pointer dereference
Fixes: 67737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4858162608930816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 00:44:37 +02:00
Michael Niedermayer
aeb13b03be
tools/target_dec_fuzzer: Adjust threshold for RV30
Fixes: Timeout
Fixes: 67530/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV30_fuzzer-6635676118351872

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 00:44:37 +02:00
Mark Samuelson
c52869f36e avcodec/mfenc: expose more properties of the media foundation encoder 2024-04-02 21:45:47 +01:00
Marth64
2204ea00d6 doc/indevs: update CC extraction example to use RCWT muxer
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-04-02 20:09:05 +02:00
Marth64
0866b2ba5e doc/muxers: refresh the RCWT muxer's doc to be consistent with the demuxer
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-04-02 20:09:05 +02:00
Marth64
58f04608c2 avformat/rcwtenc: remove repeated documentation
The high level summary of RCWT can be delegated doc/muxers, which
makes it easier to maintain and more consistent with the documentation
of the demuxer.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-04-02 20:09:05 +02:00
Marth64
536f0239c0 avformat/rcwtenc: don't assume .bin extension
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-04-02 20:09:05 +02:00
Marth64
15406f8377 avformat/rcwtdec: add RCWT Closed Captions demuxer
RCWT (Raw Captions With Time) is a format native to ccextractor,
a commonly used OSS tool for processing 608/708 Closed Captions (CC).
RCWT can be used to archive the original extracted CC bitstream.
The muxer was added in January 2024. In this commit, add the demuxer.

One can now demux RCWT files for rendering in ccaption_dec or interop
with ccextractor (which produces RCWT). Using the muxer/demuxer combo,
the CC bits can be kept for processing or rendering with either tool.
This can be an effective way to backup an original CC stream, including
format extensions like EIA-708 and overall original presentation.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-04-02 20:08:51 +02:00
Stefano Sabatini
dfd9c21754 Changelog: add next entry 2024-04-02 20:04:46 +02:00
Marth64
1c35333671 avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events
If ff_subtitles_queue_insert() were given a NULL buffer
with 0 length, it would still attempt to grow the packet
or memcpy depending on if merge option is enabled.

In this commit, allow passing a NULL buffer with 0 length
without attempting to do such operations. This way, if a
subtitle demuxer happens to pass an empty cue or wants to
use av_get_packet() to read bytes, there are no unnecessary
operations on the packet after it is allocated.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-04-02 19:59:01 +02:00
Nicolas Gaullier
ed9363052f avformat/demux: add duration_probesize AVOption
Yet another probesize used to get the durations when
estimate_timings_from_pts is required. It is aimed at users interested
in better durations probing for itself, or because using
avformat_find_stream_info indirectly and requiring exact values: for
concatdec for example, especially if streamcopying above it.
The current code is a performance trade-off that can fail to get video
stream durations in a scenario with high bitrates and buffering for
files ending cleanly (as opposed to live captures): the physical gap
between the last video packet and the last audio packet is very high in
such a case.

Default behaviour is unchanged: 250k up to 250k << 6 (step by step).
Setting this new option has two effects:
- override the maximum probesize (currently 250k << 6)
- reduce the number of steps to 1 instead of 6, this is to avoid
detecting the audio "too early" and failing to reach a video packet.
Even if a single audio stream duration is found but not the other
audio/video stream durations, there will be a retry, so at the end the
full user-overriden probesize will be used as expected by the user.

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
2024-04-02 19:53:40 +02:00
Stefano Sabatini
13cdef9d45 doc/muxers: add ircam
Most of the content copy&pasted from:
http://fileformats.archiveteam.org/wiki/Berkeley/IRCAM/Carl_Sound_Format
2024-04-02 19:48:29 +02:00
Stefano Sabatini
026bef7771 doc/muxers/image2: add mention to image2pipe
Clarify the difference with regards to the image2 muxer.
2024-04-02 19:48:28 +02:00
Stefano Sabatini
827889d8f3 doc/muxers/image2: apply misc consistency fixes 2024-04-02 19:48:28 +02:00
Stefano Sabatini
b5488392f0 doc/muxers: add ilbc 2024-04-02 19:48:28 +02:00
Stefano Sabatini
3e4f0b07de doc/muxers: add stub for iamf 2024-04-02 19:48:28 +02:00
Stefano Sabatini
06f17cc9ce doc/muxers/hls: review, apply consistency fixes
Apply misc typo fixes, consistency fixes, and reformat the layout to provide more overall
internal and global consistency.
2024-04-02 19:48:28 +02:00
James Almer
8f85f657d7 RELEASE: update after 7.0 branch
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 13:02:39 -03:00
James Almer
6e52223f3a fate/vvc: add vvc-conformance-IBC_B_Tencent_2
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 12:34:26 -03:00
James Almer
e60d4913ae fate/vvc: add vvc-conformance-SUBPIC_C_ERICSSON_1
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 12:15:03 -03:00
James Almer
e9778d20a4 fate/vvc: disable vvc-conformance-OPI_B_3 and vvc-conformance-VPS_A_3
Both samples rely on a feature our decoder doesn't currently support.

Should fix fate failures on some systems where not even the one single frame
could be generated.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 11:50:08 -03:00
James Almer
45b56455ad avcodec/vvc_refs: don't ask for a "Inter layer ref" sample
The FATE suite has two already.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-02 11:48:32 -03:00
Nuo Mi
238bb653e7 avcodec/vvcdec: inter prediction, support subpicture
passed files:
    LMCS_B_Dolby_2.bit
    CodingToolsSets_E_Tencent_1.bit
    SUBPIC_A_HUAWEI_3.bit
    SUBPIC_B_HUAWEI_3.bit
    SUBPIC_C_ERICSSON_1.bit
    SUBPIC_D_ERICSSON_1.bit
    SUBPIC_E_MediaTek_1.bit

passed dvb conformance files (https://dvb.org/specifications/verification-validation/vvc-test-content):
    VVC_HDR_UHDTV1_OpenGOP_3840x2160_50fps_HLG10_mosaic.bit
    VVC_HDR_UHDTV1_OpenGOP_3840x2160_50fps_HLG10_PiP.bit
2024-04-02 20:56:22 +08:00
Nuo Mi
9bc3f3e5fc avcodec/vvcdec: mvs, support subpicture 2024-04-02 20:56:22 +08:00
Nuo Mi
adeb51c30f avcodec/vvcdec: alf, support subpicture 2024-04-02 20:56:22 +08:00
Nuo Mi
bbf0ccb8e7 avcodec/vvcdec: sao, support subpicture 2024-04-02 20:56:22 +08:00
Nuo Mi
0c3018b30a avcodec/vvcdec: sao, refact out tile_edge arrays 2024-04-02 20:56:22 +08:00
Nuo Mi
c9e75393ed avcodec/vvcdec: refact, movie the lc->sc assignment to task_run_stage to simplify the code
This change also make the lc->sc assigned for run_sao
2024-04-02 20:56:22 +08:00
Nuo Mi
8b7304247a avcodec/vvcdec: deblock, support subpicture 2024-04-02 20:56:22 +08:00
Nuo Mi
0d12e9c3c8 avcodec/vvcdec: refact out deblock_is_boundary 2024-04-02 20:56:22 +08:00
Nuo Mi
4020e68d73 avcodec/vvcdec: misc, rename x_ctb, y_ctb, ctu_x, ctu_y to rx, ry to avoid misleading 2024-04-02 20:56:22 +08:00
Nuo Mi
260130aae8 avcodec/vvcdec: ff_vvc_decode_neighbour, support subpicture 2024-04-02 20:56:22 +08:00