Source code of Windows XP (NT5)
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.

438 lines
19 KiB

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Yuvfmt.h 1.5 1998/04/29 22:43:43 tomz Exp $
  2. #ifndef __YUVFMT_H
  3. #define __YUVFMT_H
  4. #ifndef __DEFAULTS_H
  5. #include "defaults.h"
  6. #endif
  7. KS_DATARANGE_VIDEO StreamFormatYVU9 =
  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. { 0x39555659, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIASUBTYPE_YVU9
  18. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  19. }
  20. },
  21. true,
  22. true,
  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. 16, // int OutputGranularityX; // granularity of output bitmap size
  49. 4, // 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. 30 * MinOutWidth * MinOutHeight * 9 / 8, // LONG MinBitsPerSecond;
  57. 30 * MaxOutWidth * MaxOutHeight * 9 / 8 //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 * 9 / 8 * 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. 9, // WORD biBitCount;
  72. 0x39555659, // DWORD biCompression;
  73. DefWidth * DefHeight * 9 / 8,// DWORD biSizeImage;
  74. 0, // LONG biXPelsPerMeter;
  75. 0, // LONG biYPelsPerMeter;
  76. 0, // DWORD biClrUsed;
  77. 0 // DWORD biClrImportant;
  78. }
  79. }
  80. };
  81. KS_DATARANGE_VIDEO StreamFormatYUY2 =
  82. {
  83. // KSDATARANGE
  84. {
  85. {
  86. sizeof( KS_DATARANGE_VIDEO ),
  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. { 0x32595559, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIASUBTYPE_YUY2
  92. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  93. }
  94. },
  95. true,
  96. true,
  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_VIDEOINFO }, // 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. 4, // int OutputGranularityX; // granularity of output bitmap size
  123. 2, // 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. 30 * MinOutWidth * MinOutHeight * 2, // LONG MinBitsPerSecond;
  131. 30 * MaxOutWidth * MaxOutHeight * 2 //LONG MaxBitsPerSecond;
  132. },
  133. // KS_VIDEOINFOHEADER (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. {
  141. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  142. DefWidth, // LONG biWidth;
  143. DefHeight, // LONG biHeight;
  144. 1, // WORD biPlanes;
  145. 16, // WORD biBitCount;
  146. 0x32595559, // DWORD biCompression;
  147. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  148. 0, // LONG biXPelsPerMeter;
  149. 0, // LONG biYPelsPerMeter;
  150. 0, // DWORD biClrUsed;
  151. 0 // DWORD biClrImportant;
  152. }
  153. }
  154. };
  155. KS_DATARANGE_VIDEO2 StreamFormat2YUY2 =
  156. {
  157. // KSDATARANGE
  158. {
  159. {
  160. sizeof( KS_DATARANGE_VIDEO2 ),
  161. 0,
  162. DefWidth * DefHeight * 2, // SampleSize
  163. 0, // Reserved
  164. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  165. { 0x32595559, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIASUBTYPE_YUY2
  166. { 0xf72a76A0, 0xeb0a, 0x11d0, { 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba } } //FORMAT_VideoInfo2
  167. }
  168. },
  169. true,
  170. true,
  171. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  172. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  173. // _KS_VIDEO_STREAM_CONFIG_CAPS
  174. {
  175. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2 }, // GUID
  176. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  177. {
  178. MaxInWidth, MaxInHeight // SIZE InputSize
  179. },
  180. {
  181. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  182. },
  183. {
  184. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  185. },
  186. 2, // int CropGranularityX; // granularity of cropping size
  187. 2, // int CropGranularityY;
  188. 2, // int CropAlignX; // alignment of cropping rect
  189. 2, // int CropAlignY;
  190. {
  191. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  192. },
  193. {
  194. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  195. },
  196. 4, // int OutputGranularityX; // granularity of output bitmap size
  197. 2, // int OutputGranularityY;
  198. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  199. 0, // StretchTapsY
  200. 2, // ShrinkTapsX
  201. 2, // ShrinkTapsY
  202. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  203. 333667, // LONGLONG MaxFrameInterval;
  204. 30 * MinOutWidth * MinOutHeight * 2, // LONG MinBitsPerSecond;
  205. 30 * MaxOutWidth * MaxOutHeight * 2 //LONG MaxBitsPerSecond;
  206. },
  207. // KS_VIDEOINFOHEADER2 (default format)
  208. {
  209. {0,0,0,0}, // RECT rcSource; // The bit we really want to use
  210. {0,0,0,0}, // RECT rcTarget; // Where the video should go
  211. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  212. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  213. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  214. #if 0
  215. //TODO video memory must be available for interlacing to work
  216. KS_INTERLACE_IsInterlaced | // DWORD dwInterlaceFlags
  217. #else
  218. KS_INTERLACE_1FieldPerSample
  219. //| KS_INTERLACE_Field1First
  220. //| KS_INTERLACE_FieldPatField1Only
  221. | KS_INTERLACE_FieldPatBothRegular
  222. | KS_INTERLACE_DisplayModeBobOnly,
  223. //| KS_INTERLACE_DisplayModeBobOrWeave,
  224. #endif
  225. // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
  226. // AMINTERLACE_IsInterlaced
  227. // AMINTERLACE_1FieldPerSample
  228. // AMINTERLACE_Field1First
  229. // AMINTERLACE_UNUSED
  230. // AMINTERLACE_FieldPatternMask
  231. // AMINTERLACE_FieldPatField1Only
  232. // AMINTERLACE_FieldPatField2Only
  233. // AMINTERLACE_FieldPatBothRegular
  234. // AMINTERLACE_FieldPatBothIrregular
  235. // AMINTERLACE_DisplayModeMask
  236. // AMINTERLACE_DisplayModeBobOnly
  237. // AMINTERLACE_DisplayModeWeaveOnly
  238. // AMINTERLACE_DisplayModeBobOrWeave
  239. //
  240. 0, // DWORD dwCopyProtectFlags
  241. // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
  242. // AMCOPYPROTECT_RestrictDuplication
  243. //
  244. 4, // DWORD dwPictAspectRatioX
  245. // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
  246. //
  247. 3, // DWORD dwPictAspectRatioY
  248. // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
  249. 0, // DWORD dwReserved1
  250. 0, // DWORD dwReserved2
  251. {
  252. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  253. DefWidth, // LONG biWidth;
  254. DefHeight, // LONG biHeight;
  255. 1, // WORD biPlanes;
  256. 16, // WORD biBitCount;
  257. 0x32595559, // DWORD biCompression;
  258. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  259. 0, // LONG biXPelsPerMeter;
  260. 0, // LONG biYPelsPerMeter;
  261. 0, // DWORD biClrUsed;
  262. 0 // DWORD biClrImportant;
  263. }
  264. }
  265. };
  266. KS_DATARANGE_VIDEO StreamFormatYVYU =
  267. {
  268. // KSDATARANGE
  269. {
  270. {
  271. sizeof( KS_DATARANGE_VIDEO ),
  272. 0,
  273. DefWidth * DefHeight * 2, // SampleSize
  274. 0, // Reserved
  275. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  276. { 0x55595659, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIASUBTYPE_YVYU
  277. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  278. }
  279. },
  280. true,
  281. true,
  282. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  283. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  284. // _KS_VIDEO_STREAM_CONFIG_CAPS
  285. {
  286. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO, // GUID
  287. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  288. {
  289. MaxInWidth, MaxInHeight // SIZE InputSize
  290. },
  291. {
  292. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  293. },
  294. {
  295. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  296. },
  297. 2, // int CropGranularityX; // granularity of cropping size
  298. 2, // int CropGranularityY;
  299. 2, // int CropAlignX; // alignment of cropping rect
  300. 2, // int CropAlignY;
  301. {
  302. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  303. },
  304. {
  305. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  306. },
  307. 4, // int OutputGranularityX; // granularity of output bitmap size
  308. 2, // int OutputGranularityY;
  309. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  310. 0, // StretchTapsY
  311. 2, // ShrinkTapsX
  312. 2, // ShrinkTapsY
  313. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  314. 333667, // LONGLONG MaxFrameInterval;
  315. 30 * 80 * 40 * 2, // LONG MinBitsPerSecond;
  316. 30 * 720 * 480 * 2 //LONG MaxBitsPerSecond;
  317. },
  318. // KS_VIDEOINFOHEADER (default format)
  319. {
  320. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  321. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  322. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  323. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  324. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  325. {
  326. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  327. DefWidth, // LONG biWidth;
  328. DefHeight, // LONG biHeight;
  329. 1, // WORD biPlanes;
  330. 16, // WORD biBitCount;
  331. 0x55595659, // DWORD biCompression;
  332. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  333. 0, // LONG biXPelsPerMeter;
  334. 0, // LONG biYPelsPerMeter;
  335. 0, // DWORD biClrUsed;
  336. 0 // DWORD biClrImportant;
  337. }
  338. }
  339. };
  340. KS_DATARANGE_VIDEO StreamFormatUYVY =
  341. {
  342. // KSDATARANGE
  343. {
  344. {
  345. sizeof( KS_DATARANGE_VIDEO ),
  346. 0,
  347. DefWidth * DefHeight * 2, // SampleSize
  348. 0, // Reserved
  349. { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIATYPE_Video
  350. { 0x59565955, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }, //MEDIASUBTYPE_UYVY
  351. { 0x05589f80, 0xc356, 0x11ce, { 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a } } //FORMAT_VideoInfo
  352. }
  353. },
  354. true,
  355. true,
  356. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  357. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  358. // _KS_VIDEO_STREAM_CONFIG_CAPS
  359. {
  360. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO, // GUID
  361. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  362. {
  363. MaxInWidth, MaxInHeight // SIZE InputSize
  364. },
  365. {
  366. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  367. },
  368. {
  369. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  370. },
  371. 2, // int CropGranularityX; // granularity of cropping size
  372. 2, // int CropGranularityY;
  373. 2, // int CropAlignX; // alignment of cropping rect
  374. 2, // int CropAlignY;
  375. {
  376. MinOutWidth, MinOutHeight // SIZE MinOutputSize; // smallest bitmap stream can produce
  377. },
  378. {
  379. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; // largest bitmap stream can produce
  380. },
  381. 4, // int OutputGranularityX; // granularity of output bitmap size
  382. 2, // int OutputGranularityY;
  383. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  384. 0, // StretchTapsY
  385. 2, // ShrinkTapsX
  386. 2, // ShrinkTapsY
  387. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  388. 333667, // LONGLONG MaxFrameInterval;
  389. 30 * MinOutWidth * MinOutHeight * 2, // LONG MinBitsPerSecond;
  390. 30 * MaxOutWidth * MaxOutHeight * 2 //LONG MaxBitsPerSecond;
  391. },
  392. // KS_VIDEOINFOHEADER (default format)
  393. {
  394. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  395. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  396. DefWidth * DefHeight * 2 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  397. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  398. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  399. {
  400. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  401. DefWidth, // LONG biWidth;
  402. DefHeight, // LONG biHeight;
  403. 1, // WORD biPlanes;
  404. 16, // WORD biBitCount;
  405. 0x59565955, // DWORD biCompression;
  406. DefWidth * DefHeight * 2, // DWORD biSizeImage;
  407. 0, // LONG biXPelsPerMeter;
  408. 0, // LONG biYPelsPerMeter;
  409. 0, // DWORD biClrUsed;
  410. 0 // DWORD biClrImportant;
  411. }
  412. }
  413. };
  414. #endif