Merge "vp10: fix entropy counts for the hp bit."
This commit is contained in:
commit
e562c71783
@ -161,17 +161,19 @@ static void inc_mv_component(int v, nmv_component_counts *comp_counts,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp10_inc_mv(const MV *mv, nmv_context_counts *counts) {
|
void vp10_inc_mv(const MV *mv, nmv_context_counts *counts, const int usehp) {
|
||||||
if (counts != NULL) {
|
if (counts != NULL) {
|
||||||
const MV_JOINT_TYPE j = vp10_get_mv_joint(mv);
|
const MV_JOINT_TYPE j = vp10_get_mv_joint(mv);
|
||||||
++counts->joints[j];
|
++counts->joints[j];
|
||||||
|
|
||||||
if (mv_joint_vertical(j)) {
|
if (mv_joint_vertical(j)) {
|
||||||
inc_mv_component(mv->row, &counts->comps[0], 1, 1);
|
inc_mv_component(mv->row, &counts->comps[0], 1,
|
||||||
|
!CONFIG_MISC_FIXES || usehp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mv_joint_horizontal(j)) {
|
if (mv_joint_horizontal(j)) {
|
||||||
inc_mv_component(mv->col, &counts->comps[1], 1, 1);
|
inc_mv_component(mv->col, &counts->comps[1], 1,
|
||||||
|
!CONFIG_MISC_FIXES || usehp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ typedef struct {
|
|||||||
nmv_component_counts comps[2];
|
nmv_component_counts comps[2];
|
||||||
} nmv_context_counts;
|
} nmv_context_counts;
|
||||||
|
|
||||||
void vp10_inc_mv(const MV *mv, nmv_context_counts *mvctx);
|
void vp10_inc_mv(const MV *mv, nmv_context_counts *mvctx, const int usehp);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
@ -294,7 +294,7 @@ static INLINE void read_mv(vpx_reader *r, MV *mv, const MV *ref,
|
|||||||
if (mv_joint_horizontal(joint_type))
|
if (mv_joint_horizontal(joint_type))
|
||||||
diff.col = read_mv_component(r, &ctx->comps[1], use_hp);
|
diff.col = read_mv_component(r, &ctx->comps[1], use_hp);
|
||||||
|
|
||||||
vp10_inc_mv(&diff, counts);
|
vp10_inc_mv(&diff, counts, use_hp);
|
||||||
|
|
||||||
mv->row = ref->row + diff.row;
|
mv->row = ref->row + diff.row;
|
||||||
mv->col = ref->col + diff.col;
|
mv->col = ref->col + diff.col;
|
||||||
|
@ -239,7 +239,7 @@ static void inc_mvs(const MB_MODE_INFO *mbmi, const MB_MODE_INFO_EXT *mbmi_ext,
|
|||||||
const MV *ref = &mbmi_ext->ref_mvs[mbmi->ref_frame[i]][0].as_mv;
|
const MV *ref = &mbmi_ext->ref_mvs[mbmi->ref_frame[i]][0].as_mv;
|
||||||
const MV diff = {mvs[i].as_mv.row - ref->row,
|
const MV diff = {mvs[i].as_mv.row - ref->row,
|
||||||
mvs[i].as_mv.col - ref->col};
|
mvs[i].as_mv.col - ref->col};
|
||||||
vp10_inc_mv(&diff, counts);
|
vp10_inc_mv(&diff, counts, vp10_use_mv_hp(ref));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user