Jingning Han [Wed, 11 Mar 2015 23:08:59 +0000 (16:08 -0700)]
Remove unnecessary speed feature checking
This commit removes the pred_mv_sad comparison from rtc motion
search, given that a stronger comparison has been done at the
mode search level to eliminate unlikely selected reference frames.
Jingning Han [Tue, 10 Mar 2015 01:55:38 +0000 (18:55 -0700)]
Apply fast motion search to golden reference frame
This commit enables the rtc coding mode to run integral projection
based motion search for golden reference frame. It improves the
speed -6 compression performance by 1.1% on average, 3.46% for
jimred_vga, 6.46% for tacomascmvvga, and 0.5% for vidyo clips. The
speed -6 is about 6% slower.
Jingning Han [Wed, 11 Mar 2015 22:44:26 +0000 (15:44 -0700)]
Refactor to remove GLOBAL_MOTION
Make the vp9_int_pro_motion_estimation() function return zero
motion vector if high bit depth is turned on, instead of removing
it from compiled codes.
Yaowu Xu [Wed, 11 Mar 2015 02:06:52 +0000 (19:06 -0700)]
Separate rd_thresh adaption by ref_frame
Only update the rd_thresh factors for modes sharing same reference
frame. This helps overall compression of 6 and 7 by .13% and .19%
respectively without any noticeable speed difference.
Marco [Fri, 6 Mar 2015 01:26:52 +0000 (17:26 -0800)]
Modify update golden reference update under aq-mode=3 mode.
For non-SVC 1 pass CBR: make the GF update interval a multiple of the
cyclic refresh period, and use encoding stats to prevent GF update at certain times.
Yaowu Xu [Fri, 6 Mar 2015 21:45:39 +0000 (13:45 -0800)]
Enable using Golden reference in choose_partition()
Choose_partition uses only the last frame as reference frame in making
partition decision, this commit adds the check on how well Golden
frame with (0,0) predicts the current block, and uses GF(0,0) as
basis for partition decision if it produces better prediction.
The commit improves rtc speed 6 and 7 encoding by 0.14% and 0.19%
respectively.
Jingning Han [Mon, 9 Mar 2015 17:59:29 +0000 (10:59 -0700)]
Skip golden ref frame check when it is same as last ref frame
When golden reference frame is refreshed, the next frame has both
its last and golden reference frames point to the same reference
frame in real-time coding mode. Experiments suggest that using
two separate reference frames for frames right after golden refresh
frame does not provide further compression performance advantage.
This commit hence retains the current encoder implementation and
shuts off the mode search over golden reference frame in this case.
It makes the encoder run slightly faster at no coding performance
change.
Yunqing Wang [Fri, 6 Mar 2015 23:17:59 +0000 (15:17 -0800)]
vp9_ethread: fix me consts initialization to support aq_mode=3 encoding
While turning on "--aq_mode=3", the quantizers are updated by each
thread. Fixed the me consts initialization function to make sure
that the correct thread data are updated.
Yunqing Wang [Thu, 5 Mar 2015 17:44:18 +0000 (09:44 -0800)]
Modify the setting of transform skip flags in non-rd mode
While searching for the best mode in non-rd case, SSE of
a partition block is calculated and the transform size is set.
This patch rewrites the skip checking conditions based on
transform size instead of partition size to be more precise.
Small gains were seen in rtc set borg test (speed 6).
AVG PSNR: 0.087%, overall PSNR: 0.073%, SSIM: 0.146%.
No noticeable speed change.
Johann [Wed, 4 Mar 2015 23:34:55 +0000 (15:34 -0800)]
Declare function used by 'once' with 'void' parameters
Visual Studio is exceptionally picky about this:
vp9_reconintra.c(900): warning C4113: 'void (__cdecl *)()' differs in
parameter lists from 'void (__cdecl *)(void)'
[.build-x86_64-win64-vs10\vpx.vcxproj]
Jingning Han [Wed, 4 Mar 2015 17:40:01 +0000 (09:40 -0800)]
Use SAD value to set chroma cost flag
This saves an extra 64x64 variance calculation and replaces two
32x32 variance functions with sad functions. The compression
performance change is unnoticeable.
Adrian Grange [Wed, 18 Feb 2015 17:40:34 +0000 (09:40 -0800)]
Make encoder buffer allocation dynamic
Frame buffers are now allocated dynamically on-demand.
Entries in the reference frame map, cm->ref_frame_map,
may now be set to -1 (INVALID_IDX) to indicate that
there is not a valid reference buffer in that "slot".
All slots in the reference frame map are now initialized
to the empty state (-1) and each buffer is initialized
to have a reference count of 0.
Jingning Han [Mon, 2 Mar 2015 21:51:12 +0000 (13:51 -0800)]
Properly handle the boundary blocks for integral projection search
Use rectangular block size for integral projection motion estimation
if the the 64x64 block has over half block outside the frame. This
avoids the issue that the motion information of these blocks is
dominated by the extended pixels, instead of the pixels of interest.
Deb Mukherjee [Tue, 3 Mar 2015 20:26:41 +0000 (12:26 -0800)]
dc quantizer fix for 32x32 transforms
The rounding factor needs to be scaled down by a factor of 2.
Also, the quantized and dequantized coefficients are memset to 0
when dc quantizer is used.
hkuang [Tue, 3 Mar 2015 20:57:26 +0000 (12:57 -0800)]
Fix a tsan error bug in frame parallel decode.
A frame may be waiting for an out of border pixel from another
frame. A frame's row progress variable is set to -1 when start being decoded
and another frame may be waiting for -2 row pixel from this frame.
In this case, vp9_frameworker_wait will return directly and skip the waiting
which leads to tsan error between threads.
Frank Galligan [Tue, 3 Mar 2015 19:20:11 +0000 (11:20 -0800)]
VP9: turn on tile-columns and frame-parallel-mode by default
Most of the current decoders use tile-based multithreading. Also
most of the current decoders need frame_parallel_decoding_mode
turned on to enable multithreaded decoding. tile-columns is
limited by resolution, so setting to max (6) is fine.
Yaowu Xu [Mon, 2 Mar 2015 23:35:58 +0000 (15:35 -0800)]
Adapt color sensitiviy threshold to luma signal energy
Instead using only a fixed threshold, this commit adapts the threshold
for color sensitivity decision to luma signal energy: chroma channel's
sse is at least 1/6 of that in luma for color sensitivity flag to be
set to active.
This recoups a large portion of the speed loss due to accounting for
chroma component costs in RTC mode decision.
Yunqing Wang [Tue, 3 Mar 2015 00:19:23 +0000 (16:19 -0800)]
fix a race condition caused by intra function pointer initialization
This patch fixed webm issue 962.
(https://code.google.com/p/webm/issues/detail?id=962)
The data races occurred when an encoder and a decoder were created
at the same time, and the function pointers were initialized twice.
Jingning Han [Fri, 27 Feb 2015 21:35:22 +0000 (13:35 -0800)]
Use variance metric for integral projection vector match
This commit replaces the SAD with variance as metric for the
integral projection vector match. It improves the search accuracy
in the presence of slight light change. The average speed -6
compression performance for rtc set is improved by 1.7%. No speed
changes are observed for the test clips.
Jingning Han [Fri, 27 Feb 2015 23:37:18 +0000 (15:37 -0800)]
Fix source frame border extension
This commit fixes an issue in source frame border extension. It
causes certain frame resolution such as 640x480 to have a portion
of the right/bottom extension filled by zeros, which misleads
motion search and degrades transform coding performance when large
block size is used.
This fix improves the speed 2 compression performance of a few
yt sequence, typically ranging from 1% - 2%, up to 5% at median
to low bit-rate.
James Zern [Fri, 27 Feb 2015 07:14:54 +0000 (23:14 -0800)]
test-data.mk: fix perf test data dependency
both the encode and decode perf tests require niklas_1280_720_30.yuv
broken since: 28eebf3 Merge "tests: add a shorter 720p test clip" 7839d03 tests: add a shorter 720p test clip