Commit Graph

118354 Commits

Author SHA1 Message Date
James Almer
da92f615b6 swscale/output: add XV48 output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:06 +02:00
James Almer
fdb4a8944e swscale/input: add XV48 input support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:06 +02:00
James Almer
5eee9aef71 avutil/pixfmt: add XV48 pixel format
Much like XV30 and XV36 in d75c4693fe,
XV48 is added to support 16bit 4:4:4 as defined by Microsoft.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
James Almer
0ff5f0f722 libavutil/hwcontext_d3d11va: use the Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
James Almer
ebcb351da4 libavutil/hwcontext_dxva2: use the Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
James Almer
014e99eb2b avformat/riff: map Y210 and Y216 fourcc to RAWVIDEO decoder
As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
Michael Niedermayer
c40bdd53ed avformat/mpegts: Initialize predefined_SLConfigDescriptor_seen
Fixes: use of uninitialized variable
Fixes: 368729566/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTS_fuzzer-6044501804646400

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: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
Michael Niedermayer
36049cd54c avformat/mxfdec: Fix overflow in midpoint computation
Fixes: signed integer overflow: 4611686016549392399 + 9223372033098784800 cannot be represented in type 'long long'
Fixes: 368503277/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5928227458056192

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: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
Michael Niedermayer
d30e00fcba swscale/output: used unsigned for bit accumulation
Fixes: Integer overflow
Fixes: 368725672/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5009093023563776

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: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
Michael Niedermayer
1509526901 swscale/rgb2rgb_template: Fix ff_rgb24toyv12_c() with odd height
Fixes: out of array access
Fixes: 368143798/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6475823425585152

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: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
Dale Curtis
b00a93d711 avcodec/h2645: allocate film grain metadata dynamically
Film grain support adds a huge amount of overhead to the H264Context
structure for a feature that is rarely used. On low end devices or
pages that have lots of media this bloats memory usage rapidly.

This changes the static film grain metadata allocations to be dynamic
which reduces the H264Context size from 851808 bytes to 53444 bytes.

Bug: https://crbug.com/359358875
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:04 +02:00
Michael Niedermayer
ac75e76e8d avcodec/ffv1: Implement new slice tiling
This fixes corner cases (requires version 4 or a spec update)

Fixes: Ticket5548

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:25:18 +02:00
Michael Niedermayer
f7299fba2a avcodec/rangecoder: only perform renorm check/loop for callers that need it
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:25:18 +02:00
Niklas Haas
7d8a5e3aee swscale: rename SwsContext to SwsInternal
And preserve the public SwsContext as separate name. The motivation here
is that I want to turn SwsContext into a public struct, while keeping the
internal implementation hidden. Additionally, I also want to be able to
use multiple internal implementations, e.g. for GPU devices.

This commit does not include any functional changes. For the most part, it is
a simple rename. The only complications arise from the public facing API
functions, which preserve their current type (and hence require an additional
unwrapping step internally), and the checkasm test framework, which directly
accesses SwsInternal.

For consistency, the affected functions that need to maintain a distionction
have generally been changed to refer to the SwsContext as *sws, and the
SwsInternal as *c.

In an upcoming commit, I will provide a backing definition for the public
SwsContext, and update `sws_internal()` to dereference the internal struct
instead of merely casting it.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:25:17 +02:00
Soma Lucz
07239fb054 doc/ffmpeg: improve -disposition, -stats, and -progress documentation
-disposition:
Clarify the meaning of the default value, and how the '+' and '-'
prefixes work. Add more examples.

-stats:
Clarify that it appears as an "info"-level log.

-progress:
Add info about the "progress" key's value being "continue" or "end".
Add an example of logging to stdout.

Signed-off-by: Soma Lucz <luczsoma@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:18:34 +02:00
Paul B Mahol
8020860b1d avfilter/af_surround: add support for two more channels 2024-10-25 23:32:05 +02:00
Paul B Mahol
8ce6abcc05 avfilter/surround_template: simplify 2024-10-25 22:41:28 +02:00
Paul B Mahol
0b279cd954 avfilter/af_surround: misc fixes 2024-10-25 22:13:12 +02:00
Paul B Mahol
ea81ac4440 avfilter/af_ardftsrc: fix for possible integer overflow 2024-10-25 18:08:53 +02:00
Paul B Mahol
70079ea501 avfilter/af_surround: fix remaining spread_* issues 2024-10-25 09:14:42 +02:00
Paul B Mahol
035632ed89 avfilter/af_surround: extend minimal spread range 2024-10-24 23:10:49 +02:00
Paul B Mahol
a8d08dd250 avfilter/surround_template: remove useless operations 2024-10-24 22:26:19 +02:00
Paul B Mahol
4cc2f6f7af avfilter/af_aecho: add support for commands 2024-10-24 21:09:37 +02:00
Paul B Mahol
d2283bc734 avfilter/adynamicequalizer_template: use decramped qfactors 2024-10-24 20:38:27 +02:00
Paul B Mahol
30bc6eca9c avfilter/af_biquads: add decramp option 2024-10-24 20:38:27 +02:00
Paul B Mahol
de77159520 avfilter/vf_extractplanes: fix extracting of green component for some packed formats 2024-10-24 11:59:48 +02:00
Paul B Mahol
eea854b510 avfilter/vsrc_testsrc: fix <8 component depth rgb/bgr output for rgbtestsrc 2024-10-24 11:59:41 +02:00
Paul B Mahol
d056630fa2 avfilter/drawutils: fix crash 2024-10-24 11:51:32 +02:00
Paul B Mahol
3aa2bf64c1 avfilter/f_interleave: fix EOF checks 2024-10-24 10:50:57 +02:00
Paul B Mahol
a9a66fd8c5 avfilter/af_aphaser: simplify 2024-10-24 10:08:00 +02:00
James Almer
4c1ff74624 avcodec/vulkan_video: add mapping for AV_PIX_FMT_Y216
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:51 +02:00
James Almer
4c24ddeb1e avutil/hwcontext_vulkan: add support for AV_PIX_FMT_Y216
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:51 +02:00
James Almer
9967516632 avcodec/vulkan_video: add proper maps for XV3{0,6}
Forgotten after fd8b0dcfed61ddf36b9523aa4ba1badc493b7707.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:51 +02:00
Niklas Haas
1373d403e9 swscale/x86: use dedicated int for self-modifying MMX dstW
I want to pull options out of SwsInternal, so we need to make this field
a dedicated int that gets updated as appropriate in ff_swscale().

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
Niklas Haas
cb73e1667e swscale: add sws_is_noop()
Exactly what it says on the tin.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
Niklas Haas
e1991402ed swscale: add new frame testing API
Replacing the old sws_isSupported* API with a more consistent family
of functions that follows the same signature and naming convention,
including a placeholder for testing the color space parameters that
we don't currently implement conversions for.

These functions also perform some extra basic sanity checking.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
Niklas Haas
b71d27b5e9 swscale/utils: add SwsFormat abstraction and helpers
Groups together all relevant color metadata from an AVFrame. While we could
use AVFrame directly, keeping it a separate struct has three advantages:

1. Functions accepting an SwsFormat will definitely not care about the
   data pointers.
2. It clearly separates sanitized and raw metadata, since the function to
   construct an SwsFormat from an AVFrame will also sanitize.
3. It's slightly more lightweight to pass around.

Move these into a new header file "utils.h" to avoid crowding
swscale_internal.h even more, and also to solve a circular dependency issue
down the line.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
Niklas Haas
b934fd0c30 swscale: add sws_free_context()
Merely a convenience wrapper around sws_freeContext(). The name change is for
parity with the other sws_* functions.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
Niklas Haas
00f421484c swscale: slightly reorder header
I want to start grouping "legacy" functions which I tend to deprecate
together, away from the new ones.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
Niklas Haas
1b0f9f1191 swscale: publicly typedef struct SwsContext
Slightly more convenient, especially for the upcoming refactor which will
turn SwsContext into a public struct.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:50 +02:00
James Almer
efc963fee6 swscale/output: add Y216LE output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:49 +02:00
James Almer
ace0fec2a5 swscale/input: add Y216LE input support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:49 +02:00
James Almer
3373ec5ab7 avutil/pixfmt: add Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:49 +02:00
Lynne
992bcb6e90 vulkan: move alignment of host-visible allocations outside of ff_vk_alloc_mem
The issue is that if dedicated allocation is used, VkBufferCreateInfo.size
and the actual allocated size mismatched, which is a validation error.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:48 +02:00
Paul B Mahol
8c194523b9 avfilter/surround_template: the Y-axis actually need scaling 2024-10-23 11:42:48 +02:00
Paul B Mahol
acbe018e94 avfilter/surround_template: remove invalid multiplication 2024-10-23 10:52:26 +02:00
Paul B Mahol
351cbe1c07 avfilter/af_aecho: add timeline support 2024-10-23 09:48:09 +02:00
Paul B Mahol
c0c0e4b4c6 avfilter/af_adynamicequalizer: split 'mode' option, and make options array 2024-10-23 08:38:58 +02:00
Paul B Mahol
dc983dc5b0 fftools: add back commands output flag for filters 2024-10-22 22:09:08 +02:00
Paul B Mahol
72ca66da57 avfilter/af_aecho: add slice threading support 2024-10-22 21:46:13 +02:00