| 261 | }; |
| 262 | |
| 263 | ColorFormat_t GetColorFormat(const CMediaType* pmt) |
| 264 | { |
| 265 | if (pmt) { |
| 266 | if (pmt->subtype == MEDIASUBTYPE_RGB24) { return CF_RGB24; } |
| 267 | if (pmt->subtype == MEDIASUBTYPE_RGB32) { return CF_XRGB32; } |
| 268 | if (pmt->subtype == MEDIASUBTYPE_ARGB32) { return CF_ARGB32; } |
| 269 | |
| 270 | if (memcmp(&pmt->subtype.Data2, &MEDIASUBTYPE_YUY2.Data2, sizeof(GUID) - sizeof(GUID::Data1)) == 0) { |
| 271 | return fourcc_to_cformat(pmt->subtype.Data1); |
| 272 | } |
| 273 | else if (pmt->subtype == MEDIASUBTYPE_LAV_RAWVIDEO) { |
| 274 | const BITMAPINFOHEADER* pBIH = GetBIHfromVIHs(pmt); |
| 275 | if (pBIH) { |
| 276 | return fourcc_to_cformat(pBIH->biCompression); |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | return CF_NONE; |
| 281 | } |
| 282 | |
| 283 | static DX9PlaneConfig DX9PlanesNV12 = { D3DFMT_L8, D3DFMT_A8L8, D3DFMT_UNKNOWN, 2, 2 }; |
| 284 | static DX9PlaneConfig DX9PlanesP01x = { D3DFMT_L16, D3DFMT_G16R16, D3DFMT_UNKNOWN, 2, 2 }; |
no test coverage detected