platform/upstream/libvpx.git
6 years agoAdd 2 to 1 scaling NEON optimization
Linfeng Zhang [Tue, 5 Sep 2017 22:07:00 +0000 (15:07 -0700)]
Add 2 to 1 scaling NEON optimization

BUG=webm:1419

Change-Id: I99c954ffa50a62ccff2c4ab54162916141826d9b

6 years agoRefactor convolve8 NEON functions
Linfeng Zhang [Tue, 5 Sep 2017 21:48:17 +0000 (14:48 -0700)]
Refactor convolve8 NEON functions

Change-Id: I4ac576875c91fee7cb150d298fae4a2c156d374c

6 years agoAdd ScaleFrameTest
Linfeng Zhang [Tue, 5 Sep 2017 21:38:45 +0000 (14:38 -0700)]
Add ScaleFrameTest

Move class VpxScaleBase to new file test/vpx_scale_test.h.
Add new file test/vp9_scale_test.cc with ScaleFrameTest.

BUG=webm:1419

Change-Id: Iec2098eafcef99b94047de525e5da47bcab519c1

6 years agoMerge "Remove get_filter_base() and get_filter_offset() in convolve"
Linfeng Zhang [Wed, 6 Sep 2017 22:39:15 +0000 (22:39 +0000)]
Merge "Remove get_filter_base() and get_filter_offset() in convolve"

6 years agoMerge "vpxdsp: [x86] add highbd_dc_128_predictor functions"
Scott LaVarnway [Wed, 6 Sep 2017 21:53:32 +0000 (21:53 +0000)]
Merge "vpxdsp: [x86] add highbd_dc_128_predictor functions"

6 years agoRemove support for stdatomic.h.
Peter Boström [Wed, 6 Sep 2017 15:48:42 +0000 (11:48 -0400)]
Remove support for stdatomic.h.

This header doesn't build on g++ v6 as it's a C and not C++ header
(_Atomic is not a keyword in C++11). Since the C and C++ invocations
cannot be guaranteed to point to the same underlying atomic_int
implementation, remove support for them and use compiler intrinsics
instead.

BUG=webm:1461

Change-Id: Ie1cd6759c258042efc87f51f036b9aa53e4ea9d5

6 years agoRemove get_filter_base() and get_filter_offset() in convolve
Linfeng Zhang [Mon, 28 Aug 2017 17:35:43 +0000 (10:35 -0700)]
Remove get_filter_base() and get_filter_offset() in convolve

so that the convolve functions are independent of table alignment.

Change-Id: Ieab132a30d72c6e75bbe9473544fbe2cf51541ee

6 years agovpxdsp: [x86] add highbd_dc_128_predictor functions
Scott LaVarnway [Tue, 5 Sep 2017 14:52:36 +0000 (07:52 -0700)]
vpxdsp: [x86] add highbd_dc_128_predictor functions

C vs SSE2 speed gains:
_4x4 : ~7.64x
_8x8 : ~16.60x
_16x16 : ~8.15x
_32x32 : ~5.05x

BUG=webm:1411

Change-Id: If165d419711cfda901bd428a05ca1560a009e62e

6 years agotest,Android.mk: export gtest include path
James Zern [Fri, 1 Sep 2017 03:07:01 +0000 (20:07 -0700)]
test,Android.mk: export gtest include path

fixes test file builds

Change-Id: Iaa725ad95d56cf77d9fef8994981a80102e9a966

6 years agoapply clang-format
clang-format [Mon, 28 Aug 2017 01:26:24 +0000 (18:26 -0700)]
apply clang-format

Change-Id: If4c3e8a396d0fcb304f407b44e28cac3219f038c

6 years ago.clang-format: update to 4.0.1
James Zern [Mon, 28 Aug 2017 01:22:04 +0000 (18:22 -0700)]
.clang-format: update to 4.0.1

based on Google style with the following differences:

3a4
> # Generated with clang-format 4.0.1
13c14
< AllowShortCaseLabelsOnASingleLine: false
---
> AllowShortCaseLabelsOnASingleLine: true
23c24
< BraceWrapping:
---
> BraceWrapping:
43c44
< ConstructorInitializerAllOnOneLineOrOnePerLine: true
---
> ConstructorInitializerAllOnOneLineOrOnePerLine: false
46,47c47,48
< Cpp11BracedListStyle: true
< DerivePointerAlignment: true
---
> Cpp11BracedListStyle: false
> DerivePointerAlignment: false
51c52
< IncludeCategories:
---
> IncludeCategories:
78c79
< PointerAlignment: Left
---
> PointerAlignment: Right
80c81
< SortIncludes:    true
---
> SortIncludes:    false

Change-Id: Ibc0ef87a516b8eae88d426dfdd7624be57e7b87c

6 years agoMerge "Prevent data race from low-pass filter."
Peter Boström [Fri, 1 Sep 2017 05:37:51 +0000 (05:37 +0000)]
Merge "Prevent data race from low-pass filter."

6 years agoMerge "inv_txfm_vsx: fix loads in high-bitdepth"
James Zern [Fri, 1 Sep 2017 03:09:49 +0000 (03:09 +0000)]
Merge "inv_txfm_vsx: fix loads in high-bitdepth"

6 years agoPrevent data race from low-pass filter.
Peter Boström [Thu, 31 Aug 2017 21:33:59 +0000 (14:33 -0700)]
Prevent data race from low-pass filter.

Makes main thread wait for the filter level to be picked to avoid a race
between the LPF thread and update_reference_frames(). This also
re-enables the failing tests under thread_sanitizer where this data race
was detected.

BUG=webm:1460

Change-Id: I7f5797142ea0200394309842ce3e91a480be4fbc

6 years agoMerge "Add atomics to vp8 synchronization primitives."
Peter Boström [Fri, 1 Sep 2017 01:36:22 +0000 (01:36 +0000)]
Merge "Add atomics to vp8 synchronization primitives."

6 years agoAdd atomics to vp8 synchronization primitives.
Peter Boström [Fri, 25 Aug 2017 22:48:11 +0000 (15:48 -0700)]
Add atomics to vp8 synchronization primitives.

Fixes issue on iPad Pro 10.5 (and probably other places) where threads
are not properly synchronized. On x86 this data race was benign as load
and store instructions are atomic, they were being atomic in practice as
the program hasn't been observed to be miscompiled.

Such guarantees are not made outside x86, and real problems manifested
where libvpx reliably reproduced a broken bitstream for even just the
initial keyframe. This was detected in WebRTC where this device started
using multithreading (as its CPU count is higher than earlier devices,
where the problem did not manifest as single-threading was used in
practice).

This issue was not detected under thread-sanitizer bots as mutexes were
conditionally used under this platform to simulate the protected read
and write semantics that were in practice provided on x86 platforms.

This change also removes several mutexes, so encoder/decoder state is
lighter-weight after this change and we do not need to initialize so
many mutexes (this was done even on non-thread-sanitizer platforms where
they were unused).

Change-Id: If41fcb0d99944f7bbc8ec40877cdc34d672ae72a

6 years agoMerge "vpxdsp: [x86] add highbd_dc_left_predictor functions"
Scott LaVarnway [Thu, 31 Aug 2017 21:34:27 +0000 (21:34 +0000)]
Merge "vpxdsp: [x86] add highbd_dc_left_predictor functions"

6 years agoMerge "vp9: Skip testing duplicate zero mv in nonrd-pickmode."
Jerome Jiang [Thu, 31 Aug 2017 17:16:19 +0000 (17:16 +0000)]
Merge "vp9: Skip testing duplicate zero mv in nonrd-pickmode."

6 years agovp9: Skip testing duplicate zero mv in nonrd-pickmode.
Jerome Jiang [Tue, 29 Aug 2017 20:36:34 +0000 (13:36 -0700)]
vp9: Skip testing duplicate zero mv in nonrd-pickmode.

Neutral on rtc set for speed 8. Neutral on ytlive for speed 5.

Saves some computation cycles but no speed gain observed on Pixel.

Change-Id: I34c4642cd543aa89c5b9c4bff6b7113577c64c91

6 years agoinv_txfm_vsx: fix loads in high-bitdepth
James Zern [Thu, 31 Aug 2017 06:47:56 +0000 (23:47 -0700)]
inv_txfm_vsx: fix loads in high-bitdepth

vec_vsx_ld -> load_tran_low

Change-Id: Id3144cdd528d2d406a515e5812e2ea9e4db64bf1

6 years agoMerge "Revert "Re-enable disabled tests under TSan.""
Jerome Jiang [Thu, 31 Aug 2017 01:52:42 +0000 (01:52 +0000)]
Merge "Revert "Re-enable disabled tests under TSan.""

6 years agoRevert "Re-enable disabled tests under TSan."
Jerome Jiang [Wed, 30 Aug 2017 23:44:21 +0000 (23:44 +0000)]
Revert "Re-enable disabled tests under TSan."

This reverts commit df9ce12259a4e866feeb580d2e0cf9648f60d3b5.

Reason for revert:

Re-enabled tests still fail tsan in high bitdepth.

Original change's description:
> Re-enable disabled tests under TSan.
>
> These tests point to an already-fixed bug, this should no longer have a
> data race.
>
> BUG=webm:1049
>
> Change-Id: Iaedc5db8df99362bdc501b70ff7fdebf8756fdb8

TBR=jzern@google.com,pbos@chromium.org,builds@webmproject.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webm:1049
Change-Id: I232f1f7726bf795b301abfb2e07cad6756642e53

6 years agovpxdsp: [x86] add highbd_dc_left_predictor functions
Scott LaVarnway [Wed, 30 Aug 2017 16:13:14 +0000 (09:13 -0700)]
vpxdsp: [x86] add highbd_dc_left_predictor functions

C vs SSE2 speed gains:
_4x4 : ~6.49x
_8x8 : ~10.82x
_16x16 : ~7.61x
_32x32 : ~5.29x

BUG=webm:1411

Change-Id: Ibc30c50cb7139049bf05298010803499e6ef949b

6 years agoMerge "vpxdsp: [x86] add highbd_dc_top_predictor functions"
Scott LaVarnway [Wed, 30 Aug 2017 11:25:07 +0000 (11:25 +0000)]
Merge "vpxdsp: [x86] add highbd_dc_top_predictor functions"

6 years agovpxdsp: [x86] add highbd_dc_top_predictor functions
Scott LaVarnway [Tue, 29 Aug 2017 18:25:32 +0000 (11:25 -0700)]
vpxdsp: [x86] add highbd_dc_top_predictor functions

C vs SSE2 speed gains:
_4x4 : ~7.39x
_8x8 : ~11.36x
_16x16 : ~8.68x
_32x32 : ~4.33x

BUG=webm:1411

Change-Id: I7f1487cd1531d4e7f0fbb4596fed3bfb72a59d58

6 years agoMerge "vp9: Speed 8: Enable skip_encode_sb"
Jerome Jiang [Tue, 29 Aug 2017 16:45:09 +0000 (16:45 +0000)]
Merge "vp9: Speed 8: Enable skip_encode_sb"

6 years agoMerge "Re-enable disabled tests under TSan."
Peter Boström [Tue, 29 Aug 2017 15:42:39 +0000 (15:42 +0000)]
Merge "Re-enable disabled tests under TSan."

6 years agoMerge "vpxdsp: [x86] add highbd_h_predictor functions"
Scott LaVarnway [Tue, 29 Aug 2017 14:05:13 +0000 (14:05 +0000)]
Merge "vpxdsp: [x86] add highbd_h_predictor functions"

6 years agovpxdsp: [x86] add highbd_h_predictor functions
Scott LaVarnway [Mon, 28 Aug 2017 14:26:08 +0000 (07:26 -0700)]
vpxdsp: [x86] add highbd_h_predictor functions

C vs SSE2 speed gains:
_4x4 : ~8.12x
_8x8 : ~9.71x
_16x16 : ~8.21x
_32x32 : ~5.0x

BUG=webm:1422

Change-Id: I5e8a1ed4db7b8dc539b3e2a728b0b34d8b4b1993

6 years agovp9: Speed 8: Enable skip_encode_sb
Jerome Jiang [Tue, 29 Aug 2017 00:05:48 +0000 (17:05 -0700)]
vp9: Speed 8: Enable skip_encode_sb

Neutral in borg tests.

Some clips show 3-4% speed gain on 2 threads on Pixel.

Change-Id: Ic959f34e44892a854551de6e9a3d9ec819ffed00

6 years agoRe-enable disabled tests under TSan.
Peter Boström [Mon, 28 Aug 2017 23:23:16 +0000 (16:23 -0700)]
Re-enable disabled tests under TSan.

These tests point to an already-fixed bug, this should no longer have a
data race.

BUG=webm:1049

Change-Id: Iaedc5db8df99362bdc501b70ff7fdebf8756fdb8

6 years agovp9: Remove resolution condition for using source_sad in speed 6.
Jerome Jiang [Mon, 28 Aug 2017 19:48:19 +0000 (12:48 -0700)]
vp9: Remove resolution condition for using source_sad in speed 6.

Rev d147771 fixed the test failure. So remove the resolution condition
for using source_sad in speed 6.

BUG=webm:1452

Change-Id: I1efba97e1ef5bd4de5f886299f6fcb907187abcd

6 years agoMerge "vp9: Speed 6 adapt_partition for live/vbr usage."
Marco Paniconi [Fri, 25 Aug 2017 22:00:08 +0000 (22:00 +0000)]
Merge "vp9: Speed 6 adapt_partition for live/vbr usage."

6 years agoMerge "vp9: SVC: Modify mv search condition in speed features."
Marco Paniconi [Fri, 25 Aug 2017 21:46:35 +0000 (21:46 +0000)]
Merge "vp9: SVC: Modify mv search condition in speed features."

6 years agovp9: Speed 6 adapt_partition for live/vbr usage.
Marco [Mon, 21 Aug 2017 23:39:56 +0000 (16:39 -0700)]
vp9: Speed 6 adapt_partition for live/vbr usage.

Enable adapt_partition for vbr mode for speed 6.
This allows the usage of the pickmode-based partition
(used in speed 5), but only selectively for superblocks
with high source sad, otherwise the faster variance based
partition scheme is used.

For speed 6 on ytlive set: avgPSNR/SSIM metrics up by ~0.6%,
several clips up by ~1.5%. Small/negligible decrease in speed.

Change-Id: I12f3efef6b3e059391de330fdbe5a44c2587f1f8

6 years agoMerge "Revert "quantize avx: copy 32x32 implementation""
Marco Paniconi [Fri, 25 Aug 2017 18:20:31 +0000 (18:20 +0000)]
Merge "Revert "quantize avx: copy 32x32 implementation""

6 years agovp9: SVC: Modify mv search condition in speed features.
Marco [Fri, 25 Aug 2017 16:59:57 +0000 (09:59 -0700)]
vp9: SVC: Modify mv search condition in speed features.

For SVC at speed >= 7: only use the improved mv search
on base spatial layer, if top layer resolution is above 640x360.

~2.3% speedup
Small/negligible loss in avgPSNR metrics on rtc set.

Change-Id: Iaef75a57ebf1c248931bc1aa28d20b7fecac1851

6 years agoRevert "quantize avx: copy 32x32 implementation"
Marco Paniconi [Fri, 25 Aug 2017 16:56:08 +0000 (16:56 +0000)]
Revert "quantize avx: copy 32x32 implementation"

This reverts commit f60d1dcd3de46f72bafc5eeef481bd1a4e203301.

Reason for revert: <INSERT REASONING HERE>
Failures in AVX/VP9QuantizeTest in nightly tests.
Original change's description:
> quantize avx: copy 32x32 implementation
>
> Ensure avx and ssse3 stay in sync by testing them against each other.
>
> Change-Id: I699f3b48785c83260825402d7826231f475f697c

TBR=slavarnway@google.com,johannkoenig@google.com,builds@webmproject.org

Change-Id: Ibd38636212269328317dd0721be9d25452113d1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

6 years agoMerge "vpx_dsp:loongson optimize vpx_varianceWxH_c,vpx_sub_pixel_varianceWxH_c and...
Shiyou Yin [Fri, 25 Aug 2017 06:44:02 +0000 (06:44 +0000)]
Merge "vpx_dsp:loongson optimize vpx_varianceWxH_c,vpx_sub_pixel_varianceWxH_c and vpx_sub_pixel_avg_varianceWxH_c with mmi."

6 years agoMerge "vp9: Adjust 16x16 splot threshold for variance partition"
Marco Paniconi [Thu, 24 Aug 2017 22:26:43 +0000 (22:26 +0000)]
Merge "vp9: Adjust 16x16 splot threshold for variance partition"

6 years agoMake sure diff is present at configure time.
Tom Finegan [Thu, 24 Aug 2017 19:11:48 +0000 (12:11 -0700)]
Make sure diff is present at configure time.

This avoids an endless build loop at vpx_version.h
creation time when diff is not present.

Change-Id: I16ae386dbdaf14f9a2b85e4c5d1aaa6c08f52a45

6 years agoMerge "quantize avx: copy 32x32 implementation"
Johann Koenig [Thu, 24 Aug 2017 18:55:03 +0000 (18:55 +0000)]
Merge "quantize avx: copy 32x32 implementation"

6 years agovpx_dsp:loongson optimize vpx_varianceWxH_c,vpx_sub_pixel_varianceWxH_c and vpx_sub_p...
Shiyou Yin [Thu, 24 Aug 2017 15:11:58 +0000 (23:11 +0800)]
vpx_dsp:loongson optimize vpx_varianceWxH_c,vpx_sub_pixel_varianceWxH_c and vpx_sub_pixel_avg_varianceWxH_c with mmi.

Change-Id: Ia576a721df6312329b599c31cfe1fb1267a9f174

6 years agovp9: Adjust 16x16 splot threshold for variance partition
Marco [Thu, 24 Aug 2017 17:36:27 +0000 (10:36 -0700)]
vp9: Adjust 16x16 splot threshold for variance partition

For speeds < 7, increase threshold that controls the split
of 16x16->8x8 blocks, for resolutions 720p and higher.

Minor change for speed 5 (since it uses reference partition scheme
which only uses variance partition as first step).
For speed 6: ~0.5% increase in avgPSNR/SSIM metrics on ytlvie set.
No change in speed.

Change-Id: I5126580973201538d8ca26a9256b93c4d11d685b

6 years agoMerge "quantize test: skip block was removed"
Johann Koenig [Thu, 24 Aug 2017 17:43:10 +0000 (17:43 +0000)]
Merge "quantize test: skip block was removed"

6 years agoquantize avx: copy 32x32 implementation
Johann [Wed, 23 Aug 2017 20:59:33 +0000 (13:59 -0700)]
quantize avx: copy 32x32 implementation

Ensure avx and ssse3 stay in sync by testing them against each other.

Change-Id: I699f3b48785c83260825402d7826231f475f697c

6 years agoquantize ssse3: copy implementation to intrinsics
Johann [Wed, 16 Aug 2017 20:10:59 +0000 (13:10 -0700)]
quantize ssse3: copy implementation to intrinsics

Still does not pass tests. Does match the previous assembly, although
saving the sign before multiplying is dubious.

Change-Id: Ia163f18c755aba542d6e93f7bf7343184660df5a

6 years agoquantize test: skip block was removed
Johann [Thu, 24 Aug 2017 14:21:42 +0000 (07:21 -0700)]
quantize test: skip block was removed

Change-Id: I1d93698bc27529b0544d79dd7b9fe37afa51ef87

6 years agoMerge "quantize test: set threshold for 32x32"
Johann Koenig [Thu, 24 Aug 2017 14:04:29 +0000 (14:04 +0000)]
Merge "quantize test: set threshold for 32x32"

6 years agoMerge "vpx_dsp:loongson optimize vpx_mseWxH_c(case 16x16,16X8,8X16,8X8) with mmi."
Shiyou Yin [Thu, 24 Aug 2017 00:55:11 +0000 (00:55 +0000)]
Merge "vpx_dsp:loongson optimize vpx_mseWxH_c(case 16x16,16X8,8X16,8X8) with mmi."

6 years agoMerge "vp9: SVC: Skip NEWMV for small blocks for (0, 0) base_mv."
Marco Paniconi [Wed, 23 Aug 2017 23:09:33 +0000 (23:09 +0000)]
Merge "vp9: SVC: Skip NEWMV for small blocks for (0, 0) base_mv."

6 years agoquantize test: set threshold for 32x32
Johann [Wed, 23 Aug 2017 22:59:11 +0000 (15:59 -0700)]
quantize test: set threshold for 32x32

Change-Id: I77be617c7d7c64929dd51c6077322f4f8ad23897

6 years agoMerge "quantize avx: copy implementation to intrinsics"
Johann Koenig [Wed, 23 Aug 2017 21:14:13 +0000 (21:14 +0000)]
Merge "quantize avx: copy implementation to intrinsics"

6 years agovp9: SVC: Skip NEWMV for small blocks for (0, 0) base_mv.
Marco [Wed, 23 Aug 2017 20:01:57 +0000 (13:01 -0700)]
vp9: SVC: Skip NEWMV for small blocks for (0, 0) base_mv.

For SVC encoding:
average speedup ~1.5%, with small ~0.57 loss in avgPSNR metrics.

Change-Id: Icebce6f6ef4e819d7dfcf8db898c583167351de4

6 years agoMerge "vpx_dsp: get32x32var_avx2() cleanup"
Scott LaVarnway [Wed, 23 Aug 2017 19:59:25 +0000 (19:59 +0000)]
Merge "vpx_dsp: get32x32var_avx2() cleanup"

6 years agoMerge "quantize neon: round dqcoeff towards zero"
Johann Koenig [Wed, 23 Aug 2017 19:20:53 +0000 (19:20 +0000)]
Merge "quantize neon: round dqcoeff towards zero"

6 years agoquantize avx: copy implementation to intrinsics
Johann [Tue, 22 Aug 2017 22:43:35 +0000 (15:43 -0700)]
quantize avx: copy implementation to intrinsics

Adds an early exit based on ptest. Slightly slower than ssse3 in the
full case because of the extra check, but potentially faster if lots of
rows can be skipped.

Very close in speed to the assembly.

Can run in 32 bit, unlike the assembly. Allows reworking the function
prototype to use structs.

Change-Id: If80e2b9ba059370a4cad3c973196e82a97b4330e

6 years agoquantize neon: round dqcoeff towards zero
Johann [Mon, 21 Aug 2017 18:23:49 +0000 (11:23 -0700)]
quantize neon: round dqcoeff towards zero

Add 1 if negative to get dqcoeff to round towards zero.

10-15% faster than converting to positive before shifting.

Change-Id: I01a62fd0c9bca786b6885b318bd447bb9229903d

6 years agoquantize fp: neon implementation
Johann [Thu, 10 Aug 2017 22:02:22 +0000 (15:02 -0700)]
quantize fp: neon implementation

About 4x faster when values are below the dequant threshold and 10x
faster if everything needs to be calculated.

Both numbers would improve if the division for dqcoeff could be
simplified.

BUG=webm:1426

Change-Id: I8da67c1f3fcb4abed8751990c1afe00bc841f4b2

6 years agovpx_dsp:loongson optimize vpx_mseWxH_c(case 16x16,16X8,8X16,8X8) with mmi.
Shiyou Yin [Tue, 22 Aug 2017 00:44:36 +0000 (08:44 +0800)]
vpx_dsp:loongson optimize vpx_mseWxH_c(case 16x16,16X8,8X16,8X8) with mmi.

Change-Id: I2c782d18d9004414ba61b77238e0caf3e022d8f2

6 years agoMerge "vp9: Condition lighting change detection on CBR mode."
Marco Paniconi [Tue, 22 Aug 2017 22:52:05 +0000 (22:52 +0000)]
Merge "vp9: Condition lighting change detection on CBR mode."

6 years agoMerge changes I53f8a160,I48f282bf
Johann Koenig [Tue, 22 Aug 2017 22:27:56 +0000 (22:27 +0000)]
Merge changes I53f8a160,I48f282bf

