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
043c227b
Commit
043c227b
authored
Jul 19, 2017
by
Zoe Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add decoder support to ALTREF2
Change-Id: I11abc5448622265183abd0a58268c190b5891576
parent
ea10ad45
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
6 deletions
+71
-6
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+6
-1
av1/decoder/decodemv.c
av1/decoder/decodemv.c
+52
-4
av1/decoder/decoder.c
av1/decoder/decoder.c
+13
-1
No files found.
av1/decoder/decodeframe.c
View file @
043c227b
...
...
@@ -114,8 +114,13 @@ static void setup_compound_reference_mode(AV1_COMMON *cm) {
cm
->
comp_fwd_ref
[
3
]
=
GOLDEN_FRAME
;
cm
->
comp_bwd_ref
[
0
]
=
BWDREF_FRAME
;
#if CONFIG_ALTREF2
cm
->
comp_bwd_ref
[
1
]
=
ALTREF2_FRAME
;
cm
->
comp_bwd_ref
[
2
]
=
ALTREF_FRAME
;
#else // !CONFIG_ALTREF2
cm
->
comp_bwd_ref
[
1
]
=
ALTREF_FRAME
;
#else
#endif // CONFIG_ALTREF2
#else // !CONFIG_EXT_REFS
if
(
cm
->
ref_frame_sign_bias
[
LAST_FRAME
]
==
cm
->
ref_frame_sign_bias
[
GOLDEN_FRAME
])
{
cm
->
comp_fixed_ref
=
ALTREF_FRAME
;
...
...
av1/decoder/decodemv.c
View file @
043c227b
...
...
@@ -1534,8 +1534,13 @@ static void read_ref_frames(AV1_COMMON *const cm, MACROBLOCKD *const xd,
const
int
ctx_bwd
=
av1_get_pred_context_comp_bwdref_p
(
cm
,
xd
);
#if CONFIG_VAR_REFS
int
bit_bwd
;
// Test need to explicitly code (BWD) vs (ALT) branch node in tree
if
(
BWD_AND_ALT
(
cm
))
// Test need to explicitly code (BWD/ALT2) vs (ALT) branch node in tree
#if CONFIG_ALTREF2
const
int
bit_bwd_uncertain
=
BWD_OR_ALT2
(
cm
)
&&
ALTREF_IS_VALID
(
cm
);
#else // !CONFIG_ALTREF2
const
int
bit_bwd_uncertain
=
BWD_AND_ALT
(
cm
);
#endif // CONFIG_ALTREF2
if
(
bit_bwd_uncertain
)
bit_bwd
=
READ_REF_BIT
(
comp_bwdref_p
);
else
bit_bwd
=
ALTREF_IS_VALID
(
cm
);
...
...
@@ -1543,7 +1548,26 @@ static void read_ref_frames(AV1_COMMON *const cm, MACROBLOCKD *const xd,
const
int
bit_bwd
=
READ_REF_BIT
(
comp_bwdref_p
);
#endif // CONFIG_VAR_REFS
if
(
counts
)
++
counts
->
comp_bwdref
[
ctx_bwd
][
0
][
bit_bwd
];
#if CONFIG_ALTREF2
if
(
!
bit_bwd
)
{
const
int
ctx1_bwd
=
av1_get_pred_context_comp_bwdref_p1
(
cm
,
xd
);
#if CONFIG_VAR_REFS
int
bit1_bwd
;
if
(
BWD_AND_ALT2
(
cm
))
bit1_bwd
=
READ_REF_BIT
(
comp_bwdref_p1
);
else
bit1_bwd
=
ALTREF2_IS_VALID
(
cm
);
#else // !CONFIG_VAR_REFS
const
int
bit1_bwd
=
READ_REF_BIT
(
comp_bwdref_p1
);
#endif // CONFIG_VAR_REFS
if
(
counts
)
++
counts
->
comp_bwdref
[
ctx1_bwd
][
1
][
bit1_bwd
];
ref_frame
[
idx
]
=
cm
->
comp_bwd_ref
[
bit1_bwd
];
}
else
{
ref_frame
[
idx
]
=
cm
->
comp_bwd_ref
[
2
];
}
#else // !CONFIG_ALTREF2
ref_frame
[
idx
]
=
cm
->
comp_bwd_ref
[
bit_bwd
];
#endif // CONFIG_ALTREF2
#else // !CONFIG_EXT_REFS
ref_frame
[
!
idx
]
=
cm
->
comp_var_ref
[
bit
];
ref_frame
[
idx
]
=
cm
->
comp_fixed_ref
;
...
...
@@ -1568,8 +1592,13 @@ static void read_ref_frames(AV1_COMMON *const cm, MACROBLOCKD *const xd,
const
int
ctx1
=
av1_get_pred_context_single_ref_p2
(
xd
);
#if CONFIG_VAR_REFS
int
bit1
;
// Test need to explicitly code (BWD) vs (ALT) branch node in tree
if
(
BWD_AND_ALT
(
cm
))
// Test need to explicitly code (BWD/ALT2) vs (ALT) branch node in tree
#if CONFIG_ALTREF2
const
int
bit1_uncertain
=
BWD_OR_ALT2
(
cm
)
&&
ALTREF_IS_VALID
(
cm
);
#else // !CONFIG_ALTREF2
const
int
bit1_uncertain
=
BWD_AND_ALT
(
cm
);
#endif // CONFIG_ALTREF2
if
(
bit1_uncertain
)
bit1
=
READ_REF_BIT
(
single_ref_p2
);
else
bit1
=
ALTREF_IS_VALID
(
cm
);
...
...
@@ -1577,7 +1606,26 @@ static void read_ref_frames(AV1_COMMON *const cm, MACROBLOCKD *const xd,
const
int
bit1
=
READ_REF_BIT
(
single_ref_p2
);
#endif // CONFIG_VAR_REFS
if
(
counts
)
++
counts
->
single_ref
[
ctx1
][
1
][
bit1
];
#if CONFIG_ALTREF2
if
(
!
bit1
)
{
const
int
ctx5
=
av1_get_pred_context_single_ref_p6
(
xd
);
#if CONFIG_VAR_REFS
int
bit5
;
if
(
BWD_AND_ALT2
(
cm
))
bit5
=
READ_REF_BIT
(
single_ref_p6
);
else
bit5
=
ALTREF2_IS_VALID
(
cm
);
#else // !CONFIG_VAR_REFS
const
int
bit5
=
READ_REF_BIT
(
single_ref_p6
);
#endif // CONFIG_VAR_REFS
if
(
counts
)
++
counts
->
single_ref
[
ctx5
][
5
][
bit5
];
ref_frame
[
0
]
=
bit5
?
ALTREF2_FRAME
:
BWDREF_FRAME
;
}
else
{
ref_frame
[
0
]
=
ALTREF_FRAME
;
}
#else // !CONFIG_ALTREF2
ref_frame
[
0
]
=
bit1
?
ALTREF_FRAME
:
BWDREF_FRAME
;
#endif // CONFIG_ALTREF2
}
else
{
const
int
ctx2
=
av1_get_pred_context_single_ref_p3
(
xd
);
#if CONFIG_VAR_REFS
...
...
av1/decoder/decoder.c
View file @
043c227b
...
...
@@ -232,7 +232,12 @@ aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm,
// cpi->lst3_fb_idx = 2;
// cpi->gld_fb_idx = 3;
// cpi->bwd_fb_idx = 4;
// #if CONFIG_ALTREF2
// cpi->alt2_fb_idx = 5;
// cpi->alt_fb_idx = 6;
// #else // !CONFIG_ALTREF2
// cpi->alt_fb_idx = 5;
// #endif // CONFIG_ALTREF2
// #else // CONFIG_EXT_REFS
// cpi->gld_fb_idx = 1;
// cpi->alt_fb_idx = 2;
...
...
@@ -251,9 +256,16 @@ aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm,
idx
=
cm
->
ref_frame_map
[
3
];
}
else
if
(
ref_frame_flag
==
AOM_BWD_FLAG
)
{
idx
=
cm
->
ref_frame_map
[
4
];
#if CONFIG_ALTREF2
}
else
if
(
ref_frame_flag
==
AOM_ALT2_FLAG
)
{
idx
=
cm
->
ref_frame_map
[
5
];
}
else
if
(
ref_frame_flag
==
AOM_ALT_FLAG
)
{
idx
=
cm
->
ref_frame_map
[
6
];
#else // !CONFIG_ALTREF2
}
else
if
(
ref_frame_flag
==
AOM_ALT_FLAG
)
{
idx
=
cm
->
ref_frame_map
[
5
];
#else
#endif // CONFIG_ALTREF2
#else // !CONFIG_EXT_REFS
}
else
if
(
ref_frame_flag
==
AOM_GOLD_FLAG
)
{
idx
=
cm
->
ref_frame_map
[
1
];
}
else
if
(
ref_frame_flag
==
AOM_ALT_FLAG
)
{
...
...
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