Merge pull request #1874 from SpecLad:merge-2.4
This commit is contained in:
@@ -1531,7 +1531,9 @@ template<typename _Tp> template<int m, int n> inline
|
||||
Mat_<_Tp>::operator Matx<typename DataType<_Tp>::channel_type, m, n>() const
|
||||
{
|
||||
CV_Assert(n % DataType<_Tp>::channels == 0);
|
||||
return this->Mat::operator Matx<typename DataType<_Tp>::channel_type, m, n>();
|
||||
|
||||
Matx<typename DataType<_Tp>::channel_type, m, n> res = this->Mat::operator Matx<typename DataType<_Tp>::channel_type, m, n>();
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename _Tp> inline
|
||||
|
@@ -1032,6 +1032,7 @@ cv::ogl::Texture2D::Texture2D(InputArray arr, bool autoRelease) : rows_(0), cols
|
||||
#else
|
||||
GpuMat dmat = arr.getGpuMat();
|
||||
ogl::Buffer buf(dmat, ogl::Buffer::PIXEL_UNPACK_BUFFER);
|
||||
buf.setAutoRelease(true);
|
||||
buf.bind(ogl::Buffer::PIXEL_UNPACK_BUFFER);
|
||||
impl_.reset(new Impl(internalFormats[cn], asize.width, asize.height, srcFormats[cn], gl_types[depth], 0, autoRelease));
|
||||
ogl::Buffer::unbind(ogl::Buffer::PIXEL_UNPACK_BUFFER);
|
||||
@@ -1145,6 +1146,7 @@ void cv::ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease)
|
||||
#else
|
||||
GpuMat dmat = arr.getGpuMat();
|
||||
ogl::Buffer buf(dmat, ogl::Buffer::PIXEL_UNPACK_BUFFER);
|
||||
buf.setAutoRelease(true);
|
||||
buf.bind(ogl::Buffer::PIXEL_UNPACK_BUFFER);
|
||||
impl_->copyFrom(asize.width, asize.height, srcFormats[cn], gl_types[depth], 0);
|
||||
ogl::Buffer::unbind(ogl::Buffer::PIXEL_UNPACK_BUFFER);
|
||||
@@ -1195,6 +1197,7 @@ void cv::ogl::Texture2D::copyTo(OutputArray arr, int ddepth, bool autoRelease) c
|
||||
throw_no_cuda();
|
||||
#else
|
||||
ogl::Buffer buf(rows_, cols_, CV_MAKE_TYPE(ddepth, cn), ogl::Buffer::PIXEL_PACK_BUFFER);
|
||||
buf.setAutoRelease(true);
|
||||
buf.bind(ogl::Buffer::PIXEL_PACK_BUFFER);
|
||||
impl_->copyTo(dstFormat, gl_types[ddepth], 0);
|
||||
ogl::Buffer::unbind(ogl::Buffer::PIXEL_PACK_BUFFER);
|
||||
|
Reference in New Issue
Block a user