summaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_phase.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-05-03 22:41:33 +0200
committerClément Bœsch <u@pkh.me>2014-05-08 22:59:47 +0200
commit687119aa9d2d93ee069ae4a320f8d63ee791e6c4 (patch)
treea262a63bdc60c174b3ffe448042b4925c8449040 /libavfilter/vf_phase.c
parent362ab940fc5d1ba5ad55a3e797a38d98beda78a0 (diff)
downloadffmpeg-streaming-687119aa9d2d93ee069ae4a320f8d63ee791e6c4.zip
ffmpeg-streaming-687119aa9d2d93ee069ae4a320f8d63ee791e6c4.tar.gz
avfilter/phase: do not pass the whole context to analyze_plane().
Also make sure the AVFilterContext is only being used for logging by changing the type to void*
Diffstat (limited to 'libavfilter/vf_phase.c')
-rw-r--r--libavfilter/vf_phase.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c
index 281f736..11337e4 100644
--- a/libavfilter/vf_phase.c
+++ b/libavfilter/vf_phase.c
@@ -112,8 +112,7 @@ static int config_input(AVFilterLink *inlink)
* Find which field combination has the smallest average squared difference
* between the fields.
*/
-static enum PhaseMode analyze_plane(AVFilterContext *ctx, PhaseContext *s,
- AVFrame *old, AVFrame *new)
+static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old, AVFrame *new)
{
double bdiff, tdiff, pdiff, scale;
const int ns = new->linesize[0];
@@ -123,7 +122,6 @@ static enum PhaseMode analyze_plane(AVFilterContext *ctx, PhaseContext *s,
const int h = new->height;
const int w = new->width;
int bdif, tdif, pdif;
- enum PhaseMode mode = s->mode;
uint8_t *end, *rend;
int top, t;
@@ -261,7 +259,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return AVERROR(ENOMEM);
}
} else {
- mode = analyze_plane(ctx, s, s->frame, in);
+ mode = analyze_plane(ctx, s->mode, s->frame, in);
}
for (plane = 0; plane < s->nb_planes; plane++) {
OpenPOWER on IntegriCloud