| 748 | } |
| 749 | |
| 750 | void CopyFrameY410(const UINT lines, BYTE* dst, UINT dst_pitch, const BYTE* src, int src_pitch) |
| 751 | { |
| 752 | ASSERT(src_pitch > 0); |
| 753 | UINT line_pixels = src_pitch / 4; |
| 754 | |
| 755 | for (UINT y = 0; y < lines; ++y) { |
| 756 | uint32_t* src32 = (uint32_t*)src; |
| 757 | uint32_t* dst32 = (uint32_t*)dst; |
| 758 | for (UINT i = 0; i < line_pixels; i++) { |
| 759 | uint32_t t = src32[i]; |
| 760 | // U = (t & 0x000003ff); Y = (t & 0x000ffc00) >> 10; V = (t & 0x3ff00000) >> 20; A = (t & 0xC0000000) >> 30; |
| 761 | //dst32[i] = (t & 0xC0000000) | ((t & 0x000fffff) << 10) | ((t & 0x3ff00000) >> 20); // to D3DFMT_A2R10G10B10 |
| 762 | dst32[i] = (t & 0xfff00000) | ((t & 0x000003ff) << 10) | ((t & 0x000ffc00) >> 10); // to D3DFMT_A2B10G10R10 |
| 763 | } |
| 764 | src += src_pitch; |
| 765 | dst += dst_pitch; |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | void CopyFrameR210(const UINT lines, BYTE* dst, UINT dst_pitch, const BYTE* src, int src_pitch) |
| 770 | { |
nothing calls this directly
no outgoing calls
no test coverage detected