pixelsort v2: allocate wshed+populate pgrid