From 2bb0649dfee36292e0a9a5da22375b45cd231ebb Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Sun, 31 May 2009 01:31:52 +0200 Subject: [PATCH] Add IDCT choices. This is rapidly becoming a bit fugly dep-wise, though. --- Makefile | 2 +- choice.c | 9 +++++++++ choice.h | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 526a9cc..464ccbe 100644 --- 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) diff --git a/choice.c b/choice.c index 7ddcd13..9d7d451 100644 --- 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; } diff --git a/choice.h b/choice.h index 29467c4..d658dc8 100644 --- 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(); -- 2.39.2