mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
dtsdec: Use orc for CPU feature detection
This commit is contained in:
parent
b1a12c3a2d
commit
8474fd9518
2 changed files with 14 additions and 11 deletions
|
@ -1,8 +1,8 @@
|
|||
plugin_LTLIBRARIES = libgstdtsdec.la
|
||||
|
||||
libgstdtsdec_la_SOURCES = gstdtsdec.c
|
||||
libgstdtsdec_la_CFLAGS = $(GST_CFLAGS) $(LIBOIL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
|
||||
libgstdtsdec_la_LIBADD = $(DTS_LIBS) $(LIBOIL_LIBS) $(GST_PLUGINS_BASE_LIBS) \
|
||||
libgstdtsdec_la_CFLAGS = $(GST_CFLAGS) $(ORC_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
|
||||
libgstdtsdec_la_LIBADD = $(DTS_LIBS) $(ORC_LIBS) $(GST_PLUGINS_BASE_LIBS) \
|
||||
-lgstaudio-@GST_MAJORMINOR@
|
||||
libgstdtsdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
libgstdtsdec_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
|
|
|
@ -81,9 +81,9 @@ typedef struct dts_state_s dca_state_t;
|
|||
|
||||
#include "gstdtsdec.h"
|
||||
|
||||
#include <liboil/liboil.h>
|
||||
#include <liboil/liboilcpu.h>
|
||||
#include <liboil/liboilfunction.h>
|
||||
#if HAVE_ORC
|
||||
#include <orc/orc.h>
|
||||
#endif
|
||||
|
||||
#if defined(LIBDTS_FIXED) || defined(LIBDCA_FIXED)
|
||||
#define SAMPLE_WIDTH 16
|
||||
|
@ -187,16 +187,19 @@ gst_dtsdec_class_init (GstDtsDecClass * klass)
|
|||
g_param_spec_boolean ("drc", "Dynamic Range Compression",
|
||||
"Use Dynamic Range Compression", FALSE, G_PARAM_READWRITE));
|
||||
|
||||
oil_init ();
|
||||
|
||||
klass->dts_cpuflags = 0;
|
||||
cpuflags = oil_cpu_get_flags ();
|
||||
if (cpuflags & OIL_IMPL_FLAG_MMX)
|
||||
|
||||
#if HAVE_ORC
|
||||
cpuflags = orc_target_get_default_flags (orc_target_get_by_name ("mmx"));
|
||||
if (cpuflags & ORC_TARGET_MMX_MMX)
|
||||
klass->dts_cpuflags |= MM_ACCEL_X86_MMX;
|
||||
if (cpuflags & OIL_IMPL_FLAG_3DNOW)
|
||||
if (cpuflags & ORC_TARGET_MMX_3DNOW)
|
||||
klass->dts_cpuflags |= MM_ACCEL_X86_3DNOW;
|
||||
if (cpuflags & OIL_IMPL_FLAG_MMXEXT)
|
||||
if (cpuflags & ORC_TARGET_MMX_MMXEXT)
|
||||
klass->dts_cpuflags |= MM_ACCEL_X86_MMXEXT;
|
||||
#else
|
||||
klass->dts_cpuflags = 0;
|
||||
#endif
|
||||
|
||||
GST_LOG ("CPU flags: dts=%08x, liboil=%08x", klass->dts_cpuflags, cpuflags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue