Jingning Han [Wed, 15 Oct 2014 19:18:48 +0000 (12:18 -0700)]
Use rate/distortion thresholds to control non-RD partition search
Compare the estimated rate and distortion to the thresholds scaled
according to the operating block size and determine if further
split partition search will be run. The compression performance of
speed -5 is changed by -0.074%. The encoding speed is 10% - 15%
faster.
vidyo1 720p
16545 b/f, 40.492 dB, 11475 ms -> 16535 b/f, 40.486 dB, 10100 ms
nik720p
16624 b/f, 36.310 dB, 10071 ms -> 16617 b/f, 36.313 dB, 8346 ms
Jingning Han [Wed, 15 Oct 2014 18:37:20 +0000 (11:37 -0700)]
Replace copy_partitioning use case with choose_partitioning
This commit replaces the use of copy_partitioning with
choose_partitioning based on the sse of subsamped pixels, which
provides significantly better coding performance and runs at
similar speed, as compared to copy_partitioning. It improves rtc
speed 5 coding performance by 3%.
Adrian Grange [Thu, 2 Oct 2014 22:26:42 +0000 (15:26 -0700)]
Move input frame scaling into the recode loop
Move the point at which input frames are scaled
into the recode loop. This will allow us to change
the coded frame size dynamically in response
to previous attempts to encode the frame at a
higher resolution.
A following patch will implement a scheme for
resizing the frame in the recode loop.
Jingning Han [Thu, 9 Oct 2014 19:32:56 +0000 (12:32 -0700)]
Refactor rate distortion cost structure
This commit makes a struct that contains rate value, distortion
value, and the rate-distortion cost. The goal is to provide a
better interface for rate-distortion related operation. It is
first used in rd_pick_partition and saves a few RDCOST calculations.
Paul Wilkins [Mon, 13 Oct 2014 09:12:12 +0000 (10:12 +0100)]
Add adaptation option for VBR.
Allow min and maxQ to creep when the undershoot
or overshoot exceeds thresholds controlled by the
command line under_shoot_pct and over_shoot_pct
values.
Default is 100%,100% which ~disables adaptation.
Derf results for example undershoot% / overshoot%:-
Head:- Mean abs (%rate error) = 14.4%
This check in:-
25%/25% - Mean abs (%rate error) = 6.7%
PSNR hit -1% SSIM -0.1%
5% / 5% - Mean abs (%rate error) = 2.2%
PSNR hit -3.3% SSIM - 1.1%
Most of the remaining error and most of the quality hit is
at extreme data rates. The adaptation code still has an
exception for material that is in effect static so that we
don't over adjust and over spend on YT slide show type
content.
(Rebase of If25a2449a415449c150acff23df713e9598d64c9
to resolve a auto-merge error)
Paul Wilkins [Thu, 9 Oct 2014 13:49:41 +0000 (14:49 +0100)]
Add adaptation option for VBR.
Allow min and maxQ to creep when the undershoot
or overshoot exceeds thresholds controlled by the
command line under_shoot_pct and over_shoot_pct
values.
Default is 100%,100% which ~disables adaptation.
Derf results for example undershoot% / overshoot%:-
Head:- Mean abs (%rate error) = 14.4%
This check in:-
25%/25% - Mean abs (%rate error) = 6.7%
PSNR hit -1% SSIM -0.1%
5% / 5% - Mean abs (%rate error) = 2.2%
PSNR hit -3.3% SSIM - 1.1%
Most of the remaining error and most of the quality hit is
at extreme data rates. The adaptation code still has an
exception for material that is in effect static so that we
don't over adjust and over spend on YT slide show type
content.
Deb Mukherjee [Tue, 7 Oct 2014 09:48:08 +0000 (02:48 -0700)]
Subpel search cleanups and enhancements
- Some fixes to surface fit.
- Returns variance function as cost rather than sad in the
pattern search and diamond search functions. Only
vp9_pattern_search_sad function used in bigdia search
uses sad as integer 1-away costs.
- Deploys SUBPEL_TREE_PRUNED_MORE for speed 4+.
Results:
derf [Speed 3]: About +0.036% in coding efficiency without any
discernible speed loss.
derf [Speed 4]: About 2-3% faster at -0.199% loss in coding efficiency.
derf [Speed 5]: About 3-4% faster at -0.149% loss in coding efficiency.
Yunqing Wang [Thu, 2 Oct 2014 23:25:52 +0000 (16:25 -0700)]
Allow mode search breakout at very low prediction errors
In model_rd_for_sb function, the spatial domain SSE and variance
are checked to see if transform coefficients are quantized to 0.
Besides that, this patch adds another set of thresholds that are
much more strict. These thresholds are used to conduct a partition
block level check to measure if all its TX blocks are skippable
for YUV planes. If it is true, x->skip is set for this partition
block, and thus its mode search is terminated.
This speeds up the encoding at very low prediction error case,
such as screen sharing application. This patch covers what
rd_encode_breakout_test() does, so that function is removed.
Borg test at speed 3 shows:
For stdhd set, psnr: +0.008%, ssim: +0.014%;
For derf set, psnr: +0.018%, ssim: +0.025%.
No noticeable speed change.
Marco [Tue, 7 Oct 2014 23:15:32 +0000 (16:15 -0700)]
vp8: Suppress denoising with respect to old reference frames.
If the GOLDEN or ALTREF frame was last updated > x frames in the past,
don't use them for denoising (only consider LAST). Using an old reference
frame for denoising, e.g., if it is a long-term reference or the last key frame,
can cause some visible artifacts, in particular in the aggressive denoising mode.
Yaowu Xu [Wed, 8 Oct 2014 16:06:36 +0000 (09:06 -0700)]
Fix src frame buffer copy and extend
For input source with size that is not multiple of 8, the size is
rounded to 8 and saved in width or height, the original source sizes
are saved in crop_width and crop_height. This commit corrects the
computation of bottom and right extension amounts to use the orignal
sizes, hence crop_width and crop_height.
In addition, this commit also adds the missed initialization for
uv_crop_width and uv_crop_height.
Jim Bankoski [Tue, 7 Oct 2014 23:36:14 +0000 (16:36 -0700)]
experimental : partition using 1/8 x 1/8 image
The concept:
There's too much noise in source pixels for variance and at low bitrate
the reconstructed looks nothing like the source so we have problems
getting good partitionings with either. This skirts the issue by using
a box blur scaled down version for variance calculations. To compare
against source_var_ moved keyframe to be rd based like source_var.