Skip to content
Snippets Groups Projects
Commit 448a87a4 authored by David Tschumperlé's avatar David Tschumperlé
Browse files

_math_parser() : Improve behavior of copy() when source or destination are...

_math_parser() : Improve behavior of copy() when source or destination are reference to vector-valued pixels.
parent 375e25d8
No related branches found
No related tags found
No related merge requests found
......@@ -17603,7 +17603,7 @@ namespace cimg_library_suffixed {
arg1 = p1 = compile(ss5,s1,depth1,ref,is_single);
s2 = ++s1; while (s2<se1 && (*s2!=',' || level[s2 - expr._data]!=clevel1)) ++s2;
arg2 = compile(s1,s2,depth1,ref._data + 7,is_single);
arg3 = ~0U; arg4 = arg5 = arg6 = 1;
arg3 = arg4 = arg5 = ~0U; arg6 = 1;
if (s2<se1) {
s3 = ++s2; while (s3<se1 && (*s3!=',' || level[s3 - expr._data]!=clevel1)) ++s3;
arg3 = compile(s2,s3,depth1,0,is_single);
......@@ -17617,12 +17617,18 @@ namespace cimg_library_suffixed {
}
}
}
if (_cimg_mp_is_vector(arg1) && !ref[0]) ++arg1;
if (_cimg_mp_is_vector(arg1)) {
if (!ref[0]) ++arg1;
else if (ref[0]>=4 && arg4==~0U) arg4 = scalar1(mp_image_whd,ref[1]);
}
if (_cimg_mp_is_vector(arg2)) {
if (arg3==~0U) arg3 = constant(_cimg_mp_size(arg2));
if (!ref[7]) ++arg2;
if (ref[7]>=4 && arg5==~0U) arg5 = scalar1(mp_image_whd,ref[8]);
}
if (arg3==~0U) arg3 = 1;
if (arg4==~0U) arg4 = 1;
if (arg5==~0U) arg5 = 1;
_cimg_mp_check_type(arg3,3,1,0);
_cimg_mp_check_type(arg4,4,1,0);
_cimg_mp_check_type(arg5,5,1,0);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment