summaryrefslogtreecommitdiff
path: root/ext/libswscale
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2010-06-15 09:40:18 +0200
committerThijs Vermeir <thijsvermeir@gmail.com>2010-06-15 09:40:18 +0200
commit330d78f4ffd6f96e2c57c767b5315e217fc01e02 (patch)
tree93112bcf441c3ac5cf2c86dd342de72b03c79ef4 /ext/libswscale
parent3d91d93f32672bfe52c3c54234fa40fe4d11128b (diff)
Fix build if ORC is not installed
Diffstat (limited to 'ext/libswscale')
-rw-r--r--ext/libswscale/gstffmpegscale.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c
index 7b971d2..f69af81 100644
--- a/ext/libswscale/gstffmpegscale.c
+++ b/ext/libswscale/gstffmpegscale.c
@@ -33,7 +33,7 @@
#include <gst/base/gstbasetransform.h>
#include <gst/video/video.h>
-#if HAVE_ORC
+#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
@@ -635,15 +635,16 @@ gst_ffmpegscale_set_caps (GstBaseTransform * trans, GstCaps * incaps,
mmx_flags = orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
altivec_flags =
orc_target_get_default_flags (orc_target_get_by_name ("altivec"));
+ swsflags = (mmx_flags & ORC_TARGET_MMX_MMX ? SWS_CPU_CAPS_MMX : 0)
+ | (mmx_flags & ORC_TARGET_MMX_MMXEXT ? SWS_CPU_CAPS_MMX2 : 0)
+ | (mmx_flags & ORC_TARGET_MMX_3DNOW ? SWS_CPU_CAPS_3DNOW : 0)
+ | (altivec_flags & ORC_TARGET_ALTIVEC_ALTIVEC ? SWS_CPU_CAPS_ALTIVEC : 0);
#else
mmx_flags = 0;
altivec_flags = 0;
+ swsflags = 0;
#endif
- swsflags = (mmx_flags & ORC_TARGET_MMX_MMX ? SWS_CPU_CAPS_MMX : 0)
- | (mmx_flags & ORC_TARGET_MMX_MMXEXT ? SWS_CPU_CAPS_MMX2 : 0)
- | (mmx_flags & ORC_TARGET_MMX_3DNOW ? SWS_CPU_CAPS_3DNOW : 0)
- | (altivec_flags & ORC_TARGET_ALTIVEC_ALTIVEC ? SWS_CPU_CAPS_ALTIVEC : 0);
scale->ctx = sws_getContext (scale->in_width, scale->in_height,
scale->in_pixfmt, scale->out_width, scale->out_height, scale->out_pixfmt,
@@ -803,7 +804,7 @@ plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (ffmpegscale_debug, "ffvideoscale", 0,
"video scaling element");
-#if HAVE_ORC
+#ifdef HAVE_ORC
orc_init ();
#endif