Macroblock Motion Detection

Details
Category: Uncategorized
Created: September 17, 2004
Updated: January 27, 2020
Language: Verilog
Other project properties
Development Status: Alpha
WishBone compliant: No
WishBone version: n/a
License: n/a
Description
The 'Macroblock Motion Detection Project' contains modules to perform
motion search of macroblocks in the previous video frame for the best match
to a macroblock in the current frame.
Threre are two sets of files:
MotionTest.v for quick simulation of MotionDetection.v module
which searches for a macroblock in the previous frame in a nine
macroblock area.
FrametoMacroblockTest.v which reads input files to simulate CCIR 601
rate input stream and feeds data to the motion detection core which
performs a log search for the best full pixel match and a half pel search
around the best full search result. Note that simulation takes about an
hour for two small frames using Modelsim Xilinx Edition on a Pentium 1.4.
SampleFrames directory should be placed in the directory where Modelsim
will be running.
The Log Search is as follows:
1st center point and 8 points offset by 8 in x and/or y
2nd best from 1st and 8 points offset by 4 in x and/or y
3rd best from second and 8 points offset by 2 in x and/or y
4th best from third and 8 points offset by 1 in x and/or y
While this does not guarantee optimum selection of motion vectors, only 36
tests need to be performed rather than 32x32 tests for a full search.
Features
- Performs log search of supermacroblock (9x9) area
- Capable of processing full scale (704x480) data at 30 f/s
- Currently outputs motion vectors referenced to upper left
- corner of center block (ie 16,16 = no motion)
- Half pel unit performs 9 point half pel search and "outputs"
- (signals are available on HP_dout) motion vectors and pixel
- differences.
Changes
10_09_04 Changed directory in FrametoMacroBlockTest to find frames in SampleFrames directory.
Please let me know if similar problems exist which make it difficult to run simulations. Thanks, JE
10_18_04
Half Pel module added. Performs 9 point half pel search around best match
from motion detection. Outputs motion vectors (x,y) referenced to (32,32)
at count 508.5 and Y value differences four pixels at a time at counts
0.5 - 63.5. Added windows software to generate expected results.
10_20_04
Added informal documentation and module block symbols.
12_15_04
Added information on memory organization and timing.