~ubuntu-branches/ubuntu/trusty/vdpau-video/trusty-proposed

« back to all changes in this revision

Viewing changes to src/vdpau_subpic.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2010-02-12 14:58:28 UTC
  • Revision ID: james.westby@ubuntu.com-20100212145828-f0q1g7qzq03din26
Tags: upstream-0.6.3
ImportĀ upstreamĀ versionĀ 0.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  vdpau_subpic.h - VDPAU backend for VA API (VA subpictures)
 
3
 *
 
4
 *  vdpau-video (C) 2009-2010 Splitted-Desktop Systems
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 */
 
20
 
 
21
#ifndef VDPAU_SUBPIC_H
 
22
#define VDPAU_SUBPIC_H
 
23
 
 
24
#include "vdpau_video.h"
 
25
#include "vdpau_image.h"
 
26
 
 
27
typedef struct object_subpicture  object_subpicture_t;
 
28
typedef struct object_subpicture *object_subpicture_p;
 
29
 
 
30
struct object_subpicture {
 
31
    struct object_base  base;
 
32
    VAImageID           image_id;
 
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;
 
39
    float               alpha;
 
40
    unsigned int        width;
 
41
    unsigned int        height;
 
42
    VdpImageFormatType  vdp_format_type;
 
43
    uint32_t            vdp_format;
 
44
    VdpBitmapSurface    vdp_bitmap_surface;
 
45
    VdpOutputSurface    vdp_output_surface;
 
46
    uint64_t            last_commit;
 
47
};
 
48
 
 
49
// Associate one surface to the subpicture
 
50
VAStatus
 
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,
 
56
    unsigned int        flags
 
57
) attribute_hidden;
 
58
 
 
59
// Deassociate one surface from the subpicture
 
60
VAStatus
 
61
subpicture_deassociate_1(
 
62
    object_subpicture_p obj_subpicture,
 
63
    object_surface_p    obj_surface
 
64
) attribute_hidden;
 
65
 
 
66
// Commit subpicture to VDPAU surface
 
67
VAStatus
 
68
commit_subpicture(
 
69
    vdpau_driver_data_p driver_data,
 
70
    object_subpicture_p obj_subpicture
 
71
) attribute_hidden;
 
72
 
 
73
// vaQuerySubpictureFormats
 
74
VAStatus
 
75
vdpau_QuerySubpictureFormats(
 
76
    VADriverContextP    ctx,
 
77
    VAImageFormat      *format_list,
 
78
    unsigned int       *flags,
 
79
    unsigned int       *num_formats
 
80
) attribute_hidden;
 
81
 
 
82
// vaCreateSubpicture
 
83
VAStatus
 
84
vdpau_CreateSubpicture(
 
85
    VADriverContextP    ctx,
 
86
    VAImageID           image,
 
87
    VASubpictureID     *subpicture
 
88
) attribute_hidden;
 
89
 
 
90
// vaDestroySubpicture
 
91
VAStatus
 
92
vdpau_DestroySubpicture(
 
93
    VADriverContextP    ctx,
 
94
    VASubpictureID      subpicture
 
95
) attribute_hidden;
 
96
 
 
97
// vaSetSubpictureImage
 
98
VAStatus
 
99
vdpau_SetSubpictureImage(
 
100
    VADriverContextP    ctx,
 
101
    VASubpictureID      subpicture,
 
102
    VAImageID           image
 
103
) attribute_hidden;
 
104
 
 
105
// vaSetSubpicturePalette (not a PUBLIC interface)
 
106
VAStatus
 
107
vdpau_SetSubpicturePalette(
 
108
    VADriverContextP    ctx,
 
109
    VASubpictureID      subpicture,
 
110
    unsigned char      *palette
 
111
) attribute_hidden;
 
112
 
 
113
// vaSetSubpictureChromaKey
 
114
VAStatus
 
115
vdpau_SetSubpictureChromakey(
 
116
    VADriverContextP    ctx,
 
117
    VASubpictureID      subpicture,
 
118
    unsigned int        chromakey_min,
 
119
    unsigned int        chromakey_max,
 
120
    unsigned int        chromakey_mask
 
121
) attribute_hidden;
 
122
 
 
123
// vaSetSubpictureGlobalAlpha
 
124
VAStatus
 
125
vdpau_SetSubpictureGlobalAlpha(
 
126
    VADriverContextP    ctx,
 
127
    VASubpictureID      subpicture,
 
128
    float               global_alpha
 
129
) attribute_hidden;
 
130
 
 
131
// vaAssociateSubpicture
 
132
VAStatus
 
133
vdpau_AssociateSubpicture(
 
134
    VADriverContextP    ctx,
 
135
    VASubpictureID      subpicture,
 
136
    VASurfaceID        *target_surfaces,
 
137
    int                 num_surfaces,
 
138
    short               src_x,
 
139
    short               src_y,
 
140
    short               dest_x,
 
141
    short               dest_y,
 
142
    unsigned short      width,
 
143
    unsigned short      height,
 
144
    unsigned int        flags
 
145
) attribute_hidden;
 
146
 
 
147
// vaAssociateSubpicture2
 
148
VAStatus
 
149
vdpau_AssociateSubpicture_full(
 
150
    VADriverContextP    ctx,
 
151
    VASubpictureID      subpicture,
 
152
    VASurfaceID        *target_surfaces,
 
153
    int                 num_surfaces,
 
154
    short               src_x,
 
155
    short               src_y,
 
156
    unsigned short      src_width,
 
157
    unsigned short      src_height,
 
158
    short               dest_x,
 
159
    short               dest_y,
 
160
    unsigned short      dest_width,
 
161
    unsigned short      dest_height,
 
162
    unsigned int        flags
 
163
) attribute_hidden;
 
164
 
 
165
// vaDeassociateSubpicture
 
166
VAStatus
 
167
vdpau_DeassociateSubpicture(
 
168
    VADriverContextP    ctx,
 
169
    VASubpictureID      subpicture,
 
170
    VASurfaceID        *target_surfaces,
 
171
    int                 num_surfaces
 
172
) attribute_hidden;
 
173
 
 
174
#endif /* VDPAU_SUBPIC_H */