Commit Graph

117085 Commits

Author SHA1 Message Date
James Almer
5896318229 avcodec/codec_id: add an LCEVC codec id for raw LCEVC data
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-19 10:01:02 -03:00
James Almer
9cea2410a1 avcodec/h2645_sei: export raw LCEVC metadata
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-19 10:01:00 -03:00
James Almer
90d12c24c5 avutil/frame: add an LCEVC enhancement data payload side data type
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-19 08:45:48 -03:00
Gyan Doshi
0d5b68c27c ffmpeg_mux_init: correct log suggestion
The option is enc_time_base, not enc_timebase
2024-09-19 15:35:15 +05:30
Fei Wang
5211ad1acd lavc/vaapi_encode: Fix potential use of uninitialized value
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-09-19 12:01:28 +08:00
Fei Wang
061c86a717 lavc/vaapi_encode_av1: Fix encode fail since 9db68ed0
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-09-19 12:01:18 +08:00
Michael Niedermayer
6be3786c82
avformat/mxfdec: Check timecode for overflow
Fixes: signed integer overflow: 9223372036840103968 + 538976288 cannot be represented in type 'long'
Fixes: 70604/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4844090340999168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:43:22 +02:00
Michael Niedermayer
5a96aa435a
avformat/mxfdec: More offset_temp checks
Fixes: signed integer overflow: 9223372036854775807 - -1927491430256034080 cannot be represented in type 'long'
Fixes: 70607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5282235077951488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:39:21 +02:00
Michael Niedermayer
176db9db6e
avformat/flvdec: Free metaVideoColor
Fixes: memeleak
Fixes: 70659/clusterfuzz-testcase-minimized-ffmpeg_dem_KUX_fuzzer-4539872627458048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:24:27 +02:00
Michael Niedermayer
bd80c97391
swscale/output: Fix undefined integer overflow in yuv2rgba64_2_c_template()
Fixes: signed integer overflow: -1082982400 + -1083218484 cannot be represented in type 'int'
Fixes: 70657/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6707819712675840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:24:26 +02:00
Michael Niedermayer
44c5641ae8
swscale/swscale: Use unsigned operation to avoid undefined behavior
I have not checked that the constant is correct, this just fixes the undefined behavior

Fixes: signed integer overflow: -646656 * 3517 cannot be represented in type 'int
Fixes: 70559/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5209368631508992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:10:38 +02:00
Michael Niedermayer
6df9a0292c
avcodec/vc2enc: basic sanity check on slice_max_bytes
Fixes: left shift of 896021632 by 3 places cannot be represented in type 'int'
Fixes: 70544/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC2_fuzzer-6685593652756480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-19 00:10:32 +02:00
Tomas Härdin
665bf46ac2 lavf/mxfdec: Handle KLV fill 2024-09-18 21:43:06 +02:00
Tomas Härdin
8f2ba4333d lavf/mxfdec: Switch to mxf_metadata_read_table loop to FF_ARRAY_ELEMS, skip if read == NULL 2024-09-18 21:43:06 +02:00
Marvin Scholz
7091da7129 configure: correctly set sanitizer toolchain compilers
Previously only the C compiler was set, which would lead to
confusing situations where even though clang-asan was selected,
it would still use g++ for C++ code, failing because configure
does not support mixing compilers in this way (which is a separate
issue not addressed by this commit).
2024-09-18 15:24:12 +02:00
Marvin Scholz
910bf33879 configure: fix symbol prefix detection
The symbol prefix check would incorrectly detect a bogus prefix in
circumstances where sanitizers instrument the build, like when
configuring with the clang-asan toolchain where it would detect the
prefix as __odr_asan_gen_, which is obviously wrong.

