platform/upstream/libvpx.git
14 months agomacros_msa.h: clear -Wshadow warnings
James Zern [Fri, 5 May 2023 02:22:17 +0000 (19:22 -0700)]
macros_msa.h: clear -Wshadow warnings

Bug: webm:1793
Change-Id: Ib2e3bd3c52632cdd4410cb2c54d69750e64e5201

14 months agoMerge "Add num_blocks to VpxTplFrameStats" into main
Jerome Jiang [Thu, 4 May 2023 18:06:10 +0000 (18:06 +0000)]
Merge "Add num_blocks to VpxTplFrameStats" into main

14 months agoMerge "Add Vpx* prefix to Tpl{Block,Frame}Stats" into main
Jerome Jiang [Thu, 4 May 2023 18:00:51 +0000 (18:00 +0000)]
Merge "Add Vpx* prefix to Tpl{Block,Frame}Stats" into main

14 months agoMerge changes I226215a2,Ia4918eb0,If6219446,Ibf00a6e1,I900a0a48 into main
Chi Yo Tsai [Thu, 4 May 2023 17:04:17 +0000 (17:04 +0000)]
Merge changes I226215a2,Ia4918eb0,If6219446,Ibf00a6e1,I900a0a48 into main

* changes:
  Fix mismatched param names in vpx_dsp/x86/sad4d_avx2.c
  Fix mismatched param names in vpx_dsp/arm/highbd_sad4d_neon.c
  Fix mismatched param names in vpx_dsp/arm/sad4d_neon.c
  Fix mismatched param names in vpx_dsp/arm/highbd_avg_neon.c
  Fix clang warning on const-qualification of parameters

14 months agoAdd num_blocks to VpxTplFrameStats
Jerome Jiang [Thu, 4 May 2023 14:59:46 +0000 (10:59 -0400)]
Add num_blocks to VpxTplFrameStats

I realized the calculation of the size of the list of VpxTplBlockStats
is non-trivial. So it's better to add the field for the size.

Bug: b/273736974
Change-Id: Ic1b50597c1f89a8f866b5669ca676407be6dc9d8

14 months agoAdd Vpx* prefix to Tpl{Block,Frame}Stats
Jerome Jiang [Thu, 4 May 2023 14:32:03 +0000 (10:32 -0400)]
Add Vpx* prefix to Tpl{Block,Frame}Stats

This is to avoid symbols redifinition when integrating with other
libraries.

Bug: b/273736974
Change-Id: I891af78b1907504d5bb9f735164aea18c2aba944

14 months agoMerge changes I4d26f5f8,I12e25710 into main
James Zern [Thu, 4 May 2023 02:16:12 +0000 (02:16 +0000)]
Merge changes I4d26f5f8,I12e25710 into main

* changes:
  s/__aarch64__/VPX_ARCH_AARCH64/
  configure: add aarch64 to ARCH_LIST

14 months agoMerge "Add codec control to export TPL stats" into main
Jerome Jiang [Thu, 4 May 2023 01:55:41 +0000 (01:55 +0000)]
Merge "Add codec control to export TPL stats" into main

14 months agoAdd codec control to export TPL stats
Jerome Jiang [Fri, 28 Apr 2023 18:32:47 +0000 (14:32 -0400)]
Add codec control to export TPL stats

new codec control: VP9E_GET_TPL_STATS with unit test

Bug: b/273736974
Change-Id: I27343bd3f6dffafc86925234537bcdb557bc4079

14 months agoFix mismatched param names in vpx_dsp/x86/sad4d_avx2.c
chiyotsai [Wed, 3 May 2023 21:45:13 +0000 (14:45 -0700)]
Fix mismatched param names in vpx_dsp/x86/sad4d_avx2.c

Change-Id: I226215a2ff8798b72abe0c2caf3d18875595caa5

14 months agoFix mismatched param names in vpx_dsp/arm/highbd_sad4d_neon.c
chiyotsai [Wed, 3 May 2023 21:44:08 +0000 (14:44 -0700)]
Fix mismatched param names in vpx_dsp/arm/highbd_sad4d_neon.c

Change-Id: Ia4918eb0bac3b28b27e1ef205b9171680b2eb9a4

14 months agoFix mismatched param names in vpx_dsp/arm/sad4d_neon.c
chiyotsai [Wed, 3 May 2023 20:38:46 +0000 (13:38 -0700)]
Fix mismatched param names in vpx_dsp/arm/sad4d_neon.c

Change-Id: If621944684cf9bb9f353db5961ed8b4b4ae38f24

14 months agoFix mismatched param names in vpx_dsp/arm/highbd_avg_neon.c
chiyotsai [Wed, 3 May 2023 20:34:41 +0000 (13:34 -0700)]
Fix mismatched param names in vpx_dsp/arm/highbd_avg_neon.c

Change-Id: Ibf00a6e1029284e637b10ef01ac9b31ffadc74ca

