]> granicus.if.org Git - libvpx/log
libvpx
6 years agoVP9 SVC: Add control to disable inter layer prediction.
Jerome Jiang [Tue, 20 Mar 2018 18:12:16 +0000 (11:12 -0700)]
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

6 years agoMerge "vp9-svc: Improve frame dropper for spatial layers."
Marco Paniconi [Tue, 20 Mar 2018 21:46:36 +0000 (21:46 +0000)]
Merge "vp9-svc: Improve frame dropper for spatial layers."

6 years agovp9-svc: Improve frame dropper for spatial layers.
Marco Paniconi [Mon, 19 Mar 2018 03:46:30 +0000 (20:46 -0700)]
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

6 years agovisual studio: add yasm instructions
Johann [Mon, 19 Mar 2018 23:46:06 +0000 (16:46 -0700)]
visual studio: add yasm instructions

Change-Id: Ied2a1fc0e1d1a2245d63f267669add8889dd0cec

6 years agoMerge "x86 android: default on realtime-only"
Johann Koenig [Tue, 20 Mar 2018 17:06:18 +0000 (17:06 +0000)]
Merge "x86 android: default on realtime-only"

6 years agoMerge "build: remove stale .git files"
Johann Koenig [Tue, 20 Mar 2018 17:06:05 +0000 (17:06 +0000)]
Merge "build: remove stale .git files"

6 years agoMerge "reland "use intrinsics for 'emms'""
Johann Koenig [Tue, 20 Mar 2018 17:05:17 +0000 (17:05 +0000)]
Merge "reland "use intrinsics for 'emms'""

6 years agobuild: remove stale .git files
Johann [Mon, 19 Mar 2018 22:57:29 +0000 (15:57 -0700)]
build: remove stale .git files

These were used for an older style of Visual Studio configurations.

Change-Id: I51f07b30ad51c4da0c5caf1ede36cdb69b2d2b19

6 years agoreland "use intrinsics for 'emms'"
Johann [Wed, 14 Mar 2018 23:57:57 +0000 (16:57 -0700)]
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 60beb781c140b61c1957abd2a6717d2e9a831933.

Change-Id: I5ac4cf6c67249ff24f7da19792144de20527bfce

6 years agoMerge "VP8: Fix out of range index for mvcost."
Jerome Jiang [Mon, 19 Mar 2018 19:00:55 +0000 (19:00 +0000)]
Merge "VP8: Fix out of range index for mvcost."

6 years agoCopyFrameTest: reduce max size for 32-bit targets
James Zern [Sat, 17 Mar 2018 00:47:56 +0000 (17:47 -0700)]
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

6 years agoVP8: Fix out of range index for mvcost.
Jerome Jiang [Wed, 21 Feb 2018 23:28:54 +0000 (15:28 -0800)]
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

6 years agovpx_scale_test: reduce max size for 32-bit targets
James Zern [Sat, 17 Mar 2018 00:47:56 +0000 (17:47 -0700)]
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

6 years agovp9-svc: Frame dropper for SVC.
Marco Paniconi [Wed, 14 Mar 2018 17:03:31 +0000 (10:03 -0700)]
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

6 years agoMerge "libs.mk,vcxproj generation: split srcs in invocation"
James Zern [Fri, 16 Mar 2018 03:52:02 +0000 (03:52 +0000)]
Merge "libs.mk,vcxproj generation: split srcs in invocation"

6 years agoMerge "Revert "vp9_loopfilter.c: zero lfl_uv""
James Zern [Fri, 16 Mar 2018 02:11:52 +0000 (02:11 +0000)]
Merge "Revert "vp9_loopfilter.c: zero lfl_uv""

6 years agoRevert "vp9_loopfilter.c: zero lfl_uv"
James Zern [Thu, 15 Mar 2018 21:43:29 +0000 (21:43 +0000)]
Revert "vp9_loopfilter.c: zero lfl_uv"

This reverts commit 13d0955b250bcb7eac99034e7b1677d3d026b569.

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

6 years agoMerge changes I5501d0d6,I8c863ced,I19895d06,Ifa39353d,I09bd209b
Johann Koenig [Thu, 15 Mar 2018 21:16:43 +0000 (21:16 +0000)]
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

6 years agoMerge "remove spatial svc experiment"
Johann Koenig [Thu, 15 Mar 2018 19:26:16 +0000 (19:26 +0000)]
Merge "remove spatial svc experiment"

6 years agoMerge "Add vp9_highbd_iht16x16_256_add_neon()"
Linfeng Zhang [Thu, 15 Mar 2018 19:21:36 +0000 (19:21 +0000)]
Merge "Add vp9_highbd_iht16x16_256_add_neon()"

6 years agolibs.mk,vcxproj generation: split srcs in invocation
James Zern [Tue, 27 Jun 2017 01:55:09 +0000 (18:55 -0700)]
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

6 years agoMerge changes I9e0bf2c7,I695b4090
Linfeng Zhang [Thu, 15 Mar 2018 18:05:08 +0000 (18:05 +0000)]
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()

6 years agovp9-svc: Bugfix to dyanmic enabling/disabling of layers.
Marco Paniconi [Thu, 15 Mar 2018 00:00:27 +0000 (17:00 -0700)]
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

6 years agovp9_resize.c: assert vp9_highbd_resize_plane conditions
Johann [Wed, 14 Mar 2018 21:45:23 +0000 (14:45 -0700)]
vp9_resize.c: assert vp9_highbd_resize_plane conditions

Clears static analysis warnings similar to the low bitdepth version:
commit c4367b9b51782969d3b37ead6694d19ef9bfb58c
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

6 years agoremove spatial svc experiment
Johann [Tue, 13 Mar 2018 00:23:41 +0000 (17:23 -0700)]
remove spatial svc experiment

Change-Id: Ifda11caaf992d10f2d93d6cd1d07b79b6047be05

6 years agoMerge "spatial svc: set window_size to 15"
Johann Koenig [Wed, 14 Mar 2018 22:00:08 +0000 (22:00 +0000)]
Merge "spatial svc: set window_size to 15"

6 years agovp9_loopfilter.c: zero lfl_uv
Johann [Wed, 14 Mar 2018 21:22:08 +0000 (14:22 -0700)]
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

6 years agovp8 rdopt.c: zero rd.[rate_uv|distortion_uv]
Johann [Wed, 14 Mar 2018 20:25:05 +0000 (13:25 -0700)]
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

6 years agovp8 mfqe: zero map[]
Johann [Wed, 14 Mar 2018 20:10:08 +0000 (13:10 -0700)]
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

6 years agotemporal svc: zero layer_target_bitrate
Johann [Wed, 14 Mar 2018 19:52:49 +0000 (12:52 -0700)]
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

6 years agoRevert "use intrinsics for 'emms'"
Johann Koenig [Wed, 14 Mar 2018 19:06:57 +0000 (19:06 +0000)]
Revert "use intrinsics for 'emms'"

This reverts commit 118a57045bf5b49ab7c2f7f930543b9217fd422e.

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

6 years agoMerge "vp9-svc: Fix to update layer counters when layer is skipped."
Marco Paniconi [Wed, 14 Mar 2018 20:13:34 +0000 (20:13 +0000)]
Merge "vp9-svc: Fix to update layer counters when layer is skipped."

6 years agospatial svc: set window_size to 15
Johann [Wed, 14 Mar 2018 01:31:26 +0000 (18:31 -0700)]
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

6 years agovp9-svc: Fix to update layer counters when layer is skipped.
Marco Paniconi [Wed, 14 Mar 2018 18:49:25 +0000 (11:49 -0700)]
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

6 years agospatial svc: zero sizes
Johann [Wed, 14 Mar 2018 01:22:40 +0000 (18:22 -0700)]
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

6 years agospatial svc: remove vpx_svc_get_message
Johann [Wed, 14 Mar 2018 00:37:28 +0000 (17:37 -0700)]
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

6 years agoAdd vp9_highbd_iht16x16_256_add_neon()
Linfeng Zhang [Wed, 28 Feb 2018 01:06:01 +0000 (17:06 -0800)]
Add vp9_highbd_iht16x16_256_add_neon()

BUG=webm:1403

Change-Id: I2293c11666786be276909d48ee78dacb40a89e25

6 years agoFix a bug in vp9_highbd_iht8x8_64_add_neon
Linfeng Zhang [Tue, 6 Mar 2018 00:25:08 +0000 (16:25 -0800)]
Fix a bug in vp9_highbd_iht8x8_64_add_neon

This bug was introduced in 29b6a30c.

BUG=webm:1403

Change-Id: I9e0bf2c7a01d8ff1c714c12236f7985b772b0540

6 years agospatial svc: remove unused locals
Johann [Wed, 14 Mar 2018 00:11:48 +0000 (17:11 -0700)]
spatial svc: remove unused locals

Clears static analysis warning:
Value stored to 'tl' is never read

Change-Id: If047a74f508288c63d5b83ed0f3ad34f791f9312

6 years agoMerge "use intrinsics for 'emms'"
Johann Koenig [Tue, 13 Mar 2018 23:51:08 +0000 (23:51 +0000)]
Merge "use intrinsics for 'emms'"

6 years agoFix a bug in vp9_highbd_iht4x4_16_add_neon()
Linfeng Zhang [Tue, 13 Mar 2018 23:10:00 +0000 (16:10 -0700)]
Fix a bug in vp9_highbd_iht4x4_16_add_neon()

This bug was introduced in 36363304.

BUG=webm:1403

Change-Id: I695b409047e41ab7e0460981524310d78753751a

6 years agospatial svc: rescope sl
Johann [Tue, 13 Mar 2018 21:37:39 +0000 (14:37 -0700)]
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

6 years agouse intrinsics for 'emms'
Johann [Mon, 5 Mar 2018 22:27:04 +0000 (14:27 -0800)]
use intrinsics for 'emms'

BUG=webm:1500

Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2

6 years agox86 android: default on realtime-only
Johann [Mon, 12 Mar 2018 22:20:28 +0000 (15:20 -0700)]
x86 android: default on realtime-only

Like the arm-based target, set realtime-only on by default.

BUG=webm:873

Change-Id: I2e04cfc43390953435e985716a25f32b8d4fadda

6 years agoautodetect macOS High Sierra
Johann [Mon, 12 Mar 2018 21:54:48 +0000 (14:54 -0700)]
autodetect macOS High Sierra

Add darwin17 target

Change-Id: I349a2f6a0396c59269f567a03ae813e3e59ccefa

6 years agoMerge "vp8 temporal_filter: ignore return value"
Johann Koenig [Mon, 12 Mar 2018 20:56:30 +0000 (20:56 +0000)]
Merge "vp8 temporal_filter: ignore return value"

6 years agovp8 temporal_filter: ignore return value
Johann [Tue, 31 Jan 2017 23:45:12 +0000 (15:45 -0800)]
vp8 temporal_filter: ignore return value

Clears up static clang analysis warning regarding a dead store.

Change-Id: I6a90e6fd5f2775d933c46c7553811635bd2def21

6 years agovp9-svc: Update layer frame counters when layer is skipped.
Marco Paniconi [Mon, 12 Mar 2018 19:18:35 +0000 (12:18 -0700)]
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

6 years agovp9-SVC: Fix to choose_partition when LAST ref is NULL.
Marco Paniconi [Mon, 12 Mar 2018 05:09:14 +0000 (22:09 -0700)]
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

6 years agoMerge "vpx_scale_test: add w/h output to alloc failure"
James Zern [Thu, 8 Mar 2018 21:13:09 +0000 (21:13 +0000)]
Merge "vpx_scale_test: add w/h output to alloc failure"

6 years agoMerge "Change to KF frame boost calculation."
Paul Wilkins [Thu, 8 Mar 2018 13:34:15 +0000 (13:34 +0000)]
Merge "Change to KF frame boost calculation."

6 years agovpx_scale_test: add w/h output to alloc failure
James Zern [Thu, 8 Mar 2018 07:07:51 +0000 (23:07 -0800)]
vpx_scale_test: add w/h output to alloc failure

Change-Id: Ib5df91d9fcd7fe973a2f7d8e73a204259beddc07

6 years agoMerge changes If96fd6f1,I84b27337
James Zern [Thu, 8 Mar 2018 03:41:27 +0000 (03:41 +0000)]
Merge changes If96fd6f1,I84b27337

* changes:
  Fix a bug in vp9_iht16x16_256_add_neon()
  Fix a bug in vp9_iht8x8_64_add_neon()

6 years agoadd worst-case frame size cap
Johann [Tue, 6 Mar 2018 02:51:10 +0000 (18:51 -0800)]
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

6 years agoFix a bug in vp9_iht16x16_256_add_neon()
Linfeng Zhang [Tue, 6 Mar 2018 00:14:35 +0000 (16:14 -0800)]
Fix a bug in vp9_iht16x16_256_add_neon()

This bug was introduced in 88c23864.

BUG=webm:1403

Change-Id: If96fd6f102be6b9bda866e55e574257287746f4a

6 years agoFix a bug in vp9_iht8x8_64_add_neon()
Linfeng Zhang [Mon, 5 Mar 2018 23:16:49 +0000 (15:16 -0800)]
Fix a bug in vp9_iht8x8_64_add_neon()

This bug was introduced in b14b616d.

BUG=webm:1403

Change-Id: I84b2733734982e52b66548850d61758c772b5494

6 years agomove vp8 encodeopt to block_error_sse2
Johann [Sun, 4 Mar 2018 20:31:04 +0000 (12:31 -0800)]
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

6 years agodisable vp9_highbd_iht{4x4_16,8x8_64}_add_neon
James Zern [Sat, 3 Mar 2018 20:47:24 +0000 (12:47 -0800)]
disable vp9_highbd_iht{4x4_16,8x8_64}_add_neon

these causes test vector failures

BUG=webm:1403

Change-Id: I08218f0bf26651eb367ece4feec6d704e0189bd8

6 years agodisable vp9_iht8x8_64_add_neon
James Zern [Sat, 3 Mar 2018 20:47:24 +0000 (12:47 -0800)]
disable vp9_iht8x8_64_add_neon

this causes test vector failures

BUG=webm:1403

Change-Id: I7d37a05fbf4641ea352c947053aa4eaeb7f5c318

6 years agodisable vp9_iht16x16_256_add_neon
James Zern [Sat, 3 Mar 2018 20:47:24 +0000 (12:47 -0800)]
disable vp9_iht16x16_256_add_neon

this causes test vector failures

BUG=webm:1403

Change-Id: Ifdb5b270c5cc70be5689e4fbda2ada3724cc65c3

6 years agovp9-svc: Disable partition_reuse unless 2x2 scale.
Marco Paniconi [Fri, 2 Mar 2018 18:47:04 +0000 (10:47 -0800)]
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

6 years agovp9-svc: Fix to downsampling filter phase_shift.
Marco Paniconi [Thu, 1 Mar 2018 17:45:11 +0000 (09:45 -0800)]
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

6 years agoiadst16x16_256_add_half1d: fix array size
James Zern [Thu, 1 Mar 2018 07:49:39 +0000 (23:49 -0800)]
iadst16x16_256_add_half1d: fix array size

t[] is indexed from 0..11

Change-Id: I7d0021f1795c6608354c8770843ea9dfdea66f97

6 years agoChange to KF frame boost calculation.
paulwilkins [Wed, 21 Feb 2018 11:18:09 +0000 (11:18 +0000)]
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

6 years agoMerge "Add vp9_iht16x16_256_add_neon()"
Linfeng Zhang [Wed, 28 Feb 2018 18:26:39 +0000 (18:26 +0000)]
Merge "Add vp9_iht16x16_256_add_neon()"

6 years agoMerge "datarate_test: correct last_pts_ref_ type"
James Zern [Tue, 27 Feb 2018 22:15:05 +0000 (22:15 +0000)]
Merge "datarate_test: correct last_pts_ref_ type"

6 years agoAdd vp9_iht16x16_256_add_neon()
Linfeng Zhang [Tue, 27 Feb 2018 01:22:36 +0000 (17:22 -0800)]
Add vp9_iht16x16_256_add_neon()

BUG=webm:1403

Change-Id: I1413cc3dfcb62143ba04fe9b0f8d8b010fdf69b6

6 years agodatarate_test: correct last_pts_ref_ type
James Zern [Tue, 27 Feb 2018 07:03:02 +0000 (23:03 -0800)]
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

6 years agoFix a bug in create_s16x4_neon()
Linfeng Zhang [Tue, 27 Feb 2018 01:00:10 +0000 (17:00 -0800)]
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

6 years agoMerge "Clean test/dct_test.cc with testing::Combine"
Linfeng Zhang [Sat, 24 Feb 2018 01:24:32 +0000 (01:24 +0000)]
Merge "Clean test/dct_test.cc with testing::Combine"

6 years agoClean test/dct_test.cc with testing::Combine
Linfeng Zhang [Thu, 22 Feb 2018 22:26:05 +0000 (14:26 -0800)]
Clean test/dct_test.cc with testing::Combine

Change-Id: I910fd34e4a06a73568b597ccb194c8395c2e6d08

6 years agoMerge "Add vp9_highbd_iht8x8_16_add_neon()"
Linfeng Zhang [Fri, 23 Feb 2018 01:42:59 +0000 (01:42 +0000)]
Merge "Add vp9_highbd_iht8x8_16_add_neon()"

6 years agoMerge "VP9 SVC: Datarate test for dynamic bitrate change."
Jerome Jiang [Fri, 23 Feb 2018 00:21:56 +0000 (00:21 +0000)]
Merge "VP9 SVC: Datarate test for dynamic bitrate change."

6 years agoVP9 SVC: Datarate test for dynamic bitrate change.
Jerome Jiang [Thu, 22 Feb 2018 00:51:12 +0000 (16:51 -0800)]
VP9 SVC: Datarate test for dynamic bitrate change.

Change-Id: Ie1cd990dcb19a4cc18de4a2e487791f399c4b3cb

6 years agoMerge "Fold adds in 16->32-bit converts in SSE2/AVX2 fDCT"
Kyle Siefring [Wed, 21 Feb 2018 23:12:07 +0000 (23:12 +0000)]
Merge "Fold adds in 16->32-bit converts in SSE2/AVX2 fDCT"

6 years agoAdd vp9_highbd_iht8x8_16_add_neon()
Linfeng Zhang [Wed, 21 Feb 2018 01:21:31 +0000 (17:21 -0800)]
Add vp9_highbd_iht8x8_16_add_neon()

BUG=webm:1403

Change-Id: I11efb652f1aee371c71eee2d29e33793e4736832

6 years agoremove deprecated 'register' keyword
Johann [Tue, 20 Feb 2018 22:49:02 +0000 (14:49 -0800)]
remove deprecated 'register' keyword

Will be removed in C++17:
http://en.cppreference.com/w/cpp/language/storage_duration

Change-Id: Iadce5e2b974c707799fa939f3ff1c420fb79a871

6 years agoMerge "VP9 ROI test clean up regarding bool type flag."
Jerome Jiang [Mon, 12 Feb 2018 23:26:07 +0000 (23:26 +0000)]
Merge "VP9 ROI test clean up regarding bool type flag."

6 years agovp9_cx_iface: Remove else when returning from the other branch.
Jerome Jiang [Mon, 12 Feb 2018 19:01:29 +0000 (11:01 -0800)]
vp9_cx_iface: Remove else when returning from the other branch.

Change-Id: I2fc15ec25cc5587cafc6621176d0a6d7c376fc7c

6 years agoVP9 ROI test clean up regarding bool type flag.
Jerome Jiang [Mon, 12 Feb 2018 18:36:14 +0000 (10:36 -0800)]
VP9 ROI test clean up regarding bool type flag.

Clean up code to make use_roi_ flag a bool.

Change-Id: I5b606ca19f8543840259d1cc79fe3301a2a70d30

6 years agoFold adds in 16->32-bit converts in SSE2/AVX2 fDCT
Kyle Siefring [Mon, 5 Feb 2018 05:15:29 +0000 (00:15 -0500)]
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

6 years agoVP9 ROI: reset use_roi_ in datarate test.
Jerome Jiang [Sat, 10 Feb 2018 16:39:43 +0000 (08:39 -0800)]
VP9 ROI: reset use_roi_ in datarate test.

Change-Id: I51765ce6c3c8e8646852c4da47b12a0198892c52

6 years agoVP9 ROI: Fix errors in example encoder.
Jerome Jiang [Fri, 9 Feb 2018 22:47:00 +0000 (14:47 -0800)]
VP9 ROI: Fix errors in example encoder.

Fix some errors in the vpx_temporal_svc_encoder.

Change-Id: Id93f449364dcf72c826ca931df3c8c3d3b80100f

6 years agoMerge "Reland "Add ROI support for VP9.""
Jerome Jiang [Fri, 9 Feb 2018 19:01:52 +0000 (19:01 +0000)]
Merge "Reland "Add ROI support for VP9.""

6 years agoReland "Add ROI support for VP9."
Jerome Jiang [Mon, 29 Jan 2018 18:14:40 +0000 (10:14 -0800)]
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

6 years agoMerge "Revert "Add ROI support for VP9.""
Jerome Jiang [Fri, 9 Feb 2018 18:54:55 +0000 (18:54 +0000)]
Merge "Revert "Add ROI support for VP9.""

6 years agoRevert "Add ROI support for VP9."
Jerome Jiang [Fri, 9 Feb 2018 18:53:54 +0000 (18:53 +0000)]
Revert "Add ROI support for VP9."

This reverts commit 4e5b4b58483e1f38e37acd49b809d725b4f66c26.

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

6 years agoMerge "Add ROI support for VP9."
Jerome Jiang [Fri, 9 Feb 2018 16:58:55 +0000 (16:58 +0000)]
Merge "Add ROI support for VP9."

6 years agoImproved coding on slide show content.
paulwilkins [Wed, 31 Jan 2018 16:42:37 +0000 (16:42 +0000)]
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

6 years agoAdd ROI support for VP9.
Marco [Mon, 29 Jan 2018 18:14:40 +0000 (10:14 -0800)]
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

6 years agoAdjust MAXRATE_1080P.
paulwilkins [Wed, 7 Feb 2018 15:05:20 +0000 (15:05 +0000)]
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

6 years agoMerge "Fix file input pointer bug in allocate_gf_group_bits()."
Paul Wilkins [Thu, 8 Feb 2018 10:57:44 +0000 (10:57 +0000)]
Merge "Fix file input pointer bug in allocate_gf_group_bits()."

6 years agoUpdate iadst NEON functions
Linfeng Zhang [Wed, 7 Feb 2018 02:12:12 +0000 (18:12 -0800)]
Update iadst NEON functions

Use scalar multiply. No impact on clang, but improves gcc compiling.

BUG=webm:1403

Change-Id: I4922e7e033d9e93282c754754100850e232e1529

6 years agoClean vp9_highbd_iht4x4_16_add_neon()
Linfeng Zhang [Wed, 7 Feb 2018 18:39:52 +0000 (10:39 -0800)]
Clean vp9_highbd_iht4x4_16_add_neon()

Extract common code.

Change-Id: I422150ada1c6915f0ce39b912149994eb3bb3f12

6 years agoFix file input pointer bug in allocate_gf_group_bits().
paulwilkins [Tue, 6 Feb 2018 13:54:25 +0000 (13:54 +0000)]
Fix file input pointer bug in allocate_gf_group_bits().

The stats input pointer, when passed in, already points to the
frame after the golden frame so should not be advanced here.

This fix has a small mostly positive effect on results in our test sets
(tested using corpus vbr settings) and gives a gain of almost 0.5%
in overall psnr (plus slightly smaller gains on other metrics) for the
4K set.

The bug also caused a crash in calculate_group_score() in another
patch which allows coding of slides in a slide show as a single
long KF group without ARFs or GFs.

Change-Id: I57a3a24baf442ce55dbc91fba05e056697c63a6f

6 years agoUpdate tx_type switch code in idct
Linfeng Zhang [Wed, 31 Jan 2018 00:55:22 +0000 (16:55 -0800)]
Update tx_type switch code in idct

Change-Id: Ia244bfd4b4eb9d703653792bc4f64c6f5358ae19

6 years agoAdd vp9_highbd_iht4x4_16_add_neon()
Linfeng Zhang [Wed, 31 Jan 2018 00:01:41 +0000 (16:01 -0800)]
Add vp9_highbd_iht4x4_16_add_neon()

BUG=webm:1403

Change-Id: Id9833e985fb70958cf4bde38f8e6303ed83c12f9

6 years agoMerge "inv_txfm_vsx.c: make code c90 compatible"
James Zern [Fri, 2 Feb 2018 18:41:46 +0000 (18:41 +0000)]
Merge "inv_txfm_vsx.c: make code c90 compatible"

6 years agoMerge "Fix issue for 0 target bitrate in multi-res build."
Jerome Jiang [Fri, 2 Feb 2018 05:32:55 +0000 (05:32 +0000)]
Merge "Fix issue for 0 target bitrate in multi-res build."

6 years agoFix issue for 0 target bitrate in multi-res build.
Jerome Jiang [Thu, 25 Jan 2018 19:36:53 +0000 (11:36 -0800)]
Fix issue for 0 target bitrate in multi-res build.

For encoding with --enable-multi-res-encoding, with 1 layer, when the
target bitrate is set 0, under these conditions null pointer
will be de-referenced. Fix is to check
cpi->oxcf.mr_total_resolutions > 1. Also added NULL pointer check.
This issue causes crash for asan build in chromium clusterfuzz.

BUG=805863

Change-Id: I9cd25af631395bc9fede3a12fb68af4021eb15f8