shm="no"
libav="no"
libpng="no"
+dxva2="no"
+vaapi="no"
#
glusterfs=""
glusterfs_discard="no"
;;
--enable-libpng) libpng="yes"
;;
+ --enable-dxva2) dxva2="yes"
+ ;;
+ --enable-vaapi) vaapi="yes"
+ ;;
#
--disable-glusterfs) glusterfs="no"
;;
--enable-libav enable libav library
--disable-libav disable libav library
--enable-libpng enable png library
+ --enable-dxva2 enable dxva2 support
+ --enable-vaapi enable vaapi support
NOTE: The object files are built at the place where configure is launched
EOF
getauxval=yes
fi
+########################################
+# check if dxva2 is available.
+
+if test "$dxva2" = "yes" ; then
+ dxva2="no"
+if test "$mingw32" = "yes" ; then
+cat > $TMPC << EOF
+#include <d3d9.h>
+#include <dxva2api.h>
+int main(void) {
+#if !defined(IDirect3D9_CreateDevice) || \
+ !defined(IDirect3DDeviceManager9_ResetDevice)
+#error No DXVA2 support
+#endif
+ return 0;
+}
+EOF
+if compile_prog "" "" ; then
+ dxva2="yes"
+fi
+else
+ error_exit "DXVA2 is supported only on Windows"
+fi
+fi
+
+########################################
+# check if vaapi is available.
+
+if test "$vaapi" = "yes" ; then
+ vaapi="no"
+if test "$linux" = "yes" ; then
+ if $pkg_config libva --exists; then
+ if $pkg_config libva-x11 --exists; then
+ libva_cflags=`$pkg_config --cflags libva`
+ libva_libs=`$pkg_config --libs libva`
+ libva_x11_cflags=`$pkg_config --cflags libva-x11`
+ libva_x11_libs=`$pkg_config --libs libva-x11`
+
+ libs_softmmu="$libva_libs $libva_x11_libs $libs_softmmu"
+ vaapi="yes"
+ fi
+ fi
+else
+ error_exit "VAAPI is supported only on Linux"
+fi
+fi
+
##########################################
# libav probe
echo "TIZEN-maru shared framebuffer support $shm"
echo "TIZEN-maru libav support $libav"
echo "TIZEN-maru libpng support $libpng"
+echo "TIZEN-maru DXVA2 support $dxva2"
+echo "TIZEN-maru vaapi support $vaapi"
#
if test "$sdl_too_old" = "yes"; then
echo "CONFIG_PNG=y" >> $config_host_mak
echo "LIBPNG_CFLAGS=$libpng_cflags" >> $config_host_mak
fi
+if test "$dxva2" = "yes" ; then
+ echo "CONFIG_DXVA2=y" >> $config_host_mak
+fi
+if test "$vaapi" = "yes" ; then
+ echo "CONFIG_VAAPI=y" >> $config_host_mak
+ echo "LIBVA_CFLAGS=$libva_cflags $libva_x11_cflags" >> $config_host_mak
+fi
# TPM passthrough support?
if test "$tpm" = "yes"; then
LIBS += -ldl
endif
obj-y += maru_brillcodec.o
+obj-$(CONFIG_DXVA2) += maru_dxva2_plugin.o
+obj-$(CONFIG_VAAPI) += maru_brillcodec_vaapi.o
obj-y += maru_brightness.o
LIBS += -lv4l2 -lv4lconvert
endif
ifdef CONFIG_WIN32
-obj-y += maru_dxva2_plugin.o
obj-y += maru_camera_win32_pci.o
LIBS += -lole32 -loleaut32 -luuid -lstrmiids
endif
maru_brillcodec.o-cflags := $(LIBAV_CFLAGS)
maru_brillcodec_device.o-cflags := $(LIBAV_CFLAGS)
+ifdef CONFIG_DXVA2
maru_dxva2_plugin.o-cflags := $(LIBAV_CFLAGS)
+endif
+ifdef CONFIG_VAAPI
+maru_brillcodec_vaapi.o-cflags := $(LIBAV_CFLAGS) $(LIBVA_CFLAGS)
+endif