Commit Graph

45 Commits

Author SHA1 Message Date
Marco
55db4f033f vp9: Increase convergence speed of noise estimation.
Increase the recursive average factor from 15/16 to 3/4
to make the noise estimation respond faster.

Small/neglible change on low noise content, but better
denoising for noisy content.
Also encoder speedup of ~2-3% observed on some noisy clips.

Change-Id: I9dd02fe961ca24b411fe4c2732f814bf1e9a7f9f
2018-01-04 14:29:27 -08:00
Jerome Jiang
c1e511fd82 vp9 svc: Allow denoising next to highest resolution.
Denoise 2 spatial layes at most.

Add noise sensitivity level 2 for vp9 such that applications can control
whether to denoise the second highest spatial layer.

Add tests to cover this case.

Change-Id: Ic327d14b29adeba3f0dae547629f43b98d22997f
2017-12-11 15:20:19 -08:00
Marco
5d6c1c2d8f vp9: Adjust noise estimation for 360p.
Change-Id: Ib76875232491b14f7114061e8e913e87004427a0
2017-07-31 17:12:58 -07:00
Jerome Jiang
682135fa60 vp9: Compute skin only for blocks eligible for noise estimation.
Change-Id: Iddcb83a5968db57cfd312c5bc44b2a226a2a3264
2017-07-14 15:14:30 -07:00
Jerome Jiang
3d6b0cb825 vp9: Move skinmap computation into multithreading loop.
Change-Id: Iebc9dd293d8b1449c0674c0295349297e9b90646
2017-07-10 17:18:15 -07:00
Jerome Jiang
a220b931f5 vp9: compute skinmap only once before encoding.
This could save some cycles since skin detection is used in multiple
places in vp9.

1~2% speed up on ARM.

Change-Id: I86b731945f85215bbb0976021cd0f2040ff2687c
2017-06-27 16:16:02 -07:00
Marco
2f11a65c99 vp9; Adjust noise estimation thresholds.
Change-Id: Ia41a11df18e5a58d2b8bbecd11c249d357de2a8f
2017-05-10 16:48:10 -07:00
Jerome Jiang
2574573fea vp9: Wrap threshold tuning for HD only when denoiser is enabled.
Fixes a speed regression.

Change-Id: I23d942e4af17fa81fe4a366c7369b3ad537e59b0
2017-05-10 12:15:41 -07:00
Marco
1b59964162 vp9: Adjustment to noise estimation.
When the noise estimate is forced off due to large motion,
reset the counter and set smaller window for next estimate.

Change-Id: Ifa4ec95396134173a00d48353ad52f1b6a40c217
2017-05-10 09:39:08 -07:00
Marco
34cce144d8 vp9: Adjust some thresholds for noise estimation.
Adjust thresholds for noise estimation, for resolutions above VGA.
Tends to push cleaner/low noise clips to LowLow state.

No change in RTC metrics.

Change-Id: I739ca6b797d0a60ccd1c6c6a2775269b1f007e5e
2017-05-05 12:00:12 -07:00
Jerome Jiang
af69ed20c4 vp9: Enable noise estimation on low res.
Set noise level to kLowLow for high motion low res clips.
Change the normalization in noise metric for low res.
Reduce the initial time-window for all resolutions.

Change-Id: Iaed39dbb50b205cd9c735dc5b84822304fb01987
2017-05-04 15:38:23 -07:00
Marco
349c3118bd vp9: Fix to noise estimation for temporal denoising.
If the noise estimation is avoided due to large motion,
the last_source for denoising should still be updated.

Change-Id: I67155ea7dbe9ac2785978e64a27bdafd7d57aac0
2017-04-07 09:23:30 -07:00
Marco
a340c64a79 vp9: Fix some issues with denoiser and SVC.
Fix the update of the denoiser buffer when the base
spatial layer is a key frame. And allow for better/lower
QP on high spatial layers when their base layer is key frame.

Change-Id: I96b2426f1eaa43b8b8d4c31a68b0c6d68c3024a2
2017-03-15 17:19:17 -07:00
Marco
db99840bf6 vp9: Fixes for usage of skin_map for high bit depth.
Also avoid noise_estimation and source_sad if use_highbitdepth is set.

