James Zern [Thu, 30 Apr 2020 17:28:43 +0000 (10:28 -0700)]
libs.mk,msvc: add missing vp9rc project
+ fix some test_rc_interface issues:
add a space before $^ in the vcproj rule to add sources to the target,
one between the -I's, and make the guid unique; fixes build / link
errors.
Wan-Teh Chang [Mon, 4 May 2020 18:18:22 +0000 (11:18 -0700)]
Remove unneeded null check for entry in for loop
In vpx_codec_control_(), before we enter the for loop, we have already
checked if ctx->iface->ctrl_maps is null and handle that as an error. So
the for loop can assume ctx->iface->ctrl_maps is not null, which implies
'entry' is not null (both initially and after entry++).
James Zern [Wed, 29 Apr 2020 01:51:01 +0000 (18:51 -0700)]
test/*.sh: add explicit error checks/returns
there was an assumption that function calls would terminate early with
an error given 'set -e' was being used. this is true, but only when the
function is part of a simple command otherwise it won't inherit the
behavior. many of the call sites use 'func || return 1' syntax meaning
the function would continue to completion return with the status of the
last command executed. this hid errors with e.g., eval statements. inner
calls within the functions are now explicitly tested for failure.
James Zern [Tue, 21 Apr 2020 02:30:24 +0000 (19:30 -0700)]
realtime_test: add IntegerOverflow test
use an extreme bitrate to cover rate control calculations.
this is disabled by default as there are a mix of
-fsanitize=undefined/integer warnings for vp9 and -fsanitize=integer
warnings for vp8.
this is a follow-up to: 5e065cf9d vp8/{ratectrl,onyx_if}: fix some signed integer overflows 5eab093a7 vp9_ratectrl: fix some signed integer overflows
Marco Paniconi [Fri, 17 Apr 2020 18:58:01 +0000 (11:58 -0700)]
vp9-rtc: Some speedups to speed 5 real-time mode
Enable use_source_sad at speed 5 and use it to
condition min_partition_size in nonrd_select_partition.
Also disable checking rectangular partitions in
nonrd_pick_partition for speed >= 5.
~5-8% speedup for HD clip on x86.
bdrate loss of ~1% on rtc set.
Marco Paniconi [Thu, 9 Apr 2020 01:39:41 +0000 (18:39 -0700)]
vp9-rtc: Disable nonrd_keyframe for SVC, speed >=8
For speed >= 8: disable nonrd_keyframe SVC with
spatial_layers > 1. In this case having base
spatial layer key frame with higher quality
(hybrid mode search) is beneficial, without too
much cpu cost (since its on lowest spatial layer).
Johann [Mon, 6 Apr 2020 07:06:45 +0000 (16:06 +0900)]
x86_abi_support: do not decorate coff functions
:private_extern only applies to macho. Match x86inc.asm logic:
%if FORMAT_ELF
global %2:function hidden
%elif FORMAT_MACHO
global %2:private_extern
%else
global %2
%endif
May fix a build issue on windows:
vp8/encoder/x86/block_error_sse2.asm:18: error:
COFF format does not support any special symbol types
* changes:
x86inc.asm: update to 3e5aed95c
x86inc.asm: namespace ARCH_* defines
x86inc.asm: only set visibility for chromium builds
x86inc.asm: do not align .text for aout
x86inc.asm: use .text on march32
x86inc.asm: copy PIC macros from x86_abi_support.asm
x86inc.asm: set PREFIX from libvpx defines
x86inc.asm: pull settings from libvpx
x86inc.asm: update to 3e5aed95
Johann [Thu, 2 Apr 2020 01:59:01 +0000 (10:59 +0900)]
x86inc.asm: only set visibility for chromium builds
Reapply and update a4b47b89f. This restores the previous version's
behavior avoiding issues with builds that may split sources on
directory boundaries; protected visibility may work in this case.
Clement Courbet [Fri, 20 Mar 2020 08:22:55 +0000 (09:22 +0100)]
Optimize vp9_get_sub_block_energy.
Because energy scaling is non-decreasing, we can work on the variance
and scale after the loop. This avoids costly computations (in
particular, log()) within the loop.
We've measured that we spend 0.8% of our total time computing the log.
* changes:
Correct time_base of ivf header in SimpleEncode
Add detail comments on valid_list in SimpleEncode
Add missing Copyright to python files
Move member functions up in simple_encode.h
as g_usage was never supported for vp8/9 this was always a single
iteration. if additional usages are added in the future similar to av1
this can be restored.
* changes:
Add unit test for ref_frame_info
Add key frame group info to SimpleEncode
Add ref_frame_info to encode_frame_result
Add init/update_frame_indexes()
Add GetVectorData()
angiebird [Tue, 3 Mar 2020 04:04:11 +0000 (20:04 -0800)]
Add unit test for ref_frame_info
Fix several bugs to make the test pass.
1) Move update_frame_indexes() out of show_frame check.
2) Init coding_indexes[i] to -1 when key frame appears
3) Fix a bug in PostUpdateRefFrameInfo()
angiebird [Fri, 21 Feb 2020 00:16:38 +0000 (16:16 -0800)]
Use ObserveGroupOfPicture() in EncodeFrame test
In the previous version, we assume the number of coding frames is
known.
Although the assumption is true for now with rate_ctrl flag on,
it's more proper to use ObserveGroupOfPicture() to get
the partial info about how many coding frames are in the group.
Because We want to keep the flexibility of changing the size of
group of pictures on the fly in the future.
angiebird [Thu, 20 Feb 2020 22:11:25 +0000 (14:11 -0800)]
Add kGoldenFrame and kOverlayFrame to FrameType
Add coding_index to EncodeFrameInfo
Add start_coding_index to GroupOfPicture
Add frame_coding_index_ to SimpleEncode
The definition of coding index is as follows.
Each show or no show frame is assigned with a coding index based
on its coding order (starting from zero) in the coding process of
the entire video. The coding index for each frame is unique.
James Zern [Sat, 15 Feb 2020 05:00:21 +0000 (21:00 -0800)]
vp8_decode: add missing vpx_clear_system_state
this avoids leaving the floating point unit in an inconsistent state on
error and breaking subsequent tests on x86
the test clip invalid-bug-148271109.ivf would also result in a sanitizer
error prior to:
vp8,GetSigned: silence unsigned int overflow warning
James Zern [Sat, 15 Feb 2020 01:36:47 +0000 (17:36 -0800)]
vp8,GetSigned: silence unsigned int overflow warning
in non-conformant fuzzed bitstreams the calculation of br->value may
overflow. this is defined behavior and harmless in that the stream is
already corrupt.
James Zern [Sat, 15 Feb 2020 01:39:22 +0000 (17:39 -0800)]
x86_simd_caps: make mask value unsigned
fixes -fsanitize=integer warning:
runtime error: implicit conversion from type 'int' of value -1 (32-bit,
signed) to type 'unsigned int' changed the value to 4294967295 (32-bit,
unsigned)