[FFmpeg-cvslog] lavc: put FF_IDCT_{VP3, H264, CAVS, BINK, EA, WMV2} under FF_API_IDCT.

Ronald S. Bultje git at videolan.org
Mon Jan 21 16:21:47 CET 2013


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sun Jan 20 22:15:28 2013 -0800| [93af2734ee609133eaeca28329d7f13241dd411f] | committer: Ronald S. Bultje

lavc: put FF_IDCT_{VP3,H264,CAVS,BINK,EA,WMV2} under FF_API_IDCT.

This allows us to get rid of them on the next major bump. All of the
above are functionally irrelevant, and most of them are unused, except
the vp3 one, which is used wrongly in the bfin arch optimizations.

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

 libavcodec/avcodec.h           |   12 +++++++-----
 libavcodec/bfin/dsputil_bfin.c |    3 ++-
 libavcodec/bink.c              |    1 -
 libavcodec/mss2.c              |    3 ---
 libavcodec/options_table.h     |    2 ++
 libavcodec/vc1dec.c            |    4 ----
 libavcodec/version.h           |    3 +++
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 09b9b42..e60119e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2680,20 +2680,22 @@ typedef struct AVCodecContext {
 #define FF_IDCT_ALTIVEC       8
 #define FF_IDCT_SH4           9
 #define FF_IDCT_SIMPLEARM     10
-#define FF_IDCT_H264          11
-#define FF_IDCT_VP3           12
 #define FF_IDCT_IPP           13
 #define FF_IDCT_XVIDMMX       14
-#define FF_IDCT_CAVS          15
 #define FF_IDCT_SIMPLEARMV5TE 16
 #define FF_IDCT_SIMPLEARMV6   17
 #define FF_IDCT_SIMPLEVIS     18
-#define FF_IDCT_WMV2          19
 #define FF_IDCT_FAAN          20
-#define FF_IDCT_EA            21
 #define FF_IDCT_SIMPLENEON    22
 #define FF_IDCT_SIMPLEALPHA   23
+#if FF_API_IDCT
+#define FF_IDCT_H264          11
+#define FF_IDCT_VP3           12
+#define FF_IDCT_CAVS          15
+#define FF_IDCT_WMV2          19
+#define FF_IDCT_EA            21
 #define FF_IDCT_BINK          24
+#endif
 
 #if FF_API_DSP_MASK
     /**
diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c
index 8597ec1..52860c6 100644
--- a/libavcodec/bfin/dsputil_bfin.c
+++ b/libavcodec/bfin/dsputil_bfin.c
@@ -257,7 +257,8 @@ void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
         if (avctx->dct_algo == FF_DCT_AUTO)
             c->fdct                  = ff_bfin_fdct;
 
-        if (avctx->idct_algo == FF_IDCT_VP3) {
+        // FIXME convert to VP3DSPContext
+        if (0) { // avctx->idct_algo == FF_IDCT_VP3) {
             c->idct_permutation_type = FF_NO_IDCT_PERM;
             c->idct                  = ff_bfin_vp3_idct;
             c->idct_add              = ff_bfin_vp3_idct_add;
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 0967ad9..b81fda5 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -1304,7 +1304,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
 
     avctx->pix_fmt = c->has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
 
-    avctx->idct_algo = FF_IDCT_BINK;
     ff_dsputil_init(&c->dsp, avctx);
     ff_binkdsp_init(&c->bdsp);
 
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index f608652..9936272 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -760,9 +760,6 @@ static av_cold int wmv9_init(AVCodecContext *avctx)
     avctx->flags |= CODEC_FLAG_EMU_EDGE;
     v->s.flags   |= CODEC_FLAG_EMU_EDGE;
 
-    if (avctx->idct_algo == FF_IDCT_AUTO)
-        avctx->idct_algo = FF_IDCT_WMV2;
-
     if ((ret = ff_vc1_init_common(v)) < 0)
         return ret;
     ff_vc1dsp_init(&v->vc1dsp);
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index b58f847..f2e8312 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -207,8 +207,10 @@ static const AVOption options[]={
 {"simplearmv6", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV6 }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simpleneon", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLENEON }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simplealpha", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEALPHA }, INT_MIN, INT_MAX, V|E|D, "idct"},
+#if FF_API_IDCT
 {"h264", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_H264 }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"vp3", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_VP3 }, INT_MIN, INT_MAX, V|E|D, "idct"},
+#endif
 {"ipp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_IPP }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"xvidmmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVIDMMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"faani", "floating point AAN IDCT", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"},
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index c29f91c..8e7b0ea 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5162,10 +5162,6 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
     avctx->flags |= CODEC_FLAG_EMU_EDGE;
     v->s.flags   |= CODEC_FLAG_EMU_EDGE;
 
-    if (avctx->idct_algo == FF_IDCT_AUTO) {
-        avctx->idct_algo = FF_IDCT_WMV2;
-    }
-
     if (ff_vc1_init_common(v) < 0)
         return -1;
     ff_vc1dsp_init(&v->vc1dsp);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index c497edb..62f2bcd 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -94,5 +94,8 @@
 #ifndef FF_API_SNOW
 #define FF_API_SNOW              (LIBAVCODEC_VERSION_MAJOR < 55)
 #endif
+#ifndef FF_API_IDCT
+#define FF_API_IDCT              (LIBAVCODEC_VERSION_MAJOR < 55)
+#endif
 
 #endif /* AVCODEC_VERSION_H */



More information about the ffmpeg-cvslog mailing list