History

avfilter/vf_atadenoise: fix mid calculation

Paul B Mahol committed 5 years ago

Commit 3ce97d81 parent bb66fd71 file · +2 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_atadenoise.c+2−2
@@ -135,7 +135,7 @@ static av_cold int init(AVFilterContext *ctx) · 134 unmodified lines
135135 s->size |= 1;
136136 }
137137 s->radius = s->size / 2;
138− s->mid = s->radius + 1;
138+ s->mid = s->radius;
139139
140140 return 0;
141141 }
@@ -429,7 +429,7 @@ static int config_input(AVFilterLink *inlink) · 287 unmodified lines
429429 for (int p = 0; p < s->nb_planes; p++) {
430430 float sigma = s->radius * s->sigma[p];
431431
432− s->weights[p][s->mid] = 1.f;
432+ s->weights[p][s->radius] = 1.f;
433433 for (int n = 1; n <= s->radius; n++) {
434434 s->weights[p][s->radius + n] =
435435 s->weights[p][s->radius - n] = expf(-0.5 * (n + 1) * (n + 1) / (sigma * sigma));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t