summaryrefslogtreecommitdiff
path: root/vp9/encoder
AgeCommit message (Collapse)Author
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-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-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
2018-05-08vp9-svc: Fix to SVC for frame dropping.Marco Paniconi
When the previous frame is dropped, for the current spatial layer make sure the lst_fb_idx corresponds to the buffer index last updated on the (last) encoded TL0 frame(for same spatial layer). This is needed to preserve the temporal prediction pattern for fixed/non-flexible mode under frame dropping. Change-Id: Ifc8e257beb025654a81580c4da0a181235724508
2018-05-08Improved slide show codingpaulwilkins
This patch improves coding of slide shows with fade or other complex transitions. Previously, fades and other complex transitions between static "slides" were sometimes being incorrectly marked such that they were coded as a single static slide rather than two slides with a transition. As the initial key frame for the first slide is not necessarily a good predictor of the second slide and ARFs were turned off, this led to a poor visual and metrics outcome in some such cases. This patch allows for long GF groups in static sections before and after a complex transition (instead of just with simple slide transitions) with one or more normal ARF groups during the transition. It also enforces a single "normal" length GF group after the transition before any extended group is allowed. The reason for this is that the ARF that spans the transition my not have a very high quality and hence may not act as a good GF for the long static section that follows. Change-Id: Ica1f979e27d8a0625f3cebf7b7cf6d69edccaba9
2018-05-04Don't use transform domain distortion when eob is 0Hui Su
When eob is 0, pixel domain distortion is more accurate and efficient. This mainly affects speed >= 2. Speed 0 always use pixel domain distortion; speed 1 use it most of the time. Compression impact(negative means gain): speed 2 speed 3 speed 4 lowres -0.04% -0.06% -0.06% midres -0.10% -0.10% -0.20% hdres -0.01% -0.03% -0.06% Encoding speed is about neutral. Change-Id: I77b957658deeaad57381fd13afc11bacdec8c08f
2018-05-04Merge "vp9-svc: Reset fb_idx for unused references."Marco Paniconi
2018-05-03vp9-svc: Add memset on the svc fb_idx.Marco Paniconi
The memset is added to better handle frame drops with the GET_SVC_REF_FRAME_CONFIG contro There is an issue with some tests in bypass mode, so condition it on that for now. Change-Id: I2635037143f14ff62a36be7c22b2b604a0c1efc2
2018-05-03vp9-svc: Reset fb_idx for unused references.Marco Paniconi
For fixed (non-flexible) SVC mode. No change in behavior. Needed for future change to make Intra-only frame work. Change-Id: I91e18776e7ef27c9c6fcbc8d5f64764d9cc3d9a9
2018-05-03vp9-svc: On key frame update all reference slots for SVC.Marco Paniconi
Key frame updates the slots corresponding to the 3 references last/golden/altref, but for SVC where more references buffers may be in use, especialy for dynamically swithing up/down in layers, make sure we should update all 8 slots on key frame. Change-Id: Ifcca12608f420d5bae32b92794a3afe9b6369f77
2018-05-01Clean switch cases in vp9 encoderLinfeng Zhang
To save a branch. Change-Id: Ifa2be7583e95c6991784731c654bbd4cce31e993