encounter touchgfx build problem, giving up for now

This commit is contained in:
2025-04-03 16:47:15 +02:00
parent 03a04019e2
commit 910810899c
506 changed files with 4724 additions and 5726 deletions

View File

@ -1,6 +1,7 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <touchgfx/hal/HAL.hpp>
#include <jinclude.h>
#include <jpeglib.h>
#include <string.h>
@ -448,13 +449,37 @@ bool SoftwareMJPEGDecoder::decodeFrame(const touchgfx::Rect& area, uint8_t* fram
#if VIDEO_DECODE_FORMAT == 16
uint16_t* lineptr = reinterpret_cast<uint16_t*>(frameBuffer);
lineptr += framebuffer_width * startY;
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
lineptr += framebuffer_width * startY;
}
else
{
lineptr += framebuffer_width * (cinfo.image_width - 1);
lineptr += startY;
}
#elif VIDEO_DECODE_FORMAT == 24
uint8_t* lineptr = frameBuffer;
lineptr += framebuffer_width * 3 * startY;
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
lineptr += framebuffer_width * 3 * startY;
}
else
{
lineptr += framebuffer_width * (cinfo.image_width - 1) * 3;
lineptr += startY * 3;
}
#else
uint32_t* lineptr = reinterpret_cast<uint32_t*>(frameBuffer);
lineptr += framebuffer_width * startY;
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
lineptr += framebuffer_width * startY;
}
else
{
lineptr += framebuffer_width * (cinfo.image_width - 1);
lineptr += startY;
}
#endif
const uint32_t endY = MIN((uint32_t)area.bottom(), cinfo.output_height);
@ -468,21 +493,64 @@ bool SoftwareMJPEGDecoder::decodeFrame(const touchgfx::Rect& area, uint8_t* fram
for (uint32_t counter = startX; counter < endX; counter++)
{
const uint16_t pix = ((RGB_matrix[counter].R & 0xF8) << 8) | ((RGB_matrix[counter].G & 0xFC) << 3) | ((RGB_matrix[counter].B & 0xF8) >> 3);
*(lineptr + counter) = pix;
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
*(lineptr + counter) = pix;
}
else
{
*(lineptr - counter * framebuffer_width) = pix;
}
}
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
lineptr += framebuffer_width; //move to next line
}
else
{
lineptr++; //move to next line
}
lineptr += framebuffer_width; //move to next line
#elif VIDEO_DECODE_FORMAT == 24
memcpy(lineptr + startX * 3, lineBuffer + startX * 3, (endX - startX) * 3);
lineptr += framebuffer_width * 3; //move to next line
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
memcpy(lineptr + startX * 3, lineBuffer + startX * 3, (endX - startX) * 3);
lineptr += framebuffer_width * 3; //move to next line
}
else
{
JPEG_RGB* RGB_matrix = (JPEG_RGB*)lineBuffer;
//loop row RGB888->RGB888 for required line part
for (uint32_t counter = startX; counter < endX; counter++)
{
*(lineptr - counter * framebuffer_width * 3) = RGB_matrix[counter].B;
*(lineptr - counter * framebuffer_width * 3 + 1) = RGB_matrix[counter].G;
*(lineptr - counter * framebuffer_width * 3 + 2) = RGB_matrix[counter].R;
}
lineptr += 3; //move to next line
}
#else
JPEG_RGB* RGB_matrix = (JPEG_RGB*)lineBuffer;
//loop row RGB888->ARGB8888 for required line part
for (uint32_t counter = startX; counter < endX; counter++)
{
const uint32_t pix = (0xFF << 24) | (RGB_matrix[counter].R << 16) | (RGB_matrix[counter].G << 8) | RGB_matrix[counter].B;
*(lineptr + counter) = pix;
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
*(lineptr + counter) = pix;
}
else
{
*(lineptr - counter * framebuffer_width) = pix;
}
}
if (touchgfx::HAL::DISPLAY_ROTATION == touchgfx::rotate0)
{
lineptr += framebuffer_width; //move to next line
}
else
{
lineptr++; //move to next line
}
lineptr += framebuffer_width; //move to next line
#endif
}