diff options
author | Niklas Haas <git@haasn.dev> | 2025-07-14 10:39:00 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2025-09-01 19:28:36 +0200 |
commit | 4ec2bffe62b1caa6ed2104795e8a7ebc422997a4 (patch) | |
tree | 8f452a5319aac0b94d35f33277fcaf31a8276d34 | |
parent | cc42bc1f4bf228e19293e61d9ddf68ff42952599 (diff) | |
download | ffmpeg-4ec2bffe62b1caa6ed2104795e8a7ebc422997a4.tar.gz |
configure: allow disabling experimental swscale code
In theory we can also expand this to disable e.g. experimental codecs.
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | libswscale/Makefile | 12 | ||||
-rw-r--r-- | libswscale/format.c | 4 | ||||
-rw-r--r-- | libswscale/graph.c | 4 | ||||
-rw-r--r-- | libswscale/x86/Makefile | 2 |
5 files changed, 19 insertions, 7 deletions
@@ -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" diff --git a/libswscale/Makefile b/libswscale/Makefile index d3009c7f21..a096ed331e 100644 --- a/libswscale/Makefile +++ b/libswscale/Makefile @@ -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 diff --git a/libswscale/format.c b/libswscale/format.c index 5c5ecfb807..9741688e98 100644 --- a/libswscale/format.c +++ b/libswscale/format.c @@ -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 */ diff --git a/libswscale/graph.c b/libswscale/graph.c index d56793aac9..0a79b17f89 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -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 /************************** diff --git a/libswscale/x86/Makefile b/libswscale/x86/Makefile index f1d6255549..f82b411fb1 100644 --- a/libswscale/x86/Makefile +++ b/libswscale/x86/Makefile @@ -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 |