[FFmpeg-devel] [PATCH 9/9] x86: dct-test: add 12 bits versions
Christophe Gisquet
christophe.gisquet at gmail.com
Fri Oct 9 23:53:46 CEST 2015
---
libavcodec/dct-test.c | 15 +++++++++++++++
libavcodec/x86/dct-test.c | 13 ++++++++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 9a195ab..1c17dd3 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -71,6 +71,10 @@ static const struct algo fdct_tab10[] = {
{ 0 }
};
+static const struct algo fdct_tab12[] = {
+ { 0 }
+};
+
static void ff_prores_idct_wrap(int16_t *dst){
LOCAL_ALIGNED(16, int16_t, qmat, [64]);
int i;
@@ -103,6 +107,11 @@ static const struct algo idct_tab10[] = {
{ 0 }
};
+static const struct algo idct_tab12[] = {
+ { "SIMPLE12-C", ff_simple_idct_12, FF_IDCT_PERM_NONE },
+ { 0 }
+};
+
#if ARCH_ARM
#include "arm/dct-test.c"
#elif ARCH_PPC
@@ -114,6 +123,8 @@ static const struct algo fdct_tab_arch8[] = { { 0 } };
static const struct algo idct_tab_arch8[] = { { 0 } };
static const struct algo fdct_tab_arch10[] = { { 0 } };
static const struct algo idct_tab_arch10[] = { { 0 } };
+static const struct algo fdct_tab_arch12[] = { { 0 } };
+static const struct algo idct_tab_arch12[] = { { 0 } };
#endif
#define AANSCALE_BITS 12
@@ -518,6 +529,10 @@ int main(int argc, char **argv)
idct_tab = idct_tab10; fdct_tab = fdct_tab10;
idct_tab_arch = idct_tab_arch10; fdct_tab_arch = fdct_tab_arch10;
break;
+ case 12:
+ idct_tab = idct_tab12; fdct_tab = fdct_tab12;
+ idct_tab_arch = idct_tab_arch12; fdct_tab_arch = fdct_tab_arch12;
+ break;
default: fprintf(stderr, "No tests for %i bits\n", bits); return 1;
}
if (test_idct) {
diff --git a/libavcodec/x86/dct-test.c b/libavcodec/x86/dct-test.c
index 22a3ecf..6d4a7ed 100644
--- a/libavcodec/x86/dct-test.c
+++ b/libavcodec/x86/dct-test.c
@@ -102,7 +102,18 @@ static const struct algo idct_tab_arch10[] = {
{ 0 }
};
static const struct algo fdct_tab_arch12[] = { { 0 } };
-static const struct algo idct_tab_arch12[] = { { 0 } };
+
+static const struct algo idct_tab_arch12[] = {
+#if HAVE_YASM
+#if HAVE_SSE2_EXTERNAL
+ { "SIMPLE12-SSE2", ff_simple_idct12_sse2, FF_IDCT_PERM_TRANSPOSE, AV_CPU_FLAG_SSE2, 1 },
+#endif
+#if HAVE_AVX_EXTERNAL
+ { "SIMPLE12-AVX", ff_simple_idct12_avx, FF_IDCT_PERM_TRANSPOSE, AV_CPU_FLAG_AVX, 1 },
+#endif
+#endif
+ { 0 }
+};
static const uint8_t idct_simple_mmx_perm[64] = {
0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D,
--
2.6.0
More information about the ffmpeg-devel
mailing list