summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhuang Yan <yanx.zhuang@intel.com>2010-12-13 15:52:46 +0800
committerZhuang Yan <yanx.zhuang@intel.com>2010-12-13 15:52:46 +0800
commitb7793a6262c9bc862733ecff583d33740deff03d (patch)
tree43526121dfab03507dde8671d5202468d6eaa34d
parentaa1882c0e67529dad7e854b831af80325ca94736 (diff)
downloadlibva-b7793a6262c9bc862733ecff583d33740deff03d.tar.gz
test
-rw-r--r--Android.mk2
-rw-r--r--test/putsurface/Makefile.am2
-rw-r--r--test/putsurface/loadsurface.h9
3 files changed, 7 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk
index ba71130..86fe2f1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -4,4 +4,6 @@
LOCAL_PATH := $(my-dir)
include $(LOCAL_PATH)/va/Android.mk
+include $(LOCAL_PATH)/../test/putsurface/Android.mk
+
diff --git a/test/putsurface/Makefile.am b/test/putsurface/Makefile.am
index fe18388..c52d29e 100644
--- a/test/putsurface/Makefile.am
+++ b/test/putsurface/Makefile.am
@@ -27,7 +27,7 @@ AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) -lpthread
putsurface_LDADD = $(TEST_LIBS)
-putsurface_SOURCES = putsurface.c
+putsurface_SOURCES = putsurface.cpp
EXTRA_DIST = loadsurface.h
diff --git a/test/putsurface/loadsurface.h b/test/putsurface/loadsurface.h
index ef792c8..9e6fa89 100644
--- a/test/putsurface/loadsurface.h
+++ b/test/putsurface/loadsurface.h
@@ -21,8 +21,7 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
-
+//test
static int yuvgen_planar(int width, int height,
unsigned char *Y_start, int Y_pitch,
unsigned char *U_start, int U_pitch,
@@ -106,9 +105,9 @@ static int upload_surface(VADisplay va_dpy, VASurfaceID surface_id,
/* assume surface is planar format */
yuvgen_planar(surface_image.width, surface_image.height,
- surface_p, surface_image.pitches[0],
- U_start, surface_image.pitches[1],
- V_start, surface_image.pitches[2],
+ (unsigned char *)surface_p, surface_image.pitches[0],
+ (unsigned char *)U_start, surface_image.pitches[1],
+ (unsigned char *)V_start, surface_image.pitches[2],
(surface_image.format.fourcc==VA_FOURCC_NV12),
box_width, row_shift, field);