diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-12-18 11:18:14 +0100 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2017-12-19 20:59:47 +0100 |
commit | d31770d9a603596a0ae970328a34c1bf5cff1715 (patch) | |
tree | 66e296bb92d6fb60a45f9cc3eb58337c2573f706 /libavfilter/vf_interlace.c | |
parent | c76cf303ce1131ca3ac249bb9328567797761e41 (diff) |
avfilter/vf_interlace : move func init in ff_interlace_init and add depth arg for ff_interlace_init_x86
Diffstat (limited to 'libavfilter/vf_interlace.c')
-rw-r--r-- | libavfilter/vf_interlace.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c index 731069818f..24c422ded2 100644 --- a/libavfilter/vf_interlace.c +++ b/libavfilter/vf_interlace.c @@ -185,6 +185,25 @@ static av_cold void uninit(AVFilterContext *ctx) av_frame_free(&s->next); } +void ff_interlace_init(InterlaceContext *s, int depth) +{ + if (s->lowpass) { + if (s->lowpass == VLPF_LIN) { + if (depth > 8) + s->lowpass_line = lowpass_line_c_16; + else + s->lowpass_line = lowpass_line_c; + } else if (s->lowpass == VLPF_CMP) { + if (depth > 8) + s->lowpass_line = lowpass_line_complex_c_16; + else + s->lowpass_line = lowpass_line_complex_c; + } + if (ARCH_X86) + ff_interlace_init_x86(s, depth); + } +} + static int config_out_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; @@ -210,21 +229,7 @@ static int config_out_props(AVFilterLink *outlink) outlink->frame_rate.den *= 2; s->csp = av_pix_fmt_desc_get(outlink->format); - if (s->lowpass) { - if (s->lowpass == VLPF_LIN) { - if (s->csp->comp[0].depth > 8) - s->lowpass_line = lowpass_line_c_16; - else - s->lowpass_line = lowpass_line_c; - } else if (s->lowpass == VLPF_CMP) { - if (s->csp->comp[0].depth > 8) - s->lowpass_line = lowpass_line_complex_c_16; - else - s->lowpass_line = lowpass_line_complex_c; - } - if (ARCH_X86) - ff_interlace_init_x86(s); - } + ff_interlace_init(s, s->csp->comp[0].depth); av_log(ctx, AV_LOG_VERBOSE, "%s interlacing %s lowpass filter\n", s->scan == MODE_TFF ? "tff" : "bff", (s->lowpass) ? "with" : "without"); |