Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Raphael Zumer
aom-rav1e
Commits
77f4697a
Commit
77f4697a
authored
Apr 18, 2013
by
Dmitry Kovalev
Browse files
Fixing member names inside TOKENVALUE and TOKENEXTRA structs.
Change-Id: I183ec5819d4d80966c92db36db75b8c3be0d381d
parent
54f843c8
Changes
6
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_bitstream.c
View file @
77f4697a
...
...
@@ -469,7 +469,7 @@ static void pack_mb_tokens(vp9_writer* const bc,
TOKENEXTRA
*
p
=
*
tp
;
while
(
p
<
stop
)
{
const
int
t
=
p
->
T
oken
;
const
int
t
=
p
->
t
oken
;
const
struct
vp9_token
*
const
a
=
vp9_coef_encodings
+
t
;
const
vp9_extra_bit_struct
*
const
b
=
vp9_extra_bits
+
t
;
int
i
=
0
;
...
...
@@ -497,7 +497,7 @@ static void pack_mb_tokens(vp9_writer* const bc,
if
(
b
->
base_val
)
{
const
int
e
=
p
->
E
xtra
,
L
=
b
->
Len
;
const
int
e
=
p
->
e
xtra
,
L
=
b
->
Len
;
if
(
L
)
{
const
unsigned
char
*
pp
=
b
->
prob
;
...
...
vp9/encoder/vp9_encodeframe.c
View file @
77f4697a
...
...
@@ -870,7 +870,7 @@ static void encode_sb(VP9_COMP *cpi,
update_stats
(
cpi
,
mb_row
,
mb_col
);
cpi
->
partition_count
[
partition_plane
(
bsize
)][
PARTITION_NONE
]
++
;
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
}
#if CONFIG_SBSEGMENT
...
...
@@ -888,7 +888,7 @@ static void encode_sb(VP9_COMP *cpi,
if
(
output_enabled
)
{
update_stats
(
cpi
,
mb_row
,
mb_col
+
i
);
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
}
}
...
...
@@ -906,7 +906,7 @@ static void encode_sb(VP9_COMP *cpi,
if
(
output_enabled
)
{
update_stats
(
cpi
,
mb_row
+
i
,
mb_col
);
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
}
}
...
...
@@ -937,7 +937,7 @@ static void encode_sb(VP9_COMP *cpi,
if
(
output_enabled
)
{
update_stats
(
cpi
,
mb_row
+
y_idx
,
mb_col
+
x_idx
);
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
}
}
...
...
@@ -970,7 +970,7 @@ static void encode_sb64(VP9_COMP *cpi,
1
,
mb_row
,
mb_col
,
bsize
);
update_stats
(
cpi
,
mb_row
,
mb_col
);
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
cpi
->
partition_count
[
partition_plane
(
bsize
)][
PARTITION_NONE
]
++
;
#if CONFIG_SBSEGMENT
...
...
@@ -985,7 +985,7 @@ static void encode_sb64(VP9_COMP *cpi,
1
,
mb_row
,
mb_col
+
i
*
2
,
BLOCK_SIZE_SB32X64
);
update_stats
(
cpi
,
mb_row
,
mb_col
+
i
*
2
);
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
}
}
else
if
(
is_sb
[
0
]
==
BLOCK_SIZE_SB64X32
)
{
...
...
@@ -999,7 +999,7 @@ static void encode_sb64(VP9_COMP *cpi,
1
,
mb_row
+
i
*
2
,
mb_col
,
BLOCK_SIZE_SB64X32
);
update_stats
(
cpi
,
mb_row
+
i
*
2
,
mb_col
);
(
*
tp
)
->
T
oken
=
EOSB_TOKEN
;
(
*
tp
)
->
t
oken
=
EOSB_TOKEN
;
(
*
tp
)
++
;
}
#endif
...
...
vp9/encoder/vp9_encodemb.c
View file @
77f4697a
...
...
@@ -429,7 +429,7 @@ static void optimize_b(VP9_COMMON *const cm,
*
(
tokens
[
eob
]
+
1
)
=
*
(
tokens
[
eob
]
+
0
);
next
=
eob
;
for
(
i
=
0
;
i
<
eob
;
i
++
)
token_cache
[
i
]
=
vp9_dct_value_tokens_ptr
[
qcoeff_ptr
[
scan
[
i
]]].
T
oken
;
token_cache
[
i
]
=
vp9_dct_value_tokens_ptr
[
qcoeff_ptr
[
scan
[
i
]]].
t
oken
;
nb
=
vp9_get_coef_neighbors_handle
(
scan
,
&
pad
);
for
(
i
=
eob
;
i
--
>
i0
;)
{
...
...
@@ -448,7 +448,7 @@ static void optimize_b(VP9_COMMON *const cm,
/* Evaluate the first possibility for this state. */
rate0
=
tokens
[
next
][
0
].
rate
;
rate1
=
tokens
[
next
][
1
].
rate
;
t0
=
(
vp9_dct_value_tokens_ptr
+
x
)
->
T
oken
;
t0
=
(
vp9_dct_value_tokens_ptr
+
x
)
->
t
oken
;
/* Consider both possible successor states. */
if
(
next
<
default_eob
)
{
band
=
get_coef_band
(
scan
,
tx_size
,
i
+
1
);
...
...
@@ -509,7 +509,7 @@ static void optimize_b(VP9_COMMON *const cm,
}
#endif
}
else
{
t0
=
t1
=
(
vp9_dct_value_tokens_ptr
+
x
)
->
T
oken
;
t0
=
t1
=
(
vp9_dct_value_tokens_ptr
+
x
)
->
t
oken
;
}
if
(
next
<
default_eob
)
{
band
=
get_coef_band
(
scan
,
tx_size
,
i
+
1
);
...
...
vp9/encoder/vp9_rdopt.c
View file @
77f4697a
...
...
@@ -516,7 +516,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
#endif
for
(;
c
<
eob
;
c
++
)
{
int
v
=
qcoeff_ptr
[
scan
[
c
]];
int
t
=
vp9_dct_value_tokens_ptr
[
v
].
T
oken
;
int
t
=
vp9_dct_value_tokens_ptr
[
v
].
t
oken
;
#if CONFIG_CODE_NONZEROCOUNT
nzc
+=
(
v
!=
0
);
#endif
...
...
vp9/encoder/vp9_tokenize.c
View file @
77f4697a
...
...
@@ -77,21 +77,21 @@ static void fill_value_tokens() {
while
(
++
j
<
11
&&
e
[
j
].
base_val
<=
a
)
{}
t
[
i
].
T
oken
=
--
j
;
t
[
i
].
t
oken
=
--
j
;
eb
|=
(
a
-
e
[
j
].
base_val
)
<<
1
;
}
else
t
[
i
].
T
oken
=
a
;
t
[
i
].
t
oken
=
a
;
t
[
i
].
E
xtra
=
eb
;
t
[
i
].
e
xtra
=
eb
;
}
// initialize the cost for extra bits for all possible coefficient value.
{
int
cost
=
0
;
vp9_extra_bit_struct
*
p
=
vp9_extra_bits
+
t
[
i
].
T
oken
;
vp9_extra_bit_struct
*
p
=
vp9_extra_bits
+
t
[
i
].
t
oken
;
if
(
p
->
base_val
)
{
const
int
extra
=
t
[
i
].
E
xtra
;
const
int
extra
=
t
[
i
].
e
xtra
;
const
int
Length
=
p
->
Len
;
if
(
Length
)
...
...
@@ -307,8 +307,8 @@ static void tokenize_b(VP9_COMP *cpi,
v
=
qcoeff_ptr
[
rc
];
assert
(
-
DCT_MAX_VALUE
<=
v
&&
v
<
DCT_MAX_VALUE
);
t
->
E
xtra
=
vp9_dct_value_tokens_ptr
[
v
].
E
xtra
;
token
=
vp9_dct_value_tokens_ptr
[
v
].
T
oken
;
t
->
e
xtra
=
vp9_dct_value_tokens_ptr
[
v
].
e
xtra
;
token
=
vp9_dct_value_tokens_ptr
[
v
].
t
oken
;
}
else
{
#if CONFIG_CODE_NONZEROCOUNT
if
(
nzc_used
)
...
...
@@ -318,7 +318,7 @@ static void tokenize_b(VP9_COMP *cpi,
token
=
DCT_EOB_TOKEN
;
}
t
->
T
oken
=
token
;
t
->
t
oken
=
token
;
t
->
context_tree
=
probs
[
type
][
ref
][
band
][
pt
];
#if CONFIG_CODE_NONZEROCOUNT
// Skip zero node if there are no zeros left
...
...
@@ -327,7 +327,7 @@ static void tokenize_b(VP9_COMP *cpi,
else
#endif
t
->
skip_eob_node
=
(
c
>
0
)
&&
(
token_cache
[
c
-
1
]
==
0
);
assert
(
vp9_coef_encodings
[
t
->
T
oken
].
len
-
t
->
skip_eob_node
>
0
);
assert
(
vp9_coef_encodings
[
t
->
t
oken
].
len
-
t
->
skip_eob_node
>
0
);
if
(
!
dry_run
)
{
++
counts
[
type
][
ref
][
band
][
pt
][
token
];
if
(
!
t
->
skip_eob_node
)
...
...
@@ -809,7 +809,7 @@ static void stuff_b(VP9_COMP *cpi,
#endif
pt
=
combine_entropy_contexts
(
a_ec
,
l_ec
);
band
=
0
;
t
->
T
oken
=
DCT_EOB_TOKEN
;
t
->
t
oken
=
DCT_EOB_TOKEN
;
t
->
context_tree
=
probs
[
type
][
ref
][
band
][
pt
];
t
->
skip_eob_node
=
0
;
++
t
;
...
...
vp9/encoder/vp9_tokenize.h
View file @
77f4697a
...
...
@@ -17,14 +17,14 @@
void
vp9_tokenize_initialize
();
typedef
struct
{
int16_t
T
oken
;
int16_t
E
xtra
;
int16_t
t
oken
;
int16_t
e
xtra
;
}
TOKENVALUE
;
typedef
struct
{
const
vp9_prob
*
context_tree
;
int16_t
E
xtra
;
uint8_t
T
oken
;
int16_t
e
xtra
;
uint8_t
t
oken
;
uint8_t
skip_eob_node
;
}
TOKENEXTRA
;
...
...
Write
Preview
Supports
Markdown
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