Commit Graph

18340 Commits

Author SHA1 Message Date
James Zern
0fe4371cc0 Merge "inv_txfm_vsx.c: make code c90 compatible" 2018-02-02 18:41:46 +00:00
Jerome Jiang
ac54d233b6 Merge "Fix issue for 0 target bitrate in multi-res build." 2018-02-02 05:32:55 +00:00
Jerome Jiang
519fed01c2 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
2018-02-01 20:17:54 -08:00
James Zern
73d1236384 inv_txfm_vsx.c: make code c90 compatible
move for loop declarations to function scope

Change-Id: I84d92a1a6ca6c5ac30aacb0f55d87ca3aef4c98f
2018-02-01 19:40:28 -08:00
James Zern
534e9af53b Merge "vp9_scale_test: parameterize filter type" 2018-02-01 20:44:48 +00:00
Paul Wilkins
79c14b83e9 Merge "Further change to code detecting slide transitions." 2018-02-01 10:21:38 +00: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
cb16652598 vp9-svc: Add condition on allocation for scaled_temp.
scaled_temp frame is used as an intermediate buffer for
2 stage down-sampling: two stages of 1/2 down-sampling
for a target of 1/4x1/4. This is used in 3 layer SVC
to avoid duplicate frame downsampling (on middle layer).

As this allocation is only needed/used when the
number_spatial_layers > 2, add this condition to avoid
unneeded allocation for 1 and 2 spatial SVC.

Change-Id: If342466644f685c1ea3ca5344b581793e5136c09
2018-01-31 15:19:27 -08:00
Marco
2c950e131c vp9-svc: Fix to initialize downsampling filters.
For 3 spatial layers with 1/2 downsampling, the
downsampling filter for the middle layer was not
set for the very first frame, so it was defaulting
to the subsample filter (no averaging/phase = 0).

Its not set due to the two stage scaling that is
done for 1/4 on base layer, during which the intermediate
1/2 result is saved for the middle layer.

Fix for now is to set the default downsampling filter
to Bilinear (averaging/non-zero phase) for all layers on
init (vp9_init_layer_context):.

Change-Id: Ic7407810b34c621e7e7420682508d45478bdffcf
2018-01-31 13:49:16 -08:00
paulwilkins
41d3331d42 Further change to code detecting slide transitions.
Eliminate false positives in previous patch.

The previous patch did a good job of detecting slide transitions but
in discussions a number of situations were identified that might trigger
harmful false positives. This risk seems to be born out by some testing
on a wider YT set done by yclin@.

This patch adds an additional clause that requires that the best case
inter and intra error for the frame are very similar,meaning it is almost
as easy to code a key frame as an inter frame. This will certainly prevent
the false positive conditions that Jim and I discussed and even if one
does occur it should not be very damaging.

The down side is that this clause may mean that we still miss some
real slide transitions, especially if the images are small and similar.  If this
proves to be the case then some further adjustment of the threshold may be
required. However, in the specific problem sample provided we do  trap every
transition correctly.

Change-Id: I7e5e79e52dc09bc47917565bf00cc44e5cddd44c
2018-01-31 17:44:46 +00: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
848d6004a4 Merge "Fix warning about bitwise 'not' on boolean" 2018-01-31 14:25:13 +00:00
Johann Koenig
fdb64ec289 Merge "vp8 bool: verify buffer size" 2018-01-31 14:23:49 +00:00
Johann
8001c5c7a8 Fix warning about bitwise 'not' on boolean
cherry-picked from libaom:
commit cf26ee5ad2b9da79fa68c33b7d22ff53c66d6509
Author: Sebastien Alaiwan <sebastien.alaiwan@allegrodvt.com>
Date: Wed, 4 Oct 2017 10:09:13 +0200

BUG=webm:1491

