Commit Graph

2234 Commits

Author SHA1 Message Date
Martin Storsjö
f4b1eca53e Merge "Restore emms usage on x86_64 after 726b021a12c1b" 2018-03-23 22:04:43 +00:00
Martin Storsjo
a6fdfda44c Restore emms usage on x86_64 after 726b021a12
Even on x86_64, emms has to be called if the x87 state has
been clobbered - the calling code (either within libvpx or
in a caller outside of libvpx) may be using the x87 instructions,
even though use of them isn't all that common on x86_64.

This fixes builds with clang for mingw/x86_64.

Change-Id: I1f6072835590b862bad156f17331ba65c813ddd9
2018-03-23 19:57:46 +00:00
Martin Storsjo
e9ea629b13 test: Check for ARCH_X86_64 in addition to _WIN64
_WIN64 is also defined when targeting windows on aarch64.

Change-Id: I42b84e14079c19d0ba9362a06d8c6e7287644373
2018-03-23 13:41:35 +02:00
James Zern
c13aaf7a3e Merge changes Ied91c7ef,If2dcc6e2,Ib7397e71,Ib6392c79
* changes:
  Fix implicit-fallthrough warnings
  Fix dangling-else warnings
  Fix a strict-overflow warning
  Rename several static NEON iht functions
2018-03-23 03:56:50 +00:00
Jerome Jiang
1ae97b4a4d vp9 svc frame drop: enable adaptive rd for row mt.
adaptive_rd_threshold_mt is set to 1 when speed >= 7 for SVC.
QVGA in SVC uses speed 5 which set adaptive_rd_threshold_mt to 0.
If VGA or HD is dropped for the last super frame, the flag is still 0
when the encoder is destroyed. Thus memory won't be released.

Change the bitrate threshold in datarate test.

Change-Id: I55352cc0b030568d38eb735d99c2fa29058d3690
2018-03-22 17:11:05 -07:00
Linfeng Zhang
c101a5f5c4 Fix dangling-else warnings
Compiler -- gcc (Debian 7.3.0-5) 7.3.0

Change-Id: If2dcc6e215a2990cde575f0e744ce0c7a44a15f1
2018-03-22 11:44:01 -07:00
Marco Paniconi
126a3718fc vp9-svc: Improve frame dropper for spatial layers.
SVC frame dropper: modify the logic to allow for individual
spatial layers to drop. This removes the constraint that all
upper spatial layers must drop when a given spatial layer drops.

Add a flag to the pkt to indicate whether a spatial layer is
encoded or dropped. This is needed for applications that enable
this feature (frame dropping for SVC).

For a current spatial layer, if its previous spatial layer is
dropped, then disable certain features for that layer:
inter-layer prediction, base_mv, partition_reuse, copy partition.

Also add the constraint to never drop a spatial layer if its
base layer is a key frame.

Updates to sample encoder (vp9_spatial_svc_encoder) and the
SVC datarate unittests to properly handle frame dropping.

Bump up ABI version.
Change-Id: I7d14ccf67b8d014a7abfce5ba3989fc623e94067
2018-03-20 10:34:45 -07:00
Johann
726b021a12 reland "use intrinsics for 'emms'"
Only target 32bit builds. Visual Studio does not define _mm_empty for
64bit configurations.

Rename emms.asm and remove from 32 bit builds to avoid empty file
warnings.

Don't check register state on 64bit builds.

BUG=webm:1500

This reverts commit 60beb781c1.

Change-Id: I5ac4cf6c67249ff24f7da19792144de20527bfce
2018-03-19 17:11:55 -07:00
James Zern
0f9521f0a8 CopyFrameTest: reduce max size for 32-bit targets
avoids potential OOM when allocating 3 buffers for 16383x16383; 3840 is
used as a replacement
this test was missed in:
215bddf32 vpx_scale_test: reduce max size for 32-bit targets

Change-Id: I515adf5999c6ef1724394ccd62d677134bd35e6d
2018-03-18 15:15:07 -07:00
James Zern
215bddf324 vpx_scale_test: reduce max size for 32-bit targets
avoids potential OOM when allocating 3 buffers for 16383x16383; 3840 is
used as a replacement

Change-Id: I92116ab69b10db6820fc651d3626bd9699700208
2018-03-16 17:47:56 -07:00
Marco Paniconi
2640f25072 vp9-svc: Frame dropper for SVC.
If a given spatial layer decides to drop, due to the
buffer/overshoot conditions for that layer, then drop
that current spatial layer and all spatial layers above.

In the current implementation the svc frame counter
(and hence the pattern for the non-flexible SVC case)
are updated on frame drops.

Also add last spatial layer encoded to the pkt.
This is useful for RTC applications that enable
frame dropping for SVC.

Update to the SVC datarate tests:
enabled frame dropper on all SVC datarate tests, and
made a fix to properly set the temporal_layer_id, which
works now even on frame drops.

Change-Id: If828c193f3cb6b1839803fd52fe9fbbda5b5a039
2018-03-15 21:04:59 -07:00
Johann Koenig
f3adb45914 Merge "remove spatial svc experiment" 2018-03-15 19:26:16 +00:00
Linfeng Zhang
5dfb01bb30 Merge "Add vp9_highbd_iht16x16_256_add_neon()" 2018-03-15 19:21:36 +00:00
Linfeng Zhang
ddb3d7a8a1 Merge changes I9e0bf2c7,I695b4090
* changes:
  Fix a bug in vp9_highbd_iht8x8_64_add_neon
  Fix a bug in vp9_highbd_iht4x4_16_add_neon()
2018-03-15 18:05:08 +00:00
Marco Paniconi
881c8ec816 vp9-svc: Bugfix to dyanmic enabling/disabling of layers.
Fix a bug when middle and top spatial layer are skip encoded
(disabled) and then re-enabled again, during the sequence.

Issue is that pending_frame_count in the packing may
be incremented on middle layer, even though that layer is skipped
(not encoded and hence zero size). Fix is to add size check.

Modified existing unitest to reproduce the issue.

Change-Id: I86d806a112d468e06b04fbf7c46ae07db9e0ad93
2018-03-14 17:31:59 -07:00
Johann
0e97e70496 remove spatial svc experiment
Change-Id: Ifda11caaf992d10f2d93d6cd1d07b79b6047be05
2018-03-14 22:00:28 +00:00
Johann Koenig
60beb781c1 Revert "use intrinsics for 'emms'"
This reverts commit 118a57045b.

Reason for revert: Fails on Visual Studio builds:

vpxmdd.lib(vpx_ports_emms_mmx.obj) : error LNK2019: unresolved
external symbol _m_empty referenced in function
vpx_clear_system_state

Original change's description:
> use intrinsics for 'emms'
> 
> BUG=webm:1500
> 
> Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2

Change-Id: Ia9c40bc103c57cced83353249c55218eaf2f0b0c
2018-03-14 20:26:44 +00:00
Linfeng Zhang
9351f96069 Add vp9_highbd_iht16x16_256_add_neon()
BUG=webm:1403

Change-Id: I2293c11666786be276909d48ee78dacb40a89e25
2018-03-13 17:39:23 -07:00
Linfeng Zhang
d8424d2890 Fix a bug in vp9_highbd_iht8x8_64_add_neon
This bug was introduced in 29b6a30c.

BUG=webm:1403

Change-Id: I9e0bf2c7a01d8ff1c714c12236f7985b772b0540
2018-03-13 17:38:29 -07:00
Linfeng Zhang
88dc0d6062 Fix a bug in vp9_highbd_iht4x4_16_add_neon()
This bug was introduced in 36363304.

BUG=webm:1403

Change-Id: I695b409047e41ab7e0460981524310d78753751a
2018-03-13 16:10:00 -07:00
Johann
118a57045b use intrinsics for 'emms'
BUG=webm:1500

Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2
2018-03-13 13:17:28 -07: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
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
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
Linfeng Zhang
932835677f Merge "Add vp9_iht16x16_256_add_neon()" 2018-02-28 18:26:39 +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
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
e3c6d30294 VP9 SVC: Datarate test for dynamic bitrate change.
Change-Id: Ie1cd990dcb19a4cc18de4a2e487791f399c4b3cb
2018-02-22 15:05:03 -08: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
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
Jerome Jiang
edc9a46876 VP9 ROI: reset use_roi_ in datarate test.
Change-Id: I51765ce6c3c8e8646852c4da47b12a0198892c52
2018-02-10 08:39:43 -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
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
Linfeng Zhang
3636330490 Add vp9_highbd_iht4x4_16_add_neon()
BUG=webm:1403

Change-Id: Id9833e985fb70958cf4bde38f8e6303ed83c12f9
2018-02-05 13:42:16 -08:00
James Zern
14b21b84e3 vp9_scale_test: parameterize filter type
this allows the test to be sharded more efficiently and speeds up the
run when built with slower configs, e.g., asan.

Change-Id: If6d863b76871e3934704a1079bbf17f4886932c7
2018-01-31 23:38:47 -08:00
Marco Paniconi
efa786d464 vp9 svc: Make top layer non-ref: for 2 TL case
Only affects 2 temporal layer case.
Modified the flags for 2 temporal layers to make
top layer (top spatial, top temporal) a non-reference
frame, conistent with the 3 TL case.

Add mismatch check to the datarate test of changing
svc pattern on the fly, which is test for 2 temporal
layers.

This re-applies the change: 254e2f5501,
that was reverted in: 658eb1d675.

Change-Id: Ib5fd4a7a0312c0c05329ae75baac480af34b4694
2018-01-31 09:17:43 -08:00
Marco Paniconi
658eb1d675 Merge "Revert "vp9 svc: fix to make top layer frame non-ref"" 2018-01-31 16:49:42 +00:00
Marco Paniconi
7edd1a6cea Revert "vp9 svc: fix to make top layer frame non-ref"
This reverts commit 254e2f5501.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> vp9 svc: fix to make top layer frame non-ref
> 
> Add mismatch check to the datarate test of changing svc pattern on the
> fly.
> 
> Change-Id: I6a878736de44e6a40c077ed6430aabd7fadabdd9

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

Change-Id: Ibcb600438098f8dc380fe7e1de90cb81fc367468
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
2018-01-31 16:49:16 +00:00
Johann Koenig
fdb64ec289 Merge "vp8 bool: verify buffer size" 2018-01-31 14:23:49 +00:00
Johann
c59c84fc74 vp8 bool: verify buffer size
In the process of fixing a ubsan warning:
  commit 738b829b8c
  Fix incorrect size reading
the inferred check of start < end was removed. This causes fuzzed files
to get a little further and segfault in vp8dx_start_decode.

Change-Id: I316e23058753ba42dbcc46d27eb575f51c8a9e9a
2018-01-30 12:20:06 -08:00