To fix this, adjust the prefix detection to only detect a
one-character prefix, which is the only case that matters
anywhere right now.
2024-09-18 15:24:12 +02:00
Anton Khirnov
0c9fe2b232 fftools/cmdutils: extend stream specifiers to match by disposition 2024-09-18 11:01:02 +02:00
Lynne
8875da347a
hwcontext_vulkan: consider encode DBPs as always independent 2024-09-18 05:59:46 +02:00
Lynne
32d47166c8
hwcontext_vulkan: fix p->img_qfs
The array was tied to our old queue API, which meant that if users
set it, it was never set.
2024-09-18 05:59:41 +02:00
Lynne
0aa4ac0faf
lavc: bump minor and add Changelog entry for the Vulkan H265 encoder 2024-09-17 21:12:32 +02:00
Lynne
4b4f0b68f8
lavc: add hevc_vulkan hardware encoder
This commit adds a Vulkan hardware HEVC encoder, with full support
of the spec - I, P, and B-frames.
2024-09-17 21:12:32 +02:00
Dave Airlie
b4283f93e1
cbs_h265: add raw filler encoding 2024-09-17 21:12:31 +02:00
Lynne
12f158ca8f
hw_base_encode_h265: split off SPS/PPS/VPS generation from VAAPI
This commit splits off the base unit generation from VAAPI to allow
sharing with other encoders.
2024-09-17 21:11:06 +02:00
James Almer
1c706cec46 avformat/mov_chan: add extra checks to channel description count
Make sure it's not zero, and equal or bigger than number of channels

Fixes: Timeout / DOS
Fixes: 67143/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-4858720481771520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-17 15:41:45 -03:00
James Almer
fec6a8df31 avcodec/bsf/dts2pts: use a RefStruct pool to allocate nodes
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-16 16:45:00 -03:00
James Almer
99ec7a8ced fate/h264: add a test for the dts2pts bsf
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-16 16:45:00 -03:00
Lynne
ceb471cfde
lavc: bump minor version and add changelog for h264_vulkan 2024-09-16 14:04:06 +02:00
Lynne
f85d94730c
lavc: add h264_vulkan hardware encoder
This commit adds the first Vulkan hardware encoder.

Currently, P, and **B**-frames are supported. This marks the
first implementation to support both.

The encoder has feature-parity with VAAPI.
2024-09-16 14:04:06 +02:00
Lynne
37243b2a08
lavc: add Vulkan video encoding base code
This commit adds the common Vulkan video encoding framework.
It makes full use of the asynchronous features of our new common
hardware encoding code, and of Vulkan.
The code is able to handle anything from H264 to AV1 and MJPEG.
2024-09-16 14:04:05 +02:00
Lynne
0fa6f33875
hwcontext_vulkan: add support for x2bgr10 and proper DRM mappings for 10-bit images
This allows mapping of 10-bit DRM images.
2024-09-16 14:03:56 +02:00
Steven Liu
76ff97cef5 tests/fate/cbs: make cbs-vvc test depends prerequisites correct
the VVC test cases cbs-vvc should prerequisites
VVC{demuxer, parser, metadata_bsf, muser}

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:45 +08:00
Steven Liu
6832134b7e tests/fate/cbs: refine depend prerequisites for cbs-hevc-discard test
add h264_metadata_bsf and file protocol for cbs-hevc-discard test cases

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:39 +08:00
Steven Liu
75fbff1170 tests/fate/demux: refine depend prerequisites for fate-mov-mp3-demux
fix fate error when --disable-everything --samples=fate-suite/ --enable-demuxer=mov

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:32 +08:00
Steven Liu
09580383c6 tests/fate/cbs: refine depend prerequisites for cbs-h264-discard test
add h264_metadata and file protocol for cbs-h264-discard test

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:25 +08:00
Steven Liu
eb20eff903 tests/fate/seek: check seek opertation with mov demuxer and file protocol
fix error at fate-seek-* when
configure with --disable-everything --samples=fate-suite/ --enable-demuxer=mov

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:17 +08:00
Steven Liu
2fb2cd5c79 tests/fate/mov: check mov and framemd5 has enabled when test
fix error st fate-mov-neg-firstpts-discard when
--disable-everything --samples=fate-suite

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:08 +08:00
Steven Liu
f3fc7af9fd tests/fate/matroska: check the demuxer and decoder allyes before fate-matroska-side-data-pref-codec
fix error message when use --disable-everything --samples=fate-suite/

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:12:00 +08:00
Steven Liu
8f100a66a1 tests/fate/audio: set flcl1905 test case with depend formats,decoder,protocol
move fate-flcl1905 with depend on test case,
because there will get an error when disable-everything with fate-suite samples.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:11:52 +08:00
Steven Liu
74553f0026 tests/fate/mov: check mov formats build status be for make test
fix make fate error when make fate with --disable-everything,
should check the mov build into ffmpeg status  before test mov functions.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:11:44 +08:00
Steven Liu
7df89cc1ec tests/fate/libavcodec: add mjpeg encoder depend for fate-libavcodec-huffman
fix make fate failed problem, because fate libavcodec-avcodec need mjpeg encoder
when fate-libavcodec-huffman

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2024-09-16 10:11:28 +08:00
Anton Khirnov
00f5a34c9a fftools/cmdutils: tighten condition for media type stream specifiers
Require the character indicating media type to be followed by a
non-alphanumeric character (or end of string).

