Lines Matching refs:CTX
43 #define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
47 #define CHECK_VTABLE(s, ctx, func) if (!va_checkVtable(ctx->vtable->va##func, #func)) s = VA_STATUS_ERROR_UNKNOWN;
48 #define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN;
49 #define CHECK_STRING(s, ctx, var) if (!va_checkString(ctx->str_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN;
199 VADriverContextP ctx = CTX(dpy);
272 struct VADriverVTable *vtable = ctx->vtable;
273 struct VADriverVTableVPP *vtable_vpp = ctx->vtable_vpp;
281 ctx->vtable = vtable;
290 ctx->vtable_vpp = vtable_vpp;
293 vaStatus = (*init_func)(ctx);
296 CHECK_MAXIMUM(vaStatus, ctx, profiles);
297 CHECK_MAXIMUM(vaStatus, ctx, entrypoints);
298 CHECK_MAXIMUM(vaStatus, ctx, attributes);
299 CHECK_MAXIMUM(vaStatus, ctx, image_formats);
300 CHECK_MAXIMUM(vaStatus, ctx, subpic_formats);
301 CHECK_MAXIMUM(vaStatus, ctx, display_attributes);
302 CHECK_STRING(vaStatus, ctx, vendor);
303 CHECK_VTABLE(vaStatus, ctx, Terminate);
304 CHECK_VTABLE(vaStatus, ctx, QueryConfigProfiles);
305 CHECK_VTABLE(vaStatus, ctx, QueryConfigEntrypoints);
306 CHECK_VTABLE(vaStatus, ctx, QueryConfigAttributes);
307 CHECK_VTABLE(vaStatus, ctx, CreateConfig);
308 CHECK_VTABLE(vaStatus, ctx, DestroyConfig);
309 CHECK_VTABLE(vaStatus, ctx, GetConfigAttributes);
310 CHECK_VTABLE(vaStatus, ctx, CreateSurfaces);
311 CHECK_VTABLE(vaStatus, ctx, DestroySurfaces);
312 CHECK_VTABLE(vaStatus, ctx, CreateContext);
313 CHECK_VTABLE(vaStatus, ctx, DestroyContext);
314 CHECK_VTABLE(vaStatus, ctx, CreateBuffer);
315 CHECK_VTABLE(vaStatus, ctx, BufferSetNumElements);
316 CHECK_VTABLE(vaStatus, ctx, MapBuffer);
317 CHECK_VTABLE(vaStatus, ctx, UnmapBuffer);
318 CHECK_VTABLE(vaStatus, ctx, DestroyBuffer);
319 CHECK_VTABLE(vaStatus, ctx, BeginPicture);
320 CHECK_VTABLE(vaStatus, ctx, RenderPicture);
321 CHECK_VTABLE(vaStatus, ctx, EndPicture);
322 CHECK_VTABLE(vaStatus, ctx, SyncSurface);
323 CHECK_VTABLE(vaStatus, ctx, QuerySurfaceStatus);
324 CHECK_VTABLE(vaStatus, ctx, PutSurface);
325 CHECK_VTABLE(vaStatus, ctx, QueryImageFormats);
326 CHECK_VTABLE(vaStatus, ctx, CreateImage);
327 CHECK_VTABLE(vaStatus, ctx, DeriveImage);
328 CHECK_VTABLE(vaStatus, ctx, DestroyImage);
329 CHECK_VTABLE(vaStatus, ctx, SetImagePalette);
330 CHECK_VTABLE(vaStatus, ctx, GetImage);
331 CHECK_VTABLE(vaStatus, ctx, PutImage);
332 CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats);
333 CHECK_VTABLE(vaStatus, ctx, CreateSubpicture);
334 CHECK_VTABLE(vaStatus, ctx, DestroySubpicture);
335 CHECK_VTABLE(vaStatus, ctx, SetSubpictureImage);
336 CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey);
337 CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha);
338 CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture);
339 CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture);
340 CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes);
341 CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes);
342 CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes);
349 ctx->handle = handle;
366 VADriverContextP ctx;
369 ctx = CTX(dpy);
371 if (NULL == ctx->handle)
374 return (VAPrivFunc) dlsym(ctx->handle, func);
506 old_ctx = CTX(dpy);
545 return CTX(dpy)->str_vendor;
557 return CTX(dpy)->max_profiles;
568 return CTX(dpy)->max_entrypoints;
580 return CTX(dpy)->max_attributes;
590 VADriverContextP ctx;
592 ctx = CTX(dpy);
594 return ctx->vtable->vaQueryConfigEntrypoints ( ctx, profile, entrypoints, num_entrypoints);
605 VADriverContextP ctx;
607 ctx = CTX(dpy);
609 return ctx->vtable->vaGetConfigAttributes ( ctx, profile, entrypoint, attrib_list, num_attribs );
618 VADriverContextP ctx;
620 ctx = CTX(dpy);
622 return ctx->vtable->vaQueryConfigProfiles ( ctx, profile_list, num_profiles );
634 VADriverContextP ctx;
638 ctx = CTX(dpy);
640 vaStatus = ctx->vtable->vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id );
654 VADriverContextP ctx;
656 ctx = CTX(dpy);
658 return ctx->vtable->vaDestroyConfig ( ctx, config_id );
670 VADriverContextP ctx;
672 ctx = CTX(dpy);
674 return ctx->vtable->vaQueryConfigAttributes( ctx, config_id, profile, entrypoint, attrib_list, num_attribs);
680 VADriverContextP ctx,
710 if (!ctx->vtable->vaGetSurfaceAttributes)
713 num_image_formats = ctx->max_image_formats;
720 va_status = ctx->vtable->vaQueryImageFormats(
721 ctx, image_formats, &num_image_formats);
754 va_status = ctx->vtable->vaGetSurfaceAttributes(
755 ctx, config, attribs, num_attribs);
821 VADriverContextP ctx;
825 ctx = CTX(dpy);
826 if (!ctx)
829 if (!ctx->vtable->vaQuerySurfaceAttributes)
830 vaStatus = va_impl_query_surface_attributes(ctx, config,
833 vaStatus = ctx->vtable->vaQuerySurfaceAttributes(ctx, config,
853 VADriverContextP ctx;
857 ctx = CTX(dpy);
858 if (!ctx)
861 if (ctx->vtable->vaCreateSurfaces2)
862 vaStatus = ctx->vtable->vaCreateSurfaces2(ctx, format, width, height,
868 vaStatus = ctx->vtable->vaCreateSurfaces(ctx, width, height, format,
884 VADriverContextP ctx;
888 ctx = CTX(dpy);
893 vaStatus = ctx->vtable->vaDestroySurfaces( ctx, surface_list, num_surfaces );
909 VADriverContextP ctx;
913 ctx = CTX(dpy);
915 vaStatus = ctx->vtable->vaCreateContext( ctx, config_id, picture_width, picture_height,
929 VADriverContextP ctx;
931 ctx = CTX(dpy);
933 return ctx->vtable->vaDestroyContext( ctx, context );
946 VADriverContextP ctx;
950 ctx = CTX(dpy);
954 vaStatus = ctx->vtable->vaCreateBuffer( ctx, context, type, size, num_elements, data, buf_id);
968 VADriverContextP ctx;
970 ctx = CTX(dpy);
974 return ctx->vtable->vaBufferSetNumElements( ctx, buf_id, num_elements );
984 VADriverContextP ctx;
988 ctx = CTX(dpy);
992 va_status = ctx->vtable->vaMapBuffer( ctx, buf_id, pbuf );
1004 VADriverContextP ctx;
1006 ctx = CTX(dpy);
1010 return ctx->vtable->vaUnmapBuffer( ctx, buf_id );
1018 VADriverContextP ctx;
1020 ctx = CTX(dpy);
1027 return ctx->vtable->vaDestroyBuffer( ctx, buffer_id );
1039 VADriverContextP ctx;
1042 ctx = CTX(dpy);
1046 return ctx->vtable->vaBufferInfo( ctx, buf_id, type, size, num_elements );
1055 VADriverContextP ctx;
1059 ctx = CTX(dpy);
1064 va_status = ctx->vtable->vaBeginPicture( ctx, context, render_target );
1076 VADriverContextP ctx;
1079 ctx = CTX(dpy);
1084 return ctx->vtable->vaRenderPicture( ctx, context, buffers, num_buffers );
1093 VADriverContextP ctx;
1096 ctx = CTX(dpy);
1100 va_status = ctx->vtable->vaEndPicture( ctx, context );
1114 VADriverContextP ctx;
1117 ctx = CTX(dpy);
1119 va_status = ctx->vtable->vaSyncSurface( ctx, render_target );
1132 VADriverContextP ctx;
1134 ctx = CTX(dpy);
1136 va_status = ctx->vtable->vaQuerySurfaceStatus( ctx, render_target, status );
1151 VADriverContextP ctx;
1153 ctx = CTX(dpy);
1155 va_status = ctx->vtable->vaQuerySurfaceError( ctx, surface, error_status, error_info );
1170 return CTX(dpy)->max_image_formats;
1179 VADriverContextP ctx;
1181 ctx = CTX(dpy);
1183 return ctx->vtable->vaQueryImageFormats ( ctx, format_list, num_formats);
1202 VADriverContextP ctx;
1204 ctx = CTX(dpy);
1206 return ctx->vtable->vaCreateImage ( ctx, format, width, height, image);
1217 VADriverContextP ctx;
1219 ctx = CTX(dpy);
1221 return ctx->vtable->vaDestroyImage ( ctx, image);
1230 VADriverContextP ctx;
1232 ctx = CTX(dpy);
1234 return ctx->vtable->vaSetImagePalette ( ctx, image, palette);
1251 VADriverContextP ctx;
1253 ctx = CTX(dpy);
1255 return ctx->vtable->vaGetImage ( ctx, surface, x, y, width, height, image);
1276 VADriverContextP ctx;
1278 ctx = CTX(dpy);
1280 return ctx->vtable->vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height );
1320 VADriverContextP ctx;
1322 ctx = CTX(dpy);
1324 return ctx->vtable->vaDeriveImage ( ctx, surface, image );
1336 return CTX(dpy)->max_subpic_formats;
1353 VADriverContextP ctx;
1356 ctx = CTX(dpy);
1358 return ctx->vtable->vaQuerySubpictureFormats ( ctx, format_list, flags, num_formats);
1370 VADriverContextP ctx;
1372 ctx = CTX(dpy);
1374 return ctx->vtable->vaCreateSubpicture ( ctx, image, subpicture );
1385 VADriverContextP ctx;
1387 ctx = CTX(dpy);
1389 return ctx->vtable->vaDestroySubpicture ( ctx, subpicture);
1398 VADriverContextP ctx;
1400 ctx = CTX(dpy);
1402 return ctx->vtable->vaSetSubpictureImage ( ctx, subpicture, image);
1418 VADriverContextP ctx;
1420 ctx = CTX(dpy);
1422 return ctx->vtable->vaSetSubpictureChromakey ( ctx, subpicture, chromakey_min, chromakey_max, chromakey_mask );
1437 VADriverContextP ctx;
1439 ctx = CTX(dpy);
1441 return ctx->vtable->vaSetSubpictureGlobalAlpha ( ctx, subpicture, global_alpha );
1471 VADriverContextP ctx;
1473 ctx = CTX(dpy);
1475 return ctx->vtable->vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags );
1488 VADriverContextP ctx;
1490 ctx = CTX(dpy);
1492 return ctx->vtable->vaDeassociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces );
1506 tmp = CTX(dpy)->max_display_attributes;
1525 VADriverContextP ctx;
1529 ctx = CTX(dpy);
1530 va_status = ctx->vtable->vaQueryDisplayAttributes ( ctx, attr_list, num_attributes );
1550 VADriverContextP ctx;
1554 ctx = CTX(dpy);
1555 va_status = ctx->vtable->vaGetDisplayAttributes ( ctx, attr_list, num_attributes );
1574 VADriverContextP ctx;
1577 ctx = CTX(dpy);
1579 va_status = ctx->vtable->vaSetDisplayAttributes ( ctx, attr_list, num_attributes );
1598 VADriverContextP ctx;
1600 ctx = CTX(dpy);
1602 return ctx->vtable->vaLockSurface( ctx, surface, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, buffer_name, buffer);
1610 VADriverContextP ctx;
1612 ctx = CTX(dpy);
1614 return ctx->vtable->vaUnlockSurface( ctx, surface );
1618 #define VA_VPP_INIT_CONTEXT(ctx, dpy) do { \
1620 ctx = CTX(dpy); \
1621 if (!ctx) \
1626 if (!ctx->vtable_vpp->va##func) \
1628 status = ctx->vtable_vpp->va##func args; \
1639 VADriverContextP ctx;
1642 VA_VPP_INIT_CONTEXT(ctx, dpy);
1644 ctx,
1646 (ctx, context, filters, num_filters)
1660 VADriverContextP ctx;
1663 VA_VPP_INIT_CONTEXT(ctx, dpy);
1665 ctx,
1667 (ctx, context, type, filter_caps, num_filter_caps)
1681 VADriverContextP ctx;
1684 VA_VPP_INIT_CONTEXT(ctx, dpy);
1686 ctx,
1688 (ctx, context, filters, num_filters, pipeline_caps)