[FFmpeg-cvslog] avfilter/vf_threshold : move context func init in ff_threshold_init

Martin Vignali git at videolan.org
Sun Dec 3 20:19:16 EET 2017


ffmpeg | branch: master | Martin Vignali <martin.vignali at gmail.com> | Sun Dec  3 16:55:37 2017 +0100| [fa470384ea3f4bed8507495db19c187f69ed1307] | committer: Martin Vignali

avfilter/vf_threshold : move context func init in ff_threshold_init

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa470384ea3f4bed8507495db19c187f69ed1307
---

 libavfilter/threshold.h    | 1 +
 libavfilter/vf_threshold.c | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavfilter/threshold.h b/libavfilter/threshold.h
index 8b55ad6ba1..775a9f9cae 100644
--- a/libavfilter/threshold.h
+++ b/libavfilter/threshold.h
@@ -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 */
diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c
index 4183b353d2..58b5d14836 100644
--- a/libavfilter/vf_threshold.c
+++ b/libavfilter/vf_threshold.c
@@ -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)



More information about the ffmpeg-cvslog mailing list