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

680 Коммитов

Автор SHA1 Сообщение Дата
Urvang Joshi 23a611173b Palette code: add comments and rename some variables.
- Added comments for some tables and #defines for clarity.
- Renamed some variables to ensure we use "color_index" instead of
"color" for palette color index related variables.

Change-Id: Ica95a26e0f171a41a3259c8e6b3b891b8cd10151
2017-01-30 15:09:57 -08:00
Yue Chen d0d3bccf14 Fix conflicts between cb4x4 and warped_motion
Set mi_size properly in findSample()

Change-Id: I26bae25bf6300a107108dc5c2b7098e7d7dfa750
2017-01-30 22:04:02 +00:00
Jingning Han 1992af1b98 Make cb4x4 work with daala-ec
This commit makes the daala-ec work in the cb4x4 mode. As compared
to --enable-experimental, --enable-experimental --enable-cb4x4
improves the coding performance by:

lowres 2.6%
midres 1.2%

Change-Id: Ifee6f011c80364492c4a547513d24eb2958b5a56
2017-01-30 19:39:11 +00:00
Urvang Joshi cdbe708581 Palette Optimization: O(1) context lookup.
Now that we have small number of contexts (5), use hash multipliers
(instead of base 11), so that color context hash is within a small
range. This allows us to use a lookup table to get color context
instead of a for loop.

Output bitstreams are bit-exact, so no change in compression.

Change-Id: I8cd8c893048c2fc6b22ccbd56f652d11486e2ee9
2017-01-30 17:48:46 +00:00
Urvang Joshi 199a2f4052 Palette: Don't use top-right pixel for context of color indices.
This reduces the complexity in a number of ways:
- We need just 3 neighbors instead of 4.
- Possible contexts reduce from 16 to 5.
- On hardware side, getting the contexts for a whole block will be more
parallelizable.

At the same time, compression performance improves very slightly:
- Screen-content set (videos) (Google): BDRate improved by 0.32
- screenshots set (images) (AWCY): PSNR improved by 0.62:
https://arewecompressedyet.com/?job=palette_withTR2%402017-01-27T21%3A30%3A28.890Z&job=palette_noTR2%402017-01-27T21%3A41%3A34.312Z

Change-Id: Ie84ca32f05d55ad481a51c2d3abc579468597189
2017-01-30 17:48:46 +00:00
Jingning Han 86e277911a Fix ext-partition/type in cb4x4 mode
This commit fixes the encoding/decoding mismatch issue when
ext-partition and ext-partition-type are both turned on in cb4x4
mode.

BUG=aomedia:336

Change-Id: I4d6ad5863c9d3bc8e3a41c259b8b39f130164790
2017-01-27 13:58:08 -08:00
Debargha Mukherjee 4bab6e4f58 Adjust WIENER_FILT_TAP2_MIDV value to fix convolve
Adjusts the value by 1 to make sure that the center tap
if the Wiener filter does not drop below 0.

BUG=aomedia:315

Change-Id: I41c3a2eb3f36dd49072a4873a995003d18f94ece
2017-01-27 17:56:17 +00:00
Thomas Davies dbfc4f9cc0 TILE_GROUPS: code a single tile group more efficiently.
Change-Id: If6efdb754558e3f237aa2d56c0eae4590fb021a4
2017-01-27 15:18:06 +00:00
Debargha Mukherjee 1a0ae84dab Fix OneByOneVideoTest for loop-restoration
Fixes and turns on the test.

BUG=aomedia:312

Change-Id: I6c7d1970e743ec2b025a798070761d22624e796a
2017-01-27 06:06:04 +00:00
Debargha Mukherjee 9868c7479a Fix crash with cb4x4 and warped-motion
BUG=aomedia:314

