summaryrefslogtreecommitdiff
path: root/vp9
AgeCommit message (Collapse)Author
2018-06-05vp9: Move up reset of cyclic refresh under dynamic resize.Jerome Jiang
When resize happens and cyclic refresh is not applied on the current (resized) frame, the sb_index is not reset and then might be out of boundary on future frames when the cyclic refresh is applied. Change-Id: I05282fc4bc2323522d60e019ed0790d69221a2f7
2018-06-04vp9-svc: Allow usage of second (long term) temporal reference.Jerome Jiang
Allow for second temporal reference for top spatial layer in SVC, when inter-layer prediction is disabled on INTER frames. The second temporal reference is labelled as the golden reference and the update/refresh of this reference buffer is only on base temporal layer superframes. For now the period of refresh is fixed at every 20 TL0 superframes. Average gain is ~4% on RTC set, several clips up by ~8-12%. Speed loss is about ~2% on mac. Feature is disabled as default for now. Change-Id: I2e5db5052c62dbe958a3b14be97d043823b7a529
2018-05-31Merge "VP9: Allow for bilinear subpel interp at speed 9 for high motion."Jerome Jiang
2018-05-31Merge "vp9-svc: Fix to some frame metrics for real-time mode."Marco Paniconi
2018-05-31VP9: Allow for bilinear subpel interp at speed 9 for high motion.Jerome Jiang
Fixed some settings in nonrd pick mode to allow for frame-level bilinear to be set. On Galaxy S8+ it has 4% speed up on high motion clips. Almost the same for low motion. 0.17% quality loss on RTC. Change-Id: I044a7de020183754ba08bb6c96c5a78ba5c7fea2
2018-05-31Merge "Improve the ML based partition pruning"Hui Su
2018-05-31vp9-svc: Fix to some frame metrics for real-time mode.Marco Paniconi
Add condition of LAST frame to the consec_zeromv and avg_frame_low_motion metrics. This is needed for SVC as the golden reference is a spatial reference and should not be included in the metric computation. Small/negligible change in metrics on RTC set. Change-Id: I6ea16298fae566bb288c34cf50d120b509146eee
2018-05-31Improve the ML based partition pruningHui Su
Add a neural net model that uses the same features as the existing linear model. Make the pruning decision based on both the linear and the neural net model. It provides more accurate predictions, and may improve compression and/or encoding speed. This only affects speed 0. Coding gain: 0.37% on midres 0.34% on hdres 0.50% on jvet8b720p Encoding speed impact(average over locally tested 20 clips from midres and hdres): QP=20: down by 2.5%. QP=30: down by 3.9%. QP=40: donw by 4.5%. QP=50: up by 5.2%. Change-Id: I402ec799745ad3b74abf0789fa5e124fe64e704d
2018-05-30vp9-svc: Fix to compute some metrics on top spatiail layer.Marco Paniconi
The avg_frame_low_motion and consec_zeromv are frame-level metrics that are updated on every frame. For SVC these should be updated on top spatial layer (full resolution). Small/negligible change in metrics. Change-Id: Ibe14f05be3b82daa9dd60378097ff11a27f1b95e
2018-05-30vp9: Refactor code for q adjustment in CBR mode.Marco Paniconi
Move the adjustment code to separate function. Change-Id: I876b246a5c26095f262bb9a19f03d1f17077225d
2018-05-30Merge "Revert 3 slide show coding changes"James Zern
2018-05-30Revert 3 slide show coding changesJames Zern
This is a combination of the following 3 reverts. The changes cause issues on certain hardware devices. We'll pull them for now to allow for further investigation. Revert "Experiment regarding playback problems on Bravia TVs." This reverts commit 624f8105f5ae7e0bc82bdc7e10a4253295134a8b. Revert "Improved slide show coding" This reverts commit f4091bc30eef0fcacb5d5bd74ab7cfbc3c8aab5f. Revert "Improved coding on slide show content." This reverts commit 2fa333c2ae1b6fcc1864de12a7ad344a16e2ac0a. BUG=b/77492144 Change-Id: Ifba937792d644a9286307262f050216408e8ecf4
2018-05-29vp9: Adjust cyclic refresh and limit frame-level q.Marco Paniconi
For CBR mode with aq-mode=3: reduce delta-q for second segment and limit how much the frame-level q can decreae from one frame to the next. Reduces bitrate spikes in slide/sreen content. Change-Id: Id9ac4b7270f07e09690380755cfbef4aec5c26dc
2018-05-28vp9-realtime: Move frame dropper to after scene detection.Marco Paniconi
Move frame dropper to after scene detection and noise estimation. Scene detection and noise estimation operate on source data and update metrics along sequence, so they should be moved before the frame dropper. Also we don't want to drop on scene change, as the scene detection and (possible) re-encode step will be missed. Change-Id: I3d9e16d785bd5ace6707db2abce77ddc110bfef4
2018-05-28vp9-svc: Fix to allowed value of max_consec_drop.Marco Paniconi
For the max_consec_drop parameter in svc frame drop: since passing value 0 in the control would completely disable the dropper, only allow for values >= 1 to be set. Change-Id: I6b74ec9cc08a638fa571d6246a021dab9c811d14
2018-05-25Merge "VP9: Fix issues with high bitdepth in real-time."Marco Paniconi
2018-05-24VP9: Fix issues with high bitdepth in real-time.Jerome Jiang
Disable denoiser, skin detection and aq-mode for high bitdepth for now. BUG=webm:1534 Change-Id: I361a4e20b2319041148af497bf7043bfd5c5f589
2018-05-24vp9-svc: Add max_consec_drop to SVC frame drop.Marco Paniconi
For any spatial, limits the amount of consecutive frame drop. Change-Id: I692d90363f329f571f2b59e12cc680ad2e76065d
2018-05-23vp9: Rate control adjustments for screen content.Marco Paniconi
For screen content mode: changes to reduce occurence of significant QP decrease (from one frame to next), which can cause large frames (overshoot/delay). -cap the buffer increase to optimal level for frame drop mode where full superframe can drop -reduce the max_adjustment_down due to buffer overflow -reduce qp threshold to trigger re-encode on large frame Change-Id: I3e30e4814192b5f728abff3f7359eb64f561b8f0
2018-05-23Merge "Experiment regarding playback problems on Bravia TVs."Paul Wilkins
2018-05-22vp9-svc: Add full superframe drop mode.Marco Paniconi
This will check for dropping full superframe if any spatial layer is overshooting. Change-Id: Ic656807028ebef5552301b6d10399fbe3a6c890c
2018-05-21vp9-svc: Small code cleanup in nonrd-pickmode.Marco Paniconi
Rename a flag to indicate it is for the inter_layer reference. Change-Id: Ib198d3df95fb912259efde854613592c724b7c49
2018-05-21Merge "vp9-svc: Fix on disabling inter_layer prediction."Marco Paniconi
2018-05-19vp9-svc: Fix on disabling inter_layer prediction.Marco Paniconi
In vp9_svc_constrain_inter_layer_pred() we disable the inter_layer prediction if anything but only the previous spatial layer (from same supeframe) is used for inter_layer prediction. This check and disabling was only allowed when the control VP9E_SET_SVC_INTER_LAYER_PRED is set to INTER_LAYER_PRED_ON_CONSTRAINED. But the control VP9E_SET_SVC_INTER_LAYER_PRED is needed for setting: INTER_LAYER_PRED_ON/INTER_LAYER_PRED_OFF/INTER_LAYER_PRED_OFF_NONKEY. So there is a conflict with setting INTER_LAYER_PRED_ON_CONSTRAINED. Fix for now is to always allow for this disabling check (disable inter_layer reference if its not previous spatial layer) as long as inter_layer prediction is used (i.e., not set to _OFF). A separate fix if needed may be to invoke another control for setting INTER_LAYER_PRED_ON_CONSTRAINED. This was causing an issue with enabling spatial layers on the fly (say spatial layer 2), where since INTER_LAYER_PRED_ON_CONSTRAINED was not set (default), the inter_layer prediction was then using a reference from 2 spatial layers below (spatial layer 0). Change-Id: Ic6434000665f63aab27c509b5eb7b8fc965827bc
2018-05-19vp9-svc: Fix issue with reseting lst_fb_idx.Marco Paniconi
When encoding a given spatial layer and the same spatial layer on previous superframe was dropped (or disabled due to 0 bitrate), the lst_fb_idx for current layer is set to the buffer index that was last updated on TL0 frame (for the same spatial layer). This condition was to maintain proper temporal prediction pattern under frame drops, and it should only apply to INTER frames. But the condition was causing an assert to be triggered on spatial layers whose base are key frames. Fix is to condition this reset of lst_fb_idx on the "is_key_frame" flag. Also initialize the fb_idx_upd_tl0 to -1 and only use it for a given spatial layer if its been set. These issues can happen when superframe drop happens just before a key frame, or when stream starts with lower layers and dynamically enabled higher spatial layers. Added datarate unittest the inserts key frame after superframe drop, and verified that this fix is needed for test to pass. Also modified the existing DisableEnable spatial layer test to trigger the issue of using fb_idx_upd_tl0 when it hasn't been set for a spatial layer. Change-Id: I059d1135736aca17e1326b9b4a2b16371eb4634e
2018-05-18Experiment regarding playback problems on Bravia TVs.Paul Wilkins
This patch experimentally reduces the maximum GF interval for static content such as slide shows. It does not fully revert the previous slide show patches as this still allows the codec to code static sections only using GFs groups rather than ARF groups or a mix of ARF and GF groups. However, the maximum group length is reduced. Change-Id: Ia968b608efb9a67d2402b12e979695d58ddc1ad7
2018-05-17vp9-svc: Skip find_predictors based on ref_frame_flags.Marco Paniconi
Has some effect for SVC on base spatial layers (which only reference LAST) or on upper spatial layers when inter_layer prediction is disabled. Small speedup on Mac of ~1%, for 3 layer SVC with inter-layer prediction disabled. Change-Id: I05be5da8843e0d32e9d85f6eb951cf1894e781d8
2018-05-16vp0-svc: Small code cleanup in nonrd-pickmode.Marco Paniconi
Change-Id: I0bc9a555064f053a00c1ab9a4dd2557ccf5537d8
2018-05-16vp9-svc: Enable scene detection and re-encode for SVC.Marco Paniconi
Keep a lower rate threshold for video case. Also lower the exiting threshold somewhat for screen-content mode. Change-Id: I79649a36678d802fd4d4080754fd366e78904214
2018-05-16Merge "Use the updated best rd cost for transform block search"Jingning Han
2018-05-15Use the updated best rd cost for transform block searchJingning Han
The compression performance change is +/-0.01% for both speed 0/1. Locally tested the encoding speed: ped_1080p 150 frames speed 0 79544 b/f 41.339 dB 503072 ms -> 79566 b/f 41.338 dB 493009 ms. speed 1 79789 b/f 41.152 dB 104583 ms -> 79770 b/f 41.153 dB 102607 ms Change-Id: Ief200b613608643e5708cebe979982eb4a84831b
2018-05-15vp9: Some speed feature settings for speed 9.Marco Paniconi
Disable 8x8 blocks for higher resolutions, reduce mv_thresh for 1/2 subpel motion, and disable golden reference at superblock level based on source sad and motion content. ~6% loss in RTC metrics over current speed 9. Speedup about ~10% for high motion clip on linux. Change-Id: I7ff8f81ac93ee8a90d5a1f4837c955d000bd75e7
2018-05-15Merge "Make a config time flag"Yaowu Xu
2018-05-14Merge "vp9-realtime: Enable alt_ref at speed 5, for live."Marco Paniconi
2018-05-14Make a config time flagYaowu Xu
This commit replace a hard coded macro with a macro defined by a configure command. Change-Id: Ib31354d61865314ed43e2c429c72b4ef2c8fa2a7
2018-05-14Fixes for consistent encoding across recodes of a frameRanjit Kumar Tulabandu
Change-Id: I094bca857f0fc2c067a4d08d1b36370fe61c25aa
2018-05-14vp9-realtime: Enable alt_ref at speed 5, for live.Marco Paniconi
Enable alt_ref and compound prediction at speed 5. For 1 pass VBR mode, when lag > 0. Gain for Live set: ~3% gain on average, several clips have gains ~5-15%. Encoder fps decrease ~5-10%, on desktop with 4 threads. For now enable it only for resolutions <= 1280x720. Change-Id: I25e3d61a2244a3a01962624052c5adf4837965c7
2018-05-14Merge "vp9-svc: Add conditon to asserts on prediction pattern."Marco Paniconi
2018-05-14vp9-svc: Add conditon to asserts on prediction pattern.Marco Paniconi
Add condition that inter-layer prediction is on. Change-Id: I84d8c73be4296e7b6b79abb7e5e5e6dbaa6e0600
2018-05-14VP9: Add speed 9 for subpel search.Jerome Jiang
Set subpel search stop to 2 when motion vector is non zero. 10% speedup on 1 and 2 threads on Samsung Galaxy S8+. Change-Id: I7323bb913000229cf60a37495bf88bcc51d0ac96
2018-05-13vp9-svc: Update layer_id of frame buffer idx last refreshed.Marco Paniconi
Remove some unused code and add parameter to keep track of the layer_id of the frame buffer indices last refreshed. This is useful for verifying constaints on spatial-temporal pattern, for fixed/non-flexible mode. Change-Id: I6957bb43157eb31df49dac1b8245facc043e4a49
2018-05-12Merge "Fix valgrind failure on uninitialized values."Jerome Jiang
2018-05-11Fix valgrind failure on uninitialized values.Jerome Jiang
Change-Id: I917d884c9fab9b15bb092de5675f92225f1cdebd
2018-05-11vp9-svc: Fix pattern update for skip enhancement layers.Marco Paniconi
Use the same logic as for dropped frames to be consistent. Change-Id: I16fd317e70514fe8516d9eb350c275d1813e943e
2018-05-11Merge "vp9-svc: Fix when whole superframe is dropped."Marco Paniconi
2018-05-11vp9-svc: Fix when whole superframe is dropped.Marco Paniconi
When the whole superframe is dropped (due to rate control), don't increment the temporal layer counter. This is a temporary fix to prevent an issue where temporal prediction pattern is possibly broken. Updated svc_datarate tests to handle this case. Change-Id: Icac44fdc9d0f08a957776c937584db4b2c7927c7
2018-05-10vp9: Adjust some early exits in nonrd-pickmode.Marco Paniconi
Condition some early exitis in nonrd-pickmode on the motion vector, to make sure we always test (0, 0) for inter-layer prediction. Change-Id: Id0e790ecc75ccfb7031d3e8786ccdd13781d81fe
2018-05-09vp9-svc: Fix inter-layer early exit threshold.Marco Paniconi
If the scale factors are 1 (no scaling), set the threshold for skipping the inter-layer prediction to 0, so we will more often test this mode. Improves quality for upper layers for quality layers in svc mode. Change-Id: Iaf848d44f6cc153780db861b76517a4cf9672c45
2018-05-09Merge "Don't use transform domain distortion when eob is 0"Hui Su
2018-05-09Merge "vp9-svc: Fix to SVC for frame dropping."Marco Paniconi