14 months agoFix clang warning on const-qualification of parameters
chiyotsai [Wed, 3 May 2023 20:28:41 +0000 (13:28 -0700)]
Fix clang warning on const-qualification of parameters

Change-Id: I900a0a48dde5fcb262157b191ac536e18269feb3

14 months agofdct8x8_test: EXPECT_* -> ASSERT_*
James Zern [Wed, 3 May 2023 17:09:03 +0000 (10:09 -0700)]
fdct8x8_test: EXPECT_* -> ASSERT_*

This avoids unnecessary logging when a block has multiple errors.

Change-Id: If0f3e6f8ff5bd284655f7cabfd23c253c93d44c5

14 months agos/__aarch64__/VPX_ARCH_AARCH64/
James Zern [Wed, 3 May 2023 01:37:59 +0000 (18:37 -0700)]
s/__aarch64__/VPX_ARCH_AARCH64/

This allows AArch64 to be correctly detected when building with Visual
Studio (cl.exe) and fixes a crash in vp9_diamond_search_sad_neon.c.
There are still test failures, however.

Microsoft's compiler doesn't define __ARM_FEATURE_*. To use those paths
we may need to rely on _M_ARM64_EXTENSION.

Bug: webm:1788
Bug: b/277255076
Change-Id: I4d26f5f84dbd0cbcd1cdf0d7d932ebcf109febe5

14 months agoconfigure: add aarch64 to ARCH_LIST
James Zern [Fri, 21 Apr 2023 01:15:23 +0000 (18:15 -0700)]
configure: add aarch64 to ARCH_LIST

This will allow identifying Windows Visual Studio targets as aarch64;
the Microsoft compiler does not define __aarch64__.

An alternative would be to define this in the code, checking for
_M_ARM64 or _M_ARM64EC. For now we'll use the existing VPX_ARCH_*
system. For compatibility VPX_ARCH_ARM will continue to be defined to 1
in this case.

Bug: webm:1788
Bug: b/277255076
Change-Id: I12e25710891e86f0c7339ba96884c18ed90ba16f

14 months agoMove TplFrameStats to public header
Jerome Jiang [Thu, 27 Apr 2023 20:15:56 +0000 (16:15 -0400)]
Move TplFrameStats to public header

Get ready for changes to follow:

- Custom reader/writer IO functions
- Codec control to get TPL stats from the encoder

Move the definition of TplFrameStats to public header so applications
can use them directly.

Bug: b/273736974
Change-Id: Ieb0db4560ddd966df1bc01f6a7e179cc97f9bac1

14 months agoClean up a stale TODO in tpl
Jerome Jiang [Thu, 27 Apr 2023 19:58:08 +0000 (15:58 -0400)]
Clean up a stale TODO in tpl

Change-Id: Ieccaff1cc94cbb2c5a294d83f3080f7407267016

14 months agoMerge "register_state_check: clear -Wshadow warning" into main
James Zern [Tue, 25 Apr 2023 20:34:13 +0000 (20:34 +0000)]
Merge "register_state_check: clear -Wshadow warning" into main

14 months agoMerge "highbd_vpx_convolve8_neon: clear -Wshadow warning" into main
James Zern [Tue, 25 Apr 2023 20:21:24 +0000 (20:21 +0000)]
Merge "highbd_vpx_convolve8_neon: clear -Wshadow warning" into main

14 months agoMerge "vp9_highbd_iht16x16_add_neon: clear -Wshadow warning" into main
James Zern [Tue, 25 Apr 2023 20:12:30 +0000 (20:12 +0000)]
Merge "vp9_highbd_iht16x16_add_neon: clear -Wshadow warning" into main

14 months agoMerge "Reduce joint motion search iters based on bsize" into main
Yunqing Wang [Mon, 24 Apr 2023 21:15:14 +0000 (21:15 +0000)]
Merge "Reduce joint motion search iters based on bsize" into main

14 months agoReduce joint motion search iters based on bsize
Neeraj Gadgil [Wed, 19 Apr 2023 02:43:26 +0000 (08:13 +0530)]
Reduce joint motion search iters based on bsize

Joint motion search during compound mode eval is optimized by
reducing the number of mv search iterations based on bsize.
The sf 'comp_inter_joint_search_thresh' is renamed as
'comp_inter_joint_search_iter_level' and used to add the logic.

cpu  Testset  Instr. Cnt     BD Rate loss (%)
               Red (%)   avg. psnr  ovr.psnr    ssim
 0   LOWRES2    5.373     0.0917     0.1088    0.0294
 0   MIDRES2    3.395     0.0239     0.0520    0.0783
 0    HDRES2    2.291     0.0223     0.0301    0.0053
 0   Average    3.686     0.0460     0.0636    0.0377

STATS_CHANGED

Change-Id: I7ee8873ebc8af967382324ae8f5c70c26665d5e6

15 months agoReland "Calculate recrf_dist and recrf_rate"
Jerome Jiang [Thu, 20 Apr 2023 19:09:00 +0000 (15:09 -0400)]
Reland "Calculate recrf_dist and recrf_rate"

This is a reland of commit 3c59378e4eac2d241fba8b26e660318b850e5773

Addressed issues from the previous CL:

- Both recon_error and rate_cost are scaled up
- recon_error and rate_cost are not accumulated across ref frames,
  instead they are calculated with the best ref frame picked.
- get_quantize_error() is put where it was, so there is no behavior
  change for vp9.

Bug: b/273736974

Original change's description:
> Calculate recrf_dist and recrf_rate
>
> Change-Id: I74e74807436b92d729e2ccaab96149780f1f52d9

Change-Id: I20e1f5543e83b576a074bd4e6b44d99da65f4b56

15 months agohighbd_vpx_convolve8_neon: clear -Wshadow warning
James Zern [Fri, 21 Apr 2023 20:03:58 +0000 (13:03 -0700)]
highbd_vpx_convolve8_neon: clear -Wshadow warning

Bug: webm:1793
Change-Id: If1a46fe183cd18e05b5538b1eba098e420b745ec

15 months agovp9_highbd_iht16x16_add_neon: clear -Wshadow warning
James Zern [Fri, 21 Apr 2023 20:03:34 +0000 (13:03 -0700)]
vp9_highbd_iht16x16_add_neon: clear -Wshadow warning

Bug: webm:1793
Change-Id: I4e79a4d7d41b6abf88e3e60c54ab48a92b0346d2

15 months agoRevert "Calculate recrf_dist and recrf_rate"
Jerome Jiang [Fri, 21 Apr 2023 18:10:46 +0000 (18:10 +0000)]
Revert "Calculate recrf_dist and recrf_rate"

This reverts commit 3c59378e4eac2d241fba8b26e660318b850e5773.

Reason for revert:

recon_error and recon_rate is summed by mistake across reference frames, as pointed out by Angie.

It could also cause vp9 behavior changes.

Original change's description:
> Calculate recrf_dist and recrf_rate
>
> Change-Id: I74e74807436b92d729e2ccaab96149780f1f52d9

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

15 months agoCalculate recrf_dist and recrf_rate
Jerome Jiang [Thu, 20 Apr 2023 19:09:00 +0000 (15:09 -0400)]
Calculate recrf_dist and recrf_rate

Change-Id: I74e74807436b92d729e2ccaab96149780f1f52d9

15 months agoMerge "Store tpl stats before propagation" into main
Jerome Jiang [Fri, 21 Apr 2023 00:16:02 +0000 (00:16 +0000)]
Merge "Store tpl stats before propagation" into main

15 months agoregister_state_check: clear -Wshadow warning
James Zern [Thu, 20 Apr 2023 21:17:49 +0000 (14:17 -0700)]
register_state_check: clear -Wshadow warning

with --target=x86_64-win64-gcc

Bug: webm:1793
Change-Id: I265533af4e8d05adbe1d66a62b6dcb191ca48747

15 months agoMerge "configure: skip arm64_neon.h workaround w/VS >= 2019" into main
James Zern [Thu, 20 Apr 2023 21:11:09 +0000 (21:11 +0000)]
Merge "configure: skip arm64_neon.h workaround w/VS >= 2019" into main

15 months agoMerge "vp9_tpl_model: clear -Wshadow warning" into main
James Zern [Thu, 20 Apr 2023 19:51:56 +0000 (19:51 +0000)]
Merge "vp9_tpl_model: clear -Wshadow warning" into main

15 months agoStore tpl stats before propagation
Jerome Jiang [Thu, 20 Apr 2023 15:06:32 +0000 (11:06 -0400)]
Store tpl stats before propagation

Add two new structs TplBlockStats and TplFrameStats to store tpl stats
before propagation

Change-Id: I903db99326b199ed8f2d8b19ccb973a8c8910501

15 months agoconfigure: skip arm64_neon.h workaround w/VS >= 2019
James Zern [Thu, 20 Apr 2023 19:17:05 +0000 (12:17 -0700)]
configure: skip arm64_neon.h workaround w/VS >= 2019

Visual Studio 2019+ include arm64_neon.h from arm_neon.h

Bug: b/277255076
Change-Id: I52f42b69a5efe8214a4c541b68e940ad07499584

15 months agoMerge "vp9_spatial_svc_encoder: quiet -Wunused-but-set-variable" into main
James Zern [Thu, 20 Apr 2023 16:56:29 +0000 (16:56 +0000)]
Merge "vp9_spatial_svc_encoder: quiet -Wunused-but-set-variable" into main

15 months agoMerge "vp9_ratectrl,vp9_encodedframe_overshoot: rm unused var" into main
James Zern [Thu, 20 Apr 2023 16:56:13 +0000 (16:56 +0000)]
Merge "vp9_ratectrl,vp9_encodedframe_overshoot: rm unused var" into main

15 months agoMerge "onyx_if,encode_frame_to_data_rate: rm unused var" into main
James Zern [Thu, 20 Apr 2023 16:55:59 +0000 (16:55 +0000)]
Merge "onyx_if,encode_frame_to_data_rate: rm unused var" into main

15 months agoMerge "libs.mk: quote $(LIBVPX_TEST_DATA_PATH)" into main
James Zern [Thu, 20 Apr 2023 16:55:38 +0000 (16:55 +0000)]
Merge "libs.mk: quote $(LIBVPX_TEST_DATA_PATH)" into main

15 months agolibs.mk: quote $(LIBVPX_TEST_DATA_PATH)
James Zern [Thu, 20 Apr 2023 01:58:59 +0000 (18:58 -0700)]
libs.mk: quote $(LIBVPX_TEST_DATA_PATH)

This allows the testdata target to work environments like cygwin/msys
when a windows style path is used. It may also fix using paths with
spaces, though that's not generally recommended.

Change-Id: Id444c14468b05d589bce49c1f612aa712a3f0c8c

15 months agovp9_spatial_svc_encoder: quiet -Wunused-but-set-variable
James Zern [Wed, 19 Apr 2023 20:58:39 +0000 (13:58 -0700)]
vp9_spatial_svc_encoder: quiet -Wunused-but-set-variable

with clang-17. Move frames_received under OUTPUT_FRAME_STATS; it's only
used in a printf.

Change-Id: Idfdd59ccd04e43df1855203db82bb4c8a1d059fb

15 months agovp9_ratectrl,vp9_encodedframe_overshoot: rm unused var
James Zern [Wed, 19 Apr 2023 20:55:35 +0000 (13:55 -0700)]
vp9_ratectrl,vp9_encodedframe_overshoot: rm unused var

quiets -Wunused-but-set-variable with clang-17

Change-Id: I5212a20286d0252e45a8e8813d15cb780494b0ad

15 months agovp9_encodeframe: rm unused vars
James Zern [Wed, 19 Apr 2023 20:53:34 +0000 (13:53 -0700)]
vp9_encodeframe: rm unused vars

in get_rdmult_delta() and compute_frame_aq_offset().

quiets -Wunused-but-set-variable with clang-17

Change-Id: I726852f3bc42afa80a18475de910040a9436b0bb

15 months agoonyx_if,encode_frame_to_data_rate: rm unused var
James Zern [Wed, 19 Apr 2023 20:51:05 +0000 (13:51 -0700)]
onyx_if,encode_frame_to_data_rate: rm unused var

quiets -Wunused-but-set-variable with clang-17

Change-Id: Ia819beac84cbd57f4eeca6174c785fd320bc40c6

15 months agoMerge changes Ib0c2f852,Ieb77661e,I56ea656e,Ibda734c2 into main
James Zern [Wed, 19 Apr 2023 23:17:10 +0000 (23:17 +0000)]
Merge changes Ib0c2f852,Ieb77661e,I56ea656e,Ibda734c2 into main

* changes:
  Add Neon implementations of vpx_highbd_sad_skip_<w>x<h>x4d
  Add Neon implementation of vpx_sad_skip_<w>x<h>x4d functions
  Add Neon implementation of vpx_highbd_sad_skip_<w>x<h> functions
  Add Neon implementation of vpx_sad_skip_<w>x<h> functions

15 months agoAdd Neon implementations of vpx_highbd_sad_skip_<w>x<h>x4d
Jonathan Wright [Wed, 12 Apr 2023 16:50:01 +0000 (17:50 +0100)]
Add Neon implementations of vpx_highbd_sad_skip_<w>x<h>x4d

Add Neon implementations of high bitdepth downsampling SAD4D
functions for all block sizes.

Also add corresponding unit tests.

Change-Id: Ib0c2f852e269cbd6cbb8f4dfb54349654abb0adb

15 months agoAdd Neon implementation of vpx_sad_skip_<w>x<h>x4d functions
Jonathan Wright [Wed, 12 Apr 2023 16:38:24 +0000 (17:38 +0100)]
Add Neon implementation of vpx_sad_skip_<w>x<h>x4d functions

Add Neon implementations of standard bitdepth downsampling SAD4D
functions for all block sizes.

Also add corresponding unit tests.

Change-Id: Ieb77661ea2bbe357529862a5fb54956e34e8d758

15 months agoAdd Neon implementation of vpx_highbd_sad_skip_<w>x<h> functions
Jonathan Wright [Wed, 12 Apr 2023 13:48:21 +0000 (14:48 +0100)]
Add Neon implementation of vpx_highbd_sad_skip_<w>x<h> functions

Add Neon implementations of high bitdepth downsampling SAD functions
for all block sizes.

Also add corresponding unit tests.

Change-Id: I56ea656e9bb5f8b2aedfdc4637c9ab4e1951b31b

15 months agoAdd Neon implementation of vpx_sad_skip_<w>x<h> functions
Jonathan Wright [Wed, 12 Apr 2023 13:35:50 +0000 (14:35 +0100)]
Add Neon implementation of vpx_sad_skip_<w>x<h> functions

Add Neon implementations of standard bitdepth downsampling SAD
functions for all block sizes.

Also add corresponding unit tests.

Change-Id: Ibda734c270278d947673ffcc29ef17a2f4970b01

15 months agoMerge "mr_dissim: clear -Wshadow warning" into main
James Zern [Tue, 18 Apr 2023 23:51:04 +0000 (23:51 +0000)]
Merge "mr_dissim: clear -Wshadow warning" into main

15 months agoMerge "onyx_if: clear -Wshadow warning" into main
James Zern [Tue, 18 Apr 2023 19:24:35 +0000 (19:24 +0000)]
Merge "onyx_if: clear -Wshadow warning" into main

15 months agoMerge "vp9_rdcost: clear -Wshadow warnings" into main
James Zern [Tue, 18 Apr 2023 19:19:45 +0000 (19:19 +0000)]
Merge "vp9_rdcost: clear -Wshadow warnings" into main

15 months agoMerge "Downsample SAD computation in motion search" into main
Yunqing Wang [Tue, 18 Apr 2023 16:11:01 +0000 (16:11 +0000)]
Merge "Downsample SAD computation in motion search" into main

15 months agovp9_tpl_model: clear -Wshadow warning
James Zern [Tue, 18 Apr 2023 05:05:46 +0000 (22:05 -0700)]
vp9_tpl_model: clear -Wshadow warning

with --enable-experimental --enable-non-greedy-mv

Bug: webm:1793
Change-Id: I19e38d7196291ae1ffbb5fb3daa70a4fefd54c55

15 months agomr_dissim: clear -Wshadow warning
James Zern [Tue, 18 Apr 2023 05:01:10 +0000 (22:01 -0700)]
mr_dissim: clear -Wshadow warning

Bug: webm:1793
Change-Id: I73ced43aba45215264134f917fd69ab0b1f10d01

15 months agoonyx_if: clear -Wshadow warning
James Zern [Tue, 18 Apr 2023 04:57:59 +0000 (21:57 -0700)]
onyx_if: clear -Wshadow warning

with --enable-internal-stats

Bug: webm:1793
Change-Id: I9d375e4cb45f78b82afe455f2c7ad2b56e217f7d

15 months agoMerge "Add AVX2 intrinsic for vpx_fdct16x16() function" into main
Yunqing Wang [Mon, 17 Apr 2023 20:21:21 +0000 (20:21 +0000)]
Merge "Add AVX2 intrinsic for vpx_fdct16x16() function" into main

15 months agoAdd AVX2 intrinsic for vpx_fdct16x16() function
Anupam Pandey [Tue, 4 Apr 2023 11:54:27 +0000 (17:24 +0530)]
Add AVX2 intrinsic for vpx_fdct16x16() function

Introduced AVX2 intrinsic to compute FDCT for block size
16x16 case. This is a bit-exact change.

Please check the module level scaling w.r.t C function (timer based)
for existing (SSE2) and new AVX2 intrinsics:

   Scaling
SSE2      AVX2
3.88x     5.95x

Change-Id: I02299c3746fcb52d808e2a75d30aa62652c816dc

15 months agovp9_rdcost: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 18:47:49 +0000 (11:47 -0700)]
vp9_rdcost: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I6d48038d74e510ecb5773dfffbdc4c10b765c2aa

15 months agoMerge "Add VP8RateControlRTC::GetLoopfilterLevel" into main
Jerome Jiang [Fri, 14 Apr 2023 17:25:07 +0000 (17:25 +0000)]
Merge "Add VP8RateControlRTC::GetLoopfilterLevel" into main

15 months agoMerge "libs.mk: Fix wrong scope end comments" into main
James Zern [Fri, 14 Apr 2023 17:22:47 +0000 (17:22 +0000)]
Merge "libs.mk: Fix wrong scope end comments" into main

15 months agolibs.mk: Fix wrong scope end comments
L. E. Segovia [Mon, 10 Apr 2023 22:08:54 +0000 (19:08 -0300)]
libs.mk: Fix wrong scope end comments

I believe the following comments are wrongly scoped, possibly left over
from previous changesets. This made me very confused when reading the
test suite Makefile, in order to port it to Meson.

Change-Id: Ice3c7ba50c6909a9c7dfd4001afa1e1ddfa4b5ce

15 months agoAdd VP8RateControlRTC::GetLoopfilterLevel
Jerome Jiang [Thu, 13 Apr 2023 20:52:51 +0000 (16:52 -0400)]
Add VP8RateControlRTC::GetLoopfilterLevel

New linear model to calculate loopfilter level from frame qp.

Linear regression was done on qvga, vga, and hd clips.

Bug: b/275304642
Change-Id: I552b312212bb4de21b53b762d139aa9588c64ae2

