Altera Home Page
Literature Licensing
Buy On-Line Download

  Home   |   Products   |   Support   |   End Markets   |   Technology Center   |   Education & Events   |   Corporate   |   Buy On-Line  
  Knowledge Database   |   Devices   |   Design Software   |   Intellectual Property   |   Reference Designs   |   Design Examples   |   mySupport  

 Products
      MAX/MAX II
      Stratix/Stratix GX
      Nios II
  
 Functionality
      Arithmetic
      Memory
      Bus & I/O
      Logic
      Interfaces & Peripherals
      DSP
      Communications
      PLL & Clocking
  
 Design Entry
      Quartus II Project
      Tcl
      VHDL
      Verilog HDL
      C Code Examples
      DSP Builder
      TimeQuest
   On-Chip Debugging
  
 Simulation Tools
      Mentor Graphics ModelSim
      Cadence NCsim
      Synopsys VCS
  
 Legacy Examples
      Graphic Editor
      AHDL
  

Chroma Resampler Up Conversion Design Example

This design example illustrates how to implement chroma up resampling using Altera's Chroma Resampler MegaCore® function in DSP Builder. The Chroma Resampler MegaCore function can implement both subsampling and up conversion. In this example, the Chroma Resampler MegaCore function converts a 4:2:2  input video steam to a 4:4:4 stream through linear interpolation. The output video data is written into a binary data file using MATLAB Simulink Video Sink. A video conversion utility avi-is-avi (provided in the package) converts the binary output for display in RGB format. A binary-to-AVI conversion block is included in the design to implement the output conversion automatically.

To evaluate the performance of the Chroma Resampler MegaCore function, the same video input is processed by the MATLAB SIMULINK Chroma Resampling blockset, converted to RGB color space by the SIMULINK Color Space Conversion blockset, and displayed via the SIMULINK Video Display block. 

Download the files used in this example:

The use of this design is governed by, and subject to, the terms and conditions of the Altera Hardware Reference Design License Agreement.

Files in the zip download include:

  • ChromaUpConversion.mdl—DSP Builder design file 
  • chroma_resampler.vhd—wrapper file to generate the Chroma Resampler intellectual property (IP) MegaCore function
  • avi-is-avi.exe—DOS executable to convert an avi file to and from a binary file
  • car.avi—sample input video, 640W by 480H pixels
  • carYcc422176x144.bin—binary video stream subsampled from car.avi, 176W by 144H pixels, in YCbCr format and subsampled to 4:2:2
  • caroutput.avi—pre-simulated output AVI file using the provided input video clip carYcc422176x144.bin

Figure 1. Top-Level Diagram of the Chroma Resampler Up Conversion Design Example in DSP Builder

Figure 1. Top-Level Diagram of the Chroma Resampler Up Conversion Design Example in DSP Builder
View Full Size

Implementation

In this example, the Chroma Resampler IP MegaCore function uses the parameters shown in Table 1.

Table 1. Parameter Description
Parameters Value
Image Resolution 176 x 144
Bits Per Pixel Per Color Plane 8
Conversion Format 4:2:2 to 4:4:4
Horizontal Interpolation Linear

Table 2 describes the ports.

Table 2. Chroma Resampler Signals
Signal Type Description
reset Input MegaCore function asynchronous reset. Active high.
din_data Input Data input bus.
din_valid Input Input data valid signal.
dout_ready Input Output data ready signal indicating whether output sink is ready to take output data.
din_ready Output Data input ready signal indicating whether MegaCore function is ready to take input data.
dout_data Output Data output bus.
dout_valid Output Data valid signal indicating validity of output data signals.

Reference

1. C. Poynton, "Digital video and HDTV: algorithms and interfaces," Morgan Kaufmann Publishers, 2003.

Related Links

Design Examples Disclaimer

These design examples may only be used within Altera Corporation devices and remain the property of Altera. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.

  Please Give Us Feedback