[opencv] 69/89: core: fix inplace support in mulSpectrums
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sat May 13 09:57:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.
commit 21f3531b17017fd5559ced15e5c41ee2e8635517
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Wed Dec 7 19:27:19 2016 +0300
core: fix inplace support in mulSpectrums
---
modules/core/src/dxt.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/core/src/dxt.cpp b/modules/core/src/dxt.cpp
index 90eb392..b94f65a 100644
--- a/modules/core/src/dxt.cpp
+++ b/modules/core/src/dxt.cpp
@@ -1905,6 +1905,12 @@ void cv::mulSpectrums( InputArray _srcA, InputArray _srcB,
_dst.create( srcA.rows, srcA.cols, type );
Mat dst = _dst.getMat();
+ // correct inplace support
+ if (dst.data == srcA.data)
+ srcA = srcA.clone();
+ if (dst.data == srcB.data)
+ srcB = srcB.clone();
+
bool is_1d = (flags & DFT_ROWS) || (rows == 1 || (cols == 1 &&
srcA.isContinuous() && srcB.isContinuous() && dst.isContinuous()));
--
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