454 Commits

Author SHA1 Message Date
Debargha Mukherjee
e5de2ad632 Wedge refactoring to handle signs better
Mostly refactoring. Handles signs better though results are
more or less neutral.

Change-Id: If499537c8f8da4f34d104ebfda072eb4c85fb12f
2016-05-20 14:12:52 -07:00
Yaowu Xu
a9fc1cc257 Fix a build issue
When both obmc and dual_filter is enabled.

Change-Id: I56b127573a6cca31469bb357cf7a6a9c3df64071
2016-05-19 14:24:41 -07:00
Yue Chen
a33e3d12cb Merge "Fix obmc + ext-interp interference" into nextgenv2 2016-05-19 18:08:52 +00:00
Geza Lore
009bd1153e Fix obmc + ext-interp interference
With ext-interp, a switchable interpolation filter is coded iff the
motion vector uses fractional pixel movement (ie, true subpixel
movement). With ext-interp and obmc enabled at the same time, the RD
search proceeds as:
1. Do motion search
2. Do interpolation filter search iff subpixel motion, otherwise use
   EIGHTTAP_REGULAR
3. Evaluate obmc=0
4. Evaluete obmc=1 - This involves another motion search

If the motion search in step 4 yields an integer motion vector, while
the search in step 1 did not, then an interp_filter value other than
EIGHTTAP_REGULAR is invalid, and will cause an assertion failure
at output time, or a mismatch if not using --enable-debug.

The fix sets the interp_filter to EIGHTTAP_REGULAR if obmc=1 is picked
with an integer motion vector.

Change-Id: I4685d1ad537f41d833dc9eb64845956b67886cca
2016-05-19 11:30:07 +01:00
Debargha Mukherjee
f1ddf6eb04 Merge "Reducing computation of interintra modes" into nextgenv2 2016-05-18 17:21:15 +00:00
Debargha Mukherjee
049dbe7786 Reducing computation of interintra modes
Use model for interintra mode search.
Speed-up about 5-10% with about 0.04 drop in efficiency.

lowres: -2.60%

Change-Id: I825bf0ba8a46eb7f19fc528c25b8df066fb8ea95
2016-05-17 07:28:06 -07:00
James Zern
a81a75184c Merge "vp10/rdopt,rd_pick_intra4x4block: port tsan fix from vp9" into nextgenv2 2016-05-17 03:04:00 +00:00
James Zern
8eba4ac46e vp10/rdopt,rd_pick_intra4x4block: port tsan fix from vp9
minus the non-existent nonrd portion. original change:

commit d642294b1c57a5adacb1038ff45766c38bae8a6d
Author: Jingning Han <jingning@google.com>
Date:   Thu Feb 11 12:36:49 2016 -0800

    Fix tsan error in VP9 sub8x8 intra mode search

    This commit fixes issue 1141. The issue was triggered in multi-tile
    encoding. The change properly saves and restores the block context
    information in the real-time mode selection process. It removes
    several redundant memcpy operations in sub8x8 intra block mode
    search.

    Change-Id: I35c9ad197f4bd500ec39b5fc833f052f19eee010

Change-Id: Idfa38c54c9e645479f6870d46f71fb1e91c071da
2016-05-16 17:20:29 -07:00
Jingning Han
4677e1a718 Unify the per directional filter type system for compound modes
For the current stage, we assume a single prediction filter type
per direction in the settings of compound inter prediction modes.

Change-Id: I12a1afdd364b93fcee870bd11ad01fc40ab48cff
2016-05-16 14:41:08 -07:00
Jingning Han
d567e14e81 Enable per motion component filter type selection
Change-Id: I73823fc94f296d225dece7156de71b30bae3fcb7
2016-05-16 14:38:43 -07:00
Debargha Mukherjee
fb8ea1736b Various wedge enhancements
Increases number of wedges for smaller block and removes
wedge coding mode for blocks larger than 32x32.

Also adds various other enhancements for subsequent experimentation,
including adding provision for multiple smoothing functions
(though one is used currently), adds a speed feature that decides
the sign for interinter wedges using a fast mechanism, and refactors
wedge representations.

lowres: -2.651% BDRATE

Most of the gain is due to increase in codebook size for 8x8 - 16x16.

Change-Id: I50669f558c8d0d45e5a6f70aca4385a185b58b5b
2016-05-16 12:41:47 -07:00
Geza Lore
c1b739014f Cost wedge sign/index properly in rdopt.
Lowres improves by about 0.1%

lowres: -2.164 BDRATE

Change-Id: I393bbb92700bfbb8763ace424f4edc2d672a74b4
2016-05-11 11:59:10 -07:00
Yue Chen
372e12b959 Merge "Add single motion search for OBMC predictor" into nextgenv2 2016-05-11 17:20:32 +00:00
Yue Chen
370f203a40 Add single motion search for OBMC predictor
Weighted single motion search is implemented for obmc predictor.
When NEWMV mode is used, to determine the MV for the current block,
we run weighted motion search to compare the weighted prediction
with (source - weighted prediction using neighbors' MVs), in which
the distortion is the actual prediction error of obmc prediction.

Coding gain: 0.404/0.425/0.366 for lowres/midres/hdres
Speed impact: +14% encoding time
              (obmc w/o mv search 13%-> obmc w/ mv search 27%)

Change-Id: Id7ad3fc6ba295b23d9c53c8a16a4ac1677ad835c
2016-05-10 18:27:45 -07:00
Debargha Mukherjee
3fbe6e5e49 Merge "Wedge rd improvements" into nextgenv2 2016-05-10 20:34:00 +00:00
Debargha Mukherjee
447032eb32 Wedge rd improvements
Improves speed by about 10-15% by combining y-only rd with
modeling function in a better way.
Also, coding efficiency improves by about 0.1%

lowres: -1.805% BDRATE with ext-inter

Change-Id: I6ef1f8942ec6806252f3fcf749ae4f30dffe42b1
2016-05-10 11:47:48 -07:00
Geza Lore
9ab9438fbb Break tile row dependencies.
When not using ext-tile, there were still dependencies between tile
rows due to various tools (eg intra predictors) relying on the above
row or above mode info, which can be in the above tile. This is now
broken (the same way as it was when ext-tile is enabled) by fixing
the appropriate predicates.

Change-Id: I107dd0d8481775a792f14e05cfbbd761f16cdc1e
2016-05-10 13:09:47 +01:00
Sarah Parker
f546383b73 Edit ext-tx so it isn't doing redundant prunes
The original pruning function was not taking into account
that certain tx sizes/block sizes use a reduced tx set.

Prune 1: -0.3% performance drop, 20% speedup on foreman video
Prune 2: -0.48% perfomance drop, 30% speedup on foreman video

Change-Id: I557e919d97a89f787b47b3c8579a080db57f91d0
2016-05-09 13:35:42 -07:00
Jingning Han
bd33326372 Dual prediction filter type for motion compensated reference
Make the bit-stream level support per direction filter type coding
for motion compensated reference.

Change-Id: I61a2360b301075f6734cfd9711b7ae68f214174d
2016-05-07 03:03:04 +00:00
Yaowu Xu
71d4e444c1 Merge "Change initializations of variables with type "int_mv"" into nextgenv2 2016-05-06 20:21:39 +00:00
Yaowu Xu
824a8b228d Change initializations of variables with type "int_mv"
This is to make MSVC happy and eliminate build errors.

Change-Id: Ic81e7c7516923913e6e7a652b691953e4a1af8aa
2016-05-06 16:52:12 +00:00
Alex Converse
130cccba8d Rename pick_filter_intra.
The word 'pick' is usually used in functions that make decisions where
the bitstream allows multiple legal choices, and not to limit the
bitstream format itself.

Change-Id: Ia60709c29e004475e1aa8861aefded27ebaf4712
2016-05-05 17:06:54 -07:00
Sarah Parker
9dfe45a84d Merge "Add 1D tx set that corresponds to reduced ext tx inter sets" into nextgenv2 2016-05-05 23:06:14 +00:00
Jingning Han
cf51217148 Remove a redundant variable definition from sub8x8 RD loop
Change-Id: I464cbb75fbd3872f66ca024dd803605542a9d887
2016-05-05 12:41:05 -07:00
Sarah Parker
3da61efe3b Add 1D tx set that corresponds to reduced ext tx inter sets
This is the set of 1D transforms that are used in each
ext_tx_used_inter set. The 1D sets will help speed up
the ext tx pruning functions.

Change-Id: Ib46ad26be2df60b3bfcd2f22d96e7f38ae286df5
2016-05-04 11:42:32 -07:00
Debargha Mukherjee
3407785536 Refactoring and uv fix for wedge
lowres: -1.72%

Change-Id: I4c883097caac72fab8e01945454579891617145e
2016-05-03 08:02:08 -07:00
Debargha Mukherjee
88fe7871be Refactor wedge generation
Change-Id: I2ec4f562e28a4673477e20186f9d6167b24b76b8
2016-04-28 17:51:21 -07:00
Debargha Mukherjee
7ff7943455 Brings back near-near compound mode into ext-inter
lowres: improves by 0.1%

Change-Id: I245019916bf47c6e24bc8c3953b86715ab0193c9
2016-04-28 11:34:13 -07:00
hui su
6e39af3697 ext-intra: completely remove floating point operations
No performance changes

Change-Id: Ia489041253423ddf8ebc7e2d41fbfb9e138109f0
2016-04-27 12:08:38 -07:00
Geza Lore
264d5c446e Fix compound mv costing for ref-mv.
I believe this is necessary for computing the correct rate,
when not doing joint_motion_search.

Change-Id: I7634d6d7a5e6f0a6998edb4d577dd047d80df3c8
2016-04-27 13:37:29 +01:00
Geza Lore
d29ec48504 Initialize dummy variables.
Valgrind flags these up as needed by handle_inter_mode.
Initializing fixes some assertion failures in the unit tests with
only ref-mv enabled.

Change-Id: I4d56c356692745dbecd9f790cdbb8dbfbaf72d55
2016-04-27 13:35:12 +01:00
Yue Chen
02e941d371 Merge "Remove double counting for mv costs" into nextgenv2 2016-04-26 21:40:13 +00:00
Yue Chen
34177e673d Remove double counting for mv costs
The bug is introduced by commit 1a0352d, in which mv costs are
counted twice in joint_motion_search() in ext_inter experiment.

Change-Id: Ibace453df999d3c2e781d73f1f0912038fee2d4e
2016-04-26 13:01:52 -07:00
Hui Su
3f7a709676 Merge "ext-intra: get rid of some floating operations." into nextgenv2 2016-04-26 18:53:33 +00:00
Hui Su
1e93a3e64e Merge "Keep track of zcoeff_blk in tx size/type search" into nextgenv2 2016-04-26 16:41:50 +00:00
hui su
ad50c226e6 ext-intra: get rid of some floating operations.
No performance changes.

Change-Id: Idd4043090fec09e57520bc970ed2e39e6f7e1a5e
2016-04-25 14:44:42 -07:00
Geza Lore
23c4116ebb Clear X87 register state before using double.
MMX and X87 floating point instructions cannot be mixed freely on
the 32 bit x86 architecture.

This fixes a lot of unit tests in the 32bit build with
--enable-ext-intra.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1196

Change-Id: I0e1c3565f4b9cb4fc2d716e94d9c40e68b36fac8
2016-04-25 10:30:20 -07:00
James Zern
0aa6435c45 vp10/rdopt: quiet unused variable warning
when CONFIG_REF_MV and CONFIG_EXT_INTER are enabled

Change-Id: I17fa2b5fe0e1878333099cc5fa2b1ee36636b4d3
2016-04-23 16:59:45 +00:00
Jingning Han
cdf989adb7 Silence compiler above-boundary warnings
Change-Id: I6d806f92e8d38d5b0b01bc8e0fd97bd8839c84df
2016-04-22 15:49:34 -07:00
Jingning Han
3f6ec144e5 Fix an enc/dec mismatch issue in ext-inter experiment
This commit fixes an encoding decision process issue that could
trigger enc/dec mismatch in the ext-inter experiment.

Change-Id: I6f10d1fd2fd1aa04e51df04c39a65cf72ac66c42
2016-04-22 20:49:29 +00:00
Debargha Mukherjee
53968c3917 Merge "Fix uninitialized blk_skip for VAR TX." into nextgenv2 2016-04-21 19:56:17 +00:00
Jingning Han
1a0352d18e Merge "Handle zero motion vector residual" into nextgenv2 2016-04-19 21:20:08 +00:00
hui su
7dffb43267 Keep track of zcoeff_blk in tx size/type search
Prevent potential problems when per transform block
zero forcing is re-enabled (a To-Do).

Change-Id: I03b0ab2a86d88058441f2ca18994cfd2e6329898
2016-04-19 11:45:11 -07:00
hui su
e43c21112d Enable optimize_b for intra blocks
Coding gain:
lowres  0.05%
midres  0.10%
hdres   0.18%

Change-Id: I508b150c02588f911a8ddddfe73c770f0819fe10
2016-04-19 09:50:45 -07:00
Geza Lore
7aa95be980 Fix uninitialized blk_skip for VAR TX.
x->blk_skip used to be uninitialized (leftover from encoding the
previous block), if cm->tx_mode != TX_MODE_SELECT (which is used with
higher --cpu-used or --rt options). This resulted in degraded coding
performance when using cm->tx_mode != TX_MODE_SELECT.

This fixes the VP10/EndToEndTestLarge.EndtoEndPSNRTest/40 unit test.

Also fixed an edge effect where encode_block in encodemb.c used the
formal width of the block (without cropping at the right edge), to
look up blk_skip, while select_tx_block in rdopt.c used the cropped
width to set blk_skip.

Change-Id: I76d0f49ac5ab3ab54203573e0d7fcfcc1c6aa10d
2016-04-19 17:00:20 +01:00
Geza Lore
8d64b53dc8 Revert "Fix uninitialized blk_skip for VAR TX."
This reverts commit e7b89d88354708790211ff3949fdc705a4fa1672.
2016-04-19 15:41:56 +01:00
Geza Lore
e7b89d8835 Fix uninitialized blk_skip for VAR TX.
x->blk_skip used to be uninitialzied (leftover from encoding the
previous block), if cm->tx_mode != TX_MODE_SELECT (which is used with
higher --cpu-used or --rt options). This resulted in degraded coding
performance when uning cm->tx_mode != TX_MODE_SELECT.

This fixes the VP10/EndToEndTestLarge.EndtoEndPSNRTest/40 unit test.

Change-Id: If39062927446798c626fc93694b4e6a4f35fa5da
2016-04-19 14:22:48 +01:00
Jingning Han
ec2ffda599 Handle zero motion vector residual
This commit handles the zero motion vector residuals for single
and compound reference modes, respectively. It improves the coding
performance by 0.13% with no additional encoding complexity.

Change-Id: I16075a836025bd2746da2ff4698fb9261e4b08c1
2016-04-18 18:14:01 -07:00
Jingning Han
2aa6117bda Refactor transform selection process
This commit re-arranges the transform type and size selectio
process. It removes an unnecessary rate-distortion cost computation
step. Local experiments show that this speeds up the encoding
process by 6% for both the baseline and the ext-intra experiment.

Change-Id: Iab3b86a63a1e9e55548466791ed5d29a0575c1e7
2016-04-18 19:45:56 +00:00
Jingning Han
c5449d3eb7 Merge "Refactor rd_variance_adjustment function" into nextgenv2 2016-04-18 19:45:45 +00:00