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

Function CopyFrameB64A

Source/Helper.cpp:660–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660void CopyFrameB64A(const UINT lines, BYTE* dst, UINT dst_pitch, const BYTE* src, int src_pitch)
661{
662 UINT line_pixels = abs(src_pitch) / 8;
663
664 for (UINT y = 0; y < lines; ++y) {
665 uint64_t* src64 = (uint64_t*)src;
666 uint64_t* dst64 = (uint64_t*)dst;
667 for (UINT i = 0; i < line_pixels; ++i) {
668 dst64[i] =
669 ((src64[i] & 0xFF00FF00FF000000) >> 24) +
670 ((src64[i] & 0x00FF00FF00FF0000) >> 8) +
671 ((src64[i] & 0x000000000000FF00) << 40) +
672 ((src64[i] & 0x00000000000000FF) << 56);
673 }
674 src += src_pitch;
675 dst += dst_pitch;
676 }
677}
678
679void CopyFrameYV12(const UINT lines, BYTE* dst, UINT dst_pitch, const BYTE* src, int src_pitch)
680{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected