summaryrefslogtreecommitdiff
path: root/vp8/encoder/denoising.c
AgeCommit message (Collapse)Author
2018-10-30clang-tidy: fix vp8/encoder parametersJohann
BUG=webm:1444 Change-Id: I57a305cdab0d62b0745116272fbd5d9257c6e679
2016-07-19vp8: apply clang-tidy google-readability-braces-around-statementsclang-tidy
applied against an x86_64 configure clang-tidy-3.7.1 \ -checks='-*,google-readability-braces-around-statements' \ -header-filter='.*' -fix + clang-format afterward Change-Id: I6694edeaee89b58b8b3082187e6756561136b459
2016-07-18prepend ++ instead of post in for loops.Jim Bankoski
Applied the following regex : search for: (for.*\(.*;.*;) ([a-zA-Z_]*)\+\+\) replace with: \1 ++\2) This misses some for loops: ie : for (mb_col = 0; mb_col < oci->mb_cols; mb_col++, mi++) Change-Id: Icf5f6fb93cced0992e0bb71d2241780f7fb1f0a8
2016-07-15vp8: apply clang-formatclang-format
Change-Id: I7605b6678014a5426ceb45c27b54885e0c4e06ed
2016-06-16Fix ubsan warning: vp8/encoder/denoising.cYaowu Xu
BUG=webm:1219 Change-Id: Iebdedfb27c70909c0849e169473a2a3ec9f58cc7
2016-04-04vp8-denoiser: Avoid doing the mcomp if we don't denoise.Marco
Avoid doing the mcomp in denoiser if we don't denoise the block (because of motion/SSE/skin threshold, etc). This can reduce encoding time (with denoiser enabled) by ~1.5-2%. Change-Id: Ia699b68dfd37b89cdf3a82b8aa40e8c8f98a3d4f
2016-04-01vp8 denoiser: Some adjustments to usage of skin and motion.Marco
Switch to use new skin model. And fix condition for denoising skin block. Previous condition did not denoise skin blocks if the selected mode was non-zero motion in current frame. Modify condition to also force no denoising if that mode was not selected as zero motion now and for at least "x" past frames in a row (x = 2). Change-Id: I00753e3fe45b9a308a7ef43c58f11868e3bfc6b0
2016-02-27Merge "vp8-denoiser: Update some denoiser thresholds."Marco Paniconi
2016-02-17vp8/denoising: add missing alloc checkJames Zern
Change-Id: I51ede902cd9d7bafa41f7caa3f9adf77f9df5903
2016-02-17vp8-denoiser: Update some denoiser thresholds.Marco
Change-Id: I67090d72c0fefd3105ac380415249599e053d3bd
2016-01-20vp8-denoiser: Fix threshold for skin map.Marco
Make it consistent with the comment/intended behavior, that is, only denoise if current block is zero_mv. Change-Id: I3909761e802e80089752a493ab3646dc32698ded
2015-04-28vpx_mem: remove vpx_memsetJames Zern
vestigial. replace instances with memset() which they already were being defined to. Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2014-12-03Various updates to vp8.Marco
Change-Id: Icc7a816491897107764e4c936288e9000e6319b8
2014-10-24vp8: Updates to noise level estimate.Marco
-Use full bandwidth (when temporal layers is on) for checking switching. -Normalize metric wrt num_blocks. -Rounding fix to update of average noise level metric. -Make default internal denoiser mode == kDenoiserOnYUV (in denoiser set_parameters()). -Adjust some thresholds. Change-Id: Ib827512b25a7bf1f66c76d3045f3a68ce56b1cd2
2014-10-17Updates to aggressive denoising mode.Marco
Fix to the noise level and bitrate threshold settings per resolution. Change-Id: I25524b7f78afa1aeb76edef7be13c17bc8976508
2014-09-19vp8: Update to the adaptive denoising mode.Marco
Allow for option to apply spatial blur for temporal denoising, under the aggressive denoising mode. Change-Id: I41c5fdc0b6cf32d8f8d1d4236b25fa5aa406e89e
2014-09-10Fix the bug which made VP8 denoiser not bit-exact between C code and SSE code.JackyChen
This issue is found when the denoising mode is set to kDenoiserOnYUVAggressive. Updated the C code to make it the same with SSE version. I also changed several lines in VP9 denoiser for the code style. Change-Id: I640d48cf946fe8c6a400e6e252107501d1e226d3
2014-09-09vp8: Updates for adaptive denoiser mode.Marco
Add qp/bitrate condition, update some settings. Change-Id: I1af0f102823a886393be063ad9d17d7564753cc7
2014-09-02Updates to adaptive/aggressive denoiser mode.Marco
Parameter changes and modification to zero_last bias. Change-Id: I50a408d47fde049c562bbe95075194cb0f17c31b
2014-08-26vp8 fix: deallocate denoiser->yv12_last_sourceMarco
Change-Id: I7f3bc292b1b411e10586f0975143ae996ea78d1d
2014-08-14Add an adaptive denoising mode.Marco Paniconi
On key frame, will always start with normal denoising mode, but based on a computed noise metric (normalized mse on source diff) may switch to aggressive mode (and back down again). Change-Id: I20330b2dcf3056287be37223302b2cab5fc103eb
2014-08-08vp8: Code cleanup for control of denoiser mode.Marco Paniconi
Change-Id: Icb9918dd38d15061d62852e6a2d905e8ceb2c1ac
2014-07-29vp8: Add an aggressive denoising mode.Marco Paniconi
Change-Id: Ie4686e1b15af6bcc8d59d585bbeb996f38224522
2014-07-22vp8: Set default denoiser_decision to copy for UV channel.Marco Paniconi
Since the UV decision to denoise is based on Y, we need to set the default/initial denoiser decision_u/v to COPY_BLOCK, to make sure if no uv_denoiser is applied we still update (uv)running_avg with source. Change-Id: I5af1c2afbd40c498cd3de208bea88c837099b24d
2014-07-15vp8: Allow for on/off control of UV temporal denoiser.Marco Paniconi
Use noise_sensitivity level for enabling UV denoiser. Change-Id: Ib208786a6fdf654981bcd96a3cf44e8e678025c1
2014-06-29vp8 denoiser fix: free memory of denoiser->denoiser_state.Marco Paniconi
Change-Id: I86451ddfa90d871e46e5b4c97794dbef65293c6c
2014-06-26vp8: Add temporal denoising for UV-channel.Scott LaVarnway
C version and sse2 version, and off by default. For the test clip used, the sse2 performance improved by ~5.6% Change-Id: Ic2d815968849db51b9d62085d7a490d0e01574f6
2014-06-16vp8 denoising: add bias factor to zero_mv sse.Marco Paniconi
Change-Id: I95818754424e89f0d56c6d9c0c5709e6f84fa46a
2014-06-13Allow for deblocking temporal-denoised signal.Marco Paniconi
Allow for an option to selectively apply the deblocking loop filter to the denoised raw block, based on the denoised state (no-filter, filter with zero motion, or filter with non-zero motion) of the current block and its upper and left denoised block. This helps to reduce some blocking artifacts from the motion-compensated denoising. Change-Id: I0ac4e70076df69a98c5391979e739a2681e24ae6
2014-05-28Merge "vp8 denoiser: fix to zero_mv mode selection."Marco Paniconi
2014-05-28vp8 denoiser: fix to zero_mv mode selection.Marco Paniconi
In the current logic, if the sse for zero motion is smaller than the sse for new_mv (i.e., best_sse), we may still end up using the non-zero mv for denoising (if the magnitude of new_mv is above threshold). This can happen for very noisy content, and can lead to artifacts. This change ensures that we always use zero_mv (over new_mv) for denoisng if sse_zero_mv <= best_sse. Change-Id: I8ef9294d837b077013b77a46c9a71d17c648b48a
2014-05-21Fix to reduce block artifacts from vp8 temporal denoiser.Marco Paniconi
If the denoiser filter causes too big a change in the absolute pixel difference (between source and denoised signal), the block is not denoised, which can cause visual block artifacts. This change applies a second adjustment to the temporal filter to effectively allow for a (weaker) denoising for such blocks (which can keep the absolute differnence within the tolerance range in most cases). This helps to reduce some of the block artifacts from the denoising. The additional cost of re-applying the filter to this set of blocks is low, as the percentage of blocks per frame (with too big a change in absolute pixel difference) is typically small, 2-5%. Change-Id: Id9b56e59e33f3c22e79d2f89f763bdde246fdf3f
2014-05-16vp8: Add increase_denoising parameter to denoiser.Marco Paniconi
Change-Id: I96ed73e109c4f89dd06f3583cf7ecf9277401fae
2014-05-14Revert "Revert "Remove struct params from vp8_denoiser_filter""Marco Paniconi
This reverts commit 06e6d56fa138d84759e8bdfd4c721ead000051b4 Change-Id: If95598385b693945d6b144d03b6da8f6a57dac98
2014-05-07Revert "Remove struct params from vp8_denoiser_filter"Frank Galligan
This reverts commit e516a42527098a26798dbb3663a5bcdd38793839 Change-Id: I7c78712acc737ad5f580181cdab3aa76b23f3ca5
2014-05-02Remove struct params from vp8_denoiser_filterScott LaVarnway
This eliminates the asm_offsets dependency for future all-assembly versions of this function. Change-Id: I3227073ecfcb8ee6e593934fab941e9081abdda0
2013-03-14Removed shadow warnings : postproc.c decodframe.c threading.cScott LaVarnway
and denoising.c Adding -Wshadow to CFLAGS generated a bunch of warnings. This patch removes these warnings. Change-Id: I434a9f4bfac9ad4ab7d2a67a35ef21e6636280da
2012-12-27Merge branch 'vp9-preview' of review:webm/libvpxJohn Koleszar
Merge the vp9-preview branch into master. Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-05added work buffer for denoiserScott LaVarnway
The denoiser was writing to LAST_FRAME buffer. If LAST_FRAME isn't being updated, the reference frame buffers were out of sync between the encoder and the denoised raw buffers. This patch resolves the discrepancy by always writing to a work buffer (INTRA_FRAME) and then copying from that buffer to any buffers that needs to be updated. Change-Id: I6dd855b9749978b542bc3d515914d5f16faf25df
2012-11-15support building vp8 and vp9 into a single libJohn Koleszar
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-08-31Encoder denoiser performance improvementYunqing Wang
The denoiser function was modified to reduce the computational complexity. 1. The denoiser c function modification: The original implementation calculated pixel's filter_coefficient based on the pixel value difference between current raw frame and last denoised raw frame, and stored them in lookup tables. For each pixel c, find its coefficient using filter_coefficient[c] = LUT[abs_diff[c]]; and then apply filtering operation for the pixel. The denoising filter costed about 12% of encoding time when it was turned on, and half of the time was spent on finding coefficients in lookup tables. In order to simplify the process, a short cut was taken. The pixel adjustments vs. pixel diff value were calculated ahead of time. adjustment = filtered_value - current_raw = (filter_coefficient * diff + 128) >> 8 The adjustment vs. diff curve becomes flat very quick when diff increases. This allowed us to use only several levels to get a close approximation of the curve. Following the denoiser algorithm, the adjustments are further modified according to how big the motion magnitude is. 2. The sse2 function was rewritten. This change made denoiser filter function 3x faster, and improved the encoder performance by 7% ~ 10% with the denoiser on. Change-Id: I93a4308963b8e80c7307f96ffa8b8c667425bf50
2012-08-20silent compiling warnings for VC9 buildYaowu Xu
Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
2012-06-11Fix pedantic compiler warningsJohn Koleszar
Allows building the library with the gcc -pedantic option, for improved portabilty. In particular, this commit removes usage of C99/C++ style single-line comments and dynamic struct initializers. This is a continuation of the work done in commit 97b766a46, which removed most of these warnings for decode only builds. Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-05-30Added another denoising threshold for finding DC shifts.Stefan Holmer
Compares the sum of differences between the input block and the averaged block. If they differ too much the block will not be filtered. Negligible perfomance hit. Change-Id: Ib1c31a265efd4d100b3abc4a1ea6675038c8ddde
2012-05-24fix denoiser for temporal patterns and rdJim Bankoski
This extends the denoiser to work for temporally scalable coding. I believe this also fixes a very rare but really bad bug in the original implementation. Change-Id: I8b3593a8c54b86eb76f785af1970935f7d56262a
2012-05-21Inline Intrinsic optimized DenoiserChristian Duvivier
Faster version of denoiser, cut cost by 1.7x for C path, by 3.3x for SSE2 path. Change-Id: I154786308550763bc0e3497e5fa5bfd1ce651beb
2012-05-04fix vp8_ namespace issuesJohn Koleszar
Make functions only referenced from one translation unit static. Other symbols with extern linkage get a vp8/vpx prefix. Change-Id: I928c7e0d0d36e89ac78cb54ff8bb28748727834f
2012-03-21remove __inline for compiler compatibilityJames Berry
__inline removed for broader compiler compatibility Change-Id: I6f2b218dfc808b73212bbb90c69e2b6cc1fa90ce
2012-03-13Adds a motion compensated temporal denoiser to the encoder.Stefan Holmer
Some refactoring in rdopt.c and pickinter.c. Change-Id: I4f50020eb3313c37f4d441d708fedcaf219d3038