mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
videobalance: Stop using liboil
The used liboil function is deprecated and has no optimized implementation anyway.
This commit is contained in:
parent
bc2edb9706
commit
17ba0818b1
1 changed files with 8 additions and 25 deletions
|
@ -44,9 +44,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstvideobalance.h"
|
#include "gstvideobalance.h"
|
||||||
#ifdef HAVE_LIBOIL
|
|
||||||
#include <liboil/liboil.h>
|
|
||||||
#endif
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -61,7 +58,7 @@
|
||||||
#define rint(x) (floor((x)+0.5))
|
#define rint(x) (floor((x)+0.5))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GstVideoBalance signals and args */
|
/* GstVideoBalance properties */
|
||||||
#define DEFAULT_PROP_CONTRAST 1.0
|
#define DEFAULT_PROP_CONTRAST 1.0
|
||||||
#define DEFAULT_PROP_BRIGHTNESS 0.0
|
#define DEFAULT_PROP_BRIGHTNESS 0.0
|
||||||
#define DEFAULT_PROP_HUE 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 */
|
/* Useful macros */
|
||||||
#define GST_VIDEO_I420_Y_ROWSTRIDE(width) (GST_ROUND_UP_4(width))
|
#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)
|
#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);
|
ystride = GST_VIDEO_I420_Y_ROWSTRIDE (width);
|
||||||
|
|
||||||
for (y = 0; y < height; y++) {
|
for (y = 0; y < height; y++) {
|
||||||
oil_tablelookup_u8 (ydata, 1, ydata, 1, videobalance->tabley, 1, width);
|
guint8 *yptr;
|
||||||
ydata += ystride;
|
|
||||||
|
yptr = ydata + y * ystride;
|
||||||
|
for (x = 0; x < width; x++) {
|
||||||
|
*ydata = videobalance->tabley[*ydata];
|
||||||
|
ydata++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
width2 = width >> 1;
|
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->set_caps = GST_DEBUG_FUNCPTR (gst_video_balance_set_caps);
|
||||||
trans_class->transform_ip =
|
trans_class->transform_ip =
|
||||||
GST_DEBUG_FUNCPTR (gst_video_balance_transform_ip);
|
GST_DEBUG_FUNCPTR (gst_video_balance_transform_ip);
|
||||||
|
|
||||||
#ifdef HAVE_LIBOIL
|
|
||||||
oil_init ();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue