JackyChen [Sat, 25 Oct 2014 17:51:51 +0000 (10:51 -0700)]
vp9_denoiser_sse2: refactor the code.
Combined vp9_denoiser_8xM_sse2 and vp9_denoiser_4xM_sse2 into one
function vp9_denoiser_NxM_sse2_small and passed the bitexact testing.
Changed the name of the function vp9_denoiser_64_32_16xM_sse2 to
vp9_denoiser_NxM_sse2_big.
Yaowu Xu [Fri, 17 Oct 2014 19:13:16 +0000 (12:13 -0700)]
Allow update of golden refernce buffer in CBR mode
This commit changes to allow the usage of golden reference frame in
VP9 CBR mode to improve quality. VP9 supports potentially up to 8
reference buffers, it has reference buffers available for this
purpose. This was not possible in VP8 as golden and alt-ref buffers
were used for temporal scalability purpose in CBR mode in WebRTC.
For frames that update golden frame, there can be a quality boost.
The amount of allowed bitrate boost can be controlled via parameter
rc_max_inter_bitrate_pct. The inital value of the boost ratior is
currently based on over_shoot_pct. Further experiments will work
out the adaption of this boost value.
Paul Wilkins [Tue, 28 Oct 2014 13:03:06 +0000 (13:03 +0000)]
Relax maximum Q for extreme overshoot.
Added code to relax the active maximum Q in response
to extreme local overshoot to reduce bandwidth peaks.
The impact is small in metrics terms, but it this helps reduce
bandwidth spikes and overall overshoot in a number of
clips in our tests sets (especially the YT test set).
In particular this should help prevent very big spikes where a clip
is mainly easy but has a short hard section. In such a case a choice
of maximum Q for the clip as a whole may allow us to hit the overall
target rate but give some extreme spikes. The chunked encoding in YT
mitigates this problem but it can show up where a longer clip is
coded as a single chunk.
Jingning Han [Mon, 27 Oct 2014 19:03:47 +0000 (12:03 -0700)]
Use zero motion vector in choose_partitioning
The zero motion vector was effectively used in the subsampled pixel
based variance calculation. This commit makes it directly use zero
mv to generate prediction.
Yaowu Xu [Mon, 27 Oct 2014 20:13:14 +0000 (13:13 -0700)]
Add a new control of golden frame boost in CBR mode
0 means that golden boost is off, and uses average frame target rate,
a non-zero number means the percentage of boost over average frame
bitrate is given initially to golden frames in CBR mode.
Jingning Han [Thu, 23 Oct 2014 23:54:45 +0000 (16:54 -0700)]
Tile based adaptive mode search in RD loop
Make the spatially adaptive mode search in rate-distortion
optimization loop inter tile independent. Experiments suggest that
this does not significantly change the coding staticstics.
Single tile, speed 3:
pedestrian_area 1080p 1500 kbps
59192 b/f, 40.611 dB, 101689 ms
blue_sky 1080p 1500 kbps
58505 b/f, 36.347 dB, 62458 ms
mobile_cal 720p 1000 kbps
13335 b/f, 35.646 dB, 45655 ms
as compared to 4 column tiles, speed 3:
pedestrian_area 1080p 1500 kbps
59329 b/f, 40.597 dB, 101917 ms
blue_sky 1080p 1500 kbps
58712 b/f, 36.320 dB, 62693 ms
mobile_cal 720p 1000 kbps
13191 b/f, 35.485 dB, 45319 ms
Marco [Fri, 24 Oct 2014 16:31:38 +0000 (09:31 -0700)]
vp8: Updates to noise level estimate.
-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.
Adrian Grange [Fri, 17 Oct 2014 22:12:43 +0000 (15:12 -0700)]
Move frame re-sizing into the recode loop
The point at which frames are scaled to their
coded dimensions is moved into the re-code loop.
This is in preparation for a further patch that
will add logic into the re-code loop to reduce
the coded frame size if the encoder is struggling
to hit the target data rate at the native frame
size.
Paul Wilkins [Wed, 22 Oct 2014 12:46:40 +0000 (13:46 +0100)]
Enable dual arf with constant q.
Add second level arf Q adjustment when using dual arfs
in constant Q mode.
Previously in constant Q mode enabling dual arf hurt by ~5%
but with this change the average benefit is ~1-1.5% with some
mid range data points up ~10%.
Note however that it still hurts on some clips including
some very low motion show content.
This patch allocated frame contexts outside VP9_COMMON. This allows
multiple threads to share the same copy of frame contexts, and
reduces the overhead. It also guarantees the correct update of
these contexts during bitstream packing. This patch doesn't change
encoding result.
Yaowu Xu [Wed, 22 Oct 2014 18:57:09 +0000 (11:57 -0700)]
Fix a subtle issue in re-use inter_pred
The initialization of this_mode_pred does not work when the ref_frame
loop ever goes beyond LAST_FRAME. This commit fixes the subtle issue
and allows potentially expanding the loop to test GOLDEN_FRAME.
Yaowu Xu [Mon, 20 Oct 2014 21:41:20 +0000 (14:41 -0700)]
Change speed features for good quality(cpu-used=5)
The existing speed features produce horrible encoding results, almost
30% worse than cpu-used=4, this commit adjust the speed features to
produce relatively resonable results to be within 3%-5% of cpu-used=4.
Jingning Han [Fri, 17 Oct 2014 15:58:28 +0000 (08:58 -0700)]
Hybrid partition search for rtc coding mode
This commit re-designs the recursive partition search scheme in
rtc speed -5. It first checks if the current block is under cyclic
refresh mode. If so, apply recursive partition search. Otherwise,
perform sub-sampled pixel based partition selection. When the
pre-selection finds the partition size should be 32x32 or above,
use the partition size directly. Otherwise, apply partition search
at nearby levels around the preset partition size.
It is enabled in speed -5. The compression performance of rtc
speed -5 is improved by 9.4%. Speed wise, the run-time goes slower
from 1% to 10%.
nik_720p, 1000 kbps
33220 b/f, 38.977 dB, 10109 ms -> 33200 b/f, 39.119 dB, 10210 ms
vidyo1_720p, 1000 kbps
16536 b/f, 40.495 dB, 10119 ms -> 16536 b/f, 40.827 dB, 11287 ms
levytamar82 [Thu, 2 Oct 2014 06:47:31 +0000 (23:47 -0700)]
SAD32xh and SAD64xh for AVX2
All sad function that process above 32 consecutive elements are optimized
for AVX2:
vp9_sad64x64
vp9_sad64x32
vp9_sad32x64
vp9_sad32x32
vp9_sad32x16
vp9_sad64x64_avg
vp9_sad64x32_avg
vp9_sad32x64_avg
vp9_sad32x32_avg
vp9_sad32x16_avg
The functions that appeared as a hotspot is vp9_sad32x32 and vp9_sad64x64
vp9_sad32x32 was optimized by 68% and vp9_sad64x64 was optimized by 90%
both of them gave and overall ~2.3% user level gain
Yunqing Wang [Thu, 16 Oct 2014 19:29:48 +0000 (12:29 -0700)]
Remove the dependency in token storing locations
Currently, the tokens for a tile are stored immediately after its
preceding tile, which causes a dependency. This is unnecessary
since we always allocate enough memory for tokens. Removing
the dependency allows token writing done in parallel. This patch
doesn't change encoding result.
Paul Wilkins [Thu, 16 Oct 2014 15:24:25 +0000 (16:24 +0100)]
Alter adjustment of two pass GF/ARF boost with Q.
Delete gfboost_qadjust() and move Q based adjustment
into calc_frame_boost(). Also remove clamping. Making
the adjustment here means that it influences not just the
boost level but also the selection of the GF/ARF interval.
This change gives a small average gain in PSNR but
larger gains in SSIM, especially for harder std-hd set (1.5%)
James Zern [Sun, 31 Aug 2014 20:16:37 +0000 (13:16 -0700)]
move LFWorkerData allocation to VP9LfSync
this removes an assumption that worker->data1 would be pointing to a
TileWorkerData allocation.
additionally, within the multi-threaded loopfilter pass VP9LfSync as a
parameter to the worker hook, removing the need for a shadow pointer in
LFWorkerData.
Paul Wilkins [Thu, 16 Oct 2014 11:39:14 +0000 (12:39 +0100)]
Change initialization of static_scene_max_gf_interval.
This removes an unnecessary restriction that causes
a problem (noticed by AWG) when the forced key frame
interval is set to a very small value, such as 10. In this case
we were being forced to code minimal length GF groups.
Minghai Shang [Tue, 14 Oct 2014 23:25:03 +0000 (16:25 -0700)]
[spatial svc]Another workaround to avoid using prev_mi
We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.
This change has introduced a significant quality regression on content
with forced key frames. (e.g. the YT and yt-hd set). It is most
noticeable in static content where the kf bits dominate. Here, despite
key frames being apparently coded at the same Q, there is a drop in all
metrics of ~20% (e.g clXR and BFa0).