Commit Graph

18108 Commits

Author SHA1 Message Date
Jerome Jiang
a1689ed16b Merge "Fix build warnings for gcc 6.3" 2017-12-11 18:27:17 +00:00
paulwilkins
f1ce050f44 Bug fix for second reference stats.
Immediately following a key frame the trailing second reference
error in the first pass stats will be based on a reference frame from
the prior key frame group and will thus usually be much larger.

This fix eliminates that effect (which typically triggers a short arf
group immediately after a key frame). It also changes the accounting
for the first frame in each new arf group.

This change gives large gains on a couple of clips that contain mid
sequence key frames (e.g. 6% on 1080P tennis). Overall there was
a net gain in PSNR and PSNR-HVS ~(0.05- 0.4%) and mixed results for
SSIM (+/- 0.2%).

Change-Id: I8e00538ac2c0b5c2e7e637903cac329ce5c2a375
2017-12-08 10:05:36 +00:00
Jerome Jiang
2a602f745d Fix build warnings for gcc 6.3
Clean up some alias.

BUG=webm:1465

Change-Id: I99e186162db9f9e15375fef01564692434eda619
2017-12-07 13:42:10 -08:00
Jerome Jiang
14dbdd95e6 Merge "Add frame width & height to frame pkt. Add test." 2017-12-06 22:37:15 +00:00
Jerome Jiang
bd1d995cd3 Add frame width & height to frame pkt. Add test.
Used to return correct frame width and height when dynamic resizing happens.

BUG=webm:1474

Change-Id: Ia2043f7e1635b3821848a67b9b134f47f14b0f3a
2017-12-06 13:55:18 -08:00
Marco
3562d6b0a2 vp9-svc: Set downsampling filter for VGA layer.
Downsampling filter for SVC was set to subsample (phase 0)
for HD -> VGA, and bilinear averaging (phase 8) for VGA -> QVGA.
This change makes it bilinear averaging for HD -> VGA.

Given the recent commit 9f9d4f8, quality is improved with
this change: avgPSNR/SSIM up ~1-3% on HD clips in RTC set.
Speed decrease of ~1% for 3 layer SVC.

Change-Id: If834a320e372b8b922a6bf7cab4227703b1beae6
2017-12-06 12:01:24 -08:00
Marco Paniconi
575c1933ea Merge "vp9: Nonrd-pickmode: move some early exits up." 2017-12-06 19:18:51 +00:00
Hui Su
2e44f16443 Merge "Add max luma picture width/height constraint in VP9 level" 2017-12-06 18:46:19 +00:00
Marco
33953f310e vp9: Nonrd-pickmode: move some early exits up.
Move the early exit checks on usable_ref_frame and
skip_ref_find_pref up before the check on flag_svc_subpel.
The code under flag_svc_subpel requires frame_mv to be set
for the golden/spatial reference, which is only set if the
both those exits don't pass.

No change in behavior.

Change-Id: Id304276c745eeb389ff85fa2dcf510d5976bc413
2017-12-06 10:18:44 -08:00
Marco
9f9d4f8dc9 vp9-svc: Allow for nonzero motion on spatial reference.
For nonrd pickmode on a given spatial layer, the spatial
(golden) reference was always only using zeromv for prediction.
In this patch if the downsampling filter used for generating
the lower spatial layer is an averaging filter (nonzero phase),
we allow for subpel motion on the spatial (golden) reference to
compensate for the shift. This is done by forcing the testing of
nonzero motion mode to compensate for spatial downsampling shift.

Improvement for cases where the downsampling is averaging filter.
In the current code this is only done for generating
resolutions <= QVGA.

Improvement for avgPSNR/SSIM on RTC set for speed 7: ~1.2%.
Gain is larger (~2-3%) for VGA clips with 2 spatial layers.
~1% speed slowdown for 3 layer SVC on mac.

Change-Id: I9ec4fa20a38947934fc650594596c25280c3b289
2017-12-05 22:41:07 -08:00
Shiyou Yin
90ce21e519 Merge "vpx_dsp: [loongson] optimize variance v2." 2017-12-04 01:30:06 +00:00
Hui Su
07b12aad77 Add max luma picture width/height constraint in VP9 level
BUG=b/65412009

Change-Id: I9e1478dcbd2ef9e97f5f8fb5a1c733b5f5cdf396
2017-12-01 16:29:40 -08:00
Johann
e83d00f584 filter out asm includes
Don't add include files to the archive. Avoids build failures for
Windows such as:
the input file 'libvpx_g.a(x86_abi_support.asm.o)' has no sections

Change-Id: If9c8e70c0ec913b7ad7dd6a08d4fa19011114ad2
2017-12-01 15:03:51 -08:00
Johann
bdbecea1ba explicitly label .text sections
nasm should infer .text but does not for windows:
https://bugzilla.nasm.us/show_bug.cgi?id=3392451

Change-Id: Ib195465e5f33405f5ff61c4cf88aa2a72640cacb
2017-12-01 14:33:04 -08:00
Johann
65df957df6 nasm defaults to -Ox
No need to specify default behaviour. The original change introducing nasm:
7be093ea4d
mentions requiring 2.0.9, which was the first release to default to this behaviour:
http://www.nasm.us/doc/nasmdoc2.html
"The -Ox mode is recommended for most uses, and is the default since NASM 2.09."

Change-Id: Ia914c4deede5aa447277b5189bb4fcf7e54c338d
2017-12-01 14:33:04 -08:00
Johann Koenig
401e00792f Merge "pass 'win64' instead of 'x64' to the assembler" 2017-12-01 22:07:03 +00:00
Johann
460dbc01b5 pass 'win64' instead of 'x64' to the assembler
nasm does not accept x64

yasm has accepted (and appears to prefer) win64 at least as far back as
1.0.0:
http://yasm.tortall.net/releases/Release1.0.0.html

Change-Id: Ied881b1df0570da256b1bd7e131e7817e47f768f
2017-12-01 10:58:54 -08:00
Marco
8d0e7ac29a vp9-svc: Set num_inter_modes in non-rd pickmode.
Set num_inter_modes based on ref_mode_set_svc, which is
smaller set than ref_mode_set (which may use alt-ref).

No change in behavior.

Change-Id: I31169bb09028db230552c6fca0a86959d1ade692
2017-12-01 10:30:45 -08:00
Shiyou Yin
298f5ca47d vpx_dsp: [loongson] optimize variance v2.
1. Delete unnecessary zero setting process.
2. Optimize the method of calculating SSE in vpx_varianceWxH.

Change-Id: I58890c6a2ed1543379acb48e03e620c144f6515f
2017-12-01 13:44:48 +08:00
Kaustubh Raste
8099220e6c Merge "mips msa optimize vpx_scaled_2d function" 2017-12-01 01:24:25 +00:00
Marco Paniconi
c22ab8ab9f Merge "Nonrd-pickmode: avoid duplicate computation of UV predictor." 2017-12-01 00:23:52 +00:00
James Zern
9dbefc4b57 Merge "decouple spatial-svc from encoder abi" 2017-12-01 00:22:34 +00:00
Marco
2e701f7c29 Nonrd-pickmode: avoid duplicate computation of UV predictor.
Avoids duplicate computation of UV predictor.

