Commit 916bdfd9 authored by Yunqing Wang's avatar Yunqing Wang Committed by Gerrit Code Review

Merge "Recover tile coding performance" into nextgenv2

parents f9d77d66 bdcc1405
......@@ -519,7 +519,11 @@ static const TX_TYPE filter_intra_mode_to_tx_type_lookup[FILTER_INTRA_MODES] = {
int pick_intra_filter(int angle);
#endif // CONFIG_EXT_INTRA
#if CONFIG_EXT_TILE
#define FIXED_TX_TYPE 1
#else
#define FIXED_TX_TYPE 0
#endif
static INLINE TX_TYPE get_default_tx_type(PLANE_TYPE plane_type,
const MACROBLOCKD *xd,
......
......@@ -399,7 +399,13 @@ int vp10_receive_compressed_data(VP10Decoder *pbi,
swap_frame_buffers(pbi);
vpx_extend_frame_inner_borders(cm->frame_to_show);
#if CONFIG_EXT_TILE
// For now, we only extend the frame borders when the whole frame is decoded.
// Later, if needed, extend the border for the decoded tile on the frame
// border.
if (pbi->dec_tile_row == -1 && pbi->dec_tile_col == -1)
#endif // CONFIG_EXT_TILE
vpx_extend_frame_inner_borders(cm->frame_to_show);
vpx_clear_system_state();
......
......@@ -494,7 +494,7 @@ void vp10_set_speed_features_framesize_independent(VP10_COMP *cpi) {
sf->disable_filter_search_var_thresh = 0;
sf->adaptive_interp_filter_search = 0;
sf->allow_partition_search_skip = 0;
#if CONFIG_EXT_REFS
#if CONFIG_EXT_REFS || CONFIG_EXT_TILE
sf->use_upsampled_references = 0;
#else
sf->use_upsampled_references = 1;
......@@ -530,7 +530,11 @@ void vp10_set_speed_features_framesize_independent(VP10_COMP *cpi) {
sf->simple_model_rd_from_var = 0;
// Set this at the appropriate speed levels
#if CONFIG_EXT_TILE
sf->use_transform_domain_distortion = 1;
#else
sf->use_transform_domain_distortion = 0;
#endif
if (oxcf->mode == REALTIME)
set_rt_speed_feature(cpi, sf, oxcf->speed, oxcf->content);
......
......@@ -1158,6 +1158,14 @@ static vpx_image_t *encoder_get_preview(vpx_codec_alg_priv_t *ctx) {
}
}
static vpx_codec_err_t ctrl_use_reference(vpx_codec_alg_priv_t *ctx,
va_list args) {
const int reference_flag = va_arg(args, int);
vp10_use_as_reference(ctx->cpi, reference_flag);
return VPX_CODEC_OK;
}
static vpx_codec_err_t ctrl_set_roi_map(vpx_codec_alg_priv_t *ctx,
va_list args) {
(void)ctx;
......@@ -1254,6 +1262,7 @@ static vpx_codec_err_t ctrl_set_render_size(vpx_codec_alg_priv_t *ctx,
static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
{VP8_COPY_REFERENCE, ctrl_copy_reference},
{VP8E_USE_REFERENCE, ctrl_use_reference},
// Setters
{VP8_SET_REFERENCE, ctrl_set_reference},
......
......@@ -141,6 +141,12 @@ extern vpx_codec_iface_t *vpx_codec_vp10_cx(void);
* \sa #vpx_codec_control
*/
enum vp8e_enc_control_id {
/*!\brief Codec control function to set which reference frame encoder can use.
*
* Supported in codecs: VP8, VP9
*/
VP8E_USE_REFERENCE = 7,
/*!\brief Codec control function to pass an ROI map to encoder.
*
* Supported in codecs: VP8, VP9
......@@ -703,6 +709,8 @@ typedef struct vpx_svc_ref_frame_config {
*
*/
VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int)
#define VPX_CTRL_VP8E_USE_REFERENCE
VPX_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS, int)
#define VPX_CTRL_VP8E_SET_FRAME_FLAGS
VPX_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID, int)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment