This commit implements a new rate control system which was ported from
Daala's rate control system (which was based off of Theora's rate
control system) to the encoder. Its aim is to address the weaknesses of
the current rate control system and eventually serve as its replacement.
This is still work in progress. So far this commit only implements
support for single pass encoding for constant quality and bitrate
targeting.
Additional commits which implement two-pass support and the rest to
match the feature set of the current rate control system are coming
soon.
The rate control system hasn't been fully tuned (and will likely need
additional tuning as the encoder's development progresses) and does
contain some "hacks", to convert the quality to a quantizer value
(empirical) and to tweak the quantizer in between golden frames (which
uses some code from the current rate control system as well as code
which attempts to model what that code does), the latter of which is
only in the constant quality codepath.
Bitrate targeting works much better than the current rate control
system's targeting and will actually closely match the rate specified by
the user without the current rate control system's bursty behaviour.
Change-Id: I588fbfd2e80a3d21ce7176903115d6a96ef1700a
It is now possible to use daala_ec without ec_multisymbol by running:
./configure --enable-experimental --disable-ec_mulitsymbol.
Change-Id: I55a0473b887846f01ef832059cdbe31aebebce05
Noticed that some ALTREF_FRAMEs could have used compound modes for its
prediction but have been labeled as SINGLE_REFERENCE mode in the frame
header. This experiment is to remove the COMPOUND_REFERENCE mode from
the frame-level reference mode choices and only leave SINGLE_REFERENCE
and REFERENCE_MODE_SELECT the two choices in the frame header.
When turning on both ext-refs and ref-adapt, compared against ext-refs
itself, a small gain is achieved. In PSNR, the bitrate saving gains are
as follows:
lowres: Avg -0.120%; BDRate -0.128%
midres: Avg -0.155%; BDRate -0.128%
Change-Id: I2cfff8a6b7eaa65ef863dbdbc4dd086d3b586f8c
The new_tokenset experiment replaces the unconstrained tokenset with a
multisymbol alphabet in an inventive way.
Tested configurations:
new_tokenset + ec_adapt, new_tokenset, ec_multisymbol
Change-Id: I846ab2e51c2a1dc3f2f9904ed8c47a8e98f853c5
This commit renames deblocking_across_tiles to loopfilter_across_tiles,
to get ready for dering and clpf integration.
Change-Id: Id25b051da9b1e5cb92f35a9619662597462d9537
This experiment implements the idea of the uniform tri-prediction,
which adds a 3rd inter prediction on top of the existing compound
inter bi-prediction. The final predictor for an inter-coded block is
the average of the compound bi-predictor and the third predictor,
which is indentified by a third reference frame and a third motion
vector.
Change-Id: I7ca8435a441960e7d9702fa09614ed7ae9d0ab02
This commit adds a new experiment, Daala's distortion function,
which is designed to better approximate perceptual distortion
in 8x8 pixel blocks.
This experiment is expected to work best with PVQ.
It measures the variance of overlapped 4x4 regions in the 8x8 area,
then uses these variances to scale the MSE of weighted frequency domain
distortion of 8x8 block.
Since AV1 calculates distortion in blocks as small as 4x4, it is not possible to
directly replace the existing distortion functions of AV1,
such as dist_block() and block_rd_txf().
Hence, there has been substantial changes in order to apply
Daala's 8x8 distortion function.
The daala distortion function is applied
after all 4x4 tx blocks in a 8x8 block are encoded (during RDO),
as in below two cases:
1) intra/inter sub8x8 predictions and
2) 4x4 transform with prediction size >= 8.
To enable this experiment, add '--enable-daala-dist' with configure.
TODO: Significant tuning of parameters is required since the function has
originally came from Daala thus most parameters would not work
correctly outside Daala.
The fact that chroma distortion is added to the distortion of AV1's RDO is
also critical since Daala's distortion function is applied to luma only
and chroma continues to use MSE.
Change-Id: If35fdd3aec7efe401f351ba1c99891ad57a3d957
At the edges of the picture only a subset of partitions are legal. Add
new contexts for these borders so they don't distort the probabilities of
the interior of the image where all partitions are legal.
Only include one context for each block size of each border direction
because so few blocks fall into these contexts to begin with.
objective-1-fast:
PSNR | PSNR Cb | PSNR Cr | PSNR HVS | SSIM | MS SSIM | CIEDE 2000
-0.0294 | -0.0911 | -0.2382 | -0.0481 | -0.0441 | -0.0450 | -0.0454
derf144: -0.135
lowres: -0.124
midres: -0.076
hdres: -0.078
Change-Id: I909b98eebb7e49273cde90154c8408febe334158
NCOBMC (non-causal obmc) allows overlapped prediction that takes
mvs from blocks at positions with non-causal relation (e.g. at the
bottom, or to the right) to the current block.
This experiment will be a sub-experiment of MOTION_VAR, so will only
be effective when MOTION_VAR is on.
Change-Id: Ie3aa9591e1c15f5cc251664ea3c146210a5010cf
This commit adds a new experiment to allow disabling of loop filtering
on tile boundaries. It is implemented by adding a syntax field
"loopfilter_across_tiles_enabled" into the uncompressed frame header.
If it is set to 0, decoder and encoder will disables loop filtering for
block edges that are also tile boundaries.
Change-Id: Ib80bfd82d49c74f1ba46ae18ceedb30704ac8aa5
This patch reverts ca4782bb: Disable daala_ec when ext_tile is enabled.
Certain tests in superframe_test.cc were disabled for only ans that
should have been disabled for both ans and daala_ec.
This was corrected in d526d0a8 and now the unit tests pass with
--enable-daala_ec and --enable-ext_tile.
Change-Id: I76244bb4d687040dbd504475c31361933830943d
Experiment ext_tile is not compatible with daala_ec yet, this commit
disables daala_ec and enable ans if ext_tile is enabled.
A follow-up commit should resolve the underline conflicts within
ext-tile experiment.
BUG=aomedia:116
Change-Id: If60cb170e908a844dc8d22efce82f2a2c01b391b
ext_tile is not compatible with reference_buffer, this commit changes
to disable refrence_buffer when ext_tile is enabled.
BUG=aomedia:114
Change-Id: I6416f4c731bec1c4cfeab3cdb539f359627ed2e2
entropy_stats: to generate stats of various symbols encoded
masked_tx: new experiemnt for coding a smaller transform in a
prediction block
Change-Id: I48baf0f1c37245c43031a9eda879ef49eee5e76b
intra-interp experiment allows intra prediction to use different
interpolation filters. It was part of the ext-intra in the nextgenv2
branch.
Change-Id: I27ab692494dc79bb92e457dbf9a72988577f1c6d
This commit adds an experiment to interleave the coding of transform
coefficients from YUV planes. The experiment can be enabled at config
time by --enable-coef-interleave.
Change-Id: Ifd92f9c367304bca9732f13fa026eb8996363677
The rans experiment is dead. The ans experiment with the ec_multisymbol
experiment also turned on takes its place.
Change-Id: Ie9f30ec7cf73aae6b2ea580a7b1f208485a8a7a7
PVQ replaces the scalar quantizer and coefficient coding with a new
design originally developed in Daala. It currently depends on the
Daala entropy coder although it could be adapted to work with another
entropy coder if needed:
./configure --enable-experimental --enable-daala_ec --enable-pvq
The version of PVQ in this commit is adapted from the following
revision of Daala:
fb51c1ade6
More information about PVQ:
- https://people.xiph.org/~jm/daala/pvq_demo/
- https://jmvalin.ca/papers/spie_pvq.pdf
The following files are copied as-is from Daala with minimal
adaptations, therefore we disable clang-format on those files
to make it easier to synchronize the AV1 and Daala codebases in the future:
av1/common/generic_code.c
av1/common/generic_code.h
av1/common/laplace_tables.c
av1/common/partition.c
av1/common/partition.h
av1/common/pvq.c
av1/common/pvq.h
av1/common/state.c
av1/common/state.h
av1/common/zigzag.h
av1/common/zigzag16.c
av1/common/zigzag32.c
av1/common/zigzag4.c
av1/common/zigzag64.c
av1/common/zigzag8.c
av1/decoder/decint.h
av1/decoder/generic_decoder.c
av1/decoder/laplace_decoder.c
av1/decoder/pvq_decoder.c
av1/decoder/pvq_decoder.h
av1/encoder/daala_compat_enc.c
av1/encoder/encint.h
av1/encoder/generic_encoder.c
av1/encoder/laplace_encoder.c
av1/encoder/pvq_encoder.c
av1/encoder/pvq_encoder.h
Known issues:
- Lossless mode is not supported, '--lossless=1' will give the same result as
'--end-usage=q --cq-level=1'.
- High bit depth is not supported by PVQ.
Change-Id: I1ae0d6517b87f4c1ccea944b2e12dc906979f25e
rd_debug is a debug tool aim at finding discrepancy between rate-distortion
loop and bitstream packing.
Change-Id: I751c4121516c5e6368668229c77778880a9dcb9d
This commit adds simp-mv-pred experiment. The experiment is to work on
top of ref-mv experiment to save memory bandwidth and reduce the size
of line buffer needed in ref-mv experiment.
When compared to ref-mv, this experiment showed:
low-delay BDR gain: 0.03%
High-delay BDR gain: 0.01%
memory/memory bandwidth saving: 40%
local memory/gate count saving: 20%
Change-Id: Ic4006e041fc58ede411da83d0d730c464ebe1749
The new ec_multisymbol experiment supersedes the rans experiment and is
used for multisymbol features that can be backed by either daala_ec or
rans.
This experiment is automatically enabled by ec_adapt and will try to
enable daala_ec or ans (in that order).
Change-Id: Ie75b4002b7a9d7f5f7b4d130c1aacb3dbe97e54f
This experiment performs symbol-by-symbol statistics
adaptation for non-binary symbols. It requires DAALA_EC or
RANS and ANS to be enabled. The adaptation is currently
based on a simple recursive filter and is taken from
Daala. It has an adaptation rate dependent on alphabet size,
taken from Daala. It applies wherever non-binary symbols
are encoded using Cumulative Probability Functions rather
than trees.
Where symbols are adapted, forward updates in the compressed
header are removed.
In the case of RANS coefficient token values are adapted,
with the exception of the zero token which remains a
binary symbol. In the case of DAALA_EC other values
such as inter and intra modes are adapted as CDFs are
provided in those cases.
The experiment is configured with:
./configure --enable-experimental --enable-daala-ec --enable-ec-adapt
or
./configure --enable-experimental --enable-ans --enable-rans \
--enable-ec-adapt
EC_ADAPT is not currently compatible with tiles.
BDR results on Objective-1-fast give a small loss:
PSNR YCbCr: 0.51% 0.49% 0.48%
PSNRHVS: 0.50%
SSIM: 0.50%
MSSSIM: 0.51%
CIEDE2000: 0.50%
Change-Id: I3888718e42616f3fd87144de7f125228446ac984