78 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
Brennan Shacklett
e0b5ae8c4e Remove multiple coefficient buffers from PICK_MODE_CONTEXT
This commit is a manual cherry-pick from aom/master:
45592a39d3b00aee4d6bd70da669400017b7a5d8

Only part of the changes apply in nextgenv2

Change-Id: I1e22514c6fe5af556710254278f2f8a5805db999
2016-11-08 03:50:10 +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
Angie Chiang
c0feea8a0c Add av1_ prefix on ###_rd_stats functions
Change-Id: I3bc782d68bcd9b52b38210eec9eecb21146fde75
2016-11-04 11:12:44 -07:00
Angie Chiang
4695b97030 Use init_rd_stats() in encodeframe.c
Change-Id: I8359e8498efd301ff81eea1d7466d0f3fec5e006
2016-11-04 11:11:27 -07: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
Angie Chiang
e89ea0ceb7 Merge "Refactor: Replace rate dist sse skip by RD_STATS in VAR_TX" into nextgenv2 2016-11-04 05:42:59 +00:00
Angie Chiang
b5dda4887b Refactor: Replace rate dist sse skip by RD_STATS in VAR_TX
This is to facilitate implementation of rd_debug tool; it doesn't change
coding behavior.

Change-Id: I0eb82b31473883ba6652ed11dca09b9ec4530183
2016-11-03 17:51:26 -07:00
Yaowu Xu
5bb8f5b705 fix build issue with --enable-delta-q
BUG=webm:1330

Change-Id: I120ce8ea3581018b232b19ca7ffbb07d3e99d8d0
2016-11-03 09:03:39 -07:00
Jingning Han
a9336328d4 Make recursive txfm encoding process support rectangular tx_size
This commit makes the encoding process of the recursive transform
block partition support both rectangular and square transform block
sizes as the starting point. If the coding block size is rectangular,
it would allow the transform block size to start from the largest
rectangular transform size, and recursive parse to the selected
coding sizes.

Change-Id: I576628b9166565bada6a918f0a1e67849dfef4cd
2016-11-02 15:48:07 -07: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
Jingning Han
f65b870e27 Refactor max_blocks_wide/high computation
Factor common codes that show up in multiple places.

Change-Id: I0a72213a151f74bdad926d59f86f0a28d00968fc
2016-10-31 12:39:36 -07:00
Yaowu Xu
09a4265725 Merge "simp-mv-pred integration with ref-mv" into nextgenv2 2016-10-30 19:54:41 +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
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
Jingning Han
2b0670e10a Merge "Use transform block partition depth count for frame header reset" into nextgenv2 2016-10-28 15:48:11 +00:00
Jingning Han
2adcfb19d5 Use transform block partition depth count for frame header reset
Use the transform block partition depth counts to decide if to
reset the tx_mode at frame header level. Add a comment to make this
explicit.

Change-Id: I417920b4b61eeb91cde9536336a12deea2d42f79
2016-10-27 18:49:32 +00:00
Sarah Parker
b3dab4983b Cosmetic fixes in global motion experiment
These are in response to post-commit suggestions made on
If429c93bb90b66fdff0edc07ecd9fc078077d303.

Change-Id: Id29afa158471bd6259bd07ac00812a50bfd0a709
2016-10-26 11:45:50 -07:00
Sarah Parker
70c0df29da Merge "Revise precision clamping in GM param refinement" into nextgenv2 2016-10-26 17:33:47 +00:00
Jingning Han
e5596d3168 Merge "Add depth to tx_size mapper to bit-stream coding" into nextgenv2 2016-10-26 17:11:56 +00:00
Jingning Han
4e1737af64 Add depth to tx_size mapper to bit-stream coding
It serves as a helper function to integrate various transform coding
options.

Change-Id: I64e7d0c88ea10137fa1ff1072d865eb0054c2a25
2016-10-26 15:45:19 +00:00
Sarah Parker
f41a06b231 Revise precision clamping in GM param refinement
This ensures that the parameter refinement never
results in a motion parameter value that exceeds the number
of alloted bits in the bitstream. It accounts for all of
the necessary precision shifts required to make global motion compatible
with the warped motion library. It also accounts for the
zero-centering that is applied to global motion parameters that are
naturally centered around one.
Change-Id: If429c93bb90b66fdff0edc07ecd9fc078077d303
2016-10-25 21:11:39 -07:00
Yunqing Wang
8c1e57c278 Change 2 motion search counts to be tile data
Imported changes from VP9:
https://chromium-review.googlesource.com/#/c/402551/
https://chromium-review.googlesource.com/#/c/403128/

