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

161 Коммитов

Автор SHA1 Сообщение Дата
Yaowu Xu 88cbc5827b Use an alternative fix to ubsan warning.
This commit revert the previous fix of the ubsan warning for unsigned
int overflow, and use a better fix by  moving the offs-- inside the
while loop to avoid "0-1" situation.

Change-Id: Id4a3e03859ebcdf264df0808412b30841028f87c
2016-11-17 21:11:23 +00:00
David Barker 4c12cc5fc5 Comment out code accidentally left in the bitstream_debug patch
In https://aomedia-review.googlesource.com/#/c/5864/ , some
code to stop the decoder at a preselected point was left enabled.
This code should only be uncommented when debugging, so comment
it out by default.

Change-Id: Ie168e8a1588ba92971e3ff1a056f597a7dfca136
2016-11-17 16:26:14 +00:00
David Barker fa2865b502 Implement bitstream debug for daala_ec
Change-Id: I809eb52e8a632189c49b8ea0a2b5de760cc2a34c
2016-11-16 17:17:24 +00:00
Yaowu Xu 4d34154b66 Fix IOC warnings
av1_txfm.h: left shift of a negative number
av1/encoder/quantize.c: unsigned int overflow
aom_dsp/entenc.c: unsigned int overflow

Change-Id: I6143e68f7d6e2621f97900808c8ef7ee0ad0c814
2016-11-16 17:08:02 +00:00
Thomas Davies faa7fcfe1c Add overwrite functions which do not zero bytes.
In several places bits are overwritten in the bitstream. These
functions avoid zeroing bytes during writing so that this can
happen correctly when the number of bits is not 8*N.

Re-addresses the attempted fix in
133c57c331

which broke threaded encoding tests, which relied on re-using
byte buffers.

Change-Id: I682c5e3a7869eac7ad475584db8bf170d47a56c9
2016-11-16 03:57:10 +00:00
Sarah Parker caaf9f9270 Revert "Support overwriting an arbitrary number of literal bits."
This reverts commit 133c57c331,
which appears to cause test failures in
AV1/AVxEncoderThreadTest.EncoderResultTest/*

Change-Id: I200b7a135ed65dc2c3f23b23b8c3dbf0872715fa
2016-11-12 01:02:11 +00:00
Yaowu Xu f42bba2522 Reinstate "fix msvc build warnings and errors"
This commit reinstates portion of a reverted commit to fix warnings
and errors with MSVC2013 build.

Change-Id: Ibb5fd665db6d8c897a657e5994547a1f82e3f188
2016-11-12 00:36:55 +00:00
Yaowu Xu fdb4216d6b Revert "fix msvc build warnings and errors"
This reverts commit 32dbdff1b3.

Change-Id: I94ef281223f7abceb156714e8192d5ea5fdc2581
2016-11-10 22:32:29 +00:00
Yaowu Xu 32dbdff1b3 fix msvc build warnings and errors
This commit fix the msvc2013 build for configuration:
configure --target=x86_64-win64-vs12 --enable-experimental
 --enable-clpf --enable-dering --enable-motion-var --enable-ans

BUG=aomedia:80

Change-Id: I08b61e38e761ea4ed3175529fba4a50c57be44ac
2016-11-10 21:51:43 +00:00
Yi Luo 1f49624c7f SAD avx2 optimization for ext-partition
- User level improves 1.33% on i7-6700

Change-Id: I279fc7ec99f4c3500017ed079709227f96e9702e
2016-11-10 19:56:00 +00:00
Debargha Mukherjee 0e11912ae1 Support 64x64 quantizer functions
Also includes some refactoring and cleanups.

Change-Id: I2c2528c434a1e9e9b898251fa69489d884463929
2016-11-09 21:59:14 +00:00
Yaowu Xu febe9b06bb Fix msvc compiler warnings
BUG=aomedia:80

Change-Id: Ie4bccf053d2c24dcb64519650bcbcef4baffcdae
2016-11-09 19:38:21 +00:00
Thomas Davies 133c57c331 Support overwriting an arbitrary number of literal bits.
Overwriting was only guaranteed to work if a whole number
of bytes were being overwritten.

Change-Id: I5e72cb337ec6ff691e93288de9f751b583654a17
2016-11-09 11:11:57 +00:00
Alex Converse 1e4e29f776 Fix rans ec_multisymbol merge issues.
The rans experiment is dead. The ans experiment with the ec_multisymbol
experiment also turned on takes its place.

Change-Id: Ie9f30ec7cf73aae6b2ea580a7b1f208485a8a7a7
2016-11-09 01:25:29 +00:00
Angie Chiang d02001ddc2 Add txb_coeff_cost_map into TOKEN_STATS
This is to facilitate debugging process in var_tx experiment

Change-Id: Ibd5ea7f6054c598b8e686abb4e8158ef28c67aab
2016-11-08 22:32:02 +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
Angie Chiang d402282f69 Add token cost comparison in write_modes_b()
This is just partial implementation
Compare token cost of pack_mb_tokens/pack_txb_tokens with token cost
from rate-distortion loop. If there is any difference, dump out mode
info.

Change-Id: I46b373ee2522c5047f799f36baf7cec5fbc06f06
2016-11-04 11:09:24 -07:00
Yi Luo 7f6bf9c70d Merge "Hybrid inverse transforms 16x16 AVX2 optimization" into nextgenv2 2016-11-02 01:43:02 +00:00
Yi Luo 7317200002 Hybrid inverse transforms 16x16 AVX2 optimization
- Add unit tests to verify the bit-exact result.
- User level time reduction (EXT_TX):
    encoder: 3.63%
    decoder: 2.36%
- Also add tx_type=V_DCT...H_FLIPADST SSE2 for 16x16 inv txfm.

Change-Id: Idc6d9e8254aa536e5f18a87fa0d37c6bd551c083
2016-11-01 13:38:20 -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
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
Alex Converse 58c520afe9 Only build aom_read/write_symbol if CONFIG_EC_MULTISYMBOL
Change-Id: If86c7220ac9199a59e605dc43d42cc3db26cf8bd
2016-10-29 17:05:40 -07:00
Thomas Davies f6c04acaa3 EC_ADAPT: improved symbol adaptation.
Place a floor under symbol probabilities and
modify adaptation rate.

Change-Id: Ic9cf6d9fadfc3bf1f3027bc3d2bb198526441591
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
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