platform/upstream/libvpx.git
5 years agoSkip RD check for compound modes that have same sign bias
Jingning Han [Tue, 18 Sep 2018 22:08:53 +0000 (15:08 -0700)]
Skip RD check for compound modes that have same sign bias

The compound mode can only be run between two reference frames
with different sign bias flags. Skip the search over same sign
bias reference frames in the rate-distortion optimization.

Change-Id: I4a57feedea880883cf87200de51862beac108310

5 years agoSync ref frame writing with decoder
Jingning Han [Tue, 18 Sep 2018 19:13:18 +0000 (12:13 -0700)]
Sync ref frame writing with decoder

Enable the encoder to produce compound reference frame writing
that supports both 2 fwd + 1 bwd and 1 fwd + 2 bwd cases.

Change-Id: I63d2141435e2de7d8115d52b974fc41c2e608405

5 years agoAdd frame_start/end to gf_group
Jingning Han [Tue, 18 Sep 2018 15:41:37 +0000 (08:41 -0700)]
Add frame_start/end to gf_group

Keep the start and end frame index for each group of pictures.

Change-Id: I23c0d22e643218cf7486b238c2986101282d3fbe

5 years agoMerge "Fix buffer overrun of postproc_state.limits"
Johann Koenig [Tue, 18 Sep 2018 18:59:59 +0000 (18:59 +0000)]
Merge "Fix buffer overrun of postproc_state.limits"

5 years agoMerge "Fix stack corruption with x86 and --enable-pic"
Johann Koenig [Tue, 18 Sep 2018 18:59:49 +0000 (18:59 +0000)]
Merge "Fix stack corruption with x86 and --enable-pic"

5 years agoMerge "Rename set_arf_sign_bias() to set_ref_sign_bias"
Jingning Han [Tue, 18 Sep 2018 18:45:13 +0000 (18:45 +0000)]
Merge "Rename set_arf_sign_bias() to set_ref_sign_bias"

5 years agoMerge "Re-work set_arf_sign_bias()"
Jingning Han [Tue, 18 Sep 2018 18:45:07 +0000 (18:45 +0000)]
Merge "Re-work set_arf_sign_bias()"

5 years agoMerge "Update frame index per buffer at encoder"
Jingning Han [Tue, 18 Sep 2018 18:44:58 +0000 (18:44 +0000)]
Merge "Update frame index per buffer at encoder"

5 years agoMerge "Remove unnecessary code"
Hui Su [Tue, 18 Sep 2018 18:36:59 +0000 (18:36 +0000)]
Merge "Remove unnecessary code"

5 years agoMerge "Remove the SECOND_LEVEL_CHECKS_BEST macro"
Hui Su [Tue, 18 Sep 2018 18:36:48 +0000 (18:36 +0000)]
Merge "Remove the SECOND_LEVEL_CHECKS_BEST macro"

5 years agoFix stack corruption with x86 and --enable-pic
Matthias Räncker [Mon, 17 Sep 2018 11:57:17 +0000 (13:57 +0200)]
Fix stack corruption with x86 and --enable-pic

x86inc.asm's cglobal macro is frequently used to declare more
arguments than the function actually has. Normally, this is
done to aquire an alias to a register that would correspond to
that positional function argument if it existed. This is safe
when used in this manner.
In the case fixed here, however, the alias is used to temporarily
store adresses obtained through the GOT in memory. Because those
extra arguments don't actually exist, those stores corrupt the
callers stack frame.
SSE2/VpxHBDSubpelVarianceTest.Ref is a test that may fail as a
result.
To simply fix the space allocated to actual arguments that have
been loaded into registers already is reused.
This avoids having to allocate extra space for local variables.

Also removed duplicate code while at it.

Signed-off-by: Matthias Räncker <theonetruecamper@gmx.de>
Change-Id: I505281ecaa6be586185fe6a2d34d62bdf40c839f

5 years agoRemove unnecessary code
Hui Su [Tue, 18 Sep 2018 16:53:23 +0000 (09:53 -0700)]
Remove unnecessary code

in vp9_find_best_sub_pixel_tree().

Change-Id: I0677c05b3e402fc17dd1e7e6fae787d305e90f89

5 years agoRemove the SECOND_LEVEL_CHECKS_BEST macro
Hui Su [Tue, 18 Sep 2018 16:41:14 +0000 (09:41 -0700)]
Remove the SECOND_LEVEL_CHECKS_BEST macro

This macro is used only once and makes the code relatively harder to
read and modify.

