summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_denoiser.c
AgeCommit message (Collapse)Author
2019-03-06vp9-denoiser: Bias to last for golden long termMarco Paniconi
If golden referene is selected as long-term reference, bias the denoiser filter to use last reference. Fixes visual artifact. And reduce the thresh_svc_golden, which was used to reduce the artifact occurrence. Change-Id: I08f24160ca11bd8f5f70acaefe989d5f92988132
2019-02-27vp9-rtc: Change init level of denoiser & noise levelMarco Paniconi
Change to init/reset level of the denoiser from kDenLow to kDenMedium, and the init noise level to kLow. This affects the denoiser level during the initialization stage of the noise estimation. Improves denoising for noisy content during init stage of noise estimation, with little effect for low noise/clean content. Change-Id: I247a17b0f01f646fc2e91a4a070ad69bdb788cae
2019-01-29Add some const qualifiers where applicableHui Su
Change-Id: Ib820f625e0b616fd57a2722ec3614b4fccf307f8
2018-12-04vp9: force refresh of long term ref when denoiser reset.Jerome Jiang
This will allocate extra frame buffer if long term temporal reference is used and denoiser is enabled on non-key frame. Add test. Change-Id: I0e8d1fdb9a2d697a8eed7fe6206bcb362e69f1c8
2018-11-28vp9 denoiser: force copy block when last not a reference.Jerome Jiang
Last reference doesn't always exist when SVC layers changed dynamically. When last is not a reference for current layer, copy block directly on denoiser. Change-Id: I9d98c4d6fdcfa25ba707db3333712761b5cf9ab8
2018-11-27vp9 svc: copy block if ref buffer in denoiser is NULL.Jerome Jiang
BUG=b/119097707 Change-Id: I6569306e897da46a44f9d8f2fb28a2a355dd4c2c
2018-08-27vp9: Fix ref frame update in denoiser in bypass mode.Jerome Jiang
BUG=b/112292577 Change-Id: I8fc5711e44d0317e299aa49f781e9c438bba9d82
2018-08-10Refactor: Move code updating ref frames for svc & denoiser.Jerome Jiang
Make new functions and move them to vp9_denoiser.c and vp9_svc_layercontext.c Change-Id: Ia34266ee2831d0f1316b7a641cbbf40fe64e1a0c
2018-06-29vp9: copy source on sync frame in denoiser.Jerome Jiang
Refresh all denoiser buffers on sync frame. Add sync frame test with denoiser enabled. Change-Id: I562a5ef5614b92a97565e6181a79eda51d9aeb99
2018-06-11vp9 svc: Denoise golden when it's a temporal ref.Jerome Jiang
When golden was the inter-layer reference, a block that selected the golden ref would not be denoised. But when golden is used as a second temporal reference then we should denoise blocks that select the golden reference. This changes allows for that. Change-Id: Ifdea2ac88f6a74f73520fedcd7fec2f32c559ec9
2018-03-22Fix a strict-overflow warningLinfeng Zhang
Compiler -- gcc (Debian 7.3.0-5) 7.3.0 ./libvpx/vp9/encoder/vp9_denoiser.c:374:9: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow] for (j = 0; j < xmis; j++) { Change-Id: Ib7397e718ff717bdabc088fc4c6e1771381fb522
2017-12-11vp9 svc: Allow denoising next to highest resolution.Jerome Jiang
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-09-05Remove get_filter_base() and get_filter_offset() in convolveLinfeng Zhang
so that the convolve functions are independent of table alignment. Change-Id: Ieab132a30d72c6e75bbe9473544fbe2cf51541ee
2017-08-15Merge "Clean up writing YUV files for debug purpose."Jerome Jiang
2017-08-15Clean up writing YUV files for debug purpose.Jerome Jiang
Change legacy vp8/9_write_yuv_frame to vpx_write_yuv_files. Delete some flags that can be enabled during build. To enable writing denoised YUV, use the following command line: CFLAGS='-DOUTPUT_YUV_DENOISED' ./configure --enable-vp9-temporal-denoising For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP' Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528
2017-08-15vp9: Denoiser fix: use correct bsize for skin detection.Marco
Change-Id: I9d201fa3a4b00ebd147b57ed519fab8d59b0a802
2017-08-10vp9 SVC: Fix the denoiser frame buffer management.Jerome Jiang
Change the denoiser frame buffer management for SVC to more generally handle the layer patterns in SVC (where last is not always refreshed). This change is only for SVC with denoising and is bitexact. Change-Id: Ic2b146a924cdf6e7114609158afa3d4880fe3fae
2017-07-30vp9: Fix denoising condition when pickmode partition is used.Marco
When the superblock partition is based on the nonrd-pickmode, we need to avoid the denoising. Current condition was based on the speed level. This change is to make the condition at the superblock level, as the switch in partitioning may be done at sb level based on source_sad (e.g., in speed 6). Change-Id: I12ece4f60b93ed34ee65ff2d6cdce1213c36de04
2017-07-18vp9: Allocate alt-ref in denoiser for SVC.Jerome Jiang
When SVC is used, allocate alt-ref in denoiser. Change-Id: I1b17221b55b9444cd23b97d481b54ff8d296d857
2017-07-11vp9: Fix to SVC and denoising for fixed pattern case.Marco
For fixed pattern SVC: keep track of denoised last_frame buffer for base temporal layer, and if alt_ref is updated on middle/upper temporal layers, force an update to denoised last_frame buffer. This allows for improved denoising on top temporal layers. Change-Id: Icbd08566027d4d2eabc024d3b7a0d959d2f8c18b
2017-07-10vp9: Remove alt-ref from denoiser.Jerome Jiang
Denoiser is used in real-time mode which does not use alt-ref. Reduce memory usage when denoiser is enabled. Change-Id: I54ba3bcaeeb1818bbdf718ef90e97d4897ff793d
2017-05-11vp9: SVC: Increase the partiiton and acskip thresholdsMarco
Increase the partition and acskip thresholds for temporal enhancement layers. ~1-2% speedup, with negligible loss in quality. Change-Id: Id527398a05855298ad9ddac10ada972482415627
2017-05-10vp9: Fix ubsan failure in denoiser.Jerome Jiang
Fix the overflow for subtraction between two unsigned integers. BUG=webm:1432 Change-Id: I7b665e93ba5850548810eff23258782c4f5ee15a
2017-04-24vp9; Reduce artifact in non-rd pickmode for lighting changes.Marco
Add a low-variance high-sumdiff to the superblock content state and use it to limit the mv and bias some decisions in non-rd pickmode. Only affects speed >= 6. Reduces artifact for lighting changes. Small/no difference in metrics on RTC set. Change-Id: Ic84b2379fe0ae3fa71ae826ee6bae3eaf551a25b
2017-04-06vp9; Move the denoising condition for speed 5.Marco
Move the condition for effectively disabling the denoising for speed 5 into the vp9_denoiser_denoise(). This is cleaner, and also moving the condition into vp9_denoiser_denoise will keep the denoiser buffer updated with the current source. This allows for more consistent behavior if speed is changed midstream. Change-Id: Ia001f591c56e454bf724c3ae73c024badb183ef8
2017-03-31vp9: SVC: Fix issue with artifact for svc-denoising.Marco
Issue/bug happens for denoising with spatial layers, where the golden (spatial) reference is used in pickmode, but denoising is only done wrt to last (temporal). Fix is to make sure set_ref_ptrs is set before build predictors in denoiser. Change-Id: I793cf441341edf7c4a88b8ab1e1b22b3cb0eb508
2017-03-29vp9: SVC: fix to allow output of denoised result.Marco
Change-Id: Iaf55cfb5e9621d074eb33d6a32f184e4777968f8
2017-03-21Fix the data race caused by vp9 denoiser.Jerome Jiang
BUG=webm:1391 Change-Id: I9669ae62fe9c695d4c6f9973094cb0f39bed51c7
2017-03-15vp9: Fix some issues with denoiser and SVC.Marco
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-02-21vp9: Incorporate source sum_diff into non-rd partition thresholds.Marco
Increase the variance partition thresholds for superblocks that have low sum-diff (from source analysis prior to encoding frame). Use it for now only for speed >= 7 or for denoising on. Small change on metrics for rtc set: less than ~0.1 avgPNSR decrease on RTC set, for both speed 7 and 8. Change-Id: I38325046ebd5f371f51d6e91233d68ff73561af1
2017-02-07vp9: Denoiser speed-up: increase partition and ac skip thresholds.Marco
Add factor to increase varianace partition and ac skip thresholds, under certain conditions (noise level and sum_diff), to increase denoiser speed. Change-Id: I7671140ef3598bf5f114a72623d68792bcd7b77b
2017-01-25vp9-denoiser: Modify skip denoising condition for small blocks.Marco
Skip denoising for blocks < 16x16, and for block = 16x16 skip denoising for low noise levels and width > 480 for now. Allow for some speed-up in denoiser. Change-Id: Ib46cefe4741962d145fa08775defea3a9c928567
2017-01-10vp9: Make the denoiser work with spatial SVC.Marco
If enabled denoiser will only denoise the top spatial layer for now. Added unittest for SVC with denoising. Change-Id: Ifa373771c4ecfa208615eb163cc38f1c22c6664b
2016-08-02vp9/encoder: apply clang-formatclang-format
Change-Id: I45d9fb4013f50766b24363a86365e8063e8954c2
2016-07-26vp9 denoiser: Derefencing pointer should be after null check.JackyChen
BUG=webm:1267 Change-Id: I899fc9e8d784c6eefcbe27945c619845adb7b6f0
2016-04-25vp9: Fix a bug where best_sse_mv is not set properly.JackyChen
In VP9 internal denoiser, motion magnitude is computed from best_sse_mv, which should be set to 0 at the begining. This bug may cause visual aritifact in denoiser. Also, delete two improper comments. Change-Id: I8710d2acba23320bc85cf72af17d65245c19438b
2016-04-25vp9-denoiser: Bugfix and some adjustments for high noise case.Marco
Need to check that sse for non-zero mv has been set for the current block (i.e., check that nonzero-mv is tested as a mode, so newmv_sse != UINT_MAX) before forcing to not use zero-mv for denoising. Also increase some thresholds (sse and sse_diff) for high noise case, and use shift operaton instead of multiplication on a threshold computation. Change-Id: Iae7339475d57240316b7fa8b887c4ee3c0d0dbec
2016-04-22vp9: Some adjustments to denoiser under high-noise condition.Marco
Change-Id: Ib47d742d07f13c7c39cea85e228c19ae298baf4a
2016-04-22vp9: Move consec_zero_mv from cyclic refresh to cpi struct.Marco
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-04vp9-denoiser: Avoid copy-block when denoising is at LowLow level.Marco
Avoid copy-block when denoising is at LowLow level (i.e., no denoising is done). Instead, don't enter denoiser at all, and when level goes back up over kLowLow do a reset in denoiser. Change-Id: I0544adf58f4dd51ecc4a4607fcb0353bfbbb7a59
2016-04-04Merge "vp9-noise estimation: Increase threshold for Low-level."Marco Paniconi
2016-04-04vp9-noise estimation: Increase threshold for Low-level.Marco
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-04vp9-denoiser. Code cleanup and bugfix.Marco
Some cleanup and bugfix: pass mi_row/mi_col (not mv_col/mv_row) to build_inter_predictors. This only affects case where the frame is resized, but since denoising is not done on resized frames, the fix has not effect currently. Change-Id: I36617a7f0b43b6f49976745f15d400977e6ffa46
2016-04-01vp9-denoiser: Adjust usage of skin and consec_zeromv.Marco
Change-Id: I250258fc70ec0fcf1b501708c5d4b84685cf882e
2016-03-28vp9-denoiser: Incorporate consec_zeromv in skin detection for denoising.Marco
Change-Id: Ibe4e1207c0db1779e1358f4566da67c9a07bdb15
2016-03-17vp9: Improvement to skin detection.Marco
Add consec_zeromv to skin detection. Reduces false detection in steady background areas. Change-Id: Ic31c831537d29f082f58477f82ed78f313d7dd30
2016-02-08vp9-denoiser: Allow for checking skin for bsize <=32x32.Marco
Change-Id: I6c99ac6fd3735e24cf668479c55bff313c0b4970
2016-01-29vp9-denoiser: Force increase_denoising = 0 for skin block.Marco
Change-Id: Ic5af41db58a3daad4103175b4b4b9300675020c0
2016-01-19VP9: Eliminate MB_MODE_INFOScott LaVarnway
Change-Id: Ifa607dd2bb366ce09fa16dfcad3cc45a2440c185
2016-01-15vp9-denoiser: Set motion threshold for skin_map to 0.Marco
More aggresive on avoiding denoising on skin. May supplement this later by adding condtion onn consec_zeromv. Change-Id: Ied92b332f9b24e821d2009f81d1565758588d9a5