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
e7922a5b
Commit
e7922a5b
authored
Dec 02, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Dec 02, 2013
Browse files
Merge "Cleaning up decode_coefs() function."
parents
8f182a1c
91441112
Changes
1
Show whitespace changes
Inline
Side-by-side
vp9/decoder/vp9_detokenize.c
View file @
e7922a5b
...
...
@@ -93,7 +93,7 @@ static const int token_to_counttoken[MAX_ENTROPY_TOKENS] = {
static
int
decode_coefs
(
VP9_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
,
vp9_reader
*
r
,
int
block_idx
,
PLANE_TYPE
type
,
int
seg
_eob
,
int16_t
*
dqcoeff_ptr
,
PLANE_TYPE
type
,
int
max
_eob
,
int16_t
*
dqcoeff_ptr
,
TX_SIZE
tx_size
,
const
int16_t
*
dq
,
int
pt
,
uint8_t
*
token_cache
)
{
const
FRAME_CONTEXT
*
const
fc
=
&
cm
->
fc
;
...
...
@@ -116,28 +116,27 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
int
v
;
int16_t
dqv
=
dq
[
0
];
while
(
c
<
seg_eob
)
{
while
(
c
<
max_eob
)
{
int
val
;
band
=
*
band_translate
++
;
prob
=
coef_probs
[
band
][
pt
];
if
(
!
cm
->
frame_parallel_decoding_mode
)
++
eob_branch_count
[
band
][
pt
];
if
(
!
vp9_read
(
r
,
prob
[
EOB_CONTEXT_NODE
]))
if
(
!
vp9_read
(
r
,
prob
[
EOB_CONTEXT_NODE
]))
{
if
(
!
cm
->
frame_parallel_decoding_mode
)
++
coef_counts
[
band
][
pt
][
DCT_EOB_MODEL_TOKEN
];
break
;
}
DECODE_ZERO:
if
(
!
vp9_read
(
r
,
prob
[
ZERO_CONTEXT_NODE
]))
{
while
(
!
vp9_read
(
r
,
prob
[
ZERO_CONTEXT_NODE
]))
{
INCREMENT_COUNT
(
ZERO_TOKEN
);
dqv
=
dq
[
1
];
++
c
;
if
(
c
>=
seg
_eob
)
break
;
if
(
c
>=
max
_eob
)
return
c
;
// zero tokens at the end (no eob token)
pt
=
get_coef_context
(
nb
,
token_cache
,
c
);
band
=
*
band_translate
++
;
prob
=
coef_probs
[
band
][
pt
];
goto
DECODE_ZERO
;
}
// ONE_CONTEXT_NODE_0_
...
...
@@ -145,7 +144,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
WRITE_COEF_CONTINUE
(
1
,
ONE_TOKEN
);
}
prob
=
vp9_pareto8_full
[
coef_probs
[
band
][
pt
]
[
PIVOT_NODE
]
-
1
];
prob
=
vp9_pareto8_full
[
prob
[
PIVOT_NODE
]
-
1
];
// LOW_VAL_CONTEXT_NODE_0_
if
(
!
vp9_read
(
r
,
prob
[
LOW_VAL_CONTEXT_NODE
]))
{
...
...
@@ -204,11 +203,6 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
WRITE_COEF_CONTINUE
(
val
,
DCT_VAL_CATEGORY6
);
}
if
(
c
<
seg_eob
)
{
if
(
!
cm
->
frame_parallel_decoding_mode
)
++
coef_counts
[
band
][
pt
][
DCT_EOB_MODEL_TOKEN
];
}
return
c
;
}
...
...
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