Starting input pixel
Starting phase (0 to 3)
Input
pixel
1
pixel
2
Input
pixel
3
Input
pixel
4
Input
pixel
5
Input
pixel
n
Input
Center of 1st
output pixel
camisp-065
Public Version
Camera ISP Functional Description
www.ti.com
fine-input pointer = fine-input pointer
+ (
[9:0] HRSZ +1)
/* distance between outputs = 1/resize_factor = (
[9:0] HRSZ + 1) /256 = (
[9:0] HRSZ + 1) in 1/256 precision */
•
Same algorithm in the horizontal and vertical directions, except with separate initial pixel/phase values
and separate RSZ values.
6.4.7.2.5.2 Camera ISP VPBE Resizer 7-Tap/4-Phase Mode
In the 7-tap/4-phase mode, the coefficients for each of the 4 phases may be set to interpolate 4
intermediate pixels between input pixels. For each output pixel calculation, a fine-input pointer with 1/56
input-pixel precision is incremented by the
[9:0] HRSZ + 1 value. A coarse-input pointer with
1/2 input-pixel precision (corresponds to one of the 4 phases) is calculated by rounding the fine-input
pointer to the nearest 1/2 pixel. The output pixel is calculated by the dot product of the coefficients of the
phase filter (selected by the coarse-input pointer) and the appropriate 7 input pixels.
shows a
pseudo-code description of the resizer algorithm in the 7-tap/4-phase mode.
Figure 6-94. Camera ISP VPBE Resizer Pseudo-Code Description of the Resizer Algorithm in the
7-Tap/4-Phase Mode
•
The starting input-pixel location (in whole pixels) (see
, Camera ISP VPBE Resizer
Input and Output Interfaces) and the starting phase (in 1/2 pixel) (
[22:20] HSTPH) are
programmed through the resizer registers.
•
A fine-input pointer is maintained in 1/256 pixel precision.
•
A coarse-input pointer and a pixel-input pointer are computed for each output based on the fine-input
pointer.
•
The coarse-input pointer is in 1/2 pixel precision. The pixel-input pointer is in whole-pixel precision.
•
Initially, fine-input pointer = 256 * starting input pixel + 64 * starting phase - 256. The fine-input pointer
defines the starting 1/2 pixel location covered by the filter waveform.
•
For each output pixel:
Coarse-input pointer =
/* Round to the nearest phase */
(fine-input p 32) >> 6
Pixel-input pointer =
/* Round up to a whole pixel; when already on an
(coarse-input pointer >> 2) + 1
integer pixel, go to next one to simplify coefficient
organization */
Coefficient phase =
/* 2 LSBs = phase */
(coarse-input pointer & 3)
Output = Dot product of the 7 coefficients and the 7 inputs starting with the pixel-input
pointer
Clip output to 8-bit unsigned for luma, 8-bit signed for chroma
/* It is acceptable to require the 8
th
coefficients to be filled with zeros by firmware so that 8
coefficients and 8 inputs, the last input being don't care value, are multiply-added */
Fine-input pointer = Fine input p (
[9:0] HRSZ + 1)
/* Distance between outputs = 1/resize_factor = (
[9:0] HRSZ + 1)/256 =
(
[9:0] HRSZ + 1) in 1/256 precision */
1220
Camera Image Signal Processor
SWPU177N – December 2009 – Revised November 2010
Copyright © 2009–2010, Texas Instruments Incorporated