[common] add AVX/AVX2 memory copy implementations

This commit is contained in:
Geoffrey McRae
2023-11-19 00:09:42 +11:00
parent 6357df1a7a
commit e61678ef1b
3 changed files with 124 additions and 13 deletions

View File

@@ -27,18 +27,8 @@
#include "common/framebuffer.h"
#include "common/types.h"
inline static void rectCopyUnaligned(uint8_t * dst, const uint8_t * src,
int ystart, int yend, int dx, int dstPitch, int srcPitch, int width)
{
src += ystart * srcPitch + dx;
dst += ystart * dstPitch + dx;
for (int i = ystart; i < yend; ++i)
{
memcpy(dst, src, width);
src += srcPitch;
dst += dstPitch;
}
}
void rectCopyUnaligned(uint8_t * dst, const uint8_t * src,
int ystart, int yend, int dx, int dstPitch, int srcPitch, int width);
void rectsBufferToFramebuffer(FrameDamageRect * rects, int count, int bpp,
FrameBuffer * frame, int dstPitch, int height,