st/va: implement vlVa(Query|Create|Get|Put|Destroy)Image
[mesa.git] / src / gallium / state_trackers / va / subpicture.c
1 /**************************************************************************
2 *
3 * Copyright 2010 Thomas Balling Sørensen & Orasanu Lucian.
4 * Copyright 2014 Advanced Micro Devices, Inc.
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sub license, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the
16 * next paragraph) shall be included in all copies or substantial portions
17 * of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR
23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 *
27 **************************************************************************/
28
29 #include "va_private.h"
30
31 VAStatus
32 vlVaQuerySubpictureFormats(VADriverContextP ctx, VAImageFormat *format_list,
33 unsigned int *flags, unsigned int *num_formats)
34 {
35 if (!ctx)
36 return VA_STATUS_ERROR_INVALID_CONTEXT;
37
38 if (!(format_list && flags && num_formats))
39 return VA_STATUS_ERROR_UNKNOWN;
40
41 *num_formats = 0;
42
43 return VA_STATUS_SUCCESS;
44 }
45
46 VAStatus
47 vlVaCreateSubpicture(VADriverContextP ctx, VAImageID image, VASubpictureID *subpicture)
48 {
49 if (!ctx)
50 return VA_STATUS_ERROR_INVALID_CONTEXT;
51
52 return VA_STATUS_ERROR_UNIMPLEMENTED;
53 }
54
55 VAStatus
56 vlVaDestroySubpicture(VADriverContextP ctx, VASubpictureID subpicture)
57 {
58 if (!ctx)
59 return VA_STATUS_ERROR_INVALID_CONTEXT;
60
61 return VA_STATUS_ERROR_UNIMPLEMENTED;
62 }
63
64 VAStatus
65 vlVaSubpictureImage(VADriverContextP ctx, VASubpictureID subpicture, VAImageID image)
66 {
67 if (!ctx)
68 return VA_STATUS_ERROR_INVALID_CONTEXT;
69
70 return VA_STATUS_ERROR_UNIMPLEMENTED;
71 }
72
73 VAStatus
74 vlVaSetSubpictureChromakey(VADriverContextP ctx, VASubpictureID subpicture,
75 unsigned int chromakey_min, unsigned int chromakey_max, unsigned int chromakey_mask)
76 {
77 if (!ctx)
78 return VA_STATUS_ERROR_INVALID_CONTEXT;
79
80 return VA_STATUS_ERROR_UNIMPLEMENTED;
81 }
82
83 VAStatus
84 vlVaSetSubpictureGlobalAlpha(VADriverContextP ctx, VASubpictureID subpicture, float global_alpha)
85 {
86 if (!ctx)
87 return VA_STATUS_ERROR_INVALID_CONTEXT;
88
89 return VA_STATUS_ERROR_UNIMPLEMENTED;
90 }
91
92 VAStatus
93 vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture, VASurfaceID *target_surfaces,
94 int num_surfaces, short src_x, short src_y,
95 unsigned short src_width, unsigned short src_height,
96 short dest_x, short dest_y,
97 unsigned short dest_width,
98 unsigned short dest_height,
99 unsigned int flags)
100 {
101 if (!ctx)
102 return VA_STATUS_ERROR_INVALID_CONTEXT;
103
104 return VA_STATUS_ERROR_UNIMPLEMENTED;
105 }
106
107 VAStatus
108 vlVaDeassociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
109 VASurfaceID *target_surfaces, int num_surfaces)
110 {
111 if (!ctx)
112 return VA_STATUS_ERROR_INVALID_CONTEXT;
113
114 return VA_STATUS_ERROR_UNIMPLEMENTED;
115 }