diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-03-08 11:04:12 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-03-08 11:04:57 +0100 |
commit | 2f147588f7beac9c85df81f331ce38626def20d7 (patch) | |
tree | d04551d06257af8bd7e61ec0d984f9bb546b9611 /libavfilter/vf_vaguedenoiser.c | |
parent | 80798e385780b5f20ab08d1338f36dc31f11a7f6 (diff) | |
download | ffmpeg-2f147588f7beac9c85df81f331ce38626def20d7.tar.gz |
avfilter/vf_vaguedenoiser: fix plane copy for >8 bit depth formats
Fixes #7072.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_vaguedenoiser.c')
-rw-r--r-- | libavfilter/vf_vaguedenoiser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_vaguedenoiser.c b/libavfilter/vf_vaguedenoiser.c index 2b93e70e57..b323ce5479 100644 --- a/libavfilter/vf_vaguedenoiser.c +++ b/libavfilter/vf_vaguedenoiser.c @@ -42,6 +42,7 @@ typedef struct VagueDenoiserContext { int planes; int depth; + int bpc; int peak; int nb_planes; int planeheight[4]; @@ -135,6 +136,7 @@ static int config_input(AVFilterLink *inlink) int p, i, nsteps_width, nsteps_height, nsteps_max; s->depth = desc->comp[0].depth; + s->bpc = (s->depth + 7) / 8; s->nb_planes = desc->nb_components; s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); @@ -410,7 +412,7 @@ static void filter(VagueDenoiserContext *s, AVFrame *in, AVFrame *out) if (!((1 << p) & s->planes)) { av_image_copy_plane(out->data[p], out->linesize[p], in->data[p], in->linesize[p], - s->planewidth[p], s->planeheight[p]); + s->planewidth[p] * s->bpc, s->planeheight[p]); continue; } |