vpx/vp9/encoder
paulwilkins 5b44ef0c50 Respond more rapidly to excessive local overshoot.
This patch attempts to address a bug reported for 4K video.
https://b.corp.google.com/issues/62215394

In this instance a perfect storm of a moderate complexity section
followed by a much easier section where a CGI overlay helped to
suppress film grain noise, followed by a much harder and very grainy
section at the end, cause a massive local rate spike that pushed a chunk
over the upper allowed rate limit.

This patch detects cases where the rate for a frame is much higher than
expected and allows, in this special case, for rapid adjustment of the active
Q range.

For the example chunk in the bug report the target rate was 18Mb/s and the
observed rate was over 37 Mb/s with a surge for the last few frames to over
100Mb/s. This patch brings the overall chunk rate right back down to ~18.2 Mbit/s
and  almost completely eliminates the rate spike at the end. (See graphs appended
to bug report)

Also see  I108da7ca42f3bc95c5825dd33c9d84583227dac1 which fixes a bug
unearthed during testing of this patch and also has a bearing on high rate
encodes such as 4K.

This patch does have a negative impact on some metrics. Most notably there are
clips in our standard test set where it hurts global psnr (though in many cases it
conversely helps SSIM, FAST SSIM and PSNR-HVS). It is also worth noting that
the clips (and data rates) where there is a big metric impact, are almost all cases
where there is currently a significant overshoot vs the target rate and overall rate
accuracy is greatly improved.

Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a
2017-07-05 16:51:52 +01:00
..
arm/neon move neon load/stores to a new file 2017-05-15 08:29:43 -07:00
mips/msa vp9 temporal filter: sse4 implementation 2017-04-26 22:03:05 -07:00
x86 vp[89],vpx_dsp: add missing includes 2017-06-21 19:00:15 -07:00
vp9_alt_ref_aq.c vp9_alt_ref_aq: correct vp9_alt_ref_aq_create proto 2017-06-21 19:00:04 -07:00
vp9_alt_ref_aq.h vp9_alt_ref_aq: correct vp9_alt_ref_aq_create proto 2017-06-21 19:00:04 -07:00
vp9_aq_360.c Add cpi parameter for forcing segmentation update 2016-08-08 13:20:42 -07:00
vp9_aq_360.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_aq_complexity.c Add cpi parameter for forcing segmentation update 2016-08-08 13:20:42 -07:00
vp9_aq_complexity.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_aq_cyclicrefresh.c vp9: Adjustments for aq-mode and pickmode for speed >= 8. 2017-06-21 16:01:24 -07:00
vp9_aq_cyclicrefresh.h vp9: Adjustments to cyclic refresh for high motion. 2017-05-21 22:21:44 -07:00
vp9_aq_variance.c Casts to remove some warnings. 2016-09-01 16:10:12 +01:00
vp9_aq_variance.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_bitstream.c Merge "Row based multi-threading of encoding stage" 2017-02-15 00:54:10 +00:00
vp9_bitstream.h Changes to facilitate multi-threading of encoding stage 2017-02-02 14:47:13 +05:30
vp9_block.h cosmetics,vp9/encoder: s/txm/txfm/ 2017-06-29 15:08:47 -07:00
vp9_blockiness.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_context_tree.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_context_tree.h Record the sum of tx block eobs in the partition block 2017-03-20 17:12:15 +00:00
vp9_cost.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_cost.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_dct.c Drop zbin_ptr and quant_shift_ptr 2017-02-16 13:20:32 -08:00
vp9_denoiser.c vp9: SVC: Increase the partiiton and acskip thresholds 2017-05-11 12:28:19 -07:00
vp9_denoiser.h vp9: SVC: Increase the partiiton and acskip thresholds 2017-05-11 12:28:19 -07:00
vp9_encodeframe.c cosmetics,vp9/encoder: s/txm/txfm/ 2017-06-29 15:08:47 -07:00
vp9_encodeframe.h vp9: Incorporate source sum_diff into non-rd partition thresholds. 2017-02-21 17:22:11 -08:00
vp9_encodemb.c cosmetics,vp9/encoder: s/txm/txfm/ 2017-06-29 15:08:47 -07:00
vp9_encodemb.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_encodemv.c vp9_bitstream: Parameterize max_mv_magnitude 2016-10-12 12:50:17 -07:00
vp9_encodemv.h vp9_bitstream: Parameterize max_mv_magnitude 2016-10-12 12:50:17 -07:00
vp9_encoder.c Respond more rapidly to excessive local overshoot. 2017-07-05 16:51:52 +01:00
vp9_encoder.h vp9: compute skinmap only once before encoding. 2017-06-27 16:16:02 -07:00
vp9_ethread.c Make allow_exhaustive_searches feature no longer adaptive 2017-04-21 11:14:02 -07:00
vp9_ethread.h Row based multi-threading of encoding stage 2017-02-15 00:49:34 +00:00
vp9_extend.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_extend.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_firstpass.c Changes to modified error. 2017-05-18 12:56:02 +01:00
vp9_firstpass.h Changes to modified error. 2017-05-18 12:56:02 +01:00
vp9_frame_scale.c vp9: SVC: Add option to set downsampling filter type. 2017-05-09 17:22:44 -07:00
vp9_job_queue.h Multi-threading of first pass stats collection 2017-01-24 15:48:02 -08:00
vp9_lookahead.c vp9: normalize vpx_enc_frame_flags_t usage 2016-08-04 23:37:49 -07:00
vp9_lookahead.h vp9: normalize vpx_enc_frame_flags_t usage 2016-08-04 23:37:49 -07:00
vp9_mbgraph.c Fix for out of range motion vector bug in sub-pel motion estimation 2017-04-03 16:16:49 +00:00
vp9_mbgraph.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_mcomp.c vp9_mcomp,get_cost_surf_min: quiet conversion warning 2017-06-05 22:52:58 -07:00
vp9_mcomp.h VP9 motion vector unit test 2017-04-06 00:50:56 +00:00
vp9_multi_thread.c Make the row based multi-threaded encoder deterministic 2017-04-24 16:28:27 -07:00
vp9_multi_thread.h Multi-threading of first pass stats collection 2017-01-24 15:48:02 -08:00
vp9_noise_estimate.c vp9: compute skinmap only once before encoding. 2017-06-27 16:16:02 -07:00
vp9_noise_estimate.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_picklpf.c vp9: 1pass CBR: modify condition for reducing loop filter. 2017-02-22 15:09:45 -08:00
vp9_picklpf.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_pickmode.c Merge "cosmetics,vp9/encoder: s/txm/txfm/" 2017-06-30 21:57:16 +00:00
vp9_pickmode.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_quantize.c highbd_quantize_fp_32x32: normalize abs_qcoeff type 2017-06-21 18:56:10 -07:00
vp9_quantize.h Migrate quantization functions from vp9/ to vpx_dsp/ 2015-07-17 16:38:14 -07:00
vp9_ratectrl.c vp9: Use scene detection for CBR mode. 2017-06-23 11:44:50 -07:00
vp9_ratectrl.h vp9: Use scene detection for CBR mode. 2017-06-23 11:44:50 -07:00
vp9_rd.c Make the row based multi-threaded encoder deterministic 2017-04-24 16:28:27 -07:00
vp9_rd.h Make the row based multi-threaded encoder deterministic 2017-04-24 16:28:27 -07:00
vp9_rdopt.c cosmetics,vp9/encoder: s/txm/txfm/ 2017-06-29 15:08:47 -07:00
vp9_rdopt.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_resize.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_resize.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_segmentation.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_segmentation.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_skin_detection.c vp9: Remove avg2x2 in skin detection and clean up. 2017-06-29 03:06:23 +00:00
vp9_skin_detection.h vp9: compute skinmap only once before encoding. 2017-06-27 16:16:02 -07:00
vp9_speed_features.c vp9: Speed >= 8: Remove logic on reducing subpel. 2017-06-27 20:27:02 -07:00
vp9_speed_features.h vp9: Fix condition for disabling adaptive_rd_thresh. 2017-04-28 10:26:20 -07:00
vp9_subexp.c vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_subexp.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00
vp9_svc_layercontext.c vp9: SVC: Force subpel search off under certain conditions. 2017-06-01 20:48:52 -07:00
vp9_svc_layercontext.h vp9: SVC: Force subpel search off under certain conditions. 2017-06-01 20:48:52 -07:00
vp9_temporal_filter.c vp9: SVC: Add option to set downsampling filter type. 2017-05-09 17:22:44 -07:00
vp9_temporal_filter.h Row based multi-threading of ARNR filtering stage 2017-02-07 14:03:19 +05:30
vp9_tokenize.c Narrow cat6_high_cost tables to uint16_t 2017-03-03 23:09:12 +00:00
vp9_tokenize.h Drop vp9_get_token_extracost 2017-03-17 16:53:09 -07:00
vp9_treewriter.c vpx_dsp/prob.h: vp9_ -> vpx_ 2015-07-20 18:13:04 -07:00
vp9_treewriter.h vp9/encoder: apply clang-format 2016-08-02 16:47:11 -07:00