Change-Id: I36c6e83ed716649f3d9ee10ce3aa9bb847cac2d9
2018-01-30 14:47:38 -08: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
Marco Paniconi
de3a7e2630 Merge "vp9 svc: fix to make top layer frame non-ref" 2018-01-30 16:56:42 +00:00
Johann Koenig
8f952bada7 Merge "Fix doc comment mismatch in vpx_frame_buffer.h" 2018-01-30 15:32:22 +00:00
Jerome Jiang
254e2f5501 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
2018-01-29 18:38:46 -08:00
Linfeng Zhang
5eca3c23c3 Merge "Update vp9_iht8x8_64_add_neon()" 2018-01-30 01:20:41 +00:00
Jerome Jiang
e14e9c9964 Merge "Datarate test for usage of SVC_SET_REF_FRAME_CONFIG" 2018-01-30 00:01:46 +00:00
Linfeng Zhang
b14b616d96 Update vp9_iht8x8_64_add_neon()
Change-Id: Ie70ed8b9273df5e1fd06bc93cb469e80630941d2
2018-01-29 15:17:08 -08:00
Brion Vibber
ddf40ec156 Fix doc comment mismatch in vpx_frame_buffer.h
When compiling an app using libvpx in Xcode 9.2, a warning is
thrown in vpx_frame_buffer.h:

  "Parameter 'new_size' not found in the function declaration"

Switching it to 'min_size' to match the comment text and the
callback type definition prototype resolves it.

Change-Id: I7a3e4a857c2007c2d0d390e22054d7bc85068aa1
2018-01-29 15:13:09 -08:00
Jerome Jiang
9a96b18f03 Datarate test for usage of SVC_SET_REF_FRAME_CONFIG
Change-Id: Iea7fc1b6cea84826eb45b1f01bd923323c2c9a6f
2018-01-29 14:41:41 -08:00
Linfeng Zhang
77108f5001 Merge changes Ica8dbe5f,I8f4e0fc6
* changes:
  Update vp9_iht4x4_16_add_neon()
  Clean dct_const_round_shift() related neon code
2018-01-29 20:16:47 +00:00
Johann
7e75e8a622 Merge remote-tracking branch 'origin/mandarinduck' into HEAD
The following changes were not carried back from the release branch:
  commit f87a4594fb
  Revert "Add frame width & height to frame pkt. Add test."

  commit c5dc3373db
  work around pic issue with gcc 6

BUG=webm:1490

Change-Id: Id3e15983d5565680c05a0c454544003a615a4d7f
2018-01-29 11:57:00 -08:00
Linfeng Zhang
903bc150da Update vp9_iht4x4_16_add_neon()
Change-Id: Ica8dbe5f8167e5d370d89d233c598b70bba123b7
2018-01-29 10:25:24 -08:00
Linfeng Zhang
884d1681f8 Clean dct_const_round_shift() related neon code
Change-Id: I8f4e0fc6ecb77b623519f2dd3cd2886f89218ddd
2018-01-29 10:23:24 -08:00
Linfeng Zhang
2654afc16c Merge "cosmetic: clean idct neon functions" 2018-01-29 17:34:11 +00:00
Johann Koenig
ea1d0a6b53 Merge "Fix incorrect size reading" 2018-01-27 01:42:58 +00:00
Johann
738b829b8c Fix incorrect size reading
Cherry pick from vp9:

commit 85770264ac
Guard against incorrect size values moving *data past data_end.

Check read length against the difference of the buffers.

Change-Id: I5e8679ddd447c4d73deb80be5ec94841a92c5fcd
2018-01-26 15:51:50 -08:00
Jerome Jiang
3fa713caee Merge "vp9 svc: Update temporal_layering_mode in config change." 2018-01-26 22:45:39 +00:00
Jerome Jiang
cc91abb325 vp9 svc: Update temporal_layering_mode in config change.
temporal_layering_mode can be changed on the fly.

BUG=webm:1488

Change-Id: I223fd4085184e41878ddf0f9244d2e3d07636ae3
2018-01-26 13:38:04 -08:00
Marco
a9bbff1049 vp9-svc: Adjust logic on intra mode search.
For SVC, on spatial enhancement layer, intra
search was disabled unless best reference frame
is golden (i.e., spatial/inter-layer prediction),
except for some other conditions (lower layer is key
or golden is not an allowed reference).

Fix is to add the base temporal layer condition,
so intra search will not be force-disabled for base
temporal layer frames.

This improves metrics (-1-2%) for SVC 3 and 2 layer config.
Some small encode time is expected, but since condition
only affect base temporal layers (i.e., every 4 frames
for 3 layers), increase is small.

Change-Id: I10b824faef99560dfdeeb02ba8bf8e3e1eea6255
2018-01-25 19:11:42 -08:00
Marco
067457339b vp9-svc: Add QP dependency to thresh_svc_skip_golden.
In nonrd-pickmode: the golden/spatial reference for inter-layer
prediction may be skipped in the mode testing. Add QP dependency
to reduce the threshold for skipping (i.e., check it more often)
at high QP, if the lower layer was encoded at lower QP relative
to the current layer.

At high QP, a better quality lower resolution is more likely to
provide good spatial (inter-layer) prediction.

avgPSNR/SSIM metrics up by ~1% (all clips positive gain or neutral).
Some decrease in encode time (~1-2%) expected at lower bitrates,
for 3 layer SVC.

Change-Id: I9ee0f62d4b10d4ebd30165d378ecfa4399ae5ef1
2018-01-25 09:00:58 -08:00
Marco Paniconi
d069f4c29d Merge "vp9: Fix to vp9_svc sample encoder for bypass mode." 2018-01-24 23:56:48 +00:00
Johann Koenig
cee96c7d85 Merge "remove obsolete doxygen tags" 2018-01-24 23:44:12 +00:00
Marco
43caed4e42 vp9: Fix to vp9_svc sample encoder for bypass mode.
This fix makes it bitexact to the default SVC pattern,
for the example 2 temporal layer case.

Change-Id: I4df2063b70f7aecbfc7082f29c8439e05f6db8ac
2018-01-24 15:21:59 -08:00
Scott LaVarnway
15b261d854 Merge "BUG FIX: sse2 subpel variance is not PIC compliant" 2018-01-24 22:54:42 +00:00
Johann
3bfadfcd62 remove obsolete doxygen tags
warning: Tag `XML_SCHEMA' at line 941 of file `doxyfile' has become obsolete.

warning: Tag `XML_DTD' at line 947 of file `doxyfile' has become obsolete.

Change-Id: I85e39c4fb154569b8d7f68bdf362408983e9bd4f
2018-01-24 14:40:46 -08:00
Johann
f80be22a10 Release 1.7.0 Mandarin Duck
Change-Id: I186440f3643a85694f45400393efb661f6d012fc
2018-01-24 14:25:44 -08:00
Linfeng Zhang
6248f0c91f cosmetic: clean idct neon functions
Change-Id: I9c7c52567850aded0437b13ba1260e94441bc49d
2018-01-24 13:55:15 -08:00
Marco Paniconi
3b85a5beb7 Merge "vp9-svc: Re-adjust some aq-mode=3 control parameters." 2018-01-24 20:29:10 +00:00
Scott LaVarnway
cb9f4dc105 BUG FIX: sse2 subpel variance is not PIC compliant
BUG=webm:1464

Change-Id: Ibc15bac54aaf509365bed5892a26a29972ad3540
2018-01-24 05:58:54 -08:00
Scott LaVarnway
b9e44842fc Merge "vp9_quantize_fp_avx2()" 2018-01-24 13:58:08 +00:00
Marco
7c69136494 vp9-svc: Re-adjust some aq-mode=3 control parameters.
Remove an adjustment to two cyclic refresh (aq-mode= 3)
parameters for SVC. The adjustment was to reduce the
delta-qp on second segment, and reduce the motion threshold.
This was done early on in the SVC encoder development,
in the latest codebase removing this adjustment yields
some improvements in metrics.

The avgPSNR/SSIM metrics increase on average by ~1%
(most clip positive gain), for 3 and 2 layer SVC.

Change-Id: I7a4d5114f16b2a1df383dbe6b3fe02940e29e6cc
2018-01-23 20:14:00 -08:00
Johann Koenig
742ae4b24d Merge "update .clang-format for v5.0.0" 2018-01-24 04:03:23 +00:00
James Zern
81d66e2cc6 vpx_codec_enc_init_multi: fix segfault w/vp9
vp9 does not support multi-res encoding, the request should not crash.

+ encode_api_test: unconditionally expose multi-res test

vpx_codec_enc_init_multi should fail independent of
CONFIG_MULTI_RES_ENCODING if not for the same reason.

Change-Id: I44fc58ef70ee4e0e482cb6a5736885f4cb2a8517
(cherry picked from commit 004fb91416)
2018-01-23 18:14:23 -08:00
Jerome Jiang
9f36419bf2 Fix crash invalid params for vp8 multres. Add test.
Fix is from the patch in the issue.
Release memories allocated before early exit.

BUG=webm:1482

Change-Id: I64952af99c58241496e03fa55da09fd129a07c77
(cherry picked from commit 5b6ae020b6)
2018-01-23 18:14:14 -08:00