1473 Commits

Author SHA1 Message Date
Jingning Han
f59bf76eef Merge "Take out skip_recode speed feature" into nextgenv2 2016-06-08 21:46:55 +00:00
Jingning Han
cedf90a9d6 Merge "Remove swap buffer speed feature" into nextgenv2 2016-06-08 19:45:54 +00:00
Jingning Han
68cd946994 Add MIN_TX_SIZE definition
Change-Id: I399d601d40827ac383a6687cbeaec59e9a9c63e4
2016-06-08 11:29:02 -07:00
Jingning Han
025fa11c75 Take out skip_recode speed feature
The assumption doesn't hold true in the current codebase. Remove
this speed feature to simplify the codebase.

Change-Id: I9b69f484c9b7cd612b825047cc5b2fce63ee0af7
2016-06-08 18:27:36 +00:00
Jingning Han
0d6980d7a1 Remove swap buffer speed feature
The inter prediction residual can undergo different transform types
during the rate-distortion optimization search. The assumption used
in this speed feature no longer holds true. This commit removes the
related code to clean up the codebase and clear out unit test
failure in higher speed setting.

Change-Id: I7f7cd4df2345ed3e607c9fae75b38cd2dbde0cac
2016-06-08 11:27:00 -07:00
Jingning Han
b48eb90023 Merge "Add tx type speed feature to recursive transform block partitioning" into nextgenv2 2016-06-07 23:44:01 +00:00
Jingning Han
0b7f864213 Merge "Rework the tx type speed feature" into nextgenv2 2016-06-07 23:42:43 +00:00
Zoe Liu
ba61de387b Merge "Fix a RD performance bug in bipredictive frames" into nextgenv2 2016-06-07 21:34:56 +00:00
Debargha Mukherjee
31da10b41f Merge "Pick up top left mbmi for supertx decode." into nextgenv2 2016-06-07 20:23:44 +00:00
Debargha Mukherjee
ac232300a2 Merge "Zero segment counter before accumulating." into nextgenv2 2016-06-07 20:23:20 +00:00
Jingning Han
33dafdb58b Add tx type speed feature to recursive transform block partitioning
Change-Id: I45440a72b4287d98cbe21b72defc67138a8eb953
2016-06-07 11:34:30 -07:00
Geza Lore
6279d1293d Pick up top left mbmi for supertx decode.
This ensures using the correct segment_id downstream in
reconstruct_inter_block.

Change-Id: Ia8b6ec60de51fa2e26c326d3c537abb18aea75ae
2016-06-07 19:34:11 +01:00
Jingning Han
9a858e868c Rework the tx type speed feature
This commit re-works the transform type speed feature. It moves
the transform type selection outside of the coding mode loop. This
avoids repeated motion search if the best prediction mode is
chosen as NEWMV. It improves the speed performance for clips that
contain more motion activities.

For mobile_cif at 1000 kbps, this makes the baseline encoding 7%
faster and makes the encoding with dynamic motion vector referencing
scheme enabled 10% faster.

Change-Id: I93e2714b3e461303372c4b66a4134ee212faffd1
2016-06-07 11:32:27 -07:00
Zoe Liu
5414abb4a0 Fix a RD performance bug in bipredictive frames
This patch will make sure the use of the BWDREF_FRAME for the
encoding of both the two types of bipredictive frames, namely
LAST_BIPRED_UPDATE and BIPRED_UPDATE. To realize it, the
updates on the cpi->ref_frame_flags have been moved to before
the encoding of one frame, instread of originally handled after
the encoding of one frame.

RD performance has been improved slightly, approximately by 0.17%
compared to before the applying of this patch:

lowres: Avg -3.474; BDRate -3.324
derflr: Avg -2.097; BDRate -1.353

Change-Id: I0aa19afd752293e345489fbff104c4351ca5498c
2016-06-07 09:45:10 -07:00
Geza Lore
f304d5c8e7 Zero segment counter before accumulating.
The segment counts are computed as part of packing the bitstream,
so they might have been computed already in the recode loop. Zero
the accumulator to avoid double counting.

This fixes some encoder/decoder mismatches.

Change-Id: Ib7816034cbbb1db41101116b706302b02fad3a2c
2016-06-07 17:02:03 +01:00
Debargha Mukherjee
d3180b8b97 Merge "Fix build failure happened in reconinter.c" into nextgenv2 2016-06-07 14:22:25 +00:00
Debargha Mukherjee
13155e7725 Merge "Optimize wedge partition selection." into nextgenv2 2016-06-07 09:50:13 +00:00
Debargha Mukherjee
24a04f9048 Merge "Fix decoder crash with supertx" into nextgenv2 2016-06-07 09:46:48 +00:00
Aamir Anis
99d9a8fe30 Updated loop restoration
1. Wiener restoration filter now has normalization and evaluation of
quantization procedure.
2. Corrected scaling of bits in RD cost computation.
3. Changed dynamic range and number of bits for Wiener filter.
Observed gains: Overall 0.58% for low_res, 0.7% for mid_res sequences.

Change-Id: I8928b3ea493bfe1790926b00388d6c4bafc08e19
2016-06-06 15:49:52 -07:00
Angie Chiang
2250c6b07b Fix build failure happened in reconinter.c
Change-Id: Ifd5ed91e4e91238fb53a202c8d76c11fbb9ccf7c
2016-06-06 14:41:14 -07:00
Debargha Mukherjee
c2ebd0e6da Merge "Move range checks into WRAPLOW" 2016-06-06 16:28:24 +00:00
Jingning Han
3713949b6d Merge "Make ref-mv experiment support ActiveMap" into nextgenv2 2016-06-06 16:06:41 +00:00
Geza Lore
efda2831e5 Optimize wedge partition selection.
We can optimize wedge partition selection by pre-computing the
residuals of the 2 underlying predictors, and then blend these
to compute the sse of the compound predictor, without actually
having to compute and subtract the compound predictor.

Similarly we can pre-compute a proxy array which we can use to
cheaply check which mask sign would have lower sse.

Details are in wedge_utils.c.

Mathematically these are equivalence transformations, but due to the
finite precision the encoder output will be perturbed, though on
average this should make 0% difference.

ext-inter gains about ~4.5% speedup.

Change-Id: Ib2657c3209ae161b4090b58b4b6c392641bf2792
2016-06-06 14:43:10 +01:00
Geza Lore
6c4306c27d Fix decoder crash with supertx
xd->plane[0].n4_h and xd->plane[0].n4_w are not set at that point
when using supertx.

While this fixes the immediate crash described in the referenced
bug report, there are still issues in the ref-mv experiment that
causes these tests to fail, so they are kept disabled.

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

Change-Id: Ibf8ef02847a903f8d10e6be28e16694db10c75af
2016-06-06 09:58:11 +01:00
Debargha Mukherjee
b85d0adadf Merge "Always include the cost of tx size in rate for Y." into nextgenv2 2016-06-03 22:57:17 +00:00
Debargha Mukherjee
33c57e6223 Merge "Check if sub8x8 rd stats are valid before reusing them." into nextgenv2 2016-06-03 22:38:56 +00:00
Debargha Mukherjee
fc61d92bf8 Merge "Compute rate of partition type accurately for edge blocks." into nextgenv2 2016-06-03 22:37:33 +00:00
Jingning Han
27d8a948c1 Make ref-mv experiment support ActiveMap
Reset the ref_mv_idx and predicted motion vector when the coding
block belongs to skip segment.

Change-Id: I5746ab315a436b829b64a1a25121989d3c11c995
2016-06-03 15:04:18 -07:00
Geza Lore
b87078d51e Always include the cost of tx size in rate for Y.
The transform can only be skipped if both Y and U/V can be skipped, so
we always include the cost of tx size in the rate for Y. This will
get later subtracted if the transform is actually skipped.

Change-Id: I136a223e5596f18b69bb9f743e7e08438183a215
2016-06-03 11:51:35 -07:00
Geza Lore
d9870c32a9 Check if sub8x8 rd stats are valid before reusing them.
Change-Id: I5d49f15a07de58c226d4003b4691e001abf1f3f8
2016-06-03 11:47:34 -07:00
Debargha Mukherjee
aa90983696 Move range checks into WRAPLOW
Provides more comprehensive coverage for --enable-coefficient-checking.
The intent is to make the --enable-coefficient-checking option
consistent with the VP9 spec.

Change-Id: I12d0120756d17572ca2b2d7e6a2ab9d8071d8d58
2016-06-03 11:27:33 -07:00
Geza Lore
8ee640f979 Compute cost of UV mode accurately for intra blocks.
We used to cache the cost of the UV mode from the search with a
different previously tried Y mode, but the UV mode is contexted
on the Y mode, so caching the cost is inaccurate.

Change-Id: Ib003510afb6fc9befb7808b67b0be64f1c0a0804
2016-06-03 11:13:51 -07:00
Geza Lore
1354c6942c Compute rate of partition type accurately for edge blocks.
This patch factors in the different partition coding syntax used for
right and bottom edge blocks when doing RD search.

Change-Id: I2f31650512b6a4a7a2c03352414693aff6fbf87b
2016-06-03 06:43:34 -07:00
Debargha Mukherjee
1e160ce559 Merge "Factor out model_rd_from_sse" into nextgenv2 2016-06-03 13:27:22 +00:00
Debargha Mukherjee
cbf51c5ba0 Merge "Pre-compute and use contiguous wedge masks." into nextgenv2 2016-06-03 13:27:02 +00:00
Geza Lore
73bc3119be Factor out model_rd_from_sse
Change-Id: Ia60ff0ecc8d083870fadbfe07d494d1e2c080489
2016-06-03 09:34:55 +01:00
Geza Lore
ab29978e9f Pre-compute and use contiguous wedge masks.
This is purely a refactoring patch and has no functional effect.

Uses of these masks can be arranged such that all input blocks are
contiguous in memory (stride == block width). In this case 1D versions
of  operations can be used. 1D vector operations have superior performance
over 2D block equivalents as they are more processor cache friendly and
they can do away with a second loop overhead.

Change-Id: I2b76c9888aea2c857cc497e8a4b2841fd3dad54e
2016-06-03 00:16:22 -07:00
Debargha Mukherjee
17c4f1c7f5 Merge "Use standard rounding in combine_interintra." into nextgenv2 2016-06-02 19:29:16 +00:00
Debargha Mukherjee
7534a15c3a Merge "Warped motion functions added" into nextgenv2 2016-06-02 19:28:03 +00:00
Geza Lore
888e90e823 Use standard rounding in combine_interintra.
Use the same rounding method that is used throughout the codebase,
where the halfway value is rounded up rather than down.

Change-Id: I04e92850bc69a7d7a07b06e3d2ce97f6f2ada321
2016-06-02 16:26:05 +01:00
Alex Converse
380c4ee32d Merge "segmentation: Don't use uninitialized probability data." into nextgenv2 2016-06-01 17:50:37 +00:00
Alex Converse
6bae20ca43 Merge "Replace some vpxbool calls with entropy coder agnostic calls." into nextgenv2 2016-05-31 23:58:00 +00:00
Alex Converse
7a6cb59dbb segmentation: Don't use uninitialized probability data.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1224

Change-Id: I17b76fcf0d8c191850350d5aa50dcc007b8b0cdc
2016-05-31 16:42:29 -07:00
Alex Converse
aee0091161 Replace some vpxbool calls with entropy coder agnostic calls.
Change-Id: Ifbcd0714fcf994c43b69255185456c7a255df66c
2016-05-31 15:42:19 -07:00
Debargha Mukherjee
faf3c2cd38 Warped motion functions added
Change-Id: I5064ef1421e17c3ecafe70e7ff1fc7db0c16cc8f
2016-05-31 14:03:23 -07:00
hui su
fa933553da ext-intra: speed up keyframe encoding
130% speed increase for keyframe encoding, with 0.4%
compression loss.

When kf-max-dist=150, 1.5% speed increase with 0.03%
compression loss.

Change-Id: I4cf7314ab95b9eb6dd17f314aca8955522c82676
2016-05-31 10:34:44 -07:00
hui su
f523d7b540 Add a speed feature for inter tx type search
Seperate prediction mode and tx type search for inter
modes. Enabled for speed >=1.

baseline:
speed increase     40%
compression drop   0.30%/0.29% on lowres/midres

ext-tx:
speed increase    160%
compression drop  1.08%/0.95% on lowres/midres

Change-Id: Ieb34b1ee80df6980d16e26a5783e08cc0deae55b
2016-05-31 10:34:35 -07:00
hui su
38e6dd71bb Add a speed feature for intra tx type search
Add a speed feature to seperate prediction mode and tx type search
for intra modes: search for best intra prediction mode with fixed
default tx type first, then choose the best tx type for the
selected mode.

Coding performance drop:
baseline
  lowres 0.10% midres 0.08% hdres 0.14%
with ext-tx
  lowres 0.14% midres 0.25% hdres 0.20%

Speed improvement is 20% for baseline and 17% for ext-tx.

It is turned on for speed >= 1.

Change-Id: Ia5e8d39e8a4e2e42c521bfde938f8b6a98ab24f9
2016-05-31 10:33:56 -07:00
Zoe Liu
e89ca180c2 Make the bi-predictive frame group interval adjustable
This is for the bidir-pred experiment. Previously the length of the
bi-predictive frame group interval is fixed at 2, i.e. one
bi-predictive frame may be inserted every other frame. This patch
makes the length adjustable, i.e. any positive number may be
specified, but the use of the backward ref will be turned off if the
bi-predictive frame group interval is larger than the golden frame
group.

Further, an additional rate factor level has been added:
INTER_LOW
, which applies to LAST_BIPRED_UPDATE frames that are not used as
references.

Change-Id: I5514d34a64dd486bbb5756c2d0612946f598a789
2016-05-28 16:46:45 -07:00
Hui Su
6fd7f7dd3e Merge "ext-intra: refactor mode info. writing and reading" into nextgenv2 2016-05-28 04:34:59 +00:00