---
configure | 3 +++
libavcodec/Makefile | 3 ++-
libavcodec/dct-test.c | 2 ++
libavcodec/dsputil.c | 2 ++
libavcodec/mpegvideo_enc.c | 2 +-
5 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 7418bca..a98b510 100755
--- a/configure
+++ b/configure
@@ -114,6 +114,7 @@ Component options:
--disable-w32threads disable Win32 threads [auto]
--enable-x11grab enable X11 grabbing [no]
--disable-network disable network support [no]
+ --disable-faandct disable floating point AAN DCT code
--disable-dct disable DCT code
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
@@ -934,6 +935,7 @@ CONFIG_LIST="
doc
dwt
dxva2
+ faandct
fastdiv
fft
frei0r
@@ -1691,6 +1693,7 @@ enable swscale
enable asm
enable debug
enable doc
+enable faandct
enable fastdiv
enable network
enable optimizations
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 4dc218a..2d7b55e 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -24,10 +24,11 @@ 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_ENCODERS) += 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)
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index bc5f2c5..e1db9dd 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -78,7 +78,9 @@ static int cpu_flags;
static const struct algo fdct_tab[] = {
{ "REF-DBL", ff_ref_fdct, NO_PERM },
+#if CONFIG_FAANDCT
{ "FAAN", ff_faandct, NO_PERM },
+#endif
{ "IJG-AAN-INT", ff_fdct_ifast, SCALE_PERM },
{ "IJG-LLM-INT", ff_jpeg_fdct_islow_8, NO_PERM },
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index f5b7d07..5088c6a 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2789,10 +2789,12 @@ av_cold void ff_dsputil_init(DSPContext* c,
AVCodecContext *avctx)
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
else {
c->fdct = ff_jpeg_fdct_islow_8; //slow/accurate/default
c->fdct248 = ff_fdct248_islow_8;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 19aa4b4..9699da9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -80,7 +80,7 @@ void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64],
int i;
if (dsp->fdct == ff_jpeg_fdct_islow_8 ||
dsp->fdct == ff_jpeg_fdct_islow_10 ||
- dsp->fdct == ff_faandct) {
+ (dsp->fdct == ff_faandct && CONFIG_FAANDCT)) {
for (i = 0; i < 64; i++) {
const int j = dsp->idct_permutation[i];
/* 16 <= qscale * quant_matrix[i] <= 7905
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel