203 Commits

Author SHA1 Message Date
Jingning Han
6515afc6b9 Merge "Add min_tx_size variable to recursive transform block partition system" into nextgenv2 2016-11-08 19:14:33 +00:00
Jingning Han
e67b38aa7c Add min_tx_size variable to recursive transform block partition system
Replace max_tx_size with min_tx_size for transform type decision.

Change-Id: I64e39923a67903d52b381bd93eaac33b3400a201
2016-11-08 09:36:54 -08:00
Yushin Cho
48f84dbd1c Fix the bug that PVQ commit broke dering
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
2016-11-08 08:15:57 -08:00
Yaowu Xu
fc1b213af1 Use block_size for max_scan_line in pvq decoding
Change-Id: I642bc205a7d2c4d472385fbeb4323e62e17984b4
2016-11-08 00:55:23 +00:00
Yaowu Xu
d6ea71cf73 Resolve merge issues with --enable-pvq
This commit resolves some compiling issues due to merge.

Change-Id: I0eef8aa36c404e185e0b0004948a49307c360d3e
2016-11-07 10:35:55 -08:00
Yaowu Xu
00a0e010f7 Merge "New experiment: Perceptual Vector Quantization from Daala" into nextgenv2 2016-11-07 16:00:32 +00:00
Yushin Cho
77bba8d30a New experiment: Perceptual Vector Quantization from Daala
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
2016-11-06 22:18:01 -08:00
Debargha Mukherjee
5f305854e6 Increase gm precision from 16 to 32 bit ints
Change-Id: I7117a6c14dc8438e4225b50bd2d3ebbaa7f850cc
2016-11-05 16:50:08 -07:00
Jingning Han
0880b5466f Merge "Refactor tx_type reader" into nextgenv2 2016-11-04 23:03:47 +00:00
Angie Chiang
394c337754 Add mi_row and mi_col into mbmi to facilitate rd_debug process
Change-Id: Ia69f13c47f2dd34fabd220652691049166a06a68
2016-11-04 11:09:24 -07:00
Jingning Han
ab7163db08 Refactor tx_type reader
Factor out common codes. Remove repeated mbmi->tx_size calls.

Change-Id: Id5de35e88f1a5f16223eaa06fc2c9f69124061ef
2016-11-04 10:35:34 -07:00
Jingning Han
f64062f36f Make bit-stream support rectangular tx_size
Allow the transform size writing, reading, and the reconstruction
process to support rectangular transform block size coding.

Change-Id: I57393c73ec60835a088d785ca838d7e3d7eb29a4
2016-11-02 16:24:20 -07:00
Jingning Han
746e2220b5 Merge "Rework transform block partition context model" into nextgenv2 2016-11-02 01:18:13 +00:00
Jingning Han
c8b8936fdc Rework transform block partition context model
This commit allows the partition context model to account for the
maximum transform block size of the coding block.

Change-Id: I22b91e85fff70faa974afd362ce327d3f2eda81d
2016-11-01 15:00:04 -07:00
Yaowu Xu
8af861bbf1 Fix merge issues related --enable-ec-adapt
1. Avoid compiler warnings.
2. Enable prob_diff_update() required by update_txfm_probs().

Change-Id: I9081b645c55a8432bdaeb600e9ba901c0d0d96f5
2016-11-01 12:36:04 -07:00
Yaowu Xu
a5924740a2 Resolve build issue --enable-aom-qm
Change-Id: I9f52ddb53b39cefd2e0ee7144203e1f3958d01aa
2016-11-01 09:32:03 -07:00
Yaowu Xu
0279e91576 Merge "decodemv.c: relocate a function" into nextgenv2 2016-11-01 02:24:51 +00:00
Yaowu Xu
8040aaf9b1 Merge "Fix a bad merge" into nextgenv2 2016-11-01 02:24:38 +00:00
Yaowu Xu
b24e115bc6 decodemv.c: relocate a function
Change-Id: I932dd9c8b43a20d248c00847b19dff88e6eb11be
2016-10-31 16:45:37 -07:00
Yaowu Xu
e86288d2de Fix a bad merge
Change-Id: I4615e8e64d75b1f4277d2221ec94c5d4f1830aa4
2016-10-31 15:56:38 -07:00
Jingning Han
6511159787 Merge "Replace get_tx2d_size() with direct tx_size_2d[] table access" into nextgenv2 2016-10-31 22:19:59 +00:00
Steinar Midtskogen
5d56f4d69a Reverse order of CLPF and dering
Low latency:
PSNR YCbCr:     -0.15%      0.11%      0.12%
   PSNRHVS:     -0.25%
      SSIM:     -0.26%
    MSSSIM:     -0.26%
 CIEDE2000:     -0.03%

High latency:
PSNR YCbCr:     -0.18%      0.18%      0.07%
   PSNRHVS:     -0.20%
      SSIM:     -0.21%
    MSSSIM:     -0.21%
 CIEDE2000:     -0.03%

Change-Id: Ieb86d9ba353220de6454bdc15cea825944b6385b
2016-10-31 12:50:11 -07:00
Jingning Han
7e9929736c Replace get_tx2d_size() with direct tx_size_2d[] table access
Change-Id: I20040cdb5d9fdbf6c50082e5e17b4cfbd1926b13
2016-10-31 12:39:33 -07:00
Yaowu Xu
efc7535beb Refactor: read_tx_size_probs()
Change-Id: Ibdedd9b8e0b6646b882bc159856ac7c7e7073149
2016-10-31 09:46:42 -07:00
Yaowu Xu
09a4265725 Merge "simp-mv-pred integration with ref-mv" into nextgenv2 2016-10-30 19:54:41 +00:00
Yaowu Xu
02d33bfeeb Merge "Centralize EC_MULTISYMBOL error checking." into nextgenv2 2016-10-30 19:53:29 +00:00
Yaowu Xu
a2d2a1858e Merge "EC_ADAPT: refactor and fix MinArfFreq unit tests." into nextgenv2 2016-10-30 17:16:19 +00:00
Yaowu Xu
46fcecc395 Merge "EC_ADAPT: send updates for the correct nodes." into nextgenv2 2016-10-30 17:15:40 +00:00
Yaowu Xu
2ae4214618 Merge "Add ec_multisymbol for common daala_ec and rans code" into nextgenv2 2016-10-30 17:15:28 +00:00
Yaowu Xu
eaafb17d41 Merge "Add EC_ADAPT experiment for symbol-adaptive entropy coding." into nextgenv2 2016-10-30 16:21:47 +00:00
Deng
ca8d24d4e1 simp-mv-pred integration with ref-mv
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
2016-10-29 22:26:48 -07:00
Nathan E. Egge
baaaa16186 Centralize EC_MULTISYMBOL error checking.
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
2016-10-29 22:26:27 -07:00
Thomas Davies
6519bebf34 EC_ADAPT: refactor and fix MinArfFreq unit tests.
Ensure that cdfs are synced with pdfs after every
forward update.

Change-Id: I5677f78300156c8622f1728d7a343ff6c3a4ea64
2016-10-29 22:21:32 -07:00
Thomas Davies
09ebbfb39f EC_ADAPT: send updates for the correct nodes.
EOB and ZERO token are not currently adapted.

Change-Id: Ie7d657b71fcb157b09e40874fb06a8b7cd95cc70
2016-10-29 17:05:40 -07:00
Alex Converse
aca9feba82 Add ec_multisymbol for common daala_ec and rans code
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
2016-10-29 17:05:40 -07:00
Thomas
9ac5508f32 Add EC_ADAPT experiment for symbol-adaptive entropy coding.
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
2016-10-29 16:57:48 -07:00
Jingning Han
ee9264c923 Merge "Replace num_4x4_blocks_txsize_loopup table" into nextgenv2 2016-10-29 23:01:26 +00:00
Jingning Han
32b2028b30 Replace num_4x4_blocks_txsize_loopup table
Unify the transform block size access table in preparation for
2x2 transform integration.

Change-Id: I308def6729e138ae2b2542175206e3225c0cb392
2016-10-28 15:42:44 -07:00
Yaowu Xu
d64eaf138e Merge "Tile groups: ensure each tile in a TG has a length." into nextgenv2 2016-10-28 21:26:32 +00:00
Yaowu Xu
efd5725242 Merge "Encode and decode multiple tile groups" into nextgenv2 2016-10-28 21:26:11 +00:00
Thomas Davies
8fe64a3a23 Tile groups: ensure each tile in a TG has a length.
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
2016-10-28 13:01:40 -07:00
Thomas Davies
80188d1546 Encode and decode multiple tile groups
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
2016-10-28 11:52:13 -07:00
Jingning Han
fe8d6c62ce Merge "Refactor recursive transform block decoding" into nextgenv2 2016-10-28 15:49:27 +00:00
Jingning Han
c17b9e00dc Merge "Refactor recursive transform block size decoding" into nextgenv2 2016-10-28 15:49:06 +00:00
Yaowu Xu
2df83d5c10 Merge "Remove av1_use_hp_mv()" into nextgenv2 2016-10-28 15:26:35 +00:00
Yaowu Xu
c66f264d17 Merge "rans: Use symbol coding for motion vectors" into nextgenv2 2016-10-28 15:26:22 +00:00
Jingning Han
5f61426424 Refactor recursive transform block decoding
Unify the transform block and coding block mapping.

Change-Id: Ifb394809a4aafee6adf2b49a2607036cf13c878e
2016-10-27 22:11:24 -07:00
Jingning Han
65abc314c4 Refactor recursive transform block size decoding
Unify the transform block size to block size mapping.

Change-Id: Ic7359d016cd5965983c4a5476624c09f3123f91c
2016-10-27 22:11:20 -07:00
Alex Converse
6317c88f5a Remove av1_use_hp_mv()
It always returns true since the related misc_fix[1] was merged.

[1] 23e83574b6a5105bdc686c49f2d5909f33ea721f

Change-Id: Ie3af685572a2f0a42d2b9fb9903c1abeea225dfd
2016-10-27 14:33:48 -07:00
Debargha Mukherjee
058e42d399 Merge "Fix clpf and dering signalling when used with ext-partition-types" into nextgenv2 2016-10-27 20:45:07 +00:00