Commit Graph

18289 Commits

Author SHA1 Message Date
James Zern
62c4747532 Merge "vp9_highbd_iht8x8_add_neon: rm unused functions" 2018-03-21 17:52:47 +00:00
Jerome Jiang
1f82e06122 VP9 SVC: Add control to disable inter layer prediction.
Add VP9E_SET_SVC_INTER_LAYER_PRED to disable inter layer (spatial)
prediction.
0: prediction on
1: prediction off for all frames
2: prediction off for non key frames

Bump up ABI version.

Change-Id: I5ab2a96b47e6bef202290fe726bed5f99bd4951f
2018-03-20 19:28:12 -07:00
Marco Paniconi
4a20caef78 Merge "vp9-svc: Improve frame dropper for spatial layers." 2018-03-20 21:46:36 +00: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
7a9a46fb53 visual studio: add yasm instructions
Change-Id: Ied2a1fc0e1d1a2245d63f267669add8889dd0cec
2018-03-20 10:08:45 -07:00
Johann Koenig
8b263798d0 Merge "x86 android: default on realtime-only" 2018-03-20 17:06:18 +00:00
Johann Koenig
c5630b9e6c Merge "build: remove stale .git files" 2018-03-20 17:06:05 +00:00
Johann Koenig
52da0428be Merge "reland "use intrinsics for 'emms'"" 2018-03-20 17:05:17 +00:00
Johann
907e966adf build: remove stale .git files
These were used for an older style of Visual Studio configurations.

Change-Id: I51f07b30ad51c4da0c5caf1ede36cdb69b2d2b19
2018-03-19 17:36:38 -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
Jerome Jiang
4038632fab Merge "VP8: Fix out of range index for mvcost." 2018-03-19 19:00:55 +00:00
James Zern
0dad4e2997 vp9_highbd_iht8x8_add_neon: rm unused functions
their use was removed in:
d8424d289 Fix a bug in vp9_highbd_iht8x8_64_add_neon

Change-Id: I041800f3fb34ffbb7cfa7401370c5a5ceeab01c6
2018-03-18 18:24:41 -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
Jerome Jiang
ca28740570 VP8: Fix out of range index for mvcost.
Clamp index between 0 and MVvals.

Bit exact for speed -8, -6 and -4 on RTC set.

BUG=b/72510002

Change-Id: I61bdb02a0924e157b3c1980f74fbbfe5ce51bc44
2018-03-17 04:04:10 +00: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
James Zern
d07a5bfbf8 Merge "libs.mk,vcxproj generation: split srcs in invocation" 2018-03-16 03:52:02 +00:00
James Zern
b986ba84b3 Merge "Revert "vp9_loopfilter.c: zero lfl_uv"" 2018-03-16 02:11:52 +00:00
James Zern
e97804c67d Revert "vp9_loopfilter.c: zero lfl_uv"
This reverts commit 13d0955b25.

Reason for revert:
this should be investigated further to ensure the memset is really
necessary outside of the static analysis pass.

Original change's description:
> vp9_loopfilter.c: zero lfl_uv
> 
> The initialization depends on cm and mi_row which static
> analysis does not approve of.
> 
> Clears a static analysis warning:
> warning: The right operand of '+' is a garbage value
> const loop_filter_thresh *lfi = lfthr + *lfl;
> 
> Change-Id: I8c863ced2b1e9a7e10103b7281098f20941a6ca2

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

Change-Id: Icadb6438fbcddba747622f06f2eadebdb333edf6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
2018-03-15 21:43:29 +00:00
Johann Koenig
b24e377008 Merge changes I5501d0d6,I8c863ced,I19895d06,Ifa39353d,I09bd209b
* changes:
  vp9_resize.c: assert vp9_highbd_resize_plane conditions
  vp9_loopfilter.c: zero lfl_uv
  vp8 rdopt.c: zero rd.[rate_uv|distortion_uv]
  vp8 mfqe: zero map[]
  temporal svc: zero layer_target_bitrate
2018-03-15 21:16:43 +00: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
James Zern
944e83ad32 libs.mk,vcxproj generation: split srcs in invocation
this avoids truncation under mingw which would result in link failures

BUG=webm:1434

Change-Id: I6eb45d94f02966532b3cdf02860a5bf2e5d3efef
2018-03-15 11:58:54 -07: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
a3f09c03b8 vp9_resize.c: assert vp9_highbd_resize_plane conditions
Clears static analysis warnings similar to the low bitdepth version:
commit c4367b9b51
Author: James Zern <jzern@google.com>
Date:   Wed Mar 18 14:34:30 2015 -0700

    vp9_resize_plane: quiet some static analysis warnings

Change-Id: I5501d0d6ad7c7720d746d53ec07078cb9051d0d7
2018-03-14 16:42:14 -07:00
Johann
0e97e70496 remove spatial svc experiment
Change-Id: Ifda11caaf992d10f2d93d6cd1d07b79b6047be05
2018-03-14 22:00:28 +00:00
Johann Koenig
5c5dc73320 Merge "spatial svc: set window_size to 15" 2018-03-14 22:00:08 +00:00
Johann
13d0955b25 vp9_loopfilter.c: zero lfl_uv
The initialization depends on cm and mi_row which static
analysis does not approve of.

Clears a static analysis warning:
warning: The right operand of '+' is a garbage value
const loop_filter_thresh *lfi = lfthr + *lfl;

Change-Id: I8c863ced2b1e9a7e10103b7281098f20941a6ca2
2018-03-14 14:22:08 -07:00
Johann
f9a13a1786 vp8 rdopt.c: zero rd.[rate_uv|distortion_uv]
These values are not consistently set before calling update_best_mode.

In vp9_rdopt.c they are individual values instead of a struct and are
zero'd at declaration.

Clears a static analysis warning:
warning: The right operand of '-' is a garbage value
RDCOST(x->rdmult, x->rddiv, (rd->rate2 - rd->rate_uv - other_cost),

warning: The right operand of '-' is a garbage value
(rd->distortion2 - rd->distortion_uv));

Change-Id: I19895d062e7c0ac67937126ebc5dcb0afd3a2931
2018-03-14 13:56:39 -07:00
Johann
1f41c0d37f vp8 mfqe: zero map[]
The loop appears to set map[i] with the intention of running
the 'j' loop up to that point. However, without zero'ing map[]
first the behavior is unpredictable.

Fixes a static analysis warning:
warning: Branch condition evaluates to a garbage value
for (j = 0; j < 4 && map[j]; ++j) {

Change-Id: Ifa39353d8aa5cc47b467a7d3d8cdd3b5319fd997
2018-03-14 13:56:39 -07:00
Johann
8276005eba temporal svc: zero layer_target_bitrate
These values are set in main() from user input. Ensure
they are cleared out first.

Clears a static analysis warning:
warning: The right operand of '*' is a garbage value
1000.0 * rc->layer_target_bitrate[0] / rc->layer_framerate[0];

Change-Id: I09bd209be5aff31b87597a24d37a9673fa99381b
2018-03-14 13:56:39 -07: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
Marco Paniconi
ae856e4012 Merge "vp9-svc: Fix to update layer counters when layer is skipped." 2018-03-14 20:13:34 +00:00
Johann
6b2cc75622 spatial svc: set window_size to 15
Static analysis does not recognize that output_rc_stat guards
the usage of window_size. Clears this warning:
The right operand of '>' is a garbage value
if (frame_cnt > (unsigned int)rc.window_size) {

set_rate_control_stats sets window_size to 15. Zeroing it
just introduces another static analysis warning.

Change-Id: Ieee7b81a385f986e42189101cfa39279e519b368
2018-03-14 19:30:38 +00:00
Marco Paniconi
f50ad31ec1 vp9-svc: Fix to update layer counters when layer is skipped.
Update layer counters when layer is skipped,
for any spatial layer.

Change-Id: Ie37c4a16ccafdef3390b651dec473beb5d926896
2018-03-14 11:51:01 -07:00
Johann
f0a3979063 spatial svc: zero sizes
This should be taken care of by parse_superframe_index but
the static analysis is not recognizing it because it depends
on 'marker' which is read from the bitstream.

Clears a static analysis warning:
The right operand of '*' is a garbage value
rc.layer_encoding_bitrate[layer] += 8.0 * sizes[sl];

Change-Id: I8ee48a98f907bc7b46869fd27a351f33e2e7de71
2018-03-13 18:22:50 -07:00
Johann
b0d57f682d spatial svc: remove vpx_svc_get_message
Print error messages as they are encountered. This was the default
behavior.

Removes a static analysis warning regarding the use of strncat:
Null pointer argument in call to string length function

As this is the only use of strncat in the library, remove it and the
associated public function.

Change-Id: Id55305c5a4d65f11da88c3a2203ff824200f526f
2018-03-13 17:58:24 -07: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
Johann
6f9163db95 spatial svc: remove unused locals
Clears static analysis warning:
Value stored to 'tl' is never read

Change-Id: If047a74f508288c63d5b83ed0f3ad34f791f9312
2018-03-13 17:12:35 -07:00
Johann Koenig
c257d608fc Merge "use intrinsics for 'emms'" 2018-03-13 23:51:08 +00: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
7b278e3072 spatial svc: rescope sl
sl was passed to set_frame_flags_bypass_mode, triggering
an uninitialized variable warning. Inside the function it
is only used as a local variable.

Change-Id: If743626e9e10fd41d135e3b4ad6196dc4dc90172
2018-03-13 14:38:05 -07:00
Johann
118a57045b use intrinsics for 'emms'
BUG=webm:1500

Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2
2018-03-13 13:17:28 -07:00
Johann
fc1302cd8b x86 android: default on realtime-only
Like the arm-based target, set realtime-only on by default.

BUG=webm:873

Change-Id: I2e04cfc43390953435e985716a25f32b8d4fadda
2018-03-12 15:20:28 -07:00
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