From 83ce428d8bb5f4a762abf879adec076bc34cf36a Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Wed, 27 Jul 2022 11:00:45 -0400 Subject: full support for odd-dimension bitmaps and comps --- main.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'main.h') 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; -- cgit v1.2.3