1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00

117979 Commits

Author SHA1 Message Date
Michael Niedermayer
70fa8bd38c
avcodec/rangecoder: Avoid checking for the first byte on every renormalization
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 03:14:46 +01:00
Michael Niedermayer
832649986c
avcodec/rangecoder: Move refill check out of refill() function
If the function is not inlined, this is more efficient. Also
it allows calling refill() without the check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 03:14:46 +01:00
Michael Niedermayer
c314a68d04
avcodec/rangecoder: Do not loop renormalization
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 03:14:45 +01:00
Michael Niedermayer
360e7cafd0
avcodec/h2645_parse: Ignore NAL with nuh_layer_id == 63
Comply with "For purposes other than determining the amount of data in the decoding units
of the bitstream, decoders shall ignore all data that follow the value 63 for nuh_layer_id in a NAL unit"
Rec. ITU-T H.265 v8 (08/2021)	Page 67

Fixes: index 63 out of bounds for type 'const int8_t[63]' (aka 'const signed char[63]')
Fixes: clusterfuzz-testcase-fuzzer_loadfile-5109286752026624
Reported-by: Kacper Michajlow <kasper93@gmail.com>
Found-by: ossfuzz
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 03:14:45 +01:00
Michael Niedermayer
c250a903a7
doc/encoders: very basic FFv1 documentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 03:14:44 +01:00
Sean McGovern
b9eaf6e05c
swscale/ppc: disable YUV2RGB AltiVec acceleration
The FATE test 'checkasm-sw_yuv2rgb' currently fails on this platform,
in both little- and big-endian configurations with AltiVec enabled.

Disable it for the time being.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 02:51:39 +01:00
Michael Niedermayer
4cc1495aca
avformat/iamf_parse: reject ambisonics mode > 1
ambisonics mode > 1 does not initialize any layer but layer 0
is unconditionally dereferenced

Fixes: poc-2024-11
Fixes: null pointer dereference
Found-by: 苏童 <220235212@seu.edu.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-12-02 02:51:38 +01:00
Marth64
1c2c70fe4d doc/demuxers/dvdvideo: seeking is supported, remove outdated statement
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-12-01 13:49:01 -06:00
Marth64
e256761def avformat/dvdvideodec: check return code of ff_dvdclut_yuv_to_rgb()
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-12-01 13:48:51 -06:00
Marth64
a5a899bfcb avformat/dvdvideodec: fix missing last chapter marker due to off-by-one
When using fast chapter marker calculation (default), the last
marker is inadverdently ignored due to an off-by-one.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-12-01 13:48:45 -06:00
Frank Plowman
1e3dc705df lavc/x86/videodsp: Drop MMX usage
Remove the MMX versions of these functions and modify the SSE
implementations to avoid using MMX registers.

Signed-off-by: Frank Plowman <post@frankplowman.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
2024-12-01 13:26:34 +08:00
Nuo Mi
4de67e8746 avcodec/vvcdec: return error if CTU size > 128
The v3 spec reserves CTU size 256. Currently, we use an uint8_t* table to hold cb_width and cb_height.
If a CTU size of 256 is not split, cb_width and cb_height will overflow to 0.
To avoid switching to uint16_t, rejecting CTU size 256 provides a simple solution.
2024-11-30 09:58:59 +08:00
Nuo Mi
eb67e60cb0 avcodec/vvcdec: schedule next stage only if the current stage reports no error
If the current stage reports an error, some variables may not be correctly initialized.
Scheduling the next stage could lead to the use of uninitialized variables.
2024-11-30 09:58:59 +08:00
Nuo Mi
4ec767abcc avcodec/vvcdec: misc, reformat inter_data() 2024-11-30 09:58:59 +08:00
Nuo Mi
ba89c5b989 avcodec/vvcdec: inter_data, check the return value from hls_merge_data
Reported-by: Frank Plowman <post@frankplowman.com>
2024-11-30 09:58:59 +08:00
Nuo Mi
98698ed3c2 avcodec/cbs_h266: stricter validation for subpicture's max width and height
Co-authored-by: Frank Plowman <post@frankplowman.com>
2024-11-30 09:58:59 +08:00
Nuo Mi
e06515b092 avcodec/cbs_h266: improve readability in subpicture parser 2024-11-30 09:58:59 +08:00
Nuo Mi
5c5a08ecb5 avcodec/vvcdec: ensure every CTU belongs to a slice
According to section 6.3.3 "Spatial or component-wise partitionings,"
CTUs should fully cover slices with no overlaps, gaps, or additions.
No overlaps are ensured by task_init_parse.
No gaps and no additions are ensured by this patch.

