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 */
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 */
{
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] );
}
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++)
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);
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);
&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 */
&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 */
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);
/* 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));
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");
}
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();