Skip to content
GitLab
Projects
Groups
Snippets
/
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
f4608e36
Commit
f4608e36
authored
Dec 13, 2012
by
Ronald S. Bultje
Committed by
Gerrit Code Review
Dec 13, 2012
Browse files
Merge "New default coefficient/band probabilities." into experimental
parents
39de1e14
5a5df19d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_default_coef_probs.h
View file @
f4608e36
This diff is collapsed.
Click to expand it.
vp9/encoder/vp9_tokenize.c
View file @
f4608e36
...
...
@@ -563,7 +563,7 @@ static void print_counter(FILE *f, vp9_coeff_accum *context_counters,
fprintf
(
f
,
"static const vp9_coeff_count %s = {
\n
"
,
header
);
#
define Comma(
X) (X? ","
:
"")
#define Comma(X) (X
? ","
:
"")
type
=
0
;
do
{
fprintf
(
f
,
"%s
\n
{ /* block Type %d */"
,
Comma
(
type
),
type
);
...
...
@@ -576,7 +576,7 @@ static void print_counter(FILE *f, vp9_coeff_accum *context_counters,
t
=
0
;
do
{
const
INT64
x
=
context_counters
[
type
]
[
band
]
[
pt
]
[
t
];
const
INT64
x
=
context_counters
[
type
][
band
][
pt
][
t
];
const
int
y
=
(
int
)
x
;
assert
(
x
==
(
INT64
)
y
);
/* no overflow handling yet */
...
...
@@ -595,17 +595,20 @@ static void print_probs(FILE *f, vp9_coeff_accum *context_counters,
int
block_types
,
const
char
*
header
)
{
int
type
,
band
,
pt
,
t
;
fprintf
(
f
,
"static const vp9_coeff_probs %s = {
\n
"
,
header
);
fprintf
(
f
,
"static const vp9_coeff_probs %s = {"
,
header
);
type
=
0
;
#define Newline(x, spaces) (x ? " " : "\n" spaces)
do
{
fprintf
(
f
,
"%s
\n
{ /* block Type %d */"
,
Comma
(
type
),
type
);
fprintf
(
f
,
"%s%s{ /* block Type %d */"
,
Comma
(
type
),
Newline
(
type
,
" "
),
type
);
band
=
0
;
do
{
fprintf
(
f
,
"%s
\n
{ /* Coeff Band %d */"
,
Comma
(
band
),
band
);
fprintf
(
f
,
"%s%s{ /* Coeff Band %d */"
,
Comma
(
band
),
Newline
(
band
,
" "
),
band
);
pt
=
0
;
do
{
unsigned
int
branch_ct
[
ENTROPY_NODES
]
[
2
];
unsigned
int
branch_ct
[
ENTROPY_NODES
][
2
];
unsigned
int
coef_counts
[
MAX_ENTROPY_TOKENS
];
vp9_prob
coef_probs
[
ENTROPY_NODES
];
...
...
@@ -618,10 +621,10 @@ static void print_probs(FILE *f, vp9_coeff_accum *context_counters,
t
=
0
;
do
{
fprintf
(
f
,
"%s %d"
,
Comma
(
t
),
coef_probs
[
t
]);
fprintf
(
f
,
"%s %
3
d"
,
Comma
(
t
),
coef_probs
[
t
]);
}
while
(
++
t
<
ENTROPY_NODES
);
fprintf
(
f
,
"}"
);
fprintf
(
f
,
"
}"
);
}
while
(
++
pt
<
PREV_COEF_CONTEXTS
);
fprintf
(
f
,
"
\n
}"
);
}
while
(
++
band
<
COEF_BANDS
);
...
...
@@ -656,20 +659,20 @@ void print_context_counters() {
/* print coefficient probabilities */
print_probs
(
f
,
context_counters_4x4
,
BLOCK_TYPES_4X4
,
"
vp9_
default_coef_probs_4x4[BLOCK_TYPES_4X4]"
);
"default_coef_probs_4x4[BLOCK_TYPES_4X4]"
);
print_probs
(
f
,
hybrid_context_counters_4x4
,
BLOCK_TYPES_4X4
,
"
vp9_
default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]"
);
"default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]"
);
print_probs
(
f
,
context_counters_8x8
,
BLOCK_TYPES_8X8
,
"
vp9_
default_coef_probs_8x8[BLOCK_TYPES_8X8]"
);
"default_coef_probs_8x8[BLOCK_TYPES_8X8]"
);
print_probs
(
f
,
hybrid_context_counters_8x8
,
BLOCK_TYPES_8X8
,
"
vp9_
default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]"
);
"default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]"
);
print_probs
(
f
,
context_counters_16x16
,
BLOCK_TYPES_16X16
,
"
vp9_
default_coef_probs_16x16[BLOCK_TYPES_16X16]"
);
"default_coef_probs_16x16[BLOCK_TYPES_16X16]"
);
print_probs
(
f
,
hybrid_context_counters_16x16
,
BLOCK_TYPES_16X16
,
"
vp9_
default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]"
);
"default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]"
);
#if CONFIG_TX32X32
print_probs
(
f
,
context_counters_32x32
,
BLOCK_TYPES_32X32
,
"
vp9_
default_coef_probs_32x32[BLOCK_TYPES_32X32]"
);
"default_coef_probs_32x32[BLOCK_TYPES_32X32]"
);
#endif
fclose
(
f
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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