MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / CopyFrameRGB48

Function CopyFrameRGB48

Source/Helper.cpp:541–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541void CopyFrameRGB48(const UINT lines, BYTE* dst, UINT dst_pitch, const BYTE* src, int src_pitch)
542{
543 UINT line_pixels = abs(src_pitch) / 6;
544 UINT line_pixels4 = line_pixels & ~(4u - 1);
545
546 for (UINT y = 0; y < lines; ++y) {
547 uint64_t* src64 = (uint64_t*)src;
548 uint64_t* dst64 = (uint64_t*)dst;
549 for (UINT i = 0; i < line_pixels4; i += 4) {
550 uint64_t sa = src64[0];
551 uint64_t sb = src64[1];
552 uint64_t sc = src64[2];
553
554 dst64[i + 0] = sa;
555 dst64[i + 1] = (sa >> 48) | (sb << 16);
556 dst64[i + 2] = (sb >> 32) | (sc << 32);
557 dst64[i + 3] = sc >> 16;
558
559 src64 += 3;
560 }
561
562 src += src_pitch;
563 dst += dst_pitch;
564 }
565}
566
567void CopyFrameRGB48_SSSE3(const UINT lines, BYTE* dst, UINT dst_pitch, const BYTE* src, int src_pitch)
568{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected