Commit 5554c4d0 authored by Romain Vimont's avatar Romain Vimont Committed by Romain Vimont

Fix block offset half-resolution mismatch

The function get_subset_predictors() was called with block offset
relative to the half-resolution frame, but used to index
FrameMotionVectors relative to the full-resolution frame.
parent 0aaa1118
......@@ -511,7 +511,6 @@ impl MotionEstimation for DiamondSearch {
blk_w: usize, blk_h: usize,
best_mv: &mut MotionVector, lowest_cost: &mut u64
) {
let bo_adj_h = BlockOffset { x: bo_adj.x >> 1, y: bo_adj.y >> 1 };
let po = PlaneOffset {
x: (bo_adj.x as isize) << BLOCK_TO_PLANE_SHIFT >> 1,
y: (bo_adj.y as isize) << BLOCK_TO_PLANE_SHIFT >> 1,
......@@ -519,7 +518,7 @@ impl MotionEstimation for DiamondSearch {
for omv in pmvs.iter() {
if let Some(pmv) = omv {
let mut predictors = get_subset_predictors::<T>(
bo_adj_h,
bo_adj,
MotionVector{row: pmv.row, col: pmv.col},
fi.w_in_b, fi.h_in_b,
&frame_mvs, frame_ref_opt, 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment