From: Timo Rothenpieler via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Cc: Timo Rothenpieler <code@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] deprecate support for libnpp (PR #20554) Date: Fri, 19 Sep 2025 15:55:33 -0000 Message-ID: <175829733426.25.3665524427903177912@463a07221176> (raw) PR #20554 opened by Timo Rothenpieler (BtbN) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20554 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20554.patch libnpp is a closed source proprietary library, and for most of its functionality, proper open source functionality via CUDA kernel based filters already exists, or can relatively easily be implemented. The latest version of libnpp broke API compatibility. So instead of putting in effort to track support for multiple API versions, let's just deprecate support for it. >From 3908072fe84458ed146e71beb5310c4fc93644e4 Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler <timo@rothenpieler.org> Date: Fri, 19 Sep 2025 17:35:29 +0200 Subject: [PATCH] configure: deprecate support for libnpp --- configure | 8 ++++++-- libavfilter/version_major.h | 1 + libavfilter/vf_scale_npp.c | 2 ++ libavfilter/vf_sharpen_npp.c | 2 ++ libavfilter/vf_transpose_npp.c | 2 ++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 8def62a5d9..32d114a533 100755 --- a/configure +++ b/configure @@ -7172,9 +7172,13 @@ enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine || require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; } -enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif || +enabled libnpp && { test_cpp_condition "$(cd "$source_path"; pwd)/libavfilter/version_major.h" FF_API_LIBNPP_SUPPORT || + die "ERROR: libnpp support is removed in this version"; } && + { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif || check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppif -lnppc -lnppidei || - die "ERROR: libnpp not found"; } + die "ERROR: libnpp not found"; } && + { check_func_headers "nppi.h" nppiYCbCr420_8u_P2P3R $libnpp_extralibs || + die "ERROR: libnpp support is deprecated, version 13.0 and up are not supported"; } enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && { check_headers opencv2/core/core_c.h && diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h index af6f59832f..539d5caa3d 100644 --- a/libavfilter/version_major.h +++ b/libavfilter/version_major.h @@ -37,5 +37,6 @@ #define FF_API_BUFFERSINK_OPTS (LIBAVFILTER_VERSION_MAJOR < 12) #define FF_API_CONTEXT_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 12) +#define FF_API_LIBNPP_SUPPORT (LIBAVFILTER_VERSION_MAJOR < 12) #endif /* AVFILTER_VERSION_MAJOR_H */ diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 1b1b7b9fc9..0529db3a29 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter/vf_scale_npp.c @@ -281,6 +281,8 @@ static av_cold int nppscale_init(AVFilterContext* ctx) NPPScaleContext* scale = ctx->priv; int i, ret; + av_log(ctx, AV_LOG_WARNING, "The libnpp based filters are deprecated.\n"); + if (!strcmp(scale->format_str, "same")) { scale->format = AV_PIX_FMT_NONE; } else { diff --git a/libavfilter/vf_sharpen_npp.c b/libavfilter/vf_sharpen_npp.c index c7769f5837..3ec74f8c0c 100644 --- a/libavfilter/vf_sharpen_npp.c +++ b/libavfilter/vf_sharpen_npp.c @@ -53,6 +53,8 @@ static int nppsharpen_init(AVFilterContext* ctx) { NPPSharpenContext* s = ctx->priv; + av_log(ctx, AV_LOG_WARNING, "The libnpp based filters are deprecated.\n"); + s->own_frame = av_frame_alloc(); if (!s->own_frame) goto fail; diff --git a/libavfilter/vf_transpose_npp.c b/libavfilter/vf_transpose_npp.c index e781d7c58b..2315b1043a 100644 --- a/libavfilter/vf_transpose_npp.c +++ b/libavfilter/vf_transpose_npp.c @@ -85,6 +85,8 @@ static int npptranspose_init(AVFilterContext *ctx) NPPTransposeContext *s = ctx->priv; int i; + av_log(ctx, AV_LOG_WARNING, "The libnpp based filters are deprecated.\n"); + for (i = 0; i < FF_ARRAY_ELEMS(s->stages); i++) { s->stages[i].frame = av_frame_alloc(); if (!s->stages[i].frame) -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2025-09-19 15:55 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=175829733426.25.3665524427903177912@463a07221176 \ --to=ffmpeg-devel@ffmpeg.org \ --cc=code@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git