2
* vdpau_subpic.h - VDPAU backend for VA API (VA subpictures)
4
* vdpau-video (C) 2009-2010 Splitted-Desktop Systems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21
#ifndef VDPAU_SUBPIC_H
22
#define VDPAU_SUBPIC_H
24
#include "vdpau_video.h"
25
#include "vdpau_image.h"
27
typedef struct object_subpicture object_subpicture_t;
28
typedef struct object_subpicture *object_subpicture_p;
30
struct object_subpicture {
31
struct object_base base;
33
SubpictureAssociationP *assocs;
34
unsigned int assocs_count;
35
unsigned int assocs_count_max;
36
unsigned int chromakey_min;
37
unsigned int chromakey_max;
38
unsigned int chromakey_mask;
42
VdpImageFormatType vdp_format_type;
44
VdpBitmapSurface vdp_bitmap_surface;
45
VdpOutputSurface vdp_output_surface;
49
// Associate one surface to the subpicture
51
subpicture_associate_1(
52
object_subpicture_p obj_subpicture,
53
object_surface_p obj_surface,
54
const VARectangle *src_rect,
55
const VARectangle *dst_rect,
59
// Deassociate one surface from the subpicture
61
subpicture_deassociate_1(
62
object_subpicture_p obj_subpicture,
63
object_surface_p obj_surface
66
// Commit subpicture to VDPAU surface
69
vdpau_driver_data_p driver_data,
70
object_subpicture_p obj_subpicture
73
// vaQuerySubpictureFormats
75
vdpau_QuerySubpictureFormats(
77
VAImageFormat *format_list,
79
unsigned int *num_formats
84
vdpau_CreateSubpicture(
87
VASubpictureID *subpicture
90
// vaDestroySubpicture
92
vdpau_DestroySubpicture(
94
VASubpictureID subpicture
97
// vaSetSubpictureImage
99
vdpau_SetSubpictureImage(
100
VADriverContextP ctx,
101
VASubpictureID subpicture,
105
// vaSetSubpicturePalette (not a PUBLIC interface)
107
vdpau_SetSubpicturePalette(
108
VADriverContextP ctx,
109
VASubpictureID subpicture,
110
unsigned char *palette
113
// vaSetSubpictureChromaKey
115
vdpau_SetSubpictureChromakey(
116
VADriverContextP ctx,
117
VASubpictureID subpicture,
118
unsigned int chromakey_min,
119
unsigned int chromakey_max,
120
unsigned int chromakey_mask
123
// vaSetSubpictureGlobalAlpha
125
vdpau_SetSubpictureGlobalAlpha(
126
VADriverContextP ctx,
127
VASubpictureID subpicture,
131
// vaAssociateSubpicture
133
vdpau_AssociateSubpicture(
134
VADriverContextP ctx,
135
VASubpictureID subpicture,
136
VASurfaceID *target_surfaces,
142
unsigned short width,
143
unsigned short height,
147
// vaAssociateSubpicture2
149
vdpau_AssociateSubpicture_full(
150
VADriverContextP ctx,
151
VASubpictureID subpicture,
152
VASurfaceID *target_surfaces,
156
unsigned short src_width,
157
unsigned short src_height,
160
unsigned short dest_width,
161
unsigned short dest_height,
165
// vaDeassociateSubpicture
167
vdpau_DeassociateSubpicture(
168
VADriverContextP ctx,
169
VASubpictureID subpicture,
170
VASurfaceID *target_surfaces,
174
#endif /* VDPAU_SUBPIC_H */