133 Commits

Author SHA1 Message Date
Urvang Joshi
7bc1fa194d Merge changes I2153c57e,I0e291edd into nextgenv2
* changes:
  Palette: Generate encodings automatically from tree.
  Palette + Ext-Intra: shadowed declaration fix.
2016-10-25 01:06:28 +00:00
Urvang Joshi
0b325978d7 Palette: Generate encodings automatically from tree.
Ran some manual sanity checks:
- Verified that the automatically generated encodings match the
  hand-written encodings before the patch.
- Verified that the encoded bitstream before/after this patch is
  identical.

Change-Id: I2153c57e463cff09c1d03d619b432fb1015199c3
2016-10-24 14:37:25 -07:00
Jingning Han
571189c66d Add MAX_VARTX_DEPTH macro
Change-Id: I85532cf88f91f0f0cb4d9cb4b2dbda8a181297bf
2016-10-24 10:38:43 -07:00
Jingning Han
421af3538d Merge "Limit the transform block partition depth" into nextgenv2 2016-10-24 15:57:28 +00:00
Nathan E. Egge
5f7fd7ab5e Update joint_cdf table once per frame.
Move computing the joint_cdf table per coded mv joint symbol to
 computing it only when the probabilities are updated.

Change-Id: If5d195f70e6fad7b60f69606c8386ad5e69657d2
2016-10-21 22:55:31 +00:00
Nathan E. Egge
6ec4d10d3c Update inter_mode_cdf tables once per frame.
Move computing the inter_mode_cdf tables per coded inter mode symbol to
 computing them only when the probabilities are updated.

Change-Id: I7a7b059ee75723cb6f278ed82a20cf34c27915d8
2016-10-21 22:54:50 +00:00
Jingning Han
94d5bfccdd Limit the transform block partition depth
Limit the recursive transform block partition depth to 2. For a
32x32 transform block unit, one can maximally go down to 8x8 transform
block size.

Change-Id: I2caa92bb2eee64762b7ecca8920259f7c50fb0aa
2016-10-21 15:44:34 -07:00
Nathan E. Egge
380cb1a93c Update uv_mode_cdf tables once per frame.
Move computing the uv_mode_cdf tables per coded intra mode symbol to
 computing them only when the probabilities are updated.

Change-Id: I627b59d30726c913f5d7ba7753cb0446a12655bb
2016-10-21 12:39:04 -07:00
Nathan E. Egge
5710c722af Update y_mode_cdf tables once per frame.
Move computing the y_mode_cdf tables per coded intra mode symbol to
 computing them only when the probabilities are updated.

Change-Id: I8c43d09b8ef5febe2a3ec64bd51d28bd78ea73ed
2016-10-21 12:39:04 -07:00
Nathan E. Egge
3ef926edc2 Update kf_y_mode_cdf tables once per frame.
Move computing the kf_y_mode_cdf tables per coded intra mode symbol to
 computing them only when the probabilities are updated.

Change-Id: I5999447050c2f7d5dbccde80bee05ecd1c5440ab
2016-10-21 12:39:04 -07:00
Nathan E. Egge
72762a2827 Use intra_ext_tx_cdf when coding tx_type.
When building with --enable-daala_ec, the tx_type for intra blocks can be
 coded using the CDFs that are updated once per frame.
This patch converts a tx_type symbol to be coded with aom_write_symbol()
 and aom_read_symbol() that was missed in f3e8e267.

Change-Id: I34f8fef7525f88e156bbcb78dfc48994367610ce
2016-10-21 08:29:08 -07:00
Yaowu Xu
23f0604188 Merge "Fix encoder crash when --enable-daala-ec" into nextgenv2 2016-10-21 14:44:26 +00:00
Yaowu Xu
361f3fe3b0 Merge "Compute all token encodings from symbol trees." into nextgenv2 2016-10-21 03:20:01 +00:00
Yaowu Xu
e1466ad4e4 Fix encoder crash when --enable-daala-ec
Change-Id: I6855e18d92f693a9789eda7c91a3430566469bdd
2016-10-20 17:56:54 -07:00
Nathan E. Egge
3c05679017 Compute all token encodings from symbol trees.
The av1_token encodings must match the contents of the aom_tree_index
 structures so generate all encodings from the symbol trees.

Change-Id: I37be9f12c86a02693ae3c3c1d24b00f2abb29bfb
2016-10-20 15:34:08 -07:00
Urvang Joshi
43e6281f62 Encoder/Decoder mismatch fix: need a separate copy of eob_counts.
The bug was introduced here:
https://chromium-review.googlesource.com/#/c/399975/4/av1/encoder/bitstream.c
In that patch, I had removed 2nd declaration of a variable of the same
name. But it turns out that the two variables actually had a different
type (even though the name was same).

