SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
The implementation of Bayer mode CAC differs slightly from the YCbCr mode used for distortion correction. Because there are three colors in the image and only two are being modified, the details for calculating the input bounding box must be specified separately. The affine transform is disabled internally, so the mesh interpolation is the only transformation on the coordinates. For each output tile, the four corners are analyzed to determine the input bounding box. In Bayer mode, the corner is defined by a 2x2 Bayer block. The red and blue coordinates are transformed using the mesh table calculation. A third coordinate is the original location of the corner, defined as the location of the actual corner pixel with no transform applied. FIGURE shows this, with the corner pixels marked with a dot. This gives 12 coordinates for each output tile. The bounding box is determined by finding the minimum and maximum for both x and y. These four numbers then determine the range of the input bounding box. To this bounding box, the PIXPAD parameter adds additional pixels.
Figure 9-210 (a) Example output tile of Bayer data. Each corner is a 2x2 Bayer block. The four corner pixels used in the calculation are marked with a dot. (b) In each corner, red and blue pixels within the Bayer block are transformed using the mesh calculation. After transformation, the minimum and maximum of all of the final 12 x locations is used as the horizontal range of the bounding box. The minimum and maximum of all of the final 12 y locations is used as the vertical range of the bounding box. The dotted line shows the computed input bounding box. PIXPAD adds pixels around this prior to fetching input data.
Figure 9-210 Example output tile of Bayer data