Iam working with STM32H7B3I-DK board. Here my task is to display multiple images through single array.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-19 11:40 PM
Iam generating code through TouchGfx tool. And I have compressed my images into LZ format now Iam able to decompressing at run time also. but i have multiple images. i need to pass all images BMP array through single frame buffer. so how to pass multiple arrays in to single decompression logic.
- Labels:
-
STM32H7 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-19 11:46 PM
This is my decompression logic. here in is my input array (which means images BMP array) and out is my output array which is going to display on screen. so now i have multiple input arrays. how can i pass all those in to this decompression logic. can any one support me in this. iam new to this stm32 programming.
void decompression( unsigned char *in, unsigned char *out )
{
taskENTER_CRITICAL();
unsigned char marker, symbol;
unsigned int i, inpos, outpos, length, offset, insize;
insize= InputBufSize();
/* Do we have anything to uncompress? */
if( insize < 1 )
{
return;
}
/* Get marker symbol from input stream */
marker = in[ 0 ];
inpos = 1;
/* Main decompression loop */
outpos = 0;
do
{
symbol = in[ inpos ++ ];
imageincounter++;
if( symbol == marker )
{
/* We had a marker byte */
if( in[ inpos ] == 0 )
{
/* It was a single occurrence of the marker byte */
out[ outpos ++ ] = marker;
imagecounter++;
++ inpos;
imageincounter++;
}
else
{
/* Extract true length and offset */
inpos += _LZ_ReadVarSize( &length, &in[ inpos ] );
inpos += _LZ_ReadVarSize( &offset, &in[ inpos ] );
/* Copy corresponding data from history window */
for( i = 0; i < length; ++ i )
{
out[ outpos ] = out[ outpos - offset ];
++ outpos;
imagecounter++;
}
}
}
else
{
/* No marker, plain copy */
out[ outpos ++ ] = symbol;
imagecounter++;
}
}
while( inpos < insize );
taskEXIT_CRITICAL();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-21 3:21 AM
Im dont perfect understand why you use this, but simply i mean you have arrays im1 im2 im3 im4 ...
then you need reserve out space maybe in external sdram
out1[xxxx]
out2[yyyy]
then you create array of poiners types as im and out maybe
uint8_t * images[] = {im1,im2,im3,im4,...};
uint8_t * images_out[] = {out1,out2,...};
then for (i ... sizeof(images)) decompres(images[i],images_out[i]);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-23 9:31 PM
Thanks for support.
can you please provide any example code. If you provide it will be great help to me. because Iam very new to this concepts.
Thanks in advance.
RG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-24 4:30 AM
When you are new, i dont recommend use image change concept. TouchGFX handle only images from generator simply.
When you need lower size use L8 images.
