Marco Paniconi [Fri, 31 Aug 2018 22:42:19 +0000 (15:42 -0700)]
vp9-svc: Add first_spatial_layer_to_encode per superframe
VP9E_SET_SVC_LAYER_ID sets the first spatial layer to
encoder per superframe, so add this parameter to svc encoder.
This is needed, for example, to properly set is_key_frame for
spatial layers when base spatial layer is skipped encoded.
Johann [Thu, 30 Aug 2018 21:07:02 +0000 (14:07 -0700)]
silence c++ abi warning
Linking c++ libraries built with gcc 6 and gcc 7 on arm
generates some warnings because of incompatibilities between those
compilers:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728
libvpx does not generate a c++ library. C++ is only used for examples and tests.
Jingning Han [Mon, 27 Aug 2018 22:22:24 +0000 (15:22 -0700)]
Rework enc/dec mismatch detection
The previous enc/dec mismatch detection assumes the previously
reconstructed frame would always stay at frame buffer pool index
at 0. It could hence cause certain delay in enc/dec mismatch
detection when the immediate reconstruction frame is not yet
propagated to index 0 in the buffer map pool.
This change always keeps the latest decoded show frame buffer
index and directly gets the reconstructed frame from encoder and
decoder buffer pools to check for mismatch.
Reason for revert: it causes visual quality drop as described in b/112953058.
Original change's description:
> Prevent double application of min rate in two pass.
>
> The initial allocation of bits in the two pass code to each frame
> should be within the min max limits on the command line. However,
> when forming an ARF group the cost of the ARF is shared by frames
> in that group such that the residual bits for a frame could drop below
> the min value. This change prevents the minimum being re-applied
> after the cost of the ARF has been deducted as this may otherwise
> cause low rate sections to overshoot their target.
>
> Test runs comparing to a baseline run with min and max section pct
> 0-2000% vs one closer to the YT use case (50-150%) suggest that
> this fix not only results in better rate control but also gives a better
> rd outcome.
>
> For example the HD set vs 0-2000% baseline (opsnr, ssim).
> Old code (50-150): +0.751, +1.099
> New code(50-150): +0.241, -0.009
>
> Change-Id: I715da7b130bf53ba8aa609532aa9e18b84f5e2ef
Jingning Han [Wed, 22 Aug 2018 17:23:53 +0000 (10:23 -0700)]
Skip update prev_mi frame in show_existing_frame mode
When the current frame is coded by directly using a reference
frame in buffer, no need to update the prev_mi frame information
for next frame encoding control.
Hui Su [Wed, 22 Aug 2018 05:02:42 +0000 (22:02 -0700)]
Rework the ref_frame_skip_mask feature in RDO
Previously we often skip all compound inter prediction modes,
causing large coding loss. This patch modifies how we set the
ref_frame_skip_mask so that compound modes are considered in RDO.
Jingning Han [Tue, 21 Aug 2018 00:03:07 +0000 (17:03 -0700)]
Unify set_arf_sign_bias function
Determine if an ARF is on the future side by checking if its
offset meets the gop frame length. This unifies the support to
single- and multiple-layer ARF cases.
Supradeep T R [Tue, 12 Jun 2018 08:27:39 +0000 (13:57 +0530)]
Loopfilter MultiThread Optimization
Adding LPF within the tileworker hook. This means that LPF will be done
immediately after decode, without waiting for all threads to sync.
Performance Improvement -
Platform Resolution 2 Threads 4 Threads
X86 720p 7.24% 22.04%
1080p 5.29% 17.02%
ARM 720p 4.61% 8.75%
1080p 5.55% 12.03%
x86 Improvement measured on Intel Core i7-6700 CPU @ 2.10GHz set
in performance with turbo mode off
ARM Improvement measured on Nexus 6 Snapdragon 805 Quad-core @ 2.65 GHz
Jingning Han [Sat, 11 Aug 2018 00:01:08 +0000 (17:01 -0700)]
Use YUV components to build the temporal filter
Use both luma and chroma components simultaneously to estimate the
non-local mean kernel and build the temporal filter. It improves
the compression performance primarily for chroma components. Tested
in speed 0 and vbr mode, the coding gains are:
Marco Paniconi [Mon, 30 Jul 2018 16:25:14 +0000 (09:25 -0700)]
vp9: Add flatness metric to cyclic refresh setup.
For screen-content with aq-mode = 3: identify spatial
flat superblocks in the setup stage and don't mark them as
candidates for refresh. Spatially flat blocks are already
removed from refresh at a later stage in the encoding (in pick_mode),
but doing this at the setup stage of cyclic refresh (before encoding)
allows refresh to more quickly hit the text areas. Only drawback is
an extra source variance calculation for a set of superblocks on
each frame.
Adjust the refresh rate: lower it to reduce overshoot since
more texture areas are hit faster with this change.
Jerome Jiang [Mon, 13 Aug 2018 18:01:31 +0000 (11:01 -0700)]
vp9: fix memory alloc for adaptive_rd_thresh_row_mt.
When the feature is enabled and the memory is not available, allocate
it. There was a case where speed feature changed in the middle of stream
but the number of tiles stayed the same, memory was not re-allocated.
Another case is where speed for base layer is different than that of
higher quality layers (same resolution). Removed the speed constraints
forcing base layer using same speed setting.
Thus the memory for adaptive_rd_thresh_row_mt stayed NULL but the
feature was enabled.
Marco Paniconi [Mon, 13 Aug 2018 04:35:15 +0000 (21:35 -0700)]
vp9-svc: Fixes for cyclic refresh for SVC.
Add metrics that are being updated per-frame to
the layer struct, so each layer using the cyclic
refresh has the correct update. This is more consistent
for the rate control and refresh rate.
Some improvement in screen content clips.
Neutral for SVC on rtc set.
Marco Paniconi [Sat, 11 Aug 2018 19:59:40 +0000 (12:59 -0700)]
vp9-svc: Fix to updated SET_SVC_REF_FRAME_CONFIG control
Add flag to separate two cases of bypass (flexible) SVC mode:
usage of using the SET_SVC_REF_FRAME_CONFIG vs passing in the
frame_flags in the vpx_encode (only used for temporal layers).
This fixes failures in Datarate Temporal layer test,
introduced in commit: a66da31