---
 configure            |   23 ++++++++++++++---------
 libavcodec/Makefile  |    3 ++-
 libavcodec/dsputil.c |   14 ++++++++------
 3 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/configure b/configure
index 5c0e56c..8252f05 100755
--- a/configure
+++ b/configure
@@ -100,9 +100,11 @@ Configuration options:
   --enable-small           optimize for size instead of speed
   --disable-aandct         disable AAN DCT code
   --disable-dct            disable DCT code
+  --disable-faandct        disable floating point AAN DCT code
   --disable-fft            disable FFT code
   --disable-golomb         disable Golomb code
   --disable-huffman        disable Huffman code
+  --disable-jpegdct        disable JPEG DCT code
   --disable-lpc            disable LPC code
   --disable-mdct           disable MDCT code
   --disable-rdft           disable RDFT code
@@ -929,6 +931,7 @@ CONFIG_LIST="
     doc
     dwt
     dxva2
+    faandct
     fastdiv
     fft
     frei0r
@@ -941,6 +944,7 @@ CONFIG_LIST="
     h264pred
     hardcoded_tables
     huffman
+    jpegdct
     libcdio
     libdc1394
     libdirac
@@ -1285,7 +1289,7 @@ cavs_decoder_select="golomb"
 cook_decoder_select="mdct sinewin"
 cscd_decoder_suggest="zlib"
 dca_decoder_select="mdct"
-dnxhd_encoder_select="aandct"
+dnxhd_encoder_select="aandct faandct jpegdct"
 dxa_decoder_select="zlib"
 eac3_decoder_select="ac3_decoder"
 eac3_encoder_select="mdct ac3dsp"
@@ -1301,9 +1305,9 @@ flashsv2_decoder_select="zlib"
 flv_decoder_select="h263_decoder"
 flv_encoder_select="h263_encoder"
 fraps_decoder_select="huffman"
-h261_encoder_select="aandct"
+h261_encoder_select="aandct faandct jpegdct"
 h263_decoder_select="h263_parser"
-h263_encoder_select="aandct"
+h263_encoder_select="aandct faandct jpegdct"
 h263_vaapi_hwaccel_select="vaapi h263_decoder"
 h263i_decoder_select="h263_decoder"
 h263p_encoder_select="h263_encoder"
@@ -1316,9 +1320,9 @@ h264_vdpau_decoder_select="vdpau h264_decoder"
 imc_decoder_select="fft mdct sinewin"
 jpegls_decoder_select="golomb"
 jpegls_encoder_select="golomb"
-ljpeg_encoder_select="aandct"
+ljpeg_encoder_select="aandct faandct jpegdct"
 loco_decoder_select="golomb"
-mjpeg_encoder_select="aandct"
+mjpeg_encoder_select="aandct faandct jpegdct"
 mlp_decoder_select="mlp_parser"
 mp1_decoder_select="mpegaudiodsp"
 mp1float_decoder_select="mpegaudiodsp"
@@ -1336,11 +1340,11 @@ mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder"
 mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
 mpeg_xvmc_decoder_select="mpegvideo_decoder"
 mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
-mpeg1video_encoder_select="aandct"
+mpeg1video_encoder_select="aandct faandct jpegdct"
 mpeg2_dxva2_hwaccel_deps="dxva2api_h"
 mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder"
 mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
-mpeg2video_encoder_select="aandct"
+mpeg2video_encoder_select="aandct faandct jpegdct"
 mpeg4_decoder_select="h263_decoder mpeg4video_parser"
 mpeg4_encoder_select="h263_encoder"
 mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder"
@@ -1355,6 +1359,7 @@ nellymoser_decoder_select="mdct sinewin"
 nellymoser_encoder_select="mdct sinewin"
 png_decoder_select="zlib"
 png_encoder_select="zlib"
+prores_encoder_select="jpegdct"
 qcelp_decoder_select="lsp"
 qdm2_decoder_select="mdct rdft mpegaudiodsp"
 ra_144_encoder_select="lpc"
@@ -1367,8 +1372,8 @@ rv40_decoder_select="golomb h264chroma h264pred"
 shorten_decoder_select="golomb"
 sipr_decoder_select="lsp"
 snow_decoder_select="dwt"
-snow_encoder_select="aandct dwt"
-svq1_encoder_select="aandct"
+snow_encoder_select="aandct dwt faandct jpegdct"
+svq1_encoder_select="aandct faandct jpegdct"
 svq3_decoder_select="golomb h264chroma h264dsp h264pred"
 svq3_decoder_suggest="zlib"
 theora_decoder_select="vp3_decoder"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 76bbd27..a787361 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -24,10 +24,10 @@ OBJS = allcodecs.o                                          
            \
 # parts needed for many different codecs
 OBJS-$(CONFIG_AANDCT)                  += aandcttab.o
 OBJS-$(CONFIG_AC3DSP)                  += ac3dsp.o
-OBJS-$(CONFIG_ENCODERS)                += faandct.o jfdctfst.o jfdctint.o
 OBJS-$(CONFIG_DCT)                     += dct.o dct32_fixed.o dct32_float.o
 OBJS-$(CONFIG_DWT)                     += dwt.o
 OBJS-$(CONFIG_DXVA2)                   += dxva2.o
+OBJS-$(CONFIG_FAANDCT)                 += faandct.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-OBJS-yes)
@@ -35,6 +35,7 @@ OBJS-$(CONFIG_GOLOMB)                  += golomb.o
 OBJS-$(CONFIG_H264DSP)                 += h264dsp.o h264idct.o
 OBJS-$(CONFIG_H264PRED)                += h264pred.o
 OBJS-$(CONFIG_HUFFMAN)                 += huffman.o
+OBJS-$(CONFIG_JPEGDCT)                 += jfdctfst.o jfdctint.o
 OBJS-$(CONFIG_LPC)                     += lpc.o
 OBJS-$(CONFIG_LSP)                     += lsp.o
 OBJS-$(CONFIG_MDCT)                    += mdct_fixed.o mdct_float.o
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index bd10054..9b8d7c0 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2790,25 +2790,27 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 
     ff_check_alignment();
 
-#if CONFIG_ENCODERS
+#if CONFIG_FAANDCT || CONFIG_JPEGDCT
     if (avctx->bits_per_raw_sample == 10) {
         c->fdct    = ff_jpeg_fdct_islow_10;
         c->fdct248 = ff_fdct248_islow_10;
     } else {
+#if CONFIG_FAANDCT
+        if(avctx->dct_algo==FF_DCT_FAAN) {
+            c->fdct    = ff_faandct;
+            c->fdct248 = ff_faandct248;
+        }
+#endif
         if(avctx->dct_algo==FF_DCT_FASTINT) {
             c->fdct    = ff_fdct_ifast;
             c->fdct248 = ff_fdct_ifast248;
         }
-        else if(avctx->dct_algo==FF_DCT_FAAN) {
-            c->fdct    = ff_faandct;
-            c->fdct248 = ff_faandct248;
-        }
         else {
             c->fdct    = ff_jpeg_fdct_islow_8; //slow/accurate/default
             c->fdct248 = ff_fdct248_islow_8;
         }
     }
-#endif //CONFIG_ENCODERS
+#endif /* CONFIG_FAANDCT || CONFIG_JPEGDCT */
 
     if(avctx->lowres==1){
         c->idct_put= ff_jref_idct4_put;
-- 
1.7.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to