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
b107f2c4
Commit
b107f2c4
authored
Jan 29, 2014
by
Dmitry Kovalev
Browse files
Renaming "mbskip" to "skip".
Change-Id: I27a30b43eae026a77f92958e2238d02d9cdf7832
parent
afc8f434
Changes
10
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.h
View file @
b107f2c4
...
...
@@ -30,7 +30,7 @@ extern "C" {
#endif
#define BLOCK_SIZE_GROUPS 4
#define
MB
SKIP_CONTEXTS 3
#define SKIP_CONTEXTS 3
#define INTER_MODE_CONTEXTS 7
/* Segment Feature Masks */
...
...
vp9/common/vp9_entropymode.c
View file @
b107f2c4
...
...
@@ -303,7 +303,7 @@ void tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p,
ct_8x8p
[
0
][
1
]
=
tx_count_8x8p
[
TX_8X8
];
}
static
const
vp9_prob
default_
mb
skip_probs
[
MB
SKIP_CONTEXTS
]
=
{
static
const
vp9_prob
default_skip_probs
[
SKIP_CONTEXTS
]
=
{
192
,
128
,
64
};
...
...
@@ -325,7 +325,7 @@ void vp9_init_mbmode_probs(VP9_COMMON *cm) {
vp9_copy
(
cm
->
fc
.
comp_ref_prob
,
default_comp_ref_p
);
vp9_copy
(
cm
->
fc
.
single_ref_prob
,
default_single_ref_p
);
cm
->
fc
.
tx_probs
=
default_tx_probs
;
vp9_copy
(
cm
->
fc
.
mb
skip_probs
,
default_
mb
skip_probs
);
vp9_copy
(
cm
->
fc
.
skip_probs
,
default_skip_probs
);
vp9_copy
(
cm
->
fc
.
inter_mode_probs
,
default_inter_mode_probs
);
}
...
...
@@ -415,9 +415,8 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
}
}
for
(
i
=
0
;
i
<
MBSKIP_CONTEXTS
;
++
i
)
fc
->
mbskip_probs
[
i
]
=
adapt_prob
(
pre_fc
->
mbskip_probs
[
i
],
counts
->
mbskip
[
i
]);
for
(
i
=
0
;
i
<
SKIP_CONTEXTS
;
++
i
)
fc
->
skip_probs
[
i
]
=
adapt_prob
(
pre_fc
->
skip_probs
[
i
],
counts
->
skip
[
i
]);
}
static
void
set_default_lf_deltas
(
struct
loopfilter
*
lf
)
{
...
...
vp9/common/vp9_onyxc_int.h
View file @
b107f2c4
...
...
@@ -60,7 +60,7 @@ typedef struct frame_contexts {
vp9_prob
single_ref_prob
[
REF_CONTEXTS
][
2
];
vp9_prob
comp_ref_prob
[
REF_CONTEXTS
];
struct
tx_probs
tx_probs
;
vp9_prob
mb
skip_probs
[
MB
SKIP_CONTEXTS
];
vp9_prob
skip_probs
[
SKIP_CONTEXTS
];
nmv_context
nmvc
;
}
FRAME_CONTEXT
;
...
...
@@ -79,7 +79,7 @@ typedef struct {
unsigned
int
single_ref
[
REF_CONTEXTS
][
2
][
2
];
unsigned
int
comp_ref
[
REF_CONTEXTS
][
2
];
struct
tx_counts
tx
;
unsigned
int
mb
skip
[
MB
SKIP_CONTEXTS
][
2
];
unsigned
int
skip
[
SKIP_CONTEXTS
][
2
];
nmv_context_counts
mv
;
}
FRAME_COUNTS
;
...
...
vp9/common/vp9_pred_common.h
View file @
b107f2c4
...
...
@@ -54,7 +54,7 @@ static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
static
INLINE
vp9_prob
vp9_get_skip_prob
(
const
VP9_COMMON
*
cm
,
const
MACROBLOCKD
*
xd
)
{
return
cm
->
fc
.
mb
skip_probs
[
vp9_get_skip_context
(
xd
)];
return
cm
->
fc
.
skip_probs
[
vp9_get_skip_context
(
xd
)];
}
int
vp9_get_pred_context_switchable_interp
(
const
MACROBLOCKD
*
xd
);
...
...
vp9/decoder/vp9_decodeframe.c
View file @
b107f2c4
...
...
@@ -1245,8 +1245,8 @@ static int read_compressed_header(VP9D_COMP *pbi, const uint8_t *data,
read_tx_mode_probs
(
&
fc
->
tx_probs
,
&
r
);
read_coef_probs
(
fc
,
cm
->
tx_mode
,
&
r
);
for
(
k
=
0
;
k
<
MB
SKIP_CONTEXTS
;
++
k
)
vp9_diff_update_prob
(
&
r
,
&
fc
->
mb
skip_probs
[
k
]);
for
(
k
=
0
;
k
<
SKIP_CONTEXTS
;
++
k
)
vp9_diff_update_prob
(
&
r
,
&
fc
->
skip_probs
[
k
]);
if
(
!
frame_is_intra_only
(
cm
))
{
nmv_context
*
const
nmvc
=
&
fc
->
nmvc
;
...
...
@@ -1321,8 +1321,7 @@ static void debug_check_frame_counts(const VP9_COMMON *const cm) {
assert
(
!
memcmp
(
cm
->
counts
.
comp_ref
,
zero_counts
.
comp_ref
,
sizeof
(
cm
->
counts
.
comp_ref
)));
assert
(
!
memcmp
(
&
cm
->
counts
.
tx
,
&
zero_counts
.
tx
,
sizeof
(
cm
->
counts
.
tx
)));
assert
(
!
memcmp
(
cm
->
counts
.
mbskip
,
zero_counts
.
mbskip
,
sizeof
(
cm
->
counts
.
mbskip
)));
assert
(
!
memcmp
(
cm
->
counts
.
skip
,
zero_counts
.
skip
,
sizeof
(
cm
->
counts
.
skip
)));
assert
(
!
memcmp
(
&
cm
->
counts
.
mv
,
&
zero_counts
.
mv
,
sizeof
(
cm
->
counts
.
mv
)));
}
#endif // NDEBUG
...
...
vp9/decoder/vp9_decodemv.c
View file @
b107f2c4
...
...
@@ -152,9 +152,9 @@ static int read_skip_coeff(VP9_COMMON *cm, const MACROBLOCKD *xd,
return
1
;
}
else
{
const
int
ctx
=
vp9_get_skip_context
(
xd
);
const
int
skip
=
vp9_read
(
r
,
cm
->
fc
.
mb
skip_probs
[
ctx
]);
const
int
skip
=
vp9_read
(
r
,
cm
->
fc
.
skip_probs
[
ctx
]);
if
(
!
cm
->
frame_parallel_decoding_mode
)
++
cm
->
counts
.
mb
skip
[
ctx
][
skip
];
++
cm
->
counts
.
skip
[
ctx
][
skip
];
return
skip
;
}
}
...
...
vp9/encoder/vp9_bitstream.c
View file @
b107f2c4
...
...
@@ -124,8 +124,8 @@ static int write_skip_coeff(const VP9_COMP *cpi, int segment_id, MODE_INFO *m,
void
vp9_update_skip_probs
(
VP9_COMMON
*
cm
,
vp9_writer
*
w
)
{
int
k
;
for
(
k
=
0
;
k
<
MB
SKIP_CONTEXTS
;
++
k
)
vp9_cond_prob_diff_update
(
w
,
&
cm
->
fc
.
mb
skip_probs
[
k
],
cm
->
counts
.
mb
skip
[
k
]);
for
(
k
=
0
;
k
<
SKIP_CONTEXTS
;
++
k
)
vp9_cond_prob_diff_update
(
w
,
&
cm
->
fc
.
skip_probs
[
k
],
cm
->
counts
.
skip
[
k
]);
}
static
void
update_switchable_interp_probs
(
VP9_COMP
*
cpi
,
vp9_writer
*
w
)
{
...
...
vp9/encoder/vp9_encodeframe.c
View file @
b107f2c4
...
...
@@ -2138,7 +2138,7 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
vp9_zero
(
cm
->
counts
.
single_ref
);
vp9_zero
(
cm
->
counts
.
comp_ref
);
vp9_zero
(
cm
->
counts
.
tx
);
vp9_zero
(
cm
->
counts
.
mb
skip
);
vp9_zero
(
cm
->
counts
.
skip
);
// Note: this memset assumes above_context[0], [1] and [2]
// are allocated as part of the same buffer.
...
...
@@ -2724,7 +2724,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
}
else
{
mbmi
->
skip_coeff
=
1
;
if
(
output_enabled
)
cm
->
counts
.
mb
skip
[
vp9_get_skip_context
(
xd
)][
1
]
++
;
cm
->
counts
.
skip
[
vp9_get_skip_context
(
xd
)][
1
]
++
;
reset_skip_context
(
xd
,
MAX
(
bsize
,
BLOCK_8X8
));
}
...
...
vp9/encoder/vp9_onyx_int.h
View file @
b107f2c4
...
...
@@ -551,7 +551,7 @@ typedef struct VP9_COMP {
int
cpu_used
;
int
pass
;
vp9_prob
last_skip_false_probs
[
3
][
MB
SKIP_CONTEXTS
];
vp9_prob
last_skip_false_probs
[
3
][
SKIP_CONTEXTS
];
int
last_skip_probs_q
[
3
];
int
ref_frame_flags
;
...
...
vp9/encoder/vp9_tokenize.c
View file @
b107f2c4
...
...
@@ -301,7 +301,7 @@ void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
struct
tokenize_b_args
arg
=
{
cpi
,
xd
,
t
,
mbmi
->
tx_size
,
cpi
->
mb
.
token_cache
};
if
(
mbmi
->
skip_coeff
)
{
if
(
!
dry_run
)
cm
->
counts
.
mb
skip
[
ctx
][
1
]
+=
skip_inc
;
cm
->
counts
.
skip
[
ctx
][
1
]
+=
skip_inc
;
reset_skip_context
(
xd
,
bsize
);
if
(
dry_run
)
*
t
=
t_backup
;
...
...
@@ -309,7 +309,7 @@ void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
}
if
(
!
dry_run
)
{
cm
->
counts
.
mb
skip
[
ctx
][
0
]
+=
skip_inc
;
cm
->
counts
.
skip
[
ctx
][
0
]
+=
skip_inc
;
foreach_transformed_block
(
xd
,
bsize
,
tokenize_b
,
&
arg
);
}
else
{
foreach_transformed_block
(
xd
,
bsize
,
set_entropy_context_b
,
&
arg
);
...
...
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