diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2014-04-22 11:42:07 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-04-22 11:42:07 -0700 |
commit | a5cd9afb8c1ea30ff5a12a001274a5e5f03cd28b (patch) | |
tree | 58dbbca491f7a95eadf2e2ebdb6106b4acc15ec9 /vp9/encoder | |
parent | afc5636699cfef287a4693271e210359ea9a4101 (diff) | |
parent | 0b25a3ca95ee043cac92d8dabec4565b58dadc2d (diff) | |
download | libvpx-a5cd9afb8c1ea30ff5a12a001274a5e5f03cd28b.tar libvpx-a5cd9afb8c1ea30ff5a12a001274a5e5f03cd28b.tar.gz libvpx-a5cd9afb8c1ea30ff5a12a001274a5e5f03cd28b.tar.bz2 libvpx-a5cd9afb8c1ea30ff5a12a001274a5e5f03cd28b.zip |
Merge "Inlining vp9_set_segmentation_map() function."
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 6 | ||||
-rw-r--r-- | vp9/encoder/vp9_segmentation.c | 12 | ||||
-rw-r--r-- | vp9/encoder/vp9_segmentation.h | 3 |
3 files changed, 3 insertions, 18 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index c94fff2d3..92e5f3b95 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -2895,9 +2895,10 @@ int vp9_set_roimap(VP9_COMP *cpi, unsigned char *map, unsigned int rows, unsigned int threshold[MAX_SEGMENTS]) { signed char feature_data[SEG_LVL_MAX][MAX_SEGMENTS]; struct segmentation *seg = &cpi->common.seg; + const VP9_COMMON *const cm = &cpi->common; int i; - if (cpi->common.mb_rows != rows || cpi->common.mb_cols != cols) + if (cm->mb_rows != rows || cm->mb_cols != cols) return -1; if (!map) { @@ -2905,8 +2906,7 @@ int vp9_set_roimap(VP9_COMP *cpi, unsigned char *map, unsigned int rows, return 0; } - // Set the segmentation Map - vp9_set_segmentation_map(cpi, map); + vpx_memcpy(cpi->segmentation_map, map, cm->mi_rows * cm->mi_cols); // Activate segmentation. vp9_enable_segmentation(seg); diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c index 9d3e6dc12..7537d1b52 100644 --- a/vp9/encoder/vp9_segmentation.c +++ b/vp9/encoder/vp9_segmentation.c @@ -29,18 +29,6 @@ void vp9_disable_segmentation(struct segmentation *seg) { seg->enabled = 0; } -void vp9_set_segmentation_map(VP9_COMP *cpi, unsigned char *segmentation_map) { - struct segmentation *const seg = &cpi->common.seg; - - // Copy in the new segmentation map - vpx_memcpy(cpi->segmentation_map, segmentation_map, - (cpi->common.mi_rows * cpi->common.mi_cols)); - - // Signal that the map should be updated. - seg->update_map = 1; - seg->update_data = 1; -} - void vp9_set_segment_data(struct segmentation *seg, signed char *feature_data, unsigned char abs_delta) { diff --git a/vp9/encoder/vp9_segmentation.h b/vp9/encoder/vp9_segmentation.h index 66c51a21b..be08b0dfa 100644 --- a/vp9/encoder/vp9_segmentation.h +++ b/vp9/encoder/vp9_segmentation.h @@ -28,9 +28,6 @@ void vp9_disable_segfeature(struct segmentation *seg, void vp9_clear_segdata(struct segmentation *seg, int segment_id, SEG_LVL_FEATURES feature_id); -// Valid values for a segment are 0 to 3 -// Segmentation map is arrange as [Rows][Columns] -void vp9_set_segmentation_map(VP9_COMP *cpi, unsigned char *segmentation_map); // The values given for each segment can be either deltas (from the default // value chosen for the frame) or absolute values. |