James Zern [Thu, 19 May 2022 02:00:56 +0000 (19:00 -0700)]
y4m_test: check temp file ptr
GetTempOutFile() and TempOutFile::file() may return null if the open
fails
Change-Id: Ib3ee9b592140d30d12aecefa7dfc5f569fa28a34
James Zern [Sun, 15 May 2022 22:39:15 +0000 (15:39 -0700)]
tools/*.py: update to python3
only lint-hunks.py is tested as part of the presubmit; the rest may
need further changes as they're used.
Bug: b/
229626362
Change-Id: I2fd6e96deab8d892d34527e484ea65e3df86d162
yuanhecai [Tue, 17 May 2022 11:06:04 +0000 (19:06 +0800)]
loongarch: Modify the representation of macros
Some macros have been changed to "#define do {...} While (0)",
change the rest to "static INLINE ..."
Bug: webm:1755
Change-Id: I445ac0c543f12df38f086b479394b111058367d0
yuanhecai [Mon, 9 May 2022 06:39:05 +0000 (14:39 +0800)]
loongarch: Reduce the number of instructions
Replace some redundant instructions to improve the efficiency
of the program.
1. txfm_macros_lsx.h
2. vpx_convolve8_avg_lsx.c
3. vpx_convolve8_horiz_lsx.c
4. vpx_convolve8_lsx.c
5. vpx_convolve8_vert_lsx.c
6. vpx_convolve_copy_lsx.c
7. vpx_convolve_lsx.h
Bug: webm:1755
Change-Id: I9b7fdf6900338a26f9b1775609ad387648684f3d
yuanhecai [Fri, 6 May 2022 04:17:39 +0000 (12:17 +0800)]
vp9[loongarch]: Optimize vpx_quantize_b/b_32x32
1. vpx_quantize_b_lsx
2. vpx_quantize_b_32x32_lsx
Bug: webm:1755
Change-Id: I476c8677a2c2aed7248e088e62c3777c9bed2adb
yuanhecai [Sun, 24 Apr 2022 02:34:21 +0000 (10:34 +0800)]
vp8[loongarch]: Optimize vp8_sixtap_predict4x4
1. vp8_sixtap_predict4x4
Bug: webm:1755
Change-Id: If7d844496ef2cfe2252f2ef12bb7cded63ad03dd
yuanhecai [Wed, 20 Apr 2022 03:16:55 +0000 (11:16 +0800)]
vp8[loongarch]: Optimize fdct8x4/diamond_search_sad
1. vp8_short_fdct8x4_lsx
2. vp8_diamond_search_sad_lsx
3. vpx_sad8x8_lsx
Bug: webm:1755
Change-Id: Ic9df84ead2d4fc07ec58e9730d6a12ac2b2d31c1
yuanhecai [Wed, 20 Apr 2022 03:13:13 +0000 (11:13 +0800)]
vp8[loongarch]: Optimize sub_pixel_variance8x8/16x16
1. vpx_sub_pixel_variance8x8_lsx
1. vpx_sub_pixel_variance16x16_lsx
2. vpx_mse16x16_lsx
Bug: webm:1755
Change-Id: Iaedd8393c950c13042a0597d0d47b534a2723317
Hao Chen [Fri, 18 Mar 2022 01:33:53 +0000 (09:33 +0800)]
vp8[loongarch]: Optimize vp8 encoding partial function
1. vp8_short_fdct4x4
2. vp8_regular_quantize_b
3. vp8_block_error
4. vp8_mbblock_error
5. vpx_subtract_block
Bug: webm:1755
Change-Id: I3dbfc7e3937af74090fc53fb4c9664e6cdda29ef
Marco Paniconi [Mon, 16 May 2022 05:15:29 +0000 (22:15 -0700)]
vp9-rtc: Fix to usage of active_maps when aq_mode=0
If aq_mode=0 the segmentation feature may still be used
for active_maps, so the condition active_maps.enabled
needs to be added in two places regarding segmentation
logic in encodeframe.c. Otherwise the active_maps would
have no effect.
This also resolves why the assert in bug webm:1762 was
not triggered when aq_mode=0.
Change-Id: Ibd68e9b5c3f81728241a168d3fb3567d6845633d
James Zern [Fri, 13 May 2022 19:15:59 +0000 (19:15 +0000)]
Merge changes I7d68c7f2,If283fc08,I3b1e0a2c into main
* changes:
vp9[loongarch]: Optimize avg_variance64x64/variance8x8
vp9[loongarch]: Optimize fdct4x4/8x8_lsx
vp9[loongarch]: Optimize vpx_hadamard_16x16/8x8
yuanhecai [Wed, 13 Apr 2022 08:46:22 +0000 (16:46 +0800)]
vp9[loongarch]: Optimize avg_variance64x64/variance8x8
1. vpx_variance8x8_lsx
2. vpx_sub_pixel_avg_variance64x64_lsx
Bug: webm:1755
Change-Id: I7d68c7f2f5c8d27dc31cfd32298aeefb68f5d560
yuanhecai [Tue, 12 Apr 2022 13:01:53 +0000 (21:01 +0800)]
vp9[loongarch]: Optimize fdct4x4/8x8_lsx
1. vpx_fdct4x4_lsx
2. vpx_fdct8x8_lsx
Bug: webm:1755
Change-Id: If283fc08f9bedcbecd2c4052adb210f8fe00d4f0
yuanhecai [Tue, 12 Apr 2022 08:02:55 +0000 (16:02 +0800)]
vp9[loongarch]: Optimize vpx_hadamard_16x16/8x8
1. vpx_hadamard_16x16_lsx
2. vpx_hadamard_8x8_lsx
Bug: webm:1755
Change-Id: I3b1e0a2c026c3806b7bbbd191d0edf0e78912af7
Jerome Jiang [Fri, 13 May 2022 01:05:24 +0000 (21:05 -0400)]
Add aq mode 0 and 3 to active map test
Bug: webm:1762
Change-Id: Ia827f6686e8d0cdc09f3d07d07dacaa4fcd801ab
Marco Paniconi [Thu, 12 May 2022 18:18:19 +0000 (11:18 -0700)]
vp9-rtc: Fix to interp_filter for segment skip
For segment skip feature: allow for setting the
mi->interp_filter to BILINEAR, if cm->interp_filter
is set BILIENAR. This can happen at speed 9 when the
segment skip feature is used (e.g., active_maps)
Without this fix the assert can be triggered with the
active_map_test.cc for speed 9 included.
Updated the test.
Fixes the assert triggered in the issue:
Bug: webm:1762
Change-Id: I462e0bdd966e4f3cb5b7bc746685916ac8808358
James Zern [Mon, 9 May 2022 17:40:49 +0000 (17:40 +0000)]
Merge "[NEON] Optimize vp9_diamond_search_sad() for NEON" into main
Konstantinos Margaritis [Tue, 3 May 2022 09:24:44 +0000 (12:24 +0300)]
[NEON] Optimize vp9_diamond_search_sad() for NEON
About 50% improvement in comparison to the C function.
I have followed the AVX version with some simplifications.
Change-Id: I72ddbdb2fbc5ed8a7f0210703fe05523a37db1c9
James Zern [Fri, 6 May 2022 18:55:56 +0000 (11:55 -0700)]
add some missing realloc checks
Change-Id: I0fd1e094085c18b1d9a32333e876c2affeb6de23
James Zern [Fri, 6 May 2022 18:47:06 +0000 (11:47 -0700)]
vp8[cd]x.h: document vpx_codec_vp[89]_[cd]x*
+ mark the _algo variables as deprecated.
this quiets some doxygen warnings
Bug: webm:1752
Change-Id: I53b9b796c3d8fef5c713ee4278641198f95b5864
Jerome Jiang [Tue, 3 May 2022 14:44:49 +0000 (10:44 -0400)]
vp9 svc sample: set fps from y4m file
Change-Id: I082c0409910da4cda5bf852b20ffa11ba5c2ebd6
James Zern [Fri, 29 Apr 2022 00:45:47 +0000 (17:45 -0700)]
examples: add missing argv_dup alloc checks
Change-Id: Ia3080cbf50071d599c7168a20466392a963f101a
James Zern [Thu, 28 Apr 2022 17:03:32 +0000 (17:03 +0000)]
Merge changes I99ee0ef3,Ie087e8be,I6b19d016,I6fb7771d,I54f83733, ... into main
* changes:
y4m_input_open: check allocs
fastssim,fs_ctx_init: check alloc
vp9_get_smooth_motion_field: check alloc
vp9_row_mt_alloc_rd_thresh: check alloc
simple_encode,init_encoder: check buffer_pool alloc
VP9RateControlRTC::Create: check segmentation_map alloc
vp9_speed_features.c: check allocations
vp9_alloc_motion_field_info: check motion_field_array alloc
vp9_enc_grp_get_next_job: check job queue alloc
vp9: check postproc_state.limits allocs
vp9,encode_tiles_buffer_alloc: fix allocation check
yuanhecai [Tue, 12 Apr 2022 01:10:27 +0000 (09:10 +0800)]
vp9[loongarch]: Optimize sad8x8/32x64/64x32x4d
1. vpx_sad8x8x4d_lsx
2. vpx_sad32x64x4d_lsx
3. vpx_sad64x32x4d_lsx
Bug: webm:1755
Change-Id: I08a2b8717ec8623ffdd4451a04e68fa3a7228668
yuanhecai [Thu, 7 Apr 2022 09:51:51 +0000 (17:51 +0800)]
vp9[loongarch]: Optimize sad64x64/32x32_avg,comp_avg_pred
1. vpx_sad64x64_avg_lsx
2. vpx_sad32x32_avg_lsx
3. comp_avg_pred_lsx
Bug: webm:1755
Change-Id: I58dabdcdd4265bd6ebd5670db8a132d2e838683f
James Zern [Wed, 27 Apr 2022 05:20:00 +0000 (22:20 -0700)]
y4m_input_open: check allocs
Change-Id: I99ee0ef3ab28a22923cb413ccf5935fdc38862be
James Zern [Wed, 27 Apr 2022 05:19:34 +0000 (22:19 -0700)]
fastssim,fs_ctx_init: check alloc
Change-Id: Ie087e8be1e943b94327ed520db447a0e3a927738
James Zern [Wed, 27 Apr 2022 05:19:05 +0000 (22:19 -0700)]
vp9_get_smooth_motion_field: check alloc
Change-Id: I6b19d0169d127f622abf97b3b8590eee957bdc51
James Zern [Wed, 27 Apr 2022 05:18:21 +0000 (22:18 -0700)]
vp9_row_mt_alloc_rd_thresh: check alloc
Change-Id: I6fb7771d9fa6ec54d81f24a02a289e8b852e7332
James Zern [Wed, 27 Apr 2022 02:16:11 +0000 (19:16 -0700)]
simple_encode,init_encoder: check buffer_pool alloc
Change-Id: I54f83733260abf828166400c5fd0c4c7e3ccec2f
James Zern [Wed, 27 Apr 2022 02:15:40 +0000 (19:15 -0700)]
VP9RateControlRTC::Create: check segmentation_map alloc
Change-Id: I17b23915c32accf834def5ab26a8e4e188f9993a
James Zern [Wed, 27 Apr 2022 02:14:44 +0000 (19:14 -0700)]
vp9_speed_features.c: check allocations
Change-Id: If3b319c1ce7036c2259440f4eeb2e645bf559f4c
James Zern [Wed, 27 Apr 2022 02:13:48 +0000 (19:13 -0700)]
vp9_alloc_motion_field_info: check motion_field_array alloc
Change-Id: I4ae11242e645feb3b85eaea186f14b3676ae40a8
James Zern [Wed, 27 Apr 2022 02:07:08 +0000 (19:07 -0700)]
vp9_enc_grp_get_next_job: check job queue alloc
+ reverse conditional order; var == constant is more readable
Change-Id: I9f2b4394024c262fd5fe9576a8bf33afe197c050
James Zern [Wed, 27 Apr 2022 02:05:56 +0000 (19:05 -0700)]
vp9: check postproc_state.limits allocs
Change-Id: I9d5df96580074375e4847d2e2f60a6a6d56eeea5
James Zern [Wed, 27 Apr 2022 01:42:24 +0000 (18:42 -0700)]
vp9,encode_tiles_buffer_alloc: fix allocation check
previously vp9_bitstream_worker_data was checked after it was memset();
this change uses CHECK_MEM_ERROR for consistency to ensure the pointer
is checked first
Change-Id: I532d0eb0e746dc6b8d694b616eba693c5c0053ac
yuanhecai [Tue, 5 Apr 2022 10:17:19 +0000 (18:17 +0800)]
vp9[loongarch]: Optimize fdct/get/variance16x16
1. vpx_fdct16x16_lsx
2. vpx_get16x16var_lsx
3. vpx_variance16x16_lsx
Bug: webm:1755
Change-Id: I27090406dc28cfdca64760fea4bc16ae11b74628
James Zern [Tue, 26 Apr 2022 01:15:30 +0000 (01:15 +0000)]
Merge changes Ib8bcefd2,I84f789ca into main
* changes:
register_state_check.h: add compiler barrier
add_noise_test.cc: remove stale TODO
James Zern [Mon, 25 Apr 2022 22:12:02 +0000 (15:12 -0700)]
register_state_check.h: add compiler barrier
around ASM_REGISTER_STATE_CHECK() this helps keep the call ordering
consistent avoiding some code reordering which may affect the registers
being checked
fixes issue with armv7 and multiple versions of gcc:
[ RUN ] C/AddNoiseTest.CheckNoiseAdded/0
test/register_state_check.h:116: Failure
Expected equality of these values:
pre_store_[i]
Which is: 0
post_store[i]
Which is:
4618441417868443648
Bug: webm:1760
Change-Id: Ib8bcefd2c4d263f9fc4d4b4d4ffb853fe89d1152
Fixed: webm:1760
James Zern [Mon, 25 Apr 2022 18:20:48 +0000 (11:20 -0700)]
add_noise_test.cc: remove stale TODO
this was completed in:
0dc69c70f postproc : fix function parameters for noise functions.
Change-Id: I84f789ca333e9690e70e696d44475dd59339593b
yuanhecai [Fri, 8 Apr 2022 07:00:33 +0000 (15:00 +0800)]
vp9[loongarch]: Optimize sub_pixel_variance32x32/sad16x16
1. vpx_sad16x16_lsx
2. vpx_sub_pixel_variance32x32_lsx
Bug: webm:1755
Change-Id: I9926ace710903993ccbb42caef320fa895e90127
yuanhecai [Sun, 3 Apr 2022 10:49:52 +0000 (18:49 +0800)]
vp9[loongarch]: Optimize horizontal/vertical_4/dual
1. vpx_lpf_horizontal_4_lsx
2. vpx_lpf_vertical_4_lsx
3. vpx_lpf_horizontal_4_dual_lsx
3. vpx_lpf_vertical_4_dual_lsx
Bug: webm:1755
Change-Id: I12e9f27cafd9514b24cfbf2354cc66c7d1238687
yuanhecai [Mon, 18 Apr 2022 08:21:04 +0000 (16:21 +0800)]
vp9[loongarch]: Optimize convolve8_avg_vert/convolve_copy
1. vpx_convolve8_avg_vert_lsx
2. vpx_convolve_copy_lsx
3. vpx_idct32x32_135_add_lsx
Bug: webm:1755
Change-Id: I6bdfe5836a91a5e361ab869b26641e86c5ebb68d
yuanhecai [Mon, 18 Apr 2022 08:17:17 +0000 (16:17 +0800)]
vp9[loongarch]: Optimize vertical/horizontal_8_dual
1. vpx_lpf_vertical_8_dual_lsx
2. vpx_lpf_horizontal_8_dual_lsx
Bug: webm:1755
Change-Id: I354df02cc215f36b4edf6558af0ff7fd6909deac
James Zern [Fri, 22 Apr 2022 00:16:28 +0000 (00:16 +0000)]
Merge "vp8_decode: free mt buffers early on resolution change" into main
James Zern [Wed, 20 Apr 2022 02:26:37 +0000 (19:26 -0700)]
fdct16x16_neon.h,cosmetics: fix include-guard case
Change-Id: I593735bb7f88d63f2ddab57484099479c8759a3d
James Zern [Wed, 20 Apr 2022 00:24:26 +0000 (17:24 -0700)]
vp8_decode: free mt buffers early on resolution change
this avoids a desynchronization of mb_rows if an allocation prior to
vp8mt_alloc_temp_buffers() fails and the decoder is then destroyed
Bug: webm:1759
Change-Id: I75457ef9ceb24c8a8fd213c3690e7c1cf0ec425f
James Zern [Tue, 19 Apr 2022 02:10:11 +0000 (19:10 -0700)]
webmdec: fix double free
when no frames were decoded, for example due to a decoder initialization
failure, an orphan buffer pointer from webm_guess_framerate() via
webm_read_frame() would have been freed during cleanup
Change-Id: I6ea3defdd13dd75427f79c516e207b682391e4fa
James Zern [Tue, 19 Apr 2022 02:07:39 +0000 (19:07 -0700)]
vp9_dx_iface,init_buffer_callbacks: return on alloc failure
use an error code as a jmp target is not currently set in init_decoder()
Change-Id: If7798039439f13c739298a8a92a55aaa24e2210c
James Zern [Tue, 19 Apr 2022 01:59:57 +0000 (18:59 -0700)]
vp9_encoder: check context buffer allocations
previously the returns for alloc_context_buffers_ext() and
vp9_alloc_context_buffers() were ignored which would result in a NULL
access during encoding should they fail
Change-Id: Icd76576f3d5f8d57697adc9ae926a3a5be731327
James Zern [Tue, 19 Apr 2022 01:57:51 +0000 (18:57 -0700)]
vp9_alloc_internal_frame_buffers: fix num buffers assignment
avoid setting num_internal_frame_buffers until the allocation is
checked, avoiding an invalid access in vp9_free_internal_frame_buffers()
Change-Id: I28a544a2553d62a6b5cb7c45bf10591caa4ebab6
James Zern [Tue, 19 Apr 2022 01:56:49 +0000 (18:56 -0700)]
vp9_alloccommon: add missing pointer checks
in vp9_free_ref_frame_buffers() and vp9_free_context_buffers(); pool and
free_mi may be NULL due to earlier allocation failures
Change-Id: I3bd26ea29b3aea6c58f33d5b7f5a280eb6250ec7
James Zern [Tue, 19 Apr 2022 00:16:29 +0000 (00:16 +0000)]
Merge changes If8318068,I21519b5b into main
* changes:
temporal_filter_sse4,cosmetics: fix some typos
temporal_filter_sse4: remove unused function params
James Zern [Thu, 14 Apr 2022 20:08:58 +0000 (13:08 -0700)]
temporal_filter_sse4,cosmetics: fix some typos
Change-Id: If8318068a32da52d15c0ba595f80092611f4c847
James Zern [Mon, 18 Apr 2022 18:10:30 +0000 (18:10 +0000)]
Merge "Upgrade GoogleTest to v1.11.0" into main
James Zern [Fri, 15 Apr 2022 23:45:26 +0000 (16:45 -0700)]
Upgrade GoogleTest to v1.11.0
The release tag is release-1.11.0.
Ref: https://aomedia-review.googlesource.com/c/aom/+/156641
79c98a122 Upgrade GoogleTest to v1.11.0
Note the tree structure differs from libaom, but is left untouched to
avoid breaking test include paths in this commit.
Change-Id: Ia3c6861d45a3befc2decb1da5b1018bcfd38f95a
James Zern [Sat, 16 Apr 2022 05:29:31 +0000 (22:29 -0700)]
vp8,get_sub_mv_ref_prob: change arguments to uint32_t
this matches the call with int_mv::as_int and fixes a warning with
clang-13 -fsanitize=integer:
vp8/decoder/decodemv.c:240:32: runtime error: implicit conversion from
type 'uint32_t' (aka 'unsigned int') of value
4282515456 (32-bit,
unsigned) to type 'int' changed the value to -
12451840 (32-bit, signed)
Bug: webm:1759
Change-Id: I7c0aa72baa45421929afac26566e149adc6669d7
James Zern [Sat, 16 Apr 2022 05:23:05 +0000 (22:23 -0700)]
vp8: fix some implicit unsigned -> int conversions
fixes some warnings with clang-13 -fsanitize=integer:
vp8/decoder/threading.c:77:27: runtime error: implicit conversion
from type 'unsigned int' of value
4294967295 (32-bit, unsigned) to type
'int' changed the value to -1 (32-bit, signed)
these bitmask constants were missed in:
1676cddaa vp8: fix some implicit signed -> unsigned conv warnings
Bug: webm:1759
Change-Id: I5d894d08fd41e32b91b56a4d91276837b3415ee4
James Zern [Sat, 16 Apr 2022 04:51:13 +0000 (04:51 +0000)]
Merge changes I9c24f75e,I83bce11c into main
* changes:
vp9[loongarch]: Optimize idct32x32_1024/1/34_add
vp9[loongarch]: Optimize vpx_fdct32x32/32x32_rd
Jerome Jiang [Fri, 15 Apr 2022 14:51:37 +0000 (14:51 +0000)]
Merge "Fix int overflow in intermediate calculation" into main
yuanhecai [Thu, 14 Apr 2022 03:30:55 +0000 (11:30 +0800)]
vp9[loongarch]: Optimize idct32x32_1024/1/34_add
1. vpx_idct32x32_1024_add_lsx
2. vpx_idct32x32_34_add_lsx
3. vpx_idct32x32_1_add_lsx
Bug: webm:1755
Change-Id: I9c24f75e0d93613754d8e30da7e007b8d1374e60
yuanhecai [Wed, 16 Mar 2022 06:16:33 +0000 (14:16 +0800)]
vp9[loongarch]: Optimize vpx_fdct32x32/32x32_rd
1. vpx_fdct32x32_lsx
2. vpx_fdct32x32_rd_lsx
Bug: webm:1755
Change-Id: I83bce11c0d905cf137545a46cd756aef9cedce47
James Zern [Thu, 14 Apr 2022 05:24:08 +0000 (22:24 -0700)]
temporal_filter_sse4: remove unused function params
this clears warnings under clang-13 of the form:
../vp9/encoder/x86/temporal_filter_sse4.c:275:39: warning: parameter
'u_pre' set but not used [-Wunused-but-set-parameter]
Change-Id: I21519b5b0b9c21b04b174327415e0e73b56bdfda
Jerome Jiang [Wed, 6 Apr 2022 16:46:57 +0000 (09:46 -0700)]
Fix int overflow in intermediate calculation
This is not a complete fix to webm:1751.
Bug: webm:1751
Change-Id: Ieed6c823744f5f0625d529db3746cfe4f549c8c0
James Zern [Thu, 14 Apr 2022 17:28:52 +0000 (17:28 +0000)]
Merge "vp9,update_mbgraph_frame_stats: rm unused variables" into main
James Zern [Thu, 14 Apr 2022 05:16:30 +0000 (22:16 -0700)]
vp9,update_mbgraph_frame_stats: rm unused variables
this quiets warnings under clang-13 of the form:
../vp9/encoder/vp9_mbgraph.c:222:42: warning: variable 'gld_y_offset'
set but not used [-Wunused-but-set-variable]
Change-Id: I32170b90c07058f780b4e8100ee5217232149db8
James Zern [Thu, 14 Apr 2022 05:14:33 +0000 (22:14 -0700)]
vp8,define_gf_group: remove unused variable
this clears a warning under clang-13:
vp8/encoder/firstpass.c:1634:10: warning: variable
'mod_err_per_mb_accumulator' set but not used
[-Wunused-but-set-variable]
Change-Id: I694a99d56724be89090e01c45559237c0fda147a
yuanhecai [Thu, 31 Mar 2022 07:01:30 +0000 (15:01 +0800)]
Update loongson_intrinsics.h from v1.0.5 to v1.2.1
Bug: webm:1755
Change-Id: Ib636d2aa521332b76b6aa1b0aa0a9005aafbf32b
yuanhecai [Sat, 19 Mar 2022 02:44:27 +0000 (10:44 +0800)]
vp9[loongarch]: Optimize vpx_variance64x64/32x32
1. vpx_variance64x64_lsx
2. vpx_variance32x32_lsx
Bug: webm:1755
Change-Id: I45c5aa94cbbf7128473894a990d931acaa40e102
yuanhecai [Tue, 15 Mar 2022 08:15:36 +0000 (16:15 +0800)]
vp9[loongarch]: Optimize sad64x64/32x32/16x16
1. vpx_sad64x64x4d_lsx
2. vpx_sad32x32x4d_lsx
3. vpx_sad16x16x4d_lsx
4. vpx_sad64x64_lsx
5. vpx_sad32x32_lsx
Bug: webm:1755
Change-Id: Ief71c2216f697b261d7c1fc481c89c9f1a6098e6
James Zern [Mon, 11 Apr 2022 20:28:44 +0000 (20:28 +0000)]
Merge "vpxdec: add some allocation checks" into main
James Zern [Mon, 11 Apr 2022 18:41:19 +0000 (11:41 -0700)]
vpxdec: add some allocation checks
see also: https://crbug.com/aomedia/3244
Change-Id: I7d151e63a91b8c1a5ee4e861f0b8461eeece6a2f
James Zern [Mon, 11 Apr 2022 18:08:12 +0000 (11:08 -0700)]
rate_hist,show_histogram: fix crash w/0 buckets
this can occur if 0 frames are encoded, e.g., due to --skip
see also: https://crbug.com/aomedia/3243
Change-Id: I791d5ad6611dbcb60d790e6b705298328ec48126
Cheng Chen [Tue, 5 Apr 2022 18:25:23 +0000 (18:25 +0000)]
Merge "L2E: Make SimpleEncode take vp9 level as an input" into main
James Zern [Tue, 5 Apr 2022 02:52:06 +0000 (02:52 +0000)]
Merge changes I0b6520be,I1f006daa,I7ee8e367 into main
* changes:
vp9[loongarch]: Optimize vpx_convolve8_avg_horiz_c
vp8[loongarch]: Optimize dequant_idct_add_y/uv_block
loongarch: Fix bugs
Johann Koenig [Mon, 4 Apr 2022 00:59:23 +0000 (00:59 +0000)]
Merge "remove unused vp8_encode_intra parameter" into main
James Zern [Thu, 31 Mar 2022 21:54:24 +0000 (21:54 +0000)]
Merge changes I4c63beeb,I28f3b98f into main
* changes:
Revert "quantize: replace highbd versions"
Revert "quantize: remove highbd version"
Johann Koenig [Thu, 31 Mar 2022 21:43:47 +0000 (21:43 +0000)]
Merge "subpel variance: add speed test" into main
James Zern [Thu, 31 Mar 2022 19:11:01 +0000 (12:11 -0700)]
Revert "quantize: replace highbd versions"
This reverts commit
2200039d33c49a9f7a5c438656df143755b022c4.
This causes failures with VP9/EndToEndTestLarge.EndtoEndPSNRTest/*; it
seems the assembly does not match the C code.
Bug: webm:1586
Change-Id: I4c63beebf88d4c12789d681b0d38014510b147fe
James Zern [Thu, 31 Mar 2022 19:10:03 +0000 (12:10 -0700)]
Revert "quantize: remove highbd version"
This reverts commit
89cfe3835c47dabf77d38edb3af190155984fa9a.
This is a prerequisite for reverting
2200039d33c49a9f7a5c438656df143755b022c4 which causes high bitdepth test
failures
Bug: webm:1586
Change-Id: I28f3b98f3339f3573b1492b88bf733dade133fc0
yuanhecai [Wed, 30 Mar 2022 06:04:10 +0000 (14:04 +0800)]
vp9[loongarch]: Optimize vpx_convolve8_avg_horiz_c
1. vpx_convolve8_avg_horiz_lsx
Bug: webm:1755
Change-Id: I0b6520be0afa1689da329f56ec6cd95c1730250c
yuanhecai [Mon, 28 Mar 2022 09:12:57 +0000 (17:12 +0800)]
vp8[loongarch]: Optimize dequant_idct_add_y/uv_block
1. vp8_dequant_idct_add_uv_block_lsx
2. vp8_dequant_idct_add_y_block_lsx
Bug: webm:1755
Change-Id: I1f006daaefb2075b422bc72a3f69c5abee776e2e
yuanhecai [Tue, 22 Mar 2022 05:58:50 +0000 (13:58 +0800)]
loongarch: Fix bugs
Fix bugs from loopfilter_filters_lsx.c, vpx_convolve8_avg_lsx.c
Bug: webm:1755
Change-Id: I7ee8e367d66a49f3be10d7e417837d3b6ef50bdb
Johann Koenig [Thu, 31 Mar 2022 05:45:23 +0000 (05:45 +0000)]
Merge "quantize: remove highbd version" into main
Johann [Wed, 30 Mar 2022 06:33:40 +0000 (15:33 +0900)]
quantize: remove highbd version
The only difference between the code is the clamp. For
8 bit it is purely an optimization. The values outside
this range will still saturate.
Change-Id: I2a770b140690d99e151b00957789bd72f7a11e13
Johann [Mon, 4 Nov 2019 21:58:07 +0000 (15:58 -0600)]
remove unused vp8_encode_intra parameter
Follow it up and also remove it from other functions.
BUG=webm:1612
Change-Id: I9d3cb785ab0d68c6fcae185043c896d8a135e284
James Zern [Thu, 31 Mar 2022 01:53:51 +0000 (01:53 +0000)]
Merge "Optimize FHT functions for NEON" into main
Johann [Thu, 31 Mar 2022 01:43:29 +0000 (10:43 +0900)]
subpel variance: add speed test
Was used to verify assembly speed versus an attempt to rewrite
in intrinsics.
Change-Id: I011fe5494334b8fcda04b9d54c6093dbcfc55710
Johann Koenig [Thu, 31 Mar 2022 00:45:31 +0000 (00:45 +0000)]
Merge "remove sad x3,x8 specializations" into main
Johann [Wed, 30 Mar 2022 05:57:46 +0000 (14:57 +0900)]
quantize: replace highbd versions
The optimized quantize functions were already built to handle
highbd values. The only difference is the clamping. All highbd
functions expand to 32bits when running in highbd mode.
Removes vpx_highbd_quantize_32x32_sse2 as it is slower than the
C version in the worst case.
Bug: webm:1586
Change-Id: I49bf8a6a2041f78450bf43a4f655c67656b0f8d9
Cheng Chen [Wed, 30 Mar 2022 22:47:17 +0000 (15:47 -0700)]
L2E: Make SimpleEncode take vp9 level as an input
Level conformance is standadized in vp9.
If a specific target level is set, the vp9 encoder is required to
produce conformant bitstream with limit on frame size, rate,
min alt-ref distance, etc.
This change makes the SimpleEncode environment take the target level
as an input.
To make existing tests pass, we set the level to 0.
Change-Id: Ia35224f75c2fe50338b5b86a50c84355f5daf6fd
Konstantinos Margaritis [Wed, 16 Mar 2022 14:27:27 +0000 (16:27 +0200)]
Optimize FHT functions for NEON
[NEON]
Optimize vp9_fht4x4, vp9_fht8x8, vp9_fht16x16 for NEON
Following change #3516278, the improvement for these functions is:
Before:
4.10% 0.75% vpxenc vpxenc [.] vp9_fht16x16_c
2.93% 0.65% vpxenc vpxenc [.] vp9_fht8x8_c
0.93% 0.77% vpxenc vpxenc [.] vp9_fht4x4_c
And after the patch:
0.69% 0.16% vpxenc vpxenc [.] vp9_fht16x16_neon
0.28% 0.28% vpxenc vpxenc [.] vp9_fht8x8_neon
0.54% 0.53% vpxenc vpxenc [.] vp9_fht4x4_neon
Bug: webm:1634
Change-Id: I6748a0c4e0cfaafa3eefdd4848d0ac3aab6900e4
James Zern [Wed, 30 Mar 2022 03:00:00 +0000 (20:00 -0700)]
sad4d_avx2: fix VS 2014 build error
after:
d60b671a7 gcc 11 warning: mismatched bound
error C2719: 'sums': formal parameter with requested alignment of 32
won't be aligned
Change-Id: Iaba46d00ef2334a5e2d9ee69b5d03478fdc73a60
Johann [Tue, 29 Mar 2022 03:40:12 +0000 (12:40 +0900)]
remove skip_block from quantize
Whether a block is skipped is handled by mi->skip. x->skip_block
is kept exclusively to verify that the quantize functions are not
called for skip blocks.
Finishes the cleanup in
13eed991f
Bug: libvpx:1612
Change-Id: I1598c3b682d3c5e6c57a15fa4cb5df2c65b3a58a
Johann [Mon, 28 Mar 2022 06:27:46 +0000 (15:27 +0900)]
remove sad x3,x8 specializations
These would compute the sum of absolute differences (sad) for a
group of 3 or 8 references. This was used as part of an exhaustive
search.
vp8 only uses these functions in speed 0 and best quality.
For vp9 this is only used with the --enable-non-greedy-mv
experiment.
This removes the 3- and 8-at-a-time optimized functions and uses
the fall back code which will process 1 or 4 (vpx_sadMxNx4d) at
a time.
For configure --target=x86_64-linux-gcc --enable-realtime-only:
libvpx.a
before: 3002424 after: 2937622 delta: 64802
after 'strip libvpx.a'
before: 2116998 after: 2073090 delta: 43908
Change-Id: I566d06e027c327b3bede68649dd551bba81a848e
Johann Koenig [Tue, 29 Mar 2022 03:18:02 +0000 (03:18 +0000)]
Merge "gcc 11 warning: mismatched bound" into main
Johann [Wed, 23 Mar 2022 05:28:29 +0000 (14:28 +0900)]
gcc 11 warning: mismatched bound
Clean up a new build warning with gcc11:
argument 3 of type ‘const uint8_t * const[]’ with
mismatched bound [-Warray-parameter=]
Standardize sad functions with array sizes.
Change-Id: Iea4144e61368f6a8279e2f3ae96c78aff06c8b41
James Zern [Sat, 26 Mar 2022 17:25:18 +0000 (10:25 -0700)]
ads2armasm_ms.pl: fix thumb::FixThumbInstructions call
broken since:
642529248 ads2gas[_apple].pl: remove unused stanzas
Change-Id: I1eac77e2fe23cc3f162251e9e0102a4909f7b997
James Zern [Thu, 24 Mar 2022 19:39:10 +0000 (19:39 +0000)]
Merge "Make sure only NEON FDCT functions are called." into main
Johann [Wed, 23 Mar 2022 05:18:58 +0000 (14:18 +0900)]
ads2gas: maintain whitespace
Don't use tabs during conversion. Save and restore
existing spacing.
Change-Id: Ib8f443db542c091d36e9ab9836e3e3e292d711f7