Change-Id: I8f0344a7050758ed9770ffca211b0237fe7d8b34

5 years agoRename set_arf_sign_bias() to set_ref_sign_bias
Jingning Han [Thu, 13 Sep 2018 19:24:32 +0000 (12:24 -0700)]
Rename set_arf_sign_bias() to set_ref_sign_bias

Properly reflect its functionality that assigns the reference
frame sign bias to all the reference frames.

Change-Id: I7b597feeb06acd4c3a004cd51e4b285357315360

5 years agoRe-work set_arf_sign_bias()
Jingning Han [Mon, 17 Sep 2018 21:49:13 +0000 (14:49 -0700)]
Re-work set_arf_sign_bias()

Make it support automatic checking and assigning the reference
frame sign bias for all the reference frames.

Change-Id: Ie82f8f872e742130a652b6d5bc109039ac46ae3b

5 years agoUpdate frame index per buffer at encoder
Jingning Han [Mon, 17 Sep 2018 21:17:36 +0000 (14:17 -0700)]
Update frame index per buffer at encoder

Update the frame index counting from key frame offset for all
the processed frames at the encoder. This would allow encoder to
automatically decide frame sign bias next.

Change-Id: Ibbdc2a29b7245be27422272e1fb539596eed63d1

5 years agoMerge "Add a frame_index entry to RefCntBuffer"
Jingning Han [Tue, 18 Sep 2018 03:53:16 +0000 (03:53 +0000)]
Merge "Add a frame_index entry to RefCntBuffer"

5 years agoMerge "Assign GOP frame offset to all the coding frames"
Jingning Han [Tue, 18 Sep 2018 03:53:09 +0000 (03:53 +0000)]
Merge "Assign GOP frame offset to all the coding frames"

5 years agoMerge "cosmetics: normalize include guards"
James Zern [Tue, 18 Sep 2018 03:38:15 +0000 (03:38 +0000)]
Merge "cosmetics: normalize include guards"

5 years agovpx_mem: allow VPX_MAX_ALLOCABLE_MEMORY to be overridden
James Zern [Mon, 17 Sep 2018 19:32:58 +0000 (12:32 -0700)]
vpx_mem: allow VPX_MAX_ALLOCABLE_MEMORY to be overridden

this allows the define to be set by the build environment

Change-Id: Ib40111c5d9bae417b031b8b40a7bc135c6734044

5 years agoAdd a frame_index entry to RefCntBuffer
Jingning Han [Mon, 17 Sep 2018 18:46:17 +0000 (11:46 -0700)]
Add a frame_index entry to RefCntBuffer

This entry will only be effectively used at the encoder side.
Adding it to the RefCntBuffer data structure would help make the
associated logic a lot simpler. Its effect on the decoder side
would be explicitly sent through the bit-stream.

Change-Id: I1660dce9e0bb6e28c3315d5e0df6dc4a9298f71f

5 years agoAssign GOP frame offset to all the coding frames
Jingning Han [Mon, 17 Sep 2018 16:30:37 +0000 (09:30 -0700)]
Assign GOP frame offset to all the coding frames

Overload the use of arf_src_offset to account the relative frame
offset for all the coding frames within a GOP.

Change-Id: Ia86dede37c6a93d9f23098c15dbd936acefd75dc

5 years agoRemove multi_arf_last_grp_enabled flag.
Paul Wilkins [Mon, 17 Sep 2018 14:45:57 +0000 (15:45 +0100)]
Remove multi_arf_last_grp_enabled flag.

Delete flag and associated code.

Change-Id: I899d258a4cd7b84de9136ccfa27cf8a50108b130

5 years agoRemove multi_arf_enabled.
Paul Wilkins [Mon, 17 Sep 2018 14:41:13 +0000 (15:41 +0100)]
Remove multi_arf_enabled.

Remove deprecated multi_arf_enabled flag and associated code.

Change-Id: I73f06362a10faa5b3bd91a78eedb201a96434f18

5 years agoRemove multi_arf_allowed variable.
Paul Wilkins [Mon, 17 Sep 2018 14:28:23 +0000 (15:28 +0100)]
Remove multi_arf_allowed variable.

Removes deprecated multi_arf_allowed variable and dependent code.

Change-Id: Ic1cf341f807c38207e728c48a4c4442387db93ff

5 years agocosmetics: normalize include guards
James Zern [Wed, 22 Aug 2018 21:03:54 +0000 (14:03 -0700)]
cosmetics: normalize include guards

use the recommended format [1] of:
<PROJECT>_<PATH>_<FILE>_H_

