From: David Schleef Date: Tue, 8 Jun 2010 21:54:49 +0000 (-0700) Subject: deinterlace: implement greedy in Orc X-Git-Tag: 1.19.3~509^2~8229 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02196850dd48eed6f00a62405ee0544c65b5f302;p=platform%2Fupstream%2Fgstreamer.git deinterlace: implement greedy in Orc --- diff --git a/gst/deinterlace/tvtime.orc b/gst/deinterlace/tvtime.orc index 32e7ab2..f09f539 100644 --- a/gst/deinterlace/tvtime.orc +++ b/gst/deinterlace/tvtime.orc @@ -53,3 +53,51 @@ addw t1, t1, 2 shrsw t1, t1, 2 convsuswb d1, t1 + +.function deinterlace_line_greedy +.dest 1 d1 +.source 1 m0 +.source 1 t1 +.source 1 b1 +.source 1 m2 +.param 1 max_comb +.temp 1 avg +.temp 1 l2_diff +.temp 1 lp2_diff +.temp 1 t2 +.temp 1 t3 +.temp 1 best +.temp 1 min +.temp 1 max + + +avgub avg, t1, b1 +#absdiffb l2_diff, m0, avg +maxub t2, m0, avg +minub t3, m0, avg +subb l2_diff, t2, t3 + +#absdiffb lp2_diff, m2, avg +maxub t2, m2, avg +minub t3, m2, avg +subb lp2_diff, t2, t3 + +#cmpgtub t1, l2_diff, lp2_diff +xorb l2_diff, l2_diff, 0x80 +xorb lp2_diff, lp2_diff, 0x80 +cmpgtsb t3, l2_diff, lp2_diff + +#selectb best, m0, m2, t3 +andb t2, m0, t3 +andnb t3, m2, t3 +orb best, t2, t3 + +maxub max, t1, b1 +minub min, t1, b1 +addusb max, max, max_comb +subusb min, min, max_comb +minub best, best, max +maxub d1, best, min + + + diff --git a/gst/deinterlace/tvtime/greedy.c b/gst/deinterlace/tvtime/greedy.c index ca9be73..7323045 100644 --- a/gst/deinterlace/tvtime/greedy.c +++ b/gst/deinterlace/tvtime/greedy.c @@ -37,6 +37,7 @@ #ifdef HAVE_ORC #include #endif +#include "tvtime.h" #define GST_TYPE_DEINTERLACE_METHOD_GREEDY_L (gst_deinterlace_method_greedy_l_get_type ()) @@ -126,6 +127,14 @@ deinterlace_greedy_scanline_c (GstDeinterlaceMethodGreedyL * self, } } +static inline void +deinterlace_greedy_scanline_orc (GstDeinterlaceMethodGreedyL * self, + const guint8 * m0, const guint8 * t1, + const guint8 * b1, const guint8 * m2, guint8 * output, gint width) +{ + deinterlace_line_greedy (output, m0, t1, b1, m2, self->max_comb, width); +} + #ifdef BUILD_X86_ASM #include "mmx.h" static void @@ -597,6 +606,7 @@ gst_deinterlace_method_greedy_l_class_init (GstDeinterlaceMethodGreedyLClass * } #else klass->scanline = deinterlace_greedy_scanline_c; + klass->scanline = deinterlace_greedy_scanline_orc; #endif }