James Zern [Fri, 17 Jun 2022 01:22:52 +0000 (18:22 -0700)]
vp9_cx_iface: set default cpu_used=5 w/CONFIG_REALTIME_ONLY
this avoids a crash if cpu-used is not explicitly set as there are some
(unnecessary) checks against use_nonrd_pick_mode which would cause
encoding to be skipped if the old default of 0 were used
Wan-Teh Chang [Fri, 10 Jun 2022 20:52:31 +0000 (13:52 -0700)]
Convert EncoderTest::last_pts_ to a local variable
Convert the data member EncoderTest::last_pts_ to a local variable in
the EncoderTest::RunLoop() and VP9FrameSizeTestsLarge::RunLoop()
methods. EncoderTest::last_pts_ is only used in these two methods, and
these two methods first set EncoderTest::last_pts_ to 0 before using it.
So EncoderTest::last_pts_ is effectively a local variable in these two
methods.
Note that several subclasses of EncoderTest declare their own last_pts_
data member and use it to calculate the data rate. Apparently their own
last_pts_ data member hides the same-named data member in the base
class. Although this is allowed by C++, this is very confusing.
James Zern [Fri, 3 Jun 2022 02:38:03 +0000 (19:38 -0700)]
libs.mk,build/make/Makefile: make test targets ordinary rules
this fixes a regression in make 4.2 and still present in 4.3 causing
double colon rules to be serialized which breaks sharding done by the
test and test-no-data-check rules. these targets only define one set of
rules so ordinary rules work unlike clean. install may be another
candidate, but that's left for a follow up.
Change-Id: I9f074eca2ad266eeca6e31aae2e9f31eec8680e0
Tested: make 3.81, 4.1, 4.2, 4.2.1, 4.3
James Zern [Thu, 2 Jun 2022 01:55:10 +0000 (18:55 -0700)]
vp9,encoder: fix some integer sanitizer warnings
the issues fixed in this change are related to implicit conversions
between int / unsigned int:
vp9/encoder/vp9_segmentation.c:42:36: runtime error: implicit conversion
from type 'int' of value -9 (32-bit, signed) to type 'unsigned int'
changed the value to 4294967287 (32-bit, unsigned)
vpx_dsp/x86/sum_squares_sse2.c:36:52: 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)
vpx_dsp/x86/sum_squares_sse2.c:36:67: 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)
vp9/encoder/x86/vp9_diamond_search_sad_avx.c:81:45: runtime error:
implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4290576316 (32-bit, unsigned) to type 'int' changed the value to
-4390980 (32-bit, signed)
vp9/encoder/vp9_rdopt.c:3472:31: runtime error: implicit conversion from
type 'int' of value -1024 (32-bit, signed) to type 'uint16_t' (aka
'unsigned short') changed the value to 64512 (16-bit, unsigned)
unsigned is forced for masks and int is used with intel intrinsics
James Zern [Sat, 28 May 2022 22:25:49 +0000 (15:25 -0700)]
resize_test: add TODO for ResizeTest instantiation for VP9
this should match VP8 and use ONE_PASS_TEST_MODES, but currently the
code will produce integer sanitizer warnings and may segfault under
certain conditions
James Zern [Fri, 27 May 2022 02:38:01 +0000 (19:38 -0700)]
libs.doxy_template: remove some obsolete variables
- COLS_IN_ALPHA_INDEX
this was unused given ALPHABETICAL_INDEX = NO
- PERL_PATH / MSCGEN_PATH
these were unused
quiets warnings with doxygen 1.9.1:
warning: Tag 'COLS_IN_ALPHA_INDEX' at line 1110 of file 'doxyfile' has
become obsolete.
warning: Tag 'PERL_PATH' at line 1105 of file 'doxyfile' has become
obsolete.
warning: Tag 'MSCGEN_PATH' at line 1126 of file 'doxyfile' has become
obsolete
Cheng Chen [Fri, 13 May 2022 20:42:28 +0000 (13:42 -0700)]
L2E: Add vp9 GOP decision helper function
Add a helper function to call the external rate control model.
The helper function is placed in the function where vp9 determines
GOP decisions.
The helper function passes frame information, including current
frame show index, coding index, etc to the external rate control
model, and then receives GOP decisions.
The received GOP decisions overwrites the default GOP decision, only
when the external rate control model is set to be active via
the codec control.
The decision should satisfy a few constraints, for example, larger
than min_gf_interval; smaller than max_gf_interval. Otherwise,
return error.
Unit tests are added to test the new functionality.
Original change's description:
> [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
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.
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
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
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
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
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
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)
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
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]
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]
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]