Add tile column size limits (256 pixels min, 4096 pixels max).

This is after discussion with the hardware team. Update the unit test
to take these sizes into account. Split out some duplicate code into
a separate file so it can be shared.

Change-Id: I8311d11b0191d8bb37e8eb4ac962beb217e1bff5
This commit is contained in:
Ronald S. Bultje
2013-02-06 15:30:21 -08:00
committed by Gerrit Code Review
parent cb00be1fa2
commit f496f601fb
12 changed files with 137 additions and 90 deletions

View File

@@ -13,6 +13,7 @@
#include "vpx_mem/vpx_mem.h"
#include "vp9/encoder/vp9_segmentation.h"
#include "vp9/common/vp9_pred_common.h"
#include "vp9/common/vp9_tile_common.h"
void vp9_update_gf_useage_maps(VP9_COMP *cpi, VP9_COMMON *cm, MACROBLOCK *x) {
int mb_row, mb_col;
@@ -254,7 +255,7 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) {
int t_pred_cost = INT_MAX;
int i;
int tile, mb_row, mb_col, mb_start = 0;
int tile, mb_row, mb_col;
int temporal_predictor_count[PREDICTION_PROBS][2];
int no_pred_segcounts[MAX_MB_SEGMENTS];
@@ -283,20 +284,14 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) {
// predicts this one
for (tile = 0; tile < cm->tile_columns; tile++) {
// calculate end of tile column
const int sb_cols = (cm->mb_cols + 3) >> 2;
const int sb_end = (sb_cols * (tile + 1)) >> cpi->oxcf.tile_columns;
const int mb_end = ((sb_end << 2) > cm->mb_cols) ?
cm->mb_cols : (sb_end << 2);
cm->cur_tile_idx = tile;
cm->cur_tile_mb_col_start = mb_start;
cm->cur_tile_mb_col_end = mb_end;
mi_ptr = cm->mi + mb_start;
vp9_get_tile_offsets(cm, &cm->cur_tile_mb_col_start,
&cm->cur_tile_mb_col_end);
mi_ptr = cm->mi + cm->cur_tile_mb_col_start;
for (mb_row = 0; mb_row < cm->mb_rows; mb_row += 4, mi_ptr += 4 * mis) {
mi = mi_ptr;
for (mb_col = mb_start; mb_col < mb_end; mb_col += 4, mi += 4) {
for (mb_col = cm->cur_tile_mb_col_start;
mb_col < cm->cur_tile_mb_col_end; mb_col += 4, mi += 4) {
if (mi->mbmi.sb_type == BLOCK_SIZE_SB64X64) {
count_segs(cpi, mi, no_pred_segcounts, temporal_predictor_count,
t_unpred_seg_counts, 4, mb_row, mb_col);
@@ -338,8 +333,6 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) {
}
}
}
mb_start = mb_end;
}
// Work out probability tree for coding segments without prediction