It is not a user-accessible option and unlikely to ever be changed.
---
 libavcodec/dct-test.c      |    8 +-------
 libavcodec/faandct.c       |    6 +-----
 libavcodec/faandct.h       |    2 --
 libavcodec/mpegvideo_enc.c |   25 +++++--------------------
 4 files changed, 7 insertions(+), 34 deletions(-)

diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 1787ef6..bc5f2c5 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -74,17 +74,11 @@ struct algo {
     int nonspec;
 };
 
-#ifndef FAAN_POSTSCALE
-#define FAAN_SCALE SCALE_PERM
-#else
-#define FAAN_SCALE NO_PERM
-#endif
-
 static int cpu_flags;
 
 static const struct algo fdct_tab[] = {
     { "REF-DBL",        ff_ref_fdct,           NO_PERM    },
-    { "FAAN",           ff_faandct,            FAAN_SCALE },
+    { "FAAN",           ff_faandct,            NO_PERM    },
     { "IJG-AAN-INT",    ff_fdct_ifast,         SCALE_PERM },
     { "IJG-LLM-INT",    ff_jpeg_fdct_islow_8,  NO_PERM    },
 
diff --git a/libavcodec/faandct.c b/libavcodec/faandct.c
index a986f65..e438a9c 100644
--- a/libavcodec/faandct.c
+++ b/libavcodec/faandct.c
@@ -29,11 +29,7 @@
 #include "faandct.h"
 
 #define FLOAT float
-#ifdef FAAN_POSTSCALE
-#    define SCALE(x) postscale[x]
-#else
-#    define SCALE(x) 1
-#endif
+#define SCALE(x) postscale[x]
 
 //numbers generated by simple c code (not as accurate as they could be)
 /*
diff --git a/libavcodec/faandct.h b/libavcodec/faandct.h
index da8c0e4..cd98236 100644
--- a/libavcodec/faandct.h
+++ b/libavcodec/faandct.h
@@ -31,8 +31,6 @@
 
 #include "dsputil.h"
 
-#define FAAN_POSTSCALE
-
 void ff_faandct(DCTELEM * data);
 void ff_faandct248(DCTELEM * data);
 
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 7074dda..19aa4b4 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -79,11 +79,8 @@ void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64],
     for (qscale = qmin; qscale <= qmax; qscale++) {
         int i;
         if (dsp->fdct == ff_jpeg_fdct_islow_8 ||
-            dsp->fdct == ff_jpeg_fdct_islow_10
-#ifdef FAAN_POSTSCALE
-            || dsp->fdct == ff_faandct
-#endif
-            ) {
+            dsp->fdct == ff_jpeg_fdct_islow_10 ||
+            dsp->fdct == ff_faandct) {
             for (i = 0; i < 64; i++) {
                 const int j = dsp->idct_permutation[i];
                 /* 16 <= qscale * quant_matrix[i] <= 7905
@@ -95,11 +92,7 @@ void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64],
                 qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) /
                                         (qscale * quant_matrix[j]));
             }
-        } else if (dsp->fdct == ff_fdct_ifast
-#ifndef FAAN_POSTSCALE
-                   || dsp->fdct == ff_faandct
-#endif
-                   ) {
+        } else if (dsp->fdct == ff_fdct_ifast) {
             for (i = 0; i < 64; i++) {
                 const int j = dsp->idct_permutation[i];
                 /* 16 <= qscale * quant_matrix[i] <= 7905
@@ -138,11 +131,7 @@ void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64],
 
         for (i = intra; i < 64; i++) {
             int64_t max = 8191;
-            if (dsp->fdct == ff_fdct_ifast
-#ifndef FAAN_POSTSCALE
-                || dsp->fdct == ff_faandct
-#endif
-               ) {
+            if (dsp->fdct == ff_fdct_ifast) {
                 max = (8191LL * ff_aanscales[i]) >> 14;
             }
             while (((max * qmat[qscale][i]) >> shift) > INT_MAX) {
@@ -3474,11 +3463,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
         int dct_coeff= FFABS(block[ scantable[i] ]);
         int best_score=256*256*256*120;
 
-        if (   s->dsp.fdct == ff_fdct_ifast
-#ifndef FAAN_POSTSCALE
-            || s->dsp.fdct == ff_faandct
-#endif
-           )
+        if (s->dsp.fdct == ff_fdct_ifast)
             dct_coeff= (dct_coeff*ff_inv_aanscales[ scantable[i] ]) >> 12;
         zero_distortion= dct_coeff*dct_coeff;
 
-- 
1.7.1

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

Reply via email to