decodemv.c: remove unused argument
Also, make some locals 'const'.
Change-Id: I030c493b8bb7a1827df16a9feda38dd9dd1e424c
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 94e03a9..b16eff3 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -284,14 +284,13 @@
}
#if CONFIG_EXT_WARPED_MOTION
-static MOTION_MODE read_motion_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
- MODE_INFO *mi, aom_reader *r, int best) {
+static MOTION_MODE read_motion_mode(MACROBLOCKD *xd, MODE_INFO *mi,
+ aom_reader *r, int best) {
#else
-static MOTION_MODE read_motion_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
- MODE_INFO *mi, aom_reader *r) {
+static MOTION_MODE read_motion_mode(MACROBLOCKD *xd, MODE_INFO *mi,
+ aom_reader *r) {
#endif // CONFIG_EXT_WARPED_MOTION
MB_MODE_INFO *mbmi = &mi->mbmi;
- (void)cm;
#if CONFIG_EXT_SKIP
if (mbmi->skip_mode) return SIMPLE_TRANSLATION;
@@ -1297,9 +1296,8 @@
static INLINE void read_mv(aom_reader *r, MV *mv, const MV *ref,
nmv_context *ctx, MvSubpelPrecision precision) {
- MV_JOINT_TYPE joint_type;
MV diff = { 0, 0 };
- joint_type =
+ const MV_JOINT_TYPE joint_type =
(MV_JOINT_TYPE)aom_read_symbol(r, ctx->joints_cdf, MV_JOINTS, ACCT_STR);
if (mv_joint_vertical(joint_type))
@@ -1345,14 +1343,12 @@
aom_read_symbol(r, av1_get_pred_cdf_##pname(xd), 2, ACCT_STR)
#if CONFIG_EXT_COMP_REFS
-static COMP_REFERENCE_TYPE read_comp_reference_type(AV1_COMMON *cm,
- const MACROBLOCKD *xd,
+static COMP_REFERENCE_TYPE read_comp_reference_type(const MACROBLOCKD *xd,
aom_reader *r) {
const int ctx = av1_get_comp_reference_type_context(xd);
- COMP_REFERENCE_TYPE comp_ref_type;
- (void)cm;
- comp_ref_type = (COMP_REFERENCE_TYPE)aom_read_symbol(
- r, xd->tile_ctx->comp_ref_type_cdf[ctx], 2, ACCT_STR);
+ const COMP_REFERENCE_TYPE comp_ref_type =
+ (COMP_REFERENCE_TYPE)aom_read_symbol(
+ r, xd->tile_ctx->comp_ref_type_cdf[ctx], 2, ACCT_STR);
FRAME_COUNTS *counts = xd->counts;
if (counts) ++counts->comp_ref_type[ctx][comp_ref_type];
return comp_ref_type; // UNIDIR_COMP_REFERENCE or BIDIR_COMP_REFERENCE
@@ -1400,8 +1396,7 @@
// FIXME(rbultje) I'm pretty sure this breaks segmentation ref frame coding
if (mode == COMPOUND_REFERENCE) {
#if CONFIG_EXT_COMP_REFS
- const COMP_REFERENCE_TYPE comp_ref_type =
- read_comp_reference_type(cm, xd, r);
+ const COMP_REFERENCE_TYPE comp_ref_type = read_comp_reference_type(xd, r);
if (comp_ref_type == UNIDIR_COMP_REFERENCE) {
const int ctx = av1_get_pred_context_uni_comp_ref_p(xd);
@@ -2223,9 +2218,9 @@
if (mbmi->ref_frame[1] != INTRA_FRAME)
#if CONFIG_EXT_WARPED_MOTION
- mbmi->motion_mode = read_motion_mode(cm, xd, mi, r, best_cand);
+ mbmi->motion_mode = read_motion_mode(xd, mi, r, best_cand);
#else
- mbmi->motion_mode = read_motion_mode(cm, xd, mi, r);
+ mbmi->motion_mode = read_motion_mode(xd, mi, r);
#endif // CONFIG_EXT_WARPED_MOTION
#if CONFIG_JNT_COMP