15 months agoMerge "vp9_frame_scale_ssse3: clear -Wshadow warnings" into main
James Zern [Thu, 13 Apr 2023 20:59:43 +0000 (20:59 +0000)]
Merge "vp9_frame_scale_ssse3: clear -Wshadow warnings" into main

15 months agoMerge changes I2a26c929,I0b7f0136,Ib65a2dff into main
James Zern [Thu, 13 Apr 2023 18:35:49 +0000 (18:35 +0000)]
Merge changes I2a26c929,I0b7f0136,Ib65a2dff into main

* changes:
  vpxenc: clear -Wshadow warnings
  vpxdec: clear -Wshadow warnings
  svc_encodeframe: clear -Wshadow warnings

15 months agoMerge changes I571a9d64,I22db73cb into main
James Zern [Thu, 13 Apr 2023 18:35:21 +0000 (18:35 +0000)]
Merge changes I571a9d64,I22db73cb into main

* changes:
  dct_test: clear -Wshadow warnings
  convolve_test: clear -Wshadow warning

15 months agoMerge "vp9_pickmode: clear -Wshadow warnings" into main
James Zern [Thu, 13 Apr 2023 18:35:10 +0000 (18:35 +0000)]
Merge "vp9_pickmode: clear -Wshadow warnings" into main

15 months agovpxenc: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 21:52:44 +0000 (14:52 -0700)]
vpxenc: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I2a26c9297016d3fa2c32e8974ef3d7dab1e524c4

15 months agovpxdec: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 21:52:33 +0000 (14:52 -0700)]
vpxdec: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I0b7f013682229cde50df7c62db9dab6eab0fd341

15 months agosvc_encodeframe: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 21:02:15 +0000 (14:02 -0700)]
svc_encodeframe: clear -Wshadow warnings

Bug: webm:1793
Change-Id: Ib65a2dff124034d8e653572f8ada65984e55ed70

15 months agodct_test: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 21:00:11 +0000 (14:00 -0700)]
dct_test: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I571a9d641b2f7f4b9d7c473ca815d4ea10b9f9af

15 months agoconvolve_test: clear -Wshadow warning
James Zern [Wed, 12 Apr 2023 20:56:39 +0000 (13:56 -0700)]
convolve_test: clear -Wshadow warning

Bug: webm:1793
Change-Id: I22db73cb756c6c680b73684caef1e08bb6e729d8

15 months agovp9_frame_scale_ssse3: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 20:54:02 +0000 (13:54 -0700)]
vp9_frame_scale_ssse3: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I85608ac7bb6d3a61649ba342c13c3bf6a39a5dea

15 months agovp9_temporal_filter: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 20:46:26 +0000 (13:46 -0700)]
vp9_temporal_filter: clear -Wshadow warnings

Bug: webm:1793
Change-Id: Ia681ce636ae99f95b875ee1b0189bc6fa66a7608

15 months agovp9_svc_layercontext: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 20:41:46 +0000 (13:41 -0700)]
vp9_svc_layercontext: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I63669de9835713ec70dafa88ca8f2c2459e59698

15 months agovp9_pickmode: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 20:31:35 +0000 (13:31 -0700)]
vp9_pickmode: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I26c063818144d11c4c91165c3fcbf6f258453cc7

15 months agovp9_speed_features: clear -Wshadow warning
James Zern [Wed, 12 Apr 2023 02:27:03 +0000 (19:27 -0700)]
vp9_speed_features: clear -Wshadow warning

Bug: webm:1793
Change-Id: I9f509c4461631e358f80b98afbb745ce88e9d7a2

15 months agovp9_ratectrl: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 02:23:27 +0000 (19:23 -0700)]
vp9_ratectrl: clear -Wshadow warnings

Bug: webm:1793
Change-Id: I2476a9d8e1d62414fdbe6feee87d5167058f499b

15 months agovp9_mbgraph: clear -Wshadow warnings
James Zern [Wed, 12 Apr 2023 02:16:28 +0000 (19:16 -0700)]
vp9_mbgraph: clear -Wshadow warnings

Bug: webm:1793
Change-Id: Ibffb62775f09922d37f7d0460aa2751e74c36738

15 months agoMerge "vp9_quantize_avx2,highbd_get_max_lane_eob: fix mask" into main
James Zern [Tue, 11 Apr 2023 18:40:00 +0000 (18:40 +0000)]
Merge "vp9_quantize_avx2,highbd_get_max_lane_eob: fix mask" into main

15 months agoMerge "Add assert to ensure NEARESTMV or NEWMV modes are not skipped" into main
Yunqing Wang [Tue, 11 Apr 2023 18:35:10 +0000 (18:35 +0000)]
Merge "Add assert to ensure NEARESTMV or NEWMV modes are not skipped" into main

15 months agoMerge "Avoid redundant start MV SAD calculation" into main
Yunqing Wang [Tue, 11 Apr 2023 18:31:25 +0000 (18:31 +0000)]
Merge "Avoid redundant start MV SAD calculation" into main