[1] https://google.github.io/styleguide/cppguide.html#The__define_Guard
"All header files should have #define guards to prevent multiple
inclusion. The format of the symbol name should be
<PROJECT>_<PATH>_<FILE>_H_."

Change-Id: I2e8ab0b32fb23c30fa43cff5fec12d043c0d2037

5 years agofix a bug of tiny_ssim to handle odd frame sizes
Liu Peng [Fri, 14 Sep 2018 21:25:44 +0000 (16:25 -0500)]
fix a bug of tiny_ssim to handle odd frame sizes

Change-Id: Id8ef0eb211517a8f8ec764ec398d16efb9320540

5 years agofix a bug of tiny_ssim when the bit depth is 8
Liu Peng [Fri, 14 Sep 2018 20:04:16 +0000 (15:04 -0500)]
fix a bug of tiny_ssim when the bit depth is 8

Change-Id: I2563e661c71b474fe04b70cd9b713d478a27ac5f

5 years agoMerge changes Ic6b9330f,Ibe14a023
Angie Chiang [Fri, 14 Sep 2018 00:10:19 +0000 (00:10 +0000)]
Merge changes Ic6b9330f,Ibe14a023

* changes:
  Fix mv_arr assignment
  Dump tpl mvs for mv search block

5 years agoFix mv_arr assignment
Angie Chiang [Thu, 13 Sep 2018 19:14:46 +0000 (12:14 -0700)]
Fix mv_arr assignment

Change-Id: Ic6b9330ffb9b75b3a8441024fbf8ba53c134621b

5 years agoDump tpl mvs for mv search block
Angie Chiang [Thu, 13 Sep 2018 00:44:45 +0000 (17:44 -0700)]
Dump tpl mvs for mv search block

Change-Id: Ibe14a02391b960e030c4a48e61718e43a5a65788

5 years agoMerge "Dump ref frame when DUMP_TPL_STATS is on"
Angie Chiang [Thu, 13 Sep 2018 16:58:43 +0000 (16:58 +0000)]
Merge "Dump ref frame when DUMP_TPL_STATS is on"

5 years agoMerge "Initial step in deprecating previous dual arf code."
Jingning Han [Thu, 13 Sep 2018 16:57:52 +0000 (16:57 +0000)]
Merge "Initial step in deprecating previous dual arf code."

5 years agoMerge "Remove deprecated first_inter_index"
Jingning Han [Thu, 13 Sep 2018 16:19:46 +0000 (16:19 +0000)]
Merge "Remove deprecated first_inter_index"

5 years agoMerge "Remove unused variables from VP9_COMP"
Jingning Han [Thu, 13 Sep 2018 16:19:39 +0000 (16:19 +0000)]
Merge "Remove unused variables from VP9_COMP"

5 years agoInitial step in deprecating previous dual arf code.
Paul Wilkins [Thu, 13 Sep 2018 13:21:46 +0000 (14:21 +0100)]
Initial step in deprecating previous dual arf code.

Always use cpi->multi_layer_arf branch if enable_auto_arf >= 2.

Use enable_auto_arf value to indicate max number of ARF
levels to use in multi-arf case.

Further cleanup to of old code follow in seperate patches.

Change-Id: I25cd1e4a119a2d482a15705f5126389054764f9f

5 years agoRemove deprecated first_inter_index
Jingning Han [Thu, 13 Sep 2018 05:51:19 +0000 (22:51 -0700)]
Remove deprecated first_inter_index

With the refactoring of logics that determines if a frame needs
re-code runs to adapt to the target bit-rate, the variable
first_inter_index is no longer in effect use. Hence remove it.

Change-Id: I045894ad1f8b1e00fa40d5a55d762bad0d31b27d

5 years agoRemove unused variables from VP9_COMP
Jingning Han [Thu, 13 Sep 2018 05:49:07 +0000 (22:49 -0700)]
Remove unused variables from VP9_COMP

Change-Id: I853e0925d29becb9c1f84e5c00d84649fb070a07

5 years agoDump ref frame when DUMP_TPL_STATS is on
Angie Chiang [Tue, 11 Sep 2018 22:51:54 +0000 (15:51 -0700)]
Dump ref frame when DUMP_TPL_STATS is on

Also add a python script to parse the dumped results.

Change-Id: I1abea5a7c04d852ec40ce37d758af21960b6e589

5 years agoMerge "Revert "Revert "Loopfilter MultiThread Optimization"""
Harish Mahendrakar [Wed, 12 Sep 2018 23:15:24 +0000 (23:15 +0000)]
Merge "Revert "Revert "Loopfilter MultiThread Optimization"""

