[Libva] [PATCH 1/2] test/basic: update to new API
Haitao Huang
haitao.huang at intel.com
Sat May 19 21:21:50 PDT 2012
Also changed build target to noinst so they are built by default.
Signed-off-by: Haitao Huang <haitao.huang at intel.com>
---
test/basic/Makefile.am | 8 ++++----
test/basic/test_07.c | 8 ++++----
test/basic/test_08.c | 2 +-
test/basic/test_09.c | 2 +-
test/basic/test_10.c | 2 +-
test/basic/test_11.c | 2 +-
test/basic/test_common.c | 2 ++
7 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/test/basic/Makefile.am b/test/basic/Makefile.am
index c84c264..68a6843 100644
--- a/test/basic/Makefile.am
+++ b/test/basic/Makefile.am
@@ -20,12 +20,12 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-check_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
+noinst_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
test_07 test_08 test_09 test_10 test_11
AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
-TEST_LIBS = $(top_builddir)/va/$(libvabackendlib)
+TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) $(top_builddir)/va/$(libvacorelib) -lpthread -lX11
test_01_LDADD = $(TEST_LIBS)
test_01_SOURCES = test_01.c
@@ -62,7 +62,7 @@ test_11_SOURCES = test_11.c
EXTRA_DIST = test_common.c
-valgrind: $(check_PROGRAMS)
- for a in $(check_PROGRAMS); do \
+valgrind: $(noinst_PROGRAMS)
+ for a in $(noinst_PROGRAMS); do \
valgrind --leak-check=full --show-reachable=yes .libs/$$a; \
done
diff --git a/test/basic/test_07.c b/test/basic/test_07.c
index afdd950..2e01533 100644
--- a/test/basic/test_07.c
+++ b/test/basic/test_07.c
@@ -64,19 +64,19 @@ void test()
status("vaCreateSurfaces 1 surface\n");
surfaces_1[1] = DEAD_SURFACE_ID;
- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 1, surfaces_1, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_1, 1, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
ASSERT( DEAD_SURFACE_ID == surfaces_1[1] ); /* bounds check */
status("vaCreateSurfaces 4 surfaces\n");
surfaces_4[4] = DEAD_SURFACE_ID;
- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 4, surfaces_4, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_4, 4, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
ASSERT( DEAD_SURFACE_ID == surfaces_4[4] ); /* bounds check */
status("vaCreateSurfaces 16 surfaces\n");
surfaces_16[16] = DEAD_SURFACE_ID;
- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 16, surfaces_16, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_16, 16, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
ASSERT( DEAD_SURFACE_ID == surfaces_16[16] ); /* bounds check */
@@ -92,7 +92,7 @@ void test()
status("vaCreateSurfaces 6 surfaces\n");
surfaces_6[6] = DEAD_SURFACE_ID;
- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 6, surfaces_6, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_6, 6, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
ASSERT( DEAD_SURFACE_ID == surfaces_6[6] ); /* bounds check */
diff --git a/test/basic/test_08.c b/test/basic/test_08.c
index a5b3ecf..299882f 100644
--- a/test/basic/test_08.c
+++ b/test/basic/test_08.c
@@ -74,7 +74,7 @@ void test()
{
status("vaCreateSurfaces create %dx%d surface\n", test_sizes[i].w, test_sizes[i].h);
surfaces[i+1] = DEAD_SURFACE_ID;
- va_status = vaCreateSurfaces(va_dpy, test_sizes[i].w, test_sizes[i].h, VA_RT_FORMAT_YUV420, 1, &surfaces[i], NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, test_sizes[i].w, test_sizes[i].h, &surfaces[i], 1, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
ASSERT( DEAD_SURFACE_ID == surfaces[i+1] );
}
diff --git a/test/basic/test_09.c b/test/basic/test_09.c
index 0cea466..b8a8f1c 100644
--- a/test/basic/test_09.c
+++ b/test/basic/test_09.c
@@ -69,7 +69,7 @@ void test()
VASurfaceID *surfaces = malloc(total_surfaces * sizeof(VASurfaceID));
// TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config
- va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, width, height, surfaces, total_surfaces, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
for(i = 0; i < config_count; i++)
diff --git a/test/basic/test_10.c b/test/basic/test_10.c
index cc7bd8d..9c7c566 100644
--- a/test/basic/test_10.c
+++ b/test/basic/test_10.c
@@ -47,7 +47,7 @@ void pre()
surfaces = malloc(total_surfaces * sizeof(VASurfaceID));
// TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config
- va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, width, height, surfaces, total_surfaces, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
status("vaCreateContext with config %08x\n", config);
diff --git a/test/basic/test_11.c b/test/basic/test_11.c
index c9da4f8..99c8785 100644
--- a/test/basic/test_11.c
+++ b/test/basic/test_11.c
@@ -47,7 +47,7 @@ void pre()
surfaces = malloc(total_surfaces * sizeof(VASurfaceID));
// TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config
- va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces, NULL, 0);
+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, width, height, surfaces, total_surfaces, NULL, 0);
ASSERT( VA_STATUS_SUCCESS == va_status );
status("vaCreateContext with config %08x\n", config);
diff --git a/test/basic/test_common.c b/test/basic/test_common.c
index 5f93c25..b34a473 100644
--- a/test/basic/test_common.c
+++ b/test/basic/test_common.c
@@ -105,6 +105,7 @@ const char *profile2string(VAProfile profile)
PROFILE(VC1Main)
PROFILE(VC1Advanced)
PROFILE(JPEGBaseline)
+ PROFILE(None)
}
ASSERT(0);
return "Unknown";
@@ -123,6 +124,7 @@ const char *entrypoint2string(VAEntrypoint entrypoint)
ENTRYPOINT(Deblocking)
ENTRYPOINT(EncSlice)
ENTRYPOINT(EncPicture)
+ ENTRYPOINT(VideoProc)
}
ASSERT(0);
return "Unknown";
--
1.7.5.4
More information about the Libva
mailing list