]> git.sesse.net Git - fjl/commitdiff
Add IDCT choices. This is rapidly becoming a bit fugly dep-wise, though.
authorsgunderson@bigfoot.com <>
Sat, 30 May 2009 23:31:52 +0000 (01:31 +0200)
committersgunderson@bigfoot.com <>
Sat, 30 May 2009 23:31:52 +0000 (01:31 +0200)
Makefile
choice.c
choice.h

index 526a9cc1587ae97e829899a4f2bc5c05def3e5a6..464ccbe3ef124d9c729056ba7807c2489f8232b6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ DEHUFF_TEST_OBJS=dehuff.o input.o bitsource.o dehuff_test.o
 dehuff_test: $(DEHUFF_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(DEHUFF_TEST_OBJS)
 
-BYTESOURCE_TEST_OBJS=bytesource.o choice.o unstuff.o bytesource_test.o
+BYTESOURCE_TEST_OBJS=bytesource.o choice.o unstuff.o bytesource_test.o idct_float.o
 bytesource_test: $(BYTESOURCE_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(BYTESOURCE_TEST_OBJS)
 
index 7ddcd13245e8dee440026ae66e7e657db1b85a00..9d7d45140cb31fae9a957147ce822ab2c5c47887 100644 (file)
--- a/choice.c
+++ b/choice.c
@@ -1,9 +1,18 @@
 #include "choice.h"
+#include "idct_float.h"
 
 unstuff_func_t* unstuff_choice = NULL;
+idct_alloc_t* idct_choice_alloc = NULL;
+idct_free_t* idct_choice_free = NULL;
+idct_func_t* idct_choice = NULL;
 
 void init_choices()
 {
        // TODO: Pick the SSE4.1 version if applicable.
        unstuff_choice = unstuff_fast;
+
+       // TODO: Add vectorized IDCTs.
+       idct_choice_alloc = idct_float_alloc;
+       idct_choice_free = idct_float_free;
+       idct_choice = idct_float;
 }
index 29467c47299cdff63ee36d995e82b1a85661ba0b..d658dc8d1b793eea8f72dd2939677b79f6b8772f 100644 (file)
--- a/choice.h
+++ b/choice.h
@@ -2,8 +2,12 @@
 #define _CHOICE_H
 
 #include "unstuff.h"
+#include "idct.h"
 
 extern unstuff_func_t* unstuff_choice;
+extern idct_alloc_t* idct_choice_alloc;
+extern idct_free_t* idct_choice_free;
+extern idct_func_t* idct_choice;
 
 void init_choices();