* changes:
Merge rd_stats only when it is valid
Let parentheses in handle_inter_mode be symmetric
Add RD_STATS into MB_MODE_INFO
Add txb_coeff_cost_map
Since PVQ's max block size equals to the max transform size,
daala's definition of OD_BSIZE_MAX was changed from 5 down to 4 to
use AV1's max trasform size 32x32. However, dering also uses
OD_BSIZE_MAX and assumes its value is 5, which caused dering
not working.
Change-Id: I9d82bb24adc7d57552a8e0a8a7e798e77d96fd4b
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
With RD_STATS in MB_MODE_INFO, we will be able to compare the results
from rate-distortion loop and the results from bitstream packing.
Change-Id: If1dba7d87126577a6f369ac087d4517f7cebb0c5
This is just partial implementation
Compare token cost of pack_mb_tokens/pack_txb_tokens with token cost
from rate-distortion loop. If there is any difference, dump out mode
info.
Change-Id: I46b373ee2522c5047f799f36baf7cec5fbc06f06
This commit replaces the offset based block index calculation with
incremental based one. It does not change the coding statistics.
Change-Id: I3789294eb45416bd0823e773ec30f05ed41ba0dc
Allow the transform size writing, reading, and the reconstruction
process to support rectangular transform block size coding.
Change-Id: I57393c73ec60835a088d785ca838d7e3d7eb29a4
This commit allows the partition context model to account for the
maximum transform block size of the coding block.
Change-Id: I22b91e85fff70faa974afd362ce327d3f2eda81d
The EC_ADAPT experiment cannot work unless EC_MULTISYMBOL is also
enabled.
This patch replaces all individual checks with a centralized check in
both the bitreader.h and bitwriter.h.
Change-Id: I418852d95c5012cc074ed65cd24997e08bc2aadd
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
This ensures TGs can be decoded even if the whole
frame has not been received and the frame length
is not known.
Change-Id: If24837fcc3b5c46554751be792e91100de73e8d6
This is a manual adaptation of the following commit from aom/master:
ce12003d60a1c8d6c65ed07ba165c34062fcbcbd
The original commit message:
A tile group is a set of tiles in scan order.
Each tile group has a version of uncompressed and compressed headers,
identical apart from tile group parameters.
Encoding probability updates takes account of the number of
headers to control overheads.
The decoder supports arbitrary numbers of tile groups with
arbitrary number of tiles. The number of tiles in a TG is
signalled in the uncompressed header for that TG.
The encoder currently only supports a fixed number
of TGs (3, when error resilient mode is on) of equal size
(except possibly for the last one).
The average BDR performnce with 3 tile groups versus
anchor with error resilient mode and up to 16 tiles is:
NR YCbCr: 3.02% 3.04% 3.05%
PSNRHVS: 3.09%
SSIM: 3.06%
MSSSIM: 3.05%
CIEDE2000: 3.04%
Change-Id: I9b97c5ed733103b9160a3a5d4370de5322c00c0b
Previously, when ext-partition-types and either clpf or dering were
enabled, the signalling for clpf/dering would not be encoded or decoded,
as the code to do so was inside a #if !CONFIG_EXT_PARTITION_TYPES block.
This caused many tests (eg, AV1/EndToEndTestLarge.EndToEndPSNRTest/0)
to fail with encode/decode mismatches.
Change-Id: If1742deb1812877813b2c3e93a048430f9a504ba
- Eliminate the awkward _av1 suffix/infix in local variable names.
- Lift bitdepth selection out of the token loop.
Change-Id: I26d3397464f7808e0481a804033a93ca4f01f5d5