Commit Graph

18243 Commits

Author SHA1 Message Date
Johann
95a71057f0 autodetect macOS High Sierra
Add darwin17 target

Change-Id: I349a2f6a0396c59269f567a03ae813e3e59ccefa
2018-03-12 14:54:48 -07:00
Johann Koenig
7b5a57449b Merge "vp8 temporal_filter: ignore return value" 2018-03-12 20:56:30 +00:00
Johann
025b138679 vp8 temporal_filter: ignore return value
Clears up static clang analysis warning regarding a dead store.

Change-Id: I6a90e6fd5f2775d933c46c7553811635bd2def21
2018-03-12 19:52:11 +00:00
Marco Paniconi
312745cac4 vp9-svc: Update layer frame counters when layer is skipped.
When an enhancement spatial layer is skipped, we should check
for updating the layer frame counters.

Change-Id: Ib79d0955c62fb465f59ef2f9ac45240ae2614d7b
2018-03-12 12:21:10 -07:00
Marco Paniconi
3223a3f892 vp9-SVC: Fix to choose_partition when LAST ref is NULL.
This causes assert to trigger in choose_partitioning().
This can happen in some cases when enhancement layers
are enabled midway during the stream.

Change-Id: I69c3c8b4b1e3f1c7d8d7294d633ca5ddca148e8b
2018-03-12 09:13:25 -07:00
James Zern
c12398fe81 Merge "vpx_scale_test: add w/h output to alloc failure" 2018-03-08 21:13:09 +00:00
Paul Wilkins
7987f35391 Merge "Change to KF frame boost calculation." 2018-03-08 13:34:15 +00:00
James Zern
6ed4c253a9 vpx_scale_test: add w/h output to alloc failure
Change-Id: Ib5df91d9fcd7fe973a2f7d8e73a204259beddc07
2018-03-07 23:07:51 -08:00
James Zern
0bee6de332 Merge changes If96fd6f1,I84b27337
* changes:
  Fix a bug in vp9_iht16x16_256_add_neon()
  Fix a bug in vp9_iht8x8_64_add_neon()
2018-03-08 03:41:27 +00:00
Johann
7195a2eaa4 add worst-case frame size cap
The largest frame is currently in choose_partitioning:
warning: stack frame size of 44156 bytes in function 'choose_partitioning'

but adding HBD amplifies other things:
warning: stack frame size of 51480 bytes in function 'dec_build_inter_predictors'

Add some padding for sanitizer and variances between compilers.

BUG=webm:1498

Change-Id: I0d94d4f94d25dafafca9d7484881c2ce5f8de371
2018-03-05 20:09:43 -08:00
Linfeng Zhang
d18477b449 Fix a bug in vp9_iht16x16_256_add_neon()
This bug was introduced in 88c23864.

BUG=webm:1403

Change-Id: If96fd6f102be6b9bda866e55e574257287746f4a
2018-03-05 16:14:35 -08:00
Linfeng Zhang
c244a86234 Fix a bug in vp9_iht8x8_64_add_neon()
This bug was introduced in b14b616d.

BUG=webm:1403

Change-Id: I84b2733734982e52b66548850d61758c772b5494
2018-03-05 15:33:37 -08:00
Johann
e0b88b5c00 move vp8 encodeopt to block_error_sse2
The file contains sse2 implementations related to various block error
functions. Update the .mk file to include it only when sse2 is
requested.

BUG=webm:1500

Change-Id: I67b766faed425fd7a96db8541b13c69670b65fec
2018-03-04 12:38:07 -08:00
James Zern
c6fcb9bb94 disable vp9_highbd_iht{4x4_16,8x8_64}_add_neon
these causes test vector failures

BUG=webm:1403

Change-Id: I08218f0bf26651eb367ece4feec6d704e0189bd8
2018-03-03 14:14:30 -08:00
James Zern
0685ec767c disable vp9_iht8x8_64_add_neon
this causes test vector failures

BUG=webm:1403

Change-Id: I7d37a05fbf4641ea352c947053aa4eaeb7f5c318
2018-03-03 14:14:12 -08:00
James Zern
ac07cc89f1 disable vp9_iht16x16_256_add_neon
this causes test vector failures

BUG=webm:1403

Change-Id: Ifdb5b270c5cc70be5689e4fbda2ada3724cc65c3
2018-03-03 12:58:24 -08:00
Marco Paniconi
5ac63d15dc vp9-svc: Disable partition_reuse unless 2x2 scale.
For SVC, if any of the layer scale ratios are not
2x2, then disable the partiton_reuse, which assumes
2x2 scaling between layers.

Change-Id: I8b3163de0826052bbb1bfe03554a074c89510558
2018-03-02 10:56:16 -08:00
Marco Paniconi
4d8958d8dd vp9-svc: Fix to downsampling filter phase_shift.
Set phase_shift = 0 if the scale factors are
above 3/4. Removes artifact for scale factors
close to 1.

phase_shift = 8 is to get an averaging filter
(decimated pixel aligns to 8/16, midway between source pixels),
and only makes sense for scale factors multiples of
2 (1/2, 1/4,...).

Removes artifact for high scaling ratios.

Change-Id: Id0a85869d6c6156dda0032c697ded2de78fad6bd
2018-03-02 08:55:18 -08:00
James Zern
6cc33c1626 iadst16x16_256_add_half1d: fix array size
t[] is indexed from 0..11

Change-Id: I7d0021f1795c6608354c8770843ea9dfdea66f97
2018-02-28 23:49:39 -08:00
paulwilkins
29fbddec83 Change to KF frame boost calculation.
This change is targeted mainly at higher resolutions where typically
the average error per MB is much smaller.  hence this patch replaces
a fixed error per MB factor with a tiered value.

It also adds in a fixed offset value that acts as a minimum return score.

Note also minor fix to debug stats output.

The results are overall beneficial (-ve) on our test sets, most notably for
higher definition formats (see below - overall psnr, ssim, psnr hvs)

low res:    0.184	-0.262	-0.166
mid res:   0.094	  0.075	  0.049
hd res:    -0.752	-0.300	-0.800
NF 2K:    -0.353	 1.095	-0.302
NF 4K:    -1.245	-0.578	-1.205

The most notable negative case is pierseaside 2K which appears to be worse by
8-10% (which has a big impact on the overall gain for the NF 2K set). Closer
inspection reveals that the drop does not relate to the key frame boost
per se as in both cases the key frame substantially undershoots its target. Rather
this is a side effect relating to the initial Q range allowed for the key frame and
a poor initial complexity estimate. This will hopefully be improved in a later
patch.

Change-Id: I4773ebe554782f4024c047c3c392c763a3fe843b
2018-02-28 20:56:53 +00:00
Linfeng Zhang
932835677f Merge "Add vp9_iht16x16_256_add_neon()" 2018-02-28 18:26:39 +00:00
James Zern
7aa588debd Merge "datarate_test: correct last_pts_ref_ type" 2018-02-27 22:15:05 +00:00
Linfeng Zhang
88c2386447 Add vp9_iht16x16_256_add_neon()
BUG=webm:1403

Change-Id: I1413cc3dfcb62143ba04fe9b0f8d8b010fdf69b6
2018-02-27 10:13:20 -08:00
James Zern
09ce3177bb datarate_test: correct last_pts_ref_ type
use vpx_codec_pts_t to match last_pts_; this quiets a conversion warning
under visual studio

Change-Id: I3f1c146fc13f2edfb515d76730a9ef063846bf69
2018-02-26 23:03:02 -08:00
Linfeng Zhang
3c6dc743aa Fix a bug in create_s16x4_neon()
This bug exposes when 2nd argument is negative, and the higher 32 bits
would be all 1s.

Change-Id: I189ee8cd3753fde00a34847e7a37cde2caa4ba72
2018-02-26 17:49:24 -08:00
Linfeng Zhang
8de0404ed9 Merge "Clean test/dct_test.cc with testing::Combine" 2018-02-24 01:24:32 +00:00
Linfeng Zhang
90d54a15fb Clean test/dct_test.cc with testing::Combine
Change-Id: I910fd34e4a06a73568b597ccb194c8395c2e6d08
2018-02-23 15:54:47 -08:00
Linfeng Zhang
167594414f Merge "Add vp9_highbd_iht8x8_16_add_neon()" 2018-02-23 01:42:59 +00:00
Jerome Jiang
acac262663 Merge "VP9 SVC: Datarate test for dynamic bitrate change." 2018-02-23 00:21:56 +00:00
Jerome Jiang
e3c6d30294 VP9 SVC: Datarate test for dynamic bitrate change.
Change-Id: Ie1cd990dcb19a4cc18de4a2e487791f399c4b3cb
2018-02-22 15:05:03 -08:00
Kyle Siefring
dccb8b45bb Merge "Fold adds in 16->32-bit converts in SSE2/AVX2 fDCT" 2018-02-21 23:12:07 +00:00
Linfeng Zhang
29b6a30cd9 Add vp9_highbd_iht8x8_16_add_neon()
BUG=webm:1403

Change-Id: I11efb652f1aee371c71eee2d29e33793e4736832
2018-02-20 17:21:31 -08:00
Johann
c1435e321c remove deprecated 'register' keyword
Will be removed in C++17:
http://en.cppreference.com/w/cpp/language/storage_duration

Change-Id: Iadce5e2b974c707799fa939f3ff1c420fb79a871
2018-02-20 14:49:02 -08:00
Jerome Jiang
93da1ba2dc Merge "VP9 ROI test clean up regarding bool type flag." 2018-02-12 23:26:07 +00:00
Jerome Jiang
1a7b256f06 vp9_cx_iface: Remove else when returning from the other branch.
Change-Id: I2fc15ec25cc5587cafc6621176d0a6d7c376fc7c
2018-02-12 11:01:29 -08:00
Jerome Jiang
03e043e06c VP9 ROI test clean up regarding bool type flag.
Clean up code to make use_roi_ flag a bool.

Change-Id: I5b606ca19f8543840259d1cc79fe3301a2a70d30
2018-02-12 10:36:14 -08:00
Kyle Siefring
811b2e412e Fold adds in 16->32-bit converts in SSE2/AVX2 fDCT
Changes in the function size in bytes (in lieu of performance metrics)
                   Before    After    Diff
vpx_fdct32x32_avx2  29564 -> 28334   -1230
vpx_fdct32x32_sse2  38053 -> 36309   -1744

Change-Id: Ie0b3e6ed7c3f2e9ea45f9d6a1ce1e27d068cee6b
2018-02-10 14:25:24 -05:00
Jerome Jiang
edc9a46876 VP9 ROI: reset use_roi_ in datarate test.
Change-Id: I51765ce6c3c8e8646852c4da47b12a0198892c52
2018-02-10 08:39:43 -08:00
Jerome Jiang
4410d729d1 VP9 ROI: Fix errors in example encoder.
Fix some errors in the vpx_temporal_svc_encoder.

Change-Id: Id93f449364dcf72c826ca931df3c8c3d3b80100f
2018-02-09 14:47:00 -08:00
Jerome Jiang
11b55a0614 Merge "Reland "Add ROI support for VP9."" 2018-02-09 19:01:52 +00:00
Jerome Jiang
46adbc4af8 Reland "Add ROI support for VP9."
Extended ROI struct suitable for VP9.
ROI input from user is passed into internal struct and applied on every frame
(except key frame).

Enabled usage of all 4 VP9 segment features (delta_qp, delta_lf, skip,
ref_frame) via the ROI map input.
Made changes to nonrd_pickmode for the ref_frame feature.

Only works for realtime speed >= 5.
AQ_MODE needs to be turned off for ROI to take effect.

Change example in the sample encoder: vpx_temporal_svc_encoder.c to be suitable
for VP9.
Add datarate test.

Bump up ABI version.

BUG=webm:1470

Change-Id: I663b8c89862328646f4cc6119752b66efc5dc9ac
2018-02-09 10:55:46 -08:00
Jerome Jiang
efaaf387fc Merge "Revert "Add ROI support for VP9."" 2018-02-09 18:54:55 +00:00
Jerome Jiang
62b013abe8 Revert "Add ROI support for VP9."
This reverts commit 4e5b4b5848.

Reason for revert: Commit message inaccurate.

Original change's description:
> Add ROI support for VP9.
> 
> Extended ROI struct suitable for VP9.
> ROI input from user is passed into internal struct and applied on every frame
> (except key frame).
> 
> Enabled usage of all 4 VP9 segment features (delta_qp, delta_lf, skip,
> ref_frame) via the ROI map input.
> Made changes to nonrd_pickmode for the ref_frame feature.
> 
> Only works for realtime speed >= 5.
> AQ_MODE needs to be turned off for ROI to take effect.
> 
> Change example in the sample encoder: vpx_temporal_svc_encoder.c to be suitable
> for VP9.
> Add datarate test.
> 
> Bump up ABI version.
> 
> BUG=webm:1470
> 
> Change-Id: I7e0cf6890649adb98a5fda2efb6ae1fa511c7fc9

TBR=yaowu@google.com,jzern@google.com,marpan@google.com,builds@webmproject.org,jianj@google.com

Change-Id: I000dbd81e0c67cb8a0dcde4013ee9bf7afb038f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webm:1470
2018-02-09 18:53:54 +00:00
Jerome Jiang
c930ea7dcd Merge "Add ROI support for VP9." 2018-02-09 16:58:55 +00:00
paulwilkins
2fa333c2ae Improved coding on slide show content.
This patch adds in detection of slide show key frame groups.
The detection assumes extremely  low or 0 motion for all frames
in the key frame group.

If this case is detected the boost level is set to a very high value
and the min Q to a lower value for the key frame itself.
Alt refs and golden frames are disabled to save bits (up to a limiting
maximum interval currently set to 240 frames).

In test samples that I created, this patch gave rise to a substantial
improvement in overall psnr and a drop in data rate. In some cases the
average psnr fell, however, with the boost and minQ values set as they are.

This is to be expected because previously a relatively poor key frame
could be followed by progressively better alt refs. For example a key
frame at q7.5 but subsequent alt refs improving it to lossless. Given that
average psnr tends to be dominated by the best frames, a ramp like this
from q7.5 to lossless may give a better average psnr than, for example,
coding the entire sequence at q2.5. Overall psnr, however, will be much
better in the latter case.  The option exists to boost the key frame further
which would  insure much better results for all metrics, but at the expense
of smaller bitrate savings. Given that these samples tend to have very
good quality anyway this seems like a bad trade off.

For slides displayed for several seconds, bitrate savings of >= 20% are likely
and much larger gains are possible in some cases.

Change-Id: Ib4b61e153c55d3f2f561153da13fdb56f397a52b
2018-02-09 15:13:25 +00:00
Marco
4e5b4b5848 Add ROI support for VP9.
Extended ROI struct suitable for VP9.
ROI input from user is passed into internal struct and applied on every frame
(except key frame).

Enabled usage of all 4 VP9 segment features (delta_qp, delta_lf, skip,
ref_frame) via the ROI map input.
Made changes to nonrd_pickmode for the ref_frame feature.

Only works for realtime speed >= 5.
AQ_MODE needs to be turned off for ROI to take effect.

Change example in the sample encoder: vpx_temporal_svc_encoder.c to be suitable
for VP9.
Add datarate test.

Bump up ABI version.

BUG=webm:1470

Change-Id: I7e0cf6890649adb98a5fda2efb6ae1fa511c7fc9
2018-02-08 16:30:56 -08:00
paulwilkins
b78dad3ffa Adjust MAXRATE_1080P.
This value was originally set in response to requests from the hardware
team before levels were properly defined for VP9.

Even if a level is not specified for an encode, it imposes a maximum
frame size for videos of dimensions <= 1080P.  For larger formats the
limit was set at 250 bits per MB.

This patch modifies the limit to be more in line with the requirements
specified for level 4 (max rate for a 4 frame group of 16 Mbits).  If a lower
level is specified at encode time and this mandates a smaller maximum frame
size then the level requirement will still take precedence.

Increasing this value allows for some slide shows or very low motion clips
to code a better quality key frame.

Change-Id: Ic08e0e09c8a918077152190c59732b9a1c049787
2018-02-08 12:31:09 +00:00
Paul Wilkins
1acc25f11b Merge "Fix file input pointer bug in allocate_gf_group_bits()." 2018-02-08 10:57:44 +00:00
Linfeng Zhang
0f3edc6625 Update iadst NEON functions
Use scalar multiply. No impact on clang, but improves gcc compiling.

BUG=webm:1403

Change-Id: I4922e7e033d9e93282c754754100850e232e1529
2018-02-08 07:23:55 +00:00
Linfeng Zhang
d8497e1fcd Clean vp9_highbd_iht4x4_16_add_neon()
Extract common code.

Change-Id: I422150ada1c6915f0ce39b912149994eb3bb3f12
2018-02-07 10:39:52 -08:00