summaryrefslogtreecommitdiff
path: root/libavfilter/vf_noise.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-13 11:24:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-13 11:51:37 +0200
commit53102fa2f0448176ff1f82d802cb12f25248da30 (patch)
treed598cc4980d7876b3d6728a6d0322404c22d58d2 /libavfilter/vf_noise.c
parentad96482d67b24bbbf9808a30460e0d6c93d259dc (diff)
downloadffmpeg-53102fa2f0448176ff1f82d802cb12f25248da30.tar.gz
Revert "avfilter/vf_noise: dont corrupt the picture outside width x height"
This reverts commit 51dab60c7b91a21ec280c7d3042aa8350aae048f. this fixed nothing, and was just the result of assuming that the variable named linesize was the linesize. Its not, its the width in bytes which was already correct. Found-by: durandal_1707
Diffstat (limited to 'libavfilter/vf_noise.c')
-rw-r--r--libavfilter/vf_noise.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 57af5b6650..9e82976a82 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -57,7 +57,6 @@ typedef struct {
const AVClass *class;
int nb_planes;
int linesize[4];
- int bytewidth[4];
int height[4];
FilterParams all;
FilterParams param[4];
@@ -197,9 +196,6 @@ static int config_input(AVFilterLink *inlink)
n->height[1] = n->height[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
n->height[0] = n->height[3] = inlink->h;
- n->bytewidth [1] = n->bytewidth [2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w) * ((desc->comp[0].depth_minus1 + 1) / 8);
- n->bytewidth [0] = n->bytewidth [3] = inlink->w * ((desc->comp[0].depth_minus1 + 1) / 8);
-
return 0;
}
@@ -381,7 +377,7 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
noise(td->out->data[plane] + start * td->out->linesize[plane],
td->in->data[plane] + start * td->in->linesize[plane],
td->out->linesize[plane], td->in->linesize[plane],
- s->bytewidth[plane], start, end, s, plane);
+ s->linesize[plane], start, end, s, plane);
}
return 0;
}