Marco Paniconi [Sat, 22 Sep 2012 01:54:11 +0000 (18:54 -0700)]
Update to cyclic refresh.
-Increase the amount of mbs to be refreshed.
-Replace the delta qp with a fixed and reduced delta.
-Change to the mb update loop to try to always update same amount of mbs.
Scott LaVarnway [Wed, 19 Sep 2012 19:30:44 +0000 (12:30 -0700)]
Moved vp8dx_get_raw_frame() call to vp8_get_frame()
This change is necessary for the frame-based multithreading
implementation.
Since the postproc occurs in this call, vpxdec was modified to time around
vpx_codec_get_frame()
Jim Bankoski [Fri, 7 Sep 2012 23:38:15 +0000 (16:38 -0700)]
valgrind caught uninitialized cond
If the decoder crashes and returned an error before it set up
block offsets but after it set up frame buffers. We had a
problem decoding the next keyframe because the block offsets
were never set.
Deb Mukherjee [Tue, 4 Sep 2012 19:09:05 +0000 (12:09 -0700)]
Adjusting thresholds in mfqe post-processing
Adjusts some of the qualification thresholds in mfqe to eliminate
artifacts due to wrong decisions. Besides, a new qualification
criteria is used to disable mfqe if the quality of the previous
frame is itself not too good.
Yunqing Wang [Fri, 10 Aug 2012 19:35:55 +0000 (12:35 -0700)]
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.
James Zern [Tue, 28 Aug 2012 00:13:09 +0000 (17:13 -0700)]
msvs/tests: fix data alignment for asm tests
Replace DECLARE_ALIGNED_ with vpx_memalign()
DECLARE_ALIGNED (__declspec(align())) does not work as intended when
used on class data members:
Data in classes or structures is aligned within the class or structure
at the minimum of its natural alignment and the current packing setting
(from #pragma pack or the /Zp compiler option)
Yunqing Wang [Tue, 21 Aug 2012 17:52:35 +0000 (10:52 -0700)]
Add biasing to ZEROMV for videos with static background
For videos with big static background(such as video conferencing
clips), the mode decision was biased to ZEROMV in order to
obtain a stable background. The percentage of ZEROMV on last
frame was used to predict if there is static area in current frame,
and checking already-encoded neighboring macroblocks' motion
vectors to make sure the local area has low motion.
Yunqing Wang [Tue, 21 Aug 2012 00:31:44 +0000 (17:31 -0700)]
Fix inter_zz_count calculation bug
The current way of counting inter_zz_count doesn't work correctly
in multi-threaded encoding. Calculating it after the frame is
encoded fixed the problem.
James Zern [Wed, 15 Aug 2012 18:45:12 +0000 (11:45 -0700)]
fix msvc configure
visual studio targets do not depend on executables, only the projects
produced.
tested with --target=x86-win32-vs9
fixes:
...
make[1]: *** No rule to make target `test_libvpx', needed by `.bins'.
Stop.
Makefile:17: recipe for target `.DEFAULT' failed
Mike Frysinger [Wed, 15 Aug 2012 15:55:31 +0000 (11:55 -0400)]
Parse out arm isa targets from dumpmachine
The current parsing logic of the dumpmachine tuple lacks any arm
cases which means tgt_isa never gets set, so for all arm targets,
we get detected as generic-gnu. Add some basic arm checks here
so the automatic detection logic works.
Mike Frysinger [Tue, 14 Aug 2012 18:24:28 +0000 (14:24 -0400)]
do not error out on generic-gnu + --enable-shared
If you build with --enabled-shared on a Linux arch not explicitly
listed, the configure script will abort because it didn't detect
"linux" in the fallback generic-gnu tuple.
Since this is the fallback tuple and people are passing
--enable-shared, assume the user knows what they're in for.
Scott LaVarnway [Thu, 2 Aug 2012 18:58:09 +0000 (11:58 -0700)]
Added row based loopfilter
Interleaved loopfiltering with decode. For 1080p clips, up to 1%
performance gain. For 4k clips, up to 10% seen. This patch is required
for better "frame-based" multithreading.
Attila Nagy [Tue, 31 Jul 2012 11:04:45 +0000 (14:04 +0300)]
Fix potential encoder dead-lock after picture resize
The sync interval for the multithreaded encoder was considered as not changing
during the encoding. This is not true if picture size is changed.
The encoder could dead-lock because the main thread and the other threads were
using different sync interval.
Attila Nagy [Tue, 31 Jul 2012 08:52:10 +0000 (11:52 +0300)]
Fix encoder mem allocation when picture size is changed
After the picture size was changed to a bigger one, the internal memory was
corrupted and multithreaded encoder was deadlocking.
Memory for last frame's MVs, segmentation map and active map were allocated when
the compressor was created (vp8_create_compressor). Buffers need to be
reallocated when picture size is changed, so, the allocation was moved to
vp8_alloc_compressor_data, which is called every time the picture is resized.
Attila Nagy [Tue, 24 Apr 2012 12:17:28 +0000 (15:17 +0300)]
Optimizes updates of encoder block ptrs
Precalculated block ptrs do not need updates during encoding.
Set these at init stage.
Moved the allocation of 'mt_current_mb_col' (last encoded MB on each
row) to vp8_alloc_compressor_data(), so that it is correctly
reallocated when frame size is changing.
Yunqing Wang [Fri, 8 Jun 2012 15:17:50 +0000 (11:17 -0400)]
multi-res: add drop_frame support
Added drop_frame support in multi-resolution encoder.
If one frame is dropped at a lower-resolution level, the next
upper-resolution level encoder needs to encode that frame
independently without any lower-resolution level motion
information.
Another issue is that if one frame is dropped at some but not all
resolution levels, a frame after that one may use different set
of reference frames at different resolution levels. This reference
frame asynchronization could degrade motion search precision in
upper-resolution level encoding, which uses lower-resolution level
motion result. This change compares the lower-resolution and upper-
resolution level's reference frames. If they are not the same, the
upper-resolution level encoder can not use lower-resolution level
motion result.