142 Commits

Author SHA1 Message Date
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
Jingning Han
e98c4a10e5 Merge "Simplify the recursive transform block decoding" into nextgenv2 2016-10-24 21:01:17 +00:00
Jingning Han
c4c99da925 Refactor av1_predict_intra_block tx_size interface
Simplify the input arguments. Make direct use of the block size
in the unit of pixels.

Change-Id: Ifec9d90b4b4fa9605f93b4f93b8242f76f898b5f
2016-10-24 11:06:23 -07:00
David Barker
95e248e7d7 Add bit accounting information for deringing
It seems that when bit accounting was introduced in
https://chromium-review.googlesource.com/#/c/400658/
there was one place which was accidentally skipped, leading to build failures
with --enable-dering. This patch adds the missing information.

Change-Id: I59e1bd6f7e1d4fa58506ee7af307b845c78a7cbe
2016-10-24 16:14:50 +00:00
Yaowu Xu
d30a563d23 Merge "Add a runtime flag to enable bit accounting." into nextgenv2 2016-10-23 03:15:37 +00:00
Jingning Han
60e6516e26 Merge "Refactor tx_size step use cases in decoder" into nextgenv2 2016-10-22 03:40:43 +00:00
Yaowu Xu
c06feefbde Merge "Fix compiler warning when CONFIG_ACCOUNTING enabled." into nextgenv2 2016-10-22 01:18:35 +00:00
Jingning Han
bd161f9f6d Merge "Refactor decoder side qcoeff reset" into nextgenv2 2016-10-22 01:07:32 +00:00
Nathan E. Egge
eb64fc28b6 Add a runtime flag to enable bit accounting.
By default, when building with --enable-accounting the bit accounting
 code will collect statistics for every frame while decoding.
Collecting statistics can slow down decode time and we would eventually
 like to enable the CONFIG_ACCOUNTING flag by default.
This patch adds a runtime flag so that bit accounting statistics are
 only collected when actually needed.

Change-Id: I25d9eaf26ea132d61ace95b952872158c9ac29e7
2016-10-21 23:12:50 +00:00
Nathan E. Egge
ebbd479e18 Fix compiler warning when CONFIG_ACCOUNTING enabled.
ISO C90 forbids mixed declarations and code and the function
 aom_accounting_set_context() was being called before the MB_MODE_INFO
 declaration.

Change-Id: I8619525b1b2fd37753891bd310d9d59c881b8807
2016-10-21 22:57:23 +00:00
Nathan E. Egge
5f34b61903 Update class0_fp_cdf and fp_cdf tables once per frame.
Move computing the class0_fp_cdf and fp_cdf tables per coded mv
 symbol to computing it only when the probabilities are updated.

Change-Id: Ib4957c8ab21e6189bcc3817a07b7681dfb343223
2016-10-21 22:56:41 +00:00
Nathan E. Egge
d7b893c667 Update class_cdf table once per frame.
Move computing the class_cdf table per coded mv class symbol to
 computing it only when the probabilities are updated.

Change-Id: I6c4a9075817e8ba2e251f0e82436995f08f2ec5c
2016-10-21 22:55:54 +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
Yaowu Xu
b808b43b36 Merge "Update uv_mode_cdf tables once per frame." into nextgenv2 2016-10-21 22:53:42 +00:00
Yaowu Xu
e86df524b9 Merge "Update y_mode_cdf tables once per frame." into nextgenv2 2016-10-21 22:44:09 +00:00
Yaowu Xu
a82712b2a6 Merge "Update kf_y_mode_cdf tables once per frame." into nextgenv2 2016-10-21 22:43:57 +00:00
Jingning Han
8fd62b75c1 Simplify the recursive transform block decoding
Remove unneeded block index.

Change-Id: Ifceab4985d3ccd65d4c0a110de83a0b457ce5868
2016-10-21 15:31:21 -07:00
Jingning Han
2d64f12595 Refactor tx_size step use cases in decoder
Use lookup table to replace the arithmetic computation for transform
block step.

Change-Id: I1318d81bda9d7ffaf9d550acd19354b0615ede36
2016-10-21 15:22:12 -07:00
Jingning Han
1be1878572 Refactor decoder side qcoeff reset
Allow the decoder to memset partial dequantized coefficient line
to zero.

