summaryrefslogtreecommitdiff
path: root/bitmap_calls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bitmap_calls.cpp')
-rw-r--r--bitmap_calls.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/bitmap_calls.cpp b/bitmap_calls.cpp
index 5d549c2..a67cd0b 100644
--- a/bitmap_calls.cpp
+++ b/bitmap_calls.cpp
@@ -19,6 +19,7 @@
// never even did any measuring to see if there was any speedup-- but I
// couldn't resist it. I like doing the software rendering stuff.
+
// TODO(fox): I could write an AVX version of this function, but it may not be
// that much faster since we have to do a bit of uninterleaving.
@@ -29,11 +30,11 @@ void Bitmap_ConvertPacking(void *Buffer, void *DestBuffer, uint16 Width, uint16
uint8 *Src = (uint8 *)Buffer;
uint8 *Temp = (uint8 *)DestBuffer;
uint32 RemainderPixels = Width % 4;
+ uint16 WidthP, HeightP;
+ Bitmap_CalcPackedDimensions(Width, Height, &WidthP, &HeightP);
for (uint32 Y = 0; Y < Height; Y++) {
uint32 X = 0;
while (X < Width - RemainderPixels) {
- uint16 WidthP, HeightP;
- Bitmap_CalcPackedDimensions(Width, Height, &WidthP, &HeightP);
uint32 XLookup = (X >> 2)*16 + (X % 4);
uint32 YLookup = (Y >> 2)*(WidthP*4) + (Y % 4)*4;
uint32 PixelToSeek = XLookup + YLookup;
@@ -210,8 +211,6 @@ Bitmap_CopyToPointer(void *Input, void *Output, uint16 BytesPerPixel, uint64 Tot
uint64 RemainderBytes = TotalBytes % ByteOffset;
while (bytes <= TotalBytes - RemainderBytes) {
- if (bytes > 2496*4)
- int pp = 0;
uint8 *Pixel = (uint8 *)Row + bytes;
uint8 *Pixel2 = (uint8 *)Row2 + bytes;
#if ARM