Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
cd539518
Commit
cd539518
authored
May 16, 2017
by
Nathan E. Egge
Committed by
Nathan Egge
May 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace EC_MULTISYMBOL with DAALA_EC || ANS.
Change-Id: Ia0eb3a3694fdbe9d33548ff4014b704b2f3db86a
parent
2e300633
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
287 additions
and
288 deletions
+287
-288
aom_dsp/bitreader.h
aom_dsp/bitreader.h
+7
-10
aom_dsp/bitwriter.h
aom_dsp/bitwriter.h
+8
-11
aom_dsp/prob.c
aom_dsp/prob.c
+4
-4
aom_dsp/prob.h
aom_dsp/prob.h
+4
-4
av1/common/entropy.c
av1/common/entropy.c
+17
-17
av1/common/entropy.h
av1/common/entropy.h
+6
-6
av1/common/entropymode.c
av1/common/entropymode.c
+18
-18
av1/common/entropymode.h
av1/common/entropymode.h
+13
-13
av1/common/entropymv.c
av1/common/entropymv.c
+17
-17
av1/common/entropymv.h
av1/common/entropymv.h
+7
-7
av1/common/onyxc_int.h
av1/common/onyxc_int.h
+2
-2
av1/common/seg_common.h
av1/common/seg_common.h
+2
-2
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+15
-15
av1/decoder/decodemv.c
av1/decoder/decodemv.c
+51
-51
av1/decoder/decoder.c
av1/decoder/decoder.c
+2
-2
av1/decoder/detokenize.c
av1/decoder/detokenize.c
+6
-6
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+52
-52
av1/encoder/encodemb.c
av1/encoder/encodemb.c
+2
-2
av1/encoder/encodemv.c
av1/encoder/encodemv.c
+6
-6
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+20
-20
av1/encoder/tokenize.c
av1/encoder/tokenize.c
+12
-12
av1/encoder/tokenize.h
av1/encoder/tokenize.h
+4
-4
configure
configure
+12
-7
No files found.
aom_dsp/bitreader.h
View file @
cd539518
...
...
@@ -16,8 +16,9 @@
#include <limits.h>
#include "./aom_config.h"
#if CONFIG_EC_ADAPT && !CONFIG_EC_MULTISYMBOL
#error "CONFIG_EC_ADAPT is enabled without enabling CONFIG_EC_MULTISYMBOL."
#if CONFIG_EC_ADAPT && !(CONFIG_DAALA_EC || CONFIG_ANS)
#error \
"CONFIG_EC_ADAPT is enabled without either CONFIG_DAALA_EC or CONFIG_ANS."
#endif
#include "aom/aomdx.h"
...
...
@@ -203,19 +204,15 @@ static INLINE int aom_read_tree_as_bits(aom_reader *r,
return
-
i
;
}
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
INLINE
int
aom_read_cdf_
(
aom_reader
*
r
,
const
aom_cdf_prob
*
cdf
,
int
nsymbs
ACCT_STR_PARAM
)
{
int
ret
;
#if CONFIG_ANS
(
void
)
nsymbs
;
ret
=
rans_read
(
r
,
cdf
);
#elif CONFIG_DAALA_EC
ret
=
daala_read_symbol
(
r
,
cdf
,
nsymbs
);
#else
#error \
"CONFIG_EC_MULTISYMBOL is selected without a valid backing entropy " \
"coder. Enable daala_ec or ans for a valid configuration."
ret
=
daala_read_symbol
(
r
,
cdf
,
nsymbs
);
#endif
#if CONFIG_ACCOUNTING
...
...
@@ -253,12 +250,12 @@ static INLINE int aom_read_tree_as_cdf(aom_reader *r,
}
while
(
i
>
0
);
return
-
i
;
}
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
static
INLINE
int
aom_read_tree_
(
aom_reader
*
r
,
const
aom_tree_index
*
tree
,
const
aom_prob
*
probs
ACCT_STR_PARAM
)
{
int
ret
;
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
ret
=
aom_read_tree_as_cdf
(
r
,
tree
,
probs
);
#else
ret
=
aom_read_tree_as_bits
(
r
,
tree
,
probs
);
...
...
aom_dsp/bitwriter.h
View file @
cd539518
...
...
@@ -14,8 +14,9 @@
#include <assert.h>
#include "./aom_config.h"
#if CONFIG_EC_ADAPT && !CONFIG_EC_MULTISYMBOL
#error "CONFIG_EC_ADAPT is enabled without enabling CONFIG_EC_MULTISYMBOL"
#if CONFIG_EC_ADAPT && !(CONFIG_DAALA_EC || CONFIG_ANS)
#error \
"CONFIG_EC_ADAPT is enabled without either CONFIG_DAALA_EC of CONFIG_ANS."
#endif
#if CONFIG_ANS
...
...
@@ -158,7 +159,7 @@ static INLINE void aom_write_tree_as_bits_record(
}
while
(
len
);
}
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
INLINE
void
aom_write_cdf
(
aom_writer
*
w
,
int
symb
,
const
aom_cdf_prob
*
cdf
,
int
nsymbs
)
{
#if CONFIG_ANS
...
...
@@ -167,12 +168,8 @@ static INLINE void aom_write_cdf(aom_writer *w, int symb,
const
aom_cdf_prob
cum_prob
=
symb
>
0
?
cdf
[
symb
-
1
]
:
0
;
const
aom_cdf_prob
prob
=
cdf
[
symb
]
-
cum_prob
;
buf_rans_write
(
w
,
cum_prob
,
prob
);
#elif CONFIG_DAALA_EC
daala_write_symbol
(
w
,
symb
,
cdf
,
nsymbs
);
#else
#error \
"CONFIG_EC_MULTISYMBOL is selected without a valid backing entropy " \
"coder. Enable daala_ec or ans for a valid configuration."
daala_write_symbol
(
w
,
symb
,
cdf
,
nsymbs
);
#endif
}
...
...
@@ -223,12 +220,12 @@ static INLINE void aom_write_tree_as_cdf(aom_writer *w,
}
while
(
len
);
}
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
static
INLINE
void
aom_write_tree
(
aom_writer
*
w
,
const
aom_tree_index
*
tree
,
const
aom_prob
*
probs
,
int
bits
,
int
len
,
aom_tree_index
i
)
{
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
aom_write_tree_as_cdf
(
w
,
tree
,
probs
,
bits
,
len
,
i
);
#else
aom_write_tree_as_bits
(
w
,
tree
,
probs
,
bits
,
len
,
i
);
...
...
@@ -240,7 +237,7 @@ static INLINE void aom_write_tree_record(aom_writer *w,
const
aom_prob
*
probs
,
int
bits
,
int
len
,
aom_tree_index
i
,
TOKEN_STATS
*
token_stats
)
{
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
(
void
)
token_stats
;
aom_write_tree_as_cdf
(
w
,
tree
,
probs
,
bits
,
len
,
i
);
#else
...
...
aom_dsp/prob.c
View file @
cd539518
...
...
@@ -11,9 +11,9 @@
#include "./aom_config.h"
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
#include <string.h>
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#include "aom_dsp/prob.h"
...
...
@@ -53,7 +53,7 @@ void aom_tree_merge_probs(const aom_tree_index *tree, const aom_prob *pre_probs,
tree_merge_probs_impl
(
0
,
tree
,
pre_probs
,
counts
,
probs
);
}
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
typedef
struct
tree_node
tree_node
;
struct
tree_node
{
...
...
@@ -233,4 +233,4 @@ void av1_indices_from_tree(int *ind, int *inv, const aom_tree_index *tree) {
int
stack_index
=
0
;
tree_to_index
(
&
stack_index
,
ind
,
inv
,
tree
,
0
,
0
);
}
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
aom_dsp/prob.h
View file @
cd539518
...
...
@@ -33,9 +33,9 @@ typedef uint8_t aom_prob;
// TODO(negge): Rename this aom_prob once we remove vpxbool.
typedef
uint16_t
aom_cdf_prob
;
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
#define CDF_SIZE(x) ((x) + 1)
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#define CDF_PROB_BITS 15
#define CDF_PROB_TOP (1 << CDF_PROB_BITS)
...
...
@@ -117,7 +117,7 @@ static INLINE aom_prob mode_mv_merge_probs(aom_prob pre_prob,
void
aom_tree_merge_probs
(
const
aom_tree_index
*
tree
,
const
aom_prob
*
pre_probs
,
const
unsigned
int
*
counts
,
aom_prob
*
probs
);
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
int
tree_to_cdf
(
const
aom_tree_index
*
tree
,
const
aom_prob
*
probs
,
aom_tree_index
root
,
aom_cdf_prob
*
cdf
,
aom_tree_index
*
ind
,
int
*
pth
,
int
*
len
);
...
...
@@ -150,7 +150,7 @@ static INLINE void av1_tree_to_cdf(const aom_tree_index *tree,
} while (0)
void
av1_indices_from_tree
(
int
*
ind
,
int
*
inv
,
const
aom_tree_index
*
tree
);
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
DECLARE_ALIGNED
(
16
,
extern
const
uint8_t
,
aom_norm
[
256
]);
...
...
av1/common/entropy.c
View file @
cd539518
...
...
@@ -627,7 +627,7 @@ const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = {
// The full source code of the generating program is available in:
// tools/gen_constrained_tokenset.py
//
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
// Values for tokens TWO_TOKEN through CATEGORY6_TOKEN included
// in the table here : the ONE_TOKEN probability is
// removed and the probabilities rescaled.
...
...
@@ -891,7 +891,7 @@ const aom_cdf_prob av1_pareto8_tail_probs[COEFF_PROB_MODELS][TAIL_NODES] = {
{
31131
,
1448
,
152
,
31
,
2
,
1
,
1
,
1
,
1
},
{
31486
,
1150
,
107
,
20
,
1
,
1
,
1
,
1
,
1
},
};
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
/* clang-format off */
#if CONFIG_Q_ADAPT_PROBS
...
...
@@ -3563,7 +3563,7 @@ default_qctx_coef_probs[QCTX_BINS][TX_SIZES][PLANE_TYPES] = {
},
};
#else
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
const
av1_coeff_probs_model
default_coef_probs_4x4
[
PLANE_TYPES
]
=
{
{
// Y plane
{
// Intra
...
...
@@ -3988,7 +3988,7 @@ static const av1_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = {
}
}
};
#else // CONFIG_
EC_MULTISYMBOL
#else // CONFIG_
DAALA_EC || CONFIG_ANS
static
const
av1_coeff_probs_model
default_coef_probs_4x4
[
PLANE_TYPES
]
=
{
{
// Y plane
{
// Intra
...
...
@@ -4324,7 +4324,7 @@ static const av1_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = {
}
}
};
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#if CONFIG_TX64X64
// FIXME. Optimize for EC_MULTISYMBOL
...
...
@@ -4413,7 +4413,7 @@ static const av1_coeff_probs_model default_coef_probs_64x64[PLANE_TYPES] = {
};
#endif // CONFIG_TX64X64
#endif // CONFIG_Q_ADAPT_PROBS
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
const
aom_prob
av1_default_blockzero_probs
[
TX_SIZES
][
PLANE_TYPES
]
[
REF_TYPES
][
BLOCKZ_CONTEXTS
]
=
{
{
// TX_4x4
...
...
@@ -5654,7 +5654,7 @@ static const coeff_cdf_model default_coef_head_cdf_32x32[PLANE_TYPES] = {
{
AOM_ICDF
(
3009
),
AOM_ICDF
(
3246
),
AOM_ICDF
(
10158
),
AOM_ICDF
(
10533
),
AOM_ICDF
(
32768
)
}
}
}
}
};
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
/* clang-format on */
...
...
@@ -5669,7 +5669,7 @@ void av1_model_to_full_probs(const aom_prob *model, aom_prob *full) {
extend_to_full_distribution
(
&
full
[
UNCONSTRAINED_NODES
],
model
[
PIVOT_NODE
]);
}
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
void
build_tail_cdfs
(
aom_cdf_prob
cdf_tail
[
CDF_SIZE
(
ENTROPY_TOKENS
)],
aom_cdf_prob
cdf_head
[
CDF_SIZE
(
ENTROPY_TOKENS
)],
...
...
@@ -5825,7 +5825,7 @@ void av1_coef_pareto_cdfs(FRAME_CONTEXT *fc) {
build_tail_cdfs
(
fc
->
coef_tail_cdfs
[
t
][
i
][
j
][
k
][
l
],
fc
->
coef_head_cdfs
[
t
][
i
][
j
][
k
][
l
],
k
==
0
);
}
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
void
av1_default_coef_probs
(
AV1_COMMON
*
cm
)
{
#if CONFIG_Q_ADAPT_PROBS
...
...
@@ -5844,12 +5844,12 @@ void av1_default_coef_probs(AV1_COMMON *cm) {
av1_copy
(
cm
->
fc
->
coef_probs
[
TX_64X64
],
default_coef_probs_64x64
);
#endif // CONFIG_TX64X64
#endif // CONFIG_Q_ADAPT_PROBS
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
av1_copy
(
cm
->
fc
->
blockzero_probs
,
av1_default_blockzero_probs
);
/* Load the head tokens */
av1_default_coef_cdfs
(
cm
->
fc
);
av1_coef_pareto_cdfs
(
cm
->
fc
);
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
}
#if !CONFIG_LV_MAP
...
...
@@ -5864,13 +5864,13 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size,
const
unsigned
int
(
*
eob_counts
)[
REF_TYPES
][
COEF_BANDS
][
COEFF_CONTEXTS
]
=
(
const
unsigned
int
(
*
)[
REF_TYPES
][
COEF_BANDS
][
COEFF_CONTEXTS
])
cm
->
counts
.
eob_branch
[
tx_size
];
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
const
av1_blockz_probs_model
*
const
pre_blockz_probs
=
pre_fc
->
blockzero_probs
[
tx_size
];
av1_blockz_probs_model
*
const
blockz_probs
=
cm
->
fc
->
blockzero_probs
[
tx_size
];
const
av1_blockz_count_model
*
const
blockz_counts
=
(
const
av1_blockz_count_model
*
)
&
cm
->
counts
.
blockz_count
[
tx_size
][
0
];
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
int
i
,
j
,
k
,
l
,
m
;
#if CONFIG_RECT_TX
assert
(
!
is_rect_tx
(
tx_size
));
...
...
@@ -5893,7 +5893,7 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size,
count_sat
,
update_factor
);
}
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
for
(
i
=
0
;
i
<
PLANE_TYPES
;
++
i
)
{
for
(
j
=
0
;
j
<
REF_TYPES
;
++
j
)
{
for
(
k
=
0
;
k
<
BLOCKZ_CONTEXTS
;
++
k
)
{
...
...
@@ -5905,7 +5905,7 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size,
}
}
}
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
}
#endif // !CONFIG_LV_MAP
...
...
@@ -5963,10 +5963,10 @@ void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
aom_cdf_prob
*
fc_cdf_ptr
;
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
AVERAGE_TILE_CDFS
(
coef_head_cdfs
)
AVERAGE_TILE_CDFS
(
coef_tail_cdfs
)
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
}
void
av1_average_tile_mv_cdfs
(
FRAME_CONTEXT
*
fc
,
FRAME_CONTEXT
*
ec_ctxs
[],
...
...
av1/common/entropy.h
View file @
cd539518
...
...
@@ -45,7 +45,7 @@ extern "C" {
#define CATEGORY5_TOKEN 9 // 35-66 Extra Bits 5+1
#define CATEGORY6_TOKEN 10 // 67+ Extra Bits 14+1
#define EOB_TOKEN 11 // EOB Extra Bits 0+0
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
#define NO_EOB 0 // Not an end-of-block
#define EARLY_EOB 1 // End of block before the last position
#define LAST_EOB 2 // End of block in the last position (implicit)
...
...
@@ -56,7 +56,7 @@ extern "C" {
#define ONE_TOKEN_NEOB 2
#define TWO_TOKEN_PLUS_EOB 3
#define TWO_TOKEN_PLUS_NEOB 4
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#define ENTROPY_TOKENS 12
#define ENTROPY_NODES 11
...
...
@@ -171,9 +171,9 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
distinct bands). */
#define COEFF_CONTEXTS 6
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
#define BLOCKZ_CONTEXTS 3
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#define COEFF_CONTEXTS0 3 // for band 0
#define BAND_COEFF_CONTEXTS(band) \
((band) == 0 ? COEFF_CONTEXTS0 : COEFF_CONTEXTS)
...
...
@@ -243,7 +243,7 @@ typedef unsigned int av1_coeff_count_model[REF_TYPES][COEF_BANDS]
void
av1_model_to_full_probs
(
const
aom_prob
*
model
,
aom_prob
*
full
);
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
typedef
aom_cdf_prob
coeff_cdf_model
[
REF_TYPES
][
COEF_BANDS
][
COEFF_CONTEXTS
]
[
CDF_SIZE
(
ENTROPY_TOKENS
)];
typedef
aom_prob
av1_blockz_probs_model
[
REF_TYPES
][
BLOCKZ_CONTEXTS
];
...
...
@@ -256,7 +256,7 @@ struct frame_contexts;
void
av1_coef_head_cdfs
(
struct
frame_contexts
*
fc
);
void
av1_coef_pareto_cdfs
(
struct
frame_contexts
*
fc
);
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
typedef
char
ENTROPY_CONTEXT
;
...
...
av1/common/entropymode.c
View file @
cd539518
...
...
@@ -1173,22 +1173,22 @@ static const aom_prob default_obmc_prob[BLOCK_SIZES] = {
#if CONFIG_DELTA_Q
static
const
aom_prob
default_delta_q_probs
[
DELTA_Q_PROBS
]
=
{
220
,
220
,
220
};
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
const
aom_cdf_prob
default_delta_q_cdf
[
CDF_SIZE
(
DELTA_Q_PROBS
+
1
)]
=
{
AOM_ICDF
(
28160
),
AOM_ICDF
(
32120
),
AOM_ICDF
(
32677
),
AOM_ICDF
(
32768
),
0
};
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#if CONFIG_EXT_DELTA_Q
static
const
aom_prob
default_delta_lf_probs
[
DELTA_LF_PROBS
]
=
{
220
,
220
,
220
};
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
static
const
aom_cdf_prob
default_delta_lf_cdf
[
CDF_SIZE
(
DELTA_LF_PROBS
+
1
)]
=
{
AOM_ICDF
(
28160
),
AOM_ICDF
(
32120
),
AOM_ICDF
(
32677
),
AOM_ICDF
(
32768
),
0
};
#endif // CONFIG_DAALA_EC || CONFIG_ANS
#endif
#endif
#endif
#if CONFIG_EC_MULTISYMBOL
#if CONFIG_DAALA_EC || CONFIG_ANS
int
av1_intra_mode_ind
[
INTRA_MODES
];
int
av1_intra_mode_inv
[
INTRA_MODES
];
int
av1_inter_mode_ind
[
INTER_MODES
];
...
...
@@ -1199,7 +1199,7 @@ int av1_ext_tx_intra_inv[EXT_TX_SETS_INTRA][TX_TYPES];
int
av1_ext_tx_inter_ind
[
EXT_TX_SETS_INTER
][
TX_TYPES
];
int
av1_ext_tx_inter_inv
[
EXT_TX_SETS_INTER
][
TX_TYPES
];
#endif
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#if CONFIG_ALT_INTRA
#if CONFIG_SMOOTH_HV
...
...
@@ -2150,10 +2150,10 @@ const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
-
INTRA_FILTER_LINEAR
,
2
,
-
INTRA_FILTER_8TAP
,
4
,
-
INTRA_FILTER_8TAP_SHARP
,
-
INTRA_FILTER_8TAP_SMOOTH
,
};
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
int
av1_intra_filter_ind
[
INTRA_FILTERS
];
int
av1_intra_filter_inv
[
INTRA_FILTERS
];
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
#if CONFIG_FILTER_INTRA
...
...
@@ -2189,7 +2189,7 @@ static const aom_prob default_segment_pred_probs[PREDICTION_PROBS] = {
};
// clang-format on
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
#if CONFIG_DUAL_FILTER
static
const
aom_cdf_prob
default_switchable_interp_cdf
[
SWITCHABLE_FILTER_CONTEXTS
][
CDF_SIZE
(
...
...
@@ -4315,7 +4315,7 @@ const aom_cdf_prob
AOM_ICDF
(
30393
),
AOM_ICDF
(
32768
),
0
}
},
#endif // CONFIG_ALT_INTRA
};
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
static
void
init_mode_probs
(
FRAME_CONTEXT
*
fc
)
{
av1_copy
(
fc
->
uv_mode_prob
,
default_uv_probs
);
...
...
@@ -4390,7 +4390,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#if CONFIG_LOOP_RESTORATION
av1_copy
(
fc
->
switchable_restore_prob
,
default_switchable_restore_prob
);
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
av1_copy
(
fc
->
y_mode_cdf
,
default_if_y_mode_cdf
);
av1_copy
(
fc
->
uv_mode_cdf
,
default_uv_mode_cdf
);
av1_copy
(
fc
->
switchable_interp_cdf
,
default_switchable_interp_cdf
);
...
...
@@ -4403,17 +4403,17 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
av1_copy
(
fc
->
seg
.
tree_cdf
,
default_seg_tree_cdf
);
av1_copy
(
fc
->
tx_size_cdf
,
default_tx_size_cdf
);
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#if CONFIG_DELTA_Q
av1_copy
(
fc
->
delta_q_prob
,
default_delta_q_probs
);
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
av1_copy
(
fc
->
delta_q_cdf
,
default_delta_q_cdf
);
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#if CONFIG_EXT_DELTA_Q
av1_copy
(
fc
->
delta_lf_prob
,
default_delta_lf_probs
);
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
av1_copy
(
fc
->
delta_lf_cdf
,
default_delta_lf_cdf
);
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#endif
#endif // CONFIG_DELTA_Q
#if CONFIG_CFL
...
...
@@ -4421,7 +4421,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#endif
}
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
int
av1_switchable_interp_ind
[
SWITCHABLE_FILTERS
];
int
av1_switchable_interp_inv
[
SWITCHABLE_FILTERS
];
...
...
@@ -4522,7 +4522,7 @@ void av1_set_mode_cdfs(struct AV1Common *cm) {
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
}
#endif // !CONFIG_EC_ADAPT
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#if CONFIG_DUAL_FILTER
const
aom_tree_index
av1_switchable_interp_tree
[
TREE_SIZE
(
SWITCHABLE_FILTERS
)]
=
...
...
av1/common/entropymode.h
View file @
cd539518
...
...
@@ -99,11 +99,11 @@ typedef struct frame_contexts {
aom_prob
partition_prob
[
PARTITION_CONTEXTS
][
PARTITION_TYPES
-
1
];
#endif
av1_coeff_probs_model
coef_probs
[
TX_SIZES
][
PLANE_TYPES
];
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
coeff_cdf_model
coef_tail_cdfs
[
TX_SIZES
][
PLANE_TYPES
];
coeff_cdf_model
coef_head_cdfs
[
TX_SIZES
][
PLANE_TYPES
];
aom_prob
blockzero_probs
[
TX_SIZES
][
PLANE_TYPES
][
REF_TYPES
][
BLOCKZ_CONTEXTS
];
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
aom_prob
switchable_interp_prob
[
SWITCHABLE_FILTER_CONTEXTS
]
[
SWITCHABLE_FILTERS
-
1
];
#if CONFIG_ADAPT_SCAN
...
...
@@ -260,7 +260,7 @@ typedef struct frame_contexts {
#if CONFIG_LOOP_RESTORATION
aom_prob
switchable_restore_prob
[
RESTORE_SWITCHABLE_TYPES
-
1
];
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
aom_cdf_prob
y_mode_cdf
[
BLOCK_SIZE_GROUPS
][
CDF_SIZE
(
INTRA_MODES
)];
aom_cdf_prob
uv_mode_cdf
[
INTRA_MODES
][
CDF_SIZE
(
INTRA_MODES
)];
#if CONFIG_EXT_PARTITION_TYPES
...
...
@@ -294,7 +294,7 @@ typedef struct frame_contexts {
#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
aom_cdf_prob
intra_filter_cdf
[
INTRA_FILTERS
+
1
][
CDF_SIZE
(
INTRA_FILTERS
)];
#endif // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
#endif // CONFIG_
EC_MULTISYMBOL
#endif // CONFIG_
DAALA_EC || CONFIG_ANS
#if CONFIG_DELTA_Q
aom_prob
delta_q_prob
[
DELTA_Q_PROBS
];
#if CONFIG_EXT_DELTA_Q
...
...
@@ -356,9 +356,9 @@ typedef struct FRAME_COUNTS {
unsigned
int
coeff_lps
[
TX_SIZES
][
PLANE_TYPES
][
LEVEL_CONTEXTS
][
2
];
#endif // CONFIG_LV_MAP
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
av1_blockz_count_model
blockz_count
[
TX_SIZES
][
PLANE_TYPES
];
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
unsigned
int
newmv_mode
[
NEWMV_MODE_CONTEXTS
][
2
];
unsigned
int
zeromv_mode
[
ZEROMV_MODE_CONTEXTS
][
2
];
...
...
@@ -450,11 +450,11 @@ typedef struct FRAME_COUNTS {
// Contexts used: Intra mode (Y plane) of 'above' and 'left' blocks.
extern
const
aom_prob
av1_kf_y_mode_prob
[
INTRA_MODES
][
INTRA_MODES
]
[
INTRA_MODES
-
1
];
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
// CDF version of 'av1_kf_y_mode_prob'.
extern
const
aom_cdf_prob
av1_kf_y_mode_cdf
[
INTRA_MODES
][
INTRA_MODES
]
[
CDF_SIZE
(
INTRA_MODES
)];
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#if CONFIG_PALETTE
extern
const
aom_prob
av1_default_palette_y_mode_prob
[
PALETTE_BLOCK_SIZES
]
...
...
@@ -473,7 +473,7 @@ extern const aom_prob av1_default_palette_uv_color_index_prob
extern
const
aom_tree_index
av1_intra_mode_tree
[
TREE_SIZE
(
INTRA_MODES
)];
extern
const
aom_tree_index
av1_inter_mode_tree
[
TREE_SIZE
(
INTER_MODES
)];
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
extern
int
av1_intra_mode_ind
[
INTRA_MODES
];
extern
int
av1_intra_mode_inv
[
INTRA_MODES
];
extern
int
av1_inter_mode_ind
[
INTER_MODES
];
...
...
@@ -484,7 +484,7 @@ extern int av1_ext_tx_intra_inv[EXT_TX_SETS_INTRA][TX_TYPES];
extern
int
av1_ext_tx_inter_ind
[
EXT_TX_SETS_INTER
][
TX_TYPES
];
extern
int
av1_ext_tx_inter_inv
[
EXT_TX_SETS_INTER
][
TX_TYPES
];
#endif
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
#if CONFIG_EXT_INTER
#if CONFIG_INTERINTRA
...
...
@@ -535,20 +535,20 @@ extern const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)];
extern
const
aom_tree_index
av1_switchable_restore_tree
[
TREE_SIZE
(
RESTORE_SWITCHABLE_TYPES
)];
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
extern
int
av1_switchable_interp_ind
[
SWITCHABLE_FILTERS
];
extern
int
av1_switchable_interp_inv
[
SWITCHABLE_FILTERS
];
#if !CONFIG_EC_ADAPT
void
av1_set_mode_cdfs
(
struct
AV1Common
*
cm
);
#endif
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
void
av1_setup_past_independence
(
struct
AV1Common
*
cm
);
void
av1_adapt_intra_frame_probs
(
struct
AV1Common
*
cm
);
void
av1_adapt_inter_frame_probs
(
struct
AV1Common
*
cm
);
#if
CONFIG_EC_MULTISYMBOL
&& !CONFIG_EXT_TX
#if
(CONFIG_DAALA_EC || CONFIG_ANS)
&& !CONFIG_EXT_TX
extern
int
av1_ext_tx_ind
[
TX_TYPES
];
extern
int
av1_ext_tx_inv
[
TX_TYPES
];
#endif
...
...
av1/common/entropymv.c
View file @
cd539518
...
...
@@ -43,57 +43,57 @@ const aom_tree_index av1_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = { -0, 2, -1,
static
const
nmv_context
default_nmv_context
=
{
{
32
,
64
,
96
},
// joints
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
{
AOM_ICDF
(
4096
),
AOM_ICDF
(
11264
),
AOM_ICDF
(
19328
),
AOM_ICDF
(
32768
),
0
},
// joint_cdf
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
{
{
// Vertical component
128
,
// sign
{
224
,
144
,
192
,
168
,
192
,
176
,
192
,
198
,
198
,
245
},
// class
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
{
AOM_ICDF
(
28672
),
AOM_ICDF
(
30976
),
AOM_ICDF
(
31858
),
AOM_ICDF
(
32320
),
AOM_ICDF
(
32551
),
AOM_ICDF
(
32656
),
AOM_ICDF
(
32740
),
AOM_ICDF
(
32757
),
AOM_ICDF
(
32762
),
AOM_ICDF
(
32767
),
AOM_ICDF
(
32768
),
0
},
// class_cdf
#endif
{
216
},
// class0
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
{
216
},
// class0
{
136
,
140
,
148
,
160
,
176
,
192
,
224
,
234
,
234
,
240
},
// bits
{
{
128
,
128
,
64
},
{
96
,
112
,
64
}
},
// class0_fp
{
64
,
96
,
64
},
// fp
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
{
{
AOM_ICDF
(
16384
),
AOM_ICDF
(
24576
),
AOM_ICDF
(
26624
),
AOM_ICDF
(
32768
),
0
},
{
AOM_ICDF
(
12288
),
AOM_ICDF
(
21248
),
AOM_ICDF
(
24128
),
AOM_ICDF
(
32768
),
0
}
},
// class0_fp_cdf
{
AOM_ICDF
(
8192
),
AOM_ICDF
(
17408
),
AOM_ICDF
(
21248
),
AOM_ICDF
(
32768
),
0
},
// fp_cdf
#endif
160
,
// class0_hp bit
128
,
// hp
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
160
,
// class0_hp bit
128
,
// hp
},
{
// Horizontal component
128
,
// sign
{
216
,
128
,
176
,
160
,
176
,
176
,
192
,
198
,
198
,
208
},
// class
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
{
AOM_ICDF
(
28672
),
AOM_ICDF
(
30976
),
AOM_ICDF
(
31858
),
AOM_ICDF
(
32320
),
AOM_ICDF
(
32551
),
AOM_ICDF
(
32656
),
AOM_ICDF
(
32740
),
AOM_ICDF
(
32757
),
AOM_ICDF
(
32762
),
AOM_ICDF
(
32767
),
AOM_ICDF
(
32768
),
0
},
// class_cdf
#endif
{
208
},
// class0
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
{
208
},
// class0
{
136
,
140
,
148
,
160
,
176
,
192
,
224
,
234
,
234
,
240
},
// bits
{
{
128
,
128
,
64
},
{
96
,
112
,
64
}
},
// class0_fp
{
64
,
96
,
64
},
// fp
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
{
{
AOM_ICDF
(
16384
),
AOM_ICDF
(
24576
),
AOM_ICDF
(
26624
),
AOM_ICDF
(
32768
),
0
},
{
AOM_ICDF
(
12288
),
AOM_ICDF
(
21248
),
AOM_ICDF
(
24128
),
AOM_ICDF
(
32768
),
0
}
},
// class0_fp_cdf
{
AOM_ICDF
(
8192
),
AOM_ICDF
(
17408
),
AOM_ICDF
(
21248
),
AOM_ICDF
(
32768
),
0
},
// fp_cdf
#endif
160
,
// class0_hp bit
128
,
// hp
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
160
,
// class0_hp bit
128
,
// hp
}
},
};
...
...
@@ -268,7 +268,7 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
}
}
#if
CONFIG_EC_MULTISYMBOL
&& !CONFIG_EC_ADAPT
#if
(CONFIG_DAALA_EC || CONFIG_ANS)
&& !CONFIG_EC_ADAPT
void
av1_set_mv_cdfs
(
nmv_context
*
ctx
)
{
int
i
;
int
j
;
...
...
av1/common/entropymv.h
View file @
cd539518
...
...
@@ -84,26 +84,26 @@ extern const aom_tree_index av1_mv_fp_tree[];
typedef
struct
{
aom_prob
sign
;
aom_prob
classes
[
MV_CLASSES
-
1
];
#if CONFIG_
EC_MULTISYMBOL
#if CONFIG_
DAALA_EC || CONFIG_ANS
aom_cdf_prob
class_cdf
[
CDF_SIZE
(
MV_CLASSES
)];
#endif
#endif
// CONFIG_DAALA_EC || CONFIG_ANS
aom_prob
class0
[
CLASS0_SIZE
-
1
];
aom_prob
bits
[
MV_OFFSET_BITS
];