[FFmpeg-cvslog] avfilter/vf_fftfilt: increase RDFT length by 10%
Michael Niedermayer
git at videolan.org
Tue Mar 10 03:45:07 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 10 03:32:38 2015 +0100| [3170b33e57b2f29c0adf77ece46b324494b81dd1] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3170b33e57b2f29c0adf77ece46b324494b81dd1
---
libavfilter/vf_fftfilt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c
index 86acc62..dff279c 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))))
More information about the ffmpeg-cvslog
mailing list