summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaitao Huang <haitao.huang@intel.com>2012-05-11 08:34:45 -0500
committerXiang, Haihao <haihao.xiang@intel.com>2012-05-14 09:33:03 +0800
commitdeb800644614528c4d873c8ce30ddf7952a370cd (patch)
tree59054e0e6a93f3f5f33bea5c11c27493d9277885
parentaeaa2a11838e653a758afc3b5a9e00f3521d6ac3 (diff)
downloadlibva-intel-driver-deb800644614528c4d873c8ce30ddf7952a370cd.tar.gz
libva-intel-driver-deb800644614528c4d873c8ce30ddf7952a370cd.tar.bz2
libva-intel-driver-deb800644614528c4d873c8ce30ddf7952a370cd.zip
intel-driver: initial porting to Android ICS
Added Android make files, conditionally compile PutSurface implementation, which is not needed for Android ICS. For: AIA-418 Change-Id: Ifd6a6ec2dabd8ee1ad4d34a41b3d274f8817f965 Depends-Change-Id: I2feabf6941379ef4d756e942f30eba059de641f1 Depends-Change-Id: I3452f6e784f11c39d4d925c57cd844bd4cc9dc9e Signed-off-by: Haitao Huang <haitao.huang@intel.com>
-rw-r--r--Android.mk4
-rwxr-xr-xsrc/Android.mk70
-rw-r--r--src/config_android.h109
-rw-r--r--src/i965_drv_video.c10
4 files changed, 192 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..5cbb9d8
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,4 @@
+# Recursive call sub-folder Android.mk
+#
+
+ include $(call all-subdir-makefiles)
diff --git a/src/Android.mk b/src/Android.mk
new file mode 100755
index 0000000..acf0c94
--- /dev/null
+++ b/src/Android.mk
@@ -0,0 +1,70 @@
+# Copyright (c) 2012 Intel Corporation. All Rights Reserved.
+#
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sub license, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice (including the
+# next paragraph) shall be included in all copies or substantial portions
+# of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ gen6_mfc.c \
+ gen6_mfd.c \
+ gen6_vme.c \
+ gen7_mfd.c \
+ i965_avc_bsd.c \
+ i965_avc_hw_scoreboard.c\
+ i965_avc_ildb.c \
+ i965_decoder_utils.c \
+ i965_drv_video.c \
+ i965_encoder.c \
+ i965_media.c \
+ i965_media_h264.c \
+ i965_media_mpeg2.c \
+ i965_post_processing.c \
+ i965_render.c \
+ intel_batchbuffer.c \
+ intel_batchbuffer_dump.c\
+ intel_driver.c \
+ intel_memman.c \
+ object_heap.c
+
+LOCAL_CFLAGS := -DLINUX -DANDROID -g -Wall -Wno-unused -fvisibility=hidden
+
+LOCAL_C_INCLUDES := \
+ $(TARGET_OUT_HEADERS)/libva \
+ $(TARGET_OUT_HEADERS)/libdrm
+
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE := i965_drv_video
+
+LOCAL_SHARED_LIBRARIES := libdl libdrm libdrm_intel libcutils \
+ libva libva-android libstdc++
+
+ifeq ($(strip $(DRIVER_LOG_ENABLE)),true)
+LOCAL_CFLAGS += -DDRIVER_LOG_ENABLE
+LOCAL_SHARED_LIBRARIES += liblog
+endif
+
+include $(BUILD_SHARED_LIBRARY)
+
+
diff --git a/src/config_android.h b/src/config_android.h
new file mode 100644
index 0000000..f3ecb92
--- /dev/null
+++ b/src/config_android.h
@@ -0,0 +1,109 @@
+/* src/config.h. Generated from config.h.in by configure. */
+/* src/config.h.in. Generated from configure.ac by autoheader. */
+/* NOTE: THIS VERSION IS FOR ANDROID ONLY and manually adjusted */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Defined to 1 if VA-API exposes JPEG decoding */
+#define HAVE_JPEG_DECODING 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Major version of the driver */
+#define INTEL_DRIVER_MAJOR_VERSION 1
+
+/* Micro version of the driver */
+#define INTEL_DRIVER_MICRO_VERSION 16
+
+/* Minor version of the driver */
+#define INTEL_DRIVER_MINOR_VERSION 0
+
+/* Preversion of the driver */
+#define INTEL_DRIVER_PRE_VERSION 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "libva-driver-intel"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "haihao.xiang@intel.com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "intel_driver"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "intel_driver 1.0.16.pre1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "libva-driver-intel"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.0.16.pre1"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define driver entry-point */
+#define VA_DRIVER_INIT_FUNC __vaDriverInit_0_33
+
+/* Version number of package */
+#define VERSION "1.0.16.pre1"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* # undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+#ifdef ANDROID
+#define Drawable unsigned int
+#endif
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index a097819..a70e3e6 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -26,8 +26,11 @@
* Zou Nan hai <nanhai.zou@intel.com>
*
*/
-
+#ifdef ANDROID
+#include "config_android.h"
+#else
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -3020,6 +3023,11 @@ i965_PutSurface(VADriverContextP ctx,
unsigned int number_cliprects, /* number of clip rects in the clip list */
unsigned int flags) /* de-interlacing flags */
{
+#ifdef ANDROID
+ /*dummy function to keep libva API but android does not use this
+ * method to route information to display*/
+ return VA_STATUS_SUCCESS;
+#endif
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
struct i965_render_state *render_state = &i965->render_state;