Now, we keep both variables, but rename one of them -- that fixes the
mismatch. While we are at it, made both variables local as well.

The fix can be verified as follows:
../../libvpx/configure --enable-experimental --enable-supertx
--enable-var-tx --enable-entropy --enable-internal-stats && make clean
&& make -j16

aomenc -o soccer_cif_1000_av1_b8.webm ../soccer_cif.y4m --codec=av1
--limit=50 --skip=0 -p 2 --pass=1 --fpf=soccer_cif_av1.fpf --good
--cpu-used=0 --target-bitrate=1000 --lag-in-frames=25 --min-q=0
--max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0
--drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0
--maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0
--undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0
--tile-columns=0 --profile=0 --test-decode=warn

aomenc -o soccer_cif_1000_av1_b8.webm ../soccer_cif.y4m --codec=av1
--limit=50 --skip=0 -p 2 --pass=2 --fpf=soccer_cif_av1.fpf --good
--cpu-used=0 --target-bitrate=1000 --lag-in-frames=25 --min-q=0
--max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0
--drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0
--maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0
--undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0
--tile-columns=0 --profile=0 --test-decode=warn -v --psnr

Change-Id: Ibd72dbe1f620e6de231513220ee4e190606613ae
2016-10-20 14:51:01 -07:00
hui su
5db9743fbb Seperate FILTER_INTRA from EXT_INTRA experiment
Prepare for the av1/nextgenv2 merge.

Coding gain (%):

               lowres     midres
ext-intra       0.69       0.97
filter-intra    0.67       0.83
both            1.05       1.48

Change-Id: Ia24d6fafb3e484c4f92192e0b7eee5e39f4f4ee6
2016-10-19 21:40:49 -07:00
Yaowu Xu
cfc5ac5034 Merge "Partition the ans experiment into 'ans' and 'rans'" into nextgenv2 2016-10-19 22:58:05 +00:00
Thomas Davies
f693610a1a Step size and arithmetic coding for delta quantization.
Example performance: 1.8% bit rate savings using
the AQ test mode aq-mode=4 :
./aomenc --codec=av1 --ivf --tile-columns=1 --tile-rows=1 \
                 --kf-max-dist=1000 --kf-min-dist=1000 --cpu-used=0 \
                 --passes=1 --threads=1 --lag-in-frames=0 \
                 --end-usage=q --limit=600 --cq-level=42 \
                 --aq-mode=4 --error-resilient=1 out.bits FourPeople_1280x720_60.y4m

Change-Id: Iba01cf2732a57f3c27481ac2a3c8fc37bb9e5533
2016-10-19 15:14:27 -07:00
Arild Fuldseth
07441165fe Support for delta-q at superblock level
Change-Id: I4128af44776d1f361bddc1fdffb75ed2224dbfa5
2016-10-19 15:14:27 -07:00
Arild Fuldseth
842e9b030f Always send frame size explicitly
This commit changes to send frame size explicitly when
error_resilient_mode=1. Purpose is to allow parsing of bitstream
after a packet loss.

Change-Id: I7d1c010a465aa18914762cc1a3e61db377304c08
2016-10-19 12:35:12 -07:00
Alex Converse
ec6fb649da Partition the ans experiment into 'ans' and 'rans'
The (new) ans experiment replaces the bool coder with uABS bools. The
'rans' experiment adds multisymbol coding.

This matches the setup in aom/master.

Change-Id: Ida8372ccabf1e1e9afc45fe66362cda35a491222
2016-10-19 12:03:15 -07:00
Urvang Joshi
66b1fcc924 Merge changes I3922dea2,I3bab2848,I21f7478a,Ida5de713,Ib9f0eefe, ... into nextgenv2
* changes:
  Fix warnings reported by -Wshadow: Part4: main directory
  Fix warnings reported by -Wshadow: Part3: test/ directory
  Fix warnings reported by -Wshadow: Part2b: more from av1 directory
  Fix warnings reported by -Wshadow: Part2: av1 directory
  Fix warnings reported by -Wshadow: Part1b: scan_order struct and variable
  Fix warnings reported by -Wshadow: Part1: aom_dsp directory
  Move STAT_TYPE enum to source file.
  Code cleanup: mainly rd_pick_partition and methods called from there.
2016-10-19 18:25:52 +00:00
Urvang Joshi
368fbc955d Fix warnings reported by -Wshadow: Part2b: more from av1 directory
From code only part of nextgenv2 (and not aomedia)

