AR# 36375


12.1 EDK, XPS_TFT - How can I store a 176x144 image stored in memory as 640x480?


The RGB fileIam storing in RAMhas a resolution of176x144 pixels, but the XPS_TFT supports 640x480.
How do I store the image?


In video memory, all 640x480 pixels must be stored.
Each line start address will be 4 x (1024 x i); where integer i varies from 0 to 143.Each pixel is represented as 32-bit word in the memory. So, the 176x144 frame should be written as given below.
Suppose the memory address starts from 0xa000_0000:
1st line of the frame should be stored at 0xa000_0000 to 0xa000_02BC (0 to 175)
2nd line of the frame should be stored at 0xa000_1000 to 0xa000_12BC (4x1024=4096d=1000Hex)
144th line of the frame should be stored at 0xa008_F000 to 0xa008_F2BC (143x1024x4=8F000 Hex)

The application can fill the memory as per details given below.

for ( i=0; i <= 143; i++)



for ( j=0; j <= 175; j++)


n Memory update

XIo_Out32((Xuint32*)0xa0000000+((i*1000)+j), File_pixel_data);


AR# 36375
日期 12/15/2012
状态 Active
Type 综合文章
People Also Viewed