1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/libswscale
Niklas Haas cedf589c09 swscale: fix sws_setColorspaceDetails after sws_init_context
More commonly, this fixes the case of sws_setColorspaceDetails after
sws_getContext, since the latter implies sws_init_context.

The problem here is that sws_init_context sets up the range conversion
and fast path tables based on the values of srcRange/dstRange at init
time. This may result in locking in a "wrong" path (either using
unscaled fast path when range conversion later required, or using
scaled slow path when range conversion becomes no longer required).

There are two way outs:

1. Always initialize range conversion and unscaled converters, even if
   they will be unused, and extend the runtime check.
2. Re-do initialization if the values change after
   sws_setColorspaceDetails.

I opted for approach 1 because it was simpler and easier to reason
about.

Reword the av_log message to make it clear that this special converter
is not necessarily used, depending on whether or not there is range
conversion or YUV matrix conversion going on.
2023-11-09 12:53:35 +01:00
..
aarch64 aarch64: Reindent all assembly to 8/24 column indentation 2023-10-21 23:25:54 +03:00
arm sws: rename SwsContext.swscale to convert_unscaled 2021-07-03 15:57:53 +02:00
loongarch swscale/la: Add following builtin optimized functions 2023-05-25 21:05:15 +02:00
ppc swscale/ppc: remove hScale8To19_vsx 2023-05-20 20:07:18 +02:00
riscv swscale/rgb2rgb: R-V V deinterleaveBytes 2023-10-03 22:53:20 +03:00
tests swscale: introduce isSwappedChroma 2022-01-04 19:39:22 -06:00
x86 x86: replace explicit REP_RETs with RETs 2023-02-01 04:23:55 +01:00
alphablend.c swscale/alphablend: Fix slice handling 2021-10-03 20:38:29 +02:00
bayer_template.c swscale: do not drop half of bits from 16bit bayer formats 2020-08-08 12:03:42 +02:00
gamma.c
half2float.c swscale/input: add rgbaf16 input support 2022-08-19 22:09:36 +02:00
hscale_fast_bilinear.c
hscale.c swscale: add opaque parameter to input functions 2022-08-19 22:09:36 +02:00
input.c swscale: add GBRAP14 format support 2023-09-28 19:37:58 +02:00
libswscale.v
log2_tab.c
Makefile swscale/input: add rgbaf16 input support 2022-08-19 22:09:36 +02:00
options.c Remove unnecessary libavutil/(avutil|common|internal).h inclusions 2022-02-24 12:56:49 +01:00
output.c swscale: add GBRAP14 format support 2023-09-28 19:37:58 +02:00
rgb2rgb_template.c swscale/rgb2rgb_template: use shuffle macro on big-endian arches 2020-12-12 23:07:22 -05:00
rgb2rgb.c sws/rgb2rgb: RISC-V V shuffle_bytes_xxxx functions 2022-09-30 07:24:09 +02:00
rgb2rgb.h sws/rgb2rgb: RISC-V V shuffle_bytes_xxxx functions 2022-09-30 07:24:09 +02:00
slice.c swscale/input: add rgbaf16 input support 2022-08-19 22:09:36 +02:00
swscale_internal.h swscale/la: Optimize hscale functions with lasx. 2022-09-10 22:56:38 +02:00
swscale_unscaled.c swscale: add GBRAP14 format support 2023-09-28 19:37:58 +02:00
swscale.c swscale: fix sws_setColorspaceDetails after sws_init_context 2023-11-09 12:53:35 +01:00
swscale.h swscale: document some missing arguments 2022-10-17 09:56:47 +02:00
swscaleres.rc
utils.c swscale: fix sws_setColorspaceDetails after sws_init_context 2023-11-09 12:53:35 +01:00
version_major.h Bump major versions of all libraries 2023-02-09 15:35:14 +01:00
version.c lib*/version: Move library version functions into files of their own 2022-05-10 06:49:32 +02:00
version.h Bump versions after 6.1 2023-10-29 16:19:14 +01:00
vscale.c Replace all occurences of av_mallocz_array() by av_calloc() 2021-09-20 01:03:52 +02:00
yuv2rgb.c swscale/la: Add yuv2rgb_lasx.c and rgb2rgb_lasx.c files 2022-09-10 22:56:38 +02:00