
Starting input pixel
Starting phase (0 to 7)
Input
pixel
1
pixel
2
Input
pixel
3
Input
pixel
4
Input
pixel
5
Input
pixel
n
Input
Center of 1st
output pixel
camisp-064
Public Version
www.ti.com
Camera ISP Functional Description
The horizontal and vertical starting phases can be programmed in the
[22:20] HSTPH and
[25:23] VSTPH fields, respectively. The chrominance data can be resized using bilinear
interpolation or the same algorithm as the luminance data (
[29] CBILIN).
The following section explains how these fields are used in the algorithm.
6.4.7.2.5 Camera ISP VPBE Resizer Resampling Algorithm
The resizer module uses the same resampling algorithm for the horizontal and vertical directions. For the
rest of this section, the horizontal direction is used in describing the resampling algorithm. The algorithm is
described first for the 4-tap/8-phase mode, then for the 7-tap/4-phase mode.
and
explain the generic algorithm without detailing the differences
between color components.
describes how interleaved chroma are processed when
input is YUV422.
6.4.7.2.5.1 Camera ISP VPBE Resizer 4-Tap/8-Phase Mode
In the 4-tap/8-phase mode, the coefficients for each of the 8 phases may be set to interpolate 8
intermediate pixels between input pixels. For each output pixel calculation, a fine-input pointer with 1/256
input-pixel precision is incremented by the
[9:0] HRSZ +1 value. A coarse-input pointer with 1/8
input-pixel precision (corresponds to one of the 8 phases) is calculated by rounding the fine-input pointer
to the nearest 1/8 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 four input pixels.
shows a
pseudo-code description of the resizer algorithm in the 4-tap/8-phase mode.
Figure 6-93. Camera ISP VPBE Resizer Pseudo-Code Description of the Resizer Algorithm in the
4-Tap/8-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/8 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/8 pixel precision. The pixel-input pointer is in whole-pixel precision.
•
Initially, fine-input pointer = 256* starting input pixel + 32* starting phase - 256. The fine-input pointer
defines the starting 1/8 pixel location covered by the filter waveform.
•
For each output pixel:
Coarse-input pointer =
/* Rounded to the nearest phase */
(fine-input p 16) >> 5
Pixel-input pointer =
/* Rounded up to a whole pixel, when already on an
(coarse-input pointer >> 3) + 1
integer pixel, go to next one to simplify coefficient
organization */
Coefficient phase =
/* 3 LSBs = phase */
(coarse-input pointer & 7)
Output = dot product of the 4 coefficients and the 4 inputs starting with pixel-input pointer
Clip output to 8-bit unsigned for luma, 8-bit signed for chroma
1219
SWPU177N – December 2009 – Revised November 2010
Camera Image Signal Processor
Copyright © 2009–2010, Texas Instruments Incorporated