1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

configure: allow disabling experimental swscale code

In theory we can also expand this to disable e.g. experimental codecs.
This commit is contained in:
Niklas Haas
2025-07-14 10:39:00 +02:00
parent cc42bc1f4b
commit 4ec2bffe62
5 changed files with 19 additions and 7 deletions

4
configure vendored
View File

@@ -108,6 +108,7 @@ Configuration options:
--disable-runtime-cpudetect disable detecting CPU capabilities at runtime (smaller binary)
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
--enable-unstable enable building optional unstable / experimental code
--disable-all disable building components, libraries and programs
--disable-autodetect disable automatically detected external libraries [no]
@@ -2073,6 +2074,7 @@ FEATURE_LIST="
small
static
swscale_alpha
unstable
"
# this list should be kept in linking order
@@ -4135,7 +4137,7 @@ avutil_suggest="clock_gettime ffnvcodec gcrypt libm libdrm libmfx opencl openssl
swresample_deps="avutil"
swresample_suggest="libm libsoxr stdatomic"
swscale_deps="avutil"
swscale_suggest="libm stdatomic"
swscale_suggest="libm stdatomic unstable"
avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs liblcevc_dec_extralibs lcms2_extralibs"
avfilter_extralibs="pthreads_extralibs"

View File

@@ -15,11 +15,6 @@ OBJS = alphablend.o \
graph.o \
input.o \
lut3d.o \
ops.o \
ops_backend.o \
ops_chain.o \
ops_memcpy.o \
ops_optimizer.o \
options.o \
output.o \
rgb2rgb.o \
@@ -31,6 +26,13 @@ OBJS = alphablend.o \
yuv2rgb.o \
vscale.o \
OBJS-$(CONFIG_UNSTABLE) += \
ops.o \
ops_backend.o \
ops_chain.o \
ops_memcpy.o \
ops_optimizer.o \
# Objects duplicated from other libraries for shared builds
SHLIBOBJS += log2_tab.o half2float.o

View File

@@ -605,6 +605,8 @@ int sws_is_noop(const AVFrame *dst, const AVFrame *src)
return 1;
}
#if CONFIG_UNSTABLE
/* Returns the type suitable for a pixel after fully decoding/unpacking it */
static SwsPixelType fmt_pixel_type(enum AVPixelFormat fmt)
{
@@ -1536,3 +1538,5 @@ int ff_sws_encode_colors(SwsContext *ctx, SwsPixelType type,
.convert.to = fmt_pixel_type(fmt.format),
});
}
#endif /* CONFIG_UNSTABLE */

View File

@@ -463,6 +463,7 @@ static int add_legacy_sws_pass(SwsGraph *graph, SwsFormat src, SwsFormat dst,
* Format conversion *
*********************/
#if CONFIG_UNSTABLE
static int add_convert_pass(SwsGraph *graph, SwsFormat src, SwsFormat dst,
SwsPass *input, SwsPass **output)
{
@@ -536,6 +537,9 @@ fail:
return add_legacy_sws_pass(graph, src, dst, input, output);
return ret;
}
#else
#define add_convert_pass add_legacy_sws_pass
#endif
/**************************

View File

@@ -18,7 +18,7 @@ X86ASM-OBJS += x86/input.o \
x86/yuv2yuvX.o \
ifdef ARCH_X86_64
X86ASM-OBJS += x86/ops_int.o \
X86ASM-OBJS-$(CONFIG_UNSTABLE) += x86/ops_int.o \
x86/ops_float.o \
x86/ops.o
endif