platform/upstream/libvpx.git
3 years ago{highbd_,}loopfilter_neon.c: quiet -Wmaybe-uninitialized
James Zern [Wed, 20 Jan 2021 02:38:23 +0000 (18:38 -0800)]
{highbd_,}loopfilter_neon.c: quiet -Wmaybe-uninitialized

Seen with arm-linux-gnueabihf-gcc-8 (8.3.0 & 8.4.0)

Without reworking the code or adding an additional branch this warning
cannot be silenced otherwise. The loopfilter is only called when needed
for a block so these output pixels will be set.

BUG=b/176822719

Change-Id: I9cf6e59bd5de901e168867ccbe021d28d0c04933

3 years agoRelax constraints on Y4M header parsing
Elliott Karpilovsky [Thu, 14 Jan 2021 22:17:08 +0000 (14:17 -0800)]
Relax constraints on Y4M header parsing

Some refactoring and cleanup -- do not count the first 9 bytes against
the header limit. Add a unit test.

BUG=aomedia:2876

Change-Id: Id897d565e2917b48460cc77cd082cec4c98b42cb

3 years agovpxenc: initalize the image object
Hui Su [Wed, 13 Jan 2021 18:51:39 +0000 (10:51 -0800)]
vpxenc: initalize the image object

Otherwise it would cause problem when calling vpx_img_free() at the end
if no frame is read.

Change-Id: Ide0ed28eeb142d65d04703442cc4f098ac8edb34

3 years agoFix show_index in vp9_extrc_encodeframe_decision()
Angie Chiang [Fri, 18 Dec 2020 02:09:55 +0000 (18:09 -0800)]
Fix show_index in vp9_extrc_encodeframe_decision()

Change-Id: I93bb1fb3c14126d881d3f691d30875a0062e436c

3 years agoCorrect pixel_count in encode_frame_result
Angie Chiang [Fri, 18 Dec 2020 01:32:26 +0000 (17:32 -0800)]
Correct pixel_count in encode_frame_result

Change-Id: I3270af4f793f8e453e10d1caf8ffa1a8d5d584a7

3 years agoFirst pass: skip motion search for intra-only
Hui Su [Wed, 16 Dec 2020 06:40:09 +0000 (22:40 -0800)]
First pass: skip motion search for intra-only

BUG=webm:1713

Change-Id: Ibad79cf5d12aa913e8c87a31d7d2124c00958691

3 years agoMerge "configure: add darwin20 cross-compile support"
James Zern [Fri, 11 Dec 2020 19:58:17 +0000 (19:58 +0000)]
Merge "configure: add darwin20 cross-compile support"

3 years agoconfigure: add darwin20 cross-compile support
Gregor Jasny [Fri, 11 Dec 2020 07:00:07 +0000 (08:00 +0100)]
configure: add darwin20 cross-compile support

Change-Id: I91c0e832a6e76172397e97413329fd43edc81c78

3 years agoFix nullptr with offset.
Jeremy Leconte [Thu, 10 Dec 2020 16:54:54 +0000 (17:54 +0100)]
Fix nullptr with offset.

The error occurs with low resolution when LibvpxVp8Encoder::NumberOfThreads returns 1.

Bug: b:175283098
Change-Id: Icc9387c75f4ac6e4f09f102b3143e83c998c5e38

3 years agoFix typos in simple_encode.h
Angie Chiang [Wed, 25 Nov 2020 20:58:24 +0000 (12:58 -0800)]
Fix typos in simple_encode.h

Change-Id: Id83eff6cc12c441ce991fb1a73820d106311cf5e

3 years agoMerge "Revert "Close out file in EndEncode()""
Angie Chiang [Tue, 24 Nov 2020 03:10:44 +0000 (03:10 +0000)]
Merge "Revert "Close out file in EndEncode()""

3 years agoRevert "Close out file in EndEncode()"
Angie Chiang [Tue, 24 Nov 2020 02:55:24 +0000 (02:55 +0000)]
Revert "Close out file in EndEncode()"

This reverts commit 7370cecd8929141adb8140b924d3dd8ac1887d36.

Reason for revert: I accidentally check in this CL

Change-Id: I71ff0b98649070df3edd13b98170a7091541057b

3 years agoMerge "Close out file in EndEncode()"
Angie Chiang [Tue, 24 Nov 2020 02:49:12 +0000 (02:49 +0000)]
Merge "Close out file in EndEncode()"

3 years agoMerge "Refine documentation of vpx_ext_ratectrl.h"
Angie Chiang [Tue, 24 Nov 2020 02:49:01 +0000 (02:49 +0000)]
Merge "Refine documentation of vpx_ext_ratectrl.h"

3 years agoMerge "Allow user to set rc_mode and cq_level in SimpleEncode"
Angie Chiang [Tue, 24 Nov 2020 02:47:28 +0000 (02:47 +0000)]
Merge "Allow user to set rc_mode and cq_level in SimpleEncode"

3 years agoRefine documentation of vpx_ext_ratectrl.h
Angie Chiang [Sat, 21 Nov 2020 01:41:09 +0000 (17:41 -0800)]
Refine documentation of vpx_ext_ratectrl.h

Bug: webm:1707
Change-Id: Iba04b5292c157e22dd8618a79e8c977ec9fc2199

3 years agoAllow user to set rc_mode and cq_level in SimpleEncode
Angie Chiang [Fri, 20 Nov 2020 03:55:33 +0000 (19:55 -0800)]
Allow user to set rc_mode and cq_level in SimpleEncode

Change-Id: If3f56837e2c78a8b0fe7e0040f297c3f3ddb9c8b

3 years agoAdd gop_index to vpx_ext_ratectrl.h
Angie Chiang [Wed, 18 Nov 2020 01:25:31 +0000 (17:25 -0800)]
Add gop_index to vpx_ext_ratectrl.h

Bug: webm:1707

Change-Id: I48826d5f3a7cc292825a7f1e30ac6d0f57adc569

3 years agoCapitalize VPX_RC_OK / VPX_RC_ERROR
Angie Chiang [Tue, 17 Nov 2020 23:30:55 +0000 (15:30 -0800)]
Capitalize VPX_RC_OK / VPX_RC_ERROR

Change-Id: I526bd6a6c2d2095db564f96d63c7ab7ee4dd90ad

3 years agoAdd doxygen for vpx_rc_funcs_t
Angie Chiang [Tue, 17 Nov 2020 22:37:20 +0000 (14:37 -0800)]
Add doxygen for vpx_rc_funcs_t

Change-Id: If75215d574fe0b075add50154a9eece5d387741a

3 years agoAdd doxygen for vpx_rc_config
Angie Chiang [Sat, 14 Nov 2020 03:40:13 +0000 (19:40 -0800)]
Add doxygen for vpx_rc_config

Bug: webm:1707

Change-Id: I65bab6b2b792653e70cb136a5f9a21796e34b829

3 years agoCopy first pass stats documentation from AV1 to VP9
Angie Chiang [Sat, 14 Nov 2020 03:26:14 +0000 (19:26 -0800)]
Copy first pass stats documentation from AV1 to VP9

Bug: webm:1707
Change-Id: Iae7eaa9ba681272b70b6dad17cd2247edab6ef79

3 years agoAdd doxygen to structs in vpx_ext_ratectrl.h
Angie Chiang [Sat, 14 Nov 2020 02:32:34 +0000 (18:32 -0800)]
Add doxygen to structs in vpx_ext_ratectrl.h

Bug: webm:1707

Change-Id: Ib5f6b6f143f55e5279e39eb386fcd3340211de59

3 years agoMerge changes I12a72d3a,I1a6c5752
Angie Chiang [Tue, 17 Nov 2020 21:40:55 +0000 (21:40 +0000)]
Merge changes I12a72d3a,I1a6c5752

* changes:
  Fix uninitialized warning in resize_test.cc
  Fix the warning of C90 mixed declarations and code

3 years agoRemove condition on copying svc loopfilter flag
Jerome Jiang [Mon, 16 Nov 2020 22:12:50 +0000 (14:12 -0800)]
Remove condition on copying svc loopfilter flag

Change-Id: Ib37ef0aa3dc0ec73b25332be6d89969093bd7aeb

3 years agoFix uninitialized warning in resize_test.cc
Angie Chiang [Sat, 14 Nov 2020 02:17:48 +0000 (18:17 -0800)]
Fix uninitialized warning in resize_test.cc

Change-Id: I12a72d3aa57b13dbcbeb037e1deea41529ea4194

3 years agoFix the warning of C90 mixed declarations and code
Angie Chiang [Sat, 14 Nov 2020 02:13:14 +0000 (18:13 -0800)]
Fix the warning of C90 mixed declarations and code

Change-Id: I1a6c57525bbe8bf1a97057ecd64985bc23d1df2e

3 years agoMerge "vp9: Allow for disabling loopfilter per spatial layer"
Marco Paniconi [Fri, 13 Nov 2020 04:26:34 +0000 (04:26 +0000)]
Merge "vp9: Allow for disabling loopfilter per spatial layer"

3 years agovp9: Allow for disabling loopfilter per spatial layer
Marco Paniconi [Thu, 12 Nov 2020 07:11:16 +0000 (23:11 -0800)]
vp9: Allow for disabling loopfilter per spatial layer

For SVC: add parameter to the control SET_SVC_PARAMS to
allow for disabling the loopfilter per spatial layer.
Note this svc setting will override the setting via
VP9E_SET_DISABLE_LOOPFILTER (which should only be used
for non-SVC).

Add unittest to handle both SVC (spatial or temporal layers)
and non-SVC (single layer) case.

Change-Id: I4092f01668bae42aac724a6df5b6f6a604337448

3 years agoAccumulate frame tpl stats and pass through rate control api
Cheng Chen [Thu, 5 Nov 2020 23:26:54 +0000 (15:26 -0800)]
Accumulate frame tpl stats and pass through rate control api

Tpl stats is computed at the beginning of encoding the altref
frame. We aggregate tpl stats of all blocks for every frame of
the current group of picture.

After the altref frame is encoded, the tpl stats is passed through
the encode frame result to external environment.
Change-Id: I2284f8cf9c45d35ba02f3ea45f0187edbbf48294

3 years agoMerge "libs.mk: set LC_ALL=C w/egrep invocations"
James Zern [Fri, 30 Oct 2020 04:57:32 +0000 (04:57 +0000)]
Merge "libs.mk: set LC_ALL=C w/egrep invocations"

3 years agoMerge "Add a comment about bitdeptharg and inbitdeptharg"
Wan-Teh Chang [Thu, 29 Oct 2020 23:33:54 +0000 (23:33 +0000)]
Merge "Add a comment about bitdeptharg and inbitdeptharg"

3 years agolibs.mk: set LC_ALL=C w/egrep invocations
James Zern [Thu, 29 Oct 2020 22:46:21 +0000 (15:46 -0700)]
libs.mk: set LC_ALL=C w/egrep invocations

this guarantees consistent interpretation of the character ranges

BUG=webm:1711

Change-Id: Ia9123f079cc7ac248b9eff4d817e2e103d627b2b

3 years agoAdd a comment about bitdeptharg and inbitdeptharg
Wan-Teh Chang [Sun, 20 Sep 2020 18:57:13 +0000 (11:57 -0700)]
Add a comment about bitdeptharg and inbitdeptharg

Add a comment to vp9_args to point out that bitdeptharg and
inbitdeptharg do not have a corresponding entry in vp9_arg_ctrl_map and
must be listed at the end of vp9_args.

Change-Id: Ic9834ab72599c067156ca5a315824c7f0760824a

3 years agovp9_ext_ratectrl_test: add missing override
James Zern [Wed, 28 Oct 2020 00:09:08 +0000 (17:09 -0700)]
vp9_ext_ratectrl_test: add missing override

for ~ExtRateCtrlTest()

Change-Id: I311a400093c8c1ee2c002ba000d0b33c4fde209f

3 years agoMerge "Add cmd line option to control loopfilter for vpxenc"
Jerome Jiang [Tue, 27 Oct 2020 22:33:20 +0000 (22:33 +0000)]
Merge "Add cmd line option to control loopfilter for vpxenc"

3 years agoAdd cmd line option to control loopfilter for vpxenc
Jerome Jiang [Tue, 27 Oct 2020 18:02:13 +0000 (11:02 -0700)]
Add cmd line option to control loopfilter for vpxenc

Change-Id: I4f5e6ce2f1b535a586bdb6c9e55a3d49ebf61af4

3 years agoDownload bus_352x288_420_f20_b8.yuv properly
Angie Chiang [Mon, 26 Oct 2020 18:09:59 +0000 (11:09 -0700)]
Download bus_352x288_420_f20_b8.yuv properly

Bug: webm:1707

Change-Id: I6aabad7cdcddf2bc41a0cc7b5cdfd7d9759f9fae

3 years agoMerge changes I27932c41,I2ff9e54a,I4ebed472
Angie Chiang [Wed, 21 Oct 2020 21:26:34 +0000 (21:26 +0000)]
Merge changes I27932c41,I2ff9e54a,I4ebed472

* changes:
  Small changes of vp9_ext_ratectrl_test.cc
  Add ref frame info to vpx_rc_encodeframe_info_t
  Add vpx_rc_status_t

3 years agoSmall changes of vp9_ext_ratectrl_test.cc
Angie Chiang [Wed, 21 Oct 2020 00:32:27 +0000 (17:32 -0700)]
Small changes of vp9_ext_ratectrl_test.cc

Change-Id: I27932c41a826cd3c10cc7801956cd32e4877133a

3 years agoMerge "Add unit test for vp9_ext_ratectrl"
Angie Chiang [Wed, 21 Oct 2020 00:21:51 +0000 (00:21 +0000)]
Merge "Add unit test for vp9_ext_ratectrl"

3 years agoAdd ref frame info to vpx_rc_encodeframe_info_t
Angie Chiang [Sat, 17 Oct 2020 01:36:09 +0000 (18:36 -0700)]
Add ref frame info to vpx_rc_encodeframe_info_t

Bug: webm:1707

Change-Id: I2ff9e54a9c8ae535628c1c471a2d078652f49a31

3 years agoAdd vpx_rc_status_t
angiebird [Mon, 12 Oct 2020 22:12:03 +0000 (15:12 -0700)]
Add vpx_rc_status_t

Let callback functions in vpx_ext_ratectrl.h
return vpx_rc_status_t

Bug: webm:1707

Change-Id: I4ebed47278b228740f6c73b07aa472787b2617d2

3 years agovp9-rtc: Fix to control for disabling loopfilter
Marco Paniconi [Mon, 19 Oct 2020 05:42:48 +0000 (22:42 -0700)]
vp9-rtc: Fix to control for disabling loopfilter

Adding unit test.

Change-Id: Ic3c03fee7e9c2c224d927bb09914551422bdf816

3 years agoAdd unit test for vp9_ext_ratectrl
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()

Bug: webm:1707

Change-Id: Ic8bd62c7b4ebd85a7479ae5e4c82d7f6059d782f

3 years agoAdd vp9_extrc_update_encodeframe_result()
angiebird [Tue, 13 Oct 2020 00:58:16 +0000 (17:58 -0700)]
Add vp9_extrc_update_encodeframe_result()

Bug: webm:1707

Change-Id: I962ffa23f03b953f7c0dfd81f49dc79d1975bbba

3 years agovp9_extrc_get_encodeframe_decision()
angiebird [Sat, 10 Oct 2020 02:03:23 +0000 (19:03 -0700)]
vp9_extrc_get_encodeframe_decision()

Bug: webm:1707

Change-Id: I90a327b97d7158b65767fe3fbfd5f260030e17f5

3 years agoinstall vpx_ext_ratectrl.h
James Zern [Thu, 15 Oct 2020 22:24:36 +0000 (15:24 -0700)]
install vpx_ext_ratectrl.h

fixes encoder detection / compile with installed headers after:
6dba0d0a0 Add callback functions for external_rate_control

Bug: webm:1707
Change-Id: I370d8c94d6f1b8201002a722077ecf6b3d8cede5

3 years agoCall vp9_extrc_send_firstpass_stats() properly
angiebird [Sat, 10 Oct 2020 00:47:02 +0000 (17:47 -0700)]
Call vp9_extrc_send_firstpass_stats() properly

Change-Id: I28db5010ba647cc91b8c0aa59309d7e953cd1216

3 years agoAdd vpx_rc_frame_stats_t
angiebird [Sat, 10 Oct 2020 00:12:51 +0000 (17:12 -0700)]
Add vpx_rc_frame_stats_t

Change-Id: I496ce13592f71779bb00cc8bbb601835bca8ff09

3 years agoAdd vp9_extrc_send_firstpass_stats()
angiebird [Fri, 9 Oct 2020 01:40:34 +0000 (18:40 -0700)]
Add vp9_extrc_send_firstpass_stats()

Change-Id: Ia2457b416200a2b2d1558600bff90ac2746cf396

3 years agoAdd vp9_extrc_init/create/delete
angiebird [Wed, 7 Oct 2020 22:29:51 +0000 (15:29 -0700)]
Add vp9_extrc_init/create/delete

Change-Id: I9fcb9f4cc5c565794229593fadde87286fcf0ffd

3 years agoAdd callback functions for external_rate_control
angiebird [Wed, 7 Oct 2020 22:29:51 +0000 (15:29 -0700)]
Add callback functions for external_rate_control

Change-Id: I20a1179a2131d2cd069dae9076aa2c18b80784f3

3 years agoAdd codec control for external rate control lib
angiebird [Thu, 24 Sep 2020 18:33:55 +0000 (11:33 -0700)]
Add codec control for external rate control lib

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.

Change-Id: Iae47362cdfafa00614bac427884bffcf6944c583

3 years agoAdd SetEncodeConfig and DumpEncodeConfigs
angiebird [Fri, 2 Oct 2020 02:18:09 +0000 (19:18 -0700)]
Add SetEncodeConfig and DumpEncodeConfigs

Change-Id: Ie6864b1133c26021d9c4883df033ecd2969585ed

3 years agoAdd codec control to disable loopfilter for vp9
Jerome Jiang [Fri, 2 Oct 2020 17:47:47 +0000 (10:47 -0700)]
Add codec control to disable loopfilter for vp9

Change-Id: I6d693e84570c353d20ec314acea43363956c0590

3 years agoMerge "ratectrl_rtc_test.cc: fix signed/unsigned comparison"
James Zern [Thu, 1 Oct 2020 02:40:49 +0000 (02:40 +0000)]
Merge "ratectrl_rtc_test.cc: fix signed/unsigned comparison"

3 years agoMerge "Add file for rate control interface test."
Jerome Jiang [Wed, 30 Sep 2020 22:17:19 +0000 (22:17 +0000)]
Merge "Add file for rate control interface test."

3 years agoAdd file for rate control interface test.
Jerome Jiang [Wed, 30 Sep 2020 18:01:30 +0000 (11:01 -0700)]
Add file for rate control interface test.

Change-Id: Id09dc5b653c1e5bb2b02f63579ac776f887ce0eb

3 years agoratectrl_rtc_test.cc: fix signed/unsigned comparison
James Zern [Tue, 29 Sep 2020 17:58:56 +0000 (10:58 -0700)]
ratectrl_rtc_test.cc: fix signed/unsigned comparison

Change-Id: Id522c12faf4c959f60b5df1b0f7312f14a71720d

3 years agoconfigure.sh: fix arm64-darwin-gcc match
James Zern [Tue, 29 Sep 2020 17:38:41 +0000 (10:38 -0700)]
configure.sh: fix arm64-darwin-gcc match

after:
979e27c97 configure: add darwin20 support

make the condition more specific by including the trailing -gcc (-*)

Change-Id: I78f481b6c5ad9137e6b6973198e8671e806ee82c

3 years agoconfigure: add darwin20 support
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.

Change-Id: I1f8b145303204af316955822f5e8bab51c47f353

3 years agoMerge "vp9_ratectrl,vp9_resize_one_pass_cbr: rm redundant casts"
James Zern [Wed, 16 Sep 2020 23:48:21 +0000 (23:48 +0000)]
Merge "vp9_ratectrl,vp9_resize_one_pass_cbr: rm redundant casts"

3 years agovp9_ratectrl,vp9_resize_one_pass_cbr: rm redundant casts
James Zern [Wed, 16 Sep 2020 20:43:05 +0000 (13:43 -0700)]
vp9_ratectrl,vp9_resize_one_pass_cbr: rm redundant casts

avg_frame_bandwidth is an int, quiets a clang-tidy warning

Change-Id: I2a2822652ca6a06e9d1d6d4318f544d419d437e8

3 years agotest/encode_test_driver: rm redundant get() w/unique_ptr
James Zern [Wed, 16 Sep 2020 20:40:01 +0000 (13:40 -0700)]
test/encode_test_driver: rm redundant get() w/unique_ptr

Change-Id: I3c1ece92ba9f43df4cbaf47109e35aaf0a807d97

3 years agovp8: Remove sched_yield on POSIX systems
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:

1. power_VideoCall test as seen on perf profile:

With yield:
     9.40%  [kernel]            [k] __pi___clean_dcache_area_poc
     7.32%  [kernel]            [k] _raw_spin_unlock_irq  <-- kernel scheduler

Without yield:
     8.76%  [kernel]            [k] __pi___clean_dcache_area_poc
     2.27%  [kernel]            [k] _raw_spin_unlock_irq  <-- kernel scheduler

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."

BUG=b/168205004

Change-Id: Idb84ab19e94f6d0c7f9e544e7a407c946d5ced5c
Signed-off-by: Joel Fernandes <joelaf@google.com>
3 years agogoogletest: enable failure on uninstantiated tests
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.

BUG=b/159031844

Change-Id: I097537ff018668492d37164fdba5edd241dc5dbe

3 years agoUpstream GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST
Sarah Parker [Wed, 9 Sep 2020 23:10:17 +0000 (16:10 -0700)]
Upstream GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST

BUG=b/159031848

Change-Id: I013770f4e54d0ea92304fa3e9cf4d46f5723f129

3 years agovp9-rtc: Add control to disable maxq on overshoot
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).

Change-Id: Ia2237bc4aaea9770e5080dab20bfff9e3fd09199

3 years agoEscape number sign in Makefiles
Daniel Sommermann [Mon, 17 Aug 2020 16:42:08 +0000 (09:42 -0700)]
Escape number sign in Makefiles

Number signs are handled differently in Makefile variable parsing as
compared to bash variable parsing. See this demo:

```
$ cat Makefile
A=foo#bar
B='foo#bar'
C="foo#bar"
D=foo\#bar
E='foo\#bar'
F="foo\#bar"

$(info $(A))
$(info $(B))
$(info $(C))
$(info $(D))
$(info $(E))
$(info $(F))

$ 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.

Change-Id: Iaee6383e2435049b680484cc5cefdea9f2d9df46

3 years agoMerge "Refine MMI & MSA detection for mips"
James Zern [Wed, 19 Aug 2020 02:49:29 +0000 (02:49 +0000)]
Merge "Refine MMI & MSA detection for mips"

3 years agovp9-svc: Fix to resetting RC for temporal layers
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).

Change-Id: Iec669870c865420d01d52eab9425cd6c7714eddc

3 years agoRefine MMI & MSA detection for mips
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

Change-Id: I057553216dbc79cfaba9c691d5f4cdab144e1123

3 years agortc-vp9: Fix to rcstats in vp9_spatial_svc_encoder
Marco Paniconi [Tue, 18 Aug 2020 04:49:41 +0000 (21:49 -0700)]
rtc-vp9: Fix to rcstats in vp9_spatial_svc_encoder

Fixes the rcstats for case when #spatial_layers = 1.

Change-Id: Ie28d99852033307bc4c69c7e738e1d4cab4e8cf5

3 years agoMerge "Merge remote-tracking branch 'origin/quacking' into master"
Jerome Jiang [Thu, 13 Aug 2020 16:31:42 +0000 (16:31 +0000)]
Merge "Merge remote-tracking branch 'origin/quacking' into master"

3 years agoMerge "test/*: use canonical downloads.webmproject url"
James Zern [Wed, 12 Aug 2020 22:35:47 +0000 (22:35 +0000)]
Merge "test/*: use canonical downloads.webmproject url"

3 years agoAvoid re-allocating fp_motion_vector_info
angiebird [Tue, 11 Aug 2020 02:53:10 +0000 (19:53 -0700)]
Avoid re-allocating fp_motion_vector_info

Replace fp_motion_vector_info_init() by
fp_motion_vector_info_reset() in first_pass_encode()

Change-Id: Iadacb1ecc4f07435340399564fdd3bfd4ac702f4

3 years agoCosmetic changes in simple_encode.h
angiebird [Tue, 11 Aug 2020 02:37:30 +0000 (19:37 -0700)]
Cosmetic changes in simple_encode.h

Change-Id: If7d2711e7f37f00629874914f7c4d2396358e39d

3 years agoClose out file in EndEncode()
angiebird [Mon, 10 Aug 2020 22:37:24 +0000 (15:37 -0700)]
Close out file in EndEncode()

Change-Id: Ib6549f954ce6d5d966eef09a119b46f0cc2f54f7

3 years agoCorrect the first pass motion vector scale
angiebird [Mon, 10 Aug 2020 22:59:30 +0000 (15:59 -0700)]
Correct the first pass motion vector scale

Change-Id: I005a648f7f9ead9d36a39330dfbb096919affb34

3 years agoCosmetic change for simple_encode_test.cc
angiebird [Mon, 10 Aug 2020 22:46:37 +0000 (15:46 -0700)]
Cosmetic change for simple_encode_test.cc

Change-Id: I50b4d38f7deceb5b416e72dd944d2ed31e42dafa

3 years agoMake target_frame_bits error margin configurable.
angiebird [Sat, 8 Aug 2020 01:39:18 +0000 (18:39 -0700)]
Make target_frame_bits error margin configurable.

Change-Id: I05dd4d60741743c13951727ce6608acf4224ebec

3 years agoAvoid division by zero for rate q_step model
angiebird [Sat, 8 Aug 2020 01:12:18 +0000 (18:12 -0700)]
Avoid division by zero for rate q_step model

Change-Id: Ic5709b79131a3969fcb2a0eb3f53994f788b5cc9

4 years agoAdd rq_history to encode_frame_result
angiebird [Tue, 4 Aug 2020 02:49:43 +0000 (19:49 -0700)]
Add rq_history to encode_frame_result

Change-Id: Ic2a52dcf5e5a6d57b80d390a2c48ee498e89e7b2

4 years agoFix ObserveFirstPassMotionVectors()
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

Change-Id: I2f7db5cd4cf1f19db039c9ce638d17b832f45b6e

4 years agotest/*: use canonical downloads.webmproject url
James Zern [Fri, 7 Aug 2020 20:32:39 +0000 (13:32 -0700)]
test/*: use canonical downloads.webmproject url

prefer
https://storage.googleapis.com/downloads.webmproject.org/
to
http://downloads.webmproject.org/

similar to libs.mk

BUG=b/163149610

Change-Id: I6abe0848120849b9512fc5a6122ddc54b5cc2240

4 years agoMake initial q_index guess at 128
angiebird [Wed, 5 Aug 2020 20:44:01 +0000 (13:44 -0700)]
Make initial q_index guess at 128

This reduce the average recode times per frame from 2.81 to 2.73
when targeting 15% error for target bitrate per frame.

Change-Id: I58f0be86443643ba23623cb1d522ae41897734a3

4 years agoCorrect rq_model_update when recode_count == 1
angiebird [Wed, 5 Aug 2020 19:16:50 +0000 (12:16 -0700)]
Correct rq_model_update when recode_count == 1

This will reduce the avg recode times per frame form
3.19 to 2.81 when targeting 15% error margin for
target bitrate per frame.

Change-Id: I28c9ec09a1b1318c09fe5229ccb7e51b32b9dfb9

4 years agoMerge "Cosmetic changes for rate_ctrl experiment"
Angie Chiang [Thu, 6 Aug 2020 22:21:46 +0000 (22:21 +0000)]
Merge "Cosmetic changes for rate_ctrl experiment"

4 years agoCosmetic changes for rate_ctrl experiment
angiebird [Tue, 4 Aug 2020 02:52:31 +0000 (19:52 -0700)]
Cosmetic changes for rate_ctrl experiment

Change-Id: I133c93c2ad4c824fc97a18de3ac2cb2aedac9013

4 years agoL2E: Add ObserveFirstPassMotionVector
Cheng Chen [Wed, 29 Jul 2020 19:49:51 +0000 (12:49 -0700)]
L2E: Add ObserveFirstPassMotionVector

Store motion vectors for each 16x16 block found in the first pass
motion search.
Provide an api "ObserveFirstPassMotionVector()" in SimpleEncode
class, similar to "ObserveFirstPassStats()".

Change-Id: Ia86386b7e4aa549f7000e7965c287380bf52e62c

4 years agoMerge "Add recode loop logics for rate_ctrl experiment"
Angie Chiang [Tue, 4 Aug 2020 02:50:55 +0000 (02:50 +0000)]
Merge "Add recode loop logics for rate_ctrl experiment"

4 years agoAdd recode loop logics for rate_ctrl experiment
angiebird [Sat, 1 Aug 2020 20:03:46 +0000 (13:03 -0700)]
Add recode loop logics for rate_ctrl experiment

Change-Id: I4de5a38e25d6b0836d90e8fcd0e56d268e5fd838

4 years agoMerge remote-tracking branch 'origin/quacking' into master
Jerome Jiang [Fri, 31 Jul 2020 17:46:14 +0000 (10:46 -0700)]
Merge remote-tracking branch 'origin/quacking' into master

BUG=webm:1686

Change-Id: I3ba5215b3791fc2bb63521d11429087cb2abd5b1

4 years agoAssign correct values for zcoeff_blk in sub8x8 RDO
Hui Su [Fri, 31 Jul 2020 05:48:09 +0000 (22:48 -0700)]
Assign correct values for zcoeff_blk in sub8x8 RDO

This fixes a lossless encoding bug as reported in the issue tracker.
Coding performance change is neutral.

BUG=webm:1700

Change-Id: I0f034b16b57e917e722709a7e9addef864b83d27

4 years agoUpdate CHANGELOG upstream-git upstream/quacking v1.9.0
Jerome Jiang [Wed, 29 Jul 2020 22:00:28 +0000 (15:00 -0700)]
Update CHANGELOG

BUG=webm:1686

Change-Id: I51ecd0fb3da5f0aa36764706f3538d0056fac268

4 years agovp9-svc: Fix the bitrate control for spatial svc
Sreerenj Balachandran [Wed, 1 Jul 2020 02:46:17 +0000 (19:46 -0700)]
vp9-svc: Fix the bitrate control for spatial svc

Make sure to initialize the layer context for spatial-svc
which has a single temporal layer.

Change-Id: I026ecec483555658e09d6d8893e56ab62ee6914b
(cherry picked from commit 1e9929390c8c18ffda02e0073481625e5afb2529)

4 years agovp9-svc: Fix to setting frame size for dynamic resize
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.

Change-Id: I24403ee93fc96b830a9bf7c66d763a48762cdcb4
(cherry picked from commit de4aedaec33c6c29f882f99a740713596713a1f9)

4 years agovp9-rtc: Fix to resetting drop_spatial_layer
Marco Paniconi [Thu, 18 Jun 2020 18:24:28 +0000 (11:24 -0700)]
vp9-rtc: Fix to resetting drop_spatial_layer

The reset happens on the base spatial layer, before
encoding. But it should be reset on the
first_spatial_layer_to_encode, which may not be 0.

Change-Id: I38ef686b4459ca7433062adbfe32ef2134e1ad60
(cherry picked from commit 769129fb29fc66720be2b01276a472c334757d2d)

4 years agovp9-svc: Add svc test for denoiser and dynamic resize
Marco Paniconi [Tue, 16 Jun 2020 18:41:00 +0000 (11:41 -0700)]
vp9-svc: Add svc test for denoiser and dynamic resize

This catches the assert/crash fixed in 5174eb5.

Also fix to only check for dynamic resize in SVC mode
for base temporal layer.

Change-Id: Ie6eb7d233cc43eafb1b78cec4aeb94fb4d7fe11a
(cherry picked from commit 3101666d2a8b5b2e6bff14ffb39db685f1cc98a0)