code clean up

pull/1/head
Thomas Ballmann 4 years ago
parent f4b78d188f
commit 380d16baf4

@ -151,17 +151,16 @@ void jpegFlushFramebuffer()
// initialise the decoder to give access to image information
int ret = JpegDec.decodeFile("/tmp.jpeg");
if (ret == 1) {
Serial.print("decodeFile ret = ");
Serial.println(ret);
if (ret == 1)
{
// print information about the image to the serial port
jpegInfo();
//jpegInfo();
// render the image onto the screen at coordinate 0,0
renderJPEG(0, 0);
} else {
}
else
{
Serial.println("!!!! unkown jpeg format !!!!");
}
@ -176,9 +175,9 @@ void renderMcuBlockPixel(uint32_t x, uint32_t y, uint32_t color)
uint32_t blockPageY = y - ((y / JpegDec.MCUHeight) * JpegDec.MCUHeight);
blockDelta[(blockPageY * MAX_WIDTH) + x] = color;
// full mcu row is complete now
if (x == JpegDec.width -1 && (y +1) % JpegDec.MCUHeight == 0) {
if (x == JpegDec.width - 1 && (y + 1) % JpegDec.MCUHeight == 0)
{
// MCU block sizes: 8x8, 16x8 or 16x16
uint32_t originOffsetY = ((y / JpegDec.MCUHeight) * JpegDec.MCUHeight);

Loading…
Cancel
Save