Browse Source

tests/dnn: Make DNN tests regular libavfilter tests

They test libavfilter internal API, so they should be libavfilter
test programs (which implies: linked statically to libavfilter
to access internal APIs and linked normally (statically or dynamically
depending upon the build configuration) against all the other libs).

Right now, they are always linked statically against all libs,
which is a significant size waste compared to shared libs as all
of libavcodec has been pulled in despite not being really used.
This also leads to linking failures on systems for which av_export_avutil
is intended: libavcodec does not expect to be linked statically
against the library providing avpriv_(cga|vga16)_font in this case.
This is fixed by this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt 3 years ago
parent
commit
c26730ed8f

+ 3 - 0
libavfilter/Makefile

@@ -590,6 +590,9 @@ SKIPHEADERS-$(CONFIG_VULKAN)                 += vulkan.h vulkan_filter.h
 
 TOOLS     = graph2dot
 TESTPROGS = drawutils filtfmts formats integral
+TESTPROGS-$(CONFIG_DNN) += dnn-layer-avgpool dnn-layer-conv2d dnn-layer-dense  \
+                           dnn-layer-depth2space dnn-layer-mathbinary          \
+                           dnn-layer-mathunary dnn-layer-maximum dnn-layer-pad \
 
 TOOLS-$(CONFIG_LIBZMQ) += zmqsend
 

+ 8 - 0
libavfilter/tests/.gitignore

@@ -1,3 +1,11 @@
+/dnn-layer-conv2d
+/dnn-layer-depth2space
+/dnn-layer-maximum
+/dnn-layer-pad
+/dnn-layer-mathbinary
+/dnn-layer-mathunary
+/dnn-layer-avgpool
+/dnn-layer-dense
 /drawutils
 /filtfmts
 /formats

+ 0 - 0
tests/dnn/dnn-layer-avgpool-test.c → libavfilter/tests/dnn-layer-avgpool.c


+ 0 - 0
tests/dnn/dnn-layer-conv2d-test.c → libavfilter/tests/dnn-layer-conv2d.c


+ 0 - 0
tests/dnn/dnn-layer-dense-test.c → libavfilter/tests/dnn-layer-dense.c


+ 0 - 0
tests/dnn/dnn-layer-depth2space-test.c → libavfilter/tests/dnn-layer-depth2space.c


+ 0 - 0
tests/dnn/dnn-layer-mathbinary-test.c → libavfilter/tests/dnn-layer-mathbinary.c


+ 0 - 0
tests/dnn/dnn-layer-mathunary-test.c → libavfilter/tests/dnn-layer-mathunary.c


+ 0 - 0
tests/dnn/dnn-layer-maximum-test.c → libavfilter/tests/dnn-layer-maximum.c


+ 0 - 0
tests/dnn/dnn-layer-pad-test.c → libavfilter/tests/dnn-layer-pad.c


Some files were not shown because too many files changed in this diff