From: Sebastian Dröge Date: Sun, 18 Apr 2010 19:37:23 +0000 (+0200) Subject: videobalance: Stop using liboil X-Git-Tag: RELEASE-0.10.23~211 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17ba0818b177c7cb6a086e819e50687019201548;p=platform%2Fupstream%2Fgst-plugins-good.git videobalance: Stop using liboil The used liboil function is deprecated and has no optimized implementation anyway. --- diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c index fb78c12..c9bc9f9 100644 --- a/gst/videofilter/gstvideobalance.c +++ b/gst/videofilter/gstvideobalance.c @@ -44,9 +44,6 @@ #endif #include "gstvideobalance.h" -#ifdef HAVE_LIBOIL -#include -#endif #include #include @@ -61,7 +58,7 @@ #define rint(x) (floor((x)+0.5)) #endif -/* GstVideoBalance signals and args */ +/* GstVideoBalance properties */ #define DEFAULT_PROP_CONTRAST 1.0 #define DEFAULT_PROP_BRIGHTNESS 0.0 #define DEFAULT_PROP_HUE 0.0 @@ -152,21 +149,6 @@ gst_video_balance_update_properties (GstVideoBalance * videobalance) } } -#ifndef HAVE_LIBOIL -static void -oil_tablelookup_u8 (guint8 * dest, int dstr, guint8 * src, int sstr, - guint8 * table, int tstr, int n) -{ - int i; - - for (i = 0; i < n; i++) { - *dest = table[*src * tstr]; - dest += dstr; - src += sstr; - } -} -#endif - /* Useful macros */ #define GST_VIDEO_I420_Y_ROWSTRIDE(width) (GST_ROUND_UP_4(width)) #define GST_VIDEO_I420_U_ROWSTRIDE(width) (GST_ROUND_UP_8(width)/2) @@ -191,8 +173,13 @@ gst_video_balance_planar411_ip (GstVideoBalance * videobalance, guint8 * data, ystride = GST_VIDEO_I420_Y_ROWSTRIDE (width); for (y = 0; y < height; y++) { - oil_tablelookup_u8 (ydata, 1, ydata, 1, videobalance->tabley, 1, width); - ydata += ystride; + guint8 *yptr; + + yptr = ydata + y * ystride; + for (x = 0; x < width; x++) { + *ydata = videobalance->tabley[*ydata]; + ydata++; + } } width2 = width >> 1; @@ -384,10 +371,6 @@ gst_video_balance_class_init (gpointer g_class, gpointer class_data) trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_video_balance_set_caps); trans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_video_balance_transform_ip); - -#ifdef HAVE_LIBOIL - oil_init (); -#endif } static void