Change-Id: I21f7478a59d525dff23747efe5238ded16b743d2
2016-10-18 17:22:44 -07:00
Urvang Joshi
454280dabf Fix warnings reported by -Wshadow: Part2: av1 directory
While we are at it:
- Rename some variables to more meaningful names
- Reuse some common consts from a header instead of redefining them.

Cherry-picked from aomedia/master: 863b0499

Change-Id: Ida5de713156dc0126a27f90fdd36d29a398a3c88
2016-10-18 17:22:34 -07:00
Nathan E. Egge
f627e58e0f Update segment tree_cdf per frame.
Move computing the segmentation_probs.tree_cdf table per symbol to
 computing it only when the probabilities are updated.

Change-Id: I3826418094bbaca4ded87de5ff04d4b27c85e35a
2016-10-18 16:58:48 -07:00
Nathan E. Egge
56eeaa5daf Rename aom_write_tree_cdf() to aom_write_symbol().
Change-Id: I7c088c55f1c461063976d5bd84ff2026c4f3bc69
2016-10-17 11:54:51 -07:00
Nathan E. Egge
fba2be692f Update partition_cdf per frame.
Move computing the partition_cdf tables per symbol to
 computing them only when the probabilities are updated.

Change-Id: I442f9230ba00be7f5d0558d7c38d7324ad009ee8
2016-10-17 10:21:06 -07:00
Nathan E. Egge
93878c4243 Update inter_ext_tx_cdf per frame.
Move computing the inter_ext_tx_cdf tables per symbol to
 computing them only when the probabilities are updated.

Change-Id: I5e1e62f8eae8f6b2edbbd378beeb786649502c10
2016-10-17 10:20:53 -07:00
Nathan E. Egge
7c5b4c1665 Update intra_ext_tx_cdf per frame.
Move computing the intra_ext_tx_cdf tables per symbol to
 computing them only when the probabilities are updated.

Change-Id: I26d5e419e103093e98a7d896c196176305b50fc9
2016-10-17 08:47:02 -07:00
Nathan E. Egge
4947c296f7 Update switchable_interp_cdf once per frame.
Move from computing the switchable_interp_cdf per symbol to
 computing once per frame when the probabilities are adapted.

Change-Id: I6571126239f0327e22bb09ee8bad94114291683e
2016-10-17 08:44:57 -07:00
Urvang Joshi
b100db7c1d Wrap palette code inside CONFIG_PALETTE flag.
This flag was already added to aomedia/master, so bringing it back to
webm/nextgenv2, as part of an effort to get the two codebases in sync.

Change-Id: I2b933a6a160e4210d1411a9e7978149eb8553205
2016-10-14 13:42:02 -07:00
Yaowu Xu
d71be7815d Revert "Revert "Move CLPF block signals from frame to SB level.""
This reverts commit 9b25f3067485b32442e13964df098903736c3fd8 to
reinstate the reverted commit with fixes that solved the build issues
when --enalbe-clpf is used in configure.

Change-Id: I15447cae7fa9b3deb27976345dc3db230a4a7a60
2016-10-14 08:58:49 -07:00
Yaowu Xu
4b71775307 Merge "Revert "Move CLPF block signals from frame to SB level."" into nextgenv2 2016-10-14 15:39:36 +00:00
Yaowu Xu
9b25f30674 Revert "Move CLPF block signals from frame to SB level."
This reverts commit 975350387ce0b55bf5af8cb944f6a242b72251ff.

Change-Id: I9f8e891739352ca2bde4b294e37c85a668f416e0
2016-10-14 15:39:03 +00:00
Yue Chen
a48764d05f Merge "Renamings for OBMC experiment" into nextgenv2 2016-10-14 01:33:00 +00:00
Steinar Midtskogen
975350387c Move CLPF block signals from frame to SB level.
These signals were in the uncompressed frame header (as a temporary
hack), which caused two problems:

* We don't want that header to be duplicated in the slice header
* It was necessary to signal the number of bits to transmit up front

However, the filter size can be 128x128 which is greater than the SB
size, and a decoder wouldn't be able to know whether to read a bit or
not until the final SB of that 128x128 block has been decoded
(depending on whether the 128x128 is all skip or not).  Therefore the
signalling was changed for 128x128 blocks so that every top left SB of
a 128x128 filter block contains a signal regardless of whether the
block is all skip or not.  Also, all the MB's of 128x128 block are
filtered even if they are skip MB's.  This gives the signal a purpose
even when the 128x128 block is all skip, and it also gives a slight
coding gain as it leaves a way to filter skip blocks, which was
previously forbidden.