5 years agoMerge changes I7173f2fe,I460b6c4b,I5070657f,I2b3e1e16
Jingning Han [Wed, 12 Sep 2018 21:06:53 +0000 (21:06 +0000)]
Merge changes I7173f2fe,I460b6c4b,I5070657f,I2b3e1e16

* changes:
  Remove some deprecated FRAME_UPDATE_TYPE elements.
  Remove some deprecated constants.
  Remove unused rate control data elements
  Remove extra_arf_allowed.

5 years agoFix buffer overrun of postproc_state.limits
Matthias Räncker [Thu, 6 Sep 2018 16:29:16 +0000 (18:29 +0200)]
Fix buffer overrun of postproc_state.limits

Always allocate cpi->common.postproc_state.limits using unscaled width.

With ./configure --enable-pic --enable-decode-perf-tests
--enable-encode-perf-tests --enable-encode-perf-tests
--enable-vp9-highbitdepth --enable-better-hw-compatibility
--enable-internal-stats --enable-postproc --enable-vp9-postproc
--enable-error-concealment --enable-coefficient-range-checking
--enable-postproc-visualizer --enable-multi-res-encodin
--enable-vp9-temporal-denoising --enable-webm-io --enable-libyuv
segfaults tend to occur in VP9/DatarateOnePassCbrSvcSingleBR.* tests.

This is an analogue to issue
https://bugs.chromium.org/p/webm/issues/detail?id=1374
where a buffer allocated using a scaled width is reused after scaling
back to the original size. Unfortunately, in this case the unscaled
width doesn't appear to be known in the immediated context of the
allocation, so the the signature of vp9_post_proc_frame needs to be
changed to provide that information in order to provide a similar fix
as in #1374.

Signed-off-by: Matthias Räncker <theonetruecamper@gmx.de>
Change-Id: I6f943aafbb3484ee94c5b38d7fcdd9d53fce3e5f

5 years agoRemove some deprecated FRAME_UPDATE_TYPE elements.
Paul Wilkins [Wed, 12 Sep 2018 11:53:10 +0000 (12:53 +0100)]
Remove some deprecated FRAME_UPDATE_TYPE elements.

Removal of some frame types relating to deprecated multi-arf work.

Added a dummy value for the USE_BUF_FRAME frame type in the
declaration of the rd_frame_type_factor[FRAME_UPDATE_TYPES] structure.

Change-Id: I7173f2fe33a53117e1bde6f9621efc1a5951240b

5 years agoMerge "Fix rate control bug with recode all."
Paul Wilkins [Wed, 12 Sep 2018 11:57:02 +0000 (11:57 +0000)]
Merge "Fix rate control bug with recode all."

5 years agoRemove some deprecated constants.
Paul Wilkins [Wed, 12 Sep 2018 11:37:05 +0000 (12:37 +0100)]
Remove some deprecated constants.

Removal of some # defines relating to deprecated multi-arf work.

Change-Id: I460b6c4bee9bf0ef588eddc47329c2b17f60e5ba

5 years agoRemove unused rate control data elements
Paul Wilkins [Wed, 12 Sep 2018 11:27:04 +0000 (12:27 +0100)]
Remove unused rate control data elements

Removal of rate control structure elements related to Zoe's
deprecated multi laryer ARF work.

Change-Id: I5070657f91df7bd3f9137cf74016f737313417c8

5 years agoRemove extra_arf_allowed.
Paul Wilkins [Wed, 12 Sep 2018 11:06:36 +0000 (12:06 +0100)]
Remove extra_arf_allowed.

Removed VP9_COMP element that is no longer used.

Change-Id: I2b3e1e16244074e3510c1467b0e7532213c4ae05

5 years agoMerge "Enable rectangular partition search for speed 1"
Paul Wilkins [Wed, 12 Sep 2018 11:03:50 +0000 (11:03 +0000)]
Merge "Enable rectangular partition search for speed 1"

5 years agoMerge changes I306c582c,Id5389285
Paul Wilkins [Wed, 12 Sep 2018 11:01:38 +0000 (11:01 +0000)]
Merge changes I306c582c,Id5389285

* changes:
  Remove configure_multi_arf_buffer_updates()
  Remove update_multi_arf_ref_frames()

5 years agoMerge changes I97111413,Idcd6dcbc
Paul Wilkins [Wed, 12 Sep 2018 11:01:20 +0000 (11:01 +0000)]
Merge changes I97111413,Idcd6dcbc

