Commit Graph

114670 Commits

Author SHA1 Message Date
Antoine Soulier via ffmpeg-devel 240fd04db2 avcodec/liblc3: add encoding/decoding support of LC3 audio codec
The LC3 audio codec is the default codec of Bluetooth LE audio.
This is a wrapper over the liblc3 library (https://github.com/google/liblc3).

Signed-off-by: Antoine Soulier <asoulier@google.com>
2024-04-04 17:47:31 +02:00
Marth64 e3335e9e9e Changelog: fix typos for 7.0 section
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-04 12:43:47 -03:00
Andreas Rheinhardt 428ff7bd8c swscale/ppc/swscale_ppc_template: Reindent after the previous commit
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-04 16:47:21 +02:00
Andreas Rheinhardt 95b4aea5e3 swscale/ppc/swscale_ppc_template: Remove code not passing checkasm
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-04 16:45:23 +02:00
Andreas Rheinhardt db063212c8 avcodec/vvc: Rename vvc_?foo->foo
A namespace is unnecessary here given that all these files
are already in the vvc subfolder.

Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-04 16:45:00 +02:00
Jean-Baptiste Kempf 486a2b964b changelog: update for 7.0
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-04 10:57:28 -03:00
Wenbin Chen 478d97f303 libavfilter/dnn_io_proc: Take step into consideration when crop frame
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2024-04-04 14:26:57 +08:00
Wenbin Chen 8869f5ce86 libavfilter/dnn_backend_openvino: Check bbox's height
Check bbox's height with frame's height rather than frame's width.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2024-04-04 14:26:52 +08:00
Andreas Rheinhardt 9309b5bc64 avcodec/vvc/vvc_inter_template: Fix left shift of negative number
Affected the vvc-conformance-WP_A_3 FATE test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-04 11:36:41 +08:00
Andreas Rheinhardt 3fe28831ed configure: Only enable iamfdec, iamfenc when needed
Since 591e27d1e7 they would
always be compiled even when nothing uses them; for shared
builds the default linker behaviour is to include them
even when not needed.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 22:12:55 +02:00
Andreas Rheinhardt 9c4558b596 configure: Fix iamfdec dependencies
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 22:04:46 +02:00
Michael Niedermayer 5a5422196d
doc/developer: (security) researchers should be credited
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-03 21:38:24 +02:00
Jan Ekström 16128f3c55 avcodec/libx265: do not arbitrarily limit color values
Newer specifications such as H.273 have, and probably will further
in the future add new values to these, so - instead of trying to update
these limits - we should simply check if the values are not set to the
value of "unspecified".

This should allow newer avutil values such as IPT-C2 or YCgCo-R
variants be passed to x265 itself, which apparently does its own
validation further down the line.
2024-04-03 21:31:35 +03:00
Jan Ekström 23d1b50175 avfilter/{buffersrc,vf_setparams}: map IPT-C2, YCgCo-R variants 2024-04-03 21:31:35 +03:00
Jan Ekström 06c53efd23 avcodec/options_table: map IPT-C2, YCgCo-R variants in colorspace 2024-04-03 21:31:35 +03:00
Jan Ekström 29561c8e2d avutil/pix{desc,fmt}: add new matrix coefficients from H.273 v3
* SMPTE ST 2128 IPT-C2 defines the coefficients utilized in DoVi
  Profile 5. Profile 5 can thus now be represented in VUI as
  {AVCOL_RANGE_JPEG, AVCOL_PRI_BT2020, AVCOL_TRC_SMPTE2084,
   AVCOL_SPC_IPT_C2, AVCHROMA_LOC_LEFT} (although other chroma
  sample locations are allowed). AVCOL_TRC_SMPTE2084 should in
  this case be interpreted as 'PQ with reshaping'.
* YCgCo-Re and YCgCo-Ro define the bitexact YCgCo-R, where the
  number of bits added to a source RGB bit depth is 2 (i.e., even)
  and 1 (i.e., odd), respectively.
2024-04-03 21:31:35 +03:00
Andreas Rheinhardt 924402f783 configure: Add missing libdav1d/av1 decoders->dovi_rpu dependency
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 20:07:54 +02:00
Andreas Rheinhardt 7895d1860f avfilter/avfilter: Don't use av_uninit
GCC 9-13 do not emit warnings for this at all optimization
levels even when -Wmaybe-uninitialized is not disabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt 8d3fdb42c0 avfilter/vf_grayworld: Remove empty options and AVClass
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt de288e406a avfilter/vf_hflip: Remove empty options and AVClass
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt 99a200cad8 avfilter/vf_vflip: Remove empty options and AVClass
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt 6260d4f770 avfilter/vf_swapuv: Remove empty options and AVClass
This filter only had an AVClass and empty options because up until
recently, avfilter_init_str() errored out when options were provided
for a filter without an AVClass. But setting (generic) options is
necessary to take advantage of timeline support. So with
avfilter_init_str() fixed, the AVClass and the options can be removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt 0c800c0b48 avfilter/avfilter: Honour the short options documentation
The documentation for filter arguments states that short options must
precede long options (i.e. those of the form key=value). Yet if
process_options() encounters arguments not abiding by this, it simply
treats short options after a long option as if it were parsing short
options for the first time. In particular, it overwrites options already
set earlier, possibly via other short options. This is not how it is
intended (as a comment in the code indicates).

This commit modifies the code to reject further shorthand options
after a long option has been encountered. After all, avfilter_init_str()
errors out upon unrecognized options, so it is intended to be picky.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt c96d0a0b85 avfilter/avfilter: Use AV_DICT_DONT_STRDUP_(KEY|VAL) when possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt abcb4b44f5 avcodec/tiff: Don't cast const away via bsearch
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:14:12 +02:00
Andreas Rheinhardt a5fcd97801 avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:12:22 +02:00
Andreas Rheinhardt e123295cc8 avcodec/proresdec2: Rename to proresdec
Once upon a time, there used to be a LGPL and a GPL ProRes decoder
in FFmpeg; the current decoder evolved from the second of these.
But given that it is now the only ProRes decoder we have, it's file
should simply be named proresdec.c (which also brings it in line with
its header).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:10:30 +02:00
Andreas Rheinhardt 07c734b2b2 fate/ffprobe: Fix test requirements
The ffprobe-test file is generated via ffmpeg and several filters;
the requirements for them were missing.
Also deduplicate this while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:10:24 +02:00
Andreas Rheinhardt b351cbb314 fate/api: Fix requirements of fate-api-seek
It relies on the fate-lavf-flv test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:10:24 +02:00
Andreas Rheinhardt 2cd397d90d fate/lavf-container: Check earlier for presence of ffmpeg cli
Several other tests (e.g. concatdec) examine FATE_LAVF_CONTAINER
in order to enable or disable tests that depend on samples
created by the lavf-container tests; right now this procedure
did not account for CONFIG_FFMPEG.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-04-03 19:10:23 +02:00
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