Needed by future syntax extensions.
2024-09-15 22:21:17 +02:00
Marth64
8707c8660d avformat/dvdvideodec: implement seeking
Player applications can now enjoy seeking while playing back
a title. Accuracy is at the mercy of what libdvdnav exposes,
which is currently dvdnav_time_search().

Signed-off-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-15 13:53:00 +02:00
sfan5
e66f977494 lavf/tls_mbedtls: restrict TLSv1.3 verification workaround to affected version
Now that mbedTLS 3.6.1 is released we know that only 3.6.0 contains this regression.

ref: c28e5b597e
Signed-off-by: sfan5 <sfan5@live.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-15 13:50:18 +02:00
Zhao Zhili
5c66a3ab51 avcodec/vvc: Fix output and unref a frame which isn't decoding yet
ff_vvc_output_frame is called before actually decoding. It's possible
for ff_vvc_output_frame to select current frame to output. If current
frame is nonref frame, it will be released by ff_vvc_unref_frame.

Fix this by always marking the current frame with
VVC_FRAME_FLAG_SHORT_REF, as is done by the HEVC decoder.
2024-09-15 16:42:14 +08:00
Zhao Zhili
3f84d1d1fb aarch64/vvc: Add avg
avg_8_2x2_c:                                             0.2 ( 1.00x)
avg_8_2x2_neon:                                          0.2 ( 1.00x)
avg_8_4x4_c:                                             0.2 ( 1.00x)
avg_8_4x4_neon:                                          0.2 ( 1.00x)
avg_8_8x8_c:                                             0.9 ( 1.00x)
avg_8_8x8_neon:                                          0.2 ( 5.29x)
avg_8_16x16_c:                                           3.7 ( 1.00x)
avg_8_16x16_neon:                                        0.7 ( 5.44x)
avg_8_32x32_c:                                          14.9 ( 1.00x)
avg_8_32x32_neon:                                        1.7 ( 8.91x)
avg_8_64x64_c:                                          59.7 ( 1.00x)
avg_8_64x64_neon:                                        6.9 ( 8.62x)
avg_8_128x128_c:                                       254.7 ( 1.00x)
avg_8_128x128_neon:                                     26.9 ( 9.46x)
avg_10_2x2_c:                                            0.2 ( 1.00x)
avg_10_2x2_neon:                                         0.2 ( 1.00x)
avg_10_4x4_c:                                            0.2 ( 1.00x)
avg_10_4x4_neon:                                         0.2 ( 1.00x)
avg_10_8x8_c:                                            0.9 ( 1.00x)
avg_10_8x8_neon:                                         0.2 ( 5.29x)
avg_10_16x16_c:                                          3.4 ( 1.00x)
avg_10_16x16_neon:                                       0.4 ( 8.06x)
avg_10_32x32_c:                                         13.9 ( 1.00x)
avg_10_32x32_neon:                                       1.9 ( 7.23x)
avg_10_64x64_c:                                         54.2 ( 1.00x)
avg_10_64x64_neon:                                       8.4 ( 6.43x)
avg_10_128x128_c:                                      232.4 ( 1.00x)
avg_10_128x128_neon:                                    30.9 ( 7.52x)
avg_12_2x2_c:                                            0.0 ( 0.00x)
avg_12_2x2_neon:                                         0.2 ( 0.00x)
avg_12_4x4_c:                                            0.4 ( 1.00x)
avg_12_4x4_neon:                                         0.2 ( 2.43x)
avg_12_8x8_c:                                            0.7 ( 1.00x)
avg_12_8x8_neon:                                         0.2 ( 3.86x)
avg_12_16x16_c:                                          3.7 ( 1.00x)
avg_12_16x16_neon:                                       0.4 ( 8.65x)
avg_12_32x32_c:                                         13.7 ( 1.00x)
avg_12_32x32_neon:                                       2.2 ( 6.29x)
avg_12_64x64_c:                                         53.9 ( 1.00x)
avg_12_64x64_neon:                                       7.7 ( 7.03x)
avg_12_128x128_c:                                      270.9 ( 1.00x)
avg_12_128x128_neon:                                    30.4 ( 8.90x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
1be5a2374f aarch64/vvc: Add put_epel_hv
On Apple M1:

put_chroma_hv_8_4x4_c:                                   1.7 ( 1.00x)
put_chroma_hv_8_4x4_neon:                                0.2 ( 7.67x)
put_chroma_hv_8_8x8_c:                                   5.5 ( 1.00x)
put_chroma_hv_8_8x8_neon:                                0.5 (11.53x)
put_chroma_hv_8_16x16_c:                                18.5 ( 1.00x)
put_chroma_hv_8_16x16_neon:                              1.5 (12.53x)
put_chroma_hv_8_32x32_c:                                72.5 ( 1.00x)
put_chroma_hv_8_32x32_neon:                              4.7 (15.34x)
put_chroma_hv_8_64x64_c:                               274.0 ( 1.00x)
put_chroma_hv_8_64x64_neon:                             18.5 (14.83x)
put_chroma_hv_8_128x128_c:                            1058.7 ( 1.00x)
put_chroma_hv_8_128x128_neon:                           75.2 (14.07x)

On Android Pixel 8 Pro:

put_chroma_hv_8_4x4_c:                                   1.2 ( 1.00x)
put_chroma_hv_8_4x4_neon:                                0.0 ( 0.00x)
put_chroma_hv_8_4x4_i8mm:                                0.2 ( 5.00x)
put_chroma_hv_8_8x8_c:                                   4.0 ( 1.00x)
put_chroma_hv_8_8x8_neon:                                0.5 ( 8.00x)
put_chroma_hv_8_8x8_i8mm:                                0.5 ( 8.00x)
put_chroma_hv_8_16x16_c:                                15.2 ( 1.00x)
put_chroma_hv_8_16x16_neon:                              2.5 ( 6.10x)
put_chroma_hv_8_16x16_i8mm:                              2.2 ( 6.78x)
put_chroma_hv_8_32x32_c:                                61.0 ( 1.00x)
put_chroma_hv_8_32x32_neon:                              9.8 ( 6.26x)
put_chroma_hv_8_32x32_i8mm:                              8.5 ( 7.18x)
put_chroma_hv_8_64x64_c:                               229.5 ( 1.00x)
put_chroma_hv_8_64x64_neon:                             38.5 ( 5.96x)
put_chroma_hv_8_64x64_i8mm:                             34.0 ( 6.75x)
put_chroma_hv_8_128x128_c:                             919.8 ( 1.00x)
put_chroma_hv_8_128x128_neon:                          154.5 ( 5.95x)
put_chroma_hv_8_128x128_i8mm:                          140.0 ( 6.57x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
0dcf204e5d aarch64/vvc: Add put_epel_h i8mm
put_chroma_h_8_4x4_c:                                    0.4 ( 1.00x)
put_chroma_h_8_4x4_neon:                                 0.0 ( 0.00x)
put_chroma_h_8_4x4_i8mm:                                 0.1 ( 2.67x)
put_chroma_h_8_8x8_c:                                    1.6 ( 1.00x)
put_chroma_h_8_8x8_neon:                                 0.1 (11.00x)
put_chroma_h_8_8x8_i8mm:                                 0.1 (11.00x)
put_chroma_h_8_16x16_c:                                  6.9 ( 1.00x)
put_chroma_h_8_16x16_neon:                               1.1 ( 6.00x)
put_chroma_h_8_16x16_i8mm:                               0.7 (10.62x)
put_chroma_h_8_32x32_c:                                 27.6 ( 1.00x)
put_chroma_h_8_32x32_neon:                               4.7 ( 5.95x)
put_chroma_h_8_32x32_i8mm:                               4.4 ( 6.28x)
put_chroma_h_8_64x64_c:                                116.2 ( 1.00x)
put_chroma_h_8_64x64_neon:                              19.1 ( 6.07x)
put_chroma_h_8_64x64_i8mm:                              17.1 ( 6.77x)
put_chroma_h_8_128x128_c:                              466.6 ( 1.00x)
put_chroma_h_8_128x128_neon:                            81.4 ( 5.73x)
put_chroma_h_8_128x128_i8mm:                            71.7 ( 6.51x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
41a1885f7a aarch64/vvc: Add put_epel_h
put_chroma_h_8_4x4_c:                                    0.2 ( 1.00x)
put_chroma_h_8_4x4_neon:                                 0.2 ( 1.00x)
put_chroma_h_8_8x8_c:                                    0.8 ( 1.00x)
put_chroma_h_8_8x8_neon:                                 0.2 ( 3.00x)
put_chroma_h_8_16x16_c:                                  3.8 ( 1.00x)
put_chroma_h_8_16x16_neon:                               0.8 ( 5.00x)
put_chroma_h_8_32x32_c:                                 12.5 ( 1.00x)
put_chroma_h_8_32x32_neon:                               2.2 ( 5.56x)
put_chroma_h_8_64x64_c:                                 47.0 ( 1.00x)
put_chroma_h_8_64x64_neon:                               8.8 ( 5.37x)
put_chroma_h_8_128x128_c:                              200.2 ( 1.00x)
put_chroma_h_8_128x128_neon:                            31.8 ( 6.31x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
260e1b4b62 aarch64/vvc: Add sad
sad_8x16_c:                                              0.8 ( 1.00x)
sad_8x16_neon:                                           0.2 ( 3.00x)
sad_16x8_c:                                              0.5 ( 1.00x)
sad_16x8_neon:                                           0.2 ( 2.00x)
sad_16x16_c:                                             1.5 ( 1.00x)
sad_16x16_neon:                                          0.2 ( 6.00x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
5ac6925803 aarch64/vvc: Add put_qpel_hv
With Apple M1 (no i8mm):

put_luma_hv_8_4x4_c:                                     2.2 ( 1.00x)
put_luma_hv_8_4x4_neon:                                  0.8 ( 3.00x)
put_luma_hv_8_8x8_c:                                     7.0 ( 1.00x)
put_luma_hv_8_8x8_neon:                                  0.8 ( 9.33x)
put_luma_hv_8_16x16_c:                                  22.8 ( 1.00x)
put_luma_hv_8_16x16_neon:                                2.5 ( 9.10x)
put_luma_hv_8_32x32_c:                                  84.8 ( 1.00x)
put_luma_hv_8_32x32_neon:                                9.5 ( 8.92x)
put_luma_hv_8_64x64_c:                                 333.0 ( 1.00x)
put_luma_hv_8_64x64_neon:                               35.5 ( 9.38x)
put_luma_hv_8_128x128_c:                              1294.5 ( 1.00x)
put_luma_hv_8_128x128_neon:                            137.8 ( 9.40x)

With Pixel 8 Pro:

put_luma_hv_8_4x4_c:                                     5.0 ( 1.00x)
put_luma_hv_8_4x4_neon:                                  0.8 ( 6.67x)
put_luma_hv_8_4x4_i8mm:                                  0.2 (20.00x)
put_luma_hv_8_8x8_c:                                    13.2 ( 1.00x)
put_luma_hv_8_8x8_neon:                                  1.2 (10.60x)
put_luma_hv_8_8x8_i8mm:                                  1.2 (10.60x)
put_luma_hv_8_16x16_c:                                  44.2 ( 1.00x)
put_luma_hv_8_16x16_neon:                                4.5 ( 9.83x)
put_luma_hv_8_16x16_i8mm:                                4.2 (10.41x)
put_luma_hv_8_32x32_c:                                 160.8 ( 1.00x)
put_luma_hv_8_32x32_neon:                               17.5 ( 9.19x)
put_luma_hv_8_32x32_i8mm:                               16.0 (10.05x)
put_luma_hv_8_64x64_c:                                 611.2 ( 1.00x)
put_luma_hv_8_64x64_neon:                               68.0 ( 8.99x)
put_luma_hv_8_64x64_i8mm:                               62.2 ( 9.82x)
put_luma_hv_8_128x128_c:                              2384.8 ( 1.00x)
put_luma_hv_8_128x128_neon:                            268.8 ( 8.87x)
put_luma_hv_8_128x128_i8mm:                            245.8 ( 9.70x)
2024-09-14 16:36:34 +08:00