diff options
author | paulwilkins <paulwilkins@google.com> | 2016-08-18 14:15:25 +0100 |
---|---|---|
committer | paulwilkins <paulwilkins@google.com> | 2016-08-25 15:36:16 +0100 |
commit | 635ae8bdc1f5f1fe9e94c2f14144ad4c8750b627 (patch) | |
tree | 61a85fa03e9b4d8e4e39e8ad10a35598a56747c4 /vp9/encoder/vp9_encodeframe.c | |
parent | bf7a02a4cf0ed7f34c92fc3f974d94487cf44c02 (diff) | |
download | libvpx-635ae8bdc1f5f1fe9e94c2f14144ad4c8750b627.tar libvpx-635ae8bdc1f5f1fe9e94c2f14144ad4c8750b627.tar.gz libvpx-635ae8bdc1f5f1fe9e94c2f14144ad4c8750b627.tar.bz2 libvpx-635ae8bdc1f5f1fe9e94c2f14144ad4c8750b627.zip |
Adjust coefficient optimization and tx_domain rd speed features.
Previously Tx domain rd was used in all cases above speed 0.
Coefficient optimization was only enabled for best and speed 0.
This patch selectively sets these features at other speed settings
based on block complexity.
For the Netflix and HD sets in particular the quality gains are
large compared to the speed hit. At speed 1 the average psnr
gain in the NF set is > 2.5% with one clip coming in at 18%
and some points almost 30%. Average gains for the lower
resolution test sets are around 1%.
The gains are biggest at low Q so some further optimization
may be possible.
Change-Id: I340376c7b2a78e5389a34b7ebdc41072808d0576
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index ba25ca26b..e1f38e9e4 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1336,6 +1336,22 @@ static void rd_pick_sb_modes(VP9_COMP *cpi, TileDataEnc *tile_data, // Save rdmult before it might be changed, so it can be restored later. orig_rdmult = x->rdmult; + if ((cpi->sf.tx_domain_thresh > 0.0) || (cpi->sf.quant_opt_thresh > 0.0)) { + double logvar = vp9_log_block_var(cpi, x, bsize); + // Check block complexity as part of descision on using pixel or transform + // domain distortion in rd tests. + x->block_tx_domain = cpi->sf.allow_txfm_domain_distortion && + (logvar >= cpi->sf.tx_domain_thresh); + + // Check block complexity as part of descision on using quantized + // coefficient optimisation inside the rd loop. + x->block_qcoeff_opt = + cpi->sf.allow_quant_coeff_opt && (logvar <= cpi->sf.quant_opt_thresh); + } else { + x->block_tx_domain = cpi->sf.allow_txfm_domain_distortion; + x->block_qcoeff_opt = cpi->sf.allow_quant_coeff_opt; + } + if (aq_mode == VARIANCE_AQ) { const int energy = bsize <= BLOCK_16X16 ? x->mb_energy : vp9_block_energy(cpi, x, bsize); |