* changes:
  Clean up define_gf_group()
  Clean up deprecated gop structure code

5 years agoMerge "Set GF frame layer depth to be 0"
Paul Wilkins [Wed, 12 Sep 2018 11:00:49 +0000 (11:00 +0000)]
Merge "Set GF frame layer depth to be 0"

5 years agoRevert "Revert "Loopfilter MultiThread Optimization""
Venkatarama NG. Avadhani [Wed, 5 Sep 2018 05:05:04 +0000 (10:35 +0530)]
Revert "Revert "Loopfilter MultiThread Optimization""

This reverts commit 753fd86e86ac727dccac88376260b8f54502f2a3.

This also has the fix for the DoS reported in bug 1558.

BUG=webm:1558

Change-Id: I65ea84e0c11d6bd40d8cb0587dfe934b3ac11dce

5 years agoRemove configure_multi_arf_buffer_updates()
Jingning Han [Tue, 11 Sep 2018 21:35:42 +0000 (14:35 -0700)]
Remove configure_multi_arf_buffer_updates()

The bit-stream syntax doesn't support lst2/3/bwd reference frame
update. Remove the deprecated function that goes such assumption.

Change-Id: I306c582c2efc63928e4231adef2ee549076a987c

5 years agoRemove update_multi_arf_ref_frames()
Jingning Han [Tue, 11 Sep 2018 21:14:03 +0000 (14:14 -0700)]
Remove update_multi_arf_ref_frames()

The bit-stream syntax doesn't support the use of lst2/3 frames.
Remove the update_multi_arf_ref_frames() function that assumes
such functionality.

Change-Id: Id5389285c84fe6c578c52d210aa47ef3cb789f8e

5 years agoMerge "Simplify vp9_frame_type_qdelta()"
Jingning Han [Tue, 11 Sep 2018 23:32:34 +0000 (23:32 +0000)]
Merge "Simplify vp9_frame_type_qdelta()"

5 years agoMerge "Store mv/inter_cost/recon_error/err for ref frames"
Angie Chiang [Tue, 11 Sep 2018 22:52:18 +0000 (22:52 +0000)]
Merge "Store mv/inter_cost/recon_error/err for ref frames"

5 years agoClean up define_gf_group()
Jingning Han [Tue, 11 Sep 2018 21:12:29 +0000 (14:12 -0700)]
Clean up define_gf_group()

Remove deprecated extra_arf_allowed code.

Change-Id: I97111413e6465475e750106fddef8f344db53405

5 years agoClean up deprecated gop structure code
Jingning Han [Tue, 11 Sep 2018 21:05:31 +0000 (14:05 -0700)]
Clean up deprecated gop structure code

Gradually integrate the single-/multi-layer ARF and dual ARF
encoder control. Remove deprecated code.

Change-Id: Idcd6dcbca3f8d7597878d83dec421e16be819f55

5 years agoSimplify vp9_frame_type_qdelta()
Jingning Han [Tue, 11 Sep 2018 17:50:49 +0000 (10:50 -0700)]
Simplify vp9_frame_type_qdelta()

Make direct use of frame type in the available VP9_COMMON structure.
Eliminate the need to map through rf_level to fetch the frame type.
This change doesn't alter the coding stats. It simplifies the
vp9_frame_type_qdelta() function logic and removes unnecessary
reference to rf_level.

Change-Id: I1a7b2f5abcae39aa4a60d08a6011dde38ecf3b58

5 years agoSet GF frame layer depth to be 0
Jingning Han [Tue, 11 Sep 2018 16:19:37 +0000 (09:19 -0700)]
Set GF frame layer depth to be 0

Set the golden frame layer depth as 0 - the base layer in temporal
domain.

Change-Id: If63e1524a567fcff6162f4283811298551516be5

5 years agoRemove unused constant definition
Jingning Han [Tue, 11 Sep 2018 16:27:33 +0000 (09:27 -0700)]
Remove unused constant definition

ARF_DECAY_BREAKOUT is no long used.

Change-Id: I553f8a3087389f0343444e2551581e9de02d3427

5 years agoLocalize variable definitions
Jingning Han [Tue, 11 Sep 2018 16:21:45 +0000 (09:21 -0700)]
Localize variable definitions

Localize variable definitions in setup_frames() and
two_pass_first_group_inter().

Change-Id: I66e842791d679be6d22cef50e0b395b5aa380eac

5 years agoMerge "Rework two_pass_first_group_inter()"
Jingning Han [Tue, 11 Sep 2018 04:04:31 +0000 (04:04 +0000)]
Merge "Rework two_pass_first_group_inter()"

5 years agoMerge "Separate frame context index for GOP layers"
Jingning Han [Tue, 11 Sep 2018 04:04:14 +0000 (04:04 +0000)]
Merge "Separate frame context index for GOP layers"

5 years agoMerge "Assign layer depth for all coding frames"
Jingning Han [Tue, 11 Sep 2018 04:03:52 +0000 (04:03 +0000)]
Merge "Assign layer depth for all coding frames"

5 years agoMerge "Refactor block_rd_txfm()"
Hui Su [Tue, 11 Sep 2018 02:18:18 +0000 (02:18 +0000)]
Merge "Refactor block_rd_txfm()"

5 years agoRework two_pass_first_group_inter()
Jingning Han [Mon, 10 Sep 2018 18:55:10 +0000 (11:55 -0700)]
Rework two_pass_first_group_inter()

This function is used to in part decide if to trigger recode loop
for the first normal P frame in a GOP. Rework its design logic to
support the GOP with multi-layer ARF. Allow recode when there is
a transition from ARF/OVERLAY/USE_BUF to normal P frame.

The overall coding performance for multi-ARF gets slightly better
(less than 0.1% for show_existing_frame case). Tested on a few
clips, the encoding speed remains similar too. This change primarily
serves to help integration of multi-layer ARF and dual-ARF systems.

Change-Id: Ia44e44526b05029b1546985b3eb649e767d5444f

5 years agoRefactor block_rd_txfm()
Hui Su [Mon, 10 Sep 2018 18:53:04 +0000 (11:53 -0700)]
Refactor block_rd_txfm()

Merge two identical if branches.

Change-Id: Ie012ba9c116a30ef6fa2e7868c7a4ba886b99bc6

5 years agoStore mv/inter_cost/recon_error/err for ref frames
Angie Chiang [Wed, 5 Sep 2018 18:56:42 +0000 (11:56 -0700)]
Store mv/inter_cost/recon_error/err for ref frames

These information will help with making better mv search decision

Add functionality to dump tpl_stats for offline analysis

Change-Id: Ic2ec34368499c9bccb4d1f21a12b66453847fcf2

5 years agoSeparate frame context index for GOP layers
Jingning Han [Fri, 7 Sep 2018 23:37:42 +0000 (16:37 -0700)]
Separate frame context index for GOP layers

Use separate frame context index to code frames at different layers.
The maximum index cap is set as 3. This improves the compression
performance of multi-layer ARF by 0.15% across the test sets.

The overall coding gains from multi-layer ARF are

         avg PSNR       ovarall PSNR        SSIM
lowres   -3.9%            -3.7%            -3.2%
midres   -3.5%            -3.2%            -2.3%
nflx2k   -4.3%            -4.6%            -3.0%

Change-Id: I8a0b345fdd47823c018544a6b4748753faf89dc1

5 years agofix vp9_svc_adjust_frame_rate signature
James Zern [Sat, 8 Sep 2018 20:53:46 +0000 (13:53 -0700)]
fix vp9_svc_adjust_frame_rate signature

match the const in the header; quiets a visual studio warning.

since:
04b3d49ba vp9-svc: Allow for setting framerate per spatial layer.

Change-Id: I0a216eb8fe1a689fe6822bbfac70f7c98e9b1a70

5 years agoFix rate control bug with recode all.
Paul Wilkins [Thu, 6 Sep 2018 14:56:01 +0000 (15:56 +0100)]
Fix rate control bug with recode all.

This patch fixes a rate control bug that can manifest if the recode
loop is activated for all frame types. Specifically things go wrong when the
recode loop is used on an overlay frame that has a rate target of 0 bits.

The patch prevents adjustment of the active worst quality and repeat recode
loops for overlay frames.

The bug showed up during artificial experiments on re-distribution of bits in
ARF groups but does not activate in any current encode profile, as even best
best quality does not currently allow recodes for all frames.

Change-Id: I80872093d9ebd3350106230c42c3928e56ecb754

5 years agoMerge "Fork auto-alt-ref control"
Jingning Han [Sat, 8 Sep 2018 02:26:52 +0000 (02:26 +0000)]
Merge "Fork auto-alt-ref control"

5 years agoMerge "Extend auto-alt-ref parameter range"
Jingning Han [Sat, 8 Sep 2018 02:26:47 +0000 (02:26 +0000)]
Merge "Extend auto-alt-ref parameter range"

