Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit deb8006

Browse files
haitaohuangxhaihao
authored andcommitted
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 <[email protected]>
1 parent aeaa2a1 commit deb8006

File tree

4 files changed

+192
-1
lines changed

4 files changed

+192
-1
lines changed

Android.mk

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Recursive call sub-folder Android.mk
2+
#
3+
4+
include $(call all-subdir-makefiles)

src/Android.mk

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright (c) 2012 Intel Corporation. All Rights Reserved.
2+
#
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a
5+
# copy of this software and associated documentation files (the
6+
# "Software"), to deal in the Software without restriction, including
7+
# without limitation the rights to use, copy, modify, merge, publish,
8+
# distribute, sub license, and/or sell copies of the Software, and to
9+
# permit persons to whom the Software is furnished to do so, subject to
10+
# the following conditions:
11+
#
12+
# The above copyright notice and this permission notice (including the
13+
# next paragraph) shall be included in all copies or substantial portions
14+
# of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19+
# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20+
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+
#
24+
25+
LOCAL_PATH:= $(call my-dir)
26+
27+
include $(CLEAR_VARS)
28+
29+
LOCAL_SRC_FILES := \
30+
gen6_mfc.c \
31+
gen6_mfd.c \
32+
gen6_vme.c \
33+
gen7_mfd.c \
34+
i965_avc_bsd.c \
35+
i965_avc_hw_scoreboard.c\
36+
i965_avc_ildb.c \
37+
i965_decoder_utils.c \
38+
i965_drv_video.c \
39+
i965_encoder.c \
40+
i965_media.c \
41+
i965_media_h264.c \
42+
i965_media_mpeg2.c \
43+
i965_post_processing.c \
44+
i965_render.c \
45+
intel_batchbuffer.c \
46+
intel_batchbuffer_dump.c\
47+
intel_driver.c \
48+
intel_memman.c \
49+
object_heap.c
50+
51+
LOCAL_CFLAGS := -DLINUX -DANDROID -g -Wall -Wno-unused -fvisibility=hidden
52+
53+
LOCAL_C_INCLUDES := \
54+
$(TARGET_OUT_HEADERS)/libva \
55+
$(TARGET_OUT_HEADERS)/libdrm
56+
57+
LOCAL_MODULE_TAGS := optional
58+
LOCAL_MODULE := i965_drv_video
59+
60+
LOCAL_SHARED_LIBRARIES := libdl libdrm libdrm_intel libcutils \
61+
libva libva-android libstdc++
62+
63+
ifeq ($(strip $(DRIVER_LOG_ENABLE)),true)
64+
LOCAL_CFLAGS += -DDRIVER_LOG_ENABLE
65+
LOCAL_SHARED_LIBRARIES += liblog
66+
endif
67+
68+
include $(BUILD_SHARED_LIBRARY)
69+
70+

