Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
bc_dts_defs.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright(c) 2006-2009 Broadcom Corporation.
3  *
4  * Name: bc_dts_defs.h
5  *
6  * Description: Common definitions for all components. Only types
7  * is allowed to be included from this file.
8  *
9  * AU
10  *
11  * HISTORY:
12  *
13  ********************************************************************
14  * This header is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU Lesser General Public License as published
16  * by the Free Software Foundation, either version 2.1 of the License.
17  *
18  * This header is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Lesser General Public License for more details.
22  * You should have received a copy of the GNU Lesser General Public License
23  * along with this header. If not, see <http://www.gnu.org/licenses/>.
24  *******************************************************************/
25 
26 #ifndef _BC_DTS_DEFS_H_
27 #define _BC_DTS_DEFS_H_
28 
29 #include <linux/types.h>
30 
31 /* BIT Mask */
32 #define BC_BIT(_x) (1 << (_x))
33 
34 enum BC_STATUS {
62 
63  /* Must be the last one.*/
65 };
66 
67 /*------------------------------------------------------*
68  * Registry Key Definitions *
69  *------------------------------------------------------*/
70 #define BC_REG_KEY_MAIN_PATH "Software\\Broadcom\\MediaPC\\70010"
71 #define BC_REG_KEY_FWPATH "FirmwareFilePath"
72 #define BC_REG_KEY_SEC_OPT "DbgOptions"
73 
74 /*
75  * Options:
76  *
77  * b[5] = Enable RSA KEY in EEPROM Support
78  * b[6] = Enable Old PIB scheme. (0 = Use PIB with video scheme)
79  *
80  * b[12] = Enable send message to NotifyIcon
81  *
82  */
83 
87 };
88 
89 struct BC_REG_CONFIG {
91 };
92 
93 #if defined(__KERNEL__) || defined(__LINUX_USER__)
94 #else
95 /* Align data structures */
96 #define ALIGN(x) __declspec(align(x))
97 #endif
98 
99 /* mode
100  * b[0]..b[7] = _DtsDeviceOpenMode
101  * b[8] = Load new FW
102  * b[9] = Load file play back FW
103  * b[10] = Disk format (0 for HD DVD and 1 for BLU ray)
104  * b[11]-b[15] = default output resolution
105  * b[16] = Skip TX CPB Buffer Check
106  * b[17] = Adaptive Output Encrypt/Scramble Scheme
107  * b[18]-b[31] = reserved for future use
108  */
109 
110 /* To allow multiple apps to open the device. */
116 };
117 
118 /* To enable the filter to selectively enable/disable fixes or erratas */
123  /* b[11]-b[15] : Default output resolution */
127  /* b[19]-b[21] : select clock frequency */
129 };
130 
131 #define DTS_DFLT_RESOLUTION(x) (x<<11)
132 
133 #define DTS_DFLT_CLOCK(x) (x<<19)
134 
135 /* F/W File Version corresponding to S/W Releases */
137  /* S/W release: 02.04.02 F/W release 2.12.2.0 */
138  BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0))
139 };
140 
141 /*------------------------------------------------------*
142  * Stream Types for DtsOpenDecoder() *
143  *------------------------------------------------------*/
149 };
150 
151 /*------------------------------------------------------*
152  * Video Algorithms for DtsSetVideoParams() *
153  *------------------------------------------------------*/
159 };
160 
161 /*------------------------------------------------------*
162  * MPEG Extension to the PPB *
163  *------------------------------------------------------*/
164 #define BC_MPEG_VALID_PANSCAN (1)
165 
168  /* Always valid, defaults to picture size if no
169  * sequence display extension in the stream. */
172 
173  /* MPEG_VALID_PANSCAN
174  * Offsets are a copy values from the MPEG stream. */
178 };
179 
180 /*------------------------------------------------------*
181  * H.264 Extension to the PPB *
182  *------------------------------------------------------*/
183 /* Bit definitions for 'other.h264.valid' field */
184 #define H264_VALID_PANSCAN (1)
185 #define H264_VALID_SPS_CROP (2)
186 #define H264_VALID_VUI (4)
187 
189  /* 'valid' specifies which fields (or sets of
190  * fields) below are valid. If the corresponding
191  * bit in 'valid' is NOT set then that field(s)
192  * is (are) not initialized. */
194 
195  /* H264_VALID_PANSCAN */
201 
202  /* H264_VALID_SPS_CROP */
207 
208  /* H264_VALID_VUI */
211 };
212 
213 /*------------------------------------------------------*
214  * VC1 Extension to the PPB *
215  *------------------------------------------------------*/
216 #define VC1_VALID_PANSCAN (1)
217 
220 
221  /* Always valid, defaults to picture size if no
222  * sequence display extension in the stream. */
225 
226  /* VC1 pan scan windows */
232 };
233 
234 /*------------------------------------------------------*
235  * Picture Information Block *
236  *------------------------------------------------------*/
237 #if defined(__LINUX_USER__)
238 /* Values for 'pulldown' field. '0' means no pulldown information
239  * was present for this picture. */
240 enum {
241  vdecNoPulldownInfo = 0,
242  vdecTop = 1,
243  vdecBottom = 2,
244  vdecTopBottom = 3,
245  vdecBottomTop = 4,
246  vdecTopBottomTop = 5,
247  vdecBottomTopBottom = 6,
248  vdecFrame_X2 = 7,
249  vdecFrame_X3 = 8,
250  vdecFrame_X1 = 9,
251  vdecFrame_X4 = 10,
252 };
253 
254 /* Values for the 'frame_rate' field. */
255 enum {
256  vdecFrameRateUnknown = 0,
257  vdecFrameRate23_97,
258  vdecFrameRate24,
259  vdecFrameRate25,
260  vdecFrameRate29_97,
261  vdecFrameRate30,
262  vdecFrameRate50,
263  vdecFrameRate59_94,
264  vdecFrameRate60,
265 };
266 
267 /* Values for the 'aspect_ratio' field. */
268 enum {
269  vdecAspectRatioUnknown = 0,
270  vdecAspectRatioSquare,
271  vdecAspectRatio12_11,
272  vdecAspectRatio10_11,
273  vdecAspectRatio16_11,
274  vdecAspectRatio40_33,
275  vdecAspectRatio24_11,
276  vdecAspectRatio20_11,
277  vdecAspectRatio32_11,
278  vdecAspectRatio80_33,
279  vdecAspectRatio18_11,
280  vdecAspectRatio15_11,
281  vdecAspectRatio64_33,
282  vdecAspectRatio160_99,
283  vdecAspectRatio4_3,
284  vdecAspectRatio16_9,
285  vdecAspectRatio221_1,
286  vdecAspectRatioOther = 255,
287 };
288 
289 /* Values for the 'colour_primaries' field. */
290 enum {
291  vdecColourPrimariesUnknown = 0,
292  vdecColourPrimariesBT709,
293  vdecColourPrimariesUnspecified,
294  vdecColourPrimariesReserved,
295  vdecColourPrimariesBT470_2M = 4,
296  vdecColourPrimariesBT470_2BG,
297  vdecColourPrimariesSMPTE170M,
298  vdecColourPrimariesSMPTE240M,
299  vdecColourPrimariesGenericFilm,
300 };
338 enum {
339  vdecRESOLUTION_CUSTOM = 0x00000000,
340  vdecRESOLUTION_480i = 0x00000001,
341  vdecRESOLUTION_1080i = 0x00000002,
342  vdecRESOLUTION_NTSC = 0x00000003,
343  vdecRESOLUTION_480p = 0x00000004,
344  vdecRESOLUTION_720p = 0x00000005,
345  vdecRESOLUTION_PAL1 = 0x00000006,
346  vdecRESOLUTION_1080i25 = 0x00000007,
347  vdecRESOLUTION_720p50 = 0x00000008,
348  vdecRESOLUTION_576p = 0x00000009,
349  vdecRESOLUTION_1080i29_97 = 0x0000000A,
350  vdecRESOLUTION_720p59_94 = 0x0000000B,
351  vdecRESOLUTION_SD_DVD = 0x0000000C,
352  vdecRESOLUTION_480p656 = 0x0000000D,
353  vdecRESOLUTION_1080p23_976 = 0x0000000E,
354  vdecRESOLUTION_720p23_976 = 0x0000000F,
355  vdecRESOLUTION_240p29_97 = 0x00000010,
356  vdecRESOLUTION_240p30 = 0x00000011,
357  vdecRESOLUTION_288p25 = 0x00000012,
358  vdecRESOLUTION_1080p29_97 = 0x00000013,
359  vdecRESOLUTION_1080p30 = 0x00000014,
360  vdecRESOLUTION_1080p24 = 0x00000015,
361  vdecRESOLUTION_1080p25 = 0x00000016,
362  vdecRESOLUTION_720p24 = 0x00000017,
363  vdecRESOLUTION_720p29_97 = 0x00000018,
364  vdecRESOLUTION_480p23_976 = 0x00000019,
365  vdecRESOLUTION_480p29_97 = 0x0000001A,
366  vdecRESOLUTION_576p25 = 0x0000001B,
367  /* For Zero Frame Rate */
368  vdecRESOLUTION_480p0 = 0x0000001C,
369  vdecRESOLUTION_480i0 = 0x0000001D,
370  vdecRESOLUTION_576p0 = 0x0000001E,
371  vdecRESOLUTION_720p0 = 0x0000001F,
372  vdecRESOLUTION_1080p0 = 0x00000020,
373  vdecRESOLUTION_1080i0 = 0x00000021,
374 };
375 
376 /* Bit definitions for 'flags' field */
377 #define VDEC_FLAG_EOS (0x0004)
378 
379 #define VDEC_FLAG_FRAME (0x0000)
380 #define VDEC_FLAG_FIELDPAIR (0x0008)
381 #define VDEC_FLAG_TOPFIELD (0x0010)
382 #define VDEC_FLAG_BOTTOMFIELD (0x0018)
383 
384 #define VDEC_FLAG_PROGRESSIVE_SRC (0x0000)
385 #define VDEC_FLAG_INTERLACED_SRC (0x0020)
386 #define VDEC_FLAG_UNKNOWN_SRC (0x0040)
387 
388 #define VDEC_FLAG_BOTTOM_FIRST (0x0080)
389 #define VDEC_FLAG_LAST_PICTURE (0x0100)
390 
391 #define VDEC_FLAG_PICTURE_META_DATA_PRESENT (0x40000)
392 
393 #endif /* __LINUX_USER__ */
394 
396  MODE420 = 0x0,
399 };
411  /* Common fields. */
426  uint32_t n_drop; /* number of non-reference frames
427  remaining to be dropped */
428 
429  /* Protocol-specific extensions. */
430  union {
434  } other;
435 
436 };
437 
438 /*------------------------------------------------------*
439  * ProcOut Info *
440  *------------------------------------------------------*/
441 
455  /* Flags from App to Device */
461 
462  /* Flags from Device to APP */
467 };
468 
469 typedef enum BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width,
470  uint32_t height, uint32_t stride, void *pOut);
471 
472 /* Line 21 Closed Caption */
473 /* User Data */
474 #define MAX_UD_SIZE 1792 /* 1920 - 128 */
475 
495 
499 
502 
504 
506 
507  /* Line 21 Closed Caption */
508  /* User Data */
511 
512  void *hnd;
518 
519 };
556 };
557 
558 #define BC_SWAP32(_v) \
559  ((((_v) & 0xFF000000)>>24)| \
560  (((_v) & 0x00FF0000)>>8)| \
561  (((_v) & 0x0000FF00)<<8)| \
562  (((_v) & 0x000000FF)<<24))
563 
564 #define WM_AGENT_TRAYICON_DECODER_OPEN 10001
565 #define WM_AGENT_TRAYICON_DECODER_CLOSE 10002
566 #define WM_AGENT_TRAYICON_DECODER_START 10003
567 #define WM_AGENT_TRAYICON_DECODER_STOP 10004
568 #define WM_AGENT_TRAYICON_DECODER_RUN 10005
569 #define WM_AGENT_TRAYICON_DECODER_PAUSE 10006
570 
571 
572 #endif /* _BC_DTS_DEFS_H_ */