Browse Source

avfilter/vf_threshold : move context func init in ff_threshold_init

tags/n4.0
Martin Vignali 8 years ago
parent
commit
fa470384ea
2 changed files with 8 additions and 2 deletions
  1. +1
    -0
      libavfilter/threshold.h
  2. +7
    -2
      libavfilter/vf_threshold.c

+ 1
- 0
libavfilter/threshold.h View File

@@ -46,6 +46,7 @@ typedef struct ThresholdContext {
FFFrameSync fs;
} ThresholdContext;

void ff_threshold_init(ThresholdContext *s);
void ff_threshold_init_x86(ThresholdContext *s);

#endif /* AVFILTER_THRESHOLD_H */

+ 7
- 2
libavfilter/vf_threshold.c View File

@@ -185,6 +185,13 @@ static int config_input(AVFilterLink *inlink)
s->width[0] = s->width[3] = inlink->w;
s->depth = desc->comp[0].depth;

ff_threshold_init(s);

return 0;
}

void ff_threshold_init(ThresholdContext *s)
{
if (s->depth == 8) {
s->threshold = threshold8;
s->bpc = 1;
@@ -195,8 +202,6 @@ static int config_input(AVFilterLink *inlink)

if (ARCH_X86)
ff_threshold_init_x86(s);

return 0;
}

static int config_output(AVFilterLink *outlink)


Loading…
Cancel
Save