diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 05:32:38 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 05:32:38 +0300 |
commit | 3170b33e57b2f29c0adf77ece46b324494b81dd1 (patch) | |
tree | cdaec265a62c41b156f9c25e8b080693b4b704de /libavfilter/vf_fftfilt.c | |
parent | 399e31419ab20d39d87786c1c1dcb230f801c41f (diff) |
avfilter/vf_fftfilt: increase RDFT length by 10%
This fixes artifacts when the dimensions are exact powers of 2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fftfilt.c')
-rw-r--r-- | libavfilter/vf_fftfilt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c index 86acc62db5..dff279c00b 100644 --- a/libavfilter/vf_fftfilt.c +++ b/libavfilter/vf_fftfilt.c @@ -208,14 +208,14 @@ static int config_props(AVFilterLink *inlink) int h = inlink->h; /* RDFT - Array initialization for Horizontal pass*/ - for (rdft_hbits = 1; 1 << rdft_hbits < w; rdft_hbits++); + for (rdft_hbits = 1; 1 << rdft_hbits < w*10/9; rdft_hbits++); fftfilt->rdft_hbits[i] = rdft_hbits; fftfilt->rdft_hlen[i] = 1 << rdft_hbits; if (!(fftfilt->rdft_hdata[i] = av_malloc_array(h, fftfilt->rdft_hlen[i] * sizeof(FFTSample)))) return AVERROR(ENOMEM); /* RDFT - Array initialization for Vertical pass*/ - for (rdft_vbits = 1; 1 << rdft_vbits < h; rdft_vbits++); + for (rdft_vbits = 1; 1 << rdft_vbits < h*10/9; rdft_vbits++); fftfilt->rdft_vbits[i] = rdft_vbits; fftfilt->rdft_vlen[i] = 1 << rdft_vbits; if (!(fftfilt->rdft_vdata[i] = av_malloc_array(fftfilt->rdft_hlen[i], fftfilt->rdft_vlen[i] * sizeof(FFTSample)))) |