xine-lib  1.2.10
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
31 extern "C" {
32 #endif
33 
34 typedef 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 
40 typedef struct xine_vld_frame_s {
41  int version; /* Backward compatibility */
42  int mv_ranges[2][2];
48  int scan;
61 
62 
63 typedef 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]);
72 } xine_xvmc_t ;
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 
77 typedef 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;
90  unsigned slice_data_size;
91  unsigned slice_code;
92  int result;
93  int decoded;
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);
109 } xine_xxmc_t;
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 
xine_vld_frame_s::intra_vlc_format
int intra_vlc_format
Definition: accel_xvmc.h:52
xine_xxmc_s::xvmc
xine_xvmc_t xvmc
Definition: accel_xvmc.h:83
xine_vld_frame_t
struct xine_vld_frame_s xine_vld_frame_t
xine_xxmc_t
struct xine_xxmc_s xine_xxmc_t
xine_vld_frame_s::intra_dc_precision
int intra_dc_precision
Definition: accel_xvmc.h:45
xine_vld_frame_s::backward_reference_frame
vo_frame_t * backward_reference_frame
Definition: accel_xvmc.h:58
xine_vld_frame_s::mpeg_coding
int mpeg_coding
Definition: accel_xvmc.h:46
xine_vld_frame_s::load_intra_quantizer_matrix
int load_intra_quantizer_matrix
Definition: accel_xvmc.h:54
xine_xxmc_s::result
int result
Definition: accel_xvmc.h:92
xine_vld_frame_s::picture_coding_type
int picture_coding_type
Definition: accel_xvmc.h:44
xine_xxmc_s
Definition: accel_xvmc.h:77
xine_xvmc_s::macroblocks
xine_macroblocks_t * macroblocks
Definition: accel_xvmc.h:65
xine_xxmc_s::acceleration
unsigned acceleration
Definition: accel_xvmc.h:86
xine_xxmc_s::slice_data_size
unsigned slice_data_size
Definition: accel_xvmc.h:90
xine_xxmc_s::slice_data
uint8_t * slice_data
Definition: accel_xvmc.h:89
xine_xxmc_s::proc_xxmc_unlock
void(* proc_xxmc_unlock)(vo_driver_t *this_gen)
Definition: accel_xvmc.h:108
xine_macroblock_s
Definition: accel_xvmc.h:34
vo_driver_t
Definition: video_out.h:50
xine_xxmc_s::decoded
int decoded
Definition: accel_xvmc.h:93
xine_vld_frame_s::q_scale_type
int q_scale_type
Definition: accel_xvmc.h:51
xine_vld_frame_s::forward_reference_frame
vo_frame_t * forward_reference_frame
Definition: accel_xvmc.h:59
width
unsigned int width
Definition: gfontrle.c:4
xine_vld_frame_s::scan
int scan
Definition: accel_xvmc.h:48
xine_vld_frame_s::load_non_intra_quantizer_matrix
int load_non_intra_quantizer_matrix
Definition: accel_xvmc.h:55
xine_xvmc_s
Definition: accel_xvmc.h:63
xine_xvmc_s::proc_macro_block
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
xine_vld_frame_s::progressive_sequence
int progressive_sequence
Definition: accel_xvmc.h:47
xine_xvmc_s::vo_frame
vo_frame_t * vo_frame
Definition: accel_xvmc.h:64
xine_xxmc_s::proc_xxmc_update_frame
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
xine_vld_frame_s
Definition: accel_xvmc.h:40
xine_macroblocks_t
struct xine_macroblock_s xine_macroblocks_t
xine_vld_frame_s::second_field
int second_field
Definition: accel_xvmc.h:53
xine_xxmc_s::mpeg
unsigned mpeg
Definition: accel_xvmc.h:85
xine_xxmc_s::slice_code
unsigned slice_code
Definition: accel_xvmc.h:91
xine_macroblock_s::blockptr
short * blockptr
Definition: accel_xvmc.h:35
xine_vld_frame_s::mv_ranges
int mv_ranges[2][2]
Definition: accel_xvmc.h:42
height
unsigned int height
Definition: gfontrle.c:5
xine_vld_frame_s::non_intra_quantizer_matrix
uint8_t non_intra_quantizer_matrix[64]
Definition: accel_xvmc.h:57
xine_xvmc_t
struct xine_xvmc_s xine_xvmc_t
xine_xxmc_s::vld_frame
xine_vld_frame_t vld_frame
Definition: accel_xvmc.h:88
xine_vld_frame_s::concealment_motion_vectors
int concealment_motion_vectors
Definition: accel_xvmc.h:50
xine_macroblock_s::blockbaseptr
short * blockbaseptr
Definition: accel_xvmc.h:36
xine_xxmc_s::proc_xxmc_begin
void(* proc_xxmc_begin)(vo_frame_t *vo_img)
Definition: accel_xvmc.h:98
xine_vld_frame_s::picture_structure
int picture_structure
Definition: accel_xvmc.h:43
xine_xxmc_s::proc_xxmc_slice
void(* proc_xxmc_slice)(vo_frame_t *vo_img)
Definition: accel_xvmc.h:99
xine_xxmc_s::proc_xxmc_lock_valid
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
xine_vld_frame_s::intra_quantizer_matrix
uint8_t intra_quantizer_matrix[64]
Definition: accel_xvmc.h:56
xine_vld_frame_s::pred_dct_frame
int pred_dct_frame
Definition: accel_xvmc.h:49
vo_frame_s
Definition: video_out.h:59
xine_vld_frame_s::version
int version
Definition: accel_xvmc.h:41
xine_xxmc_s::proc_xxmc_flush
void(* proc_xxmc_flush)(vo_frame_t *vo_img)
Definition: accel_xvmc.h:100
xine_xxmc_s::fallback_format
int fallback_format
Definition: accel_xvmc.h:87
xine_xxmc_s::sleep
float sleep
Definition: accel_xvmc.h:94
xine_macroblock_s::xvmc_accel
short xvmc_accel
Definition: accel_xvmc.h:37