mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2024-12-01 09:19:16 +08:00
fix cpu box filter typo
This commit is contained in:
parent
e4789153d5
commit
24bd894ea4
|
@ -74,7 +74,7 @@ void hboxfilter_y(float *id, float *od, int w, int h, int r) {
|
||||||
|
|
||||||
for (int x = 0; x < w; x++) {
|
for (int x = 0; x < w; x++) {
|
||||||
float t;
|
float t;
|
||||||
// do left edge
|
// do top edge
|
||||||
t = id[x] * r;
|
t = id[x] * r;
|
||||||
|
|
||||||
for (int y = 0; y < r + 1; y++) {
|
for (int y = 0; y < r + 1; y++) {
|
||||||
|
@ -98,7 +98,7 @@ void hboxfilter_y(float *id, float *od, int w, int h, int r) {
|
||||||
od[c] = t * scale;
|
od[c] = t * scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do right edge
|
// do bottom edge
|
||||||
for (int y = h - r; y < h; y++) {
|
for (int y = h - r; y < h; y++) {
|
||||||
int c = y * w + x;
|
int c = y * w + x;
|
||||||
t += id[(h - 1) * w + x];
|
t += id[(h - 1) * w + x];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user