Mercurial > mplayer.hg
comparison dvdread/nav_types.h @ 24088:fc9f44db5fcd
reimplemented nav_read_PCI() and nav_read_DSI() using getbits() rather than relying on bitfields layout in memory
author | nicodvb |
---|---|
date | Mon, 20 Aug 2007 21:27:44 +0000 |
parents | 1542693b2a30 |
children |
comparison
equal
deleted
inserted
replaced
24087:5992f8a979e3 | 24088:fc9f44db5fcd |
---|---|
100 typedef struct { | 100 typedef struct { |
101 uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: different 2: equal 3: eual except for button cmds */ | 101 uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: different 2: equal 3: eual except for button cmds */ |
102 uint32_t hli_s_ptm; /**< start ptm of hli */ | 102 uint32_t hli_s_ptm; /**< start ptm of hli */ |
103 uint32_t hli_e_ptm; /**< end ptm of hli */ | 103 uint32_t hli_e_ptm; /**< end ptm of hli */ |
104 uint32_t btn_se_e_ptm; /**< end ptm of button select */ | 104 uint32_t btn_se_e_ptm; /**< end ptm of button select */ |
105 #ifdef WORDS_BIGENDIAN | |
106 unsigned int zero1 : 2; /**< reserved */ | 105 unsigned int zero1 : 2; /**< reserved */ |
107 unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or 3 with 36/18/12 buttons */ | 106 unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or 3 with 36/18/12 buttons */ |
108 unsigned int zero2 : 1; /**< reserved */ | 107 unsigned int zero2 : 1; /**< reserved */ |
109 unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream for button group 1 */ | 108 unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream for button group 1 */ |
110 unsigned int zero3 : 1; /**< reserved */ | 109 unsigned int zero3 : 1; /**< reserved */ |
111 unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream for button group 2 */ | 110 unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream for button group 2 */ |
112 unsigned int zero4 : 1; /**< reserved */ | 111 unsigned int zero4 : 1; /**< reserved */ |
113 unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream for button group 3 */ | 112 unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream for button group 3 */ |
114 #else | |
115 unsigned int btngr1_dsp_ty : 3; | |
116 unsigned int zero2 : 1; | |
117 unsigned int btngr_ns : 2; | |
118 unsigned int zero1 : 2; | |
119 unsigned int btngr3_dsp_ty : 3; | |
120 unsigned int zero4 : 1; | |
121 unsigned int btngr2_dsp_ty : 3; | |
122 unsigned int zero3 : 1; | |
123 #endif | |
124 uint8_t btn_ofn; /**< button offset number range 0-255 */ | 113 uint8_t btn_ofn; /**< button offset number range 0-255 */ |
125 uint8_t btn_ns; /**< number of valid buttons <= 36/18/12 (low 6 bits) */ | 114 uint8_t btn_ns; /**< number of valid buttons <= 36/18/12 (low 6 bits) */ |
126 uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low 6 bits) nsl_btn_ns <= btn_ns */ | 115 uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low 6 bits) nsl_btn_ns <= btn_ns */ |
127 uint8_t zero5; /**< reserved */ | 116 uint8_t zero5; /**< reserved */ |
128 uint8_t fosl_btnn; /**< forcedly selected button (low 6 bits) */ | 117 uint8_t fosl_btnn; /**< forcedly selected button (low 6 bits) */ |
148 * NOTE: I've had to change the structure from the disk layout to get | 137 * NOTE: I've had to change the structure from the disk layout to get |
149 * the packing to work with Sun's Forte C compiler. | 138 * the packing to work with Sun's Forte C compiler. |
150 * The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ | 139 * The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ |
151 */ | 140 */ |
152 typedef struct { | 141 typedef struct { |
153 #ifdef WORDS_BIGENDIAN | |
154 unsigned int btn_coln : 2; /**< button color number */ | 142 unsigned int btn_coln : 2; /**< button color number */ |
155 unsigned int x_start : 10; /**< x start offset within the overlay */ | 143 unsigned int x_start : 10; /**< x start offset within the overlay */ |
156 unsigned int zero1 : 2; /**< reserved */ | 144 unsigned int zero1 : 2; /**< reserved */ |
157 unsigned int x_end : 10; /**< x end offset within the overlay */ | 145 unsigned int x_end : 10; /**< x end offset within the overlay */ |
158 | 146 |
159 unsigned int zero3 : 2; /**< reserved */ | |
160 unsigned int up : 6; /**< button index when pressing up */ | |
161 | |
162 unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if selected */ | 147 unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if selected */ |
163 unsigned int y_start : 10; /**< y start offset within the overlay */ | 148 unsigned int y_start : 10; /**< y start offset within the overlay */ |
164 unsigned int zero2 : 2; /**< reserved */ | 149 unsigned int zero2 : 2; /**< reserved */ |
165 unsigned int y_end : 10; /**< y end offset within the overlay */ | 150 unsigned int y_end : 10; /**< y end offset within the overlay */ |
166 | 151 |
152 unsigned int zero3 : 2; /**< reserved */ | |
153 unsigned int up : 6; /**< button index when pressing up */ | |
167 unsigned int zero4 : 2; /**< reserved */ | 154 unsigned int zero4 : 2; /**< reserved */ |
168 unsigned int down : 6; /**< button index when pressing down */ | 155 unsigned int down : 6; /**< button index when pressing down */ |
169 unsigned int zero5 : 2; /**< reserved */ | 156 unsigned int zero5 : 2; /**< reserved */ |
170 unsigned int left : 6; /**< button index when pressing left */ | 157 unsigned int left : 6; /**< button index when pressing left */ |
171 unsigned int zero6 : 2; /**< reserved */ | 158 unsigned int zero6 : 2; /**< reserved */ |
172 unsigned int right : 6; /**< button index when pressing right */ | 159 unsigned int right : 6; /**< button index when pressing right */ |
173 #else | |
174 unsigned int x_end : 10; | |
175 unsigned int zero1 : 2; | |
176 unsigned int x_start : 10; | |
177 unsigned int btn_coln : 2; | |
178 | |
179 unsigned int up : 6; | |
180 unsigned int zero3 : 2; | |
181 | |
182 unsigned int y_end : 10; | |
183 unsigned int zero2 : 2; | |
184 unsigned int y_start : 10; | |
185 unsigned int auto_action_mode : 2; | |
186 | |
187 unsigned int down : 6; | |
188 unsigned int zero4 : 2; | |
189 unsigned int left : 6; | |
190 unsigned int zero5 : 2; | |
191 unsigned int right : 6; | |
192 unsigned int zero6 : 2; | |
193 #endif | |
194 vm_cmd_t cmd; | 160 vm_cmd_t cmd; |
195 } ATTRIBUTE_PACKED btni_t; | 161 } ATTRIBUTE_PACKED btni_t; |
196 | 162 |
197 /** | 163 /** |
198 * Highlight Information | 164 * Highlight Information |