Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
d4f2f1dd
Commit
d4f2f1dd
authored
Mar 31, 2015
by
hui su
Committed by
Gerrit Code Review
Mar 31, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Move vp9_coef_con_tree to common/"
parents
db5ec37e
302e24cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
24 deletions
+14
-24
vp9/common/vp9_entropy.c
vp9/common/vp9_entropy.c
+12
-0
vp9/common/vp9_entropy.h
vp9/common/vp9_entropy.h
+1
-0
vp9/decoder/vp9_detokenize.c
vp9/decoder/vp9_detokenize.c
+1
-12
vp9/encoder/vp9_tokenize.c
vp9/encoder/vp9_tokenize.c
+0
-12
No files found.
vp9/common/vp9_entropy.c
View file @
d4f2f1dd
...
...
@@ -15,6 +15,18 @@
#include "vpx_mem/vpx_mem.h"
#include "vpx/vpx_integer.h"
// Unconstrained Node Tree
const
vp9_tree_index
vp9_coef_con_tree
[
TREE_SIZE
(
ENTROPY_TOKENS
)]
=
{
2
,
6
,
// 0 = LOW_VAL
-
TWO_TOKEN
,
4
,
// 1 = TWO
-
THREE_TOKEN
,
-
FOUR_TOKEN
,
// 2 = THREE
8
,
10
,
// 3 = HIGH_LOW
-
CATEGORY1_TOKEN
,
-
CATEGORY2_TOKEN
,
// 4 = CAT_ONE
12
,
14
,
// 5 = CAT_THREEFOUR
-
CATEGORY3_TOKEN
,
-
CATEGORY4_TOKEN
,
// 6 = CAT_THREE
-
CATEGORY5_TOKEN
,
-
CATEGORY6_TOKEN
// 7 = CAT_FIVE
};
const
vp9_prob
vp9_cat1_prob
[]
=
{
159
};
const
vp9_prob
vp9_cat2_prob
[]
=
{
165
,
145
};
const
vp9_prob
vp9_cat3_prob
[]
=
{
173
,
148
,
140
};
...
...
vp9/common/vp9_entropy.h
View file @
d4f2f1dd
...
...
@@ -173,6 +173,7 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
#define PIVOT_NODE 2 // which node is pivot
#define MODEL_NODES (ENTROPY_NODES - UNCONSTRAINED_NODES)
extern
const
vp9_tree_index
vp9_coef_con_tree
[
TREE_SIZE
(
ENTROPY_TOKENS
)];
extern
const
vp9_prob
vp9_pareto8_full
[
COEFF_PROB_MODELS
][
MODEL_NODES
];
typedef
vp9_prob
vp9_coeff_probs_model
[
REF_TYPES
][
COEF_BANDS
]
...
...
vp9/decoder/vp9_detokenize.c
View file @
d4f2f1dd
...
...
@@ -45,17 +45,6 @@ static INLINE int read_coeff(const vp9_prob *probs, int n, vp9_reader *r) {
return
val
;
}
static
const
vp9_tree_index
coeff_subtree_high
[
TREE_SIZE
(
ENTROPY_TOKENS
)]
=
{
2
,
6
,
/* 0 = LOW_VAL */
-
TWO_TOKEN
,
4
,
/* 1 = TWO */
-
THREE_TOKEN
,
-
FOUR_TOKEN
,
/* 2 = THREE */
8
,
10
,
/* 3 = HIGH_LOW */
-
CATEGORY1_TOKEN
,
-
CATEGORY2_TOKEN
,
/* 4 = CAT_ONE */
12
,
14
,
/* 5 = CAT_THREEFOUR */
-
CATEGORY3_TOKEN
,
-
CATEGORY4_TOKEN
,
/* 6 = CAT_THREE */
-
CATEGORY5_TOKEN
,
-
CATEGORY6_TOKEN
/* 7 = CAT_FIVE */
};
static
int
decode_coefs
(
VP9_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
,
FRAME_COUNTS
*
counts
,
PLANE_TYPE
type
,
tran_low_t
*
dqcoeff
,
TX_SIZE
tx_size
,
const
int16_t
*
dq
,
...
...
@@ -147,7 +136,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
val
=
1
;
}
else
{
INCREMENT_COUNT
(
TWO_TOKEN
);
token
=
vp9_read_tree
(
r
,
coeff_subtree_high
,
token
=
vp9_read_tree
(
r
,
vp9_coef_con_tree
,
vp9_pareto8_full
[
prob
[
PIVOT_NODE
]
-
1
]);
switch
(
token
)
{
case
TWO_TOKEN
:
...
...
vp9/encoder/vp9_tokenize.c
View file @
d4f2f1dd
...
...
@@ -65,18 +65,6 @@ const vp9_tree_index vp9_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
-
CATEGORY5_TOKEN
,
-
CATEGORY6_TOKEN
// 10 = CAT_FIVE
};
// Unconstrained Node Tree
const
vp9_tree_index
vp9_coef_con_tree
[
TREE_SIZE
(
ENTROPY_TOKENS
)]
=
{
2
,
6
,
// 0 = LOW_VAL
-
TWO_TOKEN
,
4
,
// 1 = TWO
-
THREE_TOKEN
,
-
FOUR_TOKEN
,
// 2 = THREE
8
,
10
,
// 3 = HIGH_LOW
-
CATEGORY1_TOKEN
,
-
CATEGORY2_TOKEN
,
// 4 = CAT_ONE
12
,
14
,
// 5 = CAT_THREEFOUR
-
CATEGORY3_TOKEN
,
-
CATEGORY4_TOKEN
,
// 6 = CAT_THREE
-
CATEGORY5_TOKEN
,
-
CATEGORY6_TOKEN
// 7 = CAT_FIVE
};
static
const
vp9_tree_index
cat1
[
2
]
=
{
0
,
0
};
static
const
vp9_tree_index
cat2
[
4
]
=
{
2
,
2
,
0
,
0
};
static
const
vp9_tree_index
cat3
[
6
]
=
{
2
,
2
,
4
,
4
,
0
,
0
};
...
...
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