Merge commit '1274ea8dbaec44355bde07f6bb31fec0c4e6fd2d'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Sep 2014 22:54:55 +0000 (00:54 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 7 Sep 2014 22:54:55 +0000 (00:54 +0200)
* commit '1274ea8dbaec44355bde07f6bb31fec0c4e6fd2d':
  Split off floating point AAN (I)DCT into separate components

Conflicts:
configure
libavcodec/Makefile
libavcodec/dct-test.c
libavcodec/idctdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
configure
libavcodec/Makefile
libavcodec/dct-test.c
libavcodec/fdctdsp.c
libavcodec/idctdsp.c
libavcodec/mpegvideo_enc.c

index 7de07c302fbd49ef395bcb591d4fbab8229e8336..e66519db35e3e6c5319eb7ba4fadca4a8add2a29 100755 (executable)
--- a/configure
+++ b/configure
@@ -145,6 +145,7 @@ Component options:
   --disable-mdct           disable MDCT code
   --disable-rdft           disable RDFT code
   --disable-fft            disable FFT code
+  --disable-faan           disable floating point AAN (I)DCT code
   --disable-pixelutils     disable pixel utils in libavutil
 
 Hardware accelerators:
@@ -1449,6 +1450,7 @@ SUBSYSTEM_LIST="
     dct
     dwt
     error_resilience
+    faan
     fast_unaligned
     fft
     lsp
@@ -1823,6 +1825,8 @@ CONFIG_EXTRA="
     cabac
     dvprofile
     exif
+    faandct
+    faanidct
     fdctdsp
     frame_thread_encoder
     gcrypt
@@ -2024,6 +2028,8 @@ threads_if_any="$THREADS_LIST"
 # subsystems
 dct_select="rdft"
 error_resilience_select="me_cmp"
+faandct_deps="faan fdctdsp"
+faanidct_deps="faan idctdsp"
 frame_thread_encoder_deps="encoders threads"
 intrax8_select="error_resilience"
 mdct_select="fft"
@@ -2693,6 +2699,7 @@ enable stripping
 enable asm
 enable debug
 enable doc
+enable faan faandct faanidct
 enable optimizations
 enable runtime_cpudetect
 enable safe_bitstream_reader
index b74d8b5085b0c2f9f6cd5f3c3bf2f8d809309eb6..43d73a742ec42262dea26ff1d4cb284bbfdda844 100644 (file)
@@ -44,8 +44,9 @@ OBJS-$(CONFIG_CRYSTALHD)               += crystalhd.o
 OBJS-$(CONFIG_DCT)                     += dct.o dct32_fixed.o dct32_float.o
 OBJS-$(CONFIG_ERROR_RESILIENCE)        += error_resilience.o
 OBJS-$(CONFIG_EXIF)                    += exif.o tiff_common.o
-OBJS-$(CONFIG_FDCTDSP)                 += fdctdsp.o faandct.o           \
-                                          jfdctfst.o jfdctint.o
+OBJS-$(CONFIG_FAANDCT)                 += faandct.o
+OBJS-$(CONFIG_FAANIDCT)                += faanidct.o
+OBJS-$(CONFIG_FDCTDSP)                 += fdctdsp.o jfdctfst.o jfdctint.o
 FFT-OBJS-$(CONFIG_HARDCODED_TABLES)    += cos_tables.o cos_fixed_tables.o
 OBJS-$(CONFIG_FFT)                     += avfft.o fft_fixed.o fft_float.o \
                                           fft_fixed_32.o fft_init_table.o \
@@ -60,8 +61,7 @@ OBJS-$(CONFIG_HPELDSP)                 += hpeldsp.o
 OBJS-$(CONFIG_HUFFMAN)                 += huffman.o
 OBJS-$(CONFIG_HUFFYUVDSP)              += huffyuvdsp.o
 OBJS-$(CONFIG_HUFFYUVENCDSP)           += huffyuvencdsp.o
-OBJS-$(CONFIG_IDCTDSP)                 += idctdsp.o faanidct.o          \
-                                          simple_idct.o jrevdct.o
+OBJS-$(CONFIG_IDCTDSP)                 += idctdsp.o simple_idct.o jrevdct.o
 OBJS-$(CONFIG_IIRFILTER)               += iirfilter.o
 OBJS-$(CONFIG_INTRAX8)                 += intrax8.o intrax8dsp.o
 OBJS-$(CONFIG_LIBXVID)                 += libxvid_rc.o
index f4f8abd309e69db93302fbb707a4d343d3b8eafc..1739c37bee6e3524ccff66324b53ee4f231e9e01 100644 (file)
@@ -58,9 +58,11 @@ struct algo {
 
 static const struct algo fdct_tab[] = {
     { "REF-DBL",     ff_ref_fdct,          FF_IDCT_PERM_NONE },
-    { "FAAN",        ff_faandct,           FF_IDCT_PERM_NONE },
     { "IJG-AAN-INT", ff_fdct_ifast,        FF_IDCT_PERM_NONE },
     { "IJG-LLM-INT", ff_jpeg_fdct_islow_8, FF_IDCT_PERM_NONE },
+#if CONFIG_FAANDCT
+    { "FAAN",        ff_faandct,           FF_IDCT_PERM_NONE },
+#endif /* CONFIG_FAANDCT */
 };
 
 static void ff_prores_idct_wrap(int16_t *dst){
@@ -77,11 +79,13 @@ static void ff_prores_idct_wrap(int16_t *dst){
 }
 
 static const struct algo idct_tab[] = {
-    { "FAANI",       ff_faanidct,          FF_IDCT_PERM_NONE },
     { "REF-DBL",     ff_ref_idct,          FF_IDCT_PERM_NONE },
     { "INT",         ff_j_rev_dct,         FF_IDCT_PERM_LIBMPEG2 },
     { "SIMPLE-C",    ff_simple_idct_8,     FF_IDCT_PERM_NONE },
     { "PR-C",        ff_prores_idct_wrap,  FF_IDCT_PERM_NONE, 0, 1 },
+#if CONFIG_FAANIDCT
+    { "FAANI",       ff_faanidct,          FF_IDCT_PERM_NONE },
+#endif /* CONFIG_FAANIDCT */
 #if CONFIG_MPEG4_DECODER
     { "XVID",        ff_xvid_idct,         FF_IDCT_PERM_NONE, 0, 1 },
 #endif /* CONFIG_MPEG4_DECODER */
index 80acca333d1624bd30024b3e039b0351863e90ce..c4b7358caf646de49037eb25993d59d61da24f81 100644 (file)
@@ -33,9 +33,11 @@ av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx)
     } else if (avctx->dct_algo == FF_DCT_FASTINT) {
         c->fdct    = ff_fdct_ifast;
         c->fdct248 = ff_fdct_ifast248;
+#if CONFIG_FAANDCT
     } else if (avctx->dct_algo == FF_DCT_FAAN) {
         c->fdct    = ff_faandct;
         c->fdct248 = ff_faandct248;
+#endif /* CONFIG_FAANDCT */
     } else {
         c->fdct    = ff_jpeg_fdct_islow_8; // slow/accurate/default
         c->fdct248 = ff_fdct248_islow_8;
index 19e81262613f6dae3eeb66d7764ed39f720b7081..75695ef437f9e517a5420d5ab09ddb7e1b468e3f 100644 (file)
@@ -274,11 +274,13 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
                 c->idct_add  = ff_jref_idct_add;
                 c->idct      = ff_j_rev_dct;
                 c->perm_type = FF_IDCT_PERM_LIBMPEG2;
+#if CONFIG_FAANIDCT
             } else if (avctx->idct_algo == FF_IDCT_FAAN) {
                 c->idct_put  = ff_faanidct_put;
                 c->idct_add  = ff_faanidct_add;
                 c->idct      = ff_faanidct;
                 c->perm_type = FF_IDCT_PERM_NONE;
+#endif /* CONFIG_FAANIDCT */
             } else { // accurate/default
                 c->idct_put  = ff_simple_idct_put_8;
                 c->idct_add  = ff_simple_idct_add_8;
index f0ae8c3dcb248b31026cf6c8cc1b3dcad6ab624a..40f82777c12976f0d4200a22671b7350f3a4e8cf 100644 (file)
@@ -90,8 +90,10 @@ void ff_convert_matrix(MpegEncContext *s, int (*qmat)[64],
     for (qscale = qmin; qscale <= qmax; qscale++) {
         int i;
         if (fdsp->fdct == ff_jpeg_fdct_islow_8  ||
-            fdsp->fdct == ff_jpeg_fdct_islow_10 ||
-            fdsp->fdct == ff_faandct) {
+#if CONFIG_FAANDCT
+            fdsp->fdct == ff_faandct            ||
+#endif /* CONFIG_FAANDCT */
+            fdsp->fdct == ff_jpeg_fdct_islow_10) {
             for (i = 0; i < 64; i++) {
                 const int j = s->idsp.idct_permutation[i];
                 /* 16 <= qscale * quant_matrix[i] <= 7905