1 of 1 people found this helpful
Based on your block design, you seem to be using 32 bit pixels.
Xilinx usually packs this as XRGB, where the top 8 bit are unused (or an alpha channel, if supported).
Referring to the code for one of our older touch panel bare metal designs:
and just taking out an excerpt that illustrates the pixel format, your format is probably something similar to the following:
case 0: pixel = 0x00000000; // Black
case 1: pixel = 0x00FF0000; // Red
case 2: pixel = 0x0000FF00; // Green
case 3: pixel = 0x000000FF; // Blue
case 4: pixel = 0x0000FFFF; // Cyan
case 5: pixel = 0x00FF00FF; // Magenta
case 6: pixel = 0x00FFFF00; // Yellow
case 7: pixel = 0x00FFFFFF; // White
Hope this helps !
Thanks for reply,
We tried this reproduce on 8, 16,24 and 32 bit pixels. With this problem remains the similar. The colour which have repeated pattern like 0x00000000(black), 0x80808080(gray),0xFFFFFFFF(white) are reproduce proper all bit pixel format.so seem some different issues with may be RGB2YCBCR or Chroma resampler IP's.
Thanks for prompt reply,
We want to read image from sdcard and display using osd layer. we are using following chain
SDCARD --> AXI VDMA(24bit data width) ---> RGB2YCBCR(video_in 24bit) ----> CHROMA resampler(YCbCr444 to Ycbcr 422)----> OSD layer( video format yuv422) ---> HDMI OUT
We are using bare Metal application Over Zynq to Read from SD Card. RGB values for a picture (.bin format) are stored in SDcard. Any clue here to read .jpg/.bmp/.png image from sd card using baremetal application.
Any input ref. document here..!
Take a look at this https://opencores.org/projects/sdcard_mass_storage_controller. There are two method being employed:
- full feature using DMA. This is very little usage from a CPU perspective. The down side is more hardware resource.
- PIO method. Less resources for hardware, but more involvement with CPU.
I assume using VDMA is like the first example. If this is your troubles, the second method may be simpler to implement.
The next part is how to interpret the data. Get a seat beat because the fun begins. Look at JPEG File Layout and Format. If huffman tables are
not your thing, look at https://www.lifewire.com/jpg-jpeg-file-4139913 for overview. Maybe searching around, you can locate code to assist because
trying on your own is another crazy journey.
Hope this helps,
Thanks for reply
We are using zynq 7030 SoC. sdcard is being access using baremetal application running on zynq ARM.
We are developing demo Application for Picture in picture. for this we are using PicoZed 7030 board with FMC HDMI daughter card. We are referring FMC-HDMI-CAM + PYTHON-1300-C Reference Design Tutorial from zedboard.org. In this project Video On-Screen Display (OSD) Ip produces output video from external video sources (i.e HDMI,Camera input) and internal graphics controller.
In Vivado we used Axi vdma to read image from sd card . Inside Sd card we have used .bin file which is converted from .jpg image.
Following is the snippet of block design.
But we are not getting proper result over display.
We are not sure about which image format to place in Sd card to get proper result over the display. Is there any thing we are missing?
Thanks in advance