The number of motion threshold bits for the Deinterlacer II MegaCore® function can be modified manually by following these steps
- Locate the function’s source file in the synthesis/submodules directory. It will be named similar to: <my_deinterlacer_name>_alt_vip_cl_dil_0.v
– Then find the instantiation of the motion detect block which will look like this:
alt_vip_motion_detect #(
.BITS_PER_SYMBOL (8),
.NUMBER_OF_COLOR_PLANES (2),
.COLOR_PLANES_ARE_IN_PARALLEL (1),
.MAX_LINE_LENGTH (1920),
.KERNEL_SIZE_0 (4),
.KERNEL_SIZE_1 (1),
.KERNEL_SIZE_2 (2),
.KERNEL_SIZE_3 (1),
.MOTION_BPS (7), // Try reducing to ~4
.SRC_WIDTH (8),
.DST_WIDTH (8),
.CONTEXT_WIDTH (8),
.TASK_WIDTH (8),
.SOURCE_ADDRESS (0)
)
- Change the “MOTION_BPS” parameter. The MOTION_BPS parameter is used for motion detection as follows :
if (MOTION_BPS > BITS_PER_SYMBOL)
assign normalized_motion[i] = absdiff[i] << (MOTION_BPS-BITS_PER_SYMBOL);
else
assign normalized_motion[i] = absdiff[i][BITS_PER_SYMBOL-1 -: MOTION_BPS];
Do not re-generate the Qsys system after manually editing, as the change will be overwritten by Qsys.