File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1818#include " Inkplate.h"
1919#ifndef USE_COLOR_IMAGE
2020#include " Image.h"
21- #include " TJpeg/TJpg_Decoder.h"
21+ #include " ../ TJpeg/TJpg_Decoder.h"
2222#include " pgmspace.h"
2323
2424
2525Image *_imagePtrJpeg = nullptr ;
2626Image *_imagePtrPng = nullptr ;
2727
28- uint8_t (*Image::ditherBuffer)[E_INK_WIDTH + 20 ] = nullptr ;
29- uint8_t (*Image::jpegDitherBuffer)[18 ] = nullptr ;
28+ // uint8_t (*Image::ditherBuffer)[E_INK_WIDTH + 20] = nullptr;
29+ __attribute__ ((section(" .ext_ram.bss" )))uint8_t Image::ditherBuffer[2][E_INK_WIDTH + 20];
30+ __attribute__ ((section(" .ext_ram.bss" )))uint8_t Image::jpegDitherBuffer[18][18];
31+ // uint8_t (*Image::jpegDitherBuffer)[18] = nullptr;
3032uint8_t *Image::pixelBuffer = nullptr ;
3133uint32_t *Image::ditherPalette = nullptr ;
3234uint8_t *Image::palette = nullptr ;
@@ -38,10 +40,10 @@ void Image::begin(Inkplate *inkplateptr)
3840 _imagePtrPng = this ;
3941
4042
41- jpegDitherBuffer = (uint8_t (*)[18 ])heap_caps_calloc (18 , 18 , MALLOC_CAP_SPIRAM);
43+ // jpegDitherBuffer = (uint8_t (*)[18])heap_caps_calloc(18, 18, MALLOC_CAP_SPIRAM);
4244
4345
44- ditherBuffer = (uint8_t (*)[E_INK_WIDTH + 20 ])heap_caps_calloc (2 , (E_INK_WIDTH + 20 ), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT );
46+ // ditherBuffer = (uint8_t (*)[E_INK_WIDTH + 20])heap_caps_calloc(2, (E_INK_WIDTH + 20), MALLOC_CAP_SPIRAM );
4547
4648
4749pixelBuffer = (uint8_t *)heap_caps_calloc (1 , (E_INK_WIDTH * 4 + 5 ), MALLOC_CAP_SPIRAM);
Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ class Image
117117 private:
118118
119119 static uint8_t *pixelBuffer;
120- static uint8_t (* jpegDitherBuffer) [18];
121- static uint8_t (* ditherBuffer) [E_INK_WIDTH + 20];
120+ static uint8_t jpegDitherBuffer[ 18 ] [18 ];
121+ static uint8_t ditherBuffer[ 2 ] [E_INK_WIDTH + 20 ];
122122 static uint32_t * ditherPalette; // 8 bit colors, in color, 3x8 bit colors
123123 static uint8_t * palette; // 2 3 bit colors per byte, _###_###
124124
You can’t perform that action at this time.
0 commit comments