platform/upstream/libvpx.git
6 years agoMerge "Add temporal model control as a speed feature"
Jingning Han [Thu, 14 Jun 2018 23:06:14 +0000 (23:06 +0000)]
Merge "Add temporal model control as a speed feature"

6 years agoAdd temporal model control as a speed feature
Jingning Han [Thu, 14 Jun 2018 17:04:03 +0000 (10:04 -0700)]
Add temporal model control as a speed feature

The model construction would incur 15% slowdown for speed 2. The
speed change on speed 0 is unnoticeable.

The current speed features set up would DISABLE temporal dependency
model for all speed settings.

Change-Id: Ic45dd962f3a54a8f5f0452502dc05e352dc09ca1

6 years agoAdd data structure for frame dependent mode decision
Jingning Han [Mon, 21 May 2018 16:31:13 +0000 (09:31 -0700)]
Add data structure for frame dependent mode decision

Add block and frame level data structures to support frame
dependent mode decision.

Change-Id: I996fc84155fcba8e2ec2a114bb0799d6aa5539dd

6 years agoMerge "Unify frame_index in defining GF group structure"
Zoe Liu [Thu, 14 Jun 2018 16:18:51 +0000 (16:18 +0000)]
Merge "Unify frame_index in defining GF group structure"

6 years agoMerge changes I51776f0e,I843f3b34
Luc Trudeau [Thu, 14 Jun 2018 16:13:02 +0000 (16:13 +0000)]
Merge changes I51776f0e,I843f3b34

* changes:
  [VSX] Optimize PROCESS16 macro
  VSX Version of SAD8xN

6 years agoMerge "vp8: remove assertion in tree coder."
Jerome Jiang [Thu, 14 Jun 2018 06:56:40 +0000 (06:56 +0000)]
Merge "vp8: remove assertion in tree coder."

6 years ago[VSX] Optimize PROCESS16 macro
Luc Trudeau [Wed, 13 Jun 2018 19:24:54 +0000 (15:24 -0400)]
[VSX] Optimize PROCESS16 macro

The PROCESS16 macro now uses 8-bit lanes instead of 16-bit lanes.

SADTest Speed Test (POWER8 Model 2.1)
16x8  Old VSX time = 16.7 ms, new VSX time = 9.1 ms [1.8x]
16x16 Old VSX time = 15.7 ms, new VSX time = 7.9 ms [2.0x]
16x32 Old VSX time = 14.4 ms, new VSX time = 7.2 ms [2.0x]
32x16 Old VSX time = 14.0 ms, new VSX time = 7.4 ms [1.9x]
32x32 Old VSX time = 13.4 ms, new VSX time = 6.5 ms [2.0x]
32x64 Old VSX time = 12.7 ms, new VSX time = 6.3 ms [2.0x]
64x32 Old VSX time = 12.6 ms, new VSX time = 6.3 ms [2.0x]
64x64 Old VSX time = 12.7 ms, new VSX time = 6.2 ms [2.0x]

Change-Id: I51776f0e428162e78edde8eac47f30ffd2379873

6 years agoUnify frame_index in defining GF group structure
Zoe Liu [Thu, 14 Jun 2018 00:33:57 +0000 (17:33 -0700)]
Unify frame_index in defining GF group structure

Following are completed in defining GF group structure in firstpass:
1. Remove redundant alt_frame_index;
2. Remove hard coded index value with the variable of frame_index.

Change-Id: I7b56e454559bbf704afc7410ea9832b20ffcd57e

6 years agovp8: remove assertion in tree coder.
Jerome Jiang [Wed, 13 Jun 2018 19:55:17 +0000 (12:55 -0700)]
vp8: remove assertion in tree coder.

Cast the counter to uint64_t in case it overflows.

The assert was to prevent c[0] * Pfac being overflow beyong unsigned int
since Pfac could be 2^8. Thus c[0] needs to be smaller than 2^24.

In VP9, the assert was removed and c[0] was casted to uint64_t.

Bug: 805277
Change-Id: Ic46a3c5b4af2f267de4e32c1518b64e8d6e9d856

6 years agoVSX Version of SAD8xN
Luc Trudeau [Wed, 13 Jun 2018 17:39:04 +0000 (13:39 -0400)]
VSX Version of SAD8xN

VSX versions of the SAD functions of width 8.

SADTest Speed Test (POWER8 Model 2.1)
8x4  C time = 68.7 ms (±0.3 ms), VSX time = 31.8 ms (±0.1 ms) [2.2x]
8x8  C time = 55.6 ms (±0.3 ms), VSX time = 18.3 ms (±0.1 ms) [3.0x]
8x16 C time = 46.5 ms (±0.1 ms), VSX time = 15.6 ms (±0.1 ms) [3.0x]

Change-Id: I843f3b34e103b72deeade4a939193d8b53cee460

6 years agoAdd Speed Tests for the SADTest test suite.
Luc Trudeau [Wed, 13 Jun 2018 17:36:17 +0000 (13:36 -0400)]
Add Speed Tests for the SADTest test suite.

Speed tests are added for the SADTest test suite. These test use the
AbstractBench and print the median run time of SAD operations. Speed
tests are disabled by default.

Change-Id: I5d0957248f9b5b307ae2d757d5f8d4761a1dd712

6 years agoMerge "Fix avx512 related MSVC build failure."
Tom Finegan [Wed, 13 Jun 2018 17:50:39 +0000 (17:50 +0000)]
Merge "Fix avx512 related MSVC build failure."

6 years agoMerge "Remove duplicate vp9_twopass_postencode_update def"
Jingning Han [Wed, 13 Jun 2018 17:32:12 +0000 (17:32 +0000)]
Merge "Remove duplicate vp9_twopass_postencode_update def"

6 years agoFix avx512 related MSVC build failure.
Tom Finegan [Wed, 13 Jun 2018 16:39:28 +0000 (09:39 -0700)]
Fix avx512 related MSVC build failure.

Check GCC specific AVX512 flags only when GCC is enabled.

Change-Id: I15dc2a0dbf8bce37f4364fedfd34a0a34882104b

6 years agoRemove duplicate vp9_twopass_postencode_update def
Jingning Han [Tue, 12 Jun 2018 20:46:43 +0000 (13:46 -0700)]
Remove duplicate vp9_twopass_postencode_update def

Change-Id: I370f37c85a02c032a8ba266b9b9445ee38eb0756

6 years agoMerge "vp9 svc: Denoise golden when it's a temporal ref."
Marco Paniconi [Tue, 12 Jun 2018 05:40:32 +0000 (05:40 +0000)]
Merge "vp9 svc: Denoise golden when it's a temporal ref."

6 years agovp9 svc: Denoise golden when it's a temporal ref.
Jerome Jiang [Mon, 11 Jun 2018 18:05:36 +0000 (11:05 -0700)]
vp9 svc: Denoise golden when it's a temporal ref.

When golden was the inter-layer reference, a block that selected the golden ref
would not be denoised.
But when golden is used as a second temporal reference then we should denoise
blocks that select the golden reference.
This changes allows for that.

Change-Id: Ifdea2ac88f6a74f73520fedcd7fec2f32c559ec9

6 years agoVSX Version of vp9_quantize_fp_32x32
Luc Trudeau [Sat, 9 Jun 2018 02:53:30 +0000 (22:53 -0400)]
VSX Version of vp9_quantize_fp_32x32

Low bit depth version only. Passes the VP9QuantizeTest test suite.

VP9QuantizeTest Speed Test (POWER8 Model 2.1)
32x32 C time = 93.1 ms (±0.4 ms), VSX time = 6.5 ms (±0.2 ms) [14.4x]

Change-Id: I7f1fd0fc987af86baf2b74147a25aee811289112

6 years agoVSX Version of vp9_quantize_fp
Luc Trudeau [Thu, 7 Jun 2018 19:30:23 +0000 (15:30 -0400)]
VSX Version of vp9_quantize_fp

Low bit depth version only. Passes the VP9QuantizeTest test suite.

VP9QuantizeTest Speed Test (POWER8 Model 2.1)
 4x4  C time = 86.3 ms (±0.7 ms), VSX time = 18.2 ms (±0.0 ms) [ 4.7x]
 8x8  C time = 57.7 ms (±0.3 ms), VSX time =  7.6 ms (±0.0 ms) [ 7.6x]
16x16 C time = 50.7 ms (±0.1 ms), VSX time =  4.9 ms (±0.0 ms) [10.3x]

Change-Id: Ic09bc786c57cc89bba14624064216b52996075eb

6 years agoMerge "Small speedup of ml_pruning_partition()"
Hui Su [Mon, 11 Jun 2018 18:07:18 +0000 (18:07 +0000)]
Merge "Small speedup of ml_pruning_partition()"

6 years agoMerge "vp9-svc: Fix to frames_since_golden update for SVC."
Marco Paniconi [Mon, 11 Jun 2018 16:54:43 +0000 (16:54 +0000)]
Merge "vp9-svc: Fix to frames_since_golden update for SVC."

6 years agoMerge "vp9 svc: clean up first_spatial_layer_to_encode."
Jerome Jiang [Mon, 11 Jun 2018 16:43:44 +0000 (16:43 +0000)]
Merge "vp9 svc: clean up first_spatial_layer_to_encode."

6 years agovp9-svc: Fix to frames_since_golden update for SVC.
Marco Paniconi [Thu, 7 Jun 2018 23:35:44 +0000 (16:35 -0700)]
vp9-svc: Fix to frames_since_golden update for SVC.

When the second (gf) temporal reference is used in SVC:
the reference is refreshed on base TL superframes, and so
the rc->frames_since_golden counter was also only updated on
base TL frames. But this was disabling the golden reference
from being used as a temporal reference for TL > 0 frames
(since frames_since_golden was 0/not updated on TL > 0 frames).

Fix is to copy the update of rc->frames_since_golden to all
upper temporal layers. This allows TL > 0 frames to test the
golden inter mode.

Gain on RTC set: ~2%, ~8% on desktop_vga clip.
Encode time increase ~5-8% on linux, 3SL-3TL run with 1 thread.

For now keep this off for TL > 0 frames in speed features, so
this change does not change current behavior for speed >= 7.

Change-Id: I405708f3f80039ae47bd64ec53e66f92160acd9e

6 years agovp9 svc: clean up first_spatial_layer_to_encode.
Jerome Jiang [Fri, 8 Jun 2018 17:53:34 +0000 (10:53 -0700)]
vp9 svc: clean up first_spatial_layer_to_encode.

Change-Id: I3c9aefd3ea5028797b9105d7e49b1cb2f762a9fc

6 years agoSmall speedup of ml_pruning_partition()
Hui Su [Fri, 8 Jun 2018 20:41:05 +0000 (13:41 -0700)]
Small speedup of ml_pruning_partition()

Terminate early and skip neural net model when linear score is already
high enough, which indicates that we should not skip split and
rectangular partitions.

No changes on compression; encoding speed improves slightly.

Change-Id: I4e0995090200eb4889344da905d2f7048673af5f

6 years agoMerge "vp9_subtract_test,cosmetics: fix class order, casts"
James Zern [Fri, 8 Jun 2018 17:44:43 +0000 (17:44 +0000)]
Merge "vp9_subtract_test,cosmetics: fix class order, casts"

6 years agoMerge "Localize variable scope in vp9_rc_get_second_pass_params()"
Jingning Han [Fri, 8 Jun 2018 17:18:33 +0000 (17:18 +0000)]
Merge "Localize variable scope in vp9_rc_get_second_pass_params()"

6 years agoMerge "Add avx512 compile test."
Tom Finegan [Fri, 8 Jun 2018 15:11:13 +0000 (15:11 +0000)]
Merge "Add avx512 compile test."

6 years agovp9_subtract_test,cosmetics: fix class order, casts
James Zern [Fri, 8 Jun 2018 06:19:50 +0000 (23:19 -0700)]
vp9_subtract_test,cosmetics: fix class order, casts

+ remove obsolete FIXME

Change-Id: I97ceb94b0e7860167e9c8cc6900bec8d155f0e8f

6 years agoMerge changes I89ce12b6,Id91b52d6,Icd7d4453
James Zern [Fri, 8 Jun 2018 06:15:24 +0000 (06:15 +0000)]
Merge changes I89ce12b6,Id91b52d6,Icd7d4453

* changes:
  Implement subtract_block for VSX
  Cast bsize as int to print a meaninful debug info
  Speed test for subtract_block

6 years agovp9-svc: Adjust some logic on gf temporal reference.
Marco Paniconi [Thu, 7 Jun 2018 22:07:57 +0000 (15:07 -0700)]
vp9-svc: Adjust some logic on gf temporal reference.

For the feature of using second temporal reference (when
inter-layer is off): move the buffer_idx assignement and
refresh flag settings further down to vp9_rc_get_svc_params(),
since is_key_frame is set there for every frame/layer.
Otherwise it was using the setting from the previous frame/layer.

This makes the refresh more consistent for both layers for
2 spatial layers case.

Small/negligible change in metrics.

Change-Id: I88279243bc27898448e8891dba38143d936cf6d5

6 years agoImplement subtract_block for VSX
Luca Barbato [Wed, 6 Jun 2018 21:10:18 +0000 (21:10 +0000)]
Implement subtract_block for VSX

~2x speedup or better.

[ RUN      ] C/VP9SubtractBlockTest.Speed/0
[    BENCH ]      4x4  365.1 ms ( ±2.2 ms )
[    BENCH ]      8x4  258.5 ms ( ±0.3 ms )
[    BENCH ]      4x8  202.7 ms ( ±0.2 ms )
[    BENCH ]      8x8  162.2 ms ( ±0.5 ms )
[    BENCH ]     16x8  138.8 ms ( ±0.3 ms )
[    BENCH ]     8x16  121.5 ms ( ±0.4 ms )
[    BENCH ]    16x16  110.2 ms ( ±0.5 ms )
[    BENCH ]    32x16  104.8 ms ( ±0.1 ms )
[    BENCH ]    16x32  32.7 ms ( ±0.1 ms )
[    BENCH ]    32x32  30.0 ms ( ±0.0 ms )
[    BENCH ]    64x32  28.7 ms ( ±0.0 ms )
[    BENCH ]    32x64  20.1 ms ( ±0.0 ms )
[    BENCH ]    64x64  19.3 ms ( ±0.0 ms )

[ RUN      ] VSX/VP9SubtractBlockTest.Speed/0
[    BENCH ]      4x4  155.3 ms ( ±0.9 ms )
[    BENCH ]      8x4  99.3 ms ( ±0.4 ms )
[    BENCH ]      4x8  77.2 ms ( ±0.1 ms )
[    BENCH ]      8x8  45.7 ms ( ±0.0 ms )
[    BENCH ]     16x8  34.1 ms ( ±0.0 ms )
[    BENCH ]     8x16  29.5 ms ( ±0.0 ms )
[    BENCH ]    16x16  19.9 ms ( ±0.0 ms )
[    BENCH ]    32x16  15.1 ms ( ±0.0 ms )
[    BENCH ]    16x32  16.7 ms ( ±0.0 ms )
[    BENCH ]    32x32  14.1 ms ( ±0.0 ms )
[    BENCH ]    64x32  12.6 ms ( ±0.0 ms )
[    BENCH ]    32x64  12.0 ms ( ±0.0 ms )
[    BENCH ]    64x64  11.2 ms ( ±0.0 ms )

Change-Id: I89ce12b6475871dc9e8fde84d0b6fe5c420c28c7

6 years agoCast bsize as int to print a meaninful debug info
Luca Barbato [Wed, 6 Jun 2018 22:49:39 +0000 (22:49 +0000)]
Cast bsize as int to print a meaninful debug info

cout helpfully decides to print the bsize value as non-printable char
otherwise.

Change-Id: Id91b52d6475ae9f869365468d1d56d94b2e10ecb

6 years agoSpeed test for subtract_block
Luca Barbato [Wed, 6 Jun 2018 22:16:28 +0000 (22:16 +0000)]
Speed test for subtract_block

Change-Id: Icd7d4453f0ee699635a2a1d484d24cba71d748de

6 years agoAdd avx512 compile test.
Tom Finegan [Thu, 7 Jun 2018 19:35:05 +0000 (12:35 -0700)]
Add avx512 compile test.

Some compiler releases allow the -mavx512f arg without actually
implementing support. Test for this situation, and disable avx512
when it is detected by configure.

BUG=webm:1536

Change-Id: I63952153bb4b24aa9f25267ed47a0fe845d61f8b

6 years agovp9 svc: add control to set using second temporal ref.
Jerome Jiang [Thu, 7 Jun 2018 06:02:26 +0000 (23:02 -0700)]
vp9 svc: add control to set using second temporal ref.

Bump up ABI version.

Change-Id: I4498d7ea4ed72994c5f847aa98e75b0150dd7f82

6 years agovp9-svc: Allow second temporal reference for next highest layer.
Marco Paniconi [Thu, 7 Jun 2018 17:52:09 +0000 (10:52 -0700)]
vp9-svc: Allow second temporal reference for next highest layer.

When inter-layer prediction is disabled on INTER frames, allow
for next highest resolution to have second temporal reference.
Current code allowed for only top/highest spatial layer.

Change-Id: I102137273e3e4d57512a13d95e8ccb9c5b0a7b4b

6 years agoMerge "VP9 SVC: Write out svc src for all spatial layers."
Marco Paniconi [Thu, 7 Jun 2018 15:57:42 +0000 (15:57 +0000)]
Merge "VP9 SVC: Write out svc src for all spatial layers."

6 years agovp9-svc: Modify choose_partitioning for second temporal ref
Marco Paniconi [Thu, 7 Jun 2018 05:42:38 +0000 (22:42 -0700)]
vp9-svc: Modify choose_partitioning for second temporal ref

For mode where second temporal reference is used in SVC: allow
for using/testing this reference (golden ref) in the variance
partition scheme (choose_partitioning).

Small positive gain (~0.25%) on metrics for 3 layer SVC,
negligible change in speed.

Change-Id: I29b8315da530e60db3d6c90faa8fb178d9f2de26

6 years agoMerge "VP9: fix unsigned integer overflow in decoder."
Jerome Jiang [Thu, 7 Jun 2018 00:02:48 +0000 (00:02 +0000)]
Merge "VP9: fix unsigned integer overflow in decoder."

6 years agoVP9 SVC: Write out svc src for all spatial layers.
Jerome Jiang [Wed, 6 Jun 2018 22:44:01 +0000 (15:44 -0700)]
VP9 SVC: Write out svc src for all spatial layers.

Change-Id: Ie78676e4df75f3f870ee2de0c87a8167b7ec68e0

6 years agovp9-svc: Enable use of second temporal reference for SVC.
Marco Paniconi [Wed, 6 Jun 2018 22:16:14 +0000 (15:16 -0700)]
vp9-svc: Enable use of second temporal reference for SVC.

When inter-layer is disabled on INTER frames, this will allow
use of a second (longer term) temporal reference for SVC.

Only enabled on highest resolution spatial layer.

Average gains of ~4% on RTC set, speed decrease of about ~2%.

Change-Id: I3c2d415653c448eb7269c828e120fe8bb2ef3f97

6 years agovp9-svc: Add a buffer_idx is_used parameter for SVC.
Marco Paniconi [Wed, 6 Jun 2018 19:14:59 +0000 (12:14 -0700)]
vp9-svc: Add a buffer_idx is_used parameter for SVC.

For the case where a second (long term) temoral reference is
used in the SVC: this additional parameter is to make sure the
buffer slot selected for this reference is available for usage,
i.e., it is never used for any of the 3 references set for the
fixed SVC patterns.

And some code cleanup (replace cpi->svc).

No change in behavior.

Change-Id: Icba46edfbbefb94d5ea8e2d5c24cccd85a406ee6

6 years agoLocalize variable scope in vp9_rc_get_second_pass_params()
Jingning Han [Wed, 6 Jun 2018 19:52:45 +0000 (12:52 -0700)]
Localize variable scope in vp9_rc_get_second_pass_params()

Remove unnecessary definitions.

Change-Id: Ie540aaed5f3ed3768eff4e6563455666aef9c9e8

6 years agoVP9: fix unsigned integer overflow in decoder.
Jerome Jiang [Thu, 24 May 2018 21:07:28 +0000 (14:07 -0700)]
VP9: fix unsigned integer overflow in decoder.

The difference of two size_t variables.

Change-Id: I73f35cdafc2ba64a9ddaf855cc6a410cfb63b8da

6 years agovp9: Move up reset of cyclic refresh under dynamic resize.
Jerome Jiang [Tue, 5 Jun 2018 22:21:29 +0000 (15:21 -0700)]
vp9: Move up reset of cyclic refresh under dynamic resize.

When resize happens and cyclic refresh is not applied on the
current (resized) frame, the sb_index is not reset and then
might be out of boundary on future frames when the
cyclic refresh is applied.

Change-Id: I05282fc4bc2323522d60e019ed0790d69221a2f7

6 years agoMerge changes I3ba75c45,I97d26285
James Zern [Wed, 6 Jun 2018 04:54:41 +0000 (04:54 +0000)]
Merge changes I3ba75c45,I97d26285

* changes:
  force-inline the convolve functions
  Unbreak the force inline directive for gcc

6 years agoforce-inline the convolve functions
Luca Barbato [Fri, 25 May 2018 20:22:42 +0000 (22:22 +0200)]
force-inline the convolve functions

Change-Id: I3ba75c459ed7c9591b7892e9f8f108146c04507d

6 years agoMerge "vp9-svc: Allow usage of second (long term) temporal reference."
Marco Paniconi [Tue, 5 Jun 2018 03:24:52 +0000 (03:24 +0000)]
Merge "vp9-svc: Allow usage of second (long term) temporal reference."

6 years agotest,cosmetics: fix func/member naming, decl order
James Zern [Sat, 2 Jun 2018 06:22:48 +0000 (23:22 -0700)]
test,cosmetics: fix func/member naming, decl order

functions: upper camelcase
members: lowercase with trailing '_'
decl order: functions (overrides marked virtual), members

after:
656e8ac61 VSX version of vpx_post_proc_down_and_across_mb_row
766d875b9 VSX version of vpx_mbpost_proc_ip
35e98a70b VSX version of vpx_mbpost_proc_down
b2898a9ad Bench Class For More Robust Speed Tests

Change-Id: Ib257bd607c5c1248d30e619ec9e8a47cc629825b

6 years agovp9-svc: Allow usage of second (long term) temporal reference.
Jerome Jiang [Fri, 1 Jun 2018 21:27:34 +0000 (14:27 -0700)]
vp9-svc: Allow usage of second (long term) temporal reference.

Allow for second temporal reference for top spatial layer in SVC,
when inter-layer prediction is disabled on INTER frames.
The second temporal reference is labelled as the golden reference
and the update/refresh of this reference buffer is only on base
temporal layer superframes. For now the period of refresh is
fixed at every 20 TL0 superframes.

Average gain is ~4% on RTC set, several clips up
by ~8-12%. Speed loss is about ~2% on mac.

Feature is disabled as default for now.

Change-Id: I2e5db5052c62dbe958a3b14be97d043823b7a529

6 years agoUnbreak the force inline directive for gcc
Luca Barbato [Mon, 28 May 2018 14:11:17 +0000 (16:11 +0200)]
Unbreak the force inline directive for gcc

Change-Id: I97d26285ec146628cbafd3573ca812c630c6687d

6 years agoMerge "VP9: exclude speed 9 from VBR datarate tests."
Jerome Jiang [Fri, 1 Jun 2018 23:04:35 +0000 (23:04 +0000)]
Merge "VP9: exclude speed 9 from VBR datarate tests."

6 years agoVP9: exclude speed 9 from VBR datarate tests.
Jerome Jiang [Fri, 1 Jun 2018 18:36:39 +0000 (11:36 -0700)]
VP9: exclude speed 9 from VBR datarate tests.

Change-Id: I4c4d31d013cb45e20918f4ef83ce32811d76e02b

6 years agoMerge "VP9: Allow for bilinear subpel interp at speed 9 for high motion."
Jerome Jiang [Thu, 31 May 2018 23:00:32 +0000 (23:00 +0000)]
Merge "VP9: Allow for bilinear subpel interp at speed 9 for high motion."

6 years agoMerge "vp9-svc: Fix to some frame metrics for real-time mode."
Marco Paniconi [Thu, 31 May 2018 22:22:57 +0000 (22:22 +0000)]
Merge "vp9-svc: Fix to some frame metrics for real-time mode."

6 years agoVP9: Allow for bilinear subpel interp at speed 9 for high motion.
Jerome Jiang [Wed, 23 May 2018 18:52:37 +0000 (11:52 -0700)]
VP9: Allow for bilinear subpel interp at speed 9 for high motion.

Fixed some settings in nonrd pick mode to allow for frame-level bilinear
to be set.
On Galaxy S8+ it has 4% speed up on high motion clips. Almost the same
for low motion.

0.17% quality loss on RTC.

Change-Id: I044a7de020183754ba08bb6c96c5a78ba5c7fea2

6 years agoMerge "Improve the ML based partition pruning"
Hui Su [Thu, 31 May 2018 21:04:40 +0000 (21:04 +0000)]
Merge "Improve the ML based partition pruning"

6 years agovp9-svc: Fix to some frame metrics for real-time mode.
Marco Paniconi [Thu, 31 May 2018 16:59:15 +0000 (09:59 -0700)]
vp9-svc: Fix to some frame metrics for real-time mode.

Add condition of LAST frame to the consec_zeromv and
avg_frame_low_motion metrics. This is needed for SVC as
the golden reference is a spatial reference and should
not be included in the metric computation.

Small/negligible change in metrics on RTC set.

Change-Id: I6ea16298fae566bb288c34cf50d120b509146eee

6 years agoVSX version of vpx_post_proc_down_and_across_mb_row
Luc Trudeau [Wed, 30 May 2018 02:08:18 +0000 (22:08 -0400)]
VSX version of vpx_post_proc_down_and_across_mb_row

Low bit depth version only. Passes the VpxPostProcDownAndAcrossMbRowTest

VpxMbPostProcAcrossIpTest Speed Test (POWER8 Model 2.1)
C time = 121.3 ms (±4.0 ms), VSX time = 9.4 ms (±0.3 ms) [12.9x]

Change-Id: I28300779e197ea3855cf30867d17a2805388b447

6 years agoImprove the ML based partition pruning
Hui Su [Mon, 14 May 2018 21:35:25 +0000 (14:35 -0700)]
Improve the ML based partition pruning

Add a neural net model that uses the same features as the existing
linear model. Make the pruning decision based on both the linear
and the neural net model. It provides more accurate predictions,
and may improve compression and/or encoding speed.

This only affects speed 0.

Coding gain:
0.37% on midres
0.34% on hdres
0.50% on jvet8b720p

Encoding speed impact(average over locally tested 20 clips from midres
and hdres):
QP=20: down by 2.5%.
QP=30: down by 3.9%.
QP=40: donw by 4.5%.
QP=50:   up by 5.2%.

Change-Id: I402ec799745ad3b74abf0789fa5e124fe64e704d

6 years agoMerge "vp9-svc: Fix to compute some metrics on top spatiail layer."
Marco Paniconi [Thu, 31 May 2018 05:44:05 +0000 (05:44 +0000)]
Merge "vp9-svc: Fix to compute some metrics on top spatiail layer."

6 years agoMerge "libs.mk: expose libvpx.{ver,syms} in all configs"
James Zern [Thu, 31 May 2018 04:01:02 +0000 (04:01 +0000)]
Merge "libs.mk: expose libvpx.{ver,syms} in all configs"

6 years agovp9-svc: Fix to compute some metrics on top spatiail layer.
Marco Paniconi [Wed, 30 May 2018 23:01:53 +0000 (16:01 -0700)]
vp9-svc: Fix to compute some metrics on top spatiail layer.

The avg_frame_low_motion and consec_zeromv are frame-level
metrics that are updated on every frame. For SVC these should be
updated on top spatial layer (full resolution).

Small/negligible change in metrics.

Change-Id: Ibe14f05be3b82daa9dd60378097ff11a27f1b95e

6 years agovp9: Refactor code for q adjustment in CBR mode.
Marco Paniconi [Wed, 30 May 2018 20:55:28 +0000 (13:55 -0700)]
vp9: Refactor code for q adjustment in CBR mode.

Move the adjustment code to separate function.
Change-Id: I876b246a5c26095f262bb9a19f03d1f17077225d

6 years agoMerge "Revert 3 slide show coding changes"
James Zern [Wed, 30 May 2018 21:25:55 +0000 (21:25 +0000)]
Merge "Revert 3 slide show coding changes"

6 years agoRevert 3 slide show coding changes
James Zern [Tue, 29 May 2018 23:38:46 +0000 (16:38 -0700)]
Revert 3 slide show coding changes

This is a combination of the following 3 reverts. The changes cause
issues on certain hardware devices. We'll pull them for now to allow for
further investigation.

Revert "Experiment regarding playback problems on Bravia TVs."

This reverts commit 624f8105f5ae7e0bc82bdc7e10a4253295134a8b.

Revert "Improved slide show coding"

This reverts commit f4091bc30eef0fcacb5d5bd74ab7cfbc3c8aab5f.

Revert "Improved coding on slide show content."

This reverts commit 2fa333c2ae1b6fcc1864de12a7ad344a16e2ac0a.

BUG=b/77492144

Change-Id: Ifba937792d644a9286307262f050216408e8ecf4

6 years agotiny_ssim: fix for odd image sizes.
Jim Bankoski [Tue, 29 May 2018 22:23:48 +0000 (15:23 -0700)]
tiny_ssim: fix for odd image sizes.

Change-Id: I7dd1e37c5de3efccc07fcdc877653d4873a88266

6 years agoMerge "vp9-svc: Add frame dropper control to sample encoder."
Marco Paniconi [Wed, 30 May 2018 03:24:57 +0000 (03:24 +0000)]
Merge "vp9-svc: Add frame dropper control to sample encoder."

6 years agovp9-svc: Add frame dropper control to sample encoder.
Marco Paniconi [Tue, 29 May 2018 22:50:00 +0000 (15:50 -0700)]
vp9-svc: Add frame dropper control to sample encoder.

Disabled as default as enc_cfg.rc_dropframe_thresh is
set to 0 as default.

Change-Id: Ia888aa16b1a86a716ec33ea041e8b16b19bf93be

6 years agoMerge "vp9: Adjust cyclic refresh and limit frame-level q."
Marco Paniconi [Wed, 30 May 2018 02:25:17 +0000 (02:25 +0000)]
Merge "vp9: Adjust cyclic refresh and limit frame-level q."

6 years agolibs.mk: expose libvpx.{ver,syms} in all configs
James Zern [Wed, 30 May 2018 01:21:01 +0000 (18:21 -0700)]
libs.mk: expose libvpx.{ver,syms} in all configs

this allows the targets to be used explicitly in builds configured with
--enable-external-build

Change-Id: Id7db309a39a73cfd8f15f74430b17b317c0a847f

6 years agovp9: Adjust cyclic refresh and limit frame-level q.
Marco Paniconi [Tue, 29 May 2018 04:08:57 +0000 (21:08 -0700)]
vp9: Adjust cyclic refresh and limit frame-level q.

For CBR mode with aq-mode=3: reduce delta-q for second
segment and limit how much the frame-level q can decreae
from one frame to the next.

Reduces bitrate spikes in slide/sreen content.

Change-Id: Id9ac4b7270f07e09690380755cfbef4aec5c26dc

6 years agoVSX version of vpx_mbpost_proc_ip
Luc Trudeau [Mon, 28 May 2018 19:04:57 +0000 (15:04 -0400)]
VSX version of vpx_mbpost_proc_ip

Low bit depth version only. Passes the VpxMbPostProcAcrossIpTest.

VpxMbPostProcAcrossIpTest Speed Test (POWER8 Model 2.1)
C time = 188.5ms (±0.2ms), VSX time = 65.2ms (±0.1ms) [2.9x]

Change-Id: I1cf72365d94a9d7f1e9323925a87a30e3bd5cfe2

6 years agoVSX version of vpx_mbpost_proc_down
Luc Trudeau [Fri, 18 May 2018 17:38:48 +0000 (13:38 -0400)]
VSX version of vpx_mbpost_proc_down

Low bit depth version only. Passes the VpxMbPostProcDownTest.

VpxMbPostProcDownTest Speed Test (POWER8 Model 2.1)
Full calculations:
C time = 195.4 ms, VSX time = 33.7 ms (5.8x)

Change-Id: If1aca7c135de036a1ab7923c0d1e6733bfe27ef7

6 years agoBench Class For More Robust Speed Tests
Luc Trudeau [Tue, 22 May 2018 18:16:15 +0000 (14:16 -0400)]
Bench Class For More Robust Speed Tests

To make speed testing more robust, the AbstractBench runs the
desired code multiple times and report the median run time with
mean absolute deviation around the median.

To use the AbstractBench, simply add it as a parent to your test
class, and implement the run() method (with the code you want to
benchmark).

Sample output for VP9QuantizeTest

  [    BENCH ]      Bypass calculations       4x4  165.8 ms ( ±1.0 ms )
  [    BENCH ]        Full calculations       4x4  165.8 ms ( ±0.9 ms )
  [    BENCH ]      Bypass calculations       8x8  129.7 ms ( ±0.9 ms )
  [    BENCH ]        Full calculations       8x8  130.3 ms ( ±1.4 ms )
  [    BENCH ]      Bypass calculations     16x16  110.3 ms ( ±1.4 ms )
  [    BENCH ]        Full calculations     16x16  110.1 ms ( ±0.9 ms )

Change-Id: I1dd649754cb8c4c621eee2728198ea6a555f38b3

6 years agovp9-realtime: Move frame dropper to after scene detection.
Marco Paniconi [Sat, 26 May 2018 04:51:33 +0000 (21:51 -0700)]
vp9-realtime: Move frame dropper to after scene detection.

Move frame dropper to after scene detection and noise estimation.
Scene detection and noise estimation operate on source data and
update metrics along sequence, so they should be moved before
the frame dropper.

Also we don't want to drop on scene change, as the scene detection
and (possible) re-encode step will be missed.

Change-Id: I3d9e16d785bd5ace6707db2abce77ddc110bfef4

6 years agovp9-svc: Fix to allowed value of max_consec_drop.
Marco Paniconi [Tue, 29 May 2018 02:32:01 +0000 (19:32 -0700)]
vp9-svc: Fix to allowed value of max_consec_drop.

For the max_consec_drop parameter in svc frame drop:
since passing value 0 in the control would completely
disable the dropper, only allow for values >= 1 to be set.

Change-Id: I6b74ec9cc08a638fa571d6246a021dab9c811d14

6 years agoMerge "VP8: Fix use-after-free in postproc."
Jerome Jiang [Fri, 25 May 2018 17:48:28 +0000 (17:48 +0000)]
Merge "VP8: Fix use-after-free in postproc."

6 years agoVP8: Fix use-after-free in postproc.
Jerome Jiang [Wed, 23 May 2018 22:43:00 +0000 (15:43 -0700)]
VP8: Fix use-after-free in postproc.

The pointer in vp8 postproc refers to show_frame_mi which is only
updated on show frame. However, when there is a no-show frame which also
changes the size (thus new frame buffers allocated), show_frame_mi is
not updated with new frame buffer memory.

Change the pointer in postproc to mi which is always updated.

Bug: 842265
Change-Id: I33874f2112b39f74562cba528432b5f239e6a7bd

6 years agoMerge "VP9: Fix issues with high bitdepth in real-time."
Marco Paniconi [Fri, 25 May 2018 15:50:19 +0000 (15:50 +0000)]
Merge "VP9: Fix issues with high bitdepth in real-time."

6 years agoVP9: Fix issues with high bitdepth in real-time.
Jerome Jiang [Thu, 24 May 2018 21:03:43 +0000 (14:03 -0700)]
VP9: Fix issues with high bitdepth in real-time.

Disable denoiser, skin detection and aq-mode for high bitdepth for now.

BUG=webm:1534

Change-Id: I361a4e20b2319041148af497bf7043bfd5c5f589

6 years agovp9-svc: Add max_consec_drop to SVC frame drop.
Marco Paniconi [Thu, 24 May 2018 18:13:36 +0000 (11:13 -0700)]
vp9-svc: Add max_consec_drop to SVC frame drop.

For any spatial, limits the amount of consecutive frame drop.

Change-Id: I692d90363f329f571f2b59e12cc680ad2e76065d

6 years agovp9: Rate control adjustments for screen content.
Marco Paniconi [Wed, 23 May 2018 21:51:00 +0000 (14:51 -0700)]
vp9: Rate control adjustments for screen content.

For screen content mode: changes to reduce occurence of
significant QP decrease (from one frame to next),
which can cause large frames (overshoot/delay).
-cap the buffer increase to optimal level for frame drop
mode where full superframe can drop
-reduce the max_adjustment_down due to buffer overflow
-reduce qp threshold to trigger re-encode on large frame

Change-Id: I3e30e4814192b5f728abff3f7359eb64f561b8f0

6 years agoMerge "Experiment regarding playback problems on Bravia TVs."
Paul Wilkins [Wed, 23 May 2018 11:03:12 +0000 (11:03 +0000)]
Merge "Experiment regarding playback problems on Bravia TVs."

6 years agovp9-svc: Add full superframe drop mode.
Marco Paniconi [Tue, 22 May 2018 22:02:45 +0000 (15:02 -0700)]
vp9-svc: Add full superframe drop mode.

This will check for dropping full superframe if any
spatial layer is overshooting.

Change-Id: Ic656807028ebef5552301b6d10399fbe3a6c890c

6 years agoMerge "vp9-svc: Small code cleanup in nonrd-pickmode."
Marco Paniconi [Tue, 22 May 2018 02:19:06 +0000 (02:19 +0000)]
Merge "vp9-svc: Small code cleanup in nonrd-pickmode."

6 years agovp9-svc: Small code cleanup in nonrd-pickmode.
Marco Paniconi [Mon, 21 May 2018 22:32:40 +0000 (15:32 -0700)]
vp9-svc: Small code cleanup in nonrd-pickmode.

Rename a flag to indicate it is for the inter_layer reference.

Change-Id: Ib198d3df95fb912259efde854613592c724b7c49

6 years agoremove unused vpx_ports/config.h
James Zern [Mon, 21 May 2018 21:26:08 +0000 (14:26 -0700)]
remove unused vpx_ports/config.h

references were earlier removed in:
1a7d25a48 Replace vpx_ports/config.h with vpx_config.h

Change-Id: I1824cd71e970f5c7550c3978e0c63ce36a9644e4

6 years agoAdd Solaris to supported platforms
Niveditha Rau [Wed, 25 Apr 2018 02:24:48 +0000 (19:24 -0700)]
Add Solaris to supported platforms

Change-Id: Ib49e1d79ba4c1c5d5147ab437f744a31429a059c

6 years agoMerge "configure,ios: add missing c++11 checks"
Johann Koenig [Mon, 21 May 2018 16:24:13 +0000 (16:24 +0000)]
Merge "configure,ios: add missing c++11 checks"

6 years agoMerge "vp9-svc: Fix on disabling inter_layer prediction."
Marco Paniconi [Mon, 21 May 2018 01:10:57 +0000 (01:10 +0000)]
Merge "vp9-svc: Fix on disabling inter_layer prediction."

6 years agovp9-svc: Fix on disabling inter_layer prediction.
Marco Paniconi [Fri, 18 May 2018 22:09:55 +0000 (15:09 -0700)]
vp9-svc: Fix on disabling inter_layer prediction.

In vp9_svc_constrain_inter_layer_pred() we disable the
inter_layer prediction if anything but only the previous
spatial layer (from same supeframe) is used for inter_layer
prediction. This check and disabling was only allowed when
the control VP9E_SET_SVC_INTER_LAYER_PRED is set to
INTER_LAYER_PRED_ON_CONSTRAINED.

But the control VP9E_SET_SVC_INTER_LAYER_PRED is needed for setting:
INTER_LAYER_PRED_ON/INTER_LAYER_PRED_OFF/INTER_LAYER_PRED_OFF_NONKEY.
So there is a conflict with setting INTER_LAYER_PRED_ON_CONSTRAINED.

Fix for now is to always allow for this disabling check
(disable inter_layer reference if its not previous spatial layer) as
long as inter_layer prediction is used (i.e., not set to _OFF).

A separate fix if needed may be to invoke another control for setting
INTER_LAYER_PRED_ON_CONSTRAINED.

This was causing an issue with enabling spatial layers on the fly
(say spatial layer 2), where since INTER_LAYER_PRED_ON_CONSTRAINED was
not set (default), the inter_layer prediction was then using a reference
from 2 spatial layers below (spatial layer 0).

Change-Id: Ic6434000665f63aab27c509b5eb7b8fc965827bc

6 years agovp9-svc: Fix issue with reseting lst_fb_idx.
Marco Paniconi [Fri, 18 May 2018 21:50:46 +0000 (14:50 -0700)]
vp9-svc: Fix issue with reseting lst_fb_idx.

When encoding a given spatial layer and the same spatial layer
on previous superframe was dropped (or disabled due to 0 bitrate),
the lst_fb_idx for current layer is set to the buffer index that
was last updated on TL0 frame (for the same spatial layer).

This condition was to maintain proper temporal prediction pattern
under frame drops, and it should only apply to INTER frames.

But the condition was causing an assert to be triggered on spatial
layers whose base are key frames. Fix is to condition this reset of
lst_fb_idx on the "is_key_frame" flag. Also initialize the
fb_idx_upd_tl0 to -1 and only use it for a given spatial layer
if its been set.

These issues can happen when superframe drop happens just before
a key frame, or when stream starts with lower layers and dynamically
enabled higher spatial layers.

Added datarate unittest the inserts key frame after superframe drop,
and verified that this fix is needed for test to pass.
Also modified the existing DisableEnable spatial layer test to trigger
the issue of using fb_idx_upd_tl0 when it hasn't been set for a
spatial layer.

Change-Id: I059d1135736aca17e1326b9b4a2b16371eb4634e

6 years agoconfigure,ios: add missing c++11 checks
James Zern [Sat, 19 May 2018 07:26:44 +0000 (00:26 -0700)]
configure,ios: add missing c++11 checks

+ bump ios minimum to 7.0; 6.0 does not have full c++11 support

Change-Id: If838b036e7327fda514cd2e8156eeda122cf6c73

6 years agoRevert "Revert "update libwebm""
Johann [Wed, 16 May 2018 05:11:28 +0000 (22:11 -0700)]
Revert "Revert "update libwebm""

This reverts commit d32a55ffc40bba75ed8b770b282836a9d248d6a9.

Use the correct 'check_add_cxxflags' invocation.

Change-Id: I97d8062c9218b81a24268ec5998e847b1a0efeda

6 years agoiosbuild.sh: portable sed usage
Johann [Fri, 18 May 2018 18:32:59 +0000 (11:32 -0700)]
iosbuild.sh: portable sed usage

There is no convenient way to have both gnu and bsd
sed do in-place processing.

Change-Id: I95f2a378d5c1bd95debb446317cc18ad79835e49

6 years agoExperiment regarding playback problems on Bravia TVs.
Paul Wilkins [Fri, 18 May 2018 16:36:30 +0000 (17:36 +0100)]
Experiment regarding playback problems on Bravia TVs.

This patch experimentally reduces the maximum GF interval for
static content such as slide shows.

It does not fully revert the previous slide show patches as this
still allows the codec to code static sections only using GFs
groups rather than ARF groups or a mix of ARF and GF groups.
However, the maximum group length is reduced.

Change-Id: Ia968b608efb9a67d2402b12e979695d58ddc1ad7

6 years agovp9-svc: Skip find_predictors based on ref_frame_flags.
Marco Paniconi [Wed, 16 May 2018 21:52:17 +0000 (14:52 -0700)]
vp9-svc: Skip find_predictors based on ref_frame_flags.

Has some effect for SVC on base spatial layers (which only
reference LAST) or on upper spatial layers when inter_layer
prediction is disabled.

Small speedup on Mac of ~1%, for 3 layer SVC with inter-layer
prediction disabled.

Change-Id: I05be5da8843e0d32e9d85f6eb951cf1894e781d8

6 years agovp0-svc: Small code cleanup in nonrd-pickmode.
Marco Paniconi [Wed, 16 May 2018 19:02:35 +0000 (12:02 -0700)]
vp0-svc: Small code cleanup in nonrd-pickmode.

Change-Id: I0bc9a555064f053a00c1ab9a4dd2557ccf5537d8