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
4c10515f
Commit
4c10515f
authored
Jun 26, 2013
by
Jingning Han
Committed by
Gerrit Code Review
Jun 26, 2013
Browse files
Merge "Make update_partition_context faster"
parents
896dc47c
92479d95
Changes
1
Show whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.h
View file @
4c10515f
...
@@ -405,34 +405,15 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
...
@@ -405,34 +405,15 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
int
bwl
=
b_width_log2
(
sb_type
);
int
bwl
=
b_width_log2
(
sb_type
);
int
bhl
=
b_height_log2
(
sb_type
);
int
bhl
=
b_height_log2
(
sb_type
);
int
boffset
=
b_width_log2
(
BLOCK_SIZE_SB64X64
)
-
bsl
;
int
boffset
=
b_width_log2
(
BLOCK_SIZE_SB64X64
)
-
bsl
;
int
i
;
char
pcvalue
[
2
]
=
{
~
(
0xe
<<
boffset
),
~
(
0xf
<<
boffset
)};
assert
(
MAX
(
bwl
,
bhl
)
<=
bsl
);
// update the partition context at the end notes. set partition bits
// update the partition context at the end notes. set partition bits
// of block sizes larger than the current one to be one, and partition
// of block sizes larger than the current one to be one, and partition
// bits of smaller block sizes to be zero.
// bits of smaller block sizes to be zero.
if
((
bwl
==
bsl
)
&&
(
bhl
==
bsl
))
{
vpx_memset
(
xd
->
above_seg_context
,
pcvalue
[
bwl
==
bsl
],
bs
);
for
(
i
=
0
;
i
<
bs
;
i
++
)
vpx_memset
(
xd
->
left_seg_context
,
pcvalue
[
bhl
==
bsl
],
bs
);
xd
->
left_seg_context
[
i
]
=
~
(
0xf
<<
boffset
);
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
above_seg_context
[
i
]
=
~
(
0xf
<<
boffset
);
}
else
if
((
bwl
==
bsl
)
&&
(
bhl
<
bsl
))
{
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
left_seg_context
[
i
]
=
~
(
0xe
<<
boffset
);
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
above_seg_context
[
i
]
=
~
(
0xf
<<
boffset
);
}
else
if
((
bwl
<
bsl
)
&&
(
bhl
==
bsl
))
{
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
left_seg_context
[
i
]
=
~
(
0xf
<<
boffset
);
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
above_seg_context
[
i
]
=
~
(
0xe
<<
boffset
);
}
else
if
((
bwl
<
bsl
)
&&
(
bhl
<
bsl
))
{
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
left_seg_context
[
i
]
=
~
(
0xe
<<
boffset
);
for
(
i
=
0
;
i
<
bs
;
i
++
)
xd
->
above_seg_context
[
i
]
=
~
(
0xe
<<
boffset
);
}
else
{
assert
(
0
);
}
}
}
static
INLINE
int
partition_plane_context
(
MACROBLOCKD
*
xd
,
static
INLINE
int
partition_plane_context
(
MACROBLOCKD
*
xd
,
...
...
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