Co-authored-by: Frank Plowman <post@frankplowman.com>
2024-11-30 09:58:59 +08:00
Nuo Mi
46006529a1 avcodec/cbs_h266: check subpicture slices number
According to section 6.3.3, 'Spatial or component-wise partitionings,'
Subpictures must cover the entire picture.
Therefore, the total number of subpicture slices should equal the number of picture slices

Co-authored-by: Frank Plowman <post@frankplowman.com>
2024-11-30 09:58:59 +08:00
Marton Balint
4100a2da29 tests/fate/filter-audio: add aloop test
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:59:56 +01:00
Marton Balint
f5948543f4 fate: revert previous frequency adjustments of the sine filter
With more precise frequency support in the sine filter, several fate tests will
change.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:16:22 +01:00
Marton Balint
8d6f3bcb96 avfilter/asrc_sine: increase frequency accuracy
Previously the delta phase was fixed point fractional with 2^32 fractions,
which caused inaccuracies in the output frequency, unless the input
frequency*2^32 was divisable by the sample rate.

This patch improves frequency accuracy by tracking subfractions of the delta
phase fractions. For this we are using a denominator which is a multiple of the
sample rate, making sure that integer frequencies are always accurately
represented.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:16:22 +01:00
Marton Balint
06247ae746 avfilter/asrc_sine: factorize sampling to a separate context
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:16:22 +01:00
Marton Balint
6189cb47fc fate: adjust frequencies of the sine filter
The filter currently uses inaccurate frequencies, this is in preparation for
fixing that, by using numbers that will map to the equivalent value in the
future code.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:15:22 +01:00
Zhao Zhili
59057aa807 avutil/mem_internal: local align should always work
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-29 12:33:03 +08:00
Zhao Zhili
57861911a3 avutil/mem_internal: define DECLARE_ALIGNED as C11's alignas
alignas is portable than compiler's specific __attribute__. It do
have a limitation, that alignas don't support specify aligment on
the declarations of struct (it works for specify alignment on struct
fields), which only used by avcodec/cavs, and is removed now.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-29 12:32:57 +08:00
Zhao Zhili
fe2c9746de avcodec/cavs: Limit align requirement to variable than type
There are another three cavs_vector variables, ff_cavs_dir_mv,
ff_cavs_intra_mv and un_mv. They don't need align to 8.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-29 12:32:50 +08:00
Zhao Zhili
82c208b653 avfilter/textutils: Add missing time_internal.h
This fix build error on Windows with MSVC. We need time_internal.h
for gmtime_r and localtime_r.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-29 12:30:48 +08:00
Michael Niedermayer
f57f2a356d
doc/infra: List at what companies the name servers are hosted and who provides the servers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-11-28 23:19:00 +01:00
Michael Niedermayer
e531b3ff27
MAINTAINERS: Lauri is still available but is really low on time nowadays
CC: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-11-28 23:19:00 +01:00
Anton Khirnov
3bfb6061fb tools/general_assembly: exclude Derek from GA emails
At his own request, he can remove the entry whenever he likes.
2024-11-28 15:51:37 +01:00
Anton Khirnov
9cb8928d69 tools/general_assembly: add a mechanism for excluding people from GA list
To be used at their own request, when they do not wish to receive vote
emails.
2024-11-28 15:51:37 +01:00
Manuel Lauss
a786dd4889 libavcodec/sanm: codec47: apply top offset also to diff buffers
SAN FRME objects specify width/height as well as offsets from top/left.
These offsets need to be taken into account for the diff buffers
as well.  Fixes playback of all SAN videos of "Shadows of the Empire",
which have a constant top offset of 60 (640x272 video on a 640x480 window)
and show tons of ghosting and block artifacts.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-28 14:39:19 +01:00
Manuel Lauss
dc98e7989d libavcodec/sanm: clear codec47 diff buffers with specific color
The codec47 header provides colors to use to clear the
2 difference buffers. This fixes artifacts (black hair, faces) in
Curse of Monkey Island "CURSERNG.SAN" video.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-28 14:39:06 +01:00
Manuel Lauss
85fec8d90f libavcodec/sanm: fix XPAL handling
Outlaws' RAE.SAN file did not properly fade out in certain scenes,
but simply turned to black as soon as the first XPAL chunk with
the apply command was encountered.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-28 14:31:20 +01:00
Manuel Lauss
1e2a72ae1d libavcodec/sanm: add codec47 interpolation table support
Some codec47 frames come with an interpolation table:
Combining 2 adjacent pixels into a 16bit value, this value can
then be used as index into the interpolation table to get a new
pixel value.  This is used for subcodec 1, which encodes a key-
frame at half width and height, and makes these frame less blocky
appearing.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-28 14:31:15 +01:00
Nicolas Gaullier
44d32c8a23 avcodec/ac3dec: fix build when eac3 decoder is disabled
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-28 14:15:50 +01:00
gnattu via ffmpeg-devel
248832dd5b avcodec/bsf/dovi_rpu: remove EL when stripping dovi metadata
When RPU is removed EL should also be removed. This only applies to
HEVC as AV1 based Profile 10 does not support EL at all.

