Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

362 lines
17 KiB

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Rgb16fmt.h 1.5 1998/04/29 22:43:37 tomz Exp $
  2. #ifndef __RGB16FMT_H
  3. #define __RGB16FMT_H
  4. #ifndef __DEFAULTS_H
  5. #include "defaults.h"
  6. #endif
  7. KS_DATARANGE_VIDEO StreamFormatRGB555 =
  8. {
  9. // KSDATARANGE
  10. {
  11. {
  12. sizeof( KS_DATARANGE_VIDEO ),
  13. 0,
  14. DefWidth * DefHeight * 2, // SampleSize
  15. 0, // Reserved
  16. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  17. { 0xe436eb7c, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB555,
  18. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  19. }
  20. },
  21. true, // BOOL, bFixedSizeSamples (all samples same size?)
  22. true, // BOOL, bTemporalCompression (all I frames?)
  23. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  24. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  25. // _KS_VIDEO_STREAM_CONFIG_CAPS
  26. {
  27. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }, // GUID
  28. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  29. {
  30. MaxInWidth, MaxInHeight // SIZE InputSize
  31. },
  32. {
  33. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  34. },
  35. {
  36. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  37. },
  38. 2, // int CropGranularityX; // granularity of cropping size
  39. 2, // int CropGranularityY;
  40. 2, // int CropAlignX; // alignment of cropping rect
  41. 2, // int CropAlignY;
  42. {
  43. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  44. },
  45. {
  46. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  47. },
  48. 1, // int OutputGranularityX; // granularity of output bitmap size
  49. 1, // int OutputGranularityY;
  50. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  51. 0, // StretchTapsY
  52. 2, // ShrinkTapsX
  53. 2, // ShrinkTapsY
  54. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  55. 333667, // LONGLONG MaxFrameInterval;
  56. 2 * 30 * MinOutWidth * MinOutHeight, // LONG MinBitsPerSecond;
  57. 2 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  58. },
  59. // KS_VIDEOINFOHEADER (default format)
  60. {
  61. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  62. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  63. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  64. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  65. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  66. {
  67. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  68. DefWidth, // LONG biWidth;
  69. DefHeight, // LONG biHeight;
  70. 1, // WORD biPlanes;
  71. 16, // WORD biBitCount;
  72. KS_BI_RGB, // DWORD biCompression;
  73. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  74. 0, // LONG biXPelsPerMeter;
  75. 0, // LONG biYPelsPerMeter;
  76. 0, // DWORD biClrUsed;
  77. 0 // DWORD biClrImportant;
  78. }
  79. }
  80. };
  81. KS_DATARANGE_VIDEO2 StreamFormat2RGB555 =
  82. {
  83. // KSDATARANGE
  84. {
  85. {
  86. sizeof( KS_DATARANGE_VIDEO2 ),
  87. 0,
  88. DefWidth * DefHeight * 2, // SampleSize
  89. 0, // Reserved
  90. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  91. { 0xe436eb7c, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB555,
  92. { 0xf72a76A0, 0xeb0a, 0x11d0, { 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba } } //FORMAT_VideoInfo2
  93. }
  94. },
  95. true, // BOOL, bFixedSizeSamples (all samples same size?)
  96. true, // BOOL, bTemporalCompression (all I frames?)
  97. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  98. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  99. // _KS_VIDEO_STREAM_CONFIG_CAPS
  100. {
  101. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2 }, // GUID
  102. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  103. {
  104. MaxInWidth, MaxInHeight // SIZE InputSize
  105. },
  106. {
  107. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  108. },
  109. {
  110. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  111. },
  112. 2, // int CropGranularityX; // granularity of cropping size
  113. 2, // int CropGranularityY;
  114. 2, // int CropAlignX; // alignment of cropping rect
  115. 2, // int CropAlignY;
  116. {
  117. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  118. },
  119. {
  120. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  121. },
  122. 1, // int OutputGranularityX; // granularity of output bitmap size
  123. 1, // int OutputGranularityY;
  124. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  125. 0, // StretchTapsY
  126. 2, // ShrinkTapsX
  127. 2, // ShrinkTapsY
  128. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  129. 333667, // LONGLONG MaxFrameInterval;
  130. 2 * 30 * MinOutWidth * MinOutHeight, // LONG MinBitsPerSecond;
  131. 2 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  132. },
  133. // KS_VIDEOINFOHEADER2 (default format)
  134. {
  135. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  136. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  137. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  138. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  139. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  140. #if 0
  141. //TODO: video memory must be available for interlacing to work
  142. KS_INTERLACE_IsInterlaced | // DWORD dwInterlaceFlags
  143. #else
  144. KS_INTERLACE_1FieldPerSample
  145. //| KS_INTERLACE_Field1First
  146. //| KS_INTERLACE_FieldPatField1Only
  147. | KS_INTERLACE_FieldPatBothRegular
  148. | KS_INTERLACE_DisplayModeBobOnly,
  149. //| KS_INTERLACE_DisplayModeBobOrWeave,
  150. #endif
  151. // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
  152. // AMINTERLACE_IsInterlaced
  153. // AMINTERLACE_1FieldPerSample
  154. // AMINTERLACE_Field1First
  155. // AMINTERLACE_UNUSED
  156. // AMINTERLACE_FieldPatternMask
  157. // AMINTERLACE_FieldPatField1Only
  158. // AMINTERLACE_FieldPatField2Only
  159. // AMINTERLACE_FieldPatBothRegular
  160. // AMINTERLACE_FieldPatBothIrregular
  161. // AMINTERLACE_DisplayModeMask
  162. // AMINTERLACE_DisplayModeBobOnly
  163. // AMINTERLACE_DisplayModeWeaveOnly
  164. // AMINTERLACE_DisplayModeBobOrWeave
  165. //
  166. 0, // DWORD dwCopyProtectFlags
  167. // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
  168. // AMCOPYPROTECT_RestrictDuplication
  169. //
  170. 4, // DWORD dwPictAspectRatioX
  171. // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
  172. //
  173. 3, // DWORD dwPictAspectRatioY
  174. // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
  175. 0, // DWORD dwReserved1
  176. 0, // DWORD dwReserved2
  177. {
  178. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  179. DefWidth, // LONG biWidth;
  180. DefHeight, // LONG biHeight;
  181. 1, // WORD biPlanes;
  182. 16, // WORD biBitCount;
  183. KS_BI_RGB, // DWORD biCompression;
  184. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  185. 0, // LONG biXPelsPerMeter;
  186. 0, // LONG biYPelsPerMeter;
  187. 0, // DWORD biClrUsed;
  188. 0 // DWORD biClrImportant;
  189. }
  190. }
  191. };
  192. KS_DATARANGE_VIDEO StreamFormatRGB555Cap =
  193. {
  194. // KSDATARANGE
  195. {
  196. {
  197. sizeof( KS_DATARANGE_VIDEO ),
  198. 0,
  199. DefWidth * DefHeight * 2, // SampleSize
  200. 0, // Reserved
  201. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  202. { 0xe436eb7c, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB555,
  203. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  204. }
  205. },
  206. true, // BOOL, bFixedSizeSamples (all samples same size?)
  207. true, // BOOL, bTemporalCompression (all I frames?)
  208. KS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  209. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  210. // _KS_VIDEO_STREAM_CONFIG_CAPS
  211. {
  212. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }, // GUID
  213. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  214. {
  215. MaxInWidth, MaxInHeight // SIZE InputSize
  216. },
  217. {
  218. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  219. },
  220. {
  221. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  222. },
  223. 2, // int CropGranularityX; // granularity of cropping size
  224. 2, // int CropGranularityY;
  225. 2, // int CropAlignX; // alignment of cropping rect
  226. 2, // int CropAlignY;
  227. {
  228. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  229. },
  230. {
  231. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  232. },
  233. 1, // int OutputGranularityX; // granularity of output bitmap size
  234. 1, // int OutputGranularityY;
  235. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  236. 0, // StretchTapsY
  237. 2, // ShrinkTapsX
  238. 2, // ShrinkTapsY
  239. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  240. 333667, // LONGLONG MaxFrameInterval;
  241. 2 * 30 * MinOutWidth * MinOutHeight, // LONG MinBitsPerSecond;
  242. 2 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  243. },
  244. // KS_VIDEOINFOHEADER (default format)
  245. {
  246. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  247. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  248. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  249. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  250. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  251. {
  252. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  253. 640,//DefWidth, // LONG biWidth;
  254. 480,//DefHeight, // LONG biHeight;
  255. 1, // WORD biPlanes;
  256. 16, // WORD biBitCount;
  257. KS_BI_RGB, // DWORD biCompression;
  258. 640 * 480 * 2, // DWORD biSizeImage;
  259. // DefWidth * DefHeight * 2, // DWORD biSizeImage;
  260. 0, // LONG biXPelsPerMeter;
  261. 0, // LONG biYPelsPerMeter;
  262. 0, // DWORD biClrUsed;
  263. 0 // DWORD biClrImportant;
  264. }
  265. }
  266. };
  267. KS_DATARANGE_VIDEO StreamFormatRGB565 =
  268. {
  269. // KSDATARANGE
  270. {
  271. {
  272. sizeof( KS_DATARANGE_VIDEO ),
  273. 0,
  274. DefWidth * DefHeight * 2, // SampleSize
  275. 0, // Reserved
  276. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  277. { 0xe436eb7b, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB565,
  278. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  279. }
  280. },
  281. true, // BOOL, bFixedSizeSamples (all samples same size?)
  282. true, // BOOL, bTemporalCompression (all I frames?)
  283. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  284. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  285. // _KS_VIDEO_STREAM_CONFIG_CAPS
  286. {
  287. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }, // GUID
  288. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  289. {
  290. MaxInWidth, MaxInHeight // SIZE InputSize
  291. },
  292. {
  293. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  294. },
  295. {
  296. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  297. },
  298. 2, // int CropGranularityX; // granularity of cropping size
  299. 2, // int CropGranularityY;
  300. 2, // int CropAlignX; // alignment of cropping rect
  301. 2, // int CropAlignY;
  302. {
  303. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  304. },
  305. {
  306. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  307. },
  308. 1, // int OutputGranularityX; // granularity of output bitmap size
  309. 1, // int OutputGranularityY;
  310. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  311. 0, // StretchTapsY
  312. 2, // ShrinkTapsX
  313. 2, // ShrinkTapsY
  314. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  315. 333667, // LONGLONG MaxFrameInterval;
  316. 2 * 30 * MinOutWidth * MinOutHeight, // LONG MinBitsPerSecond;
  317. 2 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  318. },
  319. // KS_VIDEOINFOHEADER (default format)
  320. {
  321. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  322. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  323. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  324. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  325. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  326. {
  327. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  328. DefWidth, // LONG biWidth;
  329. DefHeight, // LONG biHeight;
  330. 1, // WORD biPlanes;
  331. 16, // WORD biBitCount;
  332. 0xe436eb7b, // DWORD biCompression;
  333. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  334. 0, // LONG biXPelsPerMeter;
  335. 0, // LONG biYPelsPerMeter;
  336. 0, // DWORD biClrUsed;
  337. 0 // DWORD biClrImportant;
  338. }
  339. }
  340. };
  341. #endif