Git Product home page Git Product logo

de2-vd's Introduction

DE2-vd

DE2-vd is a video digitization add-on module for Altera DE2-115 FPGA development board. Together with DE2-115, it can be used in converting analog RGB/component video into digital format with very low processing latency. The system is mainly designed for using retro game consoles / home computers on modern displays.

The module is a prototype for a single-board digitization and scan converter system to be released in the future. Therefore, the current system is targeted for developers / hobbyists interested in FPGA design and video digitization - no in-depth documentation is currently provided.

Features

  • detects and digitizes various video modes from 240p to 1280x1024 (and possibly higher with future updates)
  • linedouble-support for 240p, 480i, 288p, 576i
  • linetriple-support for 240p with 4 different sampling modes
  • very low latency (less than 2 input scanlines)
  • single-field "deinterlace" for 480i/576i: minimal latency overhead with decent image quality
  • quick recover from input video mode change (e.g. 240p<->480i)
  • all video processing done in RGB domain - no conversion to YCbCr
  • multiple inputs supporting various formats
  • RGBS via SCART connector
  • RGBHV/RGBS via VGA connector
  • YPbPr/RGsB via 3xRCA connector
  • Two possible output methods
  • full-range RGB output through HDMI
  • analog RGB output through VGA DAC
  • emulated scanlines with configurable strength
  • configurable mask for overscan area
  • configurable horizontal sample rate (only limited by display support)
  • fully open source: rtl, software and pcb design files all avaiable for modification

Required HW and SW

Connection diagrams

DE2-vd module connections

DE2-vd module connections

DE2-115 board connections

DE2-115 board controls and connections

Build instructions

  1. Edit rtl/output_sel.v.example to suit your setup, and save the modified file into rtl/output_sel.v
  2. Load the project (videoproc.qpf) in Quartus II
  3. Generate Qsys system files (Tools -> Qsys. Open sys.qsys -> Generate -> Generate HDL)
  4. Generate the FPGA bitstream (Quartus window -> Processing -> Start Compilation)
  5. Program the bitstream into the FPGA using either JTAG (volatile/.sof) or AS programming (nonvolatile/.pof) method

Usage

Before turning on the power, set jumpers JP7 and JP8 on the DE2-115 development board into 3.3V position. After programming the FPGA, the character LCD and 7-segment LEDs should display "OSSC" if the connection between the boards is operational.

Input selection

Active input and format can be selected by using the 3 leftmost push-buttons on the board (see connection diagram). The inputs and corresponding connectors and formats are listed in the following table. The format within one input can be switched by pressing the same input button again.

Input Connector Format
AV1 SCART RGBS (csync or cvbs as sync)
AV2 VGA RGBHV
RGBS (csync connected to pin 13)
AV3 3xRCA YPbPr
RGsB

Line multiplier configuration

With SD video input, the line multiplier is activated in order to generate an output which is accepted by the target display. By default, the system uses linedouble and a horizontal sampling rate which results to 720 active pixels (720x480 with 60Hz, 720x576 with 50Hz). This is a standard mode which is compatible with basically all HDMI-enabled displays.

With 240p input, it is possible to improve output quality by enabling linetripler (L3_ENABLE=1) and selecting a suitable sampling mode (L3_MODE). This allows sampling the input video with a rate which matches the rate of the DAC generating the video, or alternatively with significant oversampling. Moreover, the output resolution (1280x720) is closer to the native resolution of modern displays, resulting to less scaling. There features reduce the softness resulting from inoptimal sampling and/or scaling. The sampling modes are as follows:

L3_MODE[1:0] Number Description
00 0 Input sampled at full 1280 horizontal, resulting to 1280x720 effective area. Generic oversampling mode for 16:9 video.
01 1 Input sampled at 960 horizontal, resulting to 960x720 effective area. Generic oversampling mode for 4:3 video.
10 2 Input sampled at 320 horizontal, multiplied by 3 in horizontal direction resulting to 960x720 effective area. A mode suitable for 320x240 input, e.g. PSX, N64.
11 3 Input sampled at 256 horizontal, multiplied by 4 in horizontal direction resulting to 1024x720 effective area. A mode suitable for 256x240 input, e.g. SNES, MD.

NOTE: the 1280x720 mode outputted by linetripler does not match the standardized 1280x720 mode and is not guarateed to work correctly on all displays.

Scanlines

Emulated scanlines can be enabled with SCANLINES_ENABLE-switch, and their strength is adjusted by SCANLINE_STR[2:0]. Scanlines are active every other output line with linedouble/bare digitize, and every third output line with linetriple.

Border masking

Up to 15 pixels of input video's borders can be masked with black bars in horizontal and vertical direction via H_MASK[3:0] and V_MASK[3:0] switches.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.