Go to the documentation of this file.
38 #define XVMC_THREAD_SAFE
60 #if defined (__SVR4) && defined (__sun)
61 # include <sys/int_types.h>
66 #include <sys/types.h>
67 #if defined(__FreeBSD__)
68 #include <machine/param.h>
75 #include <X11/Xutil.h>
76 #include <X11/cursorfont.h>
77 #include <X11/extensions/XShm.h>
78 #include <X11/extensions/Xv.h>
79 #include <X11/extensions/Xvlib.h>
80 #include <X11/extensions/XvMClib.h>
82 #include <X11/extensions/vldXvMC.h>
85 #define LOG_MODULE "video_out_xxmc"
99 #define FOURCC_IA44 0x34344149
100 #define FOURCC_AI44 0x34344941
101 #define XVMC_MAX_SURFACES 16
102 #define XVMC_MAX_SUBPICTURES 4
104 typedef struct xxmc_driver_s xxmc_driver_t;
108 XvMCBlockArray blocks;
110 XvMCMacroBlock *macroblockptr;
111 XvMCMacroBlock *macroblockbaseptr;
112 XvMCMacroBlockArray macro_blocks;
114 } xvmc_macroblocks_t;
135 XShmSegmentInfo shminfo;
139 XvMCSurface *xvmc_surf;
145 unsigned int mpeg_flags;
146 unsigned int accel_flags;
147 unsigned int max_width;
148 unsigned int max_height;
149 unsigned int sub_max_width;
150 unsigned int sub_max_height;
152 XvImageFormatValues subPicType;
154 } xvmc_capabilities_t;
156 typedef struct xvmc_surface_handler_s {
157 XvMCSurface surfaces[XVMC_MAX_SURFACES];
158 int surfInUse[XVMC_MAX_SURFACES];
159 int surfValid[XVMC_MAX_SURFACES];
160 XvMCSubpicture subpictures[XVMC_MAX_SUBPICTURES];
161 int subInUse[XVMC_MAX_SUBPICTURES];
162 int subValid[XVMC_MAX_SUBPICTURES];
163 pthread_mutex_t mutex;
164 } xvmc_surface_handler_t;
166 typedef struct context_lock_s {
167 pthread_mutex_t mutex;
172 #define LOCK_AND_SURFACE_VALID(driver, surface) \
173 xvmc_context_reader_lock( &(driver)->xvmc_lock ); \
174 if (!xxmc_xvmc_surface_valid((driver),(surface))) { \
175 xvmc_context_reader_unlock( &(driver)->xvmc_lock ); \
179 #if defined(XVMC_THREAD_SAFE) && defined(XVMC_LOCKDISPLAY_SAFE)
180 #define XVMCLOCKDISPLAY(display)
181 #define XVMCUNLOCKDISPLAY(display)
183 #define XVMCLOCKDISPLAY(display) XLockDisplay(display)
184 #define XVMCUNLOCKDISPLAY(display) XUnlockDisplay(display)
187 struct xxmc_driver_s {
196 unsigned int xv_format_yv12;
197 unsigned int xv_format_yuy2;
204 int use_pitch_alignment;
206 uint32_t capabilities;
208 xxmc_frame_t *cur_frame;
211 int disable_bob_for_progressive_frames;
212 int disable_bob_for_scaled_osd;
213 int scaled_osd_active;
215 int xv_xoverlay_type;
221 int deinterlace_enabled;
224 int (*x11_old_error_handler) (Display *, XErrorEvent *);
228 xvmc_macroblocks_t macroblocks;
229 xvmc_capabilities_t *xvmc_cap;
230 unsigned xvmc_num_cap;
231 unsigned int xvmc_max_subpic_x;
232 unsigned int xvmc_max_subpic_y;
236 XvMCSubpicture *old_subpic,*new_subpic;
240 int cpu_save_enabled;
241 int reverse_nvidia_palette;
248 unsigned xvmc_cur_cap;
249 int xvmc_backend_subpic;
252 xvmc_surface_handler_t xvmc_surf_handler;
255 unsigned last_accel_request;
257 unsigned xvmc_height;
258 int have_xvmc_autopaint;
259 int xvmc_xoverlay_type;
268 XShmSegmentInfo subShmInfo;
274 context_lock_t xvmc_lock;
289 extern void xvmc_vld_slice(
vo_frame_t *this_gen);
290 extern void xvmc_vld_frame(
struct vo_frame_s *this_gen);
293 int (*mv_field_sel)[2],
int *dmvector,
298 int picture_structure,
299 int second_field,
int (*f_mot_pmv)[2],
300 int (*b_mot_pmv)[2]);
Definition: xine_internal.h:80
int intra_vlc_format
Definition: accel_xvmc.h:52
static void xvmc_render_macro_blocks(vo_frame_t *current_image, vo_frame_t *backward_ref_image, vo_frame_t *forward_ref_image, int picture_structure, int second_field, xvmc_macroblocks_t *macroblocks)
Definition: xvmc_mocomp.c:66
int intra_dc_precision
Definition: accel_xvmc.h:45
void xvmc_context_reader_unlock(context_lock_t *c)
Definition: video_out_xxmc.c:99
vo_frame_t * backward_reference_frame
Definition: accel_xvmc.h:58
#define XINE_MC_FIELD
Definition: accel_xvmc.h:137
int mpeg_coding
Definition: accel_xvmc.h:46
int load_intra_quantizer_matrix
Definition: accel_xvmc.h:54
Definition: alphablend.h:30
int picture_coding_type
Definition: video_out.h:126
#define XINE_PICT_I_TYPE
Definition: accel_xvmc.h:143
#define XINE_MC_FRAME
Definition: accel_xvmc.h:138
#define XINE_MACROBLOCK_MOTION_FORWARD
Definition: accel_xvmc.h:152
int picture_coding_type
Definition: accel_xvmc.h:44
Definition: accel_xvmc.h:77
#define VO_NUM_PROPERTIES
Definition: video_out.h:275
int xxmc_xvmc_surface_valid(xxmc_driver_t *this, XvMCSurface *surf)
Definition: video_out_xxmc.c:266
vo_driver_t * driver
Definition: video_out.h:151
Definition: vo_scale.h:39
int top_field_first
Definition: video_out.h:120
#define lprintf(...)
Definition: xineutils.h:620
#define XINE_PICT_B_TYPE
Definition: accel_xvmc.h:145
#define XINE_MC_16X8
Definition: accel_xvmc.h:139
Definition: accel_xvmc.h:34
Definition: video_out.h:50
Definition: video_out.h:426
int q_scale_type
Definition: accel_xvmc.h:51
NULL
Definition: xine_plugin.c:78
#define XXMC_FRAME(frame_gen)
Definition: accel_xvmc.h:112
#define XINE_PICT_D_TYPE
Definition: accel_xvmc.h:146
vo_frame_t * forward_reference_frame
Definition: accel_xvmc.h:59
unsigned int width
Definition: gfontrle.c:4
static void calc_DMV(int DMV[][2], int *dmvector, int mvx, int mvy, int picture_structure, int top_field_first)
Definition: xvmc_mocomp.c:26
int scan
Definition: accel_xvmc.h:48
int load_non_intra_quantizer_matrix
Definition: accel_xvmc.h:55
Definition: configfile.h:83
void xvmc_context_reader_lock(context_lock_t *c)
Definition: video_out_xxmc.c:90
int progressive_sequence
Definition: accel_xvmc.h:47
Definition: accel_xvmc.h:40
#define XINE_MC_DMV
Definition: accel_xvmc.h:140
#define XINE_MACROBLOCK_INTRA
Definition: accel_xvmc.h:149
#define VO_BOTH_FIELDS
Definition: video_out.h:293
int second_field
Definition: accel_xvmc.h:53
int mv_ranges[2][2]
Definition: accel_xvmc.h:42
unsigned int height
Definition: gfontrle.c:5
uint8_t non_intra_quantizer_matrix[64]
Definition: accel_xvmc.h:57
#define VO_NUM_RECENT_FRAMES
Definition: video_out.h:288
#define XINE_MACROBLOCK_MOTION_BACKWARD
Definition: accel_xvmc.h:151
int concealment_motion_vectors
Definition: accel_xvmc.h:50
int picture_structure
Definition: accel_xvmc.h:43
#define VO_TOP_FIELD
Definition: video_out.h:291
uint8_t intra_quantizer_matrix[64]
Definition: accel_xvmc.h:56
int pred_dct_frame
Definition: accel_xvmc.h:49
Definition: video_out.h:59
Definition: alphablend.h:55
Definition: configfile.h:46
#define XINE_PICT_P_TYPE
Definition: accel_xvmc.h:144
#define XINE_MACROBLOCK_PATTERN
Definition: accel_xvmc.h:150
void xxmc_xvmc_proc_macro_block(int x, int y, int mb_type, int motion_type, int(*mv_field_sel)[2], int *dmvector, int cbp, int dct_type, vo_frame_t *current_frame, vo_frame_t *forward_ref_frame, vo_frame_t *backward_ref_frame, int picture_structure, int second_field, int(*f_mot_pmv)[2], int(*b_mot_pmv)[2])
Definition: xvmc_mocomp.c:99