User guide
Table Of Contents
- Contents
- 1. About This MegaCore Function Suite
- Release Information
- Device Family Support
- Features
- Design Example
- Performance and Resource Utilization
- 2D FIR Filter
- 2D Median Filter
- Alpha Blending Mixer
- Avalon-ST Video Monitor
- Chroma Resampler
- Clipper
- Clocked Video Input
- Clocked Video Output
- Color Plane Sequencer
- Color Space Converter
- Control Synchronizer
- Deinterlacer
- Deinterlacer II
- Frame Buffer
- Gamma Corrector
- Interlacer
- Scaler
- Scaler II
- Switch
- Test Pattern Generator
- Trace System
- 2. Getting Started with Altera IP Cores
- 3. Interfaces
- Interface Types
- Avalon-ST Video Protocol
- Avalon-MM Slave Interfaces
- Avalon-MM Master Interfaces
- Buffering of Non-Image Data Packets in Memory
- 4. 2D FIR Filter MegaCore Function
- 5. 2D Median Filter MegaCore Function
- 6. Alpha Blending MegaCore Function
- 7. Avalon-ST Video Monitor MegaCore Function
- 8. Chroma Resampler MegaCore Function
- 9. Clipper MegaCore Function
- 10. Clocked Video Input MegaCore Function
- 11. Clocked Video Output MegaCore Function
- 12. Color Plane Sequencer MegaCore Function
- 13. Color Space Converter MegaCore Function
- 14. Control Synchronizer MegaCore Function
- 15. Deinterlacer MegaCore Function
- Core Overview
- Functional Description
- Parameter Settings
- Signals
- Control Register Maps
- 16. Deinterlacer II MegaCore Function
- 17. Frame Reader MegaCore Function
- 18. Frame Buffer MegaCore Function
- 19. Gamma Corrector MegaCore Function
- 20. Interlacer MegaCore Function
- 21. Scaler MegaCore Function
- 22. Scaler II MegaCore Function
- 23. Switch MegaCore Function
- 24. Test Pattern Generator MegaCore Function
- 25. Trace System MegaCore Function
- A. Avalon-ST Video Verification IP Suite
- B. Choosing the Correct Deinterlacer
- Additional Information

Chapter 8: Chroma Resampler MegaCore Function 8–3
Functional Description
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
Figure 8–2 shows 4:2:2 data at an edge transition. Without taking any account of the
luma, the interpolation to produce chroma values for sample 4 would weight samples
3 and 5 equally. From the luma, you can see that sample 4 falls on an the low side of an
edge, so sample 5 is more significant than sample 3.
The luma-adaptive mode looks for such situations and chooses how to adjust the
interpolation filter. From phase 0, it can shift to -1/4, 0, or 1/4; from phase 1/2, it can
shift to 1/4, 1/2, or 3/4. This makes the interpolated chroma samples line up better
with edges in the luma channel and is particularly noticeable for bold synthetic edges
such as text.
The luma-adaptive mode uses no memory or multipliers, but requires more logic
elements than the straightforward filtered algorithm.
Vertical Resampling (4:2:0)
The Chroma Resampler MegaCore function does not distinguish interlaced data with
its vertical resampling mode. It only supports the co-sited form of vertical resampling
shown in Figure 8–3.
For both upsampling and downsampling, the vertical resampling algorithm is fixed at
nearest-neighbor.
Vertical resampling does not use any multipliers. For upsampling, it uses four line
buffers, each buffer being half the width of the image. For downsampling it uses one
line buffer which is half the width of the image.
Figure 8–2. 4:2:2 Data at an Edge Transition
1234
Sample No
567
+
+
+
+
+
+
+
+
= Y’
+
= Cb
+
= Cr
+
+
= CbCr
+
+
= Y’CbCr
Y’ Intensity
CbCr Color
Value
+
+
+
+
+
+
+
+
Figure 8–3. Resampling 4.4.4 to a 4.2.0 Image
1234
1
2
Sample No 567
8
+
+
+
+
+
+
+
+
3
4
= Y’
+
= Cb
+
= Cr
+
+
= CbCr
+
+
= Y’CbCr
+
+
+
+
+
+
+
+