Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
61a47da8
Commit
61a47da8
authored
Apr 24, 2013
by
Dmitry Kovalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding is_inter_mode function.
Change-Id: I2d32d46002cb92c63050c2b8328865c406103621
parent
2cf0675a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
vp9/common/vp9_blockd.h
vp9/common/vp9_blockd.h
+5
-0
vp9/common/vp9_pred_common.c
vp9/common/vp9_pred_common.c
+2
-4
vp9/decoder/vp9_decodemv.c
vp9/decoder/vp9_decodemv.c
+1
-1
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_bitstream.c
+1
-1
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_encodeframe.c
+1
-2
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+2
-2
No files found.
vp9/common/vp9_blockd.h
View file @
61a47da8
...
...
@@ -98,6 +98,11 @@ typedef enum {
MB_MODE_COUNT
}
MB_PREDICTION_MODE
;
static
INLINE
int
is_inter_mode
(
MB_PREDICTION_MODE
mode
)
{
return
mode
>=
NEARESTMV
&&
mode
<=
SPLITMV
;
}
// Segment level features.
typedef
enum
{
SEG_LVL_ALT_Q
=
0
,
// Use alternate Quantizer ....
...
...
vp9/common/vp9_pred_common.c
View file @
61a47da8
...
...
@@ -59,16 +59,14 @@ unsigned char vp9_get_pred_context(const VP9_COMMON *const cm,
case
PRED_SWITCHABLE_INTERP
:
{
// left
const
int
left_in_image
=
xd
->
left_available
&&
left_mi
->
mbmi
.
mb_in_image
;
const
int
left_mv_pred
=
left_mi
->
mbmi
.
mode
>=
NEARESTMV
&&
left_mi
->
mbmi
.
mode
<=
SPLITMV
;
const
int
left_mv_pred
=
is_inter_mode
(
left_mi
->
mbmi
.
mode
);
const
int
left_interp
=
left_in_image
&&
left_mv_pred
?
vp9_switchable_interp_map
[
left_mi
->
mbmi
.
interp_filter
]
:
VP9_SWITCHABLE_FILTERS
;
// above
const
int
above_in_image
=
xd
->
up_available
&&
above_mi
->
mbmi
.
mb_in_image
;
const
int
above_mv_pred
=
above_mi
->
mbmi
.
mode
>=
NEARESTMV
&&
above_mi
->
mbmi
.
mode
<=
SPLITMV
;
const
int
above_mv_pred
=
is_inter_mode
(
above_mi
->
mbmi
.
mode
);
const
int
above_interp
=
above_in_image
&&
above_mv_pred
?
vp9_switchable_interp_map
[
above_mi
->
mbmi
.
interp_filter
]
:
VP9_SWITCHABLE_FILTERS
;
...
...
vp9/decoder/vp9_decodemv.c
View file @
61a47da8
...
...
@@ -692,7 +692,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
#endif
}
if
(
mbmi
->
mode
>=
NEARESTMV
&&
mbmi
->
mode
<=
SPLITMV
)
{
if
(
is_inter_mode
(
mbmi
->
mode
)
)
{
mbmi
->
interp_filter
=
cm
->
mcomp_filter_type
==
SWITCHABLE
?
read_switchable_filter_type
(
pbi
,
r
)
:
cm
->
mcomp_filter_type
;
...
...
vp9/encoder/vp9_bitstream.c
View file @
61a47da8
...
...
@@ -794,7 +794,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
vp9_accum_mv_refs
(
&
cpi
->
common
,
mode
,
mi
->
mb_mode_context
[
rf
]);
}
if
(
mode
>=
NEARESTMV
&&
mode
<=
SPLITMV
)
{
if
(
is_inter_mode
(
mode
)
)
{
if
(
cpi
->
common
.
mcomp_filter_type
==
SWITCHABLE
)
{
write_token
(
bc
,
vp9_switchable_interp_tree
,
vp9_get_pred_probs
(
&
cpi
->
common
,
xd
,
...
...
vp9/encoder/vp9_encodeframe.c
View file @
61a47da8
...
...
@@ -505,8 +505,7 @@ static void update_state(VP9_COMP *cpi,
}
#endif
if
(
cpi
->
common
.
mcomp_filter_type
==
SWITCHABLE
&&
mbmi
->
mode
>=
NEARESTMV
&&
mbmi
->
mode
<=
SPLITMV
)
{
is_inter_mode
(
mbmi
->
mode
))
{
++
cpi
->
switchable_interp_count
[
vp9_get_pred_context
(
&
cpi
->
common
,
xd
,
PRED_SWITCHABLE_INTERP
)]
[
vp9_switchable_interp_map
[
mbmi
->
interp_filter
]];
...
...
vp9/encoder/vp9_rdopt.c
View file @
61a47da8
...
...
@@ -4042,7 +4042,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// Accumulate filter usage stats
// TODO(agrange): Use RD criteria to select interpolation filter mode.
if
(
(
best_mode
>=
NEARESTMV
)
&&
(
best_mode
<=
SPLITMV
))
if
(
is_inter_mode
(
best_mode
))
++
cpi
->
best_switchable_interp_count
[
vp9_switchable_interp_map
[
best_filter
]];
// Reduce the activation RD thresholds for the best choice mode
...
...
@@ -4852,7 +4852,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
// Accumulate filter usage stats
// TODO(agrange): Use RD criteria to select interpolation filter mode.
if
(
(
best_mode
>=
NEARESTMV
)
&&
(
best_mode
<=
SPLITMV
))
if
(
is_inter_mode
(
best_mode
))
++
cpi
->
best_switchable_interp_count
[
vp9_switchable_interp_map
[
best_filter
]];
// TODO(rbultje) integrate with RD thresholding
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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