Low latency:
PSNR YCbCr:     -0.19%     -0.14%     -0.06%
   PSNRHVS:     -0.15%
      SSIM:     -0.13%
    MSSSIM:     -0.15%
 CIEDE2000:     -0.19%

High latency:
PSNR YCbCr:     -0.03%     -0.01%     -0.09%
   PSNRHVS:      0.04%
      SSIM:      0.00%
    MSSSIM:      0.02%
 CIEDE2000:     -0.02%

Change-Id: I69ba7144d07d388b4f0968f6a53558f480979171
2016-10-13 16:06:10 -07:00
Yue Chen
cb60b185c7 Renamings for OBMC experiment
To get ready for pulling AV1 to nextgenv2
Replace the experimental flag by MOTION_VAR. Rename major variables.

Change-Id: If6cf4f37b9319c46d8f90df551cc7295d66ca205
2016-10-13 15:51:22 -07:00
Yaowu Xu
8ac419f307 Merge changes Ic3a68557,Ib1dbe41a,I0da09270,Ibdbd720d into nextgenv2
* changes:
  Deringing cleanup: remove DERING_REFINEMENT (always on now)
  Don't run the deringing filter on skipped blocks within a superblock
  Don't dering skipped superblocks
  On x86 use _mm_set_epi32 when _mm_cvtsi64_si128 isn't available
2016-10-13 15:54:32 +00:00
Alex Converse
a1ac972867 Import the aom_read/write_symbol abstractions from aom/master
Change-Id: I0b255c05108c3b97e74df1b59c34111c9e9a5770
2016-10-12 17:41:01 -07:00
Jean-Marc Valin
e874ce0300 Deringing cleanup: remove DERING_REFINEMENT (always on now)
Change-Id: Ic3a6855799be010e69aeab924b013679282ab191
2016-10-12 17:13:09 -07:00
Alex Converse
91e4e604bd Merge changes I3ca2b674,I78afc587,I3ae62181,I5ed91556 into nextgenv2
* changes:
  Unfork ANS decode_coefs
  Remove ZERO_TOKEN from the ANS tokenset
  Drop costing ANS tokens from derived probabilities
  Unfork ANS pack_mb_tokens
2016-10-12 22:25:27 +00:00
Alex Converse
ea7e990fd4 Remove ZERO_TOKEN from the ANS tokenset
This can be re-added after aligning AOM's ANS with nextgenv2's ANS.

This partially reverts commit 3829cd2f2f9904572019aa047d068baeee843767.

Change-Id: I78afc587f1abfe33ffcd53b3262910cfae135534
2016-10-12 13:15:08 -07:00
Alex Converse
dc62b0925d Unfork ANS pack_mb_tokens
This is less code and more like what we have in aom/master.

Change-Id: I5ed915563cbfbc6281113c1eb31455f50710ba9f
2016-10-12 13:09:13 -07:00
hui su
24f7b07f2e Send allow_screen_content flag for both key and intra only frames
BUG=webm:1311

Change-Id: I03c1043d17ed4e4ea22002473779a9612884c6c6
2016-10-12 11:45:05 -07:00
Sarah Parker
d2b1fe4a1f Merge "Fix inconsistency in gm parameter write to bitstream" into nextgenv2 2016-10-12 17:32:21 +00:00
Sarah Parker
689b0caea7 Fix inconsistency in gm parameter write to bitstream
Before this change, gm parameters were being written to the
bitstream for all frames, but only read for inter only frames,
causing a bitstream error.

Change-Id: I63b8e2fdf6358e07cc00718de04cc399809bde37
2016-10-11 19:35:26 -07:00
Yaowu Xu
25faa0e9f5 Merge "Move tree writing code into bitwriter.h." into nextgenv2 2016-10-11 19:16:25 +00:00
Nathan E. Egge
eeedc633c0 Move tree writing code into bitwriter.h.
Rename av1_write_tree() to aom_write_tree() and move it into bitwriter.h
 to match aom_read_tree() in bitreader.h.

Manually cherry-picked from aom/master:
33a143fa7ac42d62080bfc20468cb76ad26045db

Change-Id: I6c686cdd3e0f179d7e95c5bc6984558b62d46d67
2016-10-11 09:36:01 -07:00
Steinar Midtskogen
ecf9a0c821 Extend CLPF to chroma.
Objective quality impact (low latency):

PSNR YCbCr:      0.13%     -1.37%     -1.79%
   PSNRHVS:      0.03%
      SSIM:      0.24%
    MSSSIM:      0.10%
 CIEDE2000:     -0.83%

Change-Id: I8ddf0def569286775f0f9d4d4005932766a7fc27
2016-10-10 15:23:38 -07:00