Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Marco Paniconi 91801176fe vp8: Add an aggressive denoising mode.
Change-Id: Ie4686e1b15af6bcc8d59d585bbeb996f38224522
2014-07-29 11:16:45 -07:00
Marco Paniconi daed770d99 vp8: Set default denoiser_decision to copy for UV channel.
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-22 11:12:50 -07:00
Marco Paniconi 21042c7154 vp8: Allow for on/off control of UV temporal denoiser.
Use noise_sensitivity level for enabling UV denoiser.

Change-Id: Ib208786a6fdf654981bcd96a3cf44e8e678025c1
2014-07-15 09:51:03 -07:00
Marco Paniconi 970c1253ce vp8 denoiser fix: free memory of denoiser->denoiser_state.
Change-Id: I86451ddfa90d871e46e5b4c97794dbef65293c6c
2014-06-29 17:04:43 -07:00
Scott LaVarnway 94ae0430d2 vp8: Add temporal denoising for UV-channel.
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-26 11:45:42 -07:00
Marco Paniconi d924640663 vp8 denoising: add bias factor to zero_mv sse.
Change-Id: I95818754424e89f0d56c6d9c0c5709e6f84fa46a
2014-06-16 15:22:15 -07:00
Marco Paniconi d08b2ba172 Allow for deblocking temporal-denoised signal.
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-06-13 14:34:05 -07:00
Marco Paniconi 688c5ac2a8 Merge "vp8 denoiser: fix to zero_mv mode selection." 2014-05-28 12:32:44 -07:00
Marco Paniconi 609e91f9b7 vp8 denoiser: fix to zero_mv mode selection.
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-28 11:23:52 -07:00
Marco Paniconi 4e81ab82d5 Fix to reduce block artifacts from vp8 temporal denoiser.
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-21 16:07:16 -07:00
Marco Paniconi 6da66e1114 vp8: Add increase_denoising parameter to denoiser.
Change-Id: I96ed73e109c4f89dd06f3583cf7ecf9277401fae
2014-05-16 15:06:59 -07:00
Marco Paniconi 96d1946e87 Revert "Revert "Remove struct params from vp8_denoiser_filter""
This reverts commit 06e6d56fa1

Change-Id: If95598385b693945d6b144d03b6da8f6a57dac98
2014-05-14 10:55:53 -07:00
Frank Galligan 06e6d56fa1 Revert "Remove struct params from vp8_denoiser_filter"
This reverts commit e516a42527

Change-Id: I7c78712acc737ad5f580181cdab3aa76b23f3ca5
2014-05-07 16:19:20 -07:00
Scott LaVarnway e516a42527 Remove struct params from vp8_denoiser_filter
This eliminates the asm_offsets dependency for future
all-assembly versions of this function.

Change-Id: I3227073ecfcb8ee6e593934fab941e9081abdda0
2014-05-02 10:31:52 -07:00
Scott LaVarnway ae64e7b408 Removed shadow warnings : postproc.c decodframe.c threading.c
and denoising.c
Adding -Wshadow to CFLAGS generated a bunch of warnings.  This patch
removes these warnings.

Change-Id: I434a9f4bfac9ad4ab7d2a67a35ef21e6636280da
2013-03-14 14:45:23 -07:00
John Koleszar 16810c10c1 Merge branch 'vp9-preview' of review:webm/libvpx
Merge the vp9-preview branch into master.

Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-27 09:37:19 -08:00
Scott LaVarnway ef2248a2a3 added work buffer for denoiser
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-12-05 19:09:05 -08:00
John Koleszar a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -08:00
Yunqing Wang 64075c9b01 Encoder denoiser performance improvement
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-31 13:48:13 -07:00
Yaowu Xu d71ba03822 silent compiling warnings for VC9 build
Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
2012-08-20 11:45:01 -07:00
John Koleszar 0164a1cc5b Fix pedantic compiler warnings
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-06-11 15:14:58 -07:00
Stefan Holmer d850034443 Added another denoising threshold for finding DC shifts.
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-30 16:50:21 +02:00
Jim Bankoski 57faddb7c5 fix denoiser for temporal patterns and rd
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-24 07:44:03 -07:00
Christian Duvivier 38ddb426d0 Inline Intrinsic optimized Denoiser
Faster version of denoiser, cut cost by 1.7x for C path, by 3.3x for
SSE2 path.

Change-Id: I154786308550763bc0e3497e5fa5bfd1ce651beb
2012-05-21 07:54:20 -07:00
John Koleszar 14d827f44e fix vp8_ namespace issues
Make functions only referenced from one translation unit static. Other
symbols with extern linkage get a vp8/vpx prefix.

Change-Id: I928c7e0d0d36e89ac78cb54ff8bb28748727834f
2012-05-04 12:24:04 -07:00
James Berry 451ab0c01e remove __inline for compiler compatibility
__inline removed for broader compiler compatibility

Change-Id: I6f2b218dfc808b73212bbb90c69e2b6cc1fa90ce
2012-03-21 14:11:10 -04:00
Stefan Holmer 9c41143d66 Adds a motion compensated temporal denoiser to the encoder.
Some refactoring in rdopt.c and pickinter.c.

Change-Id: I4f50020eb3313c37f4d441d708fedcaf219d3038
2012-03-13 15:33:50 -07:00