1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/libswscale
Niklas Haas 095f8038fa swscale/output: fix bilinear yuv2rgb chroma interpolation
These functions were divided into two special cases; one assuming that
uvalpha == 0, and the other assuming that uvalpha == 2048. This worked fine
for simple 2x chroma upscaling but broke for e.g. yuv410p, non-centered chroma,
or other special cases that involved non-aligned chroma filters.

Fix it by instead dividing this check into two cases, a uvalpha==0 fast path
and a uvalpha>0 general path. Instead of (A+B)/2 the general path now multiplies
in the true uvalpha weight.

I tried preserving the old fast path for the case of uvalpha == 2048, but this
was significantly slower in practise versus having just one general path.
However, we still need a uvalpha == 0 path for the unscaled case.

Fixes: ticket #5083
Signed-off-by: Niklas Haas <git@haasn.dev>
Sponsored-by: Sovereign Tech Fund
2024-12-21 10:57:54 +01:00
..
aarch64 swscale/aarch64: add neon {lum,chr}ConvertRange16 2024-12-05 21:10:29 +01:00
arm swscale/internal: group user-facing options together 2024-11-21 12:49:56 +01:00
loongarch swscale/range_convert: saturate output instead of limiting input 2024-12-05 21:10:29 +01:00
ppc swscale/ppc: disable YUV2RGB AltiVec acceleration 2024-12-02 02:51:39 +01:00
riscv swscale/range_convert: saturate output instead of limiting input 2024-12-05 21:10:29 +01:00
tests tests/swscale: allow nonzero positive return codes from sws_scale_frame() 2024-12-18 17:30:48 +01:00
x86 swscale/x86: add sse4 and avx2 {lum,chr}ConvertRange16 2024-12-05 21:10:29 +01:00
alphablend.c swscale/internal: group user-facing options together 2024-11-21 12:49:56 +01:00
bayer_template.c swscale/internal: constify SwsFunc 2024-10-07 19:51:34 +02:00
gamma.c swscale: rename SwsContext to SwsInternal 2024-10-24 22:50:00 +02:00
graph.c swscale/graph: fix memleak of cascaded graphs 2024-12-04 11:38:30 +01:00
graph.h swscale/graph: add new high-level scaler dispatch mechanism 2024-11-25 11:02:16 +01:00
half2float.c swscale/input: add rgbaf16 input support 2022-08-19 22:09:36 +02:00
hscale_fast_bilinear.c swscale: rename SwsContext to SwsInternal 2024-10-24 22:50:00 +02:00
hscale.c swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
input.c swscale/internal: group user-facing options together 2024-11-21 12:49:56 +01:00
libswscale.v build: Change structure of the linker version script templates 2016-05-29 16:43:11 +02:00
log2_tab.c lsws: duplicate ff_log2_tab 2014-08-12 20:52:21 +02:00
Makefile swscale/graph: add new high-level scaler dispatch mechanism 2024-11-25 11:02:16 +01:00
options.c swscale: eliminate redundant SwsInternal accesses 2024-11-25 10:59:52 +01:00
output.c swscale/output: fix bilinear yuv2rgb chroma interpolation 2024-12-21 10:57:54 +01:00
rgb2rgb_template.c swscale/swscale_unscaled: add unscaled conversion for AYUV/VUYA/UYVA 2024-11-02 15:01:31 -03:00
rgb2rgb.c swscale/swscale_unscaled: add unscaled x2rgb10le to packed RGB 2024-11-06 17:34:32 -03:00
rgb2rgb.h swscale/swscale_unscaled: add unscaled x2rgb10le to packed RGB 2024-11-06 17:34:32 -03:00
slice.c swscale/slice: fix init of 32 bpc planes 2024-12-16 12:21:55 +01:00
swscale_internal.h swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
swscale_unscaled.c swscale/swscale_unscaled: Fix odd height with nv24_to_yuv420p_chroma() 2024-12-04 04:23:48 +01:00
swscale.c swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
swscale.h swscale: fix documentation of sws_scale_frame() 2024-12-18 17:30:48 +01:00
swscaleres.rc
utils.c swscale/utils: fix sws_getCachedContext check 2024-12-18 17:30:26 +01:00
utils.h swscale: add new frame testing API 2024-10-23 23:06:16 +02:00
version_major.h libs: bump major version for all libraries 2024-03-07 11:29:43 -03:00
version.c lib*/version: Use static_assert for static asserts 2024-03-31 00:08:42 +01:00
version.h swscale: introduce new, dynamic scaling API 2024-11-25 11:03:50 +01:00
vscale.c swscale/internal: group user-facing options together 2024-11-21 12:49:56 +01:00
yuv2rgb.c swscale/internal: group user-facing options together 2024-11-21 12:49:56 +01:00