History

avfilter/vf_neighbor: check if width is 1

Fixes #8242

Paul B Mahol committed 7 years ago

Commit e787f8f1 parent 1331e001 file · +5 −3Browse files

Unified · Split

libavfilter/vf_neighbor.c+5−3
@@ -296,9 +296,11 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) · 295 unmodified lines
296 src + (width - 2) * bpc, src + (width - 2) * bpc,296 src + (width - 2) * bpc, src + (width - 2) * bpc,
297 src + (width - 2) * bpc + ph * stride, src + (width - 1) * bpc + ph * stride, src + (width - 2) * bpc + ph * stride};297 src + (width - 2) * bpc + ph * stride, src + (width - 1) * bpc + ph * stride, src + (width - 2) * bpc + ph * stride};
298 298
299 s->filter(dst, src, 1, threshold, coordinateslb, s->coordinates, s->max);299 s->filter(dst, src, 1, threshold, coordinateslb, s->coordinates, s->max);
300 s->filter(dst + 1 * bpc, src + 1 * bpc, width - 2, threshold, coordinates, s->coordinates, s->max);300 if (width > 1) {
301 s->filter(dst + (width - 1) * bpc, src + (width - 1) * bpc, 1, threshold, coordinatesrb, s->coordinates, s->max);301 s->filter(dst + 1 * bpc, src + 1 * bpc, width - 2, threshold, coordinates, s->coordinates, s->max);
302 s->filter(dst + (width - 1) * bpc, src + (width - 1) * bpc, 1, threshold, coordinatesrb, s->coordinates, s->max);
303 }
302 304
303 src += stride;305 src += stride;
304 dst += dstride;306 dst += dstride;

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