if(y>0)//4e: We calculate horizontal sums and forming full block sums for y coord by adding this horsums to previous line's sums and subtracting stored lowest
{//4e: horsum in hsumBuf. Exception is case y=0, where we need many iterations per lines to create full blocking sum.
// clear the left and the right borders //TODO: Well, two of that memsets we could delete, but rest of them is direction-dependent
// clear the left and the right borders
memset(Lr-D2*LrBorder-8,0,D2*LrBorder*sizeof(CostType));//4e: To understand this "8" shifts and how they could work it's simpler to imagine pixel dislocation in memory
memset(Lr+width1*D2-8,0,D2*LrBorder*sizeof(CostType));//4e: ...00000000|D2-16 of real costs value(and some of them are zeroes too)|00000000...