changeset 8619:ce9b3d6a0abf libavcodec

Alpha: proper IDCT selection Only select the Alpha IDCT if auto or explicitly requested. Also disable it in lowres mode.
author mru
date Sun, 18 Jan 2009 05:52:12 +0000
parents 178755e9663d
children 3d2806d0390a
files alpha/dsputil_alpha.c avcodec.h options.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/alpha/dsputil_alpha.c	Sun Jan 18 05:52:08 2009 +0000
+++ b/alpha/dsputil_alpha.c	Sun Jan 18 05:52:12 2009 +0000
@@ -356,7 +356,11 @@
     put_pixels_clamped_axp_p = c->put_pixels_clamped;
     add_pixels_clamped_axp_p = c->add_pixels_clamped;
 
+    if (!avctx->lowres &&
+        (avctx->idct_algo == FF_IDCT_AUTO ||
+         avctx->idct_algo == FF_IDCT_SIMPLEALPHA)) {
     c->idct_put = simple_idct_put_axp;
     c->idct_add = simple_idct_add_axp;
     c->idct = simple_idct_axp;
+    }
 }
--- a/avcodec.h	Sun Jan 18 05:52:08 2009 +0000
+++ b/avcodec.h	Sun Jan 18 05:52:12 2009 +0000
@@ -1398,6 +1398,7 @@
 #define FF_IDCT_FAAN          20
 #define FF_IDCT_EA            21
 #define FF_IDCT_SIMPLENEON    22
+#define FF_IDCT_SIMPLEALPHA   23
 
     /**
      * slice count
--- a/options.c	Sun Jan 18 05:52:08 2009 +0000
+++ b/options.c	Sun Jan 18 05:52:12 2009 +0000
@@ -210,6 +210,7 @@
 {"simplearmv5te", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARMV5TE, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simplearmv6", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARMV6, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"simpleneon", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLENEON, INT_MIN, INT_MAX, V|E|D, "idct"},
+{"simplealpha", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEALPHA, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"h264", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_H264, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"vp3", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_VP3, INT_MIN, INT_MAX, V|E|D, "idct"},
 {"ipp", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_IPP, INT_MIN, INT_MAX, V|E|D, "idct"},