Merge pull request #18590 from krush11:master

This commit is contained in:
Alexander Alekhin 2020-10-16 19:47:03 +00:00
commit e87ba1d317

View File

@ -1566,9 +1566,9 @@ public:
int x = 1;
if (start_with_green)
{
D[blue<<1] = (S[-sstep] + S[sstep]) >> 1;
D[blue<<1] = (S[-sstep] + S[sstep] + 1) >> 1;
D[1] = S[0];
D[2-(blue<<1)] = (S[-1] + S[1]) >> 1;
D[2-(blue<<1)] = (S[-1] + S[1] + 1) >> 1;
D += dcn;
++S;
++x;
@ -1584,7 +1584,7 @@ public:
{
D[0] = S[0];
D[1] = (std::abs(S[-1] - S[1]) > std::abs(S[sstep] - S[-sstep]) ? (S[sstep] + S[-sstep] + 1) : (S[-1] + S[1] + 1)) >> 1;
D[2] = (S[-sstep-1] + S[-sstep+1] + S[sstep-1] + S[sstep+1]) >> 2;
D[2] = (S[-sstep-1] + S[-sstep+1] + S[sstep-1] + S[sstep+1] + 2) >> 2;
D[3] = (S[0] + S[2] + 1) >> 1;
D[4] = S[1];