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
Xiph.Org
aom-rav1e
Commits
57a7baf6
Commit
57a7baf6
authored
Nov 01, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Nov 01, 2016
Browse files
Merge "Fix merge issues related --enable-ec-adapt" into nextgenv2
parents
980eb2e9
8af861bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
aom_dsp/prob.h
View file @
57a7baf6
...
...
@@ -33,7 +33,7 @@ typedef uint16_t aom_cdf_prob;
typedef
int8_t
aom_tree_index
;
#define TREE_SIZE(leaf_count) (2 * (leaf_count)
-2
)
#define TREE_SIZE(leaf_count) (
-2 +
2 * (leaf_count))
#define aom_complement(x) (255 - x)
...
...
av1/decoder/decodeframe.c
View file @
57a7baf6
...
...
@@ -134,8 +134,8 @@ static void read_switchable_interp_probs(FRAME_CONTEXT *fc, aom_reader *r) {
#endif
static
void
read_inter_mode_probs
(
FRAME_CONTEXT
*
fc
,
aom_reader
*
r
)
{
int
i
;
#if CONFIG_REF_MV
int
i
;
for
(
i
=
0
;
i
<
NEWMV_MODE_CONTEXTS
;
++
i
)
av1_diff_update_prob
(
r
,
&
fc
->
newmv_prob
[
i
],
ACCT_STR
);
for
(
i
=
0
;
i
<
ZEROMV_MODE_CONTEXTS
;
++
i
)
...
...
@@ -148,12 +148,15 @@ static void read_inter_mode_probs(FRAME_CONTEXT *fc, aom_reader *r) {
av1_diff_update_prob
(
r
,
&
fc
->
new2mv_prob
,
ACCT_STR
);
#endif // CONFIG_EXT_INTER
#else
int
j
;
#if !CONFIG_EC_ADAPT
int
i
,
j
;
for
(
i
=
0
;
i
<
INTER_MODE_CONTEXTS
;
++
i
)
{
for
(
j
=
0
;
j
<
INTER_MODES
-
1
;
++
j
)
av1_diff_update_prob
(
r
,
&
fc
->
inter_mode_probs
[
i
][
j
],
ACCT_STR
);
}
#else
(
void
)
fc
;
(
void
)
r
;
#endif
#endif
}
...
...
@@ -3712,7 +3715,10 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
#endif
FRAME_CONTEXT
*
const
fc
=
cm
->
fc
;
aom_reader
r
;
int
k
,
i
,
j
;
int
k
,
i
;
#if !CONFIG_EC_ADAPT
int
j
;
#endif
#if !CONFIG_ANS
if
(
aom_reader_init
(
&
r
,
data
,
partition_size
,
pbi
->
decrypt_cb
,
...
...
@@ -3845,7 +3851,6 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
if
(
cm
->
reference_mode
!=
SINGLE_REFERENCE
)
setup_compound_reference_mode
(
cm
);
read_frame_reference_mode_probs
(
cm
,
&
r
);
#if !CONFIG_EC_ADAPT
...
...
av1/encoder/bitstream.c
View file @
57a7baf6
...
...
@@ -314,7 +314,6 @@ static void encode_unsigned_max(struct aom_write_bit_buffer *wb, int data,
aom_wb_write_literal
(
wb
,
data
,
get_unsigned_bits
(
max
));
}
#if !CONFIG_EC_ADAPT || !CONFIG_DAALA_EC
static
void
prob_diff_update
(
const
aom_tree_index
*
tree
,
aom_prob
probs
[
/*n - 1*/
],
const
unsigned
int
counts
[
/*n - 1*/
],
int
n
,
...
...
@@ -330,6 +329,7 @@ static void prob_diff_update(const aom_tree_index *tree,
av1_cond_prob_diff_update
(
w
,
&
probs
[
i
],
branch_ct
[
i
],
probwt
);
}
#if !CONFIG_EC_ADAPT
static
int
prob_diff_update_savings
(
const
aom_tree_index
*
tree
,
aom_prob
probs
[
/*n - 1*/
],
const
unsigned
int
counts
[
/*n - 1*/
],
int
n
,
...
...
@@ -2911,7 +2911,6 @@ static void write_txfm_mode(TX_MODE mode, struct aom_write_bit_buffer *wb) {
if
(
mode
!=
TX_MODE_SELECT
)
aom_wb_write_literal
(
wb
,
mode
,
2
);
}
#if !CONFIG_EC_ADAPT
static
void
update_txfm_probs
(
AV1_COMMON
*
cm
,
aom_writer
*
w
,
FRAME_COUNTS
*
counts
)
{
#if CONFIG_TILE_GROUPS
...
...
@@ -2927,7 +2926,6 @@ static void update_txfm_probs(AV1_COMMON *cm, aom_writer *w,
counts
->
tx_size
[
i
][
j
],
i
+
2
,
probwt
,
w
);
}
}
#endif
static
void
write_interp_filter
(
InterpFilter
filter
,
struct
aom_write_bit_buffer
*
wb
)
{
...
...
@@ -3702,9 +3700,7 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
#if CONFIG_LOOP_RESTORATION
encode_restoration
(
cm
,
header_bc
);
#endif // CONFIG_LOOP_RESTORATION
#if !CONFIG_EC_ADAPT
update_txfm_probs
(
cm
,
header_bc
,
counts
);
#endif
update_coef_probs
(
cpi
,
header_bc
);
#if CONFIG_VAR_TX
...
...
av1/encoder/encodemv.c
View file @
57a7baf6
...
...
@@ -169,7 +169,7 @@ static void write_mv_update(const aom_tree_index *tree,
void
av1_write_nmv_probs
(
AV1_COMMON
*
cm
,
int
usehp
,
aom_writer
*
w
,
nmv_context_counts
*
const
nmv_counts
)
{
int
i
,
j
;
int
i
;
#if CONFIG_REF_MV
int
nmv_ctx
=
0
;
for
(
nmv_ctx
=
0
;
nmv_ctx
<
NMV_CONTEXTS
;
++
nmv_ctx
)
{
...
...
@@ -180,6 +180,7 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w,
w
);
for
(
i
=
0
;
i
<
2
;
++
i
)
{
int
j
;
nmv_component
*
comp
=
&
mvc
->
comps
[
i
];
nmv_component_counts
*
comp_counts
=
&
counts
->
comps
[
i
];
...
...
@@ -193,6 +194,7 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w,
}
for
(
i
=
0
;
i
<
2
;
++
i
)
{
int
j
;
for
(
j
=
0
;
j
<
CLASS0_SIZE
;
++
j
)
write_mv_update
(
av1_mv_fp_tree
,
mvc
->
comps
[
i
].
class0_fp
[
j
],
counts
->
comps
[
i
].
class0_fp
[
j
],
MV_FP_SIZE
,
w
);
...
...
@@ -218,6 +220,7 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w,
write_mv_update
(
av1_mv_joint_tree
,
mvc
->
joints
,
counts
->
joints
,
MV_JOINTS
,
w
);
for
(
i
=
0
;
i
<
2
;
++
i
)
{
int
j
;
nmv_component
*
comp
=
&
mvc
->
comps
[
i
];
nmv_component_counts
*
comp_counts
=
&
counts
->
comps
[
i
];
...
...
@@ -231,6 +234,7 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w,
}
for
(
i
=
0
;
i
<
2
;
++
i
)
{
int
j
;
for
(
j
=
0
;
j
<
CLASS0_SIZE
;
++
j
)
{
write_mv_update
(
av1_mv_fp_tree
,
mvc
->
comps
[
i
].
class0_fp
[
j
],
counts
->
comps
[
i
].
class0_fp
[
j
],
MV_FP_SIZE
,
w
);
...
...
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