Signed-off-by: Gnattu OC <gnattuoc@me.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-11-28 14:15:50 +01:00
Fei Wang
bc991ca048 lavfi/qsvvpp: Copy frame props before modify it
The changes to output frame props in query_frame overlapped since
578ac59887. Move the copy frame props before the changes.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-28 11:13:25 +08:00
IndecisiveTurtle
351fd8460a vulkan/common: Add put_bytes_count 2024-11-28 10:03:01 +09:00
IndecisiveTurtle
e3ac63b213 vulkan/common: Use u32vec2 buffer type instead of u64
According to the GL_EXT_buffer_reference spec alignment
"must be a power of two and be greater than or equal to the largest scalar/component type in the block."

This means by using u32vec2 we can drop the requirement alignment from 8 bytes to 4 bytes
and save a pack64 call in reverse8 (though I assume in most ISAs that compiles to nothing)

Allows the vc2 vulkan encoder to function without setting PB_UNALIGNED
2024-11-28 09:31:43 +09:00
IndecisiveTurtle
f794ed48c0 vulkan/common: Fix off-by-one error in flush_put_bits
If caller wrote a divisible by eight number of bits it would write an extra byte.
Also increment by to_write instead of BUF_BYTES which overly pads the bitstream.
2024-11-28 09:31:43 +09:00
Ramiro Polla
4e1a91112d tests/fate/filter-video: don't convert owdenoise test to mpeg range 2024-11-28 00:58:21 +01:00
Lynne
187fd52864
vulkan: fix use of atomics for the current context index
The code used to use atomic, but over time, this got broken.
This commit also remmoves the is-the-last-submission-ready
shortcut, which rarely did anything.
There's also value in relying on the fact that contexts
always carry their frames in a strictly incremental order
with no gaps.
2024-11-28 01:29:21 +09:00
Lynne
41f65b7326
vulkan_decode: ensure there's at least one context per decode thread
Otherwise, what may happen is that 2 threads will both write
into the same context.
2024-11-28 01:29:21 +09:00
Lynne
a5e6860a89
vulkan_decode: fix counting for parallelism
ff_vk_exec_pool_init used to multiply the number by
the number of queues, but that got changed, yet this use
of the function was not updated.
2024-11-28 01:29:15 +09:00
Scott Theisen
78c4d6c136 libavcodec/mpeg12dec.c: support DVB CC format 0x0502 in user_data
Reviewed-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-11-26 19:50:59 -06:00
Marth64
084d3515ca avformat/libssh: fix credential variables typo
Signed-off-by: Marth64 <marth64@proxyid.net>
2024-11-26 19:50:49 -06:00
Lynne
d4966f0a74
ffv1enc_vulkan: limit parallelism based on VRAM, fallback to host memory 2024-11-26 14:14:16 +01:00
Lynne
5effac3b02
ffv1enc: expose ff_ffv1_encode_buffer_size
The function is quite important to ensure that the output
is always going to be sufficient, and it can change version to
version, so exposing it makes sense.
2024-11-26 14:14:15 +01:00