aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-12 20:08:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-12 20:08:18 +0200
commit1431b4cf77d62596e9fa0b8224e7f38e20b55f24 (patch)
treefe457a0d12f474e3b64cfde6ae292f294da5e149
parentb62b3292d8e25d3240e462c1b1cd8ac69195c46b (diff)
downloadffmpeg-1431b4cf77d62596e9fa0b8224e7f38e20b55f24.tar.gz
avfilter/vf_fftfilt: Add MAX_PLANES and change it to 4
The 4th planes is currently unused as no formats with alpha are supported yet Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_fftfilt.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c
index dd522fa3d1..c914ed01e4 100644
--- a/libavfilter/vf_fftfilt.c
+++ b/libavfilter/vf_fftfilt.c
@@ -31,21 +31,23 @@
#include "libavcodec/avfft.h"
#include "libavutil/eval.h"
+#define MAX_PLANES 4
+
typedef struct {
const AVClass *class;
RDFTContext *rdft;
- int rdft_hbits[3];
- int rdft_vbits[3];
- size_t rdft_hlen[3];
- size_t rdft_vlen[3];
- FFTSample *rdft_hdata[3];
- FFTSample *rdft_vdata[3];
-
- int dc[3];
- char *weight_str[3];
- AVExpr *weight_expr[3];
- double *weight[3];
+ int rdft_hbits[MAX_PLANES];
+ int rdft_vbits[MAX_PLANES];
+ size_t rdft_hlen[MAX_PLANES];
+ size_t rdft_vlen[MAX_PLANES];
+ FFTSample *rdft_hdata[MAX_PLANES];
+ FFTSample *rdft_vdata[MAX_PLANES];
+
+ int dc[MAX_PLANES];
+ char *weight_str[MAX_PLANES];
+ AVExpr *weight_expr[MAX_PLANES];
+ double *weight[MAX_PLANES];
} FFTFILTContext;
@@ -291,7 +293,7 @@ static av_cold void uninit(AVFilterContext *ctx)
{
FFTFILTContext *fftfilt = ctx->priv;
int i;
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < MAX_PLANES; i++) {
av_free(fftfilt->rdft_hdata[i]);
av_free(fftfilt->rdft_vdata[i]);
av_expr_free(fftfilt->weight_expr[i]);