xine-lib 1.2.13-20230125hg15249
accel_xvmc.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2018 the xine project
3 * Copyright (C) 2004 the Unichrome project
4 *
5 * This file is part of xine, a free video player.
6 *
7 * xine is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * xine is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
20 *
21 *
22 * Common acceleration definitions for XvMC.
23 *
24 *
25 */
26
27#ifndef HAVE_XINE_ACCEL_H
28#define HAVE_XINE_ACCEL_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34typedef struct xine_macroblock_s {
35 short *blockptr; /* pointer to current dct block */
36 short *blockbaseptr; /* pointer to base of dct block array in blocks */
37 short xvmc_accel; /* type of acceleration supported */
39
61
62
63typedef struct xine_xvmc_s {
66 void (*proc_macro_block)(int x,int y,int mb_type,
67 int motion_type,int (*mv_field_sel)[2],
68 int *dmvector,int cbp,int dct_type,
69 vo_frame_t *current_frame,vo_frame_t *forward_ref_frame,
70 vo_frame_t *backward_ref_frame,int picture_structure,
71 int second_field,int (*f_mot_pmv)[2],int (*b_mot_pmv)[2]);
73
74#define XVMC_DATA(frame_gen) ((frame_gen) ? (xine_xvmc_t *)(frame_gen)->accel_data : (xine_xvmc_t *)0)
75#define XVMC_FRAME(frame_gen) ((frame_gen) ? (xvmc_frame_t *)XVMC_DATA(frame_gen)->vo_frame : (xvmc_frame_t *)0)
76
77typedef struct xine_xxmc_s {
78
79 /*
80 * We inherit the xine_xvmc_t properties.
81 */
82
84
85 unsigned mpeg;
86 unsigned acceleration;
89 uint8_t *slice_data;
91 unsigned slice_code;
92 int result;
94 float sleep;
95 void (*proc_xxmc_update_frame) (vo_driver_t *this_gen, vo_frame_t *frame_gen,
96 uint32_t width, uint32_t height, double ratio,
97 int format, int flags);
98 void (*proc_xxmc_begin) (vo_frame_t *vo_img);
99 void (*proc_xxmc_slice) (vo_frame_t *vo_img);
100 void (*proc_xxmc_flush) (vo_frame_t *vo_img);
101
102 /*
103 * For thread-safety only.
104 */
105
106 int (*proc_xxmc_lock_valid) (vo_frame_t *cur_frame, vo_frame_t *fw_frame,
107 vo_frame_t *bw_frame,unsigned pc_type);
108 void (*proc_xxmc_unlock) (vo_driver_t *this_gen);
110
111#define XXMC_DATA(frame_gen) ((frame_gen) ? (xine_xxmc_t *)(frame_gen)->accel_data : (xine_xxmc_t *)0)
112#define XXMC_FRAME(frame_gen) ((frame_gen) ? (xxmc_frame_t *)XXMC_DATA(frame_gen)->xvmc.vo_frame : (xxmc_frame_t *)0)
113
114 /*
115 * Register XvMC stream types here.
116 */
117
118#define XINE_XVMC_MPEG_1 0x00000001
119#define XINE_XVMC_MPEG_2 0x00000002
120#define XINE_XVMC_MPEG_4 0x00000004
121
122 /*
123 * Register XvMC acceleration levels here.
124 */
125
126#define XINE_XVMC_ACCEL_MOCOMP 0x00000001
127#define XINE_XVMC_ACCEL_IDCT 0x00000002
128#define XINE_XVMC_ACCEL_VLD 0x00000004
129
130
131/* xvmc acceleration types */
132#define XINE_VO_MOTION_ACCEL 1
133#define XINE_VO_IDCT_ACCEL 2
134#define XINE_VO_SIGNED_INTRA 4
135
136/* motion types */
137#define XINE_MC_FIELD 1
138#define XINE_MC_FRAME 2
139#define XINE_MC_16X8 2
140#define XINE_MC_DMV 3
141
142/* picture coding type */
143#define XINE_PICT_I_TYPE 1
144#define XINE_PICT_P_TYPE 2
145#define XINE_PICT_B_TYPE 3
146#define XINE_PICT_D_TYPE 4
147
148/* macroblock modes */
149#define XINE_MACROBLOCK_INTRA 1
150#define XINE_MACROBLOCK_PATTERN 2
151#define XINE_MACROBLOCK_MOTION_BACKWARD 4
152#define XINE_MACROBLOCK_MOTION_FORWARD 8
153#define XINE_MACROBLOCK_QUANT 16
154#define XINE_MACROBLOCK_DCT_TYPE_INTERLACED 32
155
156#ifdef __cplusplus
157}
158#endif
159
160#endif
161
struct xine_macroblock_s xine_macroblocks_t
struct xine_vld_frame_s xine_vld_frame_t
struct xine_xvmc_s xine_xvmc_t
struct xine_xxmc_s xine_xxmc_t
unsigned int height
Definition gfontrle.c:5
unsigned int width
Definition gfontrle.c:4
Definition video_out.h:50
Definition video_out.h:70
Definition accel_xvmc.h:34
short * blockbaseptr
Definition accel_xvmc.h:36
short xvmc_accel
Definition accel_xvmc.h:37
short * blockptr
Definition accel_xvmc.h:35
Definition accel_xvmc.h:40
vo_frame_t * forward_reference_frame
Definition accel_xvmc.h:59
int q_scale_type
Definition accel_xvmc.h:51
int load_non_intra_quantizer_matrix
Definition accel_xvmc.h:55
int concealment_motion_vectors
Definition accel_xvmc.h:50
int second_field
Definition accel_xvmc.h:53
int load_intra_quantizer_matrix
Definition accel_xvmc.h:54
vo_frame_t * backward_reference_frame
Definition accel_xvmc.h:58
uint8_t intra_quantizer_matrix[64]
Definition accel_xvmc.h:56
int picture_structure
Definition accel_xvmc.h:43
int mpeg_coding
Definition accel_xvmc.h:46
int mv_ranges[2][2]
Definition accel_xvmc.h:42
int intra_vlc_format
Definition accel_xvmc.h:52
int scan
Definition accel_xvmc.h:48
int version
Definition accel_xvmc.h:41
int picture_coding_type
Definition accel_xvmc.h:44
int intra_dc_precision
Definition accel_xvmc.h:45
int pred_dct_frame
Definition accel_xvmc.h:49
int progressive_sequence
Definition accel_xvmc.h:47
uint8_t non_intra_quantizer_matrix[64]
Definition accel_xvmc.h:57
Definition accel_xvmc.h:63
xine_macroblocks_t * macroblocks
Definition accel_xvmc.h:65
vo_frame_t * vo_frame
Definition accel_xvmc.h:64
void(* 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 accel_xvmc.h:66
Definition accel_xvmc.h:77
xine_vld_frame_t vld_frame
Definition accel_xvmc.h:88
uint8_t * slice_data
Definition accel_xvmc.h:89
int decoded
Definition accel_xvmc.h:93
int(* proc_xxmc_lock_valid)(vo_frame_t *cur_frame, vo_frame_t *fw_frame, vo_frame_t *bw_frame, unsigned pc_type)
Definition accel_xvmc.h:106
void(* proc_xxmc_unlock)(vo_driver_t *this_gen)
Definition accel_xvmc.h:108
xine_xvmc_t xvmc
Definition accel_xvmc.h:83
void(* proc_xxmc_update_frame)(vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags)
Definition accel_xvmc.h:95
int fallback_format
Definition accel_xvmc.h:87
int result
Definition accel_xvmc.h:92
float sleep
Definition accel_xvmc.h:94
void(* proc_xxmc_flush)(vo_frame_t *vo_img)
Definition accel_xvmc.h:100
unsigned slice_data_size
Definition accel_xvmc.h:90
void(* proc_xxmc_begin)(vo_frame_t *vo_img)
Definition accel_xvmc.h:98
unsigned mpeg
Definition accel_xvmc.h:85
void(* proc_xxmc_slice)(vo_frame_t *vo_img)
Definition accel_xvmc.h:99
unsigned acceleration
Definition accel_xvmc.h:86
unsigned slice_code
Definition accel_xvmc.h:91