15 months agoDownsample SAD computation in motion search
Deepa K G [Wed, 5 Apr 2023 11:12:54 +0000 (16:42 +0530)]
Downsample SAD computation in motion search

Added a speed feature to skip every other row
in SAD computation during motion search.

                 Instruction Count        BD-Rate Loss(%)
cpu   Resolution   Reduction(%)    avg.psnr   ovr.psnr    ssim
 0       LOWRES2      0.958         0.0204     0.0095    0.0275
 0       MIDRES2      1.891        -0.0636     0.0032    0.0247
 0        HDRES2      2.869         0.0434     0.0345    0.0686
 0       Average      1.905         0.0000     0.0157    0.0403

STATS_CHANGED

Change-Id: I1a8692757ed0cbcb2259729b3ecfb0436cdf49ce

15 months agoAdd assert to ensure NEARESTMV or NEWMV modes are not skipped
Cherma Rajan A [Tue, 11 Apr 2023 09:20:18 +0000 (14:50 +0530)]
Add assert to ensure NEARESTMV or NEWMV modes are not skipped

Added an assert for prune_single_mode_based_on_mv_diff_mode_rate
speed feature. This ensures NEARMV or ZEROMV modes are pruned
only when NEARESTMV and NEWMV modes are not early terminated.

Change-Id: Id8b03eef6d1ef3f16714a9cbfde0c171c0c6fe0b

15 months agoAvoid redundant start MV SAD calculation
Deepa K G [Mon, 3 Apr 2023 17:51:56 +0000 (23:21 +0530)]
Avoid redundant start MV SAD calculation

Avoided repeated calculation of start MV
SAD during full pixel motion search.

                 Instruction Count
cpu   Resolution   Reduction(%)
 0       LOWRES2      0.162
 0       MIDRES2      0.246
 0        HDRES2      0.325
 0       Average      0.245

Change-Id: I2b4786901f254ce32ee8ca8a3d56f1c9f112f1d4

15 months agovp9_quantize_avx2,highbd_get_max_lane_eob: fix mask
James Zern [Mon, 10 Apr 2023 20:29:02 +0000 (13:29 -0700)]
vp9_quantize_avx2,highbd_get_max_lane_eob: fix mask

Pack nz_mask with zero. After the result is permuted this has the effect
of ignoring the upper half of the iscan register which is only loaded
with 128-bits. Depending on the optimization level and the load used the
upper half of the ymm register may contain undefined values which can
produce an incorrect eob. If this is large enough it can cause a crash.

Bug: chromium:1431729
Change-Id: I4ebae9fa39f228bdd29dcc19935f3f07759d75f5

15 months agoMerge "Add AVX2 intrinsic for variance function for block width 8" into main
Yunqing Wang [Mon, 10 Apr 2023 18:50:09 +0000 (18:50 +0000)]
Merge "Add AVX2 intrinsic for variance function for block width 8" into main

15 months agoMerge "Prune single ref modes based on mv difference and mode rate" into main
Yunqing Wang [Mon, 10 Apr 2023 17:01:19 +0000 (17:01 +0000)]
Merge "Prune single ref modes based on mv difference and mode rate" into main

15 months agoMerge "Optimize Armv8.0 Neon SAD4D 16xh, 32xh, and 64xh functions" into main
James Zern [Fri, 7 Apr 2023 22:19:18 +0000 (22:19 +0000)]
Merge "Optimize Armv8.0 Neon SAD4D 16xh, 32xh, and 64xh functions" into main

15 months agovp9_dx_iface: clear -Wshadow warnings
James Zern [Thu, 6 Apr 2023 20:00:47 +0000 (13:00 -0700)]
vp9_dx_iface: clear -Wshadow warnings

Bug: webm:1793
Change-Id: Ice6cd08f145e5813e24345d03e0913e5eda5289f

15 months agovp9_encoder: clear -Wshadow warning
James Zern [Thu, 6 Apr 2023 20:00:07 +0000 (13:00 -0700)]
vp9_encoder: clear -Wshadow warning

Bug: webm:1793
Change-Id: Id390c61f82b9f15063d0310a2c252b02b479d9c5

15 months agovpx_subpixel_8t_intrin_avx2: clear -Wshadow warning
James Zern [Thu, 6 Apr 2023 19:57:23 +0000 (12:57 -0700)]
vpx_subpixel_8t_intrin_avx2: clear -Wshadow warning

Bug: webm:1793
Change-Id: Icba4ad242dcd0cad736b9a203829361c5bd1ca3f

15 months agoMerge "Optimize Neon paths of high bitdepth SAD and SAD4d for 8xh blocks" into main
James Zern [Thu, 6 Apr 2023 17:50:00 +0000 (17:50 +0000)]
Merge "Optimize Neon paths of high bitdepth SAD and SAD4d for 8xh blocks" into main

15 months agoOptimize Armv8.0 Neon SAD4D 16xh, 32xh, and 64xh functions
Jonathan Wright [Thu, 6 Apr 2023 15:14:51 +0000 (16:14 +0100)]
Optimize Armv8.0 Neon SAD4D 16xh, 32xh, and 64xh functions

Add a widening 4D reduction function operating on uint16x8_t vectors
and use it to optimize the final reduction in Armv8.0 Neon standard
bitdepth 16xh, 32xh and 64h SAD4D computations.

Also simplify the Armv8.0 Neon version of the sad64xhx4d_neon helper
function since VP9 block sizes are not large enough to require
widening to 32-bit accumulators before the final reduction.

Change-Id: I32b0a283d7688d8cdf21791add9476ed24c66a28

15 months agoOptimize 4D Neon reduction for 4xh and 8xh SAD4D blocks
Jonathan Wright [Tue, 4 Apr 2023 13:52:52 +0000 (14:52 +0100)]
Optimize 4D Neon reduction for 4xh and 8xh SAD4D blocks

Add a 4D reduction function operating on uint16x8_t vectors and use
it to optimize the final reduction in standard bitdepth 4xh and 8xh
SAD4D computations. Similar 4D reduction optimizations have already
been implemented for all other standard bitdepth block sizes, and all
high bitdepth block sizes.[1]

[1] https://chromium-review.googlesource.com/c/webm/libvpx/+/4224681

Change-Id: I0aa0b6e0f70449776f316879cafc4b830e86ea51

15 months agoAdd AVX2 intrinsic for variance function for block width 8
Anupam Pandey [Tue, 28 Mar 2023 09:18:46 +0000 (14:48 +0530)]
Add AVX2 intrinsic for variance function for block width 8

Added AVX2 intrinsic optimization for the following functions
1. vpx_variance8x4
2. vpx_variance8x8
3. vpx_variance8x16

This is a bit-exact change.

                 Instruction Count
cpu   Resolution   Reduction(%)
 0       LOWRES2      0.698
 0       MIDRES2      0.577
 0        HDRES2      0.469
 0       Average      0.582

Change-Id: Iae8fdf9344fd012cda4955ed140633141d60ba86

15 months agoMerge changes Idaf49de6,I6d7d96ff,I0d64c923 into main
James Zern [Thu, 30 Mar 2023 22:44:51 +0000 (22:44 +0000)]
Merge changes Idaf49de6,I6d7d96ff,I0d64c923 into main

* changes:
  svc_datarate_test: clear -Wshadow warning
  vp9_mcomp.c: clear -Wshadow warnings
  vp9_rc_get_second_pass_params: clear -Wshadow warning

15 months agoPrune single ref modes based on mv difference and mode rate
Cherma Rajan A [Wed, 8 Mar 2023 12:20:06 +0000 (17:50 +0530)]
Prune single ref modes based on mv difference and mode rate

This patch introduces a speed feature to prune single reference
modes - NEARMV and ZEROMV based on motion vector difference and
mode rate w.r.t previously evaluated single reference modes
corresponding to the same reference frame.

                Instruction Count        BD-Rate Loss(%)
cpu   Resolution   Reduction(%)    avg.psnr   ovr.psnr    ssim
 0       LOWRES2      1.686        -0.0039    -0.0105   -0.0098
 0       MIDRES2      1.026        -0.0234     0.0029    0.0120
 0        HDRES2      0.000         0.0000     0.0000    0.0000
 0       Average      0.889        -0.0091    -0.0025    0.0007

STATS_CHANGED

Change-Id: I387acd3a73d8256904a7ce684b198d251cf3dd04

15 months agoAvoid vshr and vget_{low,high} in Neon d135 predictor impl
George Steed [Tue, 28 Mar 2023 14:49:37 +0000 (14:49 +0000)]
Avoid vshr and vget_{low,high} in Neon d135 predictor impl

The shift instructions have marginally worse performance on some
micro-architectures, and the vget_{low,high} instructions are
unnecessary.

This commit improves performance of the d135 predictors by 1.5% geomean
averaged across a range of compilers and micro-architectures.

Change-Id: Ied4c3eecc12fc973841696459d868ce403ed4e6c

15 months agoUse sum_neon.h helpers in Neon DC predictors
George Steed [Mon, 27 Mar 2023 08:47:58 +0000 (08:47 +0000)]
Use sum_neon.h helpers in Neon DC predictors

Use sum_neon.h helpers for horizontal reductions in Neon DC predictors,
enabling use of dedicated Neon reduction instructions on AArch64. Some
of the surrounding code is also optimized to remove redundant broadcast
instructions in the dc_store helpers.

Performance is largely unchanged on both the standard as well as the
high bit-depth predictors. The main improvement appears to be the 16x16
standard-bitdepth dc predictor, which improves by 10-15% when
benchmarked on Neoverse N1.

Change-Id: Ibfcc6ecf4b1b2f87ce1e1f63c314d0cc35a0c76f