From 3e4982542b8b085e037da35c65975d7ad1b96e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 25 Aug 2008 14:37:45 +0000 Subject: gst/deinterlace2/: First part of the C implementation of the tomsmocomp deinterlacing algorithm. This only supports s... Original commit message from CVS: * gst/deinterlace2/gstdeinterlace2.c: (gst_deinterlace_method_class_init): * gst/deinterlace2/gstdeinterlace2.h: * gst/deinterlace2/tvtime/tomsmocomp.c: (gst_deinterlace_method_tomsmocomp_class_init): * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc: * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc: * gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc: * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc: * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc: * gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc: * gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h: First part of the C implementation of the tomsmocomp deinterlacing algorithm. This only supports search-effort=0 currently, is painfully slow and needs some cleanup later when all search-effort settings are implemented in C. --- .../tvtime/tomsmocomp/TomsMoCompAll2.inc | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc') diff --git a/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc b/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc index 6d3447e5..6a68f08b 100644 --- a/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc +++ b/gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc @@ -21,25 +21,45 @@ static inline int SEARCH_EFFORT_FUNC(0) // we don't try at all ;-) static inline int SEARCH_EFFORT_FUNC(1) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see Search_Effort_Max() for comments #include "SearchLoopTop.inc" RESET_CHROMA // pretend chroma diffs was 255 each #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } static inline int SEARCH_EFFORT_FUNC(3) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see Search_Effort_Max() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA2.inc" RESET_CHROMA // pretend chroma diffs was 255 each #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } static inline int SEARCH_EFFORT_FUNC(5) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see Search_Effort_Max() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA2.inc" @@ -47,11 +67,18 @@ static inline int SEARCH_EFFORT_FUNC(5) RESET_CHROMA // pretend chroma diffs was 255 each #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // 3x3 search static inline int SEARCH_EFFORT_FUNC(9) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchEffortMax() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA.inc" @@ -59,11 +86,18 @@ static inline int SEARCH_EFFORT_FUNC(9) #include "SearchLoopVA.inc" #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // Search 9 with 2 H-half pels added static inline int SEARCH_EFFORT_FUNC(11) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchEffortMax() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA.inc" @@ -72,11 +106,18 @@ static inline int SEARCH_EFFORT_FUNC(11) #include "SearchLoopVA.inc" #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // Search 11 with 2 V-half pels added static inline int SEARCH_EFFORT_FUNC(13) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchEffortMax() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA.inc" @@ -86,11 +127,18 @@ static inline int SEARCH_EFFORT_FUNC(13) #include "SearchLoopVA.inc" #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // 5x3 static inline int SEARCH_EFFORT_FUNC(15) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchEffortMax() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA.inc" @@ -99,11 +147,18 @@ static inline int SEARCH_EFFORT_FUNC(15) #include "SearchLoopVA.inc" #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // 5x3 + 4 half pels static inline int SEARCH_EFFORT_FUNC(19) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchEffortMax() for comments #include "SearchLoopTop.inc" #include "SearchLoopOddA.inc" @@ -114,6 +169,7 @@ static inline int SEARCH_EFFORT_FUNC(19) #include "SearchLoopVA.inc" #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // Handle one 4x1 block of pixels @@ -121,6 +177,12 @@ static inline int SEARCH_EFFORT_FUNC(19) static inline int SEARCH_EFFORT_FUNC(21) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchLoopTop.inc for comments #include "SearchLoopTop.inc" @@ -140,12 +202,19 @@ static inline int SEARCH_EFFORT_FUNC(21) // blend our results and loop #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } // Handle one 4x1 block of pixels // Search a 9x3 area, no half pels static inline int SEARCH_EFFORT_FUNC(Max) { +#ifdef IS_C +#define SKIP_SEARCH +#include "SearchLoopTop.inc" +#include "SearchLoopBottom.inc" +#undef SKIP_SEARCH +#else //see SearchLoopTop.inc for comments #include "SearchLoopTop.inc" @@ -167,6 +236,7 @@ static inline int SEARCH_EFFORT_FUNC(Max) // blend our results and loop #include "SearchLoop0A.inc" #include "SearchLoopBottom.inc" +#endif } #undef SEARCH_EFFORT_FUNC -- cgit v1.2.1