Bit-exact when static_threshold is zero.
Small/neutral difference on RTC set with nonzero static_threshold
(since UV predictor won't be skipped with this change).

Small speed gain, ~1-2%, at speed 8.

Change-Id: Iba8d22a307768b391e29d63c9826aac5a4d9c285
2017-11-30 12:41:58 -08:00
James Zern
5044779e77 decouple spatial-svc from encoder abi
this is only meant for testing. along with --enable-experimental
--enable-spatial-svc require VPX_TEST_SPATIAL_SVC to be defined rather
than bumping the encoder ABI.

Change-Id: I7f34d9f60300fa31ccf22e1a4aa619392c391b2e
2017-11-30 10:52:25 -08:00
Marco
b409863c48 Fix to copy partition.
Update the prev_partition on early exits in
choose_partitioning().

Change-Id: I382ffcab8e647c00b14283d15c3dd11bb0ac6f50
2017-11-30 10:27:34 -08:00
Shiyou Yin
392e0188f6 Merge changes Icd9c866b,I81717e47
* changes:
  vp8: [loongson] optimize regular quantize v2.
  vp8: [loongson] optimize vp8_short_fdct4x4_mmi v2.
2017-11-30 00:53:50 +00:00
Shiyou Yin
8d70aef05f Merge "vpx: [loongson] fix bug in var_filter_block2d_bil_16x" 2017-11-30 00:53:37 +00:00
Jingning Han
9116e3d957 Merge "Add PSNR Cb and Cr metric to opsnr.stt" 2017-11-29 22:56:47 +00:00
Marco Paniconi
3437fe484a Merge "vp9-svc: Don't allow encode_breakout on golden ref." 2017-11-29 22:41:31 +00:00
Marco
49f51af4c9 vp9-svc: Don't allow encode_breakout on golden ref.
For 1 pass cbr SVC: GOLDEN is the spatial reference,
better not to check for encoder_breakout on this reference.

Small positive ~0.075% (mostly neutral) gain in avgPSNR/SSIM metrics.
No observed change in encoder speed.

Change-Id: Ib337f16d6771105bf06384c6a23ad047fc690418
2017-11-29 13:58:43 -08:00
Marco
0e94522338 vp9-svc: Clean conditon for allowing copy_partition.
Make condition explicit on non_reference_frame.

No change in behavior.

Change-Id: Iec5068bccd93c7c7be67634c5c090580b2dbb20d
2017-11-29 13:19:09 -08:00
Kyle Siefring
3ae909b0f9 Merge "Remove unnecessary includes of emmintrin_compat.h" 2017-11-29 19:14:45 +00:00
Kyle Siefring
a60da3a2eb Remove unnecessary includes of emmintrin_compat.h
Change-Id: Ie60381a0c6ee01f828cd364a43f01517f4cb03e9
2017-11-29 11:48:24 -05:00
Shiyou Yin
d49bf26b1c vp8: [loongson] optimize regular quantize v2.
1. Optimize the memset with mmi.
2. Optimize macro REGULAR_SELECT_EOB.

Change-Id: Icd9c866b0e6aef08874b2f123e9b0e09919445ff
2017-11-29 17:06:00 +08:00
Kaustubh Raste
339f4dcaee mips msa optimize vpx_scaled_2d function
Change-Id: I638507b360c71489ab0e87bd558d2719ad995333
2017-11-29 13:27:04 +05:30
Shiyou Yin
9966cc8d12 vp8: [loongson] optimize vp8_short_fdct4x4_mmi v2.
Optimize the calculate process of a,b,c,d.

Change-Id: I81717e47bc988ace1412d478513e7dd3cb6b0cc9
2017-11-29 12:58:37 +08:00
James Zern
c5f5f4ed17 vpx{enc,dec}: add --help
only output short usage to stderr on error, with --help use stdout

Change-Id: I7089f3bca829817e14b14c766f4f3eaee6f54e5c
2017-11-28 20:49:54 -08:00
Jingning Han
9bd3f1e30d Add PSNR Cb and Cr metric to opsnr.stt
Change-Id: I24e1741c00f9514647c7db2758a7ababd4e96932
2017-11-28 20:03:59 -08:00
Shiyou Yin
a0ca2a4079 vpx: [loongson] fix bug in var_filter_block2d_bil_16x
Which cause failed case:
1. MMI/VpxSubpelVarianceTest.Ref/6
2. MMI/VpxSubpelVarianceTest.Ref/7
3. MMI/VpxSubpelVarianceTest.ExtremeRef/6
4. MMI/VpxSubpelVarianceTest.ExtremeRef/7

Change-Id: I122ca20089e14ac324edd61295cf8f506e06afc8
2017-11-29 10:26:43 +08:00
Marco
f0b4868625 vp9-svc: Fix condition for setting downsampling filter.
Use (width * height) for setting downsampling filter type.

Change-Id: If4acfde7ff9339e0584155f8a4d15b2f134211f2
2017-11-28 16:28:29 -08:00
Johann
bd990cad72 quantize x86: dedup some parts
Change-Id: I9f95f47bc7ecbb7980f21cbc3a91f699624141af
2017-11-27 13:09:21 -08:00
Marco
cbe62b9c2d vp9-svc: Fix to the layer buffer settings.
For the case when the number of temporal layers > 1,
the buffer levels (starting/optimal_buffer_level,
and maximum_buffer_size) were not scaled properly.

In vp9_update_layer_context_change_config():
when setting the layer-buffer levels, fix is to scale
the layer-target_bandwidth by the target_bandwidth
(which is the full stream bandwidth) instead of the
spatial_layer_target.

This is needed because prior to the call
vp9_update_layer_context_change_config(), set_rc_buffer_sizes()
is called which sets the buffer levels based on target bandwidth
(which is the full bandwidth for the SVC stream).

This fix properly sets the layer-buffer levels based on the
layer-bandwidth, and leads to better rate targeting.

Small/neutral change in avgPSNR/SSIM metrics on RTC set.

Change-Id: Ic0f4f7f3487c37b9a9adb4781ae5edfed7140a57
2017-11-26 22:17:48 -08:00
Peter Collingbourne
9639641cd4 Merge "[CFI] Remove function pointer casts" 2017-11-21 18:42:40 +00:00
Jerome Jiang
50fc0d896b Merge "vp8 simulcast: fix compile warnings." 2017-11-21 01:22:46 +00:00
Vlad Tsyrklevich
bc29863b96 [CFI] Remove function pointer casts
Control Flow Integrity [1] indirect call checking verifies that function
pointers only call valid functions with a matching type signature. This
change eliminates function pointer casts to make libvpx CFI-safe.

[1] https://www.chromium.org/developers/testing/control-flow-integrity

Change-Id: I7e08522d195a43c88cda06fa20414426c8c4372c
2017-11-20 16:36:29 -08:00
Jerome Jiang
f49360d740 vp8 simulcast: fix compile warnings.
Clean up some prints.

Change-Id: I199350e34a8b6fbff9601fcbd11ec68d24da5073
2017-11-20 16:18:31 -08:00
Kyle Siefring
dd4cc5b596 Merge "Optimize AVX2 get16x16var and get32x16var functions" 2017-11-20 22:37:57 +00:00
Jerome Jiang
0cc23242b0 Merge "vp9 svc: fix a few compile warnings." 2017-11-20 18:52:58 +00:00
Marco
559166acfe vp9-svc: Enbale scale partition reference frames.
For reference frames: enable scale partition for
superblocks with low source sad or if bsize on lower-resoln
is at least 32x32.

Keep feature disabled for base temporal layer.

Small regression in avgPNSR/SSIM metrics, ~0.5-1%.
Speedup ~2-3% on mac for SVC (3 spatial/3 temporal layers) at speed 7.

Change-Id: I5987eb7763845b680059128b538bb5188be0cca5
2017-11-17 14:52:20 -08:00
Jerome Jiang
8b7a6ca60a vp9 svc: fix a few compile warnings.
Change-Id: I4cb878600038066513ab73f3658990d1245ff2fb
2017-11-17 14:40:05 -08:00