* changes:
  quantize ssse3: copy style from sse2
  quantize sse2: copy opts from ssse3

6 years agovp9: Condition lighting change detection on CBR mode.
Marco [Tue, 22 Aug 2017 21:46:39 +0000 (14:46 -0700)]
vp9: Condition lighting change detection on CBR mode.

This feature is used for the CBR RTC encoding mode
at speed >= 6. This change will exclude it for VBR mode.

For speed 6 live encoding (VBR):
avgPSNR/SSIM metrics on ytlive set up by ~1% (few clips up by 2/3%).
No change in speed.

Change-Id: I1a0dd94c334f7df309ab5a48d477d7e25355b798

6 years agoquantize ssse3: copy style from sse2
Johann [Tue, 22 Aug 2017 21:25:27 +0000 (14:25 -0700)]
quantize ssse3: copy style from sse2

Change-Id: I53f8a160e640c674ea035fc112e207b6dca42598

6 years agoMerge "quantize: capture skip block early"
Johann Koenig [Tue, 22 Aug 2017 20:03:02 +0000 (20:03 +0000)]
Merge "quantize: capture skip block early"

6 years agoquantize sse2: copy opts from ssse3
Johann [Tue, 22 Aug 2017 20:01:44 +0000 (13:01 -0700)]
quantize sse2: copy opts from ssse3

Simplify eob calculations based on ssse3 implementation.

General clean up and re-scoping.

Change-Id: I48f282bf9bd28ee9bc2c7a6779be9d45b5a3a3ee

6 years agoMerge changes Icfb70687,I9a963e99,Ie8ac00ef,I1272917c
Johann Koenig [Tue, 22 Aug 2017 19:19:14 +0000 (19:19 +0000)]
Merge changes Icfb70687,I9a963e99,Ie8ac00ef,I1272917c

* changes:
  quantize: ignore skip_block in arm
  quantize: ignore skip_block in x86
  quantize fp: ignore skip_block in arm
  quantize fp: ignore skip_block in x86

6 years agoquantize: capture skip block early
Johann [Tue, 22 Aug 2017 18:24:33 +0000 (11:24 -0700)]
quantize: capture skip block early

This should probably be handled before vp9_regular_quantize_b_4x4 even
gets called.

Fixes an assert resulting from removing skip_block from the quantize
functions.

BUG=webm:1459

Change-Id: I7f52b53f959b4654b3d4517ebda31a678f4d0fde

6 years agoMerge "ppc: Add vpx_idct16x16_256_add_vsx"
James Zern [Tue, 22 Aug 2017 00:48:39 +0000 (00:48 +0000)]
Merge "ppc: Add vpx_idct16x16_256_add_vsx"

6 years agoMerge "vpx_dsp:loongson optimize vpx_subtract_block_c (case 4x4,8x8,16x16) with mmi."
Shiyou Yin [Tue, 22 Aug 2017 00:37:23 +0000 (00:37 +0000)]
Merge "vpx_dsp:loongson optimize vpx_subtract_block_c (case 4x4,8x8,16x16) with mmi."

6 years agoquantize: ignore skip_block in arm
Johann [Mon, 21 Aug 2017 18:15:39 +0000 (11:15 -0700)]
quantize: ignore skip_block in arm

Change-Id: Icfb70687476b2edb25d255793ba325b261d40584

6 years agoquantize: ignore skip_block in x86
Johann [Mon, 21 Aug 2017 18:15:23 +0000 (11:15 -0700)]
quantize: ignore skip_block in x86

Change-Id: I9a963e99f08761f0c8d6a305619270b2f1c4edf8

6 years agoquantize fp: ignore skip_block in arm
Johann [Mon, 21 Aug 2017 18:14:51 +0000 (11:14 -0700)]
quantize fp: ignore skip_block in arm

Change-Id: Ie8ac00efa826eead2a227726a1add816e04ff147

6 years agoquantize fp: ignore skip_block in x86
Johann [Mon, 21 Aug 2017 18:14:39 +0000 (11:14 -0700)]
quantize fp: ignore skip_block in x86

Change-Id: I1272917c49cf6e6710e52c36535b2fc8c8dced78

6 years agoquantize test: test _fp_ version of quantize
Johann [Wed, 2 Aug 2017 21:28:05 +0000 (14:28 -0700)]
quantize test: test _fp_ version of quantize

None of the x86 optimizations pass the tests.

Change-Id: Ic67f2ba1977b657e68f2a13b0711fc5fcbafd909

6 years agoRemove skip_block from quantize
Johann [Wed, 16 Aug 2017 20:34:14 +0000 (13:34 -0700)]
Remove skip_block from quantize

This condition is handled before this code is reached. The ssse3 version
of the function has always crashed when attempting to handle the
skip_block condition.

Add assert() and comments regarding the usage of skip_block.

Removing the parameter is a fairly involved process so leave it be for
the moment.

Change-Id: Ib299f6fc6589d7ee102262cc74a7aeb60110bc5a

6 years agovpx_dsp: get32x32var_avx2() cleanup
Scott LaVarnway [Fri, 18 Aug 2017 20:44:09 +0000 (13:44 -0700)]
vpx_dsp: get32x32var_avx2() cleanup

renamed to get32x16var_avx2()

BUG=webm:1404

Change-Id: Icb8f3986c9c9c646e13a69430db7235fc7e1a036

6 years agoMerge "vpx_dsp: vpx_get16x16var_avx2() cleanup"
Scott LaVarnway [Fri, 18 Aug 2017 20:30:59 +0000 (20:30 +0000)]
Merge "vpx_dsp: vpx_get16x16var_avx2() cleanup"

6 years agovpx_dsp: vpx_get16x16var_avx2() cleanup
Scott LaVarnway [Mon, 7 Aug 2017 18:56:42 +0000 (11:56 -0700)]
vpx_dsp: vpx_get16x16var_avx2() cleanup

BUG=webm:1404

Change-Id: I88aceb07f4db4870a06eee21d87296974ce3221a

6 years agoMerge "quantize: normalize intermediate types"
Johann Koenig [Fri, 18 Aug 2017 16:00:28 +0000 (16:00 +0000)]
Merge "quantize: normalize intermediate types"

6 years agovpx_dsp:loongson optimize vpx_subtract_block_c (case 4x4,8x8,16x16) with mmi.
Shiyou Yin [Wed, 2 Aug 2017 06:17:09 +0000 (14:17 +0800)]
vpx_dsp:loongson optimize vpx_subtract_block_c (case 4x4,8x8,16x16) with mmi.

Change-Id: Ia120ad1064d0b6106d9685cf075bdab373eef19e

6 years agohighbd_idct32x32*,idct32_34_4x32_quarter_1_2: fix typo
James Zern [Thu, 17 Aug 2017 22:37:38 +0000 (15:37 -0700)]
highbd_idct32x32*,idct32_34_4x32_quarter_1_2: fix typo

135 -> 34

fixes unused function warnings for highbd_idct32_34_4x32_quarter_[12]

Change-Id: I4f50ff6ea514200af93dd59ff94c7f9717409682

6 years agoquantize: normalize intermediate types
Johann [Wed, 16 Aug 2017 17:22:48 +0000 (10:22 -0700)]
quantize: normalize intermediate types

Despite abs_coeff being a positive value, all the other implementations
treat it as signed which simplifies restoring the sign.

HBD builds cast qcoeff to avoid a visual studio warning. Match
vp9_quantize.c style of casting the entire expression.

Change-Id: I62b539b8df05364df3d7644311e325288da7c5b5

6 years agoinv_txfm_sse2.h: correct idct*/iadst* prototypes
James Zern [Thu, 17 Aug 2017 06:06:09 +0000 (23:06 -0700)]
inv_txfm_sse2.h: correct idct*/iadst* prototypes

fixes mismatch between prototypes and definitions

Change-Id: Ib5e7dfcce244dbb8401815be2cdd183d96792652

6 years agoMerge "Prevent parameters that can cause invalid ARF groups."
Paul Wilkins [Wed, 16 Aug 2017 18:25:57 +0000 (18:25 +0000)]
Merge "Prevent parameters that can cause invalid ARF groups."

6 years agoMerge "Fix corrupt arf groups due to low "lag_in_frames""
Paul Wilkins [Wed, 16 Aug 2017 18:25:29 +0000 (18:25 +0000)]
Merge "Fix corrupt arf groups due to low "lag_in_frames""

6 years agoMerge changes I08b562b6,Ia275940a,I51106e90
Linfeng Zhang [Wed, 16 Aug 2017 16:36:37 +0000 (16:36 +0000)]
Merge changes I08b562b6,Ia275940a,I51106e90

* changes:
  Add vpx_highbd_idct32x32_{34, 135, 1024}_add_{sse2, sse4_1}
  Update highbd idct x86 optimizations.
  Update 32x32 idct sse2 and ssse3 optimizations.

6 years agoPrevent parameters that can cause invalid ARF groups.
paulwilkins [Wed, 16 Aug 2017 12:34:49 +0000 (13:34 +0100)]
Prevent parameters that can cause invalid ARF groups.

Having a very low "lag_in_frames" value could cause the encoder to create
incorrect / corrupt ARF groups including displayed frames that update the
ARF buffer and false overlay frames that are coded at low rate but are not
actually overlays of a real ARF frame.

This is linked to a reported unit test "slow down" where the chosen parameters
(lag of 3 frames) gave rise to such "broken" ARF group(s).

See also BUG=webm:1454

Change-Id: If52d0236243ed5552537d1ea9ed3fed8c867232c

6 years agoFix corrupt arf groups due to low "lag_in_frames"
paulwilkins [Wed, 16 Aug 2017 13:07:24 +0000 (14:07 +0100)]
Fix corrupt arf groups due to low "lag_in_frames"

Having a very small value for "lag_in_frames" can result in
corrupt arf groups including displayed frames that update
the arf buffer and fake overlay frames that are not in fact
overlays of real arfs but are nevertheless starved of bits.

Leaving lag_in_frames at the default of 25 for these 5 frame two
pass VBR tests should now give rise to a valid ARF coding pattern
as follows:-  K(ey), A(rf), N(ormal), N, N, O(verlay).

This change is part of a response to BUG=webm:1454 where broken
arf groups interacted badly with a change that corrects for large rate
misses. However, it may still in some cases increase encode time by
virtue of the fact that the unit test now codes a correct coding pattern
with "hidden" ARF frames.

Change-Id: Ifd0246a4c1d0be247247c754024d7a4ed5f66a6b

6 years agoMerge "Fix for encoder slowdown (for speeds >= 3)"
Paul Wilkins [Wed, 16 Aug 2017 13:01:38 +0000 (13:01 +0000)]
Merge "Fix for encoder slowdown (for speeds >= 3)"

6 years agoFix for encoder slowdown (for speeds >= 3)
paulwilkins [Mon, 14 Aug 2017 15:11:34 +0000 (16:11 +0100)]
Fix for encoder slowdown (for speeds >= 3)

Some clips in nightly unit test exhibiting significant encoder slowdown which
appears to bisect to Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a.

The above change allowed for emergency iterations of the recode loop and
adjustment of the Q range if there is a large rate miss.

This patch disables the above adaptation for cases of cpu_speed >= 3 or more
specifically where cpi->sf.recode_loop >= ALLOW_RECODE_KFARFGF.

For speeds >= 3 the code does not currently run a dummy bit pack operation
inside the recode loop. Without this dummy pack operation there is no up to
date estimate of the current frame's size to use as a basis for assessing the
requirement for a recode. In practice it was using the previous frames size (or 0
for the first frame) which could cause odd behavior.

If we require the emergency rate correction added in  Change-Id: I6923.. for
the higher speed settings it will be necessary to enable the dummy pack
which will in turn hurt encode speed.

BUG=webm:1454

Change-Id: I4fb3c6062ca9508325a6f31582f8e80f1a9b126f

6 years agoMerge "Clean up writing YUV files for debug purpose."
Jerome Jiang [Tue, 15 Aug 2017 18:28:54 +0000 (18:28 +0000)]
Merge "Clean up writing YUV files for debug purpose."

6 years agoMerge "vp9: Denoiser fix: use correct bsize for skin detection."
Marco Paniconi [Tue, 15 Aug 2017 17:53:08 +0000 (17:53 +0000)]
Merge "vp9: Denoiser fix: use correct bsize for skin detection."

6 years agoClean up writing YUV files for debug purpose.
Jerome Jiang [Mon, 14 Aug 2017 20:57:51 +0000 (13:57 -0700)]
Clean up writing YUV files for debug purpose.

Change legacy vp8/9_write_yuv_frame to vpx_write_yuv_files.
Delete some flags that can be enabled during build.

To enable writing denoised YUV, use the following command line:
CFLAGS='-DOUTPUT_YUV_DENOISED' ./configure
--enable-vp9-temporal-denoising

For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP'

Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528

6 years agoMerge changes I1f1edeaa,I89313cac
Johann Koenig [Tue, 15 Aug 2017 17:37:59 +0000 (17:37 +0000)]
Merge changes I1f1edeaa,I89313cac

* changes:
  quantize: silence unsigned overflow warning
  quantize test: quiet overflow warning

6 years agovp9: Denoiser fix: use correct bsize for skin detection.
Marco [Tue, 15 Aug 2017 17:01:09 +0000 (10:01 -0700)]
vp9: Denoiser fix: use correct bsize for skin detection.

Change-Id: I9d201fa3a4b00ebd147b57ed519fab8d59b0a802

6 years agoquantize: silence unsigned overflow warning
Johann [Tue, 15 Aug 2017 16:48:24 +0000 (09:48 -0700)]
quantize: silence unsigned overflow warning

The result of the xor operation is unsigned. If coeff was negative,
this results in an unsigned value - INT_MIN.

Change-Id: I1f1edeaa6de1f4c68b848e8a82a666d390b749f0

6 years agoMerge "vp9: strip temporal filter code"
Scott LaVarnway [Tue, 15 Aug 2017 15:35:33 +0000 (15:35 +0000)]
Merge "vp9: strip temporal filter code"

6 years agoquantize test: quiet overflow warning
Johann [Tue, 15 Aug 2017 15:28:09 +0000 (08:28 -0700)]
quantize test: quiet overflow warning

Promote the result of RandRange to signed

Change-Id: I89313cace3bcbe9af96946bef00b6857fc48b128

6 years agoMerge "Patch relating to Issue 1456."
Paul Wilkins [Tue, 15 Aug 2017 14:57:56 +0000 (14:57 +0000)]
Merge "Patch relating to Issue 1456."