summaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-07-27 11:00:45 -0400
committerFox Caminiti <fox@foxcam.net>2022-07-27 11:00:45 -0400
commit83ce428d8bb5f4a762abf879adec076bc34cf36a (patch)
treec1500f027d9eec514ba1a2912e7a4763e7be26b2 /main.h
parentc6bd84c356b6aaa029b9708d7b99a4aba1673b6b (diff)
full support for odd-dimension bitmaps and comps
Diffstat (limited to 'main.h')
-rw-r--r--main.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/main.h b/main.h
index 801b13e..d5a0126 100644
--- a/main.h
+++ b/main.h
@@ -4,17 +4,25 @@ enum source_type {
source_image
};
+enum instruction_mode {
+ scalar_only,
+ sse_enabled,
+ avx_enabled
+};
+
struct pixel_buffer {
void *OriginalBuffer;
void *EffectBuffer;
void *Scratch;
uint16 Width;
uint16 Height;
+ // IMPORTANT(fox): Since we're storing 4x4 chunks, I'm opting to pad out each
+ // dimension with an extra 1-3 pixels to make our lookup functions simpler.
+ // This has the cost of extra RAM, but it's a miniscule amount (0.2% extra
+ // data for a worst-case 1080p 16bpc frame, or 140 kb).
+ uint16 FullWidth;
+ uint16 FullHeight;
uint16 Pitch;
-#if PACKEDRGB
-#else
- uint32 Channel;
-#endif
uint16 BytesPerPixel;
bool32 ToUpdate; // Set whenever effects or video frames need to be updated.
};
@@ -246,6 +254,8 @@ struct transform_info {
real32 YAxisPY;
real32 LayerWidth;
real32 LayerHeight;
+ uint32 FullLayerWidth;
+ uint32 FullLayerHeight;
real32 LayerOpacity;
real32 OriginX;
real32 OriginY;