Change-Id: I8570c867190a6fa641926431ce97f7d9d7da3528
2016-10-25 15:25:37 -07:00
James Zern
8aa4cbf5d5 Merge "update_state: quiet const warning w/global-motion" into nextgenv2 2016-10-25 22:15:39 +00:00
Yaowu Xu
4579c5e458 Merge "update_state_supertx: rename a shadowed variable" into nextgenv2 2016-10-25 16:04:33 +00:00
Yaowu Xu
d971eb8521 Merge "Move small fixes and refactoring for obmc pred from AV1" into nextgenv2 2016-10-25 16:03:47 +00:00
Brennan Shacklett
d4add7aca9 Remove encode_breakout and related speed features
Seems to be dead code

Change-Id: I17b3edc9e82d6a1da172a686522358a6b1a630e9
2016-10-25 08:56:55 -07:00
Yue Chen
894fcceb87 Move small fixes and refactoring for obmc pred from AV1
Covering commits 1c263e0 and 79d8a07 from AOM codebase

Change-Id: I6400e5f99bbb2ef6584ef232d465e520230c06e0
2016-10-24 14:14:47 -07:00
Debargha Mukherjee
0c78ebb22d Merge "Fix a bug when combining new-quant + supertx" into nextgenv2 2016-10-24 19:53:42 +00:00
David Barker
d7d78c83e5 Fix a bug when combining new-quant + supertx
Previously, we assumed that av1_init_plane_quantizers is always called with
segment_id == xd->mi[0]->mbmi.segment_id (and use the latter to derive the value
of 'qindex' to use in the quantizer). But this is no longer true when supertx
is enabled. This patch instead remembers the value of 'qindex' derived from
the latest call to av1_init_plane_quantizers and uses that directly.

Change-Id: Ifa1c5bf74cad29942ff79b88ca92c231bc07f336
2016-10-24 17:43:51 +01:00
James Zern
af322e1d71 update_state: quiet const warning w/global-motion
+ add a TODO as this is incompatible with tile-based threading

Change-Id: I057c551a5f19020366c6b85c2e67e8394bb3306f
2016-10-22 12:46:43 -07:00
James Zern
9ca190c690 update_state_supertx: rename a shadowed variable
Change-Id: I0e5fa71a4b7cd03c9e28b434b1ea72b090ca6772
2016-10-22 12:42:43 -07:00
Jingning Han
9777afc392 Allow frame level tx_mode switch
Check the encoding statistics. If all the coding blocks use the
max transform size, skip transform size coding in the frame header.

Change-Id: I31cb16314e87f945d7e95a34a90a5536b3ed82d5
2016-10-21 15:42:50 -07:00
Jingning Han
dc9ad312be Separate intra and inter tx_size counting
Skip counting the inter transform block size distribution for
the intra transform block size coding.

Change-Id: Ifad9d843f57d069d0619a54d66ca18101e1b69f1
2016-10-21 15:40:18 -07:00
Yaowu Xu
dc3c3a33cb Merge "Pass AV1_COMMON into get_scan" into nextgenv2 2016-10-21 21:51:50 +00:00
Sarah Parker
1634b48022 Merge "Fix logical vs bitwise & bug" into nextgenv2 2016-10-21 21:16:54 +00:00
Angie Chiang
ff6d890557 Pass AV1_COMMON into get_scan
This CL will facilitate adapt_scan experiment.
In adapt_scan experiment, dynamic scan order will be stored in
AV1_COMMON

Change-Id: I4763ea931b5e1af54d4f173971befeb01a4db335
2016-10-21 11:46:19 -07:00
Jingning Han
a6923f7f97 Unify set_contexts() function for encoder and decoder
Remove the separate implementations of set_contexts() in encoder
and decoder.

Change-Id: I9f6e9b075532faae0f74f885d9443589254258a7
2016-10-21 09:32:28 -07:00
Sarah Parker
ea16b68986 Fix logical vs bitwise & bug
This was causing one of the global motion parameters to not
be centered at 0.

Change-Id: Ide32e3d177bed5613ab768a19b4e33b37692463a
2016-10-20 12:00:16 -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
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
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
Peter de Rivaz
74d0ad844e Fix for var_tx context update
The tx_partition_set_contexts function changes tx_size even
for blocks coded with a rectangular transform.
This causes an internal rd inconsistency when using all of
CONFIG_VAR_TX, CONFIG_RECT_TX, CONFIG_EXT_TX.

Change-Id: Ia45d4a8893b0961534219bb96d9652719038c7a1
2016-10-19 11:43:11 +01: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