public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-compat/files/, media-video/ffmpeg-compat/
@ 2025-08-05 15:50 Ionen Wolkens
  0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2025-08-05 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     2e0371b225a3a1f3485bce3d2460103901cae229
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  5 14:54:43 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Aug  5 15:44:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e0371b2

media-video/ffmpeg-compat: sync with ffmpeg

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild    |   1 +
 .../ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch   | 120 +++++++++++++++++++++
 2 files changed, 121 insertions(+)

diff --git a/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild b/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild
index 50b44d0ddbdc..29eae7cb290a 100644
--- a/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild
+++ b/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild
@@ -331,6 +331,7 @@ MULTILIB_WRAPPED_HEADERS=(
 
 PATCHES=(
 	"${WORKDIR}"/patches
+	"${FILESDIR}"/ffmpeg-7.1.1-npp13.patch
 )
 
 pkg_pretend() {

diff --git a/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch b/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch
new file mode 100644
index 000000000000..d7a27382b885
--- /dev/null
+++ b/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch
@@ -0,0 +1,120 @@
+Non-_Ctx functions been deprecated for some time and
+>=nvidia-cuda-toolkit-13.0.0 removes the old functions.
+
+Just a quick fix (written by me), not familiar with npp but should
+work. Given we don't support old NPP that lacked _Ctx in Gentoo,
+there should be no need to keep the old calls in this quick fix.
+
+Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
+--- a/libavfilter/vf_scale_npp.c
++++ b/libavfilter/vf_scale_npp.c
+@@ -710,11 +710,13 @@
+     AVHWFramesContext *in_frames_ctx = (AVHWFramesContext*)in->hw_frames_ctx->data;
+     NppStatus err;
++    NppStreamContext nppStreamCtx;
++    nppStreamCtx.hStream = NULL; // default stream
+ 
+     switch (in_frames_ctx->sw_format) {
+     case AV_PIX_FMT_NV12:
+-        err = nppiYCbCr420_8u_P2P3R(in->data[0], in->linesize[0],
++        err = nppiYCbCr420_8u_P2P3R_Ctx(in->data[0], in->linesize[0],
+                                     in->data[1], in->linesize[1],
+                                     out->data, out->linesize,
+-                                    (NppiSize){ in->width, in->height });
++                                    (NppiSize){ in->width, in->height }, nppStreamCtx);
+         break;
+     default:
+@@ -734,4 +736,6 @@
+     NPPScaleContext *s = ctx->priv;
+     NppStatus err;
++    NppStreamContext nppStreamCtx;
++    nppStreamCtx.hStream = NULL; // default stream
+     int i;
+ 
+@@ -742,10 +746,10 @@
+         int oh = stage->planes_out[i].height;
+ 
+-        err = nppiResizeSqrPixel_8u_C1R(in->data[i], (NppiSize){ iw, ih },
++        err = nppiResizeSqrPixel_8u_C1R_Ctx(in->data[i], (NppiSize){ iw, ih },
+                                         in->linesize[i], (NppiRect){ 0, 0, iw, ih },
+                                         out->data[i], out->linesize[i],
+                                         (NppiRect){ 0, 0, ow, oh },
+                                         (double)ow / iw, (double)oh / ih,
+-                                        0.0, 0.0, s->interp_algo);
++                                        0.0, 0.0, s->interp_algo, nppStreamCtx);
+         if (err != NPP_SUCCESS) {
+             av_log(ctx, AV_LOG_ERROR, "NPP resize error: %d\n", err);
+@@ -762,12 +766,14 @@
+     AVHWFramesContext *out_frames_ctx = (AVHWFramesContext*)out->hw_frames_ctx->data;
+     NppStatus err;
++    NppStreamContext nppStreamCtx;
++    nppStreamCtx.hStream = NULL; // default stream
+ 
+     switch (out_frames_ctx->sw_format) {
+     case AV_PIX_FMT_NV12:
+-        err = nppiYCbCr420_8u_P3P2R((const uint8_t**)in->data,
++        err = nppiYCbCr420_8u_P3P2R_Ctx((const uint8_t**)in->data,
+                                     in->linesize,
+                                     out->data[0], out->linesize[0],
+                                     out->data[1], out->linesize[1],
+-                                    (NppiSize){ in->width, in->height });
++                                    (NppiSize){ in->width, in->height }, nppStreamCtx);
+         break;
+     default:
+--- a/libavfilter/vf_sharpen_npp.c
++++ b/libavfilter/vf_sharpen_npp.c
+@@ -159,4 +159,6 @@
+     AVHWFramesContext* in_ctx = (AVHWFramesContext*)inl->hw_frames_ctx->data;
+     NPPSharpenContext* s = ctx->priv;
++    NppStreamContext nppStreamCtx;
++    nppStreamCtx.hStream = NULL; // default stream
+ 
+     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(in_ctx->sw_format);
+@@ -166,7 +168,7 @@
+         int oh = AV_CEIL_RSHIFT(in->height, (i == 1 || i == 2) ? desc->log2_chroma_h : 0);
+ 
+-        NppStatus err = nppiFilterSharpenBorder_8u_C1R(
++        NppStatus err = nppiFilterSharpenBorder_8u_C1R_Ctx(
+             in->data[i], in->linesize[i], (NppiSize){ow, oh}, (NppiPoint){0, 0},
+-            out->data[i], out->linesize[i], (NppiSize){ow, oh}, s->border_type);
++            out->data[i], out->linesize[i], (NppiSize){ow, oh}, s->border_type, nppStreamCtx);
+         if (err != NPP_SUCCESS) {
+             av_log(ctx, AV_LOG_ERROR, "NPP sharpen error: %d\n", err);
+--- a/libavfilter/vf_transpose_npp.c
++++ b/libavfilter/vf_transpose_npp.c
+@@ -295,4 +295,6 @@
+     NPPTransposeContext *s = ctx->priv;
+     NppStatus err;
++    NppStreamContext nppStreamCtx;
++    nppStreamCtx.hStream = NULL; // default stream
+     int i;
+ 
+@@ -310,9 +312,9 @@
+         int shifth = (s->dir == NPP_TRANSPOSE_CCLOCK || s->dir == NPP_TRANSPOSE_CLOCK_FLIP) ? oh - 1 : 0;
+ 
+-        err = nppiRotate_8u_C1R(in->data[i], (NppiSize){ iw, ih },
++        err = nppiRotate_8u_C1R_Ctx(in->data[i], (NppiSize){ iw, ih },
+                                 in->linesize[i], (NppiRect){ 0, 0, iw, ih },
+                                 out->data[i], out->linesize[i],
+                                 (NppiRect){ 0, 0, ow, oh },
+-                                angle, shiftw, shifth, NPPI_INTER_NN);
++                                angle, shiftw, shifth, NPPI_INTER_NN, nppStreamCtx);
+         if (err != NPP_SUCCESS) {
+             av_log(ctx, AV_LOG_ERROR, "NPP rotate error: %d\n", err);
+@@ -328,4 +330,6 @@
+ {
+     NppStatus err;
++    NppStreamContext nppStreamCtx;
++    nppStreamCtx.hStream = NULL; // default stream
+     int i;
+ 
+@@ -334,7 +338,7 @@
+         int ih = stage->planes_in[i].height;
+ 
+-        err = nppiTranspose_8u_C1R(in->data[i], in->linesize[i],
++        err = nppiTranspose_8u_C1R_Ctx(in->data[i], in->linesize[i],
+                                    out->data[i], out->linesize[i],
+-                                   (NppiSize){ iw, ih });
++                                   (NppiSize){ iw, ih }, nppStreamCtx);
+         if (err != NPP_SUCCESS) {
+             av_log(ctx, AV_LOG_ERROR, "NPP transpose error: %d\n", err);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-compat/files/, media-video/ffmpeg-compat/
@ 2025-08-13  8:15 Ionen Wolkens
  0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2025-08-13  8:15 UTC (permalink / raw
  To: gentoo-commits

commit:     e984419152d3e72c06e700dc8674a579dbad72b4
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 13 07:57:23 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Aug 13 08:14:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9844191

media-video/ffmpeg-compat: sync with ffmpeg

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 media-video/ffmpeg-compat/Manifest                 |   4 +-
 .../ffmpeg-compat/ffmpeg-compat-4.4.6-r1.ebuild    |   3 +-
 .../ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild    |   3 +-
 .../files/ffmpeg-7.1.1-libv4l-1.30.patch           |  22 ----
 .../ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch   | 120 ---------------------
 5 files changed, 4 insertions(+), 148 deletions(-)

diff --git a/media-video/ffmpeg-compat/Manifest b/media-video/ffmpeg-compat/Manifest
index 5e2f12d7e8da..2e1a04d413bb 100644
--- a/media-video/ffmpeg-compat/Manifest
+++ b/media-video/ffmpeg-compat/Manifest
@@ -1,10 +1,10 @@
 DIST ffmpeg-4.4-patchset-1.tar.xz 9916 BLAKE2B 9b41de6b048601f2af41864c3262b3348330f792eea71df4cfab5e740626ee6c633ac5569e6e91d953143f6ad0fac15c840ef0643925e91261f8b4a32e2d386c SHA512 b11d9e182ddb0a48f50d63f5e0bd7fd99f4b8fa7dd17179a3bfbc9419dabb76401408a81ae2d5f118fbf67f28dcfdc3bfb5b7ac70f740259e3ebad8d1ba049bb
-DIST ffmpeg-4.4-patchset-2.tar.xz 9296 BLAKE2B ebc86b4fa29c02e3a1b72d6ae0ad59d7b1b5f77352ef7680dc97218a053eff43fdbd8005172241bbef8c903d0598d01b1b954ab16c8c5e48e99b50c59883016a SHA512 ec71e57eb620ae74d5602e7fc0dd9684b71c213cfa0544dd71193b486bbcbb7ff06d4e61c8dfadca5488e81cc328e3dbd8be3febac6efa5df363c5b51c43a293
+DIST ffmpeg-4.4-patchset-3.tar.xz 8960 BLAKE2B 30ba0829392abba2c0bcf2ac57c42dc739f4dec610cbf2be51ea8e54646c02dc66d1527c613a547600c735843197c266a68153550b3478c21d0fd69c94e22911 SHA512 deabfa31356ec8d3c2ec4f88d9a482238e4491f229017e64b2a0c72e3d5b81ecd72e020a2d527dcd51257d94ad6d6d6bd178b5beedc79f012f414ae170a138b4
 DIST ffmpeg-4.4.5.tar.xz 9575596 BLAKE2B 546df09f7731d22e532a18d9ba9be184283f62b7a2e9470e745e536802bc2263a00f11ed6ab0aee8fc60c5f728826311cbf3542084ba3a64b65a61d76295cd64 SHA512 70df4e63ef507a7ec76da34438142499139769728fd5130d9cf48d56c110ec82c3d6a7e6d1622da03c70167fa861d901d016bbe52c21d2b284b8a0d9f30811dc
 DIST ffmpeg-4.4.5.tar.xz.asc 520 BLAKE2B 505987208ed58b548f910299adb1324e6eba655cc37e6f03cac32c8623e16a4a884e822c745fb72b1934129a8c0a2706bb8bfb785715e6a68e43f737cb8ed365 SHA512 bcfee8986681dfbefd3add741fcbbc5e223bb06c9800797e68fde968c114055ac3fc02ce8731ed269bf30c92d6c990c7f636f82d42379920012e8a0ace8d527e
 DIST ffmpeg-4.4.6.tar.xz 9575932 BLAKE2B c025f9b020b9881d5b00455a42aa9a591fa18c5b2010cf3ee4af6d5242ab0b28e18f05d43e0416ba280bbb1393cfeaf4aaadc0e7258bd0c9578720fd7a9052d9 SHA512 3805c5ff4661217cd2f85a7443a796b9dece67b6eba7686f5f348a1c6c4c678d26f97f9674bb9552b74cfa5bffaf8048885e57e765ad3e09a31274172c57725b
 DIST ffmpeg-4.4.6.tar.xz.asc 520 BLAKE2B 6b16c806af2df78452c17cc81d254ba96056a2aeee24f41d17030aa268cd0176b94e72845092eef2c78fc436d91c881fa076155eadd9925726e478fbb2fb271c SHA512 dc07824da6ce364cc3010cfc90a3f79f60be3ede454d5844a8d06f0a6fa0f7c2881e32d71c54488c0ec8edb3191aedde9a0302e95cb233b96ac219833c48a094
-DIST ffmpeg-6.1-patchset-1.tar.xz 11296 BLAKE2B 5227d0c7f52a4f217d5517da11c2327585375c9d860f31415e1079f4f1f9186637e07c7da0e168c732cc7abb953440f0ba952395db83074588eb31bee1d5bc9f SHA512 20fe94536a5c3873d0126ff535a3bff595dedc7787162f160ecde6cbd357b9eb3749c9d7b7543aa39896ceb4e656494d31811bf26682776cdfc693fe030cd77b
+DIST ffmpeg-6.1-patchset-2.tar.xz 11632 BLAKE2B b4a414825daa74315ab1a5d50dffa13f3ac08565fd8f954a6f031ec0b01a32762af89a14624c0ab9414a6be411de8fa345b75240a2b31e8adc69dbab230b8e34 SHA512 d1be8acae3a2b03993e530737819bc6c85fcf970eddedf93ae99f2a7206876e7b2525842c177d07db8c878fd22490a1c00861580ad158dccd21ed6518d039a48
 DIST ffmpeg-6.1.2.tar.xz 10466152 BLAKE2B ff1f2b2bb60ccc4c37b6ffda2a0e6a0be80c451dc99f6d4a99bd95a1bdc44c494d62377c53383ccfb5b818573a1971948d7db34119099dbc56d7258724831d3c SHA512 3a009184d971fc3168e1322d1d724aae787ed0e9c152d8d1813ea0b9099bda3b35c41fcabbd7b140560e7a8fa9fa1ffd7f0938432d5d498c43829fc6cc3d9e08
 DIST ffmpeg-6.1.2.tar.xz.asc 520 BLAKE2B f26a2d6f5423f93090f2a448172e49f3858aeb5a00f326207d374bbb70fa8942c7ee1a7c55338b2db664b647c983cd5ab4fd8d71efe5c37af4c90385ca17d0ab SHA512 a26dba1f4870b964080b45f8468f5ce3591eb6aa69be426bf4afbe5a60c3cbd0fe5056dc86ca7bb817c04ae30d39160cb7773772a9a2123ae7f095b18a6d7050
 DIST ffmpeg-rpi-6.1-r3.patch 800738 BLAKE2B b7e449ee5eec8b50a3b3bba233c5269f3b6845dbd18a619b844c841a97345ce24c7a5d7f4da05b08e3cb49668426b9044f3d3553d9c2ef3a50aec7199bfa3c09 SHA512 aeaf12afabf5f2192fb0b6ef47397d8477b109e49cee8c02a890d1656a27b1985c62c719ef72966d8c97b0709918233b65ea2e0ef988771507e4be137fcd9158

diff --git a/media-video/ffmpeg-compat/ffmpeg-compat-4.4.6-r1.ebuild b/media-video/ffmpeg-compat/ffmpeg-compat-4.4.6-r1.ebuild
index 77eb33dbf920..ba95ac9c6d7c 100644
--- a/media-video/ffmpeg-compat/ffmpeg-compat-4.4.6-r1.ebuild
+++ b/media-video/ffmpeg-compat/ffmpeg-compat-4.4.6-r1.ebuild
@@ -18,7 +18,7 @@ else
 	SRC_URI="
 		https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz
 		verify-sig? ( https://ffmpeg.org/releases/ffmpeg-${PV}.tar.xz.asc )
-		https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-2.tar.xz
+		https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-3.tar.xz
 	"
 	S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat
 	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ~ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
@@ -291,7 +291,6 @@ MULTILIB_WRAPPED_HEADERS=(
 
 PATCHES=(
 	"${WORKDIR}"/patches
-	"${FILESDIR}"/ffmpeg-7.1.1-libv4l-1.30.patch
 )
 
 pkg_pretend() {

diff --git a/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild b/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild
index d0cf2139f99c..65e35c1e2955 100644
--- a/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild
+++ b/media-video/ffmpeg-compat/ffmpeg-compat-6.1.2-r2.ebuild
@@ -22,7 +22,7 @@ else
 		${FFMPEG_SOC_PATCH:+"
 			soc? ( https://dev.gentoo.org/~chewi/distfiles/${FFMPEG_SOC_PATCH} )
 		"}
-		https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-1.tar.xz
+		https://dev.gentoo.org/~ionen/distfiles/ffmpeg-$(ver_cut 1-2)-patchset-2.tar.xz
 	"
 	S=${WORKDIR}/ffmpeg-${PV} # avoid ${P} for ffmpeg-compat
 	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
@@ -334,7 +334,6 @@ MULTILIB_WRAPPED_HEADERS=(
 
 PATCHES=(
 	"${WORKDIR}"/patches
-	"${FILESDIR}"/ffmpeg-7.1.1-npp13.patch
 )
 
 pkg_pretend() {

diff --git a/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-libv4l-1.30.patch b/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-libv4l-1.30.patch
deleted file mode 100644
index 0b372e0c48fc..000000000000
--- a/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-libv4l-1.30.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://bugs.gentoo.org/961205
-https://trac.ffmpeg.org/ticket/11570
-https://github.com/FFmpeg/FFmpeg/commit/5fea5e3e11d6
---- a/configure
-+++ b/configure
-@@ -2524,3 +2524,3 @@
-     pod2man
--    posix_ioctl
-+    ioctl_posix
-     texi2html
-@@ -7183,3 +7183,3 @@
- test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
--test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl
-+test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable ioctl_posix
- 
---- a/libavdevice/v4l2.c
-+++ b/libavdevice/v4l2.c
-@@ -113,3 +113,3 @@
-     int (*dup_f)(int fd);
--#if HAVE_POSIX_IOCTL
-+#if HAVE_IOCTL_POSIX
-     int (*ioctl_f)(int fd, int request, ...);

diff --git a/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch b/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch
deleted file mode 100644
index d7a27382b885..000000000000
--- a/media-video/ffmpeg-compat/files/ffmpeg-7.1.1-npp13.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-Non-_Ctx functions been deprecated for some time and
->=nvidia-cuda-toolkit-13.0.0 removes the old functions.
-
-Just a quick fix (written by me), not familiar with npp but should
-work. Given we don't support old NPP that lacked _Ctx in Gentoo,
-there should be no need to keep the old calls in this quick fix.
-
-Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
---- a/libavfilter/vf_scale_npp.c
-+++ b/libavfilter/vf_scale_npp.c
-@@ -710,11 +710,13 @@
-     AVHWFramesContext *in_frames_ctx = (AVHWFramesContext*)in->hw_frames_ctx->data;
-     NppStatus err;
-+    NppStreamContext nppStreamCtx;
-+    nppStreamCtx.hStream = NULL; // default stream
- 
-     switch (in_frames_ctx->sw_format) {
-     case AV_PIX_FMT_NV12:
--        err = nppiYCbCr420_8u_P2P3R(in->data[0], in->linesize[0],
-+        err = nppiYCbCr420_8u_P2P3R_Ctx(in->data[0], in->linesize[0],
-                                     in->data[1], in->linesize[1],
-                                     out->data, out->linesize,
--                                    (NppiSize){ in->width, in->height });
-+                                    (NppiSize){ in->width, in->height }, nppStreamCtx);
-         break;
-     default:
-@@ -734,4 +736,6 @@
-     NPPScaleContext *s = ctx->priv;
-     NppStatus err;
-+    NppStreamContext nppStreamCtx;
-+    nppStreamCtx.hStream = NULL; // default stream
-     int i;
- 
-@@ -742,10 +746,10 @@
-         int oh = stage->planes_out[i].height;
- 
--        err = nppiResizeSqrPixel_8u_C1R(in->data[i], (NppiSize){ iw, ih },
-+        err = nppiResizeSqrPixel_8u_C1R_Ctx(in->data[i], (NppiSize){ iw, ih },
-                                         in->linesize[i], (NppiRect){ 0, 0, iw, ih },
-                                         out->data[i], out->linesize[i],
-                                         (NppiRect){ 0, 0, ow, oh },
-                                         (double)ow / iw, (double)oh / ih,
--                                        0.0, 0.0, s->interp_algo);
-+                                        0.0, 0.0, s->interp_algo, nppStreamCtx);
-         if (err != NPP_SUCCESS) {
-             av_log(ctx, AV_LOG_ERROR, "NPP resize error: %d\n", err);
-@@ -762,12 +766,14 @@
-     AVHWFramesContext *out_frames_ctx = (AVHWFramesContext*)out->hw_frames_ctx->data;
-     NppStatus err;
-+    NppStreamContext nppStreamCtx;
-+    nppStreamCtx.hStream = NULL; // default stream
- 
-     switch (out_frames_ctx->sw_format) {
-     case AV_PIX_FMT_NV12:
--        err = nppiYCbCr420_8u_P3P2R((const uint8_t**)in->data,
-+        err = nppiYCbCr420_8u_P3P2R_Ctx((const uint8_t**)in->data,
-                                     in->linesize,
-                                     out->data[0], out->linesize[0],
-                                     out->data[1], out->linesize[1],
--                                    (NppiSize){ in->width, in->height });
-+                                    (NppiSize){ in->width, in->height }, nppStreamCtx);
-         break;
-     default:
---- a/libavfilter/vf_sharpen_npp.c
-+++ b/libavfilter/vf_sharpen_npp.c
-@@ -159,4 +159,6 @@
-     AVHWFramesContext* in_ctx = (AVHWFramesContext*)inl->hw_frames_ctx->data;
-     NPPSharpenContext* s = ctx->priv;
-+    NppStreamContext nppStreamCtx;
-+    nppStreamCtx.hStream = NULL; // default stream
- 
-     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(in_ctx->sw_format);
-@@ -166,7 +168,7 @@
-         int oh = AV_CEIL_RSHIFT(in->height, (i == 1 || i == 2) ? desc->log2_chroma_h : 0);
- 
--        NppStatus err = nppiFilterSharpenBorder_8u_C1R(
-+        NppStatus err = nppiFilterSharpenBorder_8u_C1R_Ctx(
-             in->data[i], in->linesize[i], (NppiSize){ow, oh}, (NppiPoint){0, 0},
--            out->data[i], out->linesize[i], (NppiSize){ow, oh}, s->border_type);
-+            out->data[i], out->linesize[i], (NppiSize){ow, oh}, s->border_type, nppStreamCtx);
-         if (err != NPP_SUCCESS) {
-             av_log(ctx, AV_LOG_ERROR, "NPP sharpen error: %d\n", err);
---- a/libavfilter/vf_transpose_npp.c
-+++ b/libavfilter/vf_transpose_npp.c
-@@ -295,4 +295,6 @@
-     NPPTransposeContext *s = ctx->priv;
-     NppStatus err;
-+    NppStreamContext nppStreamCtx;
-+    nppStreamCtx.hStream = NULL; // default stream
-     int i;
- 
-@@ -310,9 +312,9 @@
-         int shifth = (s->dir == NPP_TRANSPOSE_CCLOCK || s->dir == NPP_TRANSPOSE_CLOCK_FLIP) ? oh - 1 : 0;
- 
--        err = nppiRotate_8u_C1R(in->data[i], (NppiSize){ iw, ih },
-+        err = nppiRotate_8u_C1R_Ctx(in->data[i], (NppiSize){ iw, ih },
-                                 in->linesize[i], (NppiRect){ 0, 0, iw, ih },
-                                 out->data[i], out->linesize[i],
-                                 (NppiRect){ 0, 0, ow, oh },
--                                angle, shiftw, shifth, NPPI_INTER_NN);
-+                                angle, shiftw, shifth, NPPI_INTER_NN, nppStreamCtx);
-         if (err != NPP_SUCCESS) {
-             av_log(ctx, AV_LOG_ERROR, "NPP rotate error: %d\n", err);
-@@ -328,4 +330,6 @@
- {
-     NppStatus err;
-+    NppStreamContext nppStreamCtx;
-+    nppStreamCtx.hStream = NULL; // default stream
-     int i;
- 
-@@ -334,7 +338,7 @@
-         int ih = stage->planes_in[i].height;
- 
--        err = nppiTranspose_8u_C1R(in->data[i], in->linesize[i],
-+        err = nppiTranspose_8u_C1R_Ctx(in->data[i], in->linesize[i],
-                                    out->data[i], out->linesize[i],
--                                   (NppiSize){ iw, ih });
-+                                   (NppiSize){ iw, ih }, nppStreamCtx);
-         if (err != NPP_SUCCESS) {
-             av_log(ctx, AV_LOG_ERROR, "NPP transpose error: %d\n", err);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-13  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 15:50 [gentoo-commits] repo/gentoo:master commit in: media-video/ffmpeg-compat/files/, media-video/ffmpeg-compat/ Ionen Wolkens
  -- strict thread matches above, loose matches on Subject: below --
2025-08-13  8:15 Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox