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

20033 Коммитов

Автор SHA1 Сообщение Дата
Alex Converse f5931e5e61 Fix off by one in an assert.
'bits' can be (less than or) equal to sizeof(av1_cat6_prob).

BUG=aomedia:399

Change-Id: I20ceb6fa3b61dfcc59e28605fe4f90d8bfaacc51
2017-03-17 18:36:29 +00:00
Joe Young 947fa979c1 Fix compile error with ref_mv disabled
Change-Id: I6c5a843df7de0e711db27ccc5cfbe9fde8d6bae4
2017-03-17 18:30:23 +00:00
Angie Chiang c8af61124a Add av1_write_coeffs_mb
This function go through each transform block in the
prediction block and call av1_write_coeffs_txb to
pack coefficients into the bitstream

Change-Id: I6dedebef6cf8957f9173241a7de60e9936bc0be8
2017-03-17 17:49:30 +00:00
Debargha Mukherjee 082d4df760 Replace division in warped motion least squares
Replaces the int64 and int32 divisions in least-squares and
gamma or delta computation with a mechanism that decomposes
the divisor D such that 1/D = y * 2^-k where y is obtained
from a lookup table indexed by 8 highest bits of the difference
D - 2^floor(log2(D)). The main complexity is now only from
computing this decomposition, which is essentially equivalent
to finding floor(log2(D)) (position of highest
bit in a 64-bit integer).

Also includes an out of memory bug fix and some cleanups.

Change-Id: I9247fdff5f6b4191175d4b4656357bfff626f02c
2017-03-17 16:45:42 +00:00
Tom Finegan c45213ce81 Add armv7s-ios cmake toolchain.
This is used at cmake generation time via a command line like this:
$ cmake path/to/aom -DCMAKE_TOOLCHAIN_FILE=path/to/aom/build/cmake/toolchain/armv7-ios.cmake

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: Iadacc32c43bc23e0f670b88e3c1563c44319945c
2017-03-16 18:42:25 -07:00
Tom Finegan 285dedba96 Expand cmake assembler support.
- Stop acting as if Yasm is the only assembler.
- Kill generation and report error when yasm is not found for x86
  and x86_64 (remove the generic fallback).
- Use $AOM_AS_FLAGS to pass assembler specific flags.
- Add include guard in aom_optimization.cmake.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: Ic68d6c81071c24a8ceb6806d04ab8959be97d876
2017-03-17 01:28:21 +00:00
Angie Chiang 0397eda0d1 Draft of av1_update_txb_context
This draft version only pass compiling check, it's not working yet.

The following goal is to use new coding system when doing bitstream
packing but keep old coding system in RD loop.

Change-Id: I224a1581d1cc5c67d73e71558fb77d9faf9c2470
2017-03-16 16:15:15 -07:00
Rostislav Pehlivanov 74021a5a64 Implement twopass support for the xiphrc system
This commit implements support for twopass encoding using the xiphrc
experimental rate control system. Most of the code and logic comes
from the theora project encoder.

Currently support is limited to the bitrate targeting mode of the
rate control system and while it does visibly improve quality and does
bring rate closer to the target than the one pass mode there's still
tuning and bug fixing to be done.

Change-Id: Iae0d65bbce5ddfbb95b436e2238a43d6100a23b3
2017-03-16 21:40:48 +00:00
Angie Chiang f0fbf9d988 Add frame level buffer to store txfm coeffs
Doing tokenize in the last step of RD loop and then doing packing
tokens in bitstream packing phase is hard for debugging.

Therefore, we create a frame-level buffer to store the txfm coeffs
from the reconstruction in RD loop and then in bitstream packing
phase, we can code the txfm coeffs directly.

Change-Id: I999470eef6e038317a91585df2bdfc20aca3573e
2017-03-16 20:48:41 +00:00
Alex Converse da3d94fe2c Account for elided extrabits during rate cost calculation.
Fixes some rd-debug mismatches coding cat6 tokens with tx size < 32x32.
For these tokens the high extrabits are elided during tokenization and
detokenization, but the rd cost was computed with the old tables from
VP9 where these high extrabits are always coded.

Change-Id: I4a9a6ea822ff821e1932c351d43a57bdb4d6d466
2017-03-16 16:36:19 +00:00
Alex Converse e063e2dd3d highbitdepth: deduplicate extrabits
Change-Id: Ib1777433c10e3b64f939c533c12a89dfc839bc6a
2017-03-16 16:36:19 +00:00
Yue Chen 74a7754615 Fix recon mismatches in GLOBAL_MOTION+MOTION_VAR
The offset of neighbors is communicated to av1_make_inter_predictors
so as to use the correct mi in gm warping

Change-Id: I471bbdf2112ed678969492b11730f15d9527eb7e
2017-03-15 22:53:57 +00:00
Alex Converse 4e18d403d8 ext_partition_types: Make update tree shape match
Update the first PARTITION_PLOFFSET (4) contexts with the four classic
partitions. The extended partitions are only codable above 8x8, but
there are PARTITION_PLOFFSET (4) contexts for dropping below 8x8.

Change-Id: Ib3291dded6dc24103222e8f470504c20e29adb88
2017-03-15 17:46:58 +00:00
Thomas Davies 1c05c6351c NEW_TOKENSET: Make zero block value uncodeable for AC coeffs.
Change-Id: Icd7528d1ec8e117205e5e35ad9a11cfa83b08253
2017-03-15 17:44:28 +00:00
Thomas Davies a134e2dc1d Remove decoder coefficient counts for NEW_TOKENSET + EC_ADAPT.
These are no longer used in probability updates.

Change-Id: Idf5037f769d43972434b5ecbff3550b3f97be21a
2017-03-15 17:44:28 +00:00
Sarah Parker 81915f5d5a Enable rect-tx by default
Change-Id: I51f31083988d7d5c574067c1a3aa98b7949adcee
2017-03-15 17:39:56 +00:00
Sarah Parker 076437f4a0 Fix broken assert when rect-tx is enabled on its own
The function is_rect_tx previously was only defined when
both ext-tx and rect-tx are enabled together. This function
needs to be defined when rect-tx is enabled alone to fix
failing asserts.

Change-Id: Ic8153a55b768cb49caac07d6aeaee109d63410a9
2017-03-15 17:39:41 +00:00
Fergus Simpson 6ee201dbc1 frame_superres: Add experimental flag
Frame Super-Resolution is an experiment currently under development.
This commit just adds an experimental flag for it.

The goal of the experiment is to compress a downsampled version of a
frame instead of the full resolution one when bandwidth is limited. The
decoder will need to upsample and filter the frame it recieves after
decoding. It is thought that this will result in a visually superior
result in low bandwidth scenarios.

Change-Id: Ia8af8692cffd133db3838693fd85ded2442b078c
2017-03-15 16:55:45 +00:00
Thomas Davies 04bdd523f6 NEW_TOKENSET: do not code impossible values.
In the last position, No-EOB values and zero are all not
possible.

AWCY, objective-1-fast: -0.08% all metrics
AWCY, screen content:

PSNR YCbCr:    -0.42%    -0.42%    -0.43%
PSNRHVS:       -0.40%
SSIM:          -0.41%
MSSSIM:        -0.41%
CIEDE2000:     -0.42%

Change-Id: Iad012abfd2a48a2c9ff27512f92b27235a5a8a4a
2017-03-15 09:33:04 +00:00
Thomas Davies 1052575881 NEW_TOKENSET: improve RDO.
Modify av1_coef_cost to reflect that EOB values are sent
with each non-zero coefficient, and modify chroma weight
to preserve original chroma balance.

AWCY, objective-1-fast, new_token+ec_adapt vs ec_multisymbol:

PSNR YCbCr:     -0.43%      -0.52%      -0.58%
PSNRHVS:        -0.81%
SSIM:           -0.73%
MSSSIM:         -0.93%
CIEDE2000:      -0.36%

This change:

PSNR YCbCr:     -0.15%      0.83%      0.77%
PSNRHVS:        -0.24%
SSIM:           -0.23%
MSSSIM:         -0.24%
CIEDE2000:       0.24%

Change-Id: I7f2dd9f3cd24bb64eb4131cba94dda466b9691b0
2017-03-15 09:32:45 +00:00
Thomas Davies 028b57f563 EC_ADAPT: Perform backwards updates directly on CDFs.
The initial CDF for each frame is stored in
the frame context. CDFs for actual coding are
stored in the tile structures, and these are
what get adapted. The initial CDF is replaced
by an average CDF derived from these tile CDFs.
This is carried forward to future frames when
backward adaptation is on.

CDFs are no longer set from the 8 bit probabilities
in backwards adaptation.

For now, 8 bit probabilities are maintained for
use in the encoder and for symbols which do not
have a CDF.

Change-Id: I106b30510bfad1fa57d077f7702acc1864378a09
2017-03-15 09:31:58 +00:00
Yushin Cho d080f4152d Fix broken build with accounting
Change-Id: I50267aa39d4d2857b48cbea0cbc8a7608489ebd7
2017-03-14 22:04:46 +00:00
Sarah Parker b3ebed1cae Fix sub8x8 rd costing to include global motion prediction
One codepath originally skipped a function which forks between
gm prediction and regular inter prediction. This change fixes this
for both high bit depth and regular bit depth.

Change-Id: I741d67a7c89eb6eb0cd35c02219739dc3ddb3841
2017-03-14 21:42:13 +00:00
Timothy B. Terriberry 561eb7cdc6 daala_ec: Remove dead code.
Change-Id: Ief9581c8060132f20ca81f4c1be15e2772b6c9eb
2017-03-14 18:36:14 +00:00
Luc Trudeau b6e94d9f4b Uniform way of accessing mbmi in av1_xform_quant
Cosmetic change that moves the declaration of mbmi at the beginning of
the function.

Change-Id: I028c9ca3db57e769270fbad4f20261d5562be2f2
2017-03-14 17:34:12 +00:00
Sebastien Alaiwan 1f40e2212c Reduce scope of local variable
Change-Id: Ib87563cc84812137070534b76f18305c243e2fad
2017-03-14 08:34:39 +00:00
Sebastien Alaiwan 7889e5fa28 Don't indent the 'normal' case
This simplifies the flow of control.

Change-Id: Ib376d28711c98fb776cb5afe097107e9ccf039b1
2017-03-14 08:34:39 +00:00
Sebastien Alaiwan 13f77be5e9 Group TX by sizes
Avoid having NULL entries when TX64x64 isn't enabled.

Change-Id: I58843d8652b78434b604e23f4b131ef02fb4c68b
2017-03-14 08:34:39 +00:00
Debargha Mukherjee 1b3dbf0964 Add a macro to use only Wiener loop-restoration
For testing contribution from Wiener only.

Change-Id: I54fb5051dd03543d5166391a9b3b60b8d80c8228
2017-03-14 00:46:39 +00:00
Yaowu Xu 93d44fb366 Reduce size in FrameSizeTests for 32-bit arch
BUG=aomedia:394

Change-Id: I7d9e413dcd0fe832aaec570bc6c1f0d2b644de09
2017-03-13 20:44:18 +00:00
Urvang Joshi 63234547dd Add some default CDFs when ALT_INTRA is on.
Generated using av1_tree_to_cdf().

Note: These are currently overwritten by CDFs generated from default
probability tables. But they will be used eventually when we remove the
default probability tables.

Change-Id: I41a6047fd13e05156a50b2d54349ffdd7e1e4c4a
2017-03-13 18:28:17 +00:00
Angie Chiang d0916d9f98 Add aom_merge_corrupted_flag to simplify debugging
This function allows us to set breakpoint when error happens.

Change-Id: I0074a26142625fb95728ed6aa003453ab4203c0f
2017-03-13 17:20:46 +00:00
Angie Chiang b11aedf988 Fix bitstream debug failure
Move bitstream_queue_reset_write() out of experimental flag

Change-Id: I622e9c3e8d5b668e68c53c2a0484173e7a65c808
2017-03-13 17:20:46 +00:00
Sebastien Alaiwan 1e6f24d2b0 Simplify test: avoid dynamic memory allocation
Change-Id: I494aff37afa176faa7bbef39552d4bb237a685ae
2017-03-13 08:15:39 +00:00
Sebastien Alaiwan 1bc3046d95 Simplify list of functions to test
Change-Id: Id4eeefe769351414abae6e3ddda56a2f9f0c3eda
2017-03-13 08:15:21 +00:00
Yaowu Xu def28b245a Remove a sse4_1 function
Function apply_selfguided_restoration_highbd_sse4_1() is producing
mismatch to c version, it is removed for now, allowing investigation
and fix.

BUG=aomedia:392

Change-Id: Ic55e7a6958112c02930b1d5f3af2e2ea089fe500
2017-03-13 04:41:05 +00:00
Debargha Mukherjee 9d5d4ef173 Fix a bug in encoding the restoration tilesize.
Change-Id: I841098396e4932913e41cfc729ef2ee3b7444477
2017-03-13 03:52:13 +00:00
Yaowu Xu c3f5bd1cfc Align memory allocation for SIMD operations
Change-Id: I035d4a3b14e6c56a55b06dea57b4a49cd161e69f
2017-03-13 02:19:46 +00:00
James Zern 66ee4402d0 aom_encoder: enable floating point exceptions
with --enable-debug (CONFIG_DEBUG) when available

BUG=aomedia:388

