Cleaning up encoder segmentation code.

Moving code from vp9_pack_bitstream to new function encode_segmentation.

Change-Id: I1f1e59a1f038618ad95162b7db4b6f8164850ea8
This commit is contained in:
Dmitry Kovalev
2013-04-29 16:07:17 -07:00
parent bbac4094e4
commit ee97da2c03
7 changed files with 126 additions and 150 deletions

View File

@@ -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);