Skip to content

Commit

Permalink
Fix bad seed initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Algy committed Aug 31, 2019
1 parent a5fa152 commit 3aaac24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,16 @@ namespace fslic {
}
color_shift = 0;
}
for (int k = 0; k < K; k++) {
int y = clusters[k].y, x = clusters[k].x;
y = clamp(y, 0, H - 1);
x = clamp(x, 0, W - 1);
clusters[k].r = quad_image.get(y, 4 * x);
clusters[k].g = quad_image.get(y, 4 * x + 1);
clusters[k].b = quad_image.get(y, 4 * x + 2);
}
}

{
fstimer::Scope s("write_to_buffer");
#pragma omp parallel for num_threads(fsparallel::nth())
Expand Down

0 comments on commit 3aaac24

Please sign in to comment.