summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/libpostproc/gstpostproc.c15
-rw-r--r--ext/libswscale/gstffmpegscale.c13
2 files changed, 15 insertions, 13 deletions
diff --git a/ext/libpostproc/gstpostproc.c b/ext/libpostproc/gstpostproc.c
index 7a78219..7fa0df8 100644
--- a/ext/libpostproc/gstpostproc.c
+++ b/ext/libpostproc/gstpostproc.c
@@ -25,7 +25,7 @@
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
-#if HAVE_ORC
+#ifdef HAVE_ORC
#include <orc/orc.h>
#endif
@@ -296,16 +296,17 @@ change_context (GstPostProc * postproc, gint width, gint height)
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"));
-#else
- mmx_flags = 0;
- altivec_flags = 0;
-#endif
-
ppflags = (mmx_flags & ORC_TARGET_MMX_MMX ? PP_CPU_CAPS_MMX : 0)
| (mmx_flags & ORC_TARGET_MMX_MMXEXT ? PP_CPU_CAPS_MMX2 : 0)
| (mmx_flags & ORC_TARGET_MMX_3DNOW ? PP_CPU_CAPS_3DNOW : 0)
| (altivec_flags & ORC_TARGET_ALTIVEC_ALTIVEC ? PP_CPU_CAPS_ALTIVEC :
0);
+#else
+ mmx_flags = 0;
+ altivec_flags = 0;
+ ppflags = 0;
+#endif
+
postproc->context = pp_get_context (width, height, PP_FORMAT_420 | ppflags);
postproc->width = width;
postproc->height = height;
@@ -895,7 +896,7 @@ plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (postproc_debug, "postproc", 0,
"video postprocessing elements");
-#if HAVE_ORC
+#ifdef HAVE_ORC
orc_init ();
#endif
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