diff options
author | James Darnley <jdarnley@obe.tv> | 2023-02-20 20:55:08 +0100 |
---|---|---|
committer | James Darnley <jdarnley@obe.tv> | 2023-03-25 02:38:17 +0100 |
commit | b503b5a0cf80f38ecf4737c012b621b7e94f242a (patch) | |
tree | e22af0367b86c4b3e4157def3d9125d17bcb3038 /libavfilter/vf_bwdif.c | |
parent | 90488e14408119f6c3a2061a6c26ee8bcfaddbce (diff) | |
download | ffmpeg-b503b5a0cf80f38ecf4737c012b621b7e94f242a.tar.gz |
avfilter/bwdif: move filter_line init to a dedicated function
Diffstat (limited to 'libavfilter/vf_bwdif.c')
-rw-r--r-- | libavfilter/vf_bwdif.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c index 65c617ebb3..34e8c5e234 100644 --- a/libavfilter/vf_bwdif.c +++ b/libavfilter/vf_bwdif.c @@ -340,7 +340,14 @@ static int config_props(AVFilterLink *link) yadif->csp = av_pix_fmt_desc_get(link->format); yadif->filter = filter; - if (yadif->csp->comp[0].depth > 8) { + ff_bwdif_init_filter_line(s, yadif->csp->comp[0].depth); + + return 0; +} + +av_cold void ff_bwdif_init_filter_line(BWDIFContext *s, int bit_depth) +{ + if (bit_depth > 8) { s->filter_intra = filter_intra_16bit; s->filter_line = filter_line_c_16bit; s->filter_edge = filter_edge_16bit; @@ -351,10 +358,8 @@ static int config_props(AVFilterLink *link) } #if ARCH_X86 - ff_bwdif_init_x86(s); + ff_bwdif_init_x86(s, bit_depth); #endif - - return 0; } |