Constant HEXAGON_PATTERN

Source
const HEXAGON_PATTERN: [MotionVector; 6];
Expand description

A hexagon pattern around a center point. The pattern is ordered so that the offsets circle around the center. This is done to allow pruning locations covered by the last iteration.

  21012
2  X X
1
0 X o X
1
2  X X

’X’s are motion candidates and the ‘o’ is the center.

The illustration below shows the process of a hexagon search.

Step 1    Step 2
 1 1       1 1 2

1(0)1  => 1 0(1)2

 1 1       1 1 2

The search above has gone through the following steps.

  1. Search ‘1’ elements for better candidates than the center ‘0’.
  2. Recenter around the best candidate (‘(1)’) and hexagon candidates that don’t overlap with the previous search step (labeled ‘2’).