This patch limits the maximum arf interval length to
approximately half a second. In some low fps animations in
particular the existing code was selecting an overly long interval
which was hurting visual quality. For a sample problem test clip
(360P animation , 15fps, ~200Kbit/s) this change also improved
metrics by >0.5 db.
There may be some clips where this hurts metrics a little, but the
worst case impact visually is likely to be less than having an
interval that is much too long. On more normal material at 24
fps or higher, the impact is likely to be nil/minimal.
Change-Id: Id8b57413931a670c861213ea91d7cc596375a297
Force split on 16x16 block (to 8x8) based on the minmax over the 8x8 sub-blocks.
Also increase variance threshold for 32x32, and add exit condiiton in choose_partition
(with very safe threshold) based on sad used to select reference frame.
Some visual improvement near moving boundaries.
Average gain in psnr/ssim: ~0.6%, some clips go up ~1 or 2%.
Encoding time increase (due to more 8x8 blocks) from ~1-4%, depending on clip.
Change-Id: I4759bb181251ac41517cd45e326ce2997dadb577
Refactor the loops in dec_build_inter_predictors to try and decrease
the number of instructions. Limited testing saw about 1% perf
increase on x86 and about 0.67 % perf increase on Arm.
Change-Id: I69cfe6335bb562fbaaebf43fb3f5c5a2a28882a2
Modifies a special handling that improves rate control accuracy in
the constrained quality mode, when the undershoot and overshoot
limits are set tighter.
Change-Id: If62103f0ef3ed1cac92807400678c93da50cf046
the sse4 code expects 16-byte aligned arrays; vp8 already had a similar
change applied:
b2aa401 Align SAD output array to be 16-byte aligned
Change-Id: I5e902035e5a87e23309e151113f3c0d4a8372226
Skip redundant prediction filter type cost in filter search loop,
if the rate value will be reset in Hadamard transform based rate
distortion estimate.
Change-Id: Ie5221f4bc8da9461c449df367251aeeac52c6e5d
This commit turns on the Hadamard transform based rate distortion
estimate for all block sizes in RTC coding mode. It conditionally
skips the rate distortion estimation if all zero block flag is set
on. No significant encoding speed change is observed. The
compression performance of speed -6 is improved by 1.7% over using
it only for block sizes of 32x32 and below.
Change-Id: I768145e6f05c737b05b5b5f1ee674e929532cafb
The threshold scaling factor was calculated wrong using partition
size "bsize". Thank Yaowu for pointing it out. It was fixed and no
speed change was seen.
Change-Id: If7a5564456f0f68d6957df3bd2d1876bbb8dfd27
This commit accounts for the transform block end of coefficient flag
cost in the RTC mode decision process. This allows a more precise
rate estimate. It also turns on the model to block sizes up to 32x32.
The test sequences shows about 3% - 5% speed penalty for speed -6.
The average compression performance improvement for speed -6 is
1.58% in PSNR. The compression gains for hard clips like jimredvga,
mmmoving, and tacomascmv at low bit-rate range are 1.8%, 2.1%, and
3.2%, respectively.
Change-Id: Ic2ae211888e25a93979eac56b274c6e5ebcc21fb
The vbp thresholds are set seperately for boosted/non-boosted
superblocks according to their segment_id. This way we don't
have to force the boosted blocks to split to 32x32.
Speed 6 RTC set borg test result showed some quality gains.
Overall PSNR: +0.199%; Avg PSNR: +0.245%; SSIM: +0.802%.
No speed change was observed.
Change-Id: I37c6643a3e2da59c4b7dc10ebe05abc8abf4026a
This commit separates Hadamard transform/quantization operations
from rate and distortion computation in block_yrd. This allows one
to skip SATD computation when all transform blocks are quantized
to zero. It also uses a new block error function that skips
repeated computation of sum of squared residuals. It reduces the
CPU cycles spent on block error calculation in block_yrd by 40%.
Change-Id: I726acb2454b44af1c3bd95385abecac209959b10
This commit allows the quantizer to compare the AC coefficients to
the quantization step size to determine if further multiplication
operations are needed. It makes the quantization process 20% faster
without coding statistics change.
Change-Id: I735aaf6a9c0874c82175bb565b20e131464db64a
For large partition blocks(block_size > 32x32), the variance
calculation is modified so that every 8x8 block's variance
is stored during the calculation, which is used in the
following transform skipping test. Also, the variance for
every tx block is calculated. The skipping test checks all tx
blocks in the partition, and sets the skip flag only if all tx
blocks are skippable. If the skip flag of Y plane is 1, a
quick evaluation is done on UV planes. If the current partition
block is skippable in YUV planes, the mode search checks fewer
inter modes and doesn't check intra modes.
The rtc set borg test(at speed 6) showed that:
Overall psnr: -0.527%; Avg psnr: -0.510%; ssim: -0.573%.
Average single-thread speedup on rtc set was 3.5%.
For 720p clips, more speedups were seen.
gipsrecmotion: 13%
gipsrestat: 12%
vidyo: 5 - 9%
dark: 15%
niklas: 6%
Change-Id: I8d8ebec0cb305f1de016516400bf007c3042666e
sse4 isn't set by configure or used in rtcd, correct the sad entries to
use sse4_1 without changing the signatures for now.
this was done in vp8 post-vp9 branch.
Change-Id: Ia9f1fff9f2476fdfa53ed022778dd2f708caa271
exclude files that only contain functions for non-high-bitdepth builds.
this removes some warnings related to missing prototypes
Change-Id: Ic6642998c46a7b808c6c53b2f9c34bcd4d037abe
This commit allows the encoder to check the eob per transform
block to decide how to compute the SATD rate cost. If the entire
block is quantized to zero, there is no need to add anything; if
only the DC coefficient is non-zero, add its absolute value;
otherwise, sum over the block. This reduces the CPU cycles spent
on vp9_satd_sse2 to one third.
Change-Id: I0d56044b793b286efc0875fafc0b8bf2d2047e32
When the estimated rate-distortion cost of skip coding mode is
lower than that of sending quantized coefficients, allow the
encoder to drop these coefficients. This improves the compression
performance of speed -6 by 0.268% and makes the encoding speed
slightly faster.
Change-Id: Idff2d7ba59f27ead33dd5a0e9f68746ed3c2ab68
This commit fixes the SSE2 version 8x8 Hadamard transform
alignment and makes it consistent with the C version.
Change-Id: I1304e5f97e0e5ef2d798fe38081609c39f5bfe74
This commit replaces the 16x16 2D-DCT transform with Hadamard
transform for RTC coding mode. It reduces the CPU cycles cost
on 16x16 transform by 5X. Overall it makes the speed -6 encoding
speed 1.5% faster without compromise on compression performance.
Change-Id: If6c993831dc4c678d841edc804ff395ed37f2a1b
This commit makes the encoder to select between SATD/variance as
metric for mode decision. It also allows to account chroma
component costs for mode decision as well. The overall encoding
time increase as compared to variance based mode selection is about
15% for speed -6. The compression performance is on average 2.2%
better than variance based approach, with about 5% compression
performance gains for hard clips (e.g., jimredvga, nikas720p, and
mmmoving) at lower bit-rate range.
Change-Id: I4d04a31d36f4fcb3f5f491dacd6e7fe44cb9d815
This commit uses Hadamard transform based rate-distortion cost
estimate for rtc coding mode decision. It improves the compression
performance of speed -6 for many hard clips at lower bit-rates.
For example, 5.5% for jimredvga, 6.7% for mmmoving, 6.1% for
niklas720p. This will introduce extra encoding cycle costs at
this point.
Change-Id: Iaf70634fa2417a705ee29f2456175b981db3d375
Metrics on RTC set go down by ~1.5% on average.
Key frame encoding time goes down by factor of ~5.
Change-Id: Ia83acc55848613870e5ac6efe7f3d904d877febb
To enable us to the scale-invariant motion estimation
code during mode selection, each of the reference
buffers is scaled to match the size of the frame
being encoded.
This fix ensures that a unit scaling factor is used in
this case rather than the one calculated assuming that
the reference frame is not scaled.
Change-Id: Id9a5c85dad402f3a7cc7ea9f30f204edad080ebf
Set the GF group adaptive max Q compile flag to 1 by default.
This change has a quite big visual impact in some clips and also
contributes to tighter rate control.
For short test clips that have consistent content the impact is
quite small on metrics but for more varied long form clips there is
a drop in overal psnr but a sharp rise in average psnr caused by
greater expenditure on some easier sections and tighter rate clipping
in hard sections.
In chunck'ed encodes some of the effect will already be present due
to the independent rate control in each chunk but this change takes
the control down to a smaller scale.
yt hd +10.67%, - 3.77%, -1.56%
yt +9.654%, - 3.6%, - 1.82%
std hd +0.25%, -0.85%, -0.42%
derf +0.25%, - 1.1%. - 0.87%
Change-Id: Ibbc39b800d99d053939f4c6712d715124082843e
1. skip near if it is same as nearest
2. correct rounding for converting mv to fullpel position
3. update pred_mv_sad after new mv search.
Overall .1%~.25% compression gains on rtc set for speed 5, 6, 7, 8.
Change-Id: Ic300ca53f7da18073771f1bb993c58cde9deee89
Revised adjustment for rd based on source complexity.
Two cases:
1) Bias against low variance intra predictors
when the actual source variance is higher.
2) When the source variance is very low to give a slight
bias against predictors that might introduce false texture
or features.
The impact on metrics of this change across the test sets is
small and mixed.
derf -0.073%, -0.049%, -0.291%
std hd -0.093%, -0.1%, -0.557%
yt +0.186%, +0.04%, - 0.074%
ythd +0.625%, + 0.563%, +0.584%
Medium to strong psycho-visual improvements in some
problem clips.
This feature and intra weight on GF group length now
turned on by default.
Change-Id: Idefc8b633a7b7bc56c42dbe19f6b2f872d73851e
This experiment biases the rd decision based on the impact
a mode decision has on the relative spatial complexity of the
reconstruction vs the source.
The aim is to better retain a semblance of texture even if it
is slightly misaligned / wrong, rather than use a simple rd
measure that tends to favor use of a flat predictor if a perfect
match can't be found.
This improves the appearance of texture and visual quality
on specific test clips but is hidden under a flag and currently
off by default pending visual quality testing on a wider Yt set.
Change-Id: Idf6e754a8949bf39ed9d314c6f2daaa20c888aad
The joint_motion_search function alternates prediction
between two reference frames. In order to reuse existing
code, a pointer to the appropriate reference frame is
written into xd->plane[0].pre[0], that the motion
estimation code assumes points to the reference frame.
If this first reference frame was scaled then the
pointer was incorrectly being reset to point to the
unscaled reference frame rather than the scaled
version.
Change-Id: I76f73a8d8f4f15c1f3a5e7e08a35140cdb7886ab
this removes the CONFIG_* checks from public headers, but means
'--enable-experimental --enable-spatial-svc' builds will fail without a
local change to the ABI in vpx_encoder.h. this should be all right for
testing this experiment.
Change-Id: Ief55e7b9d1e8332cfce990275e04c29b30af0c4a
Factor in segment#2 and skip blocks into the postencode estimated bits,
and increase somewhat the aggressiveness of the refresh.
PSNR/SSIM Metrics on RTC set go up by ~0.8/0.5%.
Change-Id: I5d4e7cb00a3aefb25d18c88b6b24118b72dc5d51
This commit makes the encoder to explicitly calculate the SAD
associated with the LAST_FRAME motion vector and compare it to
that of the GOLDEN_FRAME given by integral projection motion
estimation. It skips the expensive sub-pixel motion search over
GOLDEN_FRAME when the LAST_FRAME can provide fairly good motion
compensated prediction quality.
For dark720p speed -6 single thread goes from
33304 b/f, 40.070 dB, 18156 ms ->
33319 b/f, 40.061 dB, 17611 ms
Change-Id: I01bc94b9b598075567a392111046b97a9bc30efe
Use force_split to constrain the partition selection.
This is used because in the top-down approach to variance partition,
a block size may be selected even though one of its subblocks may have
high variance.
In this patch the selection of the 64x64 block size will only
be allowed if the variance of all the 32x32 subblocks are also below the threshold.
Stil testing, but some visual improvement for areas near slow moving boundary
can be seen. Metrics for RTC set increase by about ~0.5%.
Change-Id: Iab3e7b19bf70f534236f7a43fd873895a2bb261d
Shut off all the metric checks for golden reference frame, if we
decide that it is unlikely to be selected for reference.
Change-Id: Ie457cc1fd43935584403b4982659aed80fb9909c
Move the scaling factor outside column projection. This avoids
repeated calculation of the same scaling factor. Profiling shows
that the percentage of vp9_int_pro_col_sse2 of overall cycles
goes from 2.29% down to 1.88%.
Change-Id: I5ac4e324ab2d7f33ba2de66dd2a12e04e04dfd66
1. remove duplicate initialization to mbmi->interp_filter.
2. move mv clamping into ref_frame loop instead of mode checking loop.
3. move the check if last frame is same as golden frame earlier to
avoid initialization of Golden reference related variables.
Change-Id: Idf2d05e19e94a24f69cc289687869fc71d2ff289
The compression performance of speed -5 is on average 12.6% better
than speed -6. At lower bit-rates, the gains are typically 20% or
more. For 2-thread encoding, the speed -5 takes about 1.6x time of
speed -6.
Change-Id: If7a73464a24d33e8f49b9533b51ec51c8da7fc80
The commit updates the comments in vp8cx.h to make it clear which
codec support each of codec control functions.
Change-Id: Ibf876e289d4325bbb61ce19311da60d384624c2f
Crash occured on very first key frame, because denoiser
temporal function was beng entered.
Updated denoiser unittest to set cpu_used from first frame,
and verified fix fixes the crash.
Change-Id: I3be1124b52846fbbe7248d2c3d6136e086c80bc1
This commit uses a 6-point 1-step refine motion search in the
integral projection based full pixel motion estimation, to replace
the current 9-point search.
It reduces runtime cost of speed -6 on some noisy clips, e.g.,
dark720p single thread
33314 b/f, 40.076 dB, 18231 ms ->
33307 b/f, 40.067 dB, 17768 ms
The compression performance for rtc set remains unchanged.
Change-Id: I194ea5a9ce52e5a10baeee36338633adc22f764c
This commit changes to use single loop to evaluate all inter modes.
There is no impact on compression quality and speed, but allow future
experiment with the order of modes evaluated.
Change-Id: I71696ce1014cbe127e25e98710d835987f5ecc09
Added a skip_dc check. If skip_dc = 1, we could eliminate calling
of vp9_model_rd_from_var_lapndz(). This gave slight PSNR & SSIM
gain(<0.1%), and no speed change.
Change-Id: If5ca733366148c86b98e196a00cc890f50e9a3e5
Re-arrange the multiplication and right shift operations to avoid
integer overflow in choose_partitioning.
Change-Id: Ib4005cafb410a67c1960486471d75b6ebe38c4e0
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.
Change-Id: I49b8d24b2174303066fd8eff2102c0648f2869df
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.
Change-Id: I0fe402ad2edf0149d0349ad304ab9b2abdf0c804
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.
Change-Id: Ia48f010eb590b2d517d5678c394110b326a1a95e
This patch accounts in the first pass stats for blocks that
while not coded as intra, are complex and have an intra error /
best error ratio below a threshold.
The modification shortens the GF arf interval for a particular
class of content that contains a lot of blocks matching the
above criteria. (In one short problem test sequence the average
interval dropped from about 14-15 to 10-11)
The change results in small net gains in metrics results for the
Yt(~0.2%) and yt-hd (~0.5%) sets and is approximately neutral
for the other test sets.
The change is currently shielded by a flag and off by default
pending verification that it does not cause other regressions
in tests on a wider YT test set.
Change-Id: I6b803daa6a4ac09a6f428fb3a18be1ecedd974b7