src/config_android.h

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/* src/config.h. Generated from config.h.in by configure. */
2+
/* src/config.h.in. Generated from configure.ac by autoheader. */
3+
/* NOTE: THIS VERSION IS FOR ANDROID ONLY and manually adjusted */
4+
5+
/* Define if building universal (internal helper macro) */
6+
/* #undef AC_APPLE_UNIVERSAL_BUILD */
7+
8+
/* Define to 1 if you have the <dlfcn.h> header file. */
9+
#define HAVE_DLFCN_H 1
10+
11+
/* Define to 1 if you have the <inttypes.h> header file. */
12+
#define HAVE_INTTYPES_H 1
13+
14+
/* Defined to 1 if VA-API exposes JPEG decoding */
15+
#define HAVE_JPEG_DECODING 1
16+
17+
/* Define to 1 if you have the <memory.h> header file. */
18+
#define HAVE_MEMORY_H 1
19+
20+
/* Define to 1 if you have the <stdint.h> header file. */
21+
#define HAVE_STDINT_H 1
22+
23+
/* Define to 1 if you have the <stdlib.h> header file. */
24+
#define HAVE_STDLIB_H 1
25+
26+
/* Define to 1 if you have the <strings.h> header file. */
27+
#define HAVE_STRINGS_H 1
28+
29+
/* Define to 1 if you have the <string.h> header file. */
30+
#define HAVE_STRING_H 1
31+
32+
/* Define to 1 if you have the <sys/stat.h> header file. */
33+
#define HAVE_SYS_STAT_H 1
34+
35+
/* Define to 1 if you have the <sys/types.h> header file. */
36+
#define HAVE_SYS_TYPES_H 1
37+
38+
/* Define to 1 if you have the <unistd.h> header file. */
39+
#define HAVE_UNISTD_H 1
40+
41+
/* Major version of the driver */
42+
#define INTEL_DRIVER_MAJOR_VERSION 1
43+
44+
/* Micro version of the driver */
45+
#define INTEL_DRIVER_MICRO_VERSION 16
46+
47+
/* Minor version of the driver */
48+
#define INTEL_DRIVER_MINOR_VERSION 0
49+
50+
/* Preversion of the driver */
51+
#define INTEL_DRIVER_PRE_VERSION 1
52+
53+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
54+
*/
55+
#define LT_OBJDIR ".libs/"
56+
57+
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
58+
/* #undef NO_MINUS_C_MINUS_O */
59+
60+
/* Name of package */
61+
#define PACKAGE "libva-driver-intel"
62+
63+
/* Define to the address where bug reports for this package should be sent. */
64+
#define PACKAGE_BUGREPORT "[email protected]"
65+
66+
/* Define to the full name of this package. */
67+
#define PACKAGE_NAME "intel_driver"
68+
69+
/* Define to the full name and version of this package. */
70+
#define PACKAGE_STRING "intel_driver 1.0.16.pre1"
71+
72+
/* Define to the one symbol short name of this package. */
73+
#define PACKAGE_TARNAME "libva-driver-intel"
74+
75+
/* Define to the home page for this package. */
76+
#define PACKAGE_URL ""
77+
78+
/* Define to the version of this package. */
79+
#define PACKAGE_VERSION "1.0.16.pre1"
80+
81+
/* Define to 1 if you have the ANSI C header files. */
82+
#define STDC_HEADERS 1
83+
84+
/* Define driver entry-point */
85+
#define VA_DRIVER_INIT_FUNC __vaDriverInit_0_33
86+
87+
/* Version number of package */
88+
#define VERSION "1.0.16.pre1"
89+
90+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
91+
significant byte first (like Motorola and SPARC, unlike Intel). */
92+
#if defined AC_APPLE_UNIVERSAL_BUILD
93+
# if defined __BIG_ENDIAN__
94+
# define WORDS_BIGENDIAN 1
95+
# endif
96+
#else
97+
# ifndef WORDS_BIGENDIAN
98+
/* # undef WORDS_BIGENDIAN */
99+
# endif
100+
#endif
101+
102+
/* Number of bits in a file offset, on hosts where this is settable. */
103+
/* #undef _FILE_OFFSET_BITS */
104+
105+
/* Define for large files, on AIX-style hosts. */
106+
/* #undef _LARGE_FILES */
107+
#ifdef ANDROID
108+
#define Drawable unsigned int
109+
#endif

src/i965_drv_video.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
* Zou Nan hai <[email protected]>
2727
*
2828
*/
29-
29+
#ifdef ANDROID
30+
#include "config_android.h"
31+
#else
3032
#include "config.h"
33+
#endif
3134
#include <stdio.h>
3235
#include <stdlib.h>
3336
#include <string.h>
@@ -3020,6 +3023,11 @@ i965_PutSurface(VADriverContextP ctx,
30203023
unsigned int number_cliprects, /* number of clip rects in the clip list */
30213024
unsigned int flags) /* de-interlacing flags */
30223025
{
3026+
#ifdef ANDROID
3027+
/*dummy function to keep libva API but android does not use this
3028+
* method to route information to display*/
3029+
return VA_STATUS_SUCCESS;
3030+
#endif
30233031
struct i965_driver_data *i965 = i965_driver_data(ctx);
30243032
struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
30253033
struct i965_render_state *render_state = &i965->render_state;

0 commit comments

Comments
 (0)