mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 22:48:49 +00:00
cog: Allow compilation without orc
Also don't ignore --disable-orc. Fixes bug #629897.
This commit is contained in:
parent
544eb38aef
commit
c28c480eb9
5 changed files with 17 additions and 5 deletions
|
@ -602,13 +602,12 @@ AG_GST_CHECK_FEATURE(CELT, [celt], celt, [
|
||||||
dnl *** Cog ***
|
dnl *** Cog ***
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_COG, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_COG, true)
|
||||||
AG_GST_CHECK_FEATURE(COG, [Cog plugin], cog, [
|
AG_GST_CHECK_FEATURE(COG, [Cog plugin], cog, [
|
||||||
PKG_CHECK_MODULES(COG, libpng >= 1.2 orc-0.4 >= $ORC_REQ, HAVE_COG="yes", [
|
PKG_CHECK_MODULES(COG, libpng >= 1.2, HAVE_COG="yes", [
|
||||||
HAVE_COG="no"
|
HAVE_COG="no"
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
AC_SUBST(COG_CFLAGS)
|
AC_SUBST(COG_CFLAGS)
|
||||||
AC_SUBST(COG_LIBS)
|
AC_SUBST(COG_LIBS)
|
||||||
dnl ORCC was set up by Orc check above
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl *** dc1394 ***
|
dnl *** dc1394 ***
|
||||||
|
|
|
@ -8,11 +8,13 @@ libgstcog_la_CFLAGS = \
|
||||||
-I$(srcdir)/.. \
|
-I$(srcdir)/.. \
|
||||||
$(GST_PLUGINS_BASE_CFLAGS) \
|
$(GST_PLUGINS_BASE_CFLAGS) \
|
||||||
$(GST_CFLAGS) \
|
$(GST_CFLAGS) \
|
||||||
|
$(ORC_CFLAGS) \
|
||||||
$(COG_CFLAGS)
|
$(COG_CFLAGS)
|
||||||
libgstcog_la_LIBADD = \
|
libgstcog_la_LIBADD = \
|
||||||
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
|
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
|
||||||
$(GST_BASE_LIBS) \
|
$(GST_BASE_LIBS) \
|
||||||
$(GST_LIBS) \
|
$(GST_LIBS) \
|
||||||
|
$(ORC_LIBS) \
|
||||||
$(COG_LIBS)
|
$(COG_LIBS)
|
||||||
libgstcog_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBM)
|
libgstcog_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBM)
|
||||||
libgstcog_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstcog_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
|
@ -9,7 +9,11 @@
|
||||||
#include <cog/cog.h>
|
#include <cog/cog.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#ifdef HAVE_ORC
|
||||||
#include <orc/orc.h>
|
#include <orc/orc.h>
|
||||||
|
#else
|
||||||
|
#define orc_memcpy memcpy
|
||||||
|
#endif
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include "gstcogorc.h"
|
#include "gstcogorc.h"
|
||||||
|
|
|
@ -23,7 +23,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
#ifdef HAVE_ORC
|
||||||
#include <orc/orc.h>
|
#include <orc/orc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
GType gst_deblock_get_type (void);
|
GType gst_deblock_get_type (void);
|
||||||
GType gst_cogdownsample_get_type (void);
|
GType gst_cogdownsample_get_type (void);
|
||||||
|
@ -38,7 +40,9 @@ GST_DEBUG_CATEGORY (cog_debug);
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_ORC
|
||||||
orc_init ();
|
orc_init ();
|
||||||
|
#endif
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (cog_debug, "cog", 0, "Cog");
|
GST_DEBUG_CATEGORY_INIT (cog_debug, "cog", 0, "Cog");
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cog/cogframe.h>
|
#include <cog/cogframe.h>
|
||||||
|
#ifdef HAVE_ORC
|
||||||
#include <orc/orc.h>
|
#include <orc/orc.h>
|
||||||
|
#endif
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "gstcogutils.h"
|
#include "gstcogutils.h"
|
||||||
|
@ -447,7 +449,7 @@ gst_mse_sink_event (GstPad * pad, GstEvent * event)
|
||||||
static int
|
static int
|
||||||
sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
|
sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
|
||||||
{
|
{
|
||||||
#if 0
|
#ifndef HAVE_ORC
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
int i;
|
int i;
|
||||||
int x;
|
int x;
|
||||||
|
@ -456,8 +458,8 @@ sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
|
||||||
x = s1[i] - s2[i];
|
x = s1[i] - s2[i];
|
||||||
sum += x * x;
|
sum += x * x;
|
||||||
}
|
}
|
||||||
d_1[0] = sum;
|
return sum;
|
||||||
#endif
|
#else
|
||||||
static OrcProgram *p = NULL;
|
static OrcProgram *p = NULL;
|
||||||
OrcExecutor *ex;
|
OrcExecutor *ex;
|
||||||
int val;
|
int val;
|
||||||
|
@ -494,6 +496,7 @@ sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
|
||||||
orc_executor_free (ex);
|
orc_executor_free (ex);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static double
|
static double
|
||||||
|
|
Loading…
Reference in a new issue