mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Convert a few inner loops to use liboil. This is currently optional, and is only enabled if liboil is present (duh!).
Original commit message from CVS: Convert a few inner loops to use liboil. This is currently optional, and is only enabled if liboil is present (duh!). * configure.ac: Check for liboil-0.1 * gst/intfloat/Makefile.am: * gst/intfloat/gstint2float.c: (conv_f32_s16), (scalarmult_f32), (gst_int2float_chain_gint16): * gst/videofilter/Makefile.am: * gst/videofilter/gstvideobalance.c: (gst_videobalance_class_init), (tablelookup_u8), (gst_videobalance_planar411): * gst/videotestsrc/Makefile.am: * gst/videotestsrc/gstvideotestsrc.c: (plugin_init): * gst/videotestsrc/videotestsrc.c: (splat_u8), (paint_hline_YUY2), (paint_hline_IYU2), (paint_hline_str4), (paint_hline_str3), (paint_hline_RGB565), (paint_hline_xRGB1555):
This commit is contained in:
parent
5e7c5ea3b1
commit
ff90d39556
4 changed files with 49 additions and 5 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2004-02-11 David Schleef <ds@schleef.org>
|
||||
|
||||
Convert a few inner loops to use liboil. This is currently
|
||||
optional, and is only enabled if liboil is present (duh!).
|
||||
* configure.ac: Check for liboil-0.1
|
||||
* gst/intfloat/Makefile.am:
|
||||
* gst/intfloat/gstint2float.c: (conv_f32_s16), (scalarmult_f32),
|
||||
(gst_int2float_chain_gint16):
|
||||
* gst/videofilter/Makefile.am:
|
||||
* gst/videofilter/gstvideobalance.c: (gst_videobalance_class_init),
|
||||
(tablelookup_u8), (gst_videobalance_planar411):
|
||||
* gst/videotestsrc/Makefile.am:
|
||||
* gst/videotestsrc/gstvideotestsrc.c: (plugin_init):
|
||||
* gst/videotestsrc/videotestsrc.c: (splat_u8), (paint_hline_YUY2),
|
||||
(paint_hline_IYU2), (paint_hline_str4), (paint_hline_str3),
|
||||
(paint_hline_RGB565), (paint_hline_xRGB1555):
|
||||
|
||||
2004-02-11 David Schleef <ds@schleef.org>
|
||||
|
||||
* ext/lcs/gstcolorspace.c: (colorspace_find_lcs_format),
|
||||
|
|
|
@ -337,6 +337,14 @@ if test "x$HAVE_GDK_LOADERS" == "xyes"; then
|
|||
fi
|
||||
AM_CONDITIONAL(HAVE_GDK_LOADERS, test "x$HAVE_GDK_LOADERS" = "xyes")
|
||||
|
||||
PKG_CHECK_MODULES(LIBOIL, liboil-0.1, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
|
||||
AC_SUBST(LIBOIL_CFLAGS)
|
||||
AC_SUBST(LIBOIL_LIBS)
|
||||
if test "x${HAVE_LIBOIL}" = xyes ; then
|
||||
#AC_DEFINE_UNQUOTED(HAVE_LIBOIL, 1, [Define if liboil is being used])
|
||||
true
|
||||
fi
|
||||
|
||||
dnl ===========================================================================
|
||||
dnl ============================= gst plug-ins ================================
|
||||
dnl ===========================================================================
|
||||
|
|
|
@ -24,9 +24,9 @@ libgstvideoflip_la_LIBADD =
|
|||
libgstvideoflip_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
|
||||
libgstvideobalance_la_SOURCES = gstvideobalance.c
|
||||
libgstvideobalance_la_CFLAGS = $(GST_CFLAGS)
|
||||
libgstvideobalance_la_CFLAGS = $(GST_CFLAGS) $(LIBOIL_CFLAGS)
|
||||
libgstvideobalance_la_LIBADD = $(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la
|
||||
libgstvideobalance_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -lm
|
||||
libgstvideobalance_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBOIL_LIBS) -lm
|
||||
|
||||
libgstgamma_la_SOURCES = gstgamma.c
|
||||
libgstgamma_la_CFLAGS = $(GST_CFLAGS)
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
|
||||
/*#define DEBUG_ENABLED */
|
||||
#include <gstvideobalance.h>
|
||||
#ifdef HAVE_LIBOIL
|
||||
#include <liboil/liboil.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -197,6 +200,10 @@ gst_videobalance_class_init (gpointer g_class, gpointer class_data)
|
|||
gobject_class->dispose = gst_videobalance_dispose;
|
||||
|
||||
videofilter_class->setup = gst_videobalance_setup;
|
||||
|
||||
#ifdef HAVE_LIBOIL
|
||||
oil_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -480,6 +487,19 @@ gst_videobalance_update_tables_planar411 (GstVideobalance *vb)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef HAVE_LIBOIL
|
||||
void 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
|
||||
|
||||
static void gst_videobalance_planar411(GstVideofilter *videofilter,
|
||||
void *dest, void *src)
|
||||
{
|
||||
|
@ -504,9 +524,8 @@ static void gst_videobalance_planar411(GstVideofilter *videofilter,
|
|||
guint8 *csrc = src;
|
||||
|
||||
for(y=0;y<height;y++) {
|
||||
for(x=0;x<width;x++) {
|
||||
cdest[y*width + x] = videobalance->tabley[csrc[y*width + x]];
|
||||
}
|
||||
tablelookup_u8 (cdest + y*width, 1, csrc + y*width, 1,
|
||||
videobalance->tabley, 1, width);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue