Commit 9f727ea0 authored by Sebastian Dröge's avatar Sebastian Dröge

gamma: Stop using liboil

The used liboil function is deprecated, only has a reference implementation
and is more complex than what's needed here.
parent 155e48fb
......@@ -35,12 +35,10 @@ libgstvideobalance_la_LIBTOOLFLAGS = --tag=disable-static
libgstgamma_la_SOURCES = gstgamma.c
libgstgamma_la_CFLAGS = $(GST_CFLAGS) $(GST_CONTROLLER_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(LIBOIL_CFLAGS)
$(GST_PLUGINS_BASE_CFLAGS)
libgstgamma_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \
$(GST_CONTROLLER_LIBS) \
$(GST_BASE_LIBS) $(GST_LIBS) \
$(LIBOIL_LIBS)
$(GST_BASE_LIBS) $(GST_LIBS)
libgstgamma_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBM)
libgstgamma_la_LIBTOOLFLAGS = --tag=disable-static
......
......@@ -45,7 +45,6 @@
#endif
#include "gstgamma.h"
#include <liboil/liboil.h>
#include <string.h>
#include <math.h>
......@@ -199,17 +198,27 @@ gst_gamma_calculate_tables (GstGamma * gamma)
static void
gst_gamma_planar_ip (GstGamma * gamma, guint8 * data)
{
gint size;
gint i, j, height;
gint width, row_stride, row_wrap;
const guint8 *table = gamma->gamma_table;
data =
data + gst_video_format_get_component_offset (gamma->format, 0,
gamma->width, gamma->height);
size =
gst_video_format_get_row_stride (gamma->format, 0,
gamma->width) * gst_video_format_get_component_height (gamma->format, 0,
width = gst_video_format_get_component_width (gamma->format, 0, gamma->width);
height = gst_video_format_get_component_height (gamma->format, 0,
gamma->height);
row_stride = gst_video_format_get_row_stride (gamma->format, 0, gamma->width);
row_wrap = row_stride - width;
oil_tablelookup_u8 (data, 1, data, 1, gamma->gamma_table, 1, size);
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
*data = table[*data];
data++;
}
data += row_wrap;
}
}
static gboolean
......@@ -302,7 +311,6 @@ plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gamma_debug, "gamma", 0, "gamma");
oil_init ();
gst_controller_init (NULL, NULL);
return gst_element_register (plugin, "gamma", GST_RANK_NONE, GST_TYPE_GAMMA);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment