Texas Instruments TMS320DM648 manual Edge Pixel Replication, Scaled Co-Sited Filtering

Models: TMS320DM648

1 174
Download 174 pages 10.69 Kb
Page 59
Image 59

www.ti.com

Video Input Filtering

The filtering for the luminance portion of the scaling filter changes depending on if chrominance re-sampling is also enabled. (By changing the luminance filter, the chrominance filters can remain the same.) The resulting values are clamped to between 01h and FEh and sent to the Y, Cb, and Cr capture buffers. Scaling for co-sited capture is shown in Figure 3-9and scaling for chrominance re-sampling is shown in Figure 3-10.

Figure 3-9. 1/2 Scaled Co-Sited Filtering

a b c d e

YCbCr 4:2:2 co-sited input samples

1/2 scaled co-sited capture results

Luma (Y)

Chroma (Cb/Cr)

- sample

- samples

f

g

h

i

j

k

l

Y’h = (-3Ye+ 32Yg+ 70Yh+ 32Yi - 3Yk) / 128

Y’f = (-3Yc+ 32Ye+ 70Yf+ 32Yg - 3Yi) / 128

Cb’f = (-1Cbc+ 17Cbe+ 17Cbg - 1Cbi ) / 32

Cr’f = (-1Crc+ 17Cre+ 17Crg - 1Cri ) / 32

Figure 3-10. 1/2 Scaled Chrominance Re-sampled Filtering

a b c d e

YCbCr 4:2:2 co-sited input samples

1/2 scaled chroma-resampled capture results

Luma (Y)

Chroma (Cb/Cr)

- sample

- samples

f g

h

i

j k

l

Y’g = (-3Yd+ 32Yf + 70Yg + 32Yh -3Yj) / 128

Cb’f = (-1Cbc+ 17Cbe + 17Cbg - 1Cbi) / 32 Cr’f = (-1Crc+ 17Cre + 17Crg - 1Cri ) / 32

Note that because input scaling is limited to 1/2, true CIF horizontal resolution is not achieved if the full BT.656 horizontal line (720 pixels) is captured. A CIF size line can be captured by selecting a 704 pixel-sized window within the BT.656 line. This window size and location on the line are programmed using the VCXSTARTn and VCXSTOPn bits.

Note that when 1/2 scaling is selected, horizontal timing applies to the incoming data (before scaling). The VCTHRLD value applies to the data written into the FIFO after scaling.

Also note when using the scalar, standard BT.601 values should be used for the luma and chroma

(16-240) data. Using values beyond this range may result in overflow and underflow. The scalar does not saturate the data; therefore, data going below 00h or above FFh will not be clipped, resulting in image degradation.

3.5.4 Edge Pixel Replication

Because the filters make use of preceding and trailing samples, filtering artifacts can occur at the beginning of the BT.656 or Y/C active line because no samples exist before the SAV code, and at the end of the BT.656 active line because no samples exist after the EAV code. In order to minimize artifacts, the first m samples after sample 0 (where m is the maximum number of preceding samples used by any of the filters) are mirrored to the left of sample 0 and the last m samples before the last sample are mirrored to the right of the last sample.

Figure 3-11shows edge pixel replication assuming an m value of 3. Sample a is the first sample after the SAV code. Therefore, samples b-d are mirrored to the left of sample a to provide values for the filter calculations on the first few pixels in the line. Likewise, samples n - 1 to n - 3 are mirrored to the right of the last sample n to provide values for the last few pixels on the line.

SPRUEM1 –May 2007

Video Capture Port

59

Submit Documentation Feedback

Page 59
Image 59
Texas Instruments TMS320DM648 manual Edge Pixel Replication, Scaled Co-Sited Filtering