diff options
author | Johann <johannkoenig@google.com> | 2019-12-19 15:13:14 -0800 |
---|---|---|
committer | Johann <johannkoenig@google.com> | 2020-01-13 15:18:33 -0800 |
commit | 6ec360e770aae975eb3702467d9df6f76bc29700 (patch) | |
tree | 2aefc46ce3861ac17b136a0d66f82212c5bfa5ab /libvpx/vp9/encoder/vp9_pickmode.c | |
parent | f95b460169fe5b77f1d493fd2e58b31a2dbf816b (diff) | |
download | libvpx-6ec360e770aae975eb3702467d9df6f76bc29700.tar.gz |
libvpx: Pull from upstream
Current HEAD: 7ec7a33a081aeeb53fed1a8d87e4cbd189152527
git log from upstream:
7ec7a33a0 Release v1.8.2 Pekin Duck
Test: upstream
Change-Id: If7ab690a76b3cd93a3c922d5e9fc9a3996668005
Diffstat (limited to 'libvpx/vp9/encoder/vp9_pickmode.c')
-rw-r--r-- | libvpx/vp9/encoder/vp9_pickmode.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/libvpx/vp9/encoder/vp9_pickmode.c b/libvpx/vp9/encoder/vp9_pickmode.c index 513b9f678..9b2e48505 100644 --- a/libvpx/vp9/encoder/vp9_pickmode.c +++ b/libvpx/vp9/encoder/vp9_pickmode.c @@ -1501,7 +1501,8 @@ static void search_filter_ref(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc, int best_early_term = 0; int best_flag_preduv_computed[2] = { 0 }; INTERP_FILTER filter_start = force_smooth_filter ? EIGHTTAP_SMOOTH : EIGHTTAP; - for (filter = filter_start; filter <= EIGHTTAP_SMOOTH; ++filter) { + INTERP_FILTER filter_end = EIGHTTAP_SMOOTH; + for (filter = filter_start; filter <= filter_end; ++filter) { int64_t cost; mi->interp_filter = filter; vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize); @@ -1531,9 +1532,11 @@ static void search_filter_ref(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc, free_pred_buffer(*this_mode_pred); *this_mode_pred = current_pred; } - current_pred = &tmp[get_pred_buffer(tmp, 3)]; - pd->dst.buf = current_pred->data; - pd->dst.stride = bw; + if (filter != filter_end) { + current_pred = &tmp[get_pred_buffer(tmp, 3)]; + pd->dst.buf = current_pred->data; + pd->dst.stride = bw; + } } } } @@ -1554,6 +1557,9 @@ static void search_filter_ref(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc, if (reuse_inter_pred) { pd->dst.buf = (*this_mode_pred)->data; pd->dst.stride = (*this_mode_pred)->stride; + } else if (best_filter < filter_end) { + mi->interp_filter = best_filter; + vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize); } } @@ -1713,9 +1719,9 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, // process. // tmp[3] points to dst buffer, and the other 3 point to allocated buffers. PRED_BUFFER tmp[4]; - DECLARE_ALIGNED(16, uint8_t, pred_buf[3 * 64 * 64]); + DECLARE_ALIGNED(16, uint8_t, pred_buf[3 * 64 * 64] VPX_UNINITIALIZED); #if CONFIG_VP9_HIGHBITDEPTH - DECLARE_ALIGNED(16, uint16_t, pred_buf_16[3 * 64 * 64]); + DECLARE_ALIGNED(16, uint16_t, pred_buf_16[3 * 64 * 64] VPX_UNINITIALIZED); #endif struct buf_2d orig_dst = pd->dst; PRED_BUFFER *this_mode_pred = NULL; @@ -2554,6 +2560,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data, if (!((1 << this_mode) & cpi->sf.intra_y_mode_bsize_mask[bsize])) continue; + if (cpi->sf.rt_intra_dc_only_low_content && this_mode != DC_PRED && + x->content_state_sb != kVeryHighSad) + continue; + if ((cpi->sf.adaptive_rd_thresh_row_mt && rd_less_than_thresh_row_mt(best_rdc.rdcost, mode_rd_thresh, &rd_thresh_freq_fact[mode_index])) || |