[FFmpeg-cvslog] build: Conditionally build and run DCT test program

Diego Biurrun git at videolan.org
Mon Jul 21 22:21:53 CEST 2014


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Jul 21 05:27:45 2014 -0700| [16b7328058fa600d5158c84d9cc621a134eb88bc] | committer: Diego Biurrun

build: Conditionally build and run DCT test program

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

 libavcodec/Makefile       |    4 ++--
 libavcodec/dct-test.c     |    5 ++++-
 tests/fate/libavcodec.mak |    2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 684269c..7caddd6 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -711,12 +711,12 @@ SKIPHEADERS-$(CONFIG_VAAPI)            += vaapi_internal.h
 SKIPHEADERS-$(CONFIG_VDA)              += vda.h vda_internal.h
 SKIPHEADERS-$(CONFIG_VDPAU)            += vdpau.h vdpau_internal.h
 
-TESTPROGS = dct                                                         \
-            fft                                                         \
+TESTPROGS = fft                                                         \
             fft-fixed                                                   \
             golomb                                                      \
             rangecoder                                                  \
 
+TESTPROGS-$(CONFIG_IDCTDSP)               += dct
 TESTPROGS-$(CONFIG_IIRFILTER)             += iirfilter
 
 TESTOBJS = dctref.o
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 979fc0b..a531c88 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -443,7 +443,9 @@ int main(int argc, char **argv)
             for (i = 0; idct_tab_arch[i].name; i++)
                 if (!(~cpu_flags & idct_tab_arch[i].cpu_flag))
                     err |= dct_error(&idct_tab_arch[i], test, test_idct, speed);
-        } else {
+        }
+#if CONFIG_FDCTDSP
+        else {
             for (i = 0; i < FF_ARRAY_ELEMS(fdct_tab); i++)
                 err |= dct_error(&fdct_tab[i], test, test_idct, speed);
 
@@ -451,6 +453,7 @@ int main(int argc, char **argv)
                 if (!(~cpu_flags & fdct_tab_arch[i].cpu_flag))
                     err |= dct_error(&fdct_tab_arch[i], test, test_idct, speed);
         }
+#endif /* CONFIG_FDCTDSP */
     }
 
     if (err)
diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak
index 7fecc52..138a1b2 100644
--- a/tests/fate/libavcodec.mak
+++ b/tests/fate/libavcodec.mak
@@ -3,7 +3,7 @@ fate-golomb: libavcodec/golomb-test$(EXESUF)
 fate-golomb: CMD = run libavcodec/golomb-test
 fate-golomb: REF = /dev/null
 
-FATE_LIBAVCODEC-yes += fate-idct8x8
+FATE_LIBAVCODEC-$(CONFIG_IDCTDSP) += fate-idct8x8
 fate-idct8x8: libavcodec/dct-test$(EXESUF)
 fate-idct8x8: CMD = run libavcodec/dct-test -i
 fate-idct8x8: CMP = null



More information about the ffmpeg-cvslog mailing list