Change-Id: I5dd0718d6bd0ba17bc1b52d5842e250244d2d1d8
2017-03-11 14:52:22 -08:00
James Zern 4ab325c32d Revert "aom_encoder: enable floating point exceptions"
This reverts commit 48c10c7d91.

Reason for revert: this incorrectly detects feenableexcept for
i686-w64-mingw32 (at least), causing the link to fail

BUG=aomedia:388

Change-Id: I141fec2285bd67d1312f1eb6be528cc69108cd27
2017-03-11 22:12:40 +00:00
Yaowu Xu 57b700a154 change to 32bit read from 64bit read
This is to avoid out-of-range memory access.

BUG=aomedia:391

Change-Id: I211ba1992d4f51fcf06cf2961d8cb2606b836207
2017-03-11 12:17:46 -08:00
James Zern 48c10c7d91 aom_encoder: enable floating point exceptions
with --enable-debug (CONFIG_DEBUG) when available

BUG=aomedia:388

Change-Id: I3b67aedc519043e3215b4ee41503b34297aa32ce
2017-03-11 02:03:19 +00:00
James Zern d2c42f0354 av1_rc_update_rate_correction_factors: avoid log(0)
avoids a floating point error being generated. this doesn't change
behavior, the -HUGE_VAL return was being ignored due to the min()

BUG=aomedia:388

Change-Id: I698aab248c777b02b60081bb7619e0aa6f3a0ba2
2017-03-11 02:03:19 +00:00
Fergus Simpson 9f7ca0b73c handle_inter_mode: rename opt_args to args
The addition of a 2D array to the HandleInterModeArgs struct means there
is now a non-optional member in the opt_args struct passed to
handle_inter_mode and its child functions. Since opt_args no longer
consists solely of optional members I've renamed it args.

Change-Id: I7f3b22188777d8fdac2c244746638c34b5d8636c
2017-03-11 01:50:58 +00:00
Urvang Joshi 3260480bd9 Update golden MD5 in decode_to_md5 test.
The bitstream has now changed as we enabled ALT_INTRA by default now, so
need to update the golden MD5.

BUG=aomedia:389

Change-Id: Ic62d1628e572e5ea252d6f6eef8d8312db62dbb8
2017-03-11 00:49:26 +00:00
Urvang Joshi 3a9a527819 Correction for ALT_INTRA + EXT_TX combo.
Add extra entries to the 'default_intra_ext_tx_prob' table when
ALT_INTRA is on.

Change-Id: I1b3d28fa06852b4b7c68b061c44318ec83be77b6
2017-03-11 00:39:18 +00:00
Fergus Simpson 3424c2de01 rdopt: move/remove 2d arrays in pick_inter_mode_sb
Two 2D arrays were passed to HandleInterMode and not used elsewhere.

One has been added to the HandleInterModeArgs struct to
simplify handle_inter_mode's signature and the the calling function.

The other has been unread since commit
beacb3ff79. That patch removed the
"skip_txfm optimization" but left the single_skippable array in place,
even though it was no longer read. Since the array's only usage has been
removed, this patch removes the variable outright.

Change-Id: I6e680a9ddc6f67961153819a62009751252757a8
2017-03-10 23:19:54 +00:00
David Barker eed824efd7 Vectorize new highpass filter for loop-restoration
Change-Id: Ibe5d4933f599456cb496f636de244694bc786a4c
2017-03-10 23:13:49 +00:00
Thomas Davies f7f87ff2e6 Add a symbol decode call count to accounting.
This keeps track of how many calls have been made
to read symbols or bits. A given syntax element
may make multiple calls to symbol decoding functions,
and these variables keep track of the entropy
decoding engine throughput.

Change-Id: Iab3a720cbfe68f8d5ca3e4c415f7baa683b24268
2017-03-10 20:09:01 +00:00
Debargha Mukherjee b7bb0976b7 Replace one self guided filter with highpass
Adds an option controlled by a macro to replace one of
the guided filters in the self-guided tool with a simple
bandpass filtered version generated with a 3x3 kernel.
By default the macro USE_HIGHPASS_IN_SGRPROJ is 0 (turned
off), that defaults us to the dual self-guided filter.
When the macro is turned on, the larger radius guided
filter is replaced by a simpler filter that is much faster.

Results (if USE_HIGHPASS_IN_SGRPROJ is on vs. off):
lowres: performance drop by +0.14% (BDRATE)
midres: performance drop by +0.27% (BDRATE)

Further experiments on this variation of guided filters is
pending.

Change-Id: I7bbcfcad7ee266cd49a8dc6d96795a454feb1a94
2017-03-10 19:31:12 +00:00