For testing implemented a fixed pattern and delta, 1 pass,
fixed Q, low delay mode.
This has not in any way been tuned or optimized.
Change-Id: Idf5ee179b277fa15d07a97f14f2ce5bbaae80a04
Dynamic resizing now support two-steps scaling: first go down to
3/4 and then 1/2. This feature is under a flag which controls the
switch between two-steps scaling and one-step scaling (1/2 only).
Change-Id: I3a6c1d3d5668cf8e016a0a02aeca737565604a0f
For 1 pass CBR mode under screen content mode:
if pre-analysis (source temporal-sad) indicates significant
change in content, then check the projected frame size after
encode_frame(), and if size is above threshold, force re-encode
of that frame at max QP.
Change-Id: I91e66d9f3167aff2ffcc6f16f47f19f1c21dc688
Adds two new vp9 parameters --min-gf-interval and --max-gf-interval
to enable testing based on frequency of alt-ref frames.
Also adds a unit-test to test enforcement of min-gf-interval.
For both these parameters the default value is 0, which indicates
they are picked by the encoder, based on resolution and framerate
considerations. If they are greater than zero, the specified
parameter is honored.
(Additional note by paulwilkins)
Note that there is a slight oddity in that key frames are also GFs and
considered part of GF only group. However they are treated as not
being part of an arf group because for arf groups the previous GF is
assumed to be the terminal or overlay frame for the previous group.
(end note)
Change-Id: Ibf0c30b72074b3f71918ab278ccccc02a95a70a0
Decision to scale down/up is based on buffer state and average QP
over previous time window. Limit the total amount of down-scaling
to be at most one scale down for now.
Reset certain quantities after resize (buffer level, cyclic refresh,
rate correction factor).
Feature is enable via the setting rc_resize_allowed = 1.
Change-Id: I9b1a53024e1e1e953fb8a1e1f75d21d160280dc7
This patch provides a partial rapid feedback of bits
resulting from extreme undershoot.
Some improvement on some problem animated material
but in its current form only a small impact on the metrics results
of our standard test sets.
Change-Id: Ie03036ea8123bc2553437cb8c8c9e7a9fc5dac5d
Previously limit on max interval set to 0.5 seconds.
Though this helped some low frame rate material it
appears to be a bit too aggressive for some 24 and 25 fps
content. This patch relaxes the limit to 0.75 seconds.
The patch also adds a new minimum interval variable
to replace the current hard wired value. This allows us
to impose a limit on the maximum number of primary
arfs per second for high frame rate (e.g. 50 & 60fps)
content. This is to address concerns regarding playback
performance on some platforms if there is a high base
frame rate and very frequent arfs.
Change-Id: I373e8b6b2a8ef522eced6c6d2cceb234ff763fcf
Note: This feature is still in development.
Add an option for the encoder to decide the resolution
at which to encode each frame.
Each KF/GF/ARF goup is tested to see if it would be
better encoded at a lower resolution. At present, each
KF/GF/ARF is coded first at full-size and if the coded
size exceeds a threshold (twice target data rate) at
the maximum active Q then the entire group is encoded
at lower resolution.
This feature is enabled in vpxenc by setting:
--resize-allowed=1
In addition, if the vpxenc command line also specifies
valid frame dimensions using:
--resize-width=XXXX & --resize_height=YYYY
then *all* frames will be encoded at this resolution.
Change-Id: I13f341e0a82512f9e84e144e0f3b5aed8a65402b
Just before a forced key frame we often get a foreshortened
arf/gf group. In such a case, we do not want to update
rc->last_boosted_qindex, which is used to define the Q range
for the forced key frame itself.
This gives a small average metrics gain for the YT and YT-HD sets
(eg. YT SSIM +0.141%).
Change-Id: Ie06698bc4f249e87183b8f8fb27ff8f3fde216d9
Incorporate segment delta-q into estimated bits.
This generally improves the rate control under cyclic refresh (aq=3) mode.
Change-Id: I1dc60fb230e7d08357fae18909d8ed27bf58e037
In rare cases, the interaction between rate correction factor and Q
choices may cause severe oscillating frame sizes that are way off
target bandwidth. This commit adds tracking of rate control results
for last two frames, and use the information to prevent oscillating
Q choices.
Change-Id: I9a6d125a15652b9bcac0e1fec6d7a1aedc4ed97e
Prepare for the introduction of frame-size change
logic into the recode loop.
Separated the speed dependent features into
separate static and dynamic parts, the latter being
those features that are dependent on the frame size.
Change-Id: Ia693e28c5cf069a1a7bf12e49ecf83e440e1d313
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)
Change-Id: Iec4e1613ef0d067454751d8220edb7058dfbd816
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.
Change-Id: If25a2449a415449c150acff23df713e9598d64c9
Substantial restructuring of the way we estimate
the rate of decay in prediction quality and determine
the arf interval and amount of boost used.
Also other changes to support moving to a lower first pass
Q which exposes some new features and allows us to better
distinguish genuinely static blocks from low motion or noisy
blocks.
Net gains now visible on all the test sets with std-hd PSNR up
1.87%. There are still some bad outlier cases but most of these
are low motion or slide show type content where the metrics
are already high at any given rate. The best + case is up by
more than 10%.
Change-Id: I18e25170053bdf3188f493ff8062f48a74515815
All changes are for spatial svc only.
1. Enable encoding hidden frames in each layer and use alt reference idex to reference the hidden frame in each layer
2. Use golden reference idx for spatial reference
3. For those layers that don't have hidden frames (caused by lack of frame buffers), reference a hidden frame in lower layers
4. Add "auto-alt-refs" in svc options
Change-Id: Idf27d1fd2fb5f3ffd9e86d2119235e3dad36c178
This patch implements a mechanism for inserting a second
arf at the mid position of arf groups.
It is currently disabled by default using the flag multi_arf_enabled.
Results are currently down somewhat in initial testing if
multi-arf is enabled. Most of the loss is attributable to the
fact that code to preserve the previous golden frame
(in the arf buffer) in cases where we are coding an overlay
frame, is currently disabled in the multi-arf case.
Change-Id: I1d777318ca09f147db2e8c86d7315fe86168c865
Add code to monitor over and under spend and
apply limited correction to the data rate of subsequent
frames. To prevent the problem of starvation or overspend
on individual frames (especially near the end of a clip) the
maximum adjustment on a single frame is limited to a %
of its un-modified allocation.
Change-Id: I6e1ca035ab8afb0c98eac4392115d0752d9cbd7f
Turns off the DISABLE_RC_LONG_TERM_MEM macro and makes other changes
in the way the bits are updated, to make 2-pass rate control track
target bitrates closer.
Change-Id: I5f3be4b11c2908e6a9a9a1dd4fcf4e65531c44d8
Removes certain cases of feedback of active_worst_quality,
and removes it from the RATE_CONTROL structure. Now active
worst quality is expected to be computed locally in the
q picking function during the encode.
Making temporal filter strength depend on avg_frame_qindex
rather than on active_worst_quality actually improves
performance esp. for yt.
derf: +0.038%
yt: +0.359%
Change-Id: I1fe5a343034b55af9322289165321f00ac0827b1