Change-Id: I66af7f69ca0b97b9d840918a6b9ec34708a7f4e5
2017-01-27 00:54:05 +00:00
Debargha Mukherjee ff59b6acb1 Fix mismtach with ref-mv and ext-partition-types
Change the list of search offsets searched when ext-partition-types
is on for square block_sizes. This is because the VERTICAL_A and
HORIZONTAL_A partitions are incompatible with the default list.

BUG=AOMEDIA:141

Change-Id: I884c45c3d11039b7dcb72336a928362f926473ed
2017-01-26 20:48:18 +00:00
Urvang Joshi 56ba91bbe4 Palette: Don't store tokens for pixels outside image boundary.
If part of a block falls outside right and/or bottom image boundary,
then only store tokens for the part of it within the boundary.

Also, consider only the part of the block within the boundary when
calculating the number of colors in the image, deciding the base
colors for palette, RD calculation etc.

The part of color map corresponding to pixels outside the image
boundary is padded with color indices copied from same row/column.
This behavior is similar to how pixels outside the boundary are padded.

For screen_content set, this is improves compression performance by
0.038 overall. One clip, in particular, has a significant gain of 0.8.

Change-Id: I745ca032f313c5041aacc98c03ae4bfc33d840de
2017-01-26 18:03:33 +00:00
ltrudeau e1c0929f51 Convert PVQ skip variable to enum
Creates the PVQ_SKIP_TYPE enum to encapsulate the different types of
skipping that can be signaled by PVQ (i.e. skip: AC, DC or both).

There is no impact on the bitstream. However, the decoder will now emit
an internal error if the decoded skip flag is out of range. The
block_skip variable is also renamed to ac_dc_coded as it stores the same
information.

Change-Id: Ib2aadaf99dc1736ea392ae5ed8948c3cdc12da9b
2017-01-26 17:36:04 +00:00
hui su 0161a93266 Cleanup for the entropy experiment
Minor performance changes
0.03% better on lowres
0.01% better on midres

Change-Id: I7a7168f3a2a4d17a03353841a416eff6edf1e241
2017-01-25 22:45:22 +00:00
Tristan Matthews 54e197749d pvq: skip gshift calculation in float pvq case
Cherry-picked from daala commit 28de40bfcd84e7df3fbd64de7b89dd7fd889bb27

Change-Id: I31af05f07514c023c5be84f7e2ae353ab7d276f0
2017-01-25 21:18:14 +00:00
Debargha Mukherjee 63131ea6e3 Silence a compiler warning
Change-Id: I130f748c076a1642f12b95051dab19bfdac5b855
2017-01-25 05:10:06 +00:00
David Barker 839467f42c Make ext-inter use new rectangular intra predictor
Now that https://aomedia-review.googlesource.com/#/c/6729/
has been merged, build_intra_predictors_for_interintra() is
now redundant, so replace it by a direct call to
av1_predict_intra_block() and remove the old function.

Reset rect_interintra back to 1.

To do this, we need to make the intra predictor take a
BLOCK_SIZE instead of a TX_SIZE. This is because we need to
be able to predict 32x64 and 64x32 blocks, but there is no
TX_32X64 or TX_64X32.

No effect on output or performance.

Change-Id: I8c185a211c97a85012cc54ec293c785a693608ed
2017-01-24 21:37:24 +00:00
Yaowu Xu a93e65e5c6 Fix a couple of typos
Change-Id: Ibec40c3cd8e14343b096e406ba233cf4f131e7b9
2017-01-24 20:35:31 +00:00
Angie Chiang c71d613097 Fix bitstream error when entropy and adapt_scan on
BUG=aomedia:310

Change-Id: I8e1a1c6d59e3d14ba132d2bbf4e203da26538bde
2017-01-24 20:06:31 +00:00
Jingning Han 61418bbd1f Fix conflicts between ext-inter and cb4x4 modes
Resolve the broken coding pipeline in ext-inter experiment when
cb4x4 mode is enabled. Turn off rectangular inter-intra mode.
This needs some more work to hook up. Given that it gives fairly
limited coding performance gains, disable it for the moment.

BUG=aomedia:309

Change-Id: I9b406df6183f75697bfd4eed5125a6e9436d84b0
2017-01-24 18:18:19 +00:00
Fangwen Fu 8d164de25c enable explicit temp mv prediction signaling
Change-Id: Ieb2922c3df4ef4f8514b8a6df6f9a8fc45ef3cf4
2017-01-23 14:22:45 -08:00
Yaowu Xu 6b763c9c9e Fix issues in --enable-entropy and --enable-cb4x4
Change-Id: I148d60d56599a238c60c429572a25cbddbe5191d
2017-01-23 21:50:06 +00:00
Emil Keyder 01770b3e20 Rename NONE to NONE_FRAME.
This follows the naming for the other frame types, and allows libaom
to be compiled against other libraries that also #define NONE.

Change-Id: Ic2e2814587bbc5ea67385a9af775396d29b7dde0
2017-01-23 21:12:35 +00:00
David Barker 13797462df Warp filter improvements
* The restriction on the parameter 'delta' was too strict, so we
  loosen it (delta only ever gets multiplied by -4, ... , 4,
  whereas beta gets multiplied by -7, ..., 7)
* Correct a comment about the border clamping
* Fix an issue with the test case

Change-Id: I30e55203455ba6e419b5a8b646151a6d1fd5cc3b
2017-01-23 20:46:22 +00:00
Yushin Cho 7a428ba243 Add a new experiment, DAALA_DIST
This commit adds a new experiment, Daala's distortion function,
which is designed to better approximate perceptual distortion
in 8x8 pixel blocks.

This experiment is expected to work best with PVQ.

It measures the variance of overlapped 4x4 regions in the 8x8 area,
then uses these variances to scale the MSE of weighted frequency domain
distortion of 8x8 block.

Since AV1 calculates distortion in blocks as small as 4x4, it is not possible to
directly replace the existing distortion functions of AV1,
such as dist_block() and block_rd_txf().
Hence, there has been substantial changes in order to apply
Daala's 8x8 distortion function.
The daala distortion function is applied
after all 4x4 tx blocks in a 8x8 block are encoded (during RDO),
as in below two cases:
1) intra/inter sub8x8 predictions and
2) 4x4 transform with prediction size >= 8.

To enable this experiment, add '--enable-daala-dist' with configure.

TODO: Significant tuning of parameters is required since the function has
originally came from Daala thus most parameters would not work
correctly outside Daala.
The fact that chroma distortion is added to the distortion of AV1's RDO is
also critical since Daala's distortion function is applied to luma only
and chroma continues to use MSE.

Change-Id: If35fdd3aec7efe401f351ba1c99891ad57a3d957
2017-01-23 20:24:57 +00:00
Jingning Han 48b1cb35bb Support filter-intra in cb4x4 mode
This commit resolves an enc/dec mismatch issue when both filter-intra
and cb4x4 modes are enabled.

BUG=aomedia:253

Change-Id: I4026d93c00a819f2ce69aedba9d34a774319acbf
2017-01-23 20:20:30 +00:00
Angie Chiang 54294194c5 Fix segmentation fault of dual_filter in hbd mode
BUG=aomedia:142

Change-Id: Id21dd2d19e1e46a9225cd5f8f8b0705ae178118c
2017-01-23 16:10:28 +00:00
Jingning Han 758b2ceba3 Make adapt-scan support rectangular transform block sizes
This commit enables the adaptive scan order system support
rectangular trnasform block sizes. It resolves the coding failure
when rect-tx or var-tx are enabled.

BUG=aomedia:143

Change-Id: Ic565284e811e3f7e0ebf2e08fb3748257ce8a049
2017-01-21 21:05:10 +00:00
Jingning Han 07ef967d39 Resolve coding failure in var-tx
Fix an encoding failure issue when var-tx is enabled, while ext-tx
and rect-tx are disabled. This doesn't change coding statistics
when all are enabled.

Change-Id: I4b32387a0a1497380980f8087832aaf6467cdcbe
2017-01-21 21:04:42 +00:00
Jingning Han 3daa4fda6c Support rectangular tx size in cb4x4 mode
This commit makes ext-tx and rect-tx experiments supported in the
cb4x4 mode. It resolves an enc/dec mismatch issue when all the
transform experiments are enabled.

The coding gains are
        ext-tx + rect-tx   cb4x4    vartx     total
lowres      4.0%           2.3%      0.5%     6.9%

The encoding speed is about the same when cb4x4 and vartx are
further enabled.

BUG=aomedia:139

Change-Id: I3fdabc6d5de23ceb78ac0751a9bf7332ebc0a3ac
2017-01-21 21:04:27 +00:00
Yue Chen 80a15c9bb6 Set default warped motion model to rotation-zoom
Change-Id: Ied58b6e4a15259cf24e3ee490c042767f4a48f16
2017-01-20 19:50:20 +00:00
Jingning Han f4e097b486 Fix rectangular tables in cb4x4 mode
Account for the additional block sizes in these tables.

Change-Id: Iae940f28671714caaf32432940752958ef66f6d5
2017-01-20 18:14:48 +00:00
Debargha Mukherjee 3eb713e287 Fix loopfilter for rectangular transforms
Properly determine and use horizontal and vertical masks
for loop filtering when rectangular transforms are used.

Fixes an intermittent mismatch issue and improves coding
efficiency.

BDRATE results for ext-tx + rect-tx:
lowres: -3.739% (up from -3.443%)
midres: -3.366% (up from -3.006%)

Change-Id: If26fa14261f3893662eb1245f0b876d68513247c
2017-01-20 17:36:35 +00:00
Angie Chiang caa9e5adf9 Refactor av1_convolve
Move declaration of filter_params_x/y outside of if/else block

Change-Id: I4f908872b7ff85b440a12a535d939a3c137aaab5
2017-01-20 17:04:45 +00:00
Angie Chiang 117aa0dc6c Add CONVOLVE_POST_ROUNDING flag
By turning on CONVOLVE_POST_ROUNDING, in the compound inter
prediction mode, FILTER_BITS rounding is moved after the summation
of two predictions.

Note that the post rounding is only applied on non-sub8x8 block

       PSNR     BDRate
lowres -0.808%  -0.673%

Change-Id: Ib91304e6122c24d832a582ab9f5757d33eac876c
2017-01-20 17:04:45 +00:00
Thomas Davies 1bfb5edac3 EC_ADAPT: use tile context for intra mode syntax.
Change-Id: Id01c785ad48134075c4f6643233413564f0b8fbc
2017-01-20 14:11:12 +00:00
Jingning Han 456e0864dd Fix enc/dec mismatch due to ext-partition-type in cb4x4 mode
This commit fixes an enc/dec mismatch issue in ext-partition-type
in the cb4x4 mode.

BUG=aomedia:137

Change-Id: I19f538a967a6059a40b1668eed076bc315b46149
2017-01-20 03:53:42 +00:00
Jingning Han d9c24a33b5 Fix intra block coding order in ext-partition-type
Fix the intra block coding order when both ext-partition-type and
cb4x4 modes are turned on.

Change-Id: Iaaaf4742c53c4778526974f9d1dfdaed6ca3ce3c
2017-01-20 03:53:33 +00:00
Jingning Han 58bc4cc024 Support ext-partition in cb4x4 mode
This commit resolves the coding pipeline breakage when ext-partition
and cb4x4 are both enabled.

BUG=aomedia:138

Change-Id: Ic17da68af80d7a66565b0e1c69b895be27282a9a
2017-01-20 03:53:19 +00:00
Alex Converse 6f345c6a0d Use OD_ILOG_NZ in OD_DIVU_SMALL_CONSTS
If _d == 0 we are already off to the UB races due to out of bounds
access in OD_DIVU_SMALL_CONSTS.

Change-Id: I55a76c51483885bbb38667f14836be9830e130a8
2017-01-20 02:22:27 +00:00
Debargha Mukherjee e6044fecd6 Change the warp filter to use real 8-tap
The warp filter for the (0,1) case is changed to use a real
8-tap filter.

Improves coding efficiency.

BDRATE on lowres:
-0.772% (up from -0.633%) with --enable-global-motion
-1.124% (up from -1.001%) with --enable-warped-motion

Change-Id: I296efe36dbc72a7af74773b71b445f19a2aa7205
2017-01-20 01:02:50 +00:00
Sarah Parker 2e6048874c Do masked motion search based on COMPOUND_TYPE
Change-Id: I2d1b5f57a3bb19eb8c00eb4c2e6c7835047dc4ac
2017-01-19 23:09:50 +00:00
James Zern 1a5223224f odintrin.h: define M_PI fallback
+ M_SQRT2 / M_SQRT1_2 to keep the daala diffs down

adapted from:
ebb9b28 Move math.h fills to odintrin.h.

these aren't visible by default with -std=c99.

BUG=aomedia:111

Change-Id: Iaa65986f35d914bf92c8c49a8211e0e6864c64e4
2017-01-19 19:38:54 +00:00
Alex Converse eb780e7167 Add a control to set the ANS window size
Change-Id: I3d64ec4bbc72143b30a094ece7a6c711d6b479cd
2017-01-19 17:22:44 +00:00
David Barker 838367db1e Add correctness tests for the SSE2 warp filter
Also rename warp_affine() to av1_warp_affine()

Change-Id: I945baff6be8a1ea942ce88dfcfa5344af6b3a966
2017-01-19 16:55:58 +00:00
David Barker 1b888f2e9a Optimize SSE2 warp filter
Improve the speed of the warp filter itself by ~30%. This leads
to an overall decoder speedup of 5-20%, depending on bitrate,
for the global-motion experiment, and a small speedup for
warped-motion.

Applies a very minor change to the rounding during filter
selection (ROUND_POWER_OF_TWO makes slightly more sense here
than ROUND_POWER_OF_TWO_SIGNED, and is faster)

Change-Id: I3f364221d1ec35a8aac0d2c8b0e427f527d12e43
2017-01-19 16:55:52 +00:00
David Barker 0b04e9b8b1 Bring highbd loop restoration filters in line with lowbd ones
* Use the same function for domaintxfmrf in both highbd and lowbd
  cases
* Move an assertion out of a loop in
  apply_selfguided_restoration_highbd, to match the lowbd case

No change to output, but a decoder speed improvement of ~3.5%
(roughly independent of bitrate) with loop-restoration on a
10bpp sample.

Change-Id: I970a3bb8f1c6b0ac60aa4a6fe4e7f54d1e6c1452
2017-01-19 14:34:15 +00:00
David Barker 1e8e6b9572 Miscellaneous cleaning up for loop-restoration
* Change Wiener filter storage to match the format expected
  by the convolve functions

Change-Id: I4d1fb08a13cfc31e69e12c1cb4b2e510c6d8ae30
2017-01-19 14:33:32 +00:00
Thomas Davies f77d4ad3c7 EC_ADAPT: add per tile contexts.
This will support adapting in each tile.

(https://bugs.chromium.org/p/aomedia/issues/detail?id=71)

Change-Id: I3eced47715749a48f78c4ccf151c4d0b58f36c0d
2017-01-19 14:24:56 +00:00
Jingning Han 71bf3eec3f Offset default probs in wrapped_motion
Change-Id: I2e39d2f23c8bb18878597e198b5ba7f98f07ecef
2017-01-19 05:31:32 +00:00