Merge "Support up to 64 row tile coding" into nextgen
This commit is contained in:
commit
ad5ede6e36
@ -1885,7 +1885,7 @@ static void setup_tile_info(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) {
|
||||
|
||||
if (cm->log2_tile_rows > 10)
|
||||
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
|
||||
"Invalid number of tile columns");
|
||||
"Invalid number of tile rows");
|
||||
#else
|
||||
cm->log2_tile_rows = vp9_rb_read_bit(rb);
|
||||
if (cm->log2_tile_rows)
|
||||
@ -1961,7 +1961,11 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
|
||||
const int aligned_cols = mi_cols_aligned_to_sb(cm->mi_cols);
|
||||
const int tile_cols = 1 << cm->log2_tile_cols;
|
||||
const int tile_rows = 1 << cm->log2_tile_rows;
|
||||
#if CONFIG_ROW_TILE
|
||||
TileBuffer tile_buffers[64][64];
|
||||
#else
|
||||
TileBuffer tile_buffers[4][1 << 6];
|
||||
#endif
|
||||
int tile_row, tile_col;
|
||||
int mi_row, mi_col;
|
||||
TileData *tile_data = NULL;
|
||||
@ -1988,8 +1992,13 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
|
||||
vp9_loop_filter_frame_init(cm, cm->lf.filter_level);
|
||||
}
|
||||
|
||||
#if CONFIG_ROW_TILE
|
||||
assert(tile_rows <= (1 << 6));
|
||||
assert(tile_cols <= (1 << 6));
|
||||
#else
|
||||
assert(tile_rows <= 4);
|
||||
assert(tile_cols <= (1 << 6));
|
||||
#endif
|
||||
|
||||
// Note: this memset assumes above_context[0], [1] and [2]
|
||||
// are allocated as part of the same buffer.
|
||||
|
@ -4536,8 +4536,13 @@ static void encode_tiles(VP9_COMP *cpi) {
|
||||
const int tile_rows = 1 << cm->log2_tile_rows;
|
||||
|
||||
int tile_col, tile_row;
|
||||
#if CONFIG_ROW_TILE
|
||||
TileInfo tile[64][64];
|
||||
TOKENEXTRA *tok[64][64];
|
||||
#else
|
||||
TileInfo tile[4][1 << 6];
|
||||
TOKENEXTRA *tok[4][1 << 6];
|
||||
#endif
|
||||
TOKENEXTRA *pre_tok = cpi->tok;
|
||||
int tile_tok = 0;
|
||||
|
||||
|
@ -572,12 +572,18 @@ void vp9_new_framerate(VP9_COMP *cpi, double framerate) {
|
||||
static void set_tile_limits(VP9_COMP *cpi) {
|
||||
VP9_COMMON *const cm = &cpi->common;
|
||||
|
||||
int min_log2_tile_cols, max_log2_tile_cols;
|
||||
vp9_get_tile_n_bits(cm->mi_cols, &min_log2_tile_cols, &max_log2_tile_cols);
|
||||
int min_log2_tiles, max_log2_tiles;
|
||||
vp9_get_tile_n_bits(cm->mi_cols, &min_log2_tiles, &max_log2_tiles);
|
||||
|
||||
cm->log2_tile_cols = clamp(cpi->oxcf.tile_columns,
|
||||
min_log2_tile_cols, max_log2_tile_cols);
|
||||
min_log2_tiles, max_log2_tiles);
|
||||
#if CONFIG_ROW_TILE
|
||||
vp9_get_tile_n_bits(cm->mi_rows, &min_log2_tiles, &max_log2_tiles);
|
||||
cm->log2_tile_rows = clamp(cpi->oxcf.tile_rows,
|
||||
min_log2_tiles, max_log2_tiles);
|
||||
#else
|
||||
cm->log2_tile_rows = cpi->oxcf.tile_rows;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void init_buffer_indices(VP9_COMP *cpi) {
|
||||
|
@ -208,7 +208,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
|
||||
RANGE_CHECK(extra_cfg, cpu_used, -16, 16);
|
||||
RANGE_CHECK_HI(extra_cfg, noise_sensitivity, 6);
|
||||
RANGE_CHECK(extra_cfg, tile_columns, 0, 6);
|
||||
RANGE_CHECK(extra_cfg, tile_rows, 0, 2);
|
||||
RANGE_CHECK(extra_cfg, tile_rows, 0, 6);
|
||||
RANGE_CHECK_HI(extra_cfg, sharpness, 7);
|
||||
RANGE_CHECK(extra_cfg, arnr_max_frames, 0, 15);
|
||||
RANGE_CHECK_HI(extra_cfg, arnr_strength, 6);
|
||||
|
Loading…
x
Reference in New Issue
Block a user