[opencv] 29/33: fix for gpu::StereoBeliefPropogation:

Mattia Rizzolo mattia at debian.org
Tue Oct 4 17:51:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 2.4.12.2
in repository opencv.

commit 558054a53d9df34960b587b0bbeaeadcde1b729d
Author: Vladislav Vinogradov <vlad.vinogradov at itseez.com>
Date:   Tue Sep 8 16:04:28 2015 +0300

    fix for gpu::StereoBeliefPropogation:
    
    use continuous memory for internal buffers
    
    (cherry picked from commit e2a9df408f712f694206974a1f24a864881371c3)
---
 modules/gpu/src/stereobp.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/gpu/src/stereobp.cpp b/modules/gpu/src/stereobp.cpp
index 3b827a3..dde69d6 100644
--- a/modules/gpu/src/stereobp.cpp
+++ b/modules/gpu/src/stereobp.cpp
@@ -158,7 +158,7 @@ namespace
 
             init(stream);
 
-            datas[0].create(rows * rthis.ndisp, cols, rthis.msg_type);
+            createContinuous(rows * rthis.ndisp, cols, rthis.msg_type, datas[0]);
 
             comp_data_callers[rthis.msg_type == CV_32F][left.channels()](left, right, datas[0], StreamAccessor::getStream(stream));
 
@@ -187,10 +187,10 @@ namespace
     private:
         void init(Stream& stream)
         {
-            u.create(rows * rthis.ndisp, cols, rthis.msg_type);
-            d.create(rows * rthis.ndisp, cols, rthis.msg_type);
-            l.create(rows * rthis.ndisp, cols, rthis.msg_type);
-            r.create(rows * rthis.ndisp, cols, rthis.msg_type);
+            createContinuous(rows * rthis.ndisp, cols, rthis.msg_type, u);
+            createContinuous(rows * rthis.ndisp, cols, rthis.msg_type, d);
+            createContinuous(rows * rthis.ndisp, cols, rthis.msg_type, l);
+            createContinuous(rows * rthis.ndisp, cols, rthis.msg_type, r);
 
             if (rthis.levels & 1)
             {
@@ -216,10 +216,10 @@ namespace
                 int less_rows = rows / 2;
                 int less_cols = cols / 2;
 
-                u2.create(less_rows * rthis.ndisp, less_cols, rthis.msg_type);
-                d2.create(less_rows * rthis.ndisp, less_cols, rthis.msg_type);
-                l2.create(less_rows * rthis.ndisp, less_cols, rthis.msg_type);
-                r2.create(less_rows * rthis.ndisp, less_cols, rthis.msg_type);
+                createContinuous(less_rows * rthis.ndisp, less_cols, rthis.msg_type, u2);
+                createContinuous(less_rows * rthis.ndisp, less_cols, rthis.msg_type, d2);
+                createContinuous(less_rows * rthis.ndisp, less_cols, rthis.msg_type, l2);
+                createContinuous(less_rows * rthis.ndisp, less_cols, rthis.msg_type, r2);
 
                 if ((rthis.levels & 1) == 0)
                 {
@@ -286,7 +286,7 @@ namespace
                 cols_all[i] = cols_all[i-1] / 2;
                 rows_all[i] = rows_all[i-1] / 2;
 
-                datas[i].create(rows_all[i] * rthis.ndisp, cols_all[i], rthis.msg_type);
+                createContinuous(rows_all[i] * rthis.ndisp, cols_all[i], rthis.msg_type, datas[i]);
 
                 data_step_down_callers[funcIdx](cols_all[i], rows_all[i], rows_all[i-1], datas[i-1], datas[i], cudaStream);
             }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list