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

21244 Коммитов

Автор SHA1 Сообщение Дата
Sarah Parker 345366acce Add macro to disable trellis optimization in rdopt
Turning off the trellis optimization gives a performance
drop of 0.726% on the lowres set.

Change-Id: I4fdd1e20fb6f671162cd32b3abe699cd2aee1919
2017-06-19 14:39:24 +00:00
Di Chen 5658662222 Support two scanning passes for rd_pick_partition.
Reset xd->mi and x->mbmi_ext for the superblock after the first
scanning pass.

Change-Id: Iae9142ff2b1a2b576f54dc545b58fe37c97cecac
2017-06-17 15:10:26 -07:00
Timothy B. Terriberry d62e2a3a11 var_tx: Remove custom distortion calculations.
Although this does not fully convert var-tx to using
av1_block_dist(), it does make it use the same distortion functions
av1_block_dist() uses: pixel_sse() and sum_squares_visible().

Change-Id: I1173bc6941a3b895381b9fcb73b533b5afc31aab
2017-06-17 18:35:37 +00:00
Michael Bebenita bf1f9ee673 Expose image format to the analyzer
Change-Id: I39c014ec58c08e29f60c8e4ea186fc57ac15c56b
2017-06-17 03:35:17 +00:00
Sebastien Alaiwan 79b78b7d47 Clamp inverse transform coefficients
When --enable-coefficient-range-checking isn't specificed, clamp the
coefficient at each stage.

This doesn't change the decoder behaviour for existing AV1 streams.
However, some AV1 bitstreams that would have been rejected by the
decoder as illegal (range check failure) are now legal bitstreams.

There is no impact on video quality.

BUG=aomedia:30

Change-Id: Ifa01186bae6bfe5d7712298e33d964c20f88435e
2017-06-16 23:26:26 +00:00
Fergus Simpson b0157aa638 frame_superres: Use calculate_scaled_size for scale check
Small change to calculate the encode size for scale checking using the
av1_calculate_scaled_size function used elsewhere instead of calculating
it in place. Done for constistency's sake.

Change-Id: I72626b729477e28e868cf9028ea4537267a12413
2017-06-16 22:15:08 +00:00
Fergus Simpson 87cf61b11e scaling: Add kf numerator for resize and superres
Adds a separate scale numerator for resize and superres scaling on
keyframes. They will only use this factor in their respective FIXED
modes.

Change-Id: I4ef9a5760a5423ec632d644e6c7fec674bbb46f4
2017-06-16 22:14:57 +00:00
Timothy B. Terriberry 6d99b21b79 encoder: Fix scale_and_extend_frame() for non-4:2:0
The code to pre-scale reference frames was hardcoded to only work
for 4:2:0. This makes it work for 4:2:2, 4:4:0, and 4:4:4, also.

It also eliminates the special case for a fourth plane, based on the
assert above that the total number of planes is no more than three.

Change-Id: I79870d2d11bfc3b6e2e73c48a9ba679bffab186f
2017-06-16 21:44:15 +00:00
Sarah Parker 3e85f67f34 Make gm refinement step go all the way down to 1
-0.242% gain on cam_lowres

Change-Id: Ib9ba2f7dfc7d10b8066bd3f70eeafa7faac8a607
2017-06-16 19:22:45 +00:00
Fergus Simpson bfbf6a5983 Unify resize and superres denominator constants
RESIZE_SCALE_DENOMINATOR and SUPERRES_SCALE_DENOMINATOR were two
constants with the same value that did essentially the same thing.

This patch merges the two into SCALE_DENOMINATOR for simplicity's sake.

Change-Id: I252a9b7f89f10d77bdb0c3cf2d67d31d337afa4b
2017-06-16 19:21:12 +00:00
Thomas Davies 315f5784dd NEW_MULTISYMBOL: adapt single_ref flags.
Change-Id: I4092f9ca0f5497bffee31ec4a1e9804e90def42e
2017-06-16 19:18:56 +00:00
Thomas Davies 860def604b NEW_MULTISYMBOL: adapt comp_inter_mode.
Change-Id: I2e783a16418708c6403de3c2e84450dbc83df3b7
2017-06-16 19:18:56 +00:00
Thomas Davies 149eda5685 NEW_MULTISYMBOL: adapt inter mode flags.
Old inter_mode coding was obsoleted by REF_MV.

Change-Id: Ib812f626fe9f8e3342eee5d7b0214ed55701bec3
2017-06-16 19:18:56 +00:00
Thomas Davies f6ad935501 NEW_MULTISYMBOL: Adapt intra_inter binary symbol.
Adapt the intra_inter binary syntax element symbol-by-symbol
and remove updates from the compressed header.

Change-Id: I9abfd91d4521202f27854ce3e01b670ce15846e9
2017-06-16 19:18:01 +00:00
Thomas Davies 61e3e372cc NEW_MULTISYMBOL: Adapt skip binary symbol.
Perform symbol-by-symbol adaptation for the skip syntax
element and remove updates from the compressed header.

Change-Id: Ic42f60e19c56db52dd51b3784fd305c7e6b595c7
2017-06-16 19:17:38 +00:00
Thomas Davies 7bfa1432c7 NEW_MULTISYMBOL: make experiment depend on EC_ADAPT.
Simplify the number of different compile and code paths.

Change-Id: Id5b061571daeb070b91ec762fe7e07e8c114229e
2017-06-16 19:16:58 +00:00
Yue Chen d28bdbab29 warped_motion: set correct sample array size
Change-Id: I28e0d2c35c7b1eeb1d5f6eb5d4592ffa96032175
2017-06-16 10:38:03 -07:00
Yi Luo d561eaddeb Add avx2 fast path quantizer 32x32
- User level encoder time reduction ~2.3% on i7-6700.

Change-Id: I04a5cf44c398b295977ff8c8958471a896bfb20d
2017-06-16 16:14:26 +00:00
Ryan Lei 1d1df182ee fix the compile error in Debug mode on Windows with Visual Studio
in debug mode macro expension in assert cause compile error.

BUG=aomedia:605

Change-Id: Ie5c47a8496d043c0ee2e4d0b94cc2cf7ff168e6c
2017-06-16 11:06:33 +02:00
Arild Fuldseth (arilfuld) 1c29a76690 Enable one_sided_compound by default
This tool was temporarly disabled because
it accidentaly triggered bug:

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

This bug was fixed with commit:

6c20c78f4c

Change-Id: I33d8e0ce4f1c5dccef42588c62f4dc15828ce09b
2017-06-16 09:12:57 +02:00
Tom Finegan 871d2ca0d0 Exclude tests of API internals from CMake shared lib builds.
Change-Id: I55919a31f24b206bfd7c06418277cab9b05855ee
2017-06-16 06:56:48 +00:00
Tom Finegan 3613c51767 Sync CMake build with the configure build.
- Added: CONFIG_COLORSPACE_HEADERS CONFIG_SPEED_REFS
         CONFIG_LGT CONFIG_SBL_SYMBOL
- Removed: CONFIG_RECT_INTRA_PRED
- Changed, 0 => 1: CONFIG_EXT_INTER CONFIG_INTERINTRA
                   CONFIG_WEDGE CONFIG_COMPOUND_SEGMENT
           1 => 0: CONFIG_ONE_SIDED_COMPOUND

BUG=aomedia:76

Change-Id: If9ebd068d0014386ec25d91226a577c591f5a774
2017-06-16 06:56:48 +00:00
James Zern 91adea58c1 read_bitdepth...sampling: quiet unused param warning
with --disable-highbitdepth

Change-Id: Ib0dbb842d6634cb4a4d349b651275f230777cb8c
2017-06-15 23:27:26 -07:00
Urvang Joshi 70006e4681 Remove 'rddiv' member from various structs.
This was initialized from a const and never modified. But was still
passed around and stored in multiple structs.

Removed these 'rddiv' member variables and now RDOPT() and RDOPT_DBL()
always use the const RDDIV_BITS directly.

Change-Id: I1a8dfd2c8fa857d466ad1207b4f0dd6ec07eafb8
2017-06-15 20:54:12 +00:00
Sebastien Alaiwan 0b99384644 Simplify FOREACH_STREAM
With C99 we can now declare iterators inside the 'for' statements,
allowing a better syntax for this macro.
This new syntax accepts #if/#endif inside the loop body,
and makes explicit, at loop body level, what the iterator name is.

Change-Id: Icbd363a34a9264ff566ee8057c08a705736b509f
2017-06-15 21:01:58 +02:00
Sebastien Alaiwan 2e5933f58c Cleanup debug trace
Change-Id: I9158a54b80cf76346356e8dba90ee37f80808bf5
2017-06-15 18:51:50 +00:00
Zoe Liu d1ac0321ca Add the new coding tool "speed_refs"
This patch will not cause any performance change regardless of whether
speed_refs is on or off.

This coding tool is targeted to speed up the encoder side reference
frame selection process. The essential idea is to have two scanning
passes for each superblock of size 64x64 and this CL lays out the
initial framework but no reference frame selection is done yet:

First scanning pass - To simplify the partition and the mode
candidates (e.g. considering nearestmv / nearmv / zeromv only) and
identify the best reference frame prediction candidates;

Second scanning pass - Use the best reference frame candidate(s)
obtained from the first pass to encode the current superblock.

Change-Id: I11266d468de3077271a5e866eebd341a8014d136
2017-06-15 18:34:29 +00:00
Sebastien Alaiwan 8b7a4e16cb Fix unit tests with --disable-lowbitdepth
This moves up to the main the decision of which coding path to use,
aligning the decoder's logic on the encoder's logic.

Change-Id: I61c709ca1160aefb156d0be25cab8bb1c20ff92a
2017-06-15 18:27:52 +00:00
David Barker cc8a1bedf8 Remove unused speed feature
The 'intra_y_mode_bsize_mask' speed feature is never set or
checked, so can be deleted from the SPEED_FEATURES structure.

Change-Id: I3094ab7e8e87334e35a6646f6fbf0a8adaf78c00
2017-06-15 16:56:04 +00:00
Alex Converse 7d5559ccc2 intrabc: Fix compatibility with global motion
Change-Id: I64ec8d3b67db10b2d2d1cc130f845baf26d122c2
2017-06-15 16:39:06 +00:00
Ryan 639a9ebacf clean up the logic for generating tile boundary information
the tile boundary info flag was updated for each mi data structure
which starts from cm->mi. there is the second level buffer which
contains the pointer to the mi structure. it starts at
cm->mi_grid_visible. for every coded block, pointer in the second level
buffer only points to the top left mi structure of that particular coded
block. in order to get the correct boundary info for each mi. we have to
access the mi structure from cm->mi instead of cm->mi_grid_visible.
this change doesn't impact the result, it only cleans up the logic.

Change-Id: I8f883a284f600e3075754124b8197d78898a56be
2017-06-15 16:05:06 +00:00
Urvang Joshi 6eb35eb45f optimize_b_greedy: Avoid left shift of negative value.
Before:
-------
accu_error was always <= 0:
- It was initialized to zero, and
- Became more and more negative through the iterations.

This meant that RDOPT() macro usage on accu_error was causing left shift
of negative value.

Now:
----
- accu_error is initialized to a large positive value.
- It becomes smaller on every iteration but remains >= always.

This is functionally equivalent: verified that there's no change in
output due to this patch.

BUG=aomedia:600

Change-Id: I654572a72234c588c8f332d5b66a5587fc6610b4
2017-06-15 15:52:02 +00:00
Arild Fuldseth (arilfuld) 6c20c78f4c Fix a bug in determination of reference_mode
Fix a bug where the encoder sets reference_mode =
COMPOUND_REFERENCE even if the frame contains some
4x4 blocks (but no larger blocks) that are single
reference. This occurs only in corner cases,
typically for very small frame sizes (e.g. 16x8).

BUG=aomedia:575

Change-Id: I5caedaa753a56e9f9b48995c1d2e0a0886aa4366
2017-06-15 13:15:49 +00:00
Debargha Mukherjee 29e40a6529 Unify and clean up resize arguments
Unifies the command line arguments for resize and superes.
Removes resize arguments that are currently unused.

Change-Id: I1362dffceb8257cee539f92679d1e8d79df08e66
2017-06-15 01:58:14 -07:00
Fergus Simpson c4e789426a frame_superres: Add aomenc argument
Adds "superres-mode" and "superres-numerator" arguments to configure
superres scaling.

There are only two modes right now: SUPERRES_FIXED and SUPERRES_DYNAMIC.
0 sets the fixed mode and 1 sets the dynamic mode.

For the fixed mode superres will scale to the provided numerator where
possible. The cumulative scale change over resizing and superres is
limited to 1/2, so it may have to back off.

For the dynamic mode, the provided numerator will be used as the initial
numerator. Asides from that it's just random for now.

Change-Id: Ibae01c77abba2599fbf51096459d09ddca458d4f
2017-06-15 08:51:23 +00:00
anorkin 76fb126526 Experiment: adding the source video information signaling (Netflix)
Change-Id: If93f9e41c25a5885b5927e66a298c129bb844e18
2017-06-14 23:00:14 +00:00
Jingning Han aba246dc9a Integrate level-map with var-tx
Make the level-map and var-tx work together.

Change-Id: I5ff80a3cbc43af64b504934209720f387b89dbd8
2017-06-14 13:31:27 -07:00
Jingning Han e65436b158 Drop tx_size assertion check in var-tx
The inter residuals would assume variable transform block sizes
in var-tx mode.

Change-Id: I51e3632221b3a639afcb0f1b5505625112ca7fa4
2017-06-14 13:31:24 -07:00
Jingning Han 3455e76748 Move iscan fetch behind txb border check
Avoid out of boundary buffer access.

Change-Id: Ia3b360e95963319504fac832bb887ffb2216ea72
2017-06-14 20:30:55 +00:00
Jingning Han 93c3f3db9a Support rectangular tx_size in level-map optimize_b
Validate the provided coefficient location with respect to the
height and width of the transform block size.

Change-Id: Id4f10052141fd914f5aea5ae4202cf35d3e63867
2017-06-14 20:30:38 +00:00
Jingning Han 341d79e1d9 Make level map coding system support rectangular tx_size
This commit makes the level map coding system support the transform
coefficients from rectangular transform block sizes.

Change-Id: I5cd6c71d12e41938f942adc98cc1e1f286336f12
2017-06-14 20:30:26 +00:00
Jingning Han b0f60edf7a Make get_nz_count support rectangular tx_size
Change-Id: I44bea2cda7c57d82a79a906f52c18e188f1fedea
2017-06-14 20:29:23 +00:00
Jingning Han 4cbb363749 Rework get_eob_ctx to support rectangular tx_size
Explicilty use the transform block size to determine the coeff
band array. Remove the assumption on square transform block size.

Change-Id: I18e285130465a5eced49304a27a6cb617e297760
2017-06-14 20:29:00 +00:00
Sebastien Alaiwan 4770189d2b Remove dead macro
Change-Id: I6a582b85f535d2dbeb4b6af46fc45357d56f2f2b
2017-06-14 20:13:39 +00:00
Jingning Han 48be0e19be Support rectangular tx_size in level map coding
Map the rectangular transform block size into the bigger square
transform block size as the context for level map probability
model.

Change-Id: I20cf2b16daec16172855a78a201b670ff0547bf5
2017-06-14 18:55:49 +00:00
Cheng Chen 4fd4c0d16e Fix a bug in loop filter mask
Fix a bug that causes unnecessary filtering on inner 4x4
block boundaries inside a 8x8 transform block.

BUG=aomedia:594

Change-Id: I0b39fdb4fd9a1c1892c8eac547f5d83823fd05c8
2017-06-14 16:19:09 +00:00
Luc Trudeau 803bea2667 [CFL] Fix always use partition size to compute DC_PRED
plane_bsize is now computed properly. This also includes support for the
special case of blocks < 4X4

Results on subset1 (compared to 8e689e4b with CfL)
   PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
-0.0218 | -0.2328 | -0.2555 |  -0.0230 | -0.0379 | -0.0723 |    -0.1205

Change-Id: I6ec87d818d8df6a40ecf3bb1b86954e59c952930
2017-06-14 12:35:16 +00:00
Thomas Davies b732c1eae1 GLOBAL_MOTION: simplify parameter coding.
Remove deprecated tree coding for the global motion type.
Encoding with literals costs at most 0.8 bit per frame or
tile group for the identity type, and saves bits for other
types.

AWCY (objective-1-fast): PSNR +0.02%, PSNR-HVS/MSSSIM +0.03%.

Change-Id: I421a39fd8f830b2e40d105ea3c3688099a2b6d15
2017-06-14 10:10:00 +00:00
Ryan Lei 1eb55ffc45 integrate parallel_deblocking with var_tx experiment
this change added the support for var_tx in the parallel deblocking
experiment. the mainc change is the way to get actual transform
size for every MI from internal tx size table of the mbmi structure.

Change-Id: I225f3a95b1def15d6389d572927156720e487e11
2017-06-14 00:04:32 +00:00
Yi Luo 2d44b69727 Add fast path quantizer AVX2
- Function level improves 36% against sse2.
- Encoder speeds up 2.6% at user level on i7-6700.

Change-Id: I9e43ce60b1e0de8f532249e5c035851463d75dbb
2017-06-13 14:08:03 -07:00