summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 3877391d8..06b4d6316 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -631,13 +631,11 @@ static void set_offsets(VP9_COMP *cpi,
/* segment ID */
if (xd->segmentation_enabled) {
- if (xd->update_mb_segmentation_map) {
- mbmi->segment_id = find_seg_id(cpi->segmentation_map, bsize,
- mi_row, cm->mi_rows, mi_col, cm->mi_cols);
- } else {
- mbmi->segment_id = find_seg_id(cm->last_frame_seg_map, bsize,
- mi_row, cm->mi_rows, mi_col, cm->mi_cols);
- }
+ uint8_t *map = xd->update_mb_segmentation_map ? cpi->segmentation_map
+ : cm->last_frame_seg_map;
+ mbmi->segment_id = find_seg_id(map, bsize, mi_row,
+ cm->mi_rows, mi_col, cm->mi_cols);
+
assert(mbmi->segment_id <= (MAX_MB_SEGMENTS-1));
vp9_mb_init_quantizer(cpi, x);