Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
272adbbe
Commit
272adbbe
authored
Oct 07, 2013
by
Dmitry Kovalev
Browse files
Using inter_mode_offset_function instead of duplicated code.
Change-Id: I8de865cd1deca07b5c92c225782f0867367e9a11
parent
6d3db91d
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_bitstream.c
View file @
272adbbe
...
...
@@ -341,7 +341,7 @@ static void write_sb_mv_ref(vp9_writer *w, MB_PREDICTION_MODE mode,
const
vp9_prob
*
p
)
{
assert
(
is_inter_mode
(
mode
));
write_token
(
w
,
vp9_inter_mode_tree
,
p
,
&
vp9_inter_mode_encodings
[
mode
-
NEARESTMV
]);
&
vp9_inter_mode_encodings
[
inter_mode_offset
(
mode
)
]);
}
...
...
vp9/encoder/vp9_rdopt.c
View file @
272adbbe
...
...
@@ -249,10 +249,10 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
MB_PREDICTION_MODE m;
for (m = NEARESTMV; m < MB_MODE_COUNT; m++)
cpi
->
mb
.
inter_mode_cost
[
i
][
m
-
NEARESTMV
]
=
cpi->mb.inter_mode_cost[i][
inter_mode_offset(m)
] =
cost_token(vp9_inter_mode_tree,
cpi->common.fc.inter_mode_probs[i],
vp9_inter_mode_encodings
+
(
m
-
NEARESTMV
));
vp9_inter_mode_encodings +
inter_mode_offset(m
));
}
}
}
...
...
@@ -1416,7 +1416,7 @@ static int cost_mv_ref(VP9_COMP *cpi, MB_PREDICTION_MODE mode,
// Don't account for mode here if segment skip is enabled.
if (!vp9_segfeature_active(&cpi->common.seg, segment_id, SEG_LVL_SKIP)) {
assert(is_inter_mode(mode));
return
x
->
inter_mode_cost
[
mode_context
][
mode
-
NEARESTMV
];
return x->inter_mode_cost[mode_context][
inter_mode_offset(mode)
];
} else {
return 0;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment