Angie Chiang [Thu, 15 Oct 2020 19:05:37 +0000 (12:05 -0700)]
Add unit test for vp9_ext_ratectrl
Fix three bugs along the way.
1) Call vp9_extrc_send_firstpass_stats() after vp9_extrc_create()
2) Pass in model pointer in vp9_extrc_create()
3) Free frame_stats buffer in vp9_extrc_delete()
VP9E_SET_EXTERNAL_RATE_CONTROL
One can assign an external library using the control flag,
VP9E_SET_EXTERNAL_RATE_CONTROL.
The args alongside the control flag should be of type char**.
args[0]: char* points to the path of rate control library
args[1]: char* points to the config of the rate control library.
James Zern [Fri, 25 Sep 2020 20:21:11 +0000 (13:21 -0700)]
configure: add darwin20 support
this release will have arm64 and x86_64 support. in the future it might
be useful to move to mac/iphone targets to help disambiguate
arm64-darwin-gcc and arm64-darwin20-gcc.
Joel Fernandes [Mon, 14 Sep 2020 02:05:47 +0000 (22:05 -0400)]
vp8: Remove sched_yield on POSIX systems
libvpx does sched_yield() on Linux. This is highly frowned upon these
days mainly because it is not needed and causes high scheduler overhead.
It is not needed because the kernel will preempt the task while it is
spinning which will imply a yield. On ChromeOS, not yielding has the
following improvements:
As you can see, there is a 5% drop in the scheduler's CPU utilization.
2. power_VideoCall test results:
There is a 3% improvement on max video FPS, from 30 to 31. This
improvement is consistent.
Also note that the sched_yield() manpage itself says it is intended
only for RT tasks. From manpagE: "sched_yield() is intended for use
with real-time scheduling policies (i.e., SCHED_FIFO or SCHED_RR)
and very likely means your application design is broken."
Sarah Parker [Fri, 11 Sep 2020 03:33:02 +0000 (20:33 -0700)]
googletest: enable failure on uninstantiated tests
Similar to the change in
https://aomedia-review.googlesource.com/c/aom/+/115162.
This currently is a warning, but the tree should be clean now in the
default x86-64 configuration so we can use it to prevent regressions and
find any remaining issues in other configurations.
Marco Paniconi [Mon, 11 May 2020 19:22:19 +0000 (12:22 -0700)]
vp9-rtc: Add control to disable maxq on overshoot
Add encoder control to disable feature to increase Q
on overshoot detection, for CBR. Default (no usage
of the control) means the feature is internally enabled.
Add the control to the sample encoders, but keep it
disabled as default (set to 0, so feature is on).
$ make
foo
'foo
"foo
foo#bar
'foo#bar'
"foo#bar"
make: *** No targets. Stop.
$ make -v
GNU Make 4.2.1
```
In other words, the `#` character is evaluated first when parsing
Makefiles, causing the rest of the line to become a comment. The effect of
this is that paths that contain embedded `#` symbols are not handled
properly in the vpx build system.
To test this change, clone vpx to a directory containing a `#` symbol and
attempt a build. With this change, it worked for me on Fedora 31, however
without the change the build failed.
Marco Paniconi [Wed, 19 Aug 2020 00:56:51 +0000 (17:56 -0700)]
vp9-svc: Fix to resetting RC for temporal layers
Fix to reset RC for temporal layers: the
first_spatial_layer_to_encode is usually/default 0,
so the logic to reset for temporal layers was not
being executed. Use VPXMAX(1, ) to make sure all
temporal layers will be reset (when max-q is used
for overshoot).
jinbo [Sat, 15 Aug 2020 09:20:36 +0000 (17:20 +0800)]
Refine MMI & MSA detection for mips
1.Add compile check to probe the native ability of
toolchain to decide whether a feature can be enabled.
2.Add runtime check to probe cpu supported features.
MSA will be prefered if MSA and MMI are both supported.
3.You can configure and build as following commands:
./configure --cpu=loongson3a && make -j4
angiebird [Fri, 7 Aug 2020 22:44:08 +0000 (15:44 -0700)]
Fix ObserveFirstPassMotionVectors()
1) Use kRefFrameTypeNone in the unit test
2) Reset mv_info in fp_motion_vector_info_init
3) Call fp_motion_vector_info_init() in first_pass_encode()
4) Set mv_info for intra frame.
5) Set mv_info with zero mv as default for inter frame
6) Remove duplicated fp_motion_vector_info in encode_frame_info
Store motion vectors for each 16x16 block found in the first pass
motion search.
Provide an api "ObserveFirstPassMotionVector()" in SimpleEncode
class, similar to "ObserveFirstPassStats()".
Marco Paniconi [Fri, 26 Jun 2020 22:34:35 +0000 (15:34 -0700)]
vp9-svc: Fix to setting frame size for dynamic resize
For svc with dynamic resize (only for single_layer_svc mode),
add flag to indicate resized width/height has already been set,
otherwise on the resized/trigger frame (resize_pending=1), the
wrong resolution may be set if oxcf->width/height is different
than layer width/height in single_layer_svc mode.
Fix two bugs reported by clang when enable msa optimizatons:
1. clang dose not support uld instruction.
2. ulw instruction will result in unit cases coredump.
1. Adjust variable type to match clang compiler.
Clang is more strict on the type of asm operands, float or double
type variable should use constraint 'f', integer variable should
use constraint 'r'.
2. Fix prob of using r-value in output operands.
clang report error: 'invalid use of a cast in a inline asm context
requiring an l-value: remove the cast or build with -fheinous-gnu-extensions'.
Marco Paniconi [Mon, 6 Jul 2020 18:28:56 +0000 (11:28 -0700)]
vp9: Fix to use last_q for resize check
For temporal layers resize is only checked
on the base/TL0 frames. So rc->last_q should be used,
which because rc is in the layer context, rc->last_q
will correspond to the qindex on last TL0 frame.
In the previous code cm->base_qindex was used, which
would correspond to qindex on last encoded frame, which
is not TL0 when temporal_layers > 1.
jinbo [Wed, 24 Jun 2020 09:10:20 +0000 (17:10 +0800)]
vp8,vpx_dsp:[loongson] fix specification of instruction name
1.'xor,or,and' to 'pxor,por,pand'. In the case of operating FPR,
gcc supports both of them, clang only supports the second type.
2.'dsrl,srl' to 'ssrld,ssrlw'. In the case of operating FPR, gcc
supports both of them, clang only supports the second type.
Marco Paniconi [Fri, 26 Jun 2020 22:34:35 +0000 (15:34 -0700)]
vp9-svc: Fix to setting frame size for dynamic resize
For svc with dynamic resize (only for single_layer_svc mode),
add flag to indicate resized width/height has already been set,
otherwise on the resized/trigger frame (resize_pending=1), the
wrong resolution may be set if oxcf->width/height is different
than layer width/height in single_layer_svc mode.