80
85
/*****************************************************************************
87
*****************************************************************************/
89
#ifdef MODULE_NAME_IS_xvmc
92
{ /* CLUT == Color LookUp Table */
99
#define XX44_PALETTE_SIZE 32
100
#define OVL_PALETTE_SIZE 256
101
#define XVMC_MAX_SURFACES 16
102
#define XVMC_MAX_SUBPICTURES 4
103
#define FOURCC_IA44 0x34344149
104
#define FOURCC_AI44 0x34344941
110
uint32_t cluts[XX44_PALETTE_SIZE];
111
/* cache palette entries for both colors and clip_colors */
112
int lookup_cache[OVL_PALETTE_SIZE*2];
116
* Functions to handle the vlc-specific palette.
119
void clear_xx44_palette( xx44_palette_t *p );
122
* Convert the xine-specific palette to something useful.
125
void xx44_to_xvmc_palette( const xx44_palette_t *p,unsigned char *xvmc_palette,
126
unsigned first_xx44_entry, unsigned num_xx44_entries,
127
unsigned num_xvmc_components, char *xvmc_components );
131
vlc_macroblocks_t vlc_mc;
132
XvMCBlockArray blocks; /* pointer to memory for dct block array */
134
XvMCMacroBlock *macroblockptr; /* pointer to current macro block */
135
XvMCMacroBlock *macroblockbaseptr; /* pointer to base MacroBlock in MB array */
136
XvMCMacroBlockArray macro_blocks; /* pointer to memory for macroblock array */
138
} xvmc_macroblocks_t;
142
unsigned int mpeg_flags;
143
unsigned int accel_flags;
144
unsigned int max_width;
145
unsigned int max_height;
146
unsigned int sub_max_width;
147
unsigned int sub_max_height;
149
XvImageFormatValues subPicType;
151
} xvmc_capabilities_t;
153
typedef struct xvmc_surface_handler_s
155
XvMCSurface surfaces[XVMC_MAX_SURFACES];
156
int surfInUse[XVMC_MAX_SURFACES];
157
int surfValid[XVMC_MAX_SURFACES];
158
XvMCSubpicture subpictures[XVMC_MAX_SUBPICTURES];
159
int subInUse[XVMC_MAX_SUBPICTURES];
160
int subValid[XVMC_MAX_SUBPICTURES];
161
pthread_mutex_t mutex;
162
} xvmc_surface_handler_t;
164
typedef struct context_lock_s
166
pthread_mutex_t mutex;
171
#define XVMCLOCKDISPLAY(display) XLockDisplay(display);
172
#define XVMCUNLOCKDISPLAY(display) XUnlockDisplay(display);
174
void xvmc_context_reader_unlock( context_lock_t *c );
175
void xvmc_context_reader_lock( context_lock_t *c );
176
void xvmc_context_writer_lock( context_lock_t *c );
177
void xvmc_context_writer_unlock( context_lock_t *c );
178
void free_context_lock( context_lock_t *c );
179
void xxmc_dispose_context( vout_thread_t *p_vout );
181
int xxmc_xvmc_surface_valid( vout_thread_t *p_vout, XvMCSurface *surf );
182
void xxmc_xvmc_free_surface( vout_thread_t *p_vout, XvMCSurface *surf );
184
void xvmc_vld_slice( picture_t *picture );
185
void xvmc_vld_frame( picture_t *picture );
187
void xxmc_do_update_frame( picture_t *picture, uint32_t width, uint32_t height,
188
double ratio, int format, int flags);
190
int checkXvMCCap( vout_thread_t *p_vout);
192
XvMCSubpicture *xxmc_xvmc_alloc_subpicture( vout_thread_t *p_vout,
193
XvMCContext *context, unsigned short width, unsigned short height,
196
void xxmc_xvmc_free_subpicture( vout_thread_t *p_vout, XvMCSubpicture *sub );
197
void blend_xx44( uint8_t *dst_img, subpicture_t *sub_img, int dst_width,
198
int dst_height, int dst_pitch, xx44_palette_t *palette,int ia44);
200
#endif /* XvMC defines */
202
/*****************************************************************************
81
203
* vout_sys_t: video output method descriptor
82
204
*****************************************************************************
83
205
* This structure is part of the video output thread descriptor.
135
260
/* Window manager properties */
136
261
Atom net_wm_state;
137
262
Atom net_wm_state_fullscreen;
138
vlc_bool_t b_net_wm_state_fullscreen;
263
bool b_net_wm_state_fullscreen;
139
264
Atom net_wm_state_above;
140
vlc_bool_t b_net_wm_state_above;
265
bool b_net_wm_state_above;
141
266
Atom net_wm_state_stays_on_top;
142
vlc_bool_t b_net_wm_state_stays_on_top;
267
bool b_net_wm_state_stays_on_top;
143
268
Atom net_wm_state_below;
144
vlc_bool_t b_net_wm_state_below;
269
bool b_net_wm_state_below;
146
271
#ifdef MODULE_NAME_IS_glx
147
272
/* GLX properties */
149
274
GLXContext gwctx;
278
#ifdef MODULE_NAME_IS_xvmc
279
/* XvMC related stuff here */
280
xvmc_macroblocks_t macroblocks;
281
xvmc_capabilities_t *xvmc_cap;
282
unsigned int xvmc_num_cap;
283
unsigned int xvmc_max_subpic_x;
284
unsigned int xvmc_max_subpic_y;
288
XvMCSubpicture *old_subpic;
289
XvMCSubpicture *new_subpic;
290
xx44_palette_t palette;
293
int cpu_save_enabled;
294
int reverse_nvidia_palette;
298
* These variables are protected by the context lock:
300
unsigned xvmc_cur_cap;
301
int xvmc_backend_subpic;
304
xvmc_surface_handler_t xvmc_surf_handler;
307
unsigned last_accel_request;
309
unsigned xvmc_height;
310
int have_xvmc_autopaint;
311
int xvmc_xoverlay_type;
315
* Only creation and destruction of the below.
319
XShmSegmentInfo subShmInfo;
322
* The mutex below is needed since XlockDisplay wasn't really enough
323
* to protect the XvMC Calls.
325
context_lock_t xvmc_lock;
326
subpicture_t * p_last_subtitle_save;
327
int xvmc_deinterlace_method;
331
//alphablend_t alphablend_extra_data;
339
osso_context_t *p_octx;
340
int i_backlight_on_counter;
154
344
/*****************************************************************************