Function hexagon_search

Source
fn hexagon_search<T: Pixel>(
    fi: &FrameInvariants<T>,
    po: PlaneOffset,
    org_region: &PlaneRegion<'_, T>,
    p_ref: &Plane<T>,
    current: &mut MotionSearchResult,
    bit_depth: usize,
    pmv: [MotionVector; 2],
    lambda: u32,
    mvx_min: isize,
    mvx_max: isize,
    mvy_min: isize,
    mvy_max: isize,
    w: usize,
    h: usize,
)
Expand description

Perform hexagon search and refine afterwards.

In the hexagon search stage, candidate motion vectors are examined for improvement to the current search location. The search location is moved to the best candidate (if any). This is repeated until the search location stops moving.

Refinement uses a square pattern that fits between the hexagon candidates.

The hexagon pattern is defined by HEXAGON_PATTERN and the refinement is defined by SQUARE_REFINE_PATTERN.

current provides the initial search location and serves as the output for the final search results.