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
29199efd
Commit
29199efd
authored
Jan 06, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Jan 06, 2014
Browse files
Merge "Moving reset_segment_features() to encoder/vp9_segmentation.h."
parents
bbb25e6a
4603f31d
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
29199efd
...
...
@@ -170,17 +170,6 @@ void vp9_initialize_enc() {
}
}
static
void
reset_segment_features
(
VP9_COMMON
*
cm
)
{
struct
segmentation
*
const
seg
=
&
cm
->
seg
;
// Set up default state for MB feature flags
seg
->
enabled
=
0
;
seg
->
update_map
=
0
;
seg
->
update_data
=
0
;
vpx_memset
(
seg
->
tree_probs
,
255
,
sizeof
(
seg
->
tree_probs
));
vp9_clearall_segfeatures
(
seg
);
}
static
void
dealloc_compressor_data
(
VP9_COMP
*
cpi
)
{
// Delete sementation map
vpx_free
(
cpi
->
segmentation_map
);
...
...
@@ -1192,7 +1181,7 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
cm
->
refresh_frame_context
=
1
;
cm
->
reset_frame_context
=
0
;
reset_segment_features
(
cm
);
vp9_
reset_segment_features
(
&
cm
->
seg
);
set_high_precision_mv
(
cpi
,
0
);
{
...
...
@@ -2939,7 +2928,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
if
(
frame_is_intra_only
(
cm
))
{
vp9_setup_key_frame
(
cpi
);
// Reset the loop filter deltas and segmentation map.
reset_segment_features
(
cm
);
vp9_
reset_segment_features
(
&
cm
->
seg
);
// If segmentation is enabled force a map update for key frames.
if
(
seg
->
enabled
)
{
...
...
vp9/encoder/vp9_segmentation.c
View file @
29199efd
...
...
@@ -296,3 +296,12 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) {
vpx_memcpy
(
seg
->
tree_probs
,
no_pred_tree
,
sizeof
(
no_pred_tree
));
}
}
void
vp9_reset_segment_features
(
struct
segmentation
*
seg
)
{
// Set up default state for MB feature flags
seg
->
enabled
=
0
;
seg
->
update_map
=
0
;
seg
->
update_data
=
0
;
vpx_memset
(
seg
->
tree_probs
,
255
,
sizeof
(
seg
->
tree_probs
));
vp9_clearall_segfeatures
(
seg
);
}
vp9/encoder/vp9_segmentation.h
View file @
29199efd
...
...
@@ -43,4 +43,6 @@ void vp9_set_segment_data(VP9_PTR ptr, signed char *feature_data,
void
vp9_choose_segmap_coding_method
(
VP9_COMP
*
cpi
);
void
vp9_reset_segment_features
(
struct
segmentation
*
seg
);
#endif // VP9_ENCODER_VP9_SEGMENTATION_H_
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