Commit Graph

117441 Commits

Author SHA1 Message Date
Martin Storsjö
6668268e16 checkasm: lls: Use relative tolerances rather than absolute ones
Depending on the magnitude of the output values, the potential
errors can be larger.

This fixes errors in the lls tests on x86_32 for some seeds,
observed with GCC 11 (on Ubuntu 22.04, with the distro compiler,
with -m32).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-09 15:52:56 +03:00
Martin Storsjö
77e6293735 arm: Consistently use proper interworking function returns
Use "bx lr", or "pop {lr}", which do proper mode switching
between thumb and arm modes. A plain "mov pc, lr" does not switch
from thumb mode to arm mode (while in arm mode, it does switch
mode for a thumb caller).

This is normally not an issue, as CONFIG_THUMB only is enabled if
the C compiler defaults to thumb; but stick to patterns that can
do mode switching if needed, for consistency.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-09 15:52:51 +03:00
Niklas Haas
ec9985b54f swscale/internal: constify and expose ff_swscale()
Used as an intermediate entry point for the new swscale context. The extra
constification is a consistency measure, as I want to move the memcpy of
stride and plane pointers to the functions that actually need to mutate them.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:18:08 +02:00
Niklas Haas
403a20b2e6 swscale/rgb2xyz: expose these functions internally
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:17:17 +02:00
Niklas Haas
775de8c19d swscale/rgb2xyz: follow convention on image pointers and strides
Instead of taking an int16_t pointer and a stride in halfwords, follow the
usual convention of treating all planes and strides as byte-addressed.

This does not have any immediate effect but makes these functions more
reusable without unintended "gotchas".

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:14:57 +02:00
Niklas Haas
9d8f5141cf swscale/rgb2xyz: add explicit width parameter
This fixes an 11-year-old bug in the rgb2xyz functions, when used with a
negative stride. The current loop bounds turned it into a no-op.

Additionally, this increases performance on highly cropped images, whose
stride may be substantially higher than the effective width.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:14:57 +02:00
Niklas Haas
ea228fc415 swscale/rgb2xyz: minor style fixes
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-09 13:14:57 +02:00
James Almer
04612351ab swscale/input: add V30X input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:26:07 -03:00
James Almer
ea05edc9e0 swscale/input: add VYU444 input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:24:47 -03:00
James Almer
ec7f5e314d swscale/input: add UYVA input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:24:47 -03:00
James Almer
bb37d3c33e swscale/input: add AYUV input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 22:24:47 -03:00
Lynne
80a0567a2f
vulkan: fix ImageView flexible array struct allocation
Same as the previous commit, the compiler may insert padding.
Thanks to Marvin Scholz for pointing this out.
2024-10-09 02:39:34 +02:00
Marvin Scholz
f5e2914a89 libavutil/vulkan: fix flexible array struct allocation
The flexible array member struct can have padding added by
the compiler which was not taken into account properly, which
could lead to a heap buffer overflow.
2024-10-09 02:36:12 +02:00
jinbo
e6ecc1e757
swscale: Fix conflicting types for loongarch
Build breaks after c1a0e65763

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 01:55:50 +02:00
Martin Schitter
6a735e3388
RELEASE: update release number after release/7.1 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-09 01:55:50 +02:00
Lynne
4ad4f8101a
hwcontext_vulkan: set hwctx->device_features
This was forgotten during the recent device feature refactor.
2024-10-09 01:01:32 +02:00
Lynne
31def0c3ce
hwcontext_vulkan: remove redundant hostQueryReset setting
Its set just a few lines earlier.
2024-10-09 01:01:32 +02:00
Lynne
b8d1b4358b
vulkan: add a #define when printf debugging is enabled 2024-10-09 01:01:31 +02:00
Lynne
204558cee8
configure: explicitly disable spirv_compiler
spirv_compiler is an undeclared variable that was spontaneously
enabled if libshaderc or libglslang were detected, and served as
a way to enable filters.

However, it being undeclared had the effect that it was neither
considered explicitly disabled nor enabled if libshaderc or
libglslang were detected.

The only category we have which explicitly disables variables
is EXTERNAL_LIBRARY_LIST, however, spirv_compiler is not a real
external library, and making it present there would report its
detection on ./configure.
2024-10-09 00:59:33 +02:00
Lynne
57b7e96b04
configure: add spirv_compiler to avfilter_suggest as well
If someone were to enable libglslang/libshaderc, and then disable
all Vulkan filters, they would have the same issue as the earlier
fix for libavcodec.
2024-10-09 00:59:27 +02:00
James Almer
29ea34728f avutil/pixfmt: add V30X pixel format
This maps to the 444YpCbCr10 pixel format as defined by Apple.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 19:45:10 -03:00
James Almer
1f9424e0b1 avutil/pixfmt: add VYU444 pixel format
This maps to the 444YpCbCr8 pixel format as defined by Apple, which is ordered
Cr Y' Cb.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
dc3ef53819 avutil/pixfmt: add UYVA pixel format
This maps to the 4444YpCbCrA8 pixel format as defined by Apple, which is ordered
Cb Y' Cr A.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
263108a504 avutil/pixfmt: add AYUV pixel format
This maps to the 4444AYpCbCr8 pixel format as defined by Apple, which is ordered
A Y’ Cb Cr.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
James Almer
2e79690a70 avutil/pixfmt: extend the VUY{A,X} description
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-08 14:10:07 -03:00
Niklas Haas
477445722c swscale/ppc: fix altivec build failure
Fixes: c1a0e65763
2024-10-08 16:45:36 +02:00
Martin Storsjö
b9145fcab2 swscale: Fix aarch64 and i386 compilation failures
This unbreaks builds after c1a0e65763,
which broke with errors like

