1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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);
|