Граф коммитов

137 Коммитов

Автор SHA1 Сообщение Дата
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
Debargha Mukherjee 3ff8cb764b Merge "Fix aom_fdct8x8_ssse3 in high bit depth mode" into nextgenv2 2016-10-28 19:31:45 +00:00
David Barker 0602edfbc5 Fix aom_fdct8x8_ssse3 in high bit depth mode
Change-Id: I63e492163ef10e12a842837368c209b8ffc4eee0
2016-10-28 10:13:43 +01:00
Alex Converse 3fc98e86d1 rans: Use symbol coding for motion vectors
Change-Id: If497b53c3b36e32fb98c99dba2d4a490e226572a
2016-10-27 12:38:43 -07:00
Luca Barbato f0f98578df Namespace the idct/iad symbols
Make linking to libvpx and libaom at the same time possible.

Change-Id: I7bab8527a32e446e3d564e6fa5d94ccd056bc63f
2016-10-27 12:36:37 -07:00
Debargha Mukherjee a5e3bc0fbc Merge "Fix compile error with --enable-ans + --enable-accounting" into nextgenv2 2016-10-27 19:03:22 +00:00
Yi Luo 400dcc8088 Merge "Fix aom_fdct32x32_avx2 output as CONFIG_AOM_HIGHBITDEPTH=1" into nextgenv2 2016-10-26 22:42:17 +00:00
Yi Luo 133c13d637 Fix incorrect merge of forward txfm function declarations
- Restore the fwd txfm HBD function declarations exposure.

Change-Id: I1e33df6297fd37e242f4b73c8ab97063b9feb7c6
2016-10-26 10:30:53 -07:00
Yi Luo 0c552dfd82 Fix aom_fdct32x32_avx2 output as CONFIG_AOM_HIGHBITDEPTH=1
- Change FDCT32x32_2D_AVX2 output parameter to tran_low_t.
- Add unit tests for CONFIG_AOM_HIGHBITDEPTH=1.
- Update TODO notes.
BUG=webm:1323

Change-Id: If4766c919a24231fce886de74658b6dd7a011246
2016-10-25 14:33:21 -07:00
Yaowu Xu b695b1c118 dkboolwriter.c: change copyright notice
Change-Id: I1d9349a07ffd85991fc5673354d3ceff3404b358
2016-10-25 10:32:33 -07:00
David Barker 01b16baa5a Fix compile error with --enable-ans + --enable-accounting
Change-Id: I43deba9c80b324c12852750d08c62dc2dd783835
2016-10-25 16:22:24 +01:00
Alex Converse 8db9faefe8 Use remove some magic numbers in aom_rans_merge_prob8_pdf.
Change-Id: I0cefae17642d7adf1b9bd637ecb81b437629aa0c
2016-10-24 09:05:03 -07:00
Yi Luo 62b6cc0bc9 Merge "Fix avx2 16x16/32x32 fwd txfm coeff output on HBD" into nextgenv2 2016-10-22 01:46:09 +00:00
Yi Luo 1a0f27aaa6 Fix avx2 16x16/32x32 fwd txfm coeff output on HBD
Change-Id: Ida036defe5688894a63007a31aa2dd0b3f0b5d59
2016-10-21 14:14:00 -07:00
Jingning Han dc90bf0737 Merge "Fix unused variable error in intrapred.c" into nextgenv2 2016-10-21 21:11:31 +00:00
Nathan E. Egge 5357dcaf71 Decoder performance improvement with daala_ec.
Cherry-pick Daala b5020bee:
 Remove redundant test in od_ec_decode_bool_q15().
Using a test that decodes 100M random binary symbols, making this change
 produced a speed up of 8.81% with gcc-4.9.3 and 3.71% with clang-3.7.1,
 both compiled with -O2.

Change-Id: If6d0077a56121a575ae53bcd4d1d9b7d800a317d
2016-10-21 12:38:30 -07:00
Yaowu Xu 91219941b1 Merge "Use divide by multiply in the ans writer." into nextgenv2 2016-10-21 18:46:29 +00:00
Angie Chiang 646e52a85a Fix unused variable error in intrapred.c
Change-Id: Icda975cd9b264c1752c3057bce8031791f91c08a
2016-10-21 11:45:31 -07:00
Yaowu Xu 2f5b9d66b5 Merge "Add support for v256 intrinsics" into nextgenv2 2016-10-21 18:00:20 +00:00
Yaowu Xu c76572af16 Merge changes Icfc16070,Ied47a248,I8af087d9,I322a1366,If04580af into nextgenv2
* changes:
  Palette: Use inverse_color_order to find color index faster.
  Rewrite some loops to avoid -Wunsafe-loop-optimizations warnings.
  Remove some useless casts
  Add compiler warning flag -Wextra and fix related warnings.
  Declare some array sizes to be constants (known at compile time).
2016-10-21 17:31:42 +00:00
Alex Converse 64e2f105a7 Use divide by multiply in the ans writer.
Change-Id: Ide4e9b3a605571ec41c265347217e103df8d0821
2016-10-21 09:54:41 -07:00
Steinar Midtskogen 045d413ca2 Add support for v256 intrinsics
Change-Id: I1da08afaa945ca1aaf4bf9f50cf649a7feef2e60
2016-10-21 08:55:37 -07:00
Urvang Joshi d71a231c49 Add compiler warning flag -Wextra and fix related warnings.
Note: some of these warnings are enabled by a combination of -Wunused
(added earlier) and -Wextra.

Cherry-picked from aomedia/master: 4790a69

Change-Id: I322a1366bd4fd6c0dec9e758c2d5e88e003b1cbf
2016-10-20 15:49:16 -07:00
Yaowu Xu ec5a1942e2 Merge changes I7d6394e4,Ia8ce1464,If20e8637,Ia9adc46b,I651db25b into nextgenv2
* changes:
  Define SIMD_INLINE using AOM_FORCE_INLINE
  AOM_FORCE_INLINE: fix always_inline attribute
  Free memory allocated by daala_ec encoder.
  Move clpf_sse4_1.c to clpf_sse4.c in agreement with convention
  sync avg_test.cc with aom/master
2016-10-20 22:30:11 +00:00
Jingning Han 7ae6ae3497 Merge "Add 2x2 directional intra predictors" into nextgenv2 2016-10-20 22:15:46 +00:00
Yaowu Xu cfc5ac5034 Merge "Partition the ans experiment into 'ans' and 'rans'" into nextgenv2 2016-10-19 22:58:05 +00:00
Steinar Midtskogen c38afedb8d Define SIMD_INLINE using AOM_FORCE_INLINE
Change-Id: I7d6394e48e9b6093e5b523387ed250f371ee7fb9
2016-10-19 15:14:27 -07:00
Nathan E. Egge e734fcb114 Free memory allocated by daala_ec encoder.
Free the two memory buffers allocated by the daala_ec encoder when
 calling od_ec_enc_clear() from aom_daala_stop_encode().

Change-Id: If20e86374ea29e51ee59111012905e56039dd4cc
2016-10-19 15:14:27 -07:00
Jingning Han 03b3514058 Add 2x2 directional intra predictors
Change-Id: Iaa25269a15231dadeaba0f4836c864fc10e858df
2016-10-19 21:58:09 +00: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
Yaowu Xu e94767ae97 Merge "Change return type of tell and tell_frac to uint32_t." into nextgenv2 2016-10-19 18:59:08 +00: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
Nathan E. Egge b244f39627 Change return type of tell and tell_frac to uint32_t.
The bit accounting functions aom_reader_tell() and aom_reader_tell_frac()
 return the number of bits and 1/8th bits respectively.
This patch changes the return type from ptrdiff_t which is signed to
 uint32_t which is unsigned.
The size_t type is not used since we only care about the number of bits
 or 1/8 bits per entropy coder context and we don't expect to code more
 than 512 megabits per tile.

Change-Id: I84a119d1f52829dcbdb66a92656eacca06e42b11
2016-10-19 10:53:52 -07: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
Urvang Joshi fdb60962f4 Fix warnings reported by -Wshadow: Part1: aom_dsp 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: 09eea2193

Change-Id: I61030e773137ae107d3bd43556c0d5bb26f9dbf8
2016-10-18 17:22:12 -07:00
Michael Bebenita d7baf45ff6 Adds ability to measure with a higher precision the number of bits
read per symbol.

Change-Id: I218abaa5172b769b66dba45050381c0212602668
2016-10-18 16:57:56 -07:00
Michael Bebenita 63b44c4c50 Remove stale OD_ACCOUNTING code.
Change-Id: Ie90dd06c387119ccd9c920a328c942477df00bb7
2016-10-18 09:12:06 -07:00
Michael Bebenita 868fc0b04a Port aom_reader_tell() support
This commit ports the following from aom/master:
4c46278 Add aom_reader_tell() support.
b9c9935 Remove an erroneous declaration.
56c9c3b Fix ANS build.

Change-Id: I59bd910f58c218c649a1de2a7b5fae0397e13cb1
2016-10-18 08:50:05 -07:00
Nathan E. Egge 9ac1f7d770 Create aom_cdf_prob type for 16-bit probabilities.
Change-Id: I33899eca44300037816c9f20c965aa8311a1ef52
2016-10-17 20:22:48 -07:00
Nathan E. Egge 45741e9351 Rename daala_read_tree_cdf() to daala_read_symbol().
Change-Id: I35f85bad88c637cea62577c546cdd5ced0e21bd6
2016-10-17 20:22:19 -07:00
Nathan E. Egge 19698a7084 Fix warning when discarding const qualifier.
Cherry-pick Daala 211c2a41: Clean up EC tell() and tell_frac() functions.
Add a const qualifier to the od_ec_enc and od_ec_dec parameters of
 the od_ec_enc_tell(), od_ec_enc_tell_frac(), od_ec_dec_tell(), and
 od_ec_dec_tell_frac() functions.
Add an OD_WARN_UNUSED_RESULT to od_ec_enc_tell_frac().

Change-Id: Ia50e2fd75e98d8a03d993449d658b695cf56e6fb
2016-10-17 12:16:27 -07:00
Nathan E. Egge f3035f2bc7 Revert code formatting of OD_UNIFORM_CDFS_Q15.
The formatting of OD_UNIFORM_CDFS_Q15[] in entcode.c is helpful for
 for understanding what is contained in the array (e.g., the uniform
 probability distributions of small sizes 2 through 16).
This patch reverts the change made in f4b2926d and adds linter hints to
 ignore the formatting.

Change-Id: I2ad9fe6673b86e6067cb97b40f0f0e69a119cdf5
2016-10-17 12:16:26 -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
Yaowu Xu 2bdb9e6344 Merge changes Ie43c599f,Icd0dbed4,Ic04e180b into nextgenv2
* changes:
  Move av1_indices_from_tree() to common code space.
  Add code to compute in-order mappings for tokens.
  Fix bug in av1_tree_to_cdf_2D() macro.
2016-10-14 23:46:48 +00:00
Yaowu Xu 73d702db7f Merge changes I339d0389,I2fa1e87a,If79fa5ae,Icb1a8cb8,Ic76de4a4, ... into nextgenv2
* changes:
  Add missing CONFIG_DAALA_EC declaration.
  Add API for writing trees using a CDF.
  Add macro to build a simple cdf table.
  Use Daala entropy coder to code trees.
  Silence clang-format code review warning.
  Use Daala entropy coder to code bits.
  Clear existing format issue in the codebase
  Add Daala entropy coder.
2016-10-14 23:42:22 +00:00
Yi Luo 1dec26e004 Merge "Zero high 128b YMM registers to avoid SSE-AVX transition penalties" into nextgenv2 2016-10-14 23:13:10 +00:00
Nathan E. Egge 8abf8673e6 Move av1_indices_from_tree() to common code space.
Move the av1_indices_from_tree() function from av1/encoder/treewriter.c
 to aom_dsp/prob.c so that it can be used by both the encoder and
 the decoder.

Change-Id: Ie43c599f425c3503b1ff93f0c77b5033a05b1bb4
2016-10-14 14:59:27 -07:00
Nathan E. Egge a67c0ff4d7 Add missing CONFIG_DAALA_EC declaration.
Without first including ./aom_config.h in aom_dsp/prob.c the memmove
 function is implicitly defined and causes a compiler warning.

Change-Id: I339d0389f10324a1085aba7d6492b2159a14da92
2016-10-14 14:59:27 -07:00
Nathan E. Egge 44460148b2 Add API for writing trees using a CDF.
Added aom_write_tree_cdf() and aom_read_tree_cdf() function calls to
 bitwriter.h and bitreader.h respectively.
These calls take a multisymbol CDF and an index and directly encode the
 symbol using the enabled entropy coder.
Currently only the daala entropy encoder supports this (enabled with
 --enable-daala_ec) and a compile error is thrown otherwise.

Change-Id: I2fa1e87af4352c94384e0cfdbfd170ac99cf3705
2016-10-14 14:59:27 -07:00
Nathan E. Egge 439c50251f Fix bug in av1_tree_to_cdf_2D() macro.
Change-Id: Ic04e180b09745fab2230d05985770c41deea4fad
2016-10-14 14:59:27 -07:00