summaryrefslogtreecommitdiff
path: root/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch')
-rw-r--r--media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch b/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch
new file mode 100644
index 000000000000..f3b5c7b36b50
--- /dev/null
+++ b/media-libs/opencv/files/opencv-4.9.0-cuda-12.4.patch
@@ -0,0 +1,70 @@
+From: https://gitlab.archlinux.org/archlinux/packaging/packages/opencv/-/blob/main/fix-nppi-bufsize-type.patch?ref_type=heads
+--- a/modules/cudaarithm/src/reductions.cpp 2023-12-26 22:24:58.000000000 +0100
++++ b/modules/cudaarithm/src/reductions.cpp 2024-03-18 16:51:32.108049155 +0100
+@@ -151,7 +151,7 @@
+ sz.width = gsrc.cols;
+ sz.height = gsrc.rows;
+
+- int bufSize;
++ size_t bufSize;
+ #if (CUDA_VERSION <= 4020)
+ nppSafeCall( nppiMeanStdDev8uC1RGetBufferHostSize(sz, &bufSize) );
+ #else
+@@ -227,7 +227,7 @@
+ sz.width = gsrc.cols;
+ sz.height = gsrc.rows;
+
+- int bufSize;
++ size_t bufSize;
+ #if (CUDA_VERSION <= 4020)
+ nppSafeCall( nppiMeanStdDev8uC1MRGetBufferHostSize(sz, &bufSize) );
+ #else
+--- a/modules/cudaimgproc/src/histogram.cpp 2023-12-26 22:24:58.000000000 +0100
++++ b/modules/cudaimgproc/src/histogram.cpp 2024-03-18 17:51:37.005208948 +0100
+@@ -281,8 +281,8 @@
+
+ namespace
+ {
+- typedef NppStatus (*get_buf_size_c1_t)(NppiSize oSizeROI, int nLevels, int* hpBufferSize);
+- typedef NppStatus (*get_buf_size_c4_t)(NppiSize oSizeROI, int nLevels[], int* hpBufferSize);
++ typedef NppStatus (*get_buf_size_c1_t)(NppiSize oSizeROI, int nLevels, size_t* hpBufferSize);
++ typedef NppStatus (*get_buf_size_c4_t)(NppiSize oSizeROI, int nLevels[], size_t* hpBufferSize);
+
+ template<int SDEPTH> struct NppHistogramEvenFuncC1
+ {
+@@ -315,7 +315,7 @@
+ sz.width = src.cols;
+ sz.height = src.rows;
+
+- int buf_size;
++ size_t buf_size;
+ get_buf_size(sz, levels, &buf_size);
+
+ BufferPool pool(stream);
+@@ -349,7 +349,7 @@
+
+ Npp32s* pHist[] = {hist[0].ptr<Npp32s>(), hist[1].ptr<Npp32s>(), hist[2].ptr<Npp32s>(), hist[3].ptr<Npp32s>()};
+
+- int buf_size;
++ size_t buf_size;
+ get_buf_size(sz, levels, &buf_size);
+
+ BufferPool pool(stream);
+@@ -419,7 +419,7 @@
+ sz.width = src.cols;
+ sz.height = src.rows;
+
+- int buf_size;
++ size_t buf_size;
+ get_buf_size(sz, levels.cols, &buf_size);
+
+ BufferPool pool(stream);
+@@ -460,7 +460,7 @@
+ sz.width = src.cols;
+ sz.height = src.rows;
+
+- int buf_size;
++ size_t buf_size;
+ get_buf_size(sz, nLevels, &buf_size);
+
+ BufferPool pool(stream);