platform/upstream/libvpx.git
4 years agoMerge branch 'upstream-git' into tizen for latest 26/234026/1 accepted/tizen/unified/20200529.124401 submit/tizen/20200522.014605
Jeongmo Yang [Thu, 21 May 2020 06:20:55 +0000 (15:20 +0900)]
Merge branch 'upstream-git' into tizen for latest

- The merged branch is upstream/master/master which includes latest patches since v1.8.2 version.

Change-Id: I15ef885fb67c63a11222d22cd4183882332f5b1b
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoRevert "fixed build errors due to toolchain upgrade" 25/234025/1
Jeongmo Yang [Thu, 21 May 2020 06:20:31 +0000 (15:20 +0900)]
Revert "fixed build errors due to toolchain upgrade"

This reverts commit fb2f91f17d1f151ba2f315bd34aea5619f62476e.

Change-Id: I974eb5e1cf5252386a0e577d5ca5d1f13794d452
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoRevert "packaging: workaround a gbs export" 24/234024/1
Jeongmo Yang [Thu, 21 May 2020 06:20:10 +0000 (15:20 +0900)]
Revert "packaging: workaround a gbs export"

This reverts commit fa8ddbf339415d2af2323d21b7fda2737db81fdd.

Change-Id: I8637a2976d9477bfa4e2aa4782d3d59ec6e416ef
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agoRevert "disable cross build for ARM" 23/234023/1
Jeongmo Yang [Thu, 21 May 2020 06:19:44 +0000 (15:19 +0900)]
Revert "disable cross build for ARM"

This reverts commit 1f84267b34d0b8787e206d8b041fbf67f877bc74.

Change-Id: I902026fc42a40bc8792a5f2b83d22ac722ae698b
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
4 years agovp9_decoder: free postproc_state.prev_mip
James Zern [Tue, 19 May 2020 23:41:54 +0000 (16:41 -0700)]
vp9_decoder: free postproc_state.prev_mip

this fixes a leak when using MFQE

BUG=webm:1692

Change-Id: I19fb2f07155769f59924e0843989b3d3f8899bf6

4 years agovp9-svc: Fix key frame update refresh simulcast flexible svc
Marco Paniconi [Fri, 15 May 2020 21:02:00 +0000 (14:02 -0700)]
vp9-svc: Fix key frame update refresh simulcast flexible svc

For flexible svc in simulcast mode: don't allow refresh
of all reference slots on key frame. Which slots to update
should be based on the user flags.

Change-Id: I3597c61ebcdfed2055bbdffec7ce701fad892744

4 years agoMerge "vp9_firstpass.c: limit mv_limits with MV_MAX in motion_search"
Yunqing Wang [Fri, 15 May 2020 16:17:52 +0000 (16:17 +0000)]
Merge "vp9_firstpass.c: limit mv_limits with MV_MAX in motion_search"

4 years agovp9-rtc: Increase thresh for scene detection
Marco Paniconi [Wed, 13 May 2020 22:08:15 +0000 (15:08 -0700)]
vp9-rtc: Increase thresh for scene detection

For CBR screen content mode. Makes it more
robust to false detections.

Change-Id: Icad89adb6f79b530b589bba2c71ba88ee5088d37

4 years agoMerge "Don't collect stats if they won't be used"
Jerome Jiang [Tue, 12 May 2020 16:54:29 +0000 (16:54 +0000)]
Merge "Don't collect stats if they won't be used"

4 years agoMerge "Temporarily convert to 64 bits to avoid overflows"
James Zern [Tue, 12 May 2020 00:32:03 +0000 (00:32 +0000)]
Merge "Temporarily convert to 64 bits to avoid overflows"

4 years agoTemporarily convert to 64 bits to avoid overflows
Jorge E. Moreira [Fri, 8 May 2020 22:23:48 +0000 (15:23 -0700)]
Temporarily convert to 64 bits to avoid overflows

In the vp8_cost_branch function a couple of unsigned int are being
multiplied by integer coefficients and added to later be divided by
256. While the end result most likely fits an unsigned int, the
intermediary result of multiplying and adding sometimes doesn't (I was
able to reproduce it by leaving the encoder running at 60 fps for a
while). To avoid the multiplication overflow (which is undefined
behavior and causes a wrong result anyways) the calculation is
performed using unsigned long long instead and cast to unsigned int
for return.

Bug: b/154172422
Test: run cuttlefish with webrtc enabled for an hour
Change-Id: If7ebbda38b2450a59ed3c99ffbb59dc62431a324

4 years agoMerge changes Ib55d46e9,I4a4feeab
James Zern [Mon, 11 May 2020 17:25:36 +0000 (17:25 +0000)]
Merge changes Ib55d46e9,I4a4feeab

* changes:
  decode_api_test: add negative test for vpx_codec_error_detail
  examples: use die() on dec/enc_init() failure

4 years agoMerge "Fix mac build with vp9 ratectrl interface"
Jerome Jiang [Sat, 9 May 2020 01:46:42 +0000 (01:46 +0000)]
Merge "Fix mac build with vp9 ratectrl interface"

4 years agoDon't collect stats if they won't be used
Jorge E. Moreira [Fri, 8 May 2020 22:14:48 +0000 (15:14 -0700)]
Don't collect stats if they won't be used

When the encoder is run continuously for a few minutes at 60 fps, the
total_target_vs_actual field overflows. Since this field is a signed
integer that's considered undefined behavior in C++, which causes an
abort when used in an android binary (those run with ubsan enabled)

Bug: b/154172422
Test: run cuttelfish with webrtc enabled for an hour
Change-Id: I8f7d9d0884311a6338bdcdec76348b8cc3ce8c69

4 years agoMerge "vpx_dec_fuzzer: add coverage for VP9D_SET_LOOP_FILTER_OPT"
James Zern [Fri, 8 May 2020 21:56:25 +0000 (21:56 +0000)]
Merge "vpx_dec_fuzzer: add coverage for VP9D_SET_LOOP_FILTER_OPT"

4 years agoFix mac build with vp9 ratectrl interface
Jerome Jiang [Fri, 8 May 2020 21:22:25 +0000 (14:22 -0700)]
Fix mac build with vp9 ratectrl interface

Add -std=c++11 for darwin build.

Change-Id: I760d4f7096bc33520c02b2cd7000fed9ac6cdd90

4 years agodecode_api_test: add negative test for vpx_codec_error_detail
James Zern [Fri, 8 May 2020 00:18:20 +0000 (17:18 -0700)]
decode_api_test: add negative test for vpx_codec_error_detail

Change-Id: Ib55d46e9290d2bd36345ff4a9737e227664c2a5b

4 years agoexamples: use die() on dec/enc_init() failure
James Zern [Wed, 6 May 2020 20:01:57 +0000 (13:01 -0700)]
examples: use die() on dec/enc_init() failure

rather than die_codec(). calling any api functions with an uninitialized
codec context is undefined. this avoids a crash in a call to
vpx_codec_error_detail().

BUG=webm:1688

Change-Id: I4a4feeabc1cafa44c8d2f24587fad79e313dba6d

4 years agoMerge "libs.mk,msvc: add missing vp9rc project"
James Zern [Thu, 7 May 2020 19:54:39 +0000 (19:54 +0000)]
Merge "libs.mk,msvc: add missing vp9rc project"

4 years agolibs.mk,msvc: add missing vp9rc project
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.

Change-Id: Ia9c99f6a4482a001d993affbc3b3903c2a4e366a

4 years agovpx_dec_fuzzer: add coverage for VP9D_SET_LOOP_FILTER_OPT
James Zern [Wed, 6 May 2020 20:42:43 +0000 (13:42 -0700)]
vpx_dec_fuzzer: add coverage for VP9D_SET_LOOP_FILTER_OPT

BUG=chromium:1076203

Change-Id: Ib3339a9fd7d940b69a5ef89b3fbf7f4fdeaac006

4 years agoMerge "vp8_dx_iface.c: make vp8_ctf_maps[] static"
James Zern [Mon, 4 May 2020 23:37:39 +0000 (23:37 +0000)]
Merge "vp8_dx_iface.c: make vp8_ctf_maps[] static"

4 years agovp8_dx_iface.c: make vp8_ctf_maps[] static
James Zern [Mon, 4 May 2020 22:27:53 +0000 (15:27 -0700)]
vp8_dx_iface.c: make vp8_ctf_maps[] static

Change-Id: I6c19745a392681733c6deaaacc7e3540bc72fd4d

4 years agoRemove unneeded null check for entry in for loop
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++).

Change-Id: Ieafe464d4111fdb77f0586ecfa1835d1cfd44d94

4 years agotest/*.sh: add explicit error checks/returns
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.

BUG=aomedia:2669

Change-Id: Ie33a5ac4023dcc800bd302cb8cc54c6c3f2282f5

4 years agoUpdate a comment on nonexistent vpx_codec_init
Wan-Teh Chang [Mon, 27 Apr 2020 18:53:33 +0000 (11:53 -0700)]
Update a comment on nonexistent vpx_codec_init

Update a comment on the nonexistent vpx_codec_init() function. Replace it
with vpx_codec_dec_init() and vpx_codec_enc_init().

I missed this comment in the last commit.

Change-Id: I1d3614b3bb3aa4330ac6bd49e4d2e1f4e627b6b0

4 years agoMerge "Update comments on nonexistent vpx_codec_init"
James Zern [Mon, 27 Apr 2020 18:38:37 +0000 (18:38 +0000)]
Merge "Update comments on nonexistent vpx_codec_init"

4 years agovp9_firstpass.c: limit mv_limits with MV_MAX in motion_search
Neil Birkbeck [Sat, 25 Apr 2020 15:28:24 +0000 (08:28 -0700)]
vp9_firstpass.c: limit mv_limits with MV_MAX in motion_search

Currently, in rare cases on big videos (> 5K), best_mv may differ from ref_mv by more than the allowable MV_MAX. Intersect mv_limits with those bound by MV_MAX before diamond search.

We could use vp9_set_mv_search_range, but that seems a bit more constrained than the bug I encountered (e.g., MAX_FULL_PEL_VAL < MV_MAX / 8).

Change-Id: I2c6563c05039d6ee05edf642665faaccf51787d4

4 years agoMerge "vp9-rtc: Some speedups to speed 5 real-time mode"
Marco Paniconi [Sat, 25 Apr 2020 00:20:42 +0000 (00:20 +0000)]
Merge "vp9-rtc: Some speedups to speed 5 real-time mode"

4 years agoUpdate comments on nonexistent vpx_codec_init
James Zern [Fri, 24 Apr 2020 22:59:25 +0000 (15:59 -0700)]
Update comments on nonexistent vpx_codec_init

Update comments on the nonexistent vpx_codec_init() function. Replace it
with vpx_codec_dec_init() and vpx_codec_enc_init().

based on the change in libaom:
b1b8c68e8 Update comments on nonexistent aom_codec_init

Change-Id: I63d3f6c87706a98f631457b5f6ce51e8b0c5cfb1

4 years agoMerge "Revert "Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9."""
Jerome Jiang [Fri, 24 Apr 2020 22:09:21 +0000 (22:09 +0000)]
Merge "Revert "Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9."""

4 years agovp9-rtc: Some speedups to speed 5 real-time mode
Marco Paniconi [Fri, 24 Apr 2020 18:16:15 +0000 (11:16 -0700)]
vp9-rtc: Some speedups to speed 5 real-time mode

Disable checking rectangular partitions in
nonrd_pick_partition, and enable use_source_sad.

~3-4% speedup for HD clip on x86.
bdrate loss of ~0.2% on rtc set.

Change-Id: Ibef8f100f1f623482d47510cb4ec9278ba777d7c

4 years agoRevert "Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9.""
Jerome Jiang [Fri, 24 Apr 2020 17:36:39 +0000 (10:36 -0700)]
Revert "Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9.""

Under CONFIG_REALTIME_ONLY flag, map speed < 5 to speed 5.

Bug: webm:1684

This reverts commit 85cb983682fe9ca14fd302b50d27d762da05d665.

Change-Id: I67b7ed37e8b74417db310ea0c817d3c5a5de9e44

4 years agovp9-rtc: Allow simulcast mode for flexible/bypass mode
Marco Paniconi [Fri, 24 Apr 2020 17:07:02 +0000 (10:07 -0700)]
vp9-rtc: Allow simulcast mode for flexible/bypass mode

Change-Id: I0252d06c4f21d7c700c81d387bef89646229a63c

4 years agoMerge "Move index check before array access"
Jerome Jiang [Thu, 23 Apr 2020 21:28:03 +0000 (21:28 +0000)]
Merge "Move index check before array access"

4 years agoMerge "Revert "vp9-rtc: Some speedups to speed 5 real-time mode""
Jerome Jiang [Thu, 23 Apr 2020 20:02:32 +0000 (20:02 +0000)]
Merge "Revert "vp9-rtc: Some speedups to speed 5 real-time mode""

4 years agoRevert "vp9-rtc: Some speedups to speed 5 real-time mode"
Marco Paniconi [Thu, 23 Apr 2020 18:57:31 +0000 (18:57 +0000)]
Revert "vp9-rtc: Some speedups to speed 5 real-time mode"

This reverts commit 62af22b5e57ed1e382ef0994183824a03f698797.

Reason for revert: causes crash in chromium test

Change-Id: I27792e05ece84c79739638b8cce634ffeaef3ba1

4 years agoMerge "realtime_test: add IntegerOverflow test"
James Zern [Tue, 21 Apr 2020 22:15:31 +0000 (22:15 +0000)]
Merge "realtime_test: add IntegerOverflow test"

4 years agorealtime_test: add IntegerOverflow test
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

BUG=webm:1685

Change-Id: I24d223e33471217528a79b0088965ba51d0399ba

4 years agoRevert "Remove RD code for CONFIG_REALTIME_ONLY in vp9."
Jerome Jiang [Mon, 20 Apr 2020 23:45:22 +0000 (16:45 -0700)]
Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9."

This reverts commit da24d35132e80422dc2c33e7c92462f4db7cd83d.

BUG=webm:1684

Change-Id: I552c37c7bdc844610879a65cc02038d76a5d32b1

4 years agovp9-rtc: Some speedups to speed 5 real-time mode
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.

Change-Id: Ia643b34a51191e3929a443de77e271561e7c877d

4 years agoMove index check before array access
Vitaly Buka [Fri, 17 Apr 2020 05:17:23 +0000 (22:17 -0700)]
Move index check before array access

This lets us run code with -fsanitize=bounds.

Bug: b/15471229

Change-Id: I5961ef43d21f04a0dc9e8bf7280dc27eb0a62094

4 years agosimplify x86_abi_support.asm symbol declaration
Johann [Mon, 30 Mar 2020 23:38:30 +0000 (08:38 +0900)]
simplify x86_abi_support.asm symbol declaration

Define LIBVPX_{ELF,MACHO} to simplify blocks.

Create new globalsym macro and include logic for PRIVATE.

BUG=webm:1679

Change-Id: I303ba1492a2813f685de51155ccef7e4831e1881

4 years agoMerge "transpose_sse2.h,cosmetics: fix some comments"
James Zern [Fri, 10 Apr 2020 17:10:35 +0000 (17:10 +0000)]
Merge "transpose_sse2.h,cosmetics: fix some comments"

4 years agovp9-rtc: Fix to disable_16x16part speed feature
Marco Paniconi [Thu, 9 Apr 2020 18:35:55 +0000 (11:35 -0700)]
vp9-rtc: Fix to disable_16x16part speed feature

Condition on current_video_frame count, as the
avg_frame_qindex needs some time to settle.

Fixes psnr test failures.

Change-Id: I462c45250becb55b72b6ffe2b7087094d6d58a01

4 years agoMerge "vp9-rtc: Disable nonrd_keyframe for SVC, speed >=8"
Marco Paniconi [Thu, 9 Apr 2020 03:30:39 +0000 (03:30 +0000)]
Merge "vp9-rtc: Disable nonrd_keyframe for SVC, speed >=8"

4 years agovp9-rtc: Disable nonrd_keyframe for SVC, speed >=8
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).

Change-Id: Iff7c43aed4e808603d8abdedb6eb5d2c9c8ecb8d

4 years agovp9-rtc: Set disable_16x16part for low-resoln high Q
Marco Paniconi [Thu, 9 Apr 2020 01:23:45 +0000 (18:23 -0700)]
vp9-rtc: Set disable_16x16part for low-resoln high Q

Only affects variance partition at low-resoln,
speed 6,7 real-time mode. At very high Q better to
save bits from the split to 8x8.

bdrate gain ~3% on rtc_derf at very low bitrates

Change-Id: I94ee58e67d5ba6277cbab8f8dd9ea45b035c82b5

4 years agoMerge "vp9: add rate control interface for RTC"
Jerome Jiang [Tue, 7 Apr 2020 00:27:08 +0000 (00:27 +0000)]
Merge "vp9: add rate control interface for RTC"

4 years agovp9: add rate control interface for RTC
Jerome Jiang [Tue, 24 Mar 2020 22:13:59 +0000 (15:13 -0700)]
vp9: add rate control interface for RTC

Add vp9 RTC rate control without creating encoder,
to allow external codecs to use vp9 rate control.

A new library (libvp9rc.a) will be built. Applications using this
interface must be linked with the library.

BUG=1060775

Change-Id: Ib3e597256725a37d2d104e1e1a1733c469991b03

4 years agox86_abi_support: do not decorate coff functions
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

BUG=webm:1679

Change-Id: I7e1f4043b064a04752d1cedd030cbe7f5461fe40

4 years agoMerge changes I24997420,Ie4ca7435,I36011727,Ibb01b09c,Ifb17acbe, ...
Johann Koenig [Mon, 6 Apr 2020 00:09:56 +0000 (00:09 +0000)]
Merge changes I24997420,Ie4ca7435,I36011727,Ibb01b09c,Ifb17acbe, ...

* 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

4 years agotranspose_sse2.h,cosmetics: fix some comments
James Zern [Fri, 3 Apr 2020 20:50:40 +0000 (13:50 -0700)]
transpose_sse2.h,cosmetics: fix some comments

Change-Id: Idae90838012c78605f20f1d7a3125b71683f6f44

4 years agoReturn VPX_CODEC_INCAPABLE on capability failure
Wan-Teh Chang [Fri, 3 Apr 2020 03:49:47 +0000 (20:49 -0700)]
Return VPX_CODEC_INCAPABLE on capability failure

All decoder functions should return the VPX_CODEC_INCAPABLE error code
if the algorithm does not have the requested capability.

Move the definitions of VPX_CODEC_CAP_FRAME_THREADING and
VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER to the VPX_CODEC_CAP_* section.

Change "PUT_SLICE and PUT_FRAME events are posted" to "put_slice and
put_frame callbacks are invoked".

Also fix some other minor comment errors.

This carries back to libvpx the following libaom CL:
https://aomedia-review.googlesource.com/c/aom/+/108405

Change-Id: If67a271c9abbb3eebc2359719cc7d9f235b690d2

4 years agox86inc.asm: update to 3e5aed95c
Johann [Thu, 2 Apr 2020 02:07:47 +0000 (11:07 +0900)]
x86inc.asm: update to 3e5aed95c

BUG=webm:1679

Change-Id: I24997420b7b43cac3c674300c667eb493794893e

4 years agox86inc.asm: namespace ARCH_* defines
Johann [Thu, 2 Apr 2020 02:04:37 +0000 (11:04 +0900)]
x86inc.asm: namespace ARCH_* defines

Reapply fad865c54 to prevent redefinition warnings.

BUG=webm:1679

Change-Id: Ie4ca7435b1f84711d0231e7957129580b05b3918

4 years agox86inc.asm: only set visibility for chromium builds
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.

BUG=webm:1679

Change-Id: I36011727485847dd11f06782bc6beddedc39019c

4 years agox86inc.asm: do not align .text for aout
Johann [Thu, 2 Apr 2020 01:49:19 +0000 (10:49 +0900)]
x86inc.asm: do not align .text for aout

Reapply a97c83f7a. Only use .text sections for aout and do not specify
an alignment.

BUG=webm:1679

Change-Id: Ibb01b09c205f9e0ecd4bfa0241e3d5e01ae5a55e

4 years agox86inc.asm: use .text on march32
Johann [Thu, 2 Apr 2020 01:47:30 +0000 (10:47 +0900)]
x86inc.asm: use .text on march32

Reapply 9679be4bc. The read only sections are getting stripped on some
OS X builds. As a result, random data is used in place of the intended
tables.

BUG=webm:1679

Change-Id: Ifb17acbed73df4b9949a8badae2d9305a3073b83

4 years agox86inc.asm: copy PIC macros from x86_abi_support.asm
Johann [Thu, 2 Apr 2020 01:41:24 +0000 (10:41 +0900)]
x86inc.asm: copy PIC macros from x86_abi_support.asm

Reapply 7e065cd57. x86inc.asm always defines PIC for x86_64. We undefine
it for x32.

Incorporate e56f96394 as well to ensure GET_GOT_DEFINED is defined.

BUG=webm:1679

Change-Id: I1535d57bcb4223327ca63b4fd11bffcda1009332

4 years agox86inc.asm: set PREFIX from libvpx defines
Johann [Thu, 2 Apr 2020 01:14:38 +0000 (10:14 +0900)]
x86inc.asm: set PREFIX from libvpx defines

Reapply 4de9641f1

BUG=webm:1679

Change-Id: I70b2224121f8f997fcd04c38a07a8126c2855ec6

4 years agox86inc.asm: pull settings from libvpx
Johann [Thu, 2 Apr 2020 01:06:43 +0000 (10:06 +0900)]
x86inc.asm: pull settings from libvpx

Reapply 1be46ef6b. Include vpx_config.asm and prefix functions with vpx.

BUG=webm:1679

Change-Id: I5fba3154203822a829bc88ad0e302adf2ce3bbee

4 years agox86inc.asm: update to 3e5aed95
Johann [Thu, 2 Apr 2020 01:00:23 +0000 (10:00 +0900)]
x86inc.asm: update to 3e5aed95

Pull a clean copy in and name it _new. Will apply the libvpx
patches and then move it over.

BUG=webm:1679

Change-Id: I48d3d4ab7911340c0997dd79a0dbadccf5697682

4 years agox86_abi_support: use correct hidden syntax
Johann [Mon, 30 Mar 2020 23:49:15 +0000 (08:49 +0900)]
x86_abi_support: use correct hidden syntax

Chromium needs :function hidden and the space between the symbol and the
colon removed, at least for nasm. This matches x86inc.asm.

BUG=webm:1679

Change-Id: Ie47bb75d44d3130791639cbf4e2ebe019e2d686e

4 years agoMerge "nasm: require 2.14 with -DCHROMIUM"
Johann Koenig [Tue, 31 Mar 2020 23:41:42 +0000 (23:41 +0000)]
Merge "nasm: require 2.14 with -DCHROMIUM"

4 years agoMerge "auto-detect darwin19"
Johann Koenig [Tue, 31 Mar 2020 23:41:26 +0000 (23:41 +0000)]
Merge "auto-detect darwin19"

4 years agovp9-rtc: Refactor postencode for 1 pass
Marco Paniconi [Tue, 31 Mar 2020 17:31:32 +0000 (10:31 -0700)]
vp9-rtc: Refactor postencode for 1 pass

Move some code for 1 pass, that is not
directly related to rate control, out of
the postencode.

This avoids the need of extra flag for the
RC interface in:
https://chromium-review.googlesource.com/c/webm/libvpx/+/2118915

Change-Id: I3992ea8255196a762c1174c35dd7dcc9b01d317e

4 years agoauto-detect darwin19
Johann [Tue, 31 Mar 2020 06:52:30 +0000 (15:52 +0900)]
auto-detect darwin19

Change-Id: I3912c79d0f0f7a65fc753ae29bb10cdcac76878a

4 years agonasm: require 2.14 with -DCHROMIUM
Johann [Tue, 31 Mar 2020 06:35:24 +0000 (15:35 +0900)]
nasm: require 2.14 with -DCHROMIUM

BUG=webm:1679

Change-Id: I75b1f860d111febf0aabe38b89d845ef296728a4

4 years agortc: Increase resize limit resoln for rtc
Marco Paniconi [Mon, 30 Mar 2020 16:16:09 +0000 (09:16 -0700)]
rtc: Increase resize limit resoln for rtc

Increase resize limit to avoid resized frame
from going below 320x180.

Change-Id: If736ac3fac4731b47844e4d8c771ecf5c66550de

4 years agovp9-rtc: Increase resize down limit to 320x180
Marco Paniconi [Fri, 27 Mar 2020 17:54:39 +0000 (10:54 -0700)]
vp9-rtc: Increase resize down limit to 320x180

For RTC dynamic resize: don't allow resize for
resoln <= 320x180.

Change-Id: I9109e9e1338e5420e72436a57d266ae46e9f2d60

4 years agoInit frames_to_key in vp9_rc_init()
angiebird [Thu, 26 Mar 2020 01:18:23 +0000 (18:18 -0700)]
Init frames_to_key in vp9_rc_init()

Change-Id: Ic667c77ff58672212fc2e9dd5066c650b0152226

4 years agoMerge "Optimize vp9_get_sub_block_energy."
James Zern [Wed, 25 Mar 2020 00:56:41 +0000 (00:56 +0000)]
Merge "Optimize vp9_get_sub_block_energy."

4 years agovp8/{ratectrl,onyx_if}: fix some signed integer overflows
James Zern [Sat, 21 Mar 2020 23:12:39 +0000 (16:12 -0700)]
vp8/{ratectrl,onyx_if}: fix some signed integer overflows

in calculations involving bitrate in encode_frame_to_data_rate() and
vp8_compute_frame_size_bounds()

note this isn't exhaustive, it's just the result of a vpxenc run with:
-w 800 -h 480 --cpu-used=8 --rt --target-bitrate=1400000000

Bug: b/151945689
Change-Id: I3a4f878046fcf80e87482761588c977c283ae917

4 years agovp9_ratectrl: fix some signed integer overflows
James Zern [Sat, 21 Mar 2020 22:46:48 +0000 (15:46 -0700)]
vp9_ratectrl: fix some signed integer overflows

in calculations involving bitrate in vp9_rc_postencode_update() and
calc_pframe_target_size_one_pass_vbr()

note this isn't exhaustive, it's just the result of a vpxenc run with:
-w 800 -h 480 --cpu-used=8 --rt --target-bitrate=1400000000

Bug: b/151945689
Change-Id: I941a77340fd44b09fc965dd182d7aeab9f1f3da0

4 years agoOptimize vp9_get_sub_block_energy.
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.

Change-Id: I302fc0ecd9fd8cf96ee9f31b8673e82de1b2b3e2

4 years agoMerge changes I8a14fcad,Iad7ca261,I2063c592,I9c5c74ab
Angie Chiang [Tue, 17 Mar 2020 23:32:15 +0000 (23:32 +0000)]
Merge changes I8a14fcad,Iad7ca261,I2063c592,I9c5c74ab

* 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

4 years agoCorrect time_base of ivf header in SimpleEncode
angiebird [Mon, 16 Mar 2020 19:34:02 +0000 (12:34 -0700)]
Correct time_base of ivf header in SimpleEncode

Change-Id: I8a14fcad3e7b4c4689f4e7387414e59ba9c4c20a

4 years agoAdd detail comments on valid_list in SimpleEncode
angiebird [Sat, 14 Mar 2020 00:28:28 +0000 (17:28 -0700)]
Add detail comments on valid_list in SimpleEncode

Change-Id: Iad7ca261a99c7b5f082cf3cc6504f4af438bf409

4 years agoAdd missing Copyright to python files
angiebird [Sat, 14 Mar 2020 00:25:49 +0000 (17:25 -0700)]
Add missing Copyright to python files

BUG=webm:1655,webm:1654

Change-Id: I2063c59218e082f40958dddbdcb1c105d5440199

4 years agovpx_codec_enc_config_default: rm unnecessary loop
James Zern [Sat, 14 Mar 2020 03:29:09 +0000 (20:29 -0700)]
vpx_codec_enc_config_default: rm unnecessary loop

quiets -Wunreachable-code-loop-increment, present since:
e57f388bc vpx_codec_enc_config_default: disable 'usage'

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.

Bug: b/150166387
Change-Id: Ic6f0985829e87694de8b5e0340cffa6c451ed1c2

4 years agoMove member functions up in simple_encode.h
angiebird [Fri, 13 Mar 2020 23:22:06 +0000 (16:22 -0700)]
Move member functions up in simple_encode.h

Change-Id: I9c5c74ab52361bcd73aef110729c6e332066c2af

4 years agofix minor spelling errors
Johann [Thu, 12 Mar 2020 23:25:47 +0000 (08:25 +0900)]
fix minor spelling errors

Change-Id: I929fec66d541705fe94365b56a5bdd8cf5ee7c37

4 years agoMerge changes Ie7c70a1d,I2c5abbe2,If41a1ea6,Id6ba4664,I156308bc
Angie Chiang [Thu, 5 Mar 2020 19:24:29 +0000 (19:24 +0000)]
Merge changes Ie7c70a1d,I2c5abbe2,If41a1ea6,Id6ba4664,I156308bc

* 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()

4 years agortc: Update svc test for resize
Marco Paniconi [Thu, 5 Mar 2020 00:08:41 +0000 (16:08 -0800)]
rtc: Update svc test for resize

Add count on expected number of resizes,
and use the speed_setting_ for base layer.

Also allow AQ_MODE=3 for the tests with
dynamic layer disabling/enabling.

Change-Id: I03fb0789a2210ba00b8b153941bf79fb774d51bf

4 years agovp9-svc: Allow for dynamic resize for single layer SVC
Marco Paniconi [Tue, 3 Mar 2020 23:14:02 +0000 (15:14 -0800)]
vp9-svc: Allow for dynamic resize for single layer SVC

Make internal dynamic resize work for SVC mode
when single layer SVC is running (i.e, other layers
are dropped due to 0 bitrate).

Added unittest.

Change-Id: Icf03e1f276d9c4ba2734c87c927f7881c6b0a116

4 years agoAdd unit test for ref_frame_info
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()

Change-Id: Ie7c70a1d460e5b89475a1aef77416fc9a88387e1

4 years agoAdd key frame group info to SimpleEncode
angiebird [Tue, 3 Mar 2020 00:50:39 +0000 (16:50 -0800)]
Add key frame group info to SimpleEncode

Change-Id: I2c5abbe23c84c6d794e06ed6429136b10fb18683

4 years agoAdd ref_frame_info to encode_frame_result
angiebird [Fri, 28 Feb 2020 04:03:11 +0000 (20:03 -0800)]
Add ref_frame_info to encode_frame_result

Change-Id: If41a1ea6ce0a2b8db3811f2fa8efcf16f97fa0bd

4 years agoAdd init/update_frame_indexes()
angiebird [Thu, 27 Feb 2020 00:43:50 +0000 (16:43 -0800)]
Add init/update_frame_indexes()

We will init and update current_video_frame and
current_frame_coding_index in the functions.

So it's easier to keep track of when the frame indexes are updated.

Change-Id: Id6ba46643f8923348bb4f81c5dd9ace553244057

4 years agoAdd GetVectorData()
angiebird [Wed, 26 Feb 2020 23:18:52 +0000 (15:18 -0800)]
Add GetVectorData()

It's necessary to get data pointer from a vector sometimes.
This function will guarantee that the data pointer is nullptr
if the vector is empty.

Change-Id: I156308bcb193fe404452d3cd3b24b3f80c3c3727

4 years agoAdd RefFrameInfo
angiebird [Wed, 26 Feb 2020 01:30:14 +0000 (17:30 -0800)]
Add RefFrameInfo

RefFrameInfo contains the coding_indexes and valid_list of
three reference frame types.

Note that I will add unit test in the follow-up CLs.

Change-Id: Ia055df1f8a5537b2bdd02c78991df9bbf48e951a

4 years agoKeep ref frame coding indexes in SimpleEncode
angiebird [Mon, 24 Feb 2020 19:20:10 +0000 (11:20 -0800)]
Keep ref frame coding indexes in SimpleEncode

Change-Id: Id76aeb54ef93b11ca9a582f76289da0e60368e56

4 years agoMake external arf consistent with vp9
Cheng Chen [Tue, 18 Feb 2020 20:20:58 +0000 (12:20 -0800)]
Make external arf consistent with vp9

Add a test to ensure that encoding with the external arfs gets the
same result as long as the arfs are the same as the vp9 baseline.

Change-Id: I92c79001018f4df3bc16e9fc56c733509bebb9dc

4 years agoAllow external arf to determine gop size
Cheng Chen [Tue, 18 Feb 2020 17:57:46 +0000 (09:57 -0800)]
Allow external arf to determine gop size

When "rate_ctrl" experiment is on, we allow the external arf
passed from outside to determine group of picture size
in define_gf_group().

Change-Id: I0b8c3e1bf3087f21a4e484354168df4967d35bba

4 years agoAdd interface for external arf indexes.
Cheng Chen [Tue, 18 Feb 2020 00:19:44 +0000 (16:19 -0800)]
Add interface for external arf indexes.

Pass in external arf indexes to encode command.

Change-Id: Ifea5a7d835643760fc5effc594bb448848f6d639

4 years agoRename values in RefFrameType and FrameType
angiebird [Fri, 21 Feb 2020 01:26:14 +0000 (17:26 -0800)]
Rename values in RefFrameType and FrameType

Replace golden and altref by past and future in RefFrameType.
So that we don't get confused with FrameType and RefFrameType.

Change-Id: I1be45d49f76c68869fc4bf53ff946fee9ce7eb9d

4 years agoUse ref_frame[0] to determine mv_count
angiebird [Fri, 21 Feb 2020 01:14:31 +0000 (17:14 -0800)]
Use ref_frame[0] to determine mv_count

The motion vector counts should be determined by whether this
block is using intra_mode or not.

Change-Id: If866c91fb8a3f2b3944e5b219a90154d2172690d

4 years agoConsistency test for GroupOfPicture
angiebird [Fri, 21 Feb 2020 00:35:30 +0000 (16:35 -0800)]
Consistency test for GroupOfPicture

Make sure frame_type, show_idx and coding_index in GroupOfPicture
match the results in EncodeFrameInfo.

Change-Id: I3b477a03b5efd651c2d174e7146a4cd4f5551604

4 years agoUse ObserveGroupOfPicture() in EncodeFrame test
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.

Change-Id: Ibbe6ab49268c468bf1cef8344efd3a3e1eab972a