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:
@@ -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>(),
|
||||
|
||||
Reference in New Issue
Block a user