cog: Allow compilation without orc

Also don't ignore --disable-orc. Fixes bug #629897.
This commit is contained in:
Sebastian Dröge 2010-09-17 08:43:48 +02:00
parent 544eb38aef
commit c28c480eb9
5 changed files with 17 additions and 5 deletions

View file

@ -602,13 +602,12 @@ AG_GST_CHECK_FEATURE(CELT, [celt], celt, [
dnl *** Cog ***
translit(dnm, m, l) AM_CONDITIONAL(USE_COG, true)
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"
AC_MSG_RESULT(no)
])
AC_SUBST(COG_CFLAGS)
AC_SUBST(COG_LIBS)
dnl ORCC was set up by Orc check above
])
dnl *** dc1394 ***

View file

@ -8,11 +8,13 @@ libgstcog_la_CFLAGS = \
-I$(srcdir)/.. \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \
$(ORC_CFLAGS) \
$(COG_CFLAGS)
libgstcog_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
$(ORC_LIBS) \
$(COG_LIBS)
libgstcog_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBM)
libgstcog_la_LIBTOOLFLAGS = --tag=disable-static

View file

@ -9,7 +9,11 @@
#include <cog/cog.h>
#include <string.h>
#include <math.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#else
#define orc_memcpy memcpy
#endif
#include <gst/gst.h>
#include "gstcogorc.h"

View file

@ -23,7 +23,9 @@
#include <string.h>
#include <gst/gst.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
GType gst_deblock_get_type (void);
GType gst_cogdownsample_get_type (void);
@ -38,7 +40,9 @@ GST_DEBUG_CATEGORY (cog_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
#ifdef HAVE_ORC
orc_init ();
#endif
GST_DEBUG_CATEGORY_INIT (cog_debug, "cog", 0, "Cog");

View file

@ -26,7 +26,9 @@
#include <gst/video/video.h>
#include <string.h>
#include <cog/cogframe.h>
#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
#include <math.h>
#include "gstcogutils.h"
@ -447,7 +449,7 @@ gst_mse_sink_event (GstPad * pad, GstEvent * event)
static int
sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
{
#if 0
#ifndef HAVE_ORC
int sum = 0;
int i;
int x;
@ -456,8 +458,8 @@ sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
x = s1[i] - s2[i];
sum += x * x;
}
d_1[0] = sum;
#endif
return sum;
#else
static OrcProgram *p = NULL;
OrcExecutor *ex;
int val;
@ -494,6 +496,7 @@ sum_square_diff_u8 (uint8_t * s1, uint8_t * s2, int n)
orc_executor_free (ex);
return val;
#endif
}
static double