5 years agoMerge "Add non-greedy-mv experimental flag"
Angie Chiang [Sat, 8 Sep 2018 01:02:21 +0000 (01:02 +0000)]
Merge "Add non-greedy-mv experimental flag"

5 years agoAssign layer depth for all coding frames
Jingning Han [Fri, 7 Sep 2018 22:59:14 +0000 (15:59 -0700)]
Assign layer depth for all coding frames

Assign layer depth for the base layer ARF and the normal frames.

Change-Id: I81cbb2846c3176336622f9006701c0219652905a

5 years agoMerge "Add NORMAL_BOOST macro"
Jingning Han [Fri, 7 Sep 2018 22:27:23 +0000 (22:27 +0000)]
Merge "Add NORMAL_BOOST macro"

5 years agoEnable rectangular partition search for speed 1
Hui Su [Tue, 4 Sep 2018 21:44:02 +0000 (14:44 -0700)]
Enable rectangular partition search for speed 1

This patch enables rectangular partition search on speed 1. The encoding
speed loss is reduced thanks to recently added speed features.

This only affects speed 1 low bit-depth encoding.

Coding gains:
           avg_psnr     ovr_psnr    ssim
lowres      0.577%       0.621%    0.665%
midres      1.147%       1.215%    1.148%
hdres       0.758%       0.790%    0.769%

Tested encoding speed on 15 midres and 15 hdres clips, average speed
loss:
           QP=30       QP=40        QP=50
midres     4.43%       3.72%       -1.05%
hdres      4.41%       5.65%        3.77%

Change-Id: Ifc0712becccc69f7498796359ff12dbfa63fd7b3

5 years agoFork auto-alt-ref control
Jingning Han [Fri, 7 Sep 2018 17:25:07 +0000 (10:25 -0700)]
Fork auto-alt-ref control

Temporarily fork the auto-alt-ref control meaning. When it is set
to be 1, use single layer ARF as baseline. The value 2 would enable
dual ARF system. Any number above it would trigger automatic multi-
layer ARFs.

We would gradually refactor and integrate dual ARF and multi-layer
ARF systems next, and eventually make auto-alt-ref directly control
the layer depth.

Change-Id: I292d27111ae8a596b97444afecf4b896043e543f

5 years agoExtend auto-alt-ref parameter range
Jingning Han [Fri, 7 Sep 2018 17:20:56 +0000 (10:20 -0700)]
Extend auto-alt-ref parameter range

Extend the upper limit from 2 (dual ARFs) to maximum ARF layers.
This would later allow --auto-alt-ref to directly control the
ARF layer depth later on.

Change-Id: I6324fe980122e73dc98f81c8d7de1193a1a16e51

5 years agoAdd NORMAL_BOOST macro
Jingning Han [Thu, 6 Sep 2018 23:58:55 +0000 (16:58 -0700)]
Add NORMAL_BOOST macro

Normal frame boost factor is set to be 100 as the baseline for
ARF boost. Replace the hard coded number with a macro.

Change-Id: I81ce30138f7819844e7a2d811de9e1ccbeb85da5

5 years agoMerge "vp9-svc: Allow for setting framerate per spatial layer."
Marco Paniconi [Thu, 6 Sep 2018 16:17:50 +0000 (16:17 +0000)]
Merge "vp9-svc: Allow for setting framerate per spatial layer."

5 years agoMerge "Fix short first kf bug."
Paul Wilkins [Thu, 6 Sep 2018 14:24:05 +0000 (14:24 +0000)]
Merge "Fix short first kf bug."

5 years agoMerge "Revert "Revert "Prevent double application of min rate in two pass."""
Paul Wilkins [Thu, 6 Sep 2018 14:23:54 +0000 (14:23 +0000)]
Merge "Revert "Revert "Prevent double application of min rate in two pass."""

5 years agoMerge "Adaptive ARF factor decision"
Jingning Han [Thu, 6 Sep 2018 03:45:22 +0000 (03:45 +0000)]
Merge "Adaptive ARF factor decision"

5 years agoMerge "Recursive rate allocation for multi-layer ARF coding"
Jingning Han [Thu, 6 Sep 2018 03:45:13 +0000 (03:45 +0000)]
Merge "Recursive rate allocation for multi-layer ARF coding"

5 years agoMerge "Enable adaptive rate allocation for multi-layer ARFs"
Jingning Han [Thu, 6 Sep 2018 03:45:08 +0000 (03:45 +0000)]
Merge "Enable adaptive rate allocation for multi-layer ARFs"

5 years agoMerge "Initialize the best partition before partition RDO"
Hui Su [Wed, 5 Sep 2018 22:02:22 +0000 (22:02 +0000)]
Merge "Initialize the best partition before partition RDO"

5 years agoInitialize the best partition before partition RDO
Hui Su [Wed, 5 Sep 2018 20:00:56 +0000 (13:00 -0700)]
Initialize the best partition before partition RDO

This fixes the multi-thread encoder test failure.

Change-Id: I0c1845922068e71097a387db0969ca419accb3ed

5 years agoAdd non-greedy-mv experimental flag
Angie Chiang [Wed, 5 Sep 2018 18:46:45 +0000 (11:46 -0700)]
Add non-greedy-mv experimental flag

The experiment aims at making non-greedy mv search decision

Change-Id: I3d77048ce106771fe003f250d07b7ddf0112536f

5 years agovp9-svc: Allow for setting framerate per spatial layer.
Marco Paniconi [Wed, 29 Aug 2018 22:05:46 +0000 (15:05 -0700)]
vp9-svc: Allow for setting framerate per spatial layer.

Add duration to set_svc_ref_frame_config.

BUG=b/113346831

Change-Id: I63613aed6b1183f98d04831600a6bdd645c740df

5 years agoAdaptive ARF factor decision
Jingning Han [Fri, 31 Aug 2018 22:54:10 +0000 (15:54 -0700)]
Adaptive ARF factor decision

Re-count the factors to decide bit boost factor for the
intermediate layer ARFs. Make the gfu_boost factor assigned to
each ARF adapt to its local factors.

This and the recursive change 5bfe9eb together improves the
multi-layer ARF compression performance:

          avg_psnr      ovr_psnr     ssim
lowres    -0.39%        -0.54%       -1.6%
midres    -0.98%        -1.26%       -2.3%
hdres     -0.95%        -1.13%       -2.3%

Change-Id: I5fec3ea75cae58825787dc88dadc7e8697a041ea

5 years agoRecursive rate allocation for multi-layer ARF coding
Jingning Han [Thu, 30 Aug 2018 04:30:35 +0000 (21:30 -0700)]
Recursive rate allocation for multi-layer ARF coding

Recursively calculate the rate boost for the ARF frames at the
given layer depth from the remaining available bit resource after
the prior layer ARFs consumption.

Change-Id: I0e31bac4f87b895ca20605dc1307a8fc0d2a516d

5 years agoEnable adaptive rate allocation for multi-layer ARFs
Jingning Han [Tue, 28 Aug 2018 21:08:02 +0000 (14:08 -0700)]
Enable adaptive rate allocation for multi-layer ARFs

Increase the bit allocation for the intermediate layer ARFs. The
current strategy assigns higher offset to the lower layer ARFs.
The needed budget is borrowed from the base layer ARF allocation.

Change-Id: I16b6e9cce4dab8e73e7b097674d1a8504205026e

5 years agoMerge "Increase encoder buffer for multi-layer ARFs"
Jingning Han [Wed, 5 Sep 2018 14:30:19 +0000 (14:30 +0000)]
Merge "Increase encoder buffer for multi-layer ARFs"

5 years agoMerge "Structure the multi-layer ARF locations"
Jingning Han [Wed, 5 Sep 2018 14:30:13 +0000 (14:30 +0000)]
Merge "Structure the multi-layer ARF locations"

5 years agoMerge "Move partition search ML models to a seperate file"
Hui Su [Wed, 5 Sep 2018 04:31:58 +0000 (04:31 +0000)]
Merge "Move partition search ML models to a seperate file"

5 years agoMerge "Assign target bits for multi-layer ARF system"
Jingning Han [Tue, 4 Sep 2018 18:29:25 +0000 (18:29 +0000)]
Merge "Assign target bits for multi-layer ARF system"

5 years agoMove partition search ML models to a seperate file
Hui Su [Tue, 4 Sep 2018 17:05:15 +0000 (10:05 -0700)]
Move partition search ML models to a seperate file

Clean up vp9_encodeframe.c.

Change-Id: I4035fee94da746c74d72f71ca8334f91c5d10116

5 years agovp9-svc: Fix to first_spatial_to_encode for pattern constraint.
Marco Paniconi [Tue, 4 Sep 2018 16:08:49 +0000 (09:08 -0700)]
vp9-svc: Fix to first_spatial_to_encode for pattern constraint.

Change-Id: I876f69acf9420b3b013cb3048bbfa8ff059e2e50