diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2011-12-18 23:51:46 +0100 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-06-05 09:40:49 +0800 |
commit | 824a70ae1ef79458e65079374209a0cb16b65c31 (patch) | |
tree | 967730403cd346e93036a69b57560aeb8b39dd35 /test | |
parent | 285b384c60a326936f40f52a69b6b2e3f3189929 (diff) | |
download | libva-824a70ae1ef79458e65079374209a0cb16b65c31.tar.gz |
tests: cope with new vaCreateSurfaces() API.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Haitao Huang <haitao.huang@intel.com>
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/basic/test_07.c | 8 | ||||
-rw-r--r-- | test/basic/test_08.c | 2 | ||||
-rw-r--r-- | test/basic/test_09.c | 2 | ||||
-rw-r--r-- | test/basic/test_10.c | 2 | ||||
-rw-r--r-- | test/basic/test_11.c | 2 | ||||
-rw-r--r-- | test/decode/mpeg2vldemo.cpp | 8 | ||||
-rw-r--r-- | test/decode/tinyjpeg.c | 5 | ||||
-rw-r--r-- | test/encode/avcenc.c | 8 | ||||
-rw-r--r-- | test/encode/h264encode.c | 17 | ||||
-rw-r--r-- | test/encode/mpeg2enc.c | 6 | ||||
-rw-r--r-- | test/putsurface/putsurface_common.c | 8 |
11 files changed, 40 insertions, 28 deletions
diff --git a/test/basic/test_07.c b/test/basic/test_07.c index cb1edce..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); + 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); + 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); + 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); + 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 ac0c09d..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]); + 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 7d6cd4b..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); + 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 3d6625e..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); + 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 5c20e2b..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); + 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/decode/mpeg2vldemo.cpp b/test/decode/mpeg2vldemo.cpp index db090f8..715ea49 100644 --- a/test/decode/mpeg2vldemo.cpp +++ b/test/decode/mpeg2vldemo.cpp @@ -185,8 +185,12 @@ int main(int argc,char **argv) &attrib, 1,&config_id); CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints"); - va_status = vaCreateSurfaces(va_dpy,CLIP_WIDTH,CLIP_HEIGHT, - VA_RT_FORMAT_YUV420, 1, &surface_id); + va_status = vaCreateSurfaces( + va_dpy, + VA_RT_FORMAT_YUV420, CLIP_WIDTH, CLIP_HEIGHT, + &surface_id, 1, + NULL, 0 + ); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); /* Create a context for this decode pipe */ diff --git a/test/decode/tinyjpeg.c b/test/decode/tinyjpeg.c index 111971c..045e79a 100644 --- a/test/decode/tinyjpeg.c +++ b/test/decode/tinyjpeg.c @@ -578,10 +578,9 @@ int tinyjpeg_decode(struct jdec_private *priv) &attrib, 1,&config_id); CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints"); - va_status = vaCreateSurfaces(va_dpy, + va_status = vaCreateSurfaces(va_dpy,VA_RT_FORMAT_YUV420, priv->width,priv->height, //alignment? - VA_RT_FORMAT_YUV420, - 1, &surface_id); + &surface_id, 1, NULL, 0); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); /* Create a context for this decode pipe */ diff --git a/test/encode/avcenc.c b/test/encode/avcenc.c index 8f05af1..5549060 100644 --- a/test/encode/avcenc.c +++ b/test/encode/avcenc.c @@ -250,8 +250,12 @@ static void alloc_encode_resource(FILE *yuv_fp) VAStatus va_status; // Create surface - va_status = vaCreateSurfaces(va_dpy, picture_width, picture_height, - VA_RT_FORMAT_YUV420, SID_NUMBER, &surface_ids[0]); + va_status = vaCreateSurfaces( + va_dpy, + VA_RT_FORMAT_YUV420, picture_width, picture_height, + &surface_ids[0], SID_NUMBER, + NULL, 0 + ); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); newImageBuffer = (unsigned char *)malloc(frame_size); diff --git a/test/encode/h264encode.c b/test/encode/h264encode.c index c9afa5a..799b39d 100644 --- a/test/encode/h264encode.c +++ b/test/encode/h264encode.c @@ -1030,19 +1030,18 @@ static int setup_encode() /* create source surfaces */ va_status = vaCreateSurfaces(va_dpy, - frame_width, frame_height, - VA_RT_FORMAT_YUV420, - SRC_SURFACE_NUM, - &src_surface[0]); + VA_RT_FORMAT_YUV420, frame_width, frame_height, + &src_surface[0], SRC_SURFACE_NUM, + NULL, 0); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); /* create reference surfaces */ va_status = vaCreateSurfaces( - va_dpy, - frame_width, frame_height, - VA_RT_FORMAT_YUV420, - h264_maxref, - &ref_surface[0]); + va_dpy, + VA_RT_FORMAT_YUV420, frame_width, frame_height, + &ref_surface[0], h264_maxref, + NULL, 0 + ); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); tmp_surfaceid = calloc(SRC_SURFACE_NUM + h264_maxref, sizeof(VASurfaceID)); diff --git a/test/encode/mpeg2enc.c b/test/encode/mpeg2enc.c index 9f5bff1..0721b08 100644 --- a/test/encode/mpeg2enc.c +++ b/test/encode/mpeg2enc.c @@ -892,11 +892,13 @@ mpeg2enc_alloc_va_resources(struct mpeg2enc_context *ctx) CHECK_VASTATUS(va_status, "vaCreateContext"); va_status = vaCreateSurfaces(ctx->va_dpy, + VA_RT_FORMAT_YUV420, ctx->width, ctx->height, - VA_RT_FORMAT_YUV420, + surface_ids, SID_NUMBER, - surface_ids); + NULL, + 0); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); } diff --git a/test/putsurface/putsurface_common.c b/test/putsurface/putsurface_common.c index 2116ce4..5b5058e 100644 --- a/test/putsurface/putsurface_common.c +++ b/test/putsurface/putsurface_common.c @@ -337,8 +337,12 @@ int main(int argc,char **argv) va_status = vaInitialize(va_dpy, &major_ver, &minor_ver); CHECK_VASTATUS(va_status, "vaInitialize"); - va_status = vaCreateSurfaces(va_dpy,surface_width, surface_height, - VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]); + va_status = vaCreateSurfaces( + va_dpy, + VA_RT_FORMAT_YUV420, surface_width, surface_height, + &surface_id[0], SURFACE_NUM, + NULL, 0 + ); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); if (multi_thread == 0) /* upload the content for all surfaces */ upload_source_YUV_once_for_all(); |