1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

fixed bugs in page locked memory allocation

avoid extra gpu memory allocation in BP and CSBP
This commit is contained in:
Anatoly Baksheev
2010-08-17 10:39:18 +00:00
parent ba713f28f9
commit 9a669b1ceb
6 changed files with 95 additions and 100 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ static void csbp_operator(StereoConstantSpaceBP& rthis, GpuMat u[2], GpuMat d[2]
if (disp.empty())
disp.create(rows, cols, CV_16S);
out = ((disp.type() == CV_16S) ? disp : GpuMat(rows, cols, CV_16S));
out = ((disp.type() == CV_16S) ? disp : (out.create(rows, cols, CV_16S), out));
out = zero;
csbp::compute_disp(u[cur_idx].ptr<T>(), d[cur_idx].ptr<T>(), l[cur_idx].ptr<T>(), r[cur_idx].ptr<T>(),