Change-Id: I1f07dc7bf802958754502c1b5c819cc81e7a08cb
2016-10-21 15:10:23 -07:00
Yaowu Xu
dc3c3a33cb Merge "Pass AV1_COMMON into get_scan" into nextgenv2 2016-10-21 21:51:50 +00:00
Jingning Han
823411ea4d Merge "Refactor tx_size to pixel number in decodeframe.c" into nextgenv2 2016-10-21 19:39:22 +00: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
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
Angie Chiang
b0f9968ac7 Merge "Remove the has_no_coeffs corner case" into nextgenv2 2016-10-21 18:16:45 +00:00
Jingning Han
3d855c5e75 Refactor tx_size to pixel number in decodeframe.c
Use the table access to retrieve pixel numbers from tx_size.

Change-Id: I9459f2c3292c2f9ddf963f16b79e142de7432031
2016-10-21 10:55:54 -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
Nathan E. Egge
ac499f352e Use MV_FP_SIZE based constant instead of 3.
Change-Id: I90ef3b49b499c2ac9c24797467cb4eb194fdf23b
2016-10-21 08:25:33 -07:00
Yaowu Xu
360383bfca Merge "decodeframe.c: aom_read_tree_cdf->aom_read_symbol" into nextgenv2 2016-10-21 03:19:14 +00:00
Yaowu Xu
f2581a3a30 decodeframe.c: aom_read_tree_cdf->aom_read_symbol
This was a missed replacement from cherry-pick of:
9ac7a9dc8ced90a28f5b83801a50597dc12e50a7

Change-Id: I9e01d9d7a39bed397500a293bf68dca2746aa917
2016-10-20 15:31:11 -07:00
Peter de Rivaz
130ca4d675 Remove the has_no_coeffs corner case
BUG=webm:1277

Change-Id: I052239e8a6c468da8704bdbbb663b59533c01be2
2016-10-20 19:38:26 +01:00
Zoe Liu
6cfaff95b7 Sync with aom branch for ext-refs
Plus a small code clean up. The experiment of EXT_REFS, compared against
the baseline, using Overall PSNR, now obtains a gain on lowres as:
Avg: -5.818; BDRate: -5.653

Compared against the previous EXT_REFS results on lowres, a tiny gain is
obtained as:
Avg: -0.047, BDRate: -0.063

(1) 780952 Add encoder first pass support to bi-prediction in EXT_REFS
(2) f91498 Add pred prob handling for new references in EXT_REFS
(3) e91472 Add decoder support for bi-direct prediction in EXT_REFS
(4) 0dbac9 Add encoder support to new references in EXT_REFS
(5) ad70cc Remove hard-coded number for EXT_REFS
(6) 9c1e2f Add the use of new reference frames at encoder in EXT_REFS
(7) 6d4fde Add the experiment flag of EXT_REFS

Change-Id: I26f7ca45b9ede7579fdb9d0d6a1a91f4334599bd
2016-10-20 10:55:11 -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
Yaowu Xu
dc8a2c523f Merge "Always send frame size explicitly" into nextgenv2 2016-10-19 22:00:40 +00:00
Jingning Han
8f6eb189e6 Fix decodeframe.c format
Change-Id: I2228a3d1778917ac760582fbec3c868be5d9ba1c
2016-10-19 13:48:57 -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
Hui Su
e22a480225 Merge "Fix format in set_offsets()" into nextgenv2 2016-10-19 16:54:30 +00:00
Michael Bebenita
6048d05225 Bit accounting.
This patch adds bit account infrastructure to the bit reader API.
When configured with --enable-accounting, every bit reader API
function records the number of bits necessary to decoding a symbol.
Accounting symbol entries are collected in global accounting data
structure, that can be used to understand exactly where bits are
spent (http://aomanalyzer.org). The data structure is cleared and
reused each frame to reduce memory usage. When configured without
--enable-accounting, bit accounting does not incur any runtime
overhead.

All aom_read_xxx functions now have an additional string parameter
that specifies the symbol name. By default, the ACCT_STR macro is
used (which expands to __func__). For more precise accounting,
these should be replaced with more descriptive names.

Change-Id: Ia2e1343cb842c9391b12b77272587dfbe307a56d
2016-10-19 04:34:29 +00:00
Jingning Han
97d854831f Fix format in set_offsets()
Change-Id: I371297e6ee000e6dc01ba1544763cbed429b0e5a
2016-10-18 17:42:09 -07: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
Urvang Joshi
03f6fdcfca Fix warnings reported by -Wshadow: Part1b: scan_order struct and variable
- Change struct name to all caps SCAN_ORDER to be locally consistent.
- Rename struct pointers to 'scan_order' instead of hard to read short
  names 'so' and 'sc'.

Cherry-picked from aomedia/master: 30abc082

Change-Id: Ib9f0eefe28fa97d23d642b77d7dc8e5f8613177d
2016-10-18 17:22:23 -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
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