
The Bayer 5×5 Demosaic core is not limited to any vendor specific implementation. Versions are available for all major FPGA vendors and can be created for any custom ASIC application. The following table shows typical resource requirements for an implementation.
Agilex 5 Utilization Report
Mode | ALMS | FFs | LUTs | BRAMs (20K) |
---|---|---|---|---|
RGB-16 2048×1440 1-PPC |
1943 | 2097 | 3505 | 8 |
RGB-16 2048×1440 2-PPC |
2094 | 3155 | 5347 | 8 |
Virtex Ultrascale+ Utilization Report
Mode | FFs | LUTs | BRAMs (36K) |
---|---|---|---|
RGB-16 2048×1440 1-PPC |
1195 | 1864 | 4 |
RGB-16 2048×1440 2-PPC |
1835 | 3142 | 4 |
Figure 1 – Demosaic Adapter Block Diagram
Figure 2 – Demosaic 5×5 Core Block Diagram
Figure 3 – Bayer Pattern Phases
Demosaic adapter: The adapter constructs the following matrix and provides the data to its 5×5 Demosaic Core. The adapter also provides edge pixel remapping and has 4-line buffers, however, from the start of the first pixel to the first data valid out has a latency of 2 frame lines.
Demosaic core: The Bayer 5×5 Demosaic core is a 5×5 filter implementation based on the paper “High-Quality Linear Interpolation for Demosaicing of Bayer-Patterned Color Images” by Henrique S. Malvar, Li-wei He, and Ross Cutler. The design is controlled by a set of generics that set the Bayer phase and data width, along with the frame height and line width input signal.
The multipliers used in the calculation are generic to AMD/Xilinx or Altera implementations so either target is supported without any change to the design.
The entire design is synchronous and runs off a single system clock that can be any frequency up to 300MHz (Artix 7 Device). There are no clock boundaries in this design.
Figure 4 – Bayer Pattern Coefficients