Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
3eb1f070
Commit
3eb1f070
authored
Nov 17, 2016
by
Jingning Han
Browse files
Use masked mi_row and mi_col to decide relative position
Change-Id: Ibc9e904ba9e82d6ab638d88404847da7fc9fcce9
parent
b8069f9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
av1/common/mvref_common.c
View file @
3eb1f070
...
...
@@ -252,20 +252,21 @@ static uint8_t scan_blk_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
static
int
has_top_right
(
const
MACROBLOCKD
*
xd
,
int
mi_row
,
int
mi_col
,
int
bs
)
{
const
int
mask_row
=
mi_row
&
MAX_MIB_MASK
;
const
int
mask_col
=
mi_col
&
MAX_MIB_MASK
;
// In a split partition all apart from the bottom right has a top right
int
has_tr
=
!
((
m
i
_row
&
bs
)
&&
(
m
i
_col
&
bs
));
int
has_tr
=
!
((
m
ask
_row
&
bs
)
&&
(
m
ask
_col
&
bs
));
// bs > 0 and bs is a power of 2
assert
(
bs
>
0
&&
!
(
bs
&
(
bs
-
1
)));
if
((
mi_row
&
MAX_MIB_MASK
)
==
0
)
return
has_tr
;
// For each 4x4 group of blocks, when the bottom right is decoded the blocks
// to the right have not been decoded therefore the bottom right does
// not have a top right
while
(
bs
<
MAX_MIB_SIZE
)
{
if
(
m
i
_col
&
bs
)
{
if
((
m
i
_col
&
(
2
*
bs
))
&&
(
m
i
_row
&
(
2
*
bs
)))
{
if
(
m
ask
_col
&
bs
)
{
if
((
m
ask
_col
&
(
2
*
bs
))
&&
(
m
ask
_row
&
(
2
*
bs
)))
{
has_tr
=
0
;
break
;
}
...
...
@@ -289,7 +290,7 @@ static int has_top_right(const MACROBLOCKD *xd, int mi_row, int mi_col,
// The bottom left square of a Vertical A does not have a top right as it is
// decoded before the right hand rectangle of the partition
if
(
xd
->
mi
[
0
]
->
mbmi
.
partition
==
PARTITION_VERT_A
)
if
((
m
i
_row
&
bs
)
&&
!
(
m
i
_col
&
bs
))
has_tr
=
0
;
if
((
m
ask
_row
&
bs
)
&&
!
(
m
ask
_col
&
bs
))
has_tr
=
0
;
#endif // CONFIG_EXT_PARTITION_TYPES
return
has_tr
;
...
...
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