cancel
Showing results for 
Search instead for 
Did you mean: 

from 24 to 16bit

Ebun.1
Senior

Hello

I use STM32F769I-DISCO.

Does changing from 24bit to 16bit reduce the load on the CPU?

What is 16bit, if 24bit is 100%?

Also, can't TouchGFX change 24bit to 16bit?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
N. SANTINI
ST Employee

Hi,

In some case it may indeed reduce the CPU load but this is not what should be expected when changing the color format.

Changing from 24 bits to 16 bits means that each pixel of the frame buffer will use 2 bytes instead of 3 thus reducing the memory area needed to store the frame buffer.

It will also reduce the general memory bandwidth, notably on the FMC bus.

On the display side the LTDC will transfer less data to update the display (if the display supports 16 bits data).

The CPU is not involved at all in the process of refreshing the display so no difference.

If the display still requires 24 bits data then only the frame buffer will be in 16-bits.

On the rendering side (frame buffer update) the ChromArt hardware accelerator is used for most of the pixel operations (copy, copy with transparency and pixel format conversion) so you may observe a CPU drop only if you use transformations such as scaling or rotation for example.

Again if you replace you input images by 16 bits versions you will save FLASH memory, but not CPU usage since the ChromArt is able to access these data without the help of the CPU.

So in short you should mostly expect to reduce the memory usage and memory bandwidth when changing the color format from 24 to 16 bits.

Best regards,

Nicolas

View solution in original post

3 REPLIES 3
N. SANTINI
ST Employee

Hi,

In some case it may indeed reduce the CPU load but this is not what should be expected when changing the color format.

Changing from 24 bits to 16 bits means that each pixel of the frame buffer will use 2 bytes instead of 3 thus reducing the memory area needed to store the frame buffer.

It will also reduce the general memory bandwidth, notably on the FMC bus.

On the display side the LTDC will transfer less data to update the display (if the display supports 16 bits data).

The CPU is not involved at all in the process of refreshing the display so no difference.

If the display still requires 24 bits data then only the frame buffer will be in 16-bits.

On the rendering side (frame buffer update) the ChromArt hardware accelerator is used for most of the pixel operations (copy, copy with transparency and pixel format conversion) so you may observe a CPU drop only if you use transformations such as scaling or rotation for example.

Again if you replace you input images by 16 bits versions you will save FLASH memory, but not CPU usage since the ChromArt is able to access these data without the help of the CPU.

So in short you should mostly expect to reduce the memory usage and memory bandwidth when changing the color format from 24 to 16 bits.

Best regards,

Nicolas

Thank you for your reply.

For STM32F769I-DISCO, the memory uses SDRAM.

I think that 24bit is enough, so I thought there was no merit to 16bit.

Does this kind of idea look good?

Thank you.

Indeed, the main purpose of switching to 16bits is to reduce the frame buffer size in case you use only internal RAM that is usually quite small.

If external SDRAM is available then frame buffers are put there and memory usage becomes less critical as the need to switch from 24 to 16 bits.

Best regards,

Nicolas