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
77c7c40f
Commit
77c7c40f
authored
Jan 11, 2017
by
Thomas Davies
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EC_ADAPT: use tile context for switchable filter.
Change-Id: I7bbd3c62341ede45628641766b8683b77f3a7efb
parent
1de6c88a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
av1/decoder/decodemv.c
av1/decoder/decodemv.c
+10
-4
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+8
-3
No files found.
av1/decoder/decodemv.c
View file @
77c7c40f
...
...
@@ -1104,6 +1104,12 @@ static INLINE void read_mb_interp_filter(AV1_COMMON *const cm,
MB_MODE_INFO
*
const
mbmi
,
aom_reader
*
r
)
{
FRAME_COUNTS
*
counts
=
xd
->
counts
;
#if CONFIG_EC_ADAPT
FRAME_CONTEXT
*
ec_ctx
=
xd
->
tile_ctx
;
#else
FRAME_CONTEXT
*
ec_ctx
=
cm
->
fc
;
#endif
#if CONFIG_DUAL_FILTER
int
dir
;
if
(
cm
->
interp_filter
!=
SWITCHABLE
)
{
...
...
@@ -1119,11 +1125,11 @@ static INLINE void read_mb_interp_filter(AV1_COMMON *const cm,
#if CONFIG_EC_MULTISYMBOL
mbmi
->
interp_filter
[
dir
]
=
(
InterpFilter
)
av1_switchable_interp_inv
[
aom_read_symbol
(
r
,
cm
->
fc
->
switchable_interp_cdf
[
ctx
],
SWITCHABLE_FILTERS
,
r
,
ec_ctx
->
switchable_interp_cdf
[
ctx
],
SWITCHABLE_FILTERS
,
ACCT_STR
)];
#else
mbmi
->
interp_filter
[
dir
]
=
(
InterpFilter
)
aom_read_tree
(
r
,
av1_switchable_interp_tree
,
cm
->
fc
->
switchable_interp_prob
[
ctx
],
r
,
av1_switchable_interp_tree
,
ec_ctx
->
switchable_interp_prob
[
ctx
],
ACCT_STR
);
#endif
if
(
counts
)
++
counts
->
switchable_interp
[
ctx
][
mbmi
->
interp_filter
[
dir
]];
...
...
@@ -1143,11 +1149,11 @@ static INLINE void read_mb_interp_filter(AV1_COMMON *const cm,
#if CONFIG_EC_MULTISYMBOL
mbmi
->
interp_filter
=
(
InterpFilter
)
av1_switchable_interp_inv
[
aom_read_symbol
(
r
,
cm
->
fc
->
switchable_interp_cdf
[
ctx
],
SWITCHABLE_FILTERS
,
r
,
ec_ctx
->
switchable_interp_cdf
[
ctx
],
SWITCHABLE_FILTERS
,
ACCT_STR
)];
#else
mbmi
->
interp_filter
=
(
InterpFilter
)
aom_read_tree
(
r
,
av1_switchable_interp_tree
,
cm
->
fc
->
switchable_interp_prob
[
ctx
],
r
,
av1_switchable_interp_tree
,
ec_ctx
->
switchable_interp_prob
[
ctx
],
ACCT_STR
);
#endif
if
(
counts
)
++
counts
->
switchable_interp
[
ctx
][
mbmi
->
interp_filter
];
...
...
av1/encoder/bitstream.c
View file @
77c7c40f
...
...
@@ -1072,6 +1072,11 @@ static void write_mb_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
aom_writer
*
w
)
{
AV1_COMMON
*
const
cm
=
&
cpi
->
common
;
const
MB_MODE_INFO
*
const
mbmi
=
&
xd
->
mi
[
0
]
->
mbmi
;
#if CONFIG_EC_ADAPT
FRAME_CONTEXT
*
ec_ctx
=
xd
->
tile_ctx
;
#else
FRAME_CONTEXT
*
ec_ctx
=
cm
->
fc
;
#endif
if
(
cm
->
interp_filter
==
SWITCHABLE
)
{
#if CONFIG_DUAL_FILTER
...
...
@@ -1087,7 +1092,7 @@ static void write_mb_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
has_subpel_mv_component
(
xd
->
mi
[
0
],
xd
,
dir
+
2
)))
{
const
int
ctx
=
av1_get_pred_context_switchable_interp
(
xd
,
dir
);
av1_write_token
(
w
,
av1_switchable_interp_tree
,
cm
->
fc
->
switchable_interp_prob
[
ctx
],
ec_ctx
->
switchable_interp_prob
[
ctx
],
&
switchable_interp_encodings
[
mbmi
->
interp_filter
[
dir
]]);
++
cpi
->
interp_filter_selected
[
0
][
mbmi
->
interp_filter
[
dir
]];
}
...
...
@@ -1097,10 +1102,10 @@ static void write_mb_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
const
int
ctx
=
av1_get_pred_context_switchable_interp
(
xd
);
#if CONFIG_EC_MULTISYMBOL
aom_write_symbol
(
w
,
av1_switchable_interp_ind
[
mbmi
->
interp_filter
],
cm
->
fc
->
switchable_interp_cdf
[
ctx
],
SWITCHABLE_FILTERS
);
ec_ctx
->
switchable_interp_cdf
[
ctx
],
SWITCHABLE_FILTERS
);
#else
av1_write_token
(
w
,
av1_switchable_interp_tree
,
cm
->
fc
->
switchable_interp_prob
[
ctx
],
ec_ctx
->
switchable_interp_prob
[
ctx
],
&
switchable_interp_encodings
[
mbmi
->
interp_filter
]);
#endif
++
cpi
->
interp_filter_selected
[
0
][
mbmi
->
interp_filter
];
...
...
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