• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

修訂824a70ae1ef79458e65079374209a0cb16b65c31 (tree)
時間2013-06-05 10:40:49
作者Gwenole Beauchesne <gwenole.beauchesne@inte...>
CommiterXiang, Haihao

Log Message

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>

Change Summary

差異

--- a/test/basic/test_07.c
+++ b/test/basic/test_07.c
@@ -64,19 +64,19 @@ void test()
6464
6565 status("vaCreateSurfaces 1 surface\n");
6666 surfaces_1[1] = DEAD_SURFACE_ID;
67- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 1, surfaces_1);
67+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_1, 1, NULL, 0);
6868 ASSERT( VA_STATUS_SUCCESS == va_status );
6969 ASSERT( DEAD_SURFACE_ID == surfaces_1[1] ); /* bounds check */
7070
7171 status("vaCreateSurfaces 4 surfaces\n");
7272 surfaces_4[4] = DEAD_SURFACE_ID;
73- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 4, surfaces_4);
73+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_4, 4, NULL, 0);
7474 ASSERT( VA_STATUS_SUCCESS == va_status );
7575 ASSERT( DEAD_SURFACE_ID == surfaces_4[4] ); /* bounds check */
7676
7777 status("vaCreateSurfaces 16 surfaces\n");
7878 surfaces_16[16] = DEAD_SURFACE_ID;
79- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 16, surfaces_16);
79+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_16, 16, NULL, 0);
8080 ASSERT( VA_STATUS_SUCCESS == va_status );
8181 ASSERT( DEAD_SURFACE_ID == surfaces_16[16] ); /* bounds check */
8282
@@ -92,7 +92,7 @@ void test()
9292
9393 status("vaCreateSurfaces 6 surfaces\n");
9494 surfaces_6[6] = DEAD_SURFACE_ID;
95- va_status = vaCreateSurfaces(va_dpy, 352, 288, VA_RT_FORMAT_YUV420, 6, surfaces_6);
95+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 352, 288, surfaces_6, 6, NULL, 0);
9696 ASSERT( VA_STATUS_SUCCESS == va_status );
9797 ASSERT( DEAD_SURFACE_ID == surfaces_6[6] ); /* bounds check */
9898
--- a/test/basic/test_08.c
+++ b/test/basic/test_08.c
@@ -74,7 +74,7 @@ void test()
7474 {
7575 status("vaCreateSurfaces create %dx%d surface\n", test_sizes[i].w, test_sizes[i].h);
7676 surfaces[i+1] = DEAD_SURFACE_ID;
77- va_status = vaCreateSurfaces(va_dpy, test_sizes[i].w, test_sizes[i].h, VA_RT_FORMAT_YUV420, 1, &surfaces[i]);
77+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, test_sizes[i].w, test_sizes[i].h, &surfaces[i], 1, NULL, 0);
7878 ASSERT( VA_STATUS_SUCCESS == va_status );
7979 ASSERT( DEAD_SURFACE_ID == surfaces[i+1] );
8080 }
--- a/test/basic/test_09.c
+++ b/test/basic/test_09.c
@@ -69,7 +69,7 @@ void test()
6969 VASurfaceID *surfaces = malloc(total_surfaces * sizeof(VASurfaceID));
7070
7171 // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config
72- va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces);
72+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, width, height, surfaces, total_surfaces, NULL, 0);
7373 ASSERT( VA_STATUS_SUCCESS == va_status );
7474
7575 for(i = 0; i < config_count; i++)
--- a/test/basic/test_10.c
+++ b/test/basic/test_10.c
@@ -47,7 +47,7 @@ void pre()
4747 surfaces = malloc(total_surfaces * sizeof(VASurfaceID));
4848
4949 // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config
50- va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces);
50+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, width, height, surfaces, total_surfaces, NULL, 0);
5151 ASSERT( VA_STATUS_SUCCESS == va_status );
5252
5353 status("vaCreateContext with config %08x\n", config);
--- a/test/basic/test_11.c
+++ b/test/basic/test_11.c
@@ -47,7 +47,7 @@ void pre()
4747 surfaces = malloc(total_surfaces * sizeof(VASurfaceID));
4848
4949 // TODO: Don't assume VA_RT_FORMAT_YUV420 is supported / needed for each config
50- va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, total_surfaces, surfaces);
50+ va_status = vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, width, height, surfaces, total_surfaces, NULL, 0);
5151 ASSERT( VA_STATUS_SUCCESS == va_status );
5252
5353 status("vaCreateContext with config %08x\n", config);
--- a/test/decode/mpeg2vldemo.cpp
+++ b/test/decode/mpeg2vldemo.cpp
@@ -185,8 +185,12 @@ int main(int argc,char **argv)
185185 &attrib, 1,&config_id);
186186 CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
187187
188- va_status = vaCreateSurfaces(va_dpy,CLIP_WIDTH,CLIP_HEIGHT,
189- VA_RT_FORMAT_YUV420, 1, &surface_id);
188+ va_status = vaCreateSurfaces(
189+ va_dpy,
190+ VA_RT_FORMAT_YUV420, CLIP_WIDTH, CLIP_HEIGHT,
191+ &surface_id, 1,
192+ NULL, 0
193+ );
190194 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
191195
192196 /* Create a context for this decode pipe */
--- a/test/decode/tinyjpeg.c
+++ b/test/decode/tinyjpeg.c
@@ -578,10 +578,9 @@ int tinyjpeg_decode(struct jdec_private *priv)
578578 &attrib, 1,&config_id);
579579 CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
580580
581- va_status = vaCreateSurfaces(va_dpy,
581+ va_status = vaCreateSurfaces(va_dpy,VA_RT_FORMAT_YUV420,
582582 priv->width,priv->height, //alignment?
583- VA_RT_FORMAT_YUV420,
584- 1, &surface_id);
583+ &surface_id, 1, NULL, 0);
585584 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
586585
587586 /* Create a context for this decode pipe */
--- a/test/encode/avcenc.c
+++ b/test/encode/avcenc.c
@@ -250,8 +250,12 @@ static void alloc_encode_resource(FILE *yuv_fp)
250250 VAStatus va_status;
251251
252252 // Create surface
253- va_status = vaCreateSurfaces(va_dpy, picture_width, picture_height,
254- VA_RT_FORMAT_YUV420, SID_NUMBER, &surface_ids[0]);
253+ va_status = vaCreateSurfaces(
254+ va_dpy,
255+ VA_RT_FORMAT_YUV420, picture_width, picture_height,
256+ &surface_ids[0], SID_NUMBER,
257+ NULL, 0
258+ );
255259 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
256260
257261 newImageBuffer = (unsigned char *)malloc(frame_size);
--- a/test/encode/h264encode.c
+++ b/test/encode/h264encode.c
@@ -1030,19 +1030,18 @@ static int setup_encode()
10301030
10311031 /* create source surfaces */
10321032 va_status = vaCreateSurfaces(va_dpy,
1033- frame_width, frame_height,
1034- VA_RT_FORMAT_YUV420,
1035- SRC_SURFACE_NUM,
1036- &src_surface[0]);
1033+ VA_RT_FORMAT_YUV420, frame_width, frame_height,
1034+ &src_surface[0], SRC_SURFACE_NUM,
1035+ NULL, 0);
10371036 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
10381037
10391038 /* create reference surfaces */
10401039 va_status = vaCreateSurfaces(
1041- va_dpy,
1042- frame_width, frame_height,
1043- VA_RT_FORMAT_YUV420,
1044- h264_maxref,
1045- &ref_surface[0]);
1040+ va_dpy,
1041+ VA_RT_FORMAT_YUV420, frame_width, frame_height,
1042+ &ref_surface[0], h264_maxref,
1043+ NULL, 0
1044+ );
10461045 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
10471046
10481047 tmp_surfaceid = calloc(SRC_SURFACE_NUM + h264_maxref, sizeof(VASurfaceID));
--- a/test/encode/mpeg2enc.c
+++ b/test/encode/mpeg2enc.c
@@ -892,11 +892,13 @@ mpeg2enc_alloc_va_resources(struct mpeg2enc_context *ctx)
892892 CHECK_VASTATUS(va_status, "vaCreateContext");
893893
894894 va_status = vaCreateSurfaces(ctx->va_dpy,
895+ VA_RT_FORMAT_YUV420,
895896 ctx->width,
896897 ctx->height,
897- VA_RT_FORMAT_YUV420,
898+ surface_ids,
898899 SID_NUMBER,
899- surface_ids);
900+ NULL,
901+ 0);
900902 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
901903 }
902904
--- a/test/putsurface/putsurface_common.c
+++ b/test/putsurface/putsurface_common.c
@@ -337,8 +337,12 @@ int main(int argc,char **argv)
337337 va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);
338338 CHECK_VASTATUS(va_status, "vaInitialize");
339339
340- va_status = vaCreateSurfaces(va_dpy,surface_width, surface_height,
341- VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]);
340+ va_status = vaCreateSurfaces(
341+ va_dpy,
342+ VA_RT_FORMAT_YUV420, surface_width, surface_height,
343+ &surface_id[0], SURFACE_NUM,
344+ NULL, 0
345+ );
342346 CHECK_VASTATUS(va_status, "vaCreateSurfaces");
343347 if (multi_thread == 0) /* upload the content for all surfaces */
344348 upload_source_YUV_once_for_all();