Commit 2854fe70 authored by Zoe Liu's avatar Zoe Liu
Browse files

Clean up decoder on NEWMV handling

Change-Id: Idc72cff4ab9ba1691a7f5c72366a61be9569d370
parent 876a8b0b
......@@ -2088,18 +2088,13 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
}
} else {
if (mbmi->mode == NEWMV) {
for (ref = 0; ref < 1 + is_compound; ++ref) {
uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame);
if (xd->ref_mv_count[ref_frame_type] > 1) {
ref_mv[ref] =
(ref == 0)
? xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].this_mv
: xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].comp_mv;
clamp_mv_ref(&ref_mv[ref].as_mv, xd->n8_w << MI_SIZE_LOG2,
xd->n8_h << MI_SIZE_LOG2, xd);
}
nearestmv[ref] = ref_mv[ref];
uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame);
if (xd->ref_mv_count[ref_frame_type] > 1) {
ref_mv[0] = xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].this_mv;
clamp_mv_ref(&ref_mv[0].as_mv, xd->n8_w << MI_SIZE_LOG2,
xd->n8_h << MI_SIZE_LOG2, xd);
}
nearestmv[0] = ref_mv[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