Commit Graph

18360 Commits

Author SHA1 Message Date
Jerome Jiang
a6ff396576 vp9: refactor vp9 datarate test for better sharding.
Change-Id: Icfaf29e1ca847ba9e3748700c9e09383ce8d1f65
2018-04-13 22:39:30 -07:00
James Zern
c9a459216d vpx_image: remove unused image formats
libvpx only emits:
VPX_IMG_FMT_{I420,I422,I440,I444,I42016,I42216,I44016,I44416}
and additionally supports YV12 as input.

interleaved yuv, rgb and alpha formats are unused.

Change-Id: Ie2ab1099e950c6e696f475d46882f5c47a174042
2018-04-09 16:25:50 -07:00
Marco Paniconi
be5df60801 Merge "vp9-svc: Make constrained_layer_drop default for svc." 2018-04-09 18:05:51 +00:00
Jerome Jiang
30a5cd80e2 Merge "Fix settings for num of tiles in samples & tests." 2018-04-09 17:03:59 +00:00
Marco Paniconi
0ea4e229a7 vp9-svc: Make constrained_layer_drop default for svc.
Switch the order of constrained and layer drop mode,
and keep constrained_layer_drop as the default.
Update the svc datarate tests.

Change-Id: I764270f7b4964b87b0cd3da6c2f96a628f212a30
2018-04-09 09:53:28 -07:00
Jerome Jiang
be4561248d Fix settings for num of tiles in samples & tests.
The control is set by log2 of number of threads (such that the number of
tiles is the same of number of threads).

Thus it should be log2(num_threads) instead of (num_threads >> 1).

Change-Id: I2ccec5557e660048dad3e561534e1c74fc8eec1f
2018-04-06 12:52:53 -07:00
Marco Paniconi
7255ff9b85 vp9-svc: Hybrid search on spatial layers whose base is key.
For spatial layers whose base is a key frame, i.e., when
svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame = 1,
allow for hybrid search, similar to what we do on key frames.

For small blocks (<= 8x8) rd-based intra search will be used,
otherwise non-rd pick mode is used.

Feature is controlled by nonrd_keyframe, which is set to 1
for now on non-base spatial layers, so this change has
currently no effect.

Small change only when inter-layer prediction is off, as we now
call vp9_pick_intra_mode instead of vp9_pick_inter_mode on key frame.
But this change is very small/insignificant.

Change-Id: I5372470f720812926ebbe6c4ce68c04336ce0bdd
2018-04-06 11:36:48 -07:00
Johann Koenig
cfc6dc8db3 Merge "remove support for yuv 411" 2018-04-06 15:26:59 +00:00
Marco Paniconi
4934e52e43 Revert "vp9-svc: Fix to first superframe when inter_layer is off."
This reverts commit 5cc8df5bcf.

Reason for revert: <INSERT REASONING HERE>
We need to do this on all key frames in the stream (not just the first one). Will make another cleaner change for this.

Original change's description:
> vp9-svc: Fix to first superframe when inter_layer is off.
> 
> When the application selects the setting INTER_LAYER_PRED_OFF
> each spatial stream should be decodeable separately.
> For this we need to force key frames on all spatial layers
> on the first superframe.
> 
> In order to maintain the quality at the beginning of the stream
> the active_worst for spatial layer of the second superframe is set
> to the last_QP of the correspondng spatial layer of the first superframe.
> Also make sure nonrd_keyframe is set for non-base spatial layers.
> 
> Change only affects SVC mode wit number_spatial_layers > 1 and
> svc->disable_inter_layer_pred == INTER_LAYER_PRED_OFF.
> And only affects first and second frame of sequence.
> 
> Change-Id: I8ee9a0873ab1d3a02515774571f719617771ad41

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

Change-Id: If73d9f3932224fc6751e773763adf7e8ee67d17f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
2018-04-06 05:41:56 +00:00
Marco Paniconi
5cc8df5bcf vp9-svc: Fix to first superframe when inter_layer is off.
When the application selects the setting INTER_LAYER_PRED_OFF
each spatial stream should be decodeable separately.
For this we need to force key frames on all spatial layers
on the first superframe.

In order to maintain the quality at the beginning of the stream
the active_worst for spatial layer of the second superframe is set
to the last_QP of the correspondng spatial layer of the first superframe.
Also make sure nonrd_keyframe is set for non-base spatial layers.

Change only affects SVC mode wit number_spatial_layers > 1 and
svc->disable_inter_layer_pred == INTER_LAYER_PRED_OFF.
And only affects first and second frame of sequence.

Change-Id: I8ee9a0873ab1d3a02515774571f719617771ad41
2018-04-05 21:25:55 -07:00
Marco Paniconi
a4e453f668 vp9-svc: Fix to disable cyclic refresh on key superframes.
Cyclic refresh is disabled on key frames, but we did not
disable it for for spatial layers whose base is a key frame
(i.e., on a key-superframe).

This fix means generally somewhat lower frame-level QP will be
used for those spatial layers whose base is a key frame,
which will generally mean little better quality for the
key-superframes.

Change-Id: Idf090651aa2f5856fb6696c89198a9f6d5d50280
2018-04-05 15:58:36 -07:00
Johann
ac4dc51027 update codereview.settings
Using pdfium as a reference:
https://pdfium.googlesource.com/pdfium/+/master/codereview.settings

Change-Id: I30874cf9f1d575325c32342146137a1952db91ba
2018-04-05 12:18:38 -07:00
Johann
000c276ffa ios configure: quiet shell warning
Generating file lists on a non-mac with:
--target=x86-iphonsimulator-gcc --enable-external-build
the lack of xcrun would cause a warning to print:
libvpx/build/make/configure.sh: line 1397: [: : integer expression expected

Change-Id: I4623b6c5b65296bc71986cd042823f4be9427b42
2018-04-04 11:53:11 -07:00
Marco Paniconi
9336197663 Merge "vp9-svc: Fix in choose_partitioning for different scaling." 2018-04-04 05:59:00 +00:00
Marco Paniconi
742e93f030 Merge "Fix to svc sample enocoder for visual studio build." 2018-04-04 02:15:56 +00:00
Marco Paniconi
c9b6c5d5ad vp9-svc: Fix in choose_partitioning for different scaling.
In the SVC encoder LAST ref frame should be the last temporal
reference at the same resolution. This is the case for the default/fixed
patterns, but may not be the case for arbitrary pattern in flexible mode.

Add check that the LAST reference frame has same resolution as the current frame.
If the reference scale for LAST is different from current treat the current
frame as key frame just for the purpose of superblock partitioning.
This avoids potential segfault in vp9_int_pro_motion_estimation() for different
scaled reference.

Change-Id: I4276ff616de46cd4e12c73316f85ae313f170242
2018-04-03 16:21:44 -07:00
Linfeng Zhang
47f22fc5fb rm CONVERT_TO_SHORTPTR in vpx_highbd_comp_avg_pred
BUG=webm:1388

Change-Id: I1d0dd9af52a1461e3e2b2d60e8c4b6b74c3b90b0
2018-04-03 15:36:41 -07:00
Marco Paniconi
cb63aefa45 Fix to svc sample enocoder for visual studio build.
Fix to sample encoder, for visual studio buid failure:
conversion from 'uint64_t' to 'int'.

Change-Id: I385ab8482e1ee97da9872437f8286d9071e38e0e
2018-04-03 15:09:09 -07:00
Johann
b2c6e1410f remove support for yuv 411
Previously we attempted to convert 411 input. Remove support
because malformed 411 input can cause the conversion to crash.

BUG=webm:1386

Change-Id: I3d41465a94867ee7f8eaa43fb76beb41f8fa644b
2018-04-02 15:37:26 -07:00
Marco Paniconi
ee37046f1b vp9-svc: Fix to svc sample encoder for write_out.
When writing out stream for spatial layer N,
make sure to include all spatial layers up to N.

Fixes an issue with the streams when frame dropping occurs.

Change-Id: I1e20b7dac6b94dcda751043541dd8a12f7df6d8c
2018-04-02 12:57:35 -07:00
Johann Koenig
99fa889f91 Merge "helper script for sanitizer testing" 2018-04-02 18:30:28 +00:00
Linfeng Zhang
c3ba5c521e Merge changes I5704bd66,I4d548e97
* changes:
  Shrink size of mode_map in struct TileDataEnc
  Update sad4d x86 functions
2018-04-02 16:05:05 +00:00
James Zern
eae638db15 Merge "vp9_datarate_test: relax over shoot constraints" 2018-03-31 00:49:11 +00:00
Jerome Jiang
c706c02291 Merge "VP9 SVC: Write bitstream for each spatial layer in sample." 2018-03-30 23:57:21 +00:00
James Zern
2b9c017cf0 vp9_datarate_test: relax over shoot constraints
in BasicRateTargetingVBRLagZero and
BasicRateTargetingVBRLagNonZeroFrameParDecOff after:
e0b28ad69 Add extra case to wq_err_divisor()

BUG=webm:1512

Change-Id: Id181613cc191ff2a2281deffe141efb982501edf
2018-03-30 16:44:41 -07:00
Jerome Jiang
1d6f930517 VP9 SVC: Write bitstream for each spatial layer in sample.
Added control for denoiser in the sample SVC encoder.

Change-Id: I8e62aa2fc13a943eb110cb33e419e912a898bbc7
2018-03-30 15:31:35 -07:00
Jerome Jiang
01b19a1c3e Code cleanup for datarate tests.
Add/Remove static to functions. Name change.

Change-Id: I5de3efc23cd151fe8e70fe67a7a11acfcfa707dc
2018-03-30 10:47:41 -07:00
Jerome Jiang
4127799a91 Split datarate_test.cc to vp8, vp9, svc ones.
As we add more tests to datarate_test.cc, it's growing bigger and hard
to find specific test.

Split it to vp8, vp9 and svc ones.

Change-Id: Ie8c302010cf304a95554bee19d87ddc90498d0fb
2018-03-29 16:40:20 -07:00
James Zern
d636fe53af Merge "test: use testing::*tuple instead of std::tr1" 2018-03-29 19:01:34 +00:00
Marco Paniconi
81e78a1d5f Merge "vp9-svc: Fix in pickmode for key frames." 2018-03-29 18:49:26 +00:00
Jerome Jiang
d467bbe11e Merge "VP9 SVC: Add enum type for framedrop_mode." 2018-03-29 18:44:35 +00:00
Jerome Jiang
70b86af22e VP9 SVC: Add enum type for framedrop_mode.
Change-Id: I3d4697b00729553e0860762b9264e29b8a89b9d4
2018-03-29 10:49:06 -07:00
Johann
20521c394c helper script for sanitizer testing
source tools/set_analyzer_env.sh <sanitizer>
will set the compiler, flag, and sanitizer variables necessary to build
and run a variety of sanitizers.

Change-Id: I5dd2ae947cb337d5ccf2a11e9fe87991bc8ba0c8
2018-03-29 06:58:30 -07:00
xiwei gu
5476ab095f Merge "vp9: [loongson] optimize vpx_convolve8 with mmi." 2018-03-29 01:05:33 +00:00
Marco Paniconi
fe72ba15ac vp9-svc: Fix in pickmode for key frames.
For the fixed/default SVC patterns, GOLDEN is the
spatial reference, except on key frames, where LAST
is labeled as the spatial reference.

The current code was assuming GOLDEN is always the
spatial reference for the purpose of selecting the
subpel motion (due to the downsampling filter).

Fix is make sure flag_svc_subpel is set and used
with spatial_ref, which is labeled as the proper
spatial reference before entering mode check.

Some quality improvement on key frames.
Change-Id: Id236bcd47055b035731cc910ed84449d7e29f50c
2018-03-28 16:57:08 -07:00
Marco Paniconi
382afcab98 Merge "vp9-svc: Modify logic for frame dropping with spatial layers." 2018-03-28 21:29:35 +00:00
Marco Paniconi
e358cf0a43 vp9-svc: Modify logic for frame dropping with spatial layers.
In the constrained framedrop mode for svc: modify the buffer check
condition relative to (non-zero) dropmark to include uppper spatial layers,
in addition to the current spatial layer.

But keep the single layer check if the buffer goes below zero, since
in this case (buffer underflow) we should force drop of that layer
regardless of upper layers.

Change-Id: Id277f0b4a3ae6275effdd5f5f0c80e3229c17424
2018-03-28 13:00:00 -07:00
Linfeng Zhang
cd83802885 Shrink size of mode_map in struct TileDataEnc
To reduce the memcpy() cycles in vp9_rd_pick_inter_mode_sb().
The maximum value of mode_map is (MAX_MODES - 1) = 29.

Change-Id: I5704bd66838ea0b075f0afb001f5cbebfd3f1602
2018-03-28 12:50:31 -07:00
Linfeng Zhang
39de45d3cc Update sad4d x86 functions
Speed change is marginal.

Change-Id: I4d548e9763ce43bd546f19132202f7a8509a32bf
2018-03-28 12:49:12 -07:00
James Zern
db49a22cfa test: use testing::*tuple instead of std::tr1
googletest imports tuple into testing to allow for compatibility across
c++ versions where tuple may be in std::tr1 or std. fixes deprecation
warnings under visual studio 2017

Change-Id: Id78b372d5478b12d8c8f63fd3f2166fec25aa8be
2018-03-28 12:45:35 -07:00
Linfeng Zhang
debd86ec82 Merge "Add speed test in SADx4Test" 2018-03-28 19:39:37 +00:00
Linfeng Zhang
8edd5051aa Add speed test in SADx4Test
Change-Id: I42dd3df8c13c0a6d08ce28e27e8917b5d831fc1a
2018-03-28 11:13:28 -07:00
gxw
25d9adb74b vp9: [loongson] optimize vpx_convolve8 with mmi.
1. vpx_convolve8_vert_mmi
2. vpx_convolve8_horiz_mmi
3. vpx_convolve8_mmi
4. vpx_convolve8_avg_mmi
5. vpx_convolve8_avg_vert_mmi

Change-Id: I41a6b3b4f327d6b67d282e0163cfa0aee8648abe
2018-03-28 18:11:16 +00:00
Marco Paniconi
872e34ae8d vp9-svc: Add check in datarate unittests for frame-dropping.
Add verfication for constrained svc framedrop mode: check that
if a given spatial is dropped, all uppper layers must be dropped.

Change-Id: I9b4821b23c95d1d9d0c031a41af19984647ec5dc
2018-03-28 10:30:59 -07:00
Marco Paniconi
7b9984b386 vp9-svc: Add logic to enable for constrained framedrop.
Add the logic for the constrained framdrop mode for SVC.

Add test case in datarate unittests.
Also lower target bitrates in the tests to better test
frame dropper.

Change-Id: I8ee1b8cb56d835c233ad1fbe0fc1456cb2e7291f
2018-03-27 15:02:12 -07:00
Johann Koenig
239511fad8 Merge "third_part/googletest: update to release-1.8.0-742-g7857975" 2018-03-27 01:08:12 +00:00
Marco Paniconi
223f9e3671 vp9-svc: Allow for setting frame drop thresholds per layer.
Add encoder control to set the frame drop thresholds per
spatial layer, and add a frame drop mode: 0 = per-layer drop,
and 1 = constrained drop mode (a drop on a given layer forces
drops to all upper layers).

Default is mode 0 (per-layer dropping).
Implementation for mode 1 will come in subsequent change.

If the control is not used, then the spatial layer frame
drop thresholds (water mark) are all equal and set to the value
given by the encoder config (oxcf->drop_frames_water_mark).

Bump up the ABI version.

Change-Id: Id038d4181b86fa98b3d44d026f96d5f344d81629
2018-03-26 13:56:55 -07:00
Johann
aa5e9c6a7c third_part/googletest: update to release-1.8.0-742-g7857975
Address std::tr1::tuple warnings:
https://github.com/google/googletest/issues/1111

The unsigned overflow fix has been superseded by:
https://github.com/google/googletest/pull/1180

Change-Id: I92dc0ba08a4d0d63f5e5b2da7b64f4a4642ed9ab
2018-03-26 11:29:11 -07:00
Johann
9037a05041 msvs build: only fix_file_list when it is broken
Clears a warning when generating VS project files with older versions of
bash:
declare: -n: invalid option

Change-Id: Id0c0bc17dc5a1599f7d2d73e3cc9259a45540f3f
2018-03-26 09:39:24 -07:00
Paul Wilkins
2b800d9394 Merge "Adjustment to initial q range estimate and kf boost." 2018-03-24 11:27:12 +00:00