Skip to content

mshr-h/motion_estimation_processor_fullsearch

Repository files navigation

Motion Estimation Processor

Hardware implementation of Motion Estimation algorithm written in Verilog-HDL. It's currently under development.

About Motion Estimation

Motion Estimation is a process of finding motion vectors from a reference frame to the current frame. We apply the following process for each of the macro blocks in the current frame. We first find a block which has the lowest matching error in the search window of the reference frame. We use sum of absolute errors between corresponding pixels. Then, the displacement between the current macro block to the best matching macro block is motion vector.

Figure of Motion Estimation

Description

  • Fullsearch based motion estimation
  • Only integer pixel motion estimation
  • Template Block: 16x16 pixels
  • Search Range : ±24 pixels
  • Supported devices
    • MU500-RX FPGA board & MU500-7SEG 7seg LED board
    • DE1-SoC

Required Tools

How to run Simulation

  1. Open memory/memory.xlsx
  2. Click 'Create Memory' button to create memory/memory_sw.txt for search range memory and memory_tb.txt for template block memory
  3. Run make_tb.sh
  4. You will find the wave file testbench/***.vcd

How to synthesis Motion Estimation Processor

  1. Open memory/memory.xlsx
  2. Click 'Create Memory' button to create memory/memory_sw.txt for search range memory and memory_tb.txt for template block memory
  3. Run make_mif.sh to generate mif files
  4. Open fpga/fpga_top.qpf in Altera Quartus Prime
  5. Compile it

Source Code Organization

The Motion Estimation Processor source code is organized as follows:

docs/       documentation
fpga/       fpga related files
memory/     memory dependencies
rtl/        RTL files for Motion Estimation Processor
testbench/  test suites
tools/      tool for creating mif file

Timing chart

Block diagram

Parameters

TB_LENGTH

Size of the template block. The default value is 16 pixel.

SW_LENGTH

Size of the search window. The default value is 64 pixel.

PE_OUT_WIDTH

Bit width of the Processor Element's output. The default value is 8 bit.

MEMORY_SW_CONTENT

Path to the search window memory file which contains pixel values. If you run on iverilog, you should specify text file. If you compile it with Quartus, you should specify mif file. The default value is "../memory/memory_sw.txt".

MEMORY_\TB_CONTENT

Path to the template block memory file which contains pixel values. If you run on iverilog, you should specify text file. If you compile it with Quartus, you should specify mif file. The default value is "../memory/memory_tb.txt".

About

Fullsearch based Motion Estimation Processor written in Verilog-HDL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published