Change-Id: I5fea396b8f8380ea377045d99ba22a52b92daa46
2017-01-26 19:57:59 -08:00
Marco
7e3a82c384 vp9: Make the denoiser work with spatial SVC.
If enabled denoiser will only denoise the top spatial layer for now.

Added unittest for SVC with denoising.

Change-Id: Ifa373771c4ecfa208615eb163cc38f1c22c6664b
2017-01-10 17:23:58 -08:00
Marco
768b1f7281 vp9: 1 pass cbr: allow noise estimation down to 360p.
Also adjust some thresholds for noise level setting.

Change-Id: I7e03d7057ef2061c9447728deb9c6aff5d3da4b7
2017-01-03 16:26:22 -08:00
Marco
6e8dbc76ad vp9: With denoising on, only estimate noise level for higher resolns.
Allow it for resolns above 640x360 for now.

Change-Id: I087d0d8173f96b316164fdd4a499110ce2e7a233
2016-12-19 10:05:54 -08:00
clang-format
e0cc52db3f vp9/encoder: apply clang-format
Change-Id: I45d9fb4013f50766b24363a86365e8063e8954c2
2016-08-02 16:47:11 -07:00
James Zern
5e679848e8 Merge changes from topic 'missing-proto'
* changes:
  vp9_frame_scale_ssse3.c: make 2 functions static
  vp9_pickmode.c: make function static
  vp9_noise_estimate.c: make function static
  vp9_aq_360.c: add missing include
  vp9_idct_intrin_sse2: add missing vp9_rtcd.h include
  vpx_dsp/*.[hc]: add missing vpx_dsp_rtcd.h include
2016-05-06 02:25:29 +00:00
James Zern
264c174fca vp9_noise_estimate.c: make function static
enable_noise_estimation() is local to this module

Change-Id: Id736c419387ca1959695dd327ce164bec029b597
2016-05-04 15:09:05 -07:00
Marco
ff3866dc43 vp9-noise estimation. Decrease frame period for estimating noise.
Makes the noise estimation react little faster.
Little/no change in metrics.

Change only affects 1 pass cbr.

Change-Id: I13f0daa90ecbf9d49eb1cf2e48febd9d92292940
2016-05-04 12:43:02 -07:00
Marco
9f90473ef8 vp9: Fix condition to update consec_zero_mv.
Fix will reset the consec_zero_mv map on non-skipped blocks with non-zero mv.
Adjust thresholds on consec_zero_mv in noise estimation and skin detection,
as more possible reset on map means lower thresholds should be used.

Change-Id: Ibe8520057472b3609585260b51b6f95a38fb777d
2016-04-25 15:29:11 -07:00
Marco
8b25dd599f vp9: Add rc quantity to track amount of low motion in scene.
Use it for now in noise estimation to bypass estimation if
motion level is high.

Change-Id: I033662dc909f2060e4e81abf562a7ad262dc8170
2016-04-25 09:07:35 -07:00
Marco
80ed9e4f5c vp9-noise estimation: Add check on whether skin detection is enabled.
Change-Id: Ie80b7a14e3505c40b5742793f84aa6fb9d21dab5
2016-04-22 10:37:00 -07:00
Marco
adf8533cee vp9: Move consec_zero_mv from cyclic refresh to cpi struct.
So it can be used even with aq-mode=3 not enabled.
Also cleans up some code in the places where its used.

No change in behavior.

Change-Id: Ib6b265308dbd483f691200da9a0be4da4b380dbc
2016-04-22 08:09:39 -07:00
Marco
5572ab1d02 vp9-noise estimate: Adhust threshold for Low level detection.
Change-Id: I1c78255c81cb4ac218964c80f8ecaf29f95b875b
2016-04-04 12:33:08 -07:00
Marco
9ff73fe092 vp9-noise estimation: Increase threshold for Low-level.
This make it more likely clean/low-noise content will
be set as LowLow, and hence no denoising will be done.
Also set early exit on denoising for small blocks.

Change-Id: I4a72bba3e6c5e2d523d304c39deacc9c39bf216c
2016-04-04 09:32:22 -07:00
Marco
ce39add465 vp9: Improvement to skin detection.
Add consec_zeromv to skin detection.
Reduces false detection in steady background areas.

Change-Id: Ic31c831537d29f082f58477f82ed78f313d7dd30
2016-03-17 16:26:10 -07:00
Marco
9b24251c91 vp9-noise estimate: Put check to avoid possible out of bounds.
Put check to avoid possible out of bounds when looping
over the blocks to estimate noise level.
No change in behavior.

Change-Id: I4b7b19b7edee0ae1c35b9dc0700b1bf9b304d7f5
2016-01-31 22:29:51 -08:00
James Zern
fb58a84c68 vp9_noise_estimate: protect copy_frame w/CONFIG check
This is only used with CONFIG_VP9_TEMPORAL_DENOISING

Change-Id: I61a1814d43d71235077a2426f7bfce141677a79a
2016-01-26 20:09:36 -08:00
Marco
a8b7c6aad3 vp9-skin detection: Refactoring.
Add function to compute skin map for a given block, as its
used in several places (cyclic refresh, noise estimation, and denoising).

Change-Id: Ied622908df43b6927f7fafc6c019d1867f2a24eb
2016-01-04 16:58:06 -08:00
Marco Paniconi
f3e7539c67 Revert "Add "unknown" status for noise estimation."
This reverts commit e15fedb925.

Change-Id: Ibf2bce008c727a9754f88814b7630095fa7b8253
2015-12-15 16:44:40 +00:00
jackychen
e15fedb925 Add "unknown" status for noise estimation.
Change-Id: I0fe95332ccfa2e1ad2a01a8e7ddd631289e0f8eb
2015-12-14 15:38:20 -08:00
Marco
b12e353424 vp9-noise estimate: Move level setting to a function.
This is so we may update level at any time (e.g., to be used
for setting thresholds in variance-based partition).

Change-Id: I32caad2271b8e03017a531f9ea456a6dbb9d49c7
2015-12-03 13:11:49 -08:00
Marco
f1f74a4e6c vp9: Update to noise estimation for denoising.
Change initial state of noise level, and only update
denoiser with noise level when estimate is done.

Change-Id: If44090d29949d3e4927e855d88241634cdb395dc
2015-11-30 10:03:20 -08:00
Marco
988fd77c1f Reduce sampling time for noise estimate.
Change-Id: I46abd85e2187b8f4c2846416a23fab26d9b9f67d
2015-11-13 08:11:30 -08:00
JackyChen
6fb3d6db99 VP9 noise estimation: add frame level motion metrics and adjust thresholds.
Change-Id: Ia1aba00603b32cee6835951d3d8f740937cf20f4
2015-11-12 23:41:42 -08:00
Marco Paniconi
866c9357c2 Revert "Update to noise estimation."
This reverts commit 6b79a1e3e0.

Change-Id: I5a4923ca8a6de842855ce0725e92567ccbed6fb7
2015-11-13 00:13:32 +00:00
Marco
6b79a1e3e0 Update to noise estimation.
Add frame level global check and adjust some parameters.

Change-Id: I42103394f2d329781195d94ce6cbb5b3383eea17
2015-11-12 09:18:35 -08:00
Marco
ff32369804 vp9 denoiser: Add another noise level to denoising.
Change-Id: Idc755ab54e4f78bb7d75bc97634c451804edad99
2015-11-11 11:21:26 -08:00
JackyChen
19272d866b VP9 noise estimate: no noise estimate if frame size change.
Change-Id: I521f7b53c143d562a88fe7de330aa3f0ef09f414
2015-11-09 19:18:29 -08:00
Marco
5f041c01ed vp9: Disable noise estimate on resize trigger frame.
Change-Id: I35767a6320943582ee11d737b5f240cea2d01b25
2015-11-06 08:42:09 -08:00
Marco
1c724d01aa vp9: Updates to noise estimation.
Add threshold/condition on spatial_variance and brightness level.
Modification to normalization of block variance.
Change resolution limit below which we disable noise estimation.

Change-Id: If5be08a26ceda351242d8a58d2f0bc88c0a918f0
2015-11-05 18:19:01 -08:00
Yaowu Xu
87e08f4d9f Fix a msvc warning
Change-Id: Id5b8f597fb275395232559fea7bfeb56912b88a1
2015-11-03 11:22:58 -08:00
Marco
c7da053d4b Move noise level estimate outside denoiser.
Source noise level estimate is also useful for
setting variance encoder parameters (variance thresholds,
qp-delta, mode selection, etc), so allow it to be used also
if denoising is not on.

Change-Id: I4fe23d47607b4e17a35287057f489c29114beed1
2015-11-02 12:15:26 -08:00