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
54b5deff
Commit
54b5deff
authored
Dec 02, 2013
by
Dmitry Kovalev
Browse files
Removing token_to_counttoken array.
Change-Id: I02050bcca4c9fd68a00abdea5aba0c3f8993d9a9
parent
e7922a5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/decoder/vp9_detokenize.c
View file @
54b5deff
...
...
@@ -60,16 +60,10 @@ static const vp9_prob cat6_prob[15] = {
254
,
254
,
254
,
252
,
249
,
243
,
230
,
196
,
177
,
153
,
140
,
133
,
130
,
129
,
0
};
static
const
int
token_to_counttoken
[
MAX_ENTROPY_TOKENS
]
=
{
ZERO_TOKEN
,
ONE_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
DCT_EOB_MODEL_TOKEN
};
#define INCREMENT_COUNT(token) \
do { \
if (!cm->frame_parallel_decoding_mode) \
++coef_counts[band][pt][token
_to_counttoken[token]];
\
++coef_counts[band][pt][token
];
\
} while (0)
...
...
@@ -77,7 +71,6 @@ static const int token_to_counttoken[MAX_ENTROPY_TOKENS] = {
{ \
v = (val * dqv) >> dq_shift; \
dqcoeff_ptr[scan[c]] = (vp9_read_bit(r) ? -v : v); \
INCREMENT_COUNT(token); \
token_cache[scan[c]] = vp9_pt_energy_class[token]; \
++c; \
pt = get_coef_context(nb, token_cache, c); \
...
...
@@ -123,8 +116,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
if
(
!
cm
->
frame_parallel_decoding_mode
)
++
eob_branch_count
[
band
][
pt
];
if
(
!
vp9_read
(
r
,
prob
[
EOB_CONTEXT_NODE
]))
{
if
(
!
cm
->
frame_parallel_decoding_mode
)
++
coef_counts
[
band
][
pt
][
DCT_EOB_MODEL_TOKEN
];
INCREMENT_COUNT
(
DCT_EOB_MODEL_TOKEN
);
break
;
}
...
...
@@ -141,12 +133,14 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
// ONE_CONTEXT_NODE_0_
if
(
!
vp9_read
(
r
,
prob
[
ONE_CONTEXT_NODE
]))
{
INCREMENT_COUNT
(
ONE_TOKEN
);
WRITE_COEF_CONTINUE
(
1
,
ONE_TOKEN
);
}
INCREMENT_COUNT
(
TWO_TOKEN
);
prob
=
vp9_pareto8_full
[
prob
[
PIVOT_NODE
]
-
1
];
// LOW_VAL_CONTEXT_NODE_0_
if
(
!
vp9_read
(
r
,
prob
[
LOW_VAL_CONTEXT_NODE
]))
{
if
(
!
vp9_read
(
r
,
prob
[
TWO_CONTEXT_NODE
]))
{
WRITE_COEF_CONTINUE
(
2
,
TWO_TOKEN
);
...
...
@@ -156,7 +150,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
}
WRITE_COEF_CONTINUE
(
4
,
FOUR_TOKEN
);
}
// HIGH_LOW_CONTEXT_NODE_0_
if
(
!
vp9_read
(
r
,
prob
[
HIGH_LOW_CONTEXT_NODE
]))
{
if
(
!
vp9_read
(
r
,
prob
[
CAT_ONE_CONTEXT_NODE
]))
{
val
=
CAT1_MIN_VAL
;
...
...
@@ -168,7 +162,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
ADJUST_COEF
(
CAT2_PROB0
,
0
);
WRITE_COEF_CONTINUE
(
val
,
DCT_VAL_CATEGORY2
);
}
// CAT_THREEFOUR_CONTEXT_NODE_0_
if
(
!
vp9_read
(
r
,
prob
[
CAT_THREEFOUR_CONTEXT_NODE
]))
{
if
(
!
vp9_read
(
r
,
prob
[
CAT_THREE_CONTEXT_NODE
]))
{
val
=
CAT3_MIN_VAL
;
...
...
@@ -184,7 +178,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
ADJUST_COEF
(
CAT4_PROB0
,
0
);
WRITE_COEF_CONTINUE
(
val
,
DCT_VAL_CATEGORY4
);
}
// CAT_FIVE_CONTEXT_NODE_0_:
if
(
!
vp9_read
(
r
,
prob
[
CAT_FIVE_CONTEXT_NODE
]))
{
val
=
CAT5_MIN_VAL
;
ADJUST_COEF
(
CAT5_PROB4
,
4
);
...
...
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