src/libswscale/aarch64/rgb2rgb.c:66:25: error: incompatible function pointer types assigning to 'void (*)(const uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int, const int32_t *)' (aka 'void (*)(const unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, int, int, int, int, const int *)') from 'void (const uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int, int32_t *)' (aka 'void (const unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, int, int, int, int, int *)') [-Wincompatible-function-pointer-types]
   66 |         ff_rgb24toyv12  = rgb24toyv12;
      |                         ^ ~~~~~~~~~~~

and

src/libswscale/aarch64/swscale_unscaled.c:213:29: error: incompatible function pointer types assigning to 'SwsFunc' (aka 'int (*)(struct SwsContext *, const unsigned char *const *, const int *, int, int, unsigned char *const *, const int *)') from 'int (SwsContext *, const uint8_t *const *, const int *, int, int, const uint8_t **, const int *)' (aka 'int (struct SwsContext *, const unsigned char *const *, const int *, int, int, const unsigned char **, const int *)') [-Wincompatible-function-pointer-types]
  213 |         c->convert_unscaled = nv24_to_yuv420p_neon_wrapper;
      |                             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-10-08 09:29:07 +03:00
Niklas Haas
73b3344edd swscale/input: parametrize ff_sws_init_input_funcs() pointers
Following the precedent set by ff_sws_init_output_funcs().

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
20b350b284 swscale/internal: add typedefs for input reading functions
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
b90d522d2c swscale/internal: forward typedef SwsContext
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
c1a0e65763 swscale/internal: constify SwsFunc
I want to move away from having random leaf processing functions mutate
plane pointers, and while we're at it, we might as well make the strides
and tables const as well.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
286bdc9cdc swscale/internal: turn cascaded_tmp into an array
Slightly more convenient to access from the new wrapping code.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
61369484f6 swscale/internal: expose ff_update_palette() internally
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
aee19ee431 swscale/internal: rename NB_SWS_DITHER for consistency
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
41ce370b65 tests/swscale: fix minor typos
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-07 19:51:34 +02:00
Niklas Haas
bed919efaa avfilter/src_movie: configure correct YUV attributes
Missed by the YUV negotiation series.
2024-10-07 19:51:34 +02:00
James Almer
362586fcad avfilter/vf_xpsnr: remove duplicated DSP infranstructure
Fully reuse the existing one from vf_psnr, instead of halfways.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-07 09:33:52 -03:00
Anton Khirnov
496b8d7a13 fftools/ffmpeg_filter: stop setting a no-op option 2024-10-07 10:53:13 +02:00
Anton Khirnov
26ae8d1891 lavfi/avfilter: drop ff_ prefixes from static functions 2024-10-07 10:53:13 +02:00
Anton Khirnov
d3739dcbec lavfi/avfilter: make ff_inlink_evaluate_timeline_at_frame() static
It is not used outside of avfilter.c
2024-10-07 10:53:13 +02:00
Anton Khirnov
6647e57dcb lavfi/avfilter: document AVFilterContext.is_disabled as private
Ideally there should be three parts to the filter context - public,
private to the filter, and private to generic code, but only the first
and the last of these exist currently. Until the second is implemented,
this is better than nothing.
2024-10-07 10:53:13 +02:00
Anton Khirnov
4472bddb18 lavfi/avfilter: move AVFilterContext.command_queue to FFFilterContext
It is private to generic filtering code.
2024-10-07 10:53:09 +02:00
Anton Khirnov
71f176e3ce lavfi/avfilter: move AVFilterContext.{enable,var_values} to FFFilterContext
They are private to generic filtering code.
2024-10-07 10:52:48 +02:00
Anton Khirnov
b1247e7c1f lavfi/avfilter: move AVFilterContext.ready to FFFilterContext
This field is private to the generic filtering code.
2024-10-07 10:47:18 +02:00
Anton Khirnov
e0eec71a13 lavfi/vf_geq: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
a81061b911 lavfi/vf_hwmap: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
eb0c9670b4 lavfi/vf_format: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
cfbb6e9f5d lavfi/vf_fieldorder: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
977059718b lavfi/vf_fieldmatch: switch to query_func2() 2024-10-07 10:46:43 +02:00
Anton Khirnov
4863570d49 lavfi/vf_fieldhint: switch to query_func2() 2024-10-07 10:46:43 +02:00