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
Yushin Cho
aom-rav1e
Commits
8282c1a6
Commit
8282c1a6
authored
Nov 13, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Nov 13, 2013
Browse files
Merge "Cleaning up decode_coefs() function."
parents
697846d7
11631fec
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/decoder/vp9_detokenize.c
View file @
8282c1a6
...
...
@@ -67,27 +67,27 @@ static const int token_to_counttoken[MAX_ENTROPY_TOKENS] = {
TWO_TOKEN
,
TWO_TOKEN
,
TWO_TOKEN
,
DCT_EOB_MODEL_TOKEN
};
#define INCREMENT_COUNT(token) \
do { \
if (!cm->frame_parallel_decoding_mode)
{
\
#define INCREMENT_COUNT(token)
\
do {
\
if (!cm->frame_parallel_decoding_mode)
\
++coef_counts[band][pt][token_to_counttoken[token]]; \
}
\
} while (0);
}
while (0)
#define WRITE_COEF_CONTINUE(val, token) \
{ \
dqcoeff_ptr[scan[c]] = vp9_read_
and_apply_sign(r,
val) * \
dqcoeff_ptr[scan[c]] =
(
vp9_read_
bit(r) ? -val :
val) * \
dq[c > 0] / (1 + (tx_size == TX_32X32)); \
INCREMENT_COUNT(token); \
token_cache[scan[c]] = vp9_pt_energy_class[token]; \
c
++; \
++
c
; \
continue; \
}
#define ADJUST_COEF(prob, bits_count) \
do { \
val += (vp9_read(r, prob) << bits_count); \
} while (0)
;
} while (0)
static
int
decode_coefs
(
VP9_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
,
vp9_reader
*
r
,
int
block_idx
,
...
...
@@ -201,10 +201,10 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
}
val
=
0
;
cat6
=
cat6_prob
;
while
(
*
cat6
)
{
while
(
*
cat6
)
val
=
(
val
<<
1
)
|
vp9_read
(
r
,
*
cat6
++
);
}
val
+=
CAT6_MIN_VAL
;
WRITE_COEF_CONTINUE
(
val
,
DCT_VAL_CATEGORY6
);
}
...
...
vp9/decoder/vp9_treereader.h
View file @
8282c1a6
...
...
@@ -15,8 +15,6 @@
#include "vp9/common/vp9_treecoder.h"
#include "vp9/decoder/vp9_dboolhuff.h"
#define vp9_read_and_apply_sign(r, value) (vp9_read_bit(r) ? -(value) : (value))
// Intent of tree data structure is to make decoding trivial.
static
int
treed_read
(
vp9_reader
*
const
r
,
/* !!! must return a 0 or 1 !!! */
vp9_tree
t
,
...
...
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