summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-07-12 09:02:01 -0700
committerJohann Koenig <johannkoenig@google.com>2018-07-17 18:20:46 +0000
commitb1284dffdb16b82e940e39b226b656801c83289b (patch)
tree6ef9e6412654b6bc4804d88c1c667cabe2da895a /vp9/encoder/vp9_encodeframe.c
parentde302686b2b3f6bc2e1b0a1e43dd99bb97f5377a (diff)
downloadlibvpx-b1284dffdb16b82e940e39b226b656801c83289b.tar
libvpx-b1284dffdb16b82e940e39b226b656801c83289b.tar.gz
libvpx-b1284dffdb16b82e940e39b226b656801c83289b.tar.bz2
libvpx-b1284dffdb16b82e940e39b226b656801c83289b.zip
Reland "Enable tpl model for speed 0"
This is a reland of 9c2c234a0b8f9c08719ac1fa286988a0a3626fd0 Threaded mismatch has been addressed. Original change's description: > Enable tpl model for speed 0 > > Enable adaptive Lagrangian multiplier for arf in speed 0, AQ mode 0, > and low bit-depth settings. This improves the peak compression > performance: > > avg PSNR overall PSNR SSIM > low -0.462% -0.535% -0.358% > mid -0.780% -0.857% -0.868% > hd -0.914% -1.017% -0.471% > 720p -0.624% -0.671% -1.553% > nflx2k -0.764% -0.784% -0.908% > > The encoding time at speed 0 is slightly changed to be faster or > slower: > > city_cif 1000 kbps > 78.2 seconds -> 78.1 seconds > > bus_cif 1000 kbps > 98.6 seconds -> 98.8 seconds. > > Change-Id: I18e7337bb61d985cbd3cf29e56439a6cdf675389 BUG=webm:1547 Change-Id: I025a21683ceed23d5f7147e200555b58b791315c
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 5d7a4ebb7..8f622d0ed 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1958,10 +1958,10 @@ static void rd_pick_sb_modes(VP9_COMP *cpi, TileDataEnc *tile_data,
if (cyclic_refresh_segment_id_boosted(
get_segment_id(cm, map, bsize, mi_row, mi_col)))
x->rdmult = vp9_cyclic_refresh_get_rdmult(cpi->cyclic_refresh);
+ } else {
+ if (cpi->sf.enable_tpl_model) x->rdmult = x->cb_rdmult;
}
- if (cpi->sf.enable_tpl_model) x->rdmult = x->cb_rdmult;
-
// Find best coding mode & reconstruct the MB so it is available
// as a predictor for MBs that follow in the SB
if (frame_is_intra_only(cm)) {
@@ -2122,7 +2122,10 @@ static void encode_b(VP9_COMP *cpi, const TileInfo *const tile, ThreadData *td,
PICK_MODE_CONTEXT *ctx) {
MACROBLOCK *const x = &td->mb;
set_offsets(cpi, tile, x, mi_row, mi_col, bsize);
- if (cpi->sf.enable_tpl_model) x->rdmult = x->cb_rdmult;
+
+ if (cpi->sf.enable_tpl_model && cpi->oxcf.aq_mode == NO_AQ)
+ x->rdmult = x->cb_rdmult;
+
update_state(cpi, td, ctx, mi_row, mi_col, bsize, output_enabled);
encode_superblock(cpi, td, tp, output_enabled, mi_row, mi_col, bsize, ctx);
@@ -3710,7 +3713,9 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
int rate_breakout_thr = cpi->sf.partition_search_breakout_thr.rate;
int must_split = 0;
- int partition_mul = cpi->sf.enable_tpl_model ? x->cb_rdmult : cpi->rd.RDMULT;
+ int partition_mul = cpi->sf.enable_tpl_model && cpi->oxcf.aq_mode == NO_AQ
+ ? x->cb_rdmult
+ : cpi->rd.RDMULT;
(void)*tp_orig;