diff options
author | Ronald S. Bultje <rbultje@google.com> | 2013-02-08 11:33:11 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-02-13 12:31:00 -0800 |
commit | 89a206ef2f5460aba239f68453ab61f0ca4f8a2e (patch) | |
tree | 40d820cd9dfabfc83b35c70945f7d4bdc083bdbb /vp9 | |
parent | 56049d9488af78bf29a45eaa4625b75d4def865e (diff) | |
download | libvpx-89a206ef2f5460aba239f68453ab61f0ca4f8a2e.tar libvpx-89a206ef2f5460aba239f68453ab61f0ca4f8a2e.tar.gz libvpx-89a206ef2f5460aba239f68453ab61f0ca4f8a2e.tar.bz2 libvpx-89a206ef2f5460aba239f68453ab61f0ca4f8a2e.zip |
Add support for tile rows.
These allow sending partial bitstream packets over the network before
encoding a complete frame is completed, thus lowering end-to-end
latency. The tile-rows are not independent.
Change-Id: I99986595cbcbff9153e2a14f49b4aa7dee4768e2
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/common/vp9_onyx.h | 1 | ||||
-rw-r--r-- | vp9/common/vp9_onyxc_int.h | 4 | ||||
-rw-r--r-- | vp9/common/vp9_tile_common.c | 34 | ||||
-rw-r--r-- | vp9/common/vp9_tile_common.h | 5 | ||||
-rw-r--r-- | vp9/decoder/vp9_decodframe.c | 99 | ||||
-rw-r--r-- | vp9/encoder/vp9_bitstream.c | 70 | ||||
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 16 | ||||
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 13 | ||||
-rw-r--r-- | vp9/encoder/vp9_onyx_int.h | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_segmentation.c | 8 | ||||
-rw-r--r-- | vp9/vp9_cx_iface.c | 6 |
11 files changed, 160 insertions, 98 deletions
diff --git a/vp9/common/vp9_onyx.h b/vp9/common/vp9_onyx.h index 0b7d98a58..d93b7d5fb 100644 --- a/vp9/common/vp9_onyx.h +++ b/vp9/common/vp9_onyx.h @@ -177,6 +177,7 @@ extern "C" int arnr_type; int tile_columns; + int tile_rows; struct vpx_fixed_buf two_pass_stats_in; struct vpx_codec_pkt_list *output_pkt_list; diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index a333a4b02..6295514ea 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -280,7 +280,9 @@ typedef struct VP9Common { int frame_parallel_decoding_mode; int tile_columns, log2_tile_columns; - int cur_tile_mb_col_start, cur_tile_mb_col_end, cur_tile_idx; + int cur_tile_mb_col_start, cur_tile_mb_col_end, cur_tile_col_idx; + int tile_rows, log2_tile_rows; + int cur_tile_mb_row_start, cur_tile_mb_row_end, cur_tile_row_idx; } VP9_COMMON; static int get_free_fb(VP9_COMMON *cm) { diff --git a/vp9/common/vp9_tile_common.c b/vp9/common/vp9_tile_common.c index 02e0d1461..29f89b618 100644 --- a/vp9/common/vp9_tile_common.c +++ b/vp9/common/vp9_tile_common.c @@ -10,17 +10,29 @@ #include "vp9/common/vp9_tile_common.h" -void vp9_get_tile_offsets(VP9_COMMON *cm, int *min_tile_off, - int *max_tile_off) { - const int log2_n_tiles = cm->log2_tile_columns; - const int tile_idx = cm->cur_tile_idx; - const int mb_cols = cm->mb_cols; - const int sb_cols = (mb_cols + 3) >> 2; - const int sb_off1 = (tile_idx * sb_cols) >> log2_n_tiles; - const int sb_off2 = ((tile_idx + 1) * sb_cols) >> log2_n_tiles; - - *min_tile_off = (sb_off1 << 2) > mb_cols ? mb_cols : (sb_off1 << 2); - *max_tile_off = (sb_off2 << 2) > mb_cols ? mb_cols : (sb_off2 << 2); +static void vp9_get_tile_offsets(VP9_COMMON *cm, int *min_tile_off, + int *max_tile_off, int tile_idx, + int log2_n_tiles, int n_mbs) { + const int n_sbs = (n_mbs + 3) >> 2; + const int sb_off1 = (tile_idx * n_sbs) >> log2_n_tiles; + const int sb_off2 = ((tile_idx + 1) * n_sbs) >> log2_n_tiles; + + *min_tile_off = (sb_off1 << 2) > n_mbs ? n_mbs : (sb_off1 << 2); + *max_tile_off = (sb_off2 << 2) > n_mbs ? n_mbs : (sb_off2 << 2); +} + +void vp9_get_tile_col_offsets(VP9_COMMON *cm, int tile_col_idx) { + cm->cur_tile_col_idx = tile_col_idx; + vp9_get_tile_offsets(cm, &cm->cur_tile_mb_col_start, + &cm->cur_tile_mb_col_end, tile_col_idx, + cm->log2_tile_columns, cm->mb_cols); +} + +void vp9_get_tile_row_offsets(VP9_COMMON *cm, int tile_row_idx) { + cm->cur_tile_row_idx = tile_row_idx; + vp9_get_tile_offsets(cm, &cm->cur_tile_mb_row_start, + &cm->cur_tile_mb_row_end, tile_row_idx, + cm->log2_tile_rows, cm->mb_rows); } #define MIN_TILE_WIDTH_SBS (MIN_TILE_WIDTH >> 6) diff --git a/vp9/common/vp9_tile_common.h b/vp9/common/vp9_tile_common.h index 653b6b4f6..92bf50897 100644 --- a/vp9/common/vp9_tile_common.h +++ b/vp9/common/vp9_tile_common.h @@ -16,8 +16,9 @@ #define MIN_TILE_WIDTH 256 #define MAX_TILE_WIDTH 4096 -extern void vp9_get_tile_offsets(VP9_COMMON *cm, int *min_tile_off, - int *max_tile_off); +extern void vp9_get_tile_col_offsets(VP9_COMMON *cm, int tile_col_idx); + +extern void vp9_get_tile_row_offsets(VP9_COMMON *cm, int tile_row_idx); extern void vp9_get_tile_n_bits(VP9_COMMON *cm, int *min_log2_n_tiles, int *delta_log2_n_tiles); diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index bcdb26207..04e3fe5b3 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -1770,7 +1770,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) { /* tile info */ { const unsigned char *data_ptr = data + first_partition_length_in_bytes; - int tile, delta_log2_tiles; + int tile_row, tile_col, delta_log2_tiles; vp9_get_tile_n_bits(pc, &pc->log2_tile_columns, &delta_log2_tiles); while (delta_log2_tiles--) { @@ -1780,55 +1780,80 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) { break; } } + pc->log2_tile_rows = vp9_read_bit(&header_bc); + if (pc->log2_tile_rows) + pc->log2_tile_rows += vp9_read_bit(&header_bc); pc->tile_columns = 1 << pc->log2_tile_columns; + pc->tile_rows = 1 << pc->log2_tile_rows; vpx_memset(pc->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * pc->mb_cols); if (pbi->oxcf.inv_tile_order) { - const unsigned char *data_ptr2[4]; + const int n_cols = pc->tile_columns; + const unsigned char *data_ptr2[4][1 << 6]; BOOL_DECODER UNINITIALIZED_IS_SAFE(bc_bak); - data_ptr2[0] = data_ptr; - for (tile = 1; tile < pc->tile_columns; tile++) { - int size = data_ptr2[tile - 1][0] + (data_ptr2[tile - 1][1] << 8) + - (data_ptr2[tile - 1][2] << 16) + (data_ptr2[tile - 1][3] << 24); - data_ptr2[tile - 1] += 4; - data_ptr2[tile] = data_ptr2[tile - 1] + size; + // pre-initialize the offsets, we're going to read in inverse order + data_ptr2[0][0] = data_ptr; + for (tile_row = 0; tile_row < pc->tile_rows; tile_row++) { + if (tile_row) { + int size = data_ptr2[tile_row - 1][n_cols - 1][0] + + (data_ptr2[tile_row - 1][n_cols - 1][1] << 8) + + (data_ptr2[tile_row - 1][n_cols - 1][2] << 16) + + (data_ptr2[tile_row - 1][n_cols - 1][3] << 24); + data_ptr2[tile_row - 1][n_cols - 1] += 4; + data_ptr2[tile_row][0] = data_ptr2[tile_row - 1][n_cols - 1] + size; + } + + for (tile_col = 1; tile_col < n_cols; tile_col++) { + int size = data_ptr2[tile_row][tile_col - 1][0] + + (data_ptr2[tile_row][tile_col - 1][1] << 8) + + (data_ptr2[tile_row][tile_col - 1][2] << 16) + + (data_ptr2[tile_row][tile_col - 1][3] << 24); + data_ptr2[tile_row][tile_col - 1] += 4; + data_ptr2[tile_row][tile_col] = + data_ptr2[tile_row][tile_col - 1] + size; + } } - for (tile = pc->tile_columns - 1; tile >= 0; tile--) { - pc->cur_tile_idx = tile; - vp9_get_tile_offsets(pc, &pc->cur_tile_mb_col_start, - &pc->cur_tile_mb_col_end); - setup_token_decoder(pbi, data_ptr2[tile], &residual_bc); - - /* Decode a row of superblocks */ - for (mb_row = 0; mb_row < pc->mb_rows; mb_row += 4) { - decode_sb_row(pbi, pc, mb_row, xd, &residual_bc); + + for (tile_row = 0; tile_row < pc->tile_rows; tile_row++) { + vp9_get_tile_row_offsets(pc, tile_row); + for (tile_col = n_cols - 1; tile_col >= 0; tile_col--) { + vp9_get_tile_col_offsets(pc, tile_col); + setup_token_decoder(pbi, data_ptr2[tile_row][tile_col], &residual_bc); + + /* Decode a row of superblocks */ + for (mb_row = pc->cur_tile_mb_row_start; + mb_row < pc->cur_tile_mb_row_end; mb_row += 4) { + decode_sb_row(pbi, pc, mb_row, xd, &residual_bc); + } + if (tile_row == pc->tile_rows - 1 && tile_col == n_cols - 1) + bc_bak = residual_bc; } - if (tile == pc->tile_columns - 1) - bc_bak = residual_bc; } residual_bc = bc_bak; } else { - for (tile = 0; tile < pc->tile_columns; tile++) { - pc->cur_tile_idx = tile; - vp9_get_tile_offsets(pc, &pc->cur_tile_mb_col_start, - &pc->cur_tile_mb_col_end); - - if (tile < pc->tile_columns - 1) - setup_token_decoder(pbi, data_ptr + 4, &residual_bc); - else - setup_token_decoder(pbi, data_ptr, &residual_bc); - - /* Decode a row of superblocks */ - for (mb_row = 0; mb_row < pc->mb_rows; mb_row += 4) { - decode_sb_row(pbi, pc, mb_row, xd, &residual_bc); - } - if (tile < pc->tile_columns - 1) { - int size = data_ptr[0] + (data_ptr[1] << 8) + (data_ptr[2] << 16) + - (data_ptr[3] << 24); - data_ptr += 4 + size; + for (tile_row = 0; tile_row < pc->tile_rows; tile_row++) { + vp9_get_tile_row_offsets(pc, tile_row); + for (tile_col = 0; tile_col < pc->tile_columns; tile_col++) { + vp9_get_tile_col_offsets(pc, tile_col); + + if (tile_col < pc->tile_columns - 1 || tile_row < pc->tile_rows - 1) + setup_token_decoder(pbi, data_ptr + 4, &residual_bc); + else + setup_token_decoder(pbi, data_ptr, &residual_bc); + + /* Decode a row of superblocks */ + for (mb_row = pc->cur_tile_mb_row_start; + mb_row < pc->cur_tile_mb_row_end; mb_row += 4) { + decode_sb_row(pbi, pc, mb_row, xd, &residual_bc); + } + if (tile_col < pc->tile_columns - 1 || tile_row < pc->tile_rows - 1) { + int size = data_ptr[0] + (data_ptr[1] << 8) + (data_ptr[2] << 16) + + (data_ptr[3] << 24); + data_ptr += 4 + size; + } } } } diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 02dc4edfc..257ddb2c5 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1089,14 +1089,15 @@ static void write_modes_b(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc, } static void write_modes(VP9_COMP *cpi, vp9_writer* const bc, - TOKENEXTRA **tok) { + TOKENEXTRA **tok, TOKENEXTRA *tok_end) { VP9_COMMON *const c = &cpi->common; const int mis = c->mode_info_stride; - MODE_INFO *m, *m_ptr = c->mi + c->cur_tile_mb_col_start; + MODE_INFO *m, *m_ptr = c->mi; int i, mb_row, mb_col; - TOKENEXTRA *tok_end = *tok + cpi->tok_count; - for (mb_row = 0; mb_row < c->mb_rows; mb_row += 4, m_ptr += 4 * mis) { + m_ptr += c->cur_tile_mb_col_start + c->cur_tile_mb_row_start * mis; + for (mb_row = c->cur_tile_mb_row_start; + mb_row < c->cur_tile_mb_row_end; mb_row += 4, m_ptr += 4 * mis) { m = m_ptr; for (mb_col = c->cur_tile_mb_col_start; mb_col < c->cur_tile_mb_col_end; mb_col += 4, m += 4) { @@ -2046,6 +2047,9 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest, break; } } + vp9_write_bit(&header_bc, pc->log2_tile_rows != 0); + if (pc->log2_tile_rows != 0) + vp9_write_bit(&header_bc, pc->log2_tile_rows != 1); } vp9_stop_encode(&header_bc); @@ -2075,33 +2079,45 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest, } { - int tile, total_size = 0; + int tile_row, tile_col, total_size = 0; unsigned char *data_ptr = cx_data + header_bc.pos; - TOKENEXTRA *tok = cpi->tok; - - for (tile = 0; tile < pc->tile_columns; tile++) { - pc->cur_tile_idx = tile; - vp9_get_tile_offsets(pc, &pc->cur_tile_mb_col_start, - &pc->cur_tile_mb_col_end); - - if (tile < pc->tile_columns - 1) - vp9_start_encode(&residual_bc, data_ptr + total_size + 4); - else - vp9_start_encode(&residual_bc, data_ptr + total_size); - write_modes(cpi, &residual_bc, &tok); - vp9_stop_encode(&residual_bc); - if (tile < pc->tile_columns - 1) { - /* size of this tile */ - data_ptr[total_size + 0] = residual_bc.pos; - data_ptr[total_size + 1] = residual_bc.pos >> 8; - data_ptr[total_size + 2] = residual_bc.pos >> 16; - data_ptr[total_size + 3] = residual_bc.pos >> 24; - total_size += 4; - } + TOKENEXTRA *tok[1 << 6], *tok_end; + + tok[0] = cpi->tok; + for (tile_col = 1; tile_col < pc->tile_columns; tile_col++) + tok[tile_col] = tok[tile_col - 1] + cpi->tok_count[tile_col - 1]; + + for (tile_row = 0; tile_row < pc->tile_rows; tile_row++) { + vp9_get_tile_row_offsets(pc, tile_row); + tok_end = cpi->tok + cpi->tok_count[0]; + for (tile_col = 0; tile_col < pc->tile_columns; + tile_col++, tok_end += cpi->tok_count[tile_col]) { + vp9_get_tile_col_offsets(pc, tile_col); + + if (tile_col < pc->tile_columns - 1 || tile_row < pc->tile_rows - 1) + vp9_start_encode(&residual_bc, data_ptr + total_size + 4); + else + vp9_start_encode(&residual_bc, data_ptr + total_size); + write_modes(cpi, &residual_bc, &tok[tile_col], tok_end); + vp9_stop_encode(&residual_bc); + if (tile_col < pc->tile_columns - 1 || tile_row < pc->tile_rows - 1) { + /* size of this tile */ + data_ptr[total_size + 0] = residual_bc.pos; + data_ptr[total_size + 1] = residual_bc.pos >> 8; + data_ptr[total_size + 2] = residual_bc.pos >> 16; + data_ptr[total_size + 3] = residual_bc.pos >> 24; + total_size += 4; + } - total_size += residual_bc.pos; + total_size += residual_bc.pos; + } } + assert((unsigned int)(tok[0] - cpi->tok) == cpi->tok_count[0]); + for (tile_col = 1; tile_col < pc->tile_columns; tile_col++) + assert((unsigned int)(tok[tile_col] - tok[tile_col - 1]) == + cpi->tok_count[tile_col]); + *size += total_size; } } diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 96829449b..fe33f2ebf 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1231,8 +1231,6 @@ static void encode_frame_internal(VP9_COMP *cpi) { MACROBLOCK *const x = &cpi->mb; VP9_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &x->e_mbd; - - TOKENEXTRA *tp = cpi->tok; int totalrate; // printf("encode_frame_internal frame %d (%d)\n", @@ -1313,19 +1311,19 @@ static void encode_frame_internal(VP9_COMP *cpi) { { // Take tiles into account and give start/end MB - int tile; + int tile_col; + TOKENEXTRA *tp = cpi->tok; + + for (tile_col = 0; tile_col < cm->tile_columns; tile_col++) { + TOKENEXTRA *tp_old = tp; - for (tile = 0; tile < cm->tile_columns; tile++) { // For each row of SBs in the frame - cm->cur_tile_idx = tile; - vp9_get_tile_offsets(cm, &cm->cur_tile_mb_col_start, - &cm->cur_tile_mb_col_end); + vp9_get_tile_col_offsets(cm, tile_col); for (mb_row = 0; mb_row < cm->mb_rows; mb_row += 4) { encode_sb_row(cpi, mb_row, &tp, &totalrate); } + cpi->tok_count[tile_col] = (unsigned int)(tp - tp_old); } - - cpi->tok_count = (unsigned int)(tp - cpi->tok); } vpx_usec_timer_mark(&emr_timer); diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index b8993cf25..3e5940f55 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -1105,9 +1105,13 @@ rescale(int val, int num, int denom) { return (int)(llval * llnum / llden); } -static void set_tile_limits(VP9_COMMON *cm) { +static void set_tile_limits(VP9_COMP *cpi) { + VP9_COMMON *const cm = &cpi->common; int min_log2_tiles, max_log2_tiles; + cm->log2_tile_columns = cpi->oxcf.tile_columns; + cm->log2_tile_rows = cpi->oxcf.tile_rows; + vp9_get_tile_n_bits(cm, &min_log2_tiles, &max_log2_tiles); max_log2_tiles += min_log2_tiles; if (cm->log2_tile_columns < min_log2_tiles) @@ -1115,6 +1119,7 @@ static void set_tile_limits(VP9_COMMON *cm) { else if (cm->log2_tile_columns > max_log2_tiles) cm->log2_tile_columns = max_log2_tiles; cm->tile_columns = 1 << cm->log2_tile_columns; + cm->tile_rows = 1 << cm->log2_tile_rows; } static void init_config(VP9_PTR ptr, VP9_CONFIG *oxcf) { @@ -1154,8 +1159,7 @@ static void init_config(VP9_PTR ptr, VP9_CONFIG *oxcf) { cpi->gld_fb_idx = 1; cpi->alt_fb_idx = 2; - cm->log2_tile_columns = cpi->oxcf.tile_columns; - set_tile_limits(cm); + set_tile_limits(cpi); #if VP9_TEMPORAL_ALT_REF { @@ -1382,8 +1386,7 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) { cpi->last_frame_distortion = 0; #endif - cm->log2_tile_columns = cpi->oxcf.tile_columns; - set_tile_limits(cm); + set_tile_limits(cpi); } #define M_LOG2_E 0.693147180559945309417 diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 7acaef472..1476de4da 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -347,7 +347,7 @@ typedef struct VP9_COMP { YV12_BUFFER_CONFIG last_frame_uf; TOKENEXTRA *tok; - unsigned int tok_count; + unsigned int tok_count[1 << 6]; unsigned int frames_since_key; diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c index 710ca7ea0..b125a486e 100644 --- a/vp9/encoder/vp9_segmentation.c +++ b/vp9/encoder/vp9_segmentation.c @@ -255,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; + int tile_col, mb_row, mb_col; int temporal_predictor_count[PREDICTION_PROBS][2]; int no_pred_segcounts[MAX_MB_SEGMENTS]; @@ -283,10 +283,8 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { // First of all generate stats regarding how well the last segment map // predicts this one - for (tile = 0; tile < cm->tile_columns; tile++) { - cm->cur_tile_idx = tile; - vp9_get_tile_offsets(cm, &cm->cur_tile_mb_col_start, - &cm->cur_tile_mb_col_end); + for (tile_col = 0; tile_col < cm->tile_columns; tile_col++) { + vp9_get_tile_col_offsets(cm, tile_col); 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; diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 80320c44a..81f02ee6b 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -27,6 +27,7 @@ struct vp8_extracfg { unsigned int Sharpness; unsigned int static_thresh; unsigned int tile_columns; + unsigned int tile_rows; unsigned int arnr_max_frames; /* alt_ref Noise Reduction Max Frame Count */ unsigned int arnr_strength; /* alt_ref Noise Reduction Strength */ unsigned int arnr_type; /* alt_ref filter type */ @@ -55,6 +56,7 @@ static const struct extraconfig_map extracfg_map[] = { 0, /* Sharpness */ 0, /* static_thresh */ 0, /* tile_columns */ + 0, /* tile_rows */ 0, /* arnr_max_frames */ 3, /* arnr_strength */ 3, /* arnr_type*/ @@ -172,6 +174,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, RANGE_CHECK_HI(vp8_cfg, noise_sensitivity, 6); RANGE_CHECK(vp8_cfg, tile_columns, 0, 6); + RANGE_CHECK(vp8_cfg, tile_rows, 0, 2); RANGE_CHECK_HI(vp8_cfg, Sharpness, 7); RANGE_CHECK(vp8_cfg, arnr_max_frames, 0, 15); RANGE_CHECK_HI(vp8_cfg, arnr_strength, 6); @@ -309,6 +312,7 @@ static vpx_codec_err_t set_vp8e_config(VP9_CONFIG *oxcf, oxcf->tuning = vp8_cfg.tuning; oxcf->tile_columns = vp8_cfg.tile_columns; + oxcf->tile_rows = vp8_cfg.tile_rows; #if CONFIG_LOSSLESS oxcf->lossless = vp8_cfg.lossless; @@ -416,6 +420,7 @@ static vpx_codec_err_t set_param(vpx_codec_alg_priv_t *ctx, MAP(VP8E_SET_SHARPNESS, xcfg.Sharpness); MAP(VP8E_SET_STATIC_THRESHOLD, xcfg.static_thresh); MAP(VP9E_SET_TILE_COLUMNS, xcfg.tile_columns); + MAP(VP9E_SET_TILE_ROWS, xcfg.tile_rows); MAP(VP8E_SET_ARNR_MAXFRAMES, xcfg.arnr_max_frames); MAP(VP8E_SET_ARNR_STRENGTH, xcfg.arnr_strength); @@ -1006,6 +1011,7 @@ static vpx_codec_ctrl_fn_map_t vp8e_ctf_maps[] = { {VP8E_SET_SHARPNESS, set_param}, {VP8E_SET_STATIC_THRESHOLD, set_param}, {VP9E_SET_TILE_COLUMNS, set_param}, + {VP9E_SET_TILE_ROWS, set_param}, {VP8E_GET_LAST_QUANTIZER, get_param}, {VP8E_GET_LAST_QUANTIZER_64, get_param}, {VP8E_SET_ARNR_MAXFRAMES, set_param}, |