diff --git a/intrinsiccv/include/intrinsiccv/morphology/workspace.h b/intrinsiccv/include/intrinsiccv/morphology/workspace.h index 7ec6f579c0110bfef01669e15820935a072ffacb..0668ce8c76b996ea877df4a198398feccb144c81 100644 --- a/intrinsiccv/include/intrinsiccv/morphology/workspace.h +++ b/intrinsiccv/include/intrinsiccv/morphology/workspace.h @@ -341,11 +341,13 @@ class MorphologyWorkspace final { void copy_data(Rows src_rows, Rows dst_rows, size_t length) INTRINSICCV_STREAMING_COMPATIBLE { #if INTRINSICCV_TARGET_SME2 - // 'sve2::apply_operation_by_rows' handles it as being 1-channel + // 'sve2::apply_operation_by_rows' can only handle one channel well // so width must be multiplied in order to copy all the data - Rectangle rect{length * src_rows.channels(), std::size_t{1}}; + Rectangle rect{length * dst_rows.channels(), std::size_t{1}}; + Rows src_1ch{&src_rows[0], src_rows.stride(), 1}; + Rows dst_1ch{&dst_rows[0], dst_rows.stride(), 1}; CopyOperation operation; - sve2::apply_operation_by_rows(operation, rect, src_rows, dst_rows); + sve2::apply_operation_by_rows(operation, rect, src_1ch, dst_1ch); #else std::memcpy(static_cast(&dst_rows[0]), static_cast(&src_rows[0]), diff --git a/intrinsiccv/include/intrinsiccv/sve2.h b/intrinsiccv/include/intrinsiccv/sve2.h index 7fe117a6f8c839c3dbe5559aaf8b38d0bed9707c..5c84a467ea9f9286e54f711a5fd72f6b57ee27aa 100644 --- a/intrinsiccv/include/intrinsiccv/sve2.h +++ b/intrinsiccv/include/intrinsiccv/sve2.h @@ -31,7 +31,7 @@ class Context { svbool_t &pg_; }; // end of class Context -// Primary template to describe logically grouped peroperties of vectors. +// Primary template to describe logically grouped properties of vectors. template class VectorTypes;