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
6df9ec52
Commit
6df9ec52
authored
Dec 05, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Dec 05, 2013
Browse files
Merge "Cleaning up vp9_get_pred_context_tx_size() function."
parents
bdf3f076
5eeffc9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_pred_common.c
View file @
6df9ec52
...
...
@@ -369,31 +369,22 @@ unsigned char vp9_get_pred_context_single_ref_p2(const MACROBLOCKD *xd) {
// left of the entries corresponding to real blocks.
// The prediction flags in these dummy entries are initialized to 0.
unsigned
char
vp9_get_pred_context_tx_size
(
const
MACROBLOCKD
*
xd
)
{
const
MODE_INFO
*
const
above_mi
=
get_above_mi
(
xd
);
const
MODE_INFO
*
const
left_mi
=
get_left_mi
(
xd
);
const
MB_MODE_INFO
*
const
above_mbmi
=
get_above_mbmi
(
above_mi
);
const
MB_MODE_INFO
*
const
left_mbmi
=
get_left_mbmi
(
left_mi
);
const
int
above_in_image
=
above_mi
!=
NULL
;
const
int
left_in_image
=
left_mi
!=
NULL
;
const
int
max_tx_size
=
max_txsize_lookup
[
xd
->
mi_8x8
[
0
]
->
mbmi
.
sb_type
];
int
above_context
=
max_tx_size
;
int
left_context
=
max_tx_size
;
if
(
above_in_image
)
above_context
=
above_mbmi
->
skip_coeff
?
max_tx_size
:
above_mbmi
->
tx_size
;
if
(
left_in_image
)
left_context
=
left_mbmi
->
skip_coeff
?
max_tx_size
:
left_mbmi
->
tx_size
;
if
(
!
left_in_image
)
left_context
=
above_context
;
const
MB_MODE_INFO
*
const
above_mbmi
=
get_above_mbmi
(
get_above_mi
(
xd
));
const
MB_MODE_INFO
*
const
left_mbmi
=
get_left_mbmi
(
get_left_mi
(
xd
));
const
int
has_above
=
above_mbmi
!=
NULL
;
const
int
has_left
=
left_mbmi
!=
NULL
;
int
above_ctx
=
(
has_above
&&
!
above_mbmi
->
skip_coeff
)
?
above_mbmi
->
tx_size
:
max_tx_size
;
int
left_ctx
=
(
has_left
&&
!
left_mbmi
->
skip_coeff
)
?
left_mbmi
->
tx_size
:
max_tx_size
;
if
(
!
has_left
)
left_ctx
=
above_ctx
;
if
(
!
abov
e_in_imag
e
)
above_c
ontex
t
=
left_c
ontex
t
;
if
(
!
has_
above
)
above_ct
x
=
left_ct
x
;
return
above_c
ontex
t
+
left_c
ontext
>
max_tx_size
;
return
(
above_ct
x
+
left_c
tx
)
>
max_tx_size
;
}
int
vp9_get_segment_id
(
VP9_COMMON
*
cm
,
const
uint8_t
*
segment_ids
,
...
...
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