Commit Graph

9183 Commits

Author SHA1 Message Date
Debargha Mukherjee
4f7a59c802 Merge "Force recode if framesize exceeds max allowed size" 2016-10-28 04:21:44 +00:00
Debargha Mukherjee
54e03017b6 Force recode if framesize exceeds max allowed size
Fixes a case where recode is not triggered based on the value
of maxq passed into the recode loop test function.

BUG=b/32375284

Change-Id: I15ad985d0525c68e0443cfaf842440d2754b2266
2016-10-27 09:52:51 -07:00
Paul Wilkins
de859676dd Changes to KF boost calculation.
Remove double counting of decay. Limit maximum KF boost.

Change-Id: I0fb2344d0f78b5e95bb899dfad12b0ca84034b2c
2016-10-26 17:53:29 +01:00
paulwilkins
ccd6a8e2fa Removal of a couple of two pass adjustments.
Removed a couple of adjustments that no longer move the needle
much but complicate the process of tuning.

Change-Id: Ie320f5cf155e6aac14a4757ea9ada2cd59f27590
2016-10-26 17:52:37 +01:00
Yunqing Wang
c192def8f3 Change 2 motion search counts to be tile data
This patch modified the motion search counts used in:
https://chromium-review.googlesource.com/#/c/305640/

These 2 counts were originally added as thread data, and used to
make decisions in motion search. The tile encoding order can be
inconsistent while using different number of threads, which can
cause bitstream mismatch. Here moved them to tile data to solve
the issue.

BUG=webm:1322

Change-Id: Iedc4477aef1746aa0a4f84d88a1156296fd3ba87
2016-10-25 10:12:41 -07:00
Vignesh Venkatasubramanian
9a032fa262 Merge "vp9_bitstream: Encode tiles in parallel" 2016-10-22 02:23:06 +00:00
Vignesh Venkatasubramanian
5deffa1175 vp9_bitstream: Encode tiles in parallel
Re-use the tile worker threads to pack the bitstream in parallel
on a per-tile basis.  Restricting this to real-time only for now
(further testing is needed to ensure this does not make 2-pass
worse in any case).

BUG=webm:1309

Change-Id: I8a80da7c5089b837d0df79a5c49d5e3022dfc8ec
2016-10-21 17:35:03 -07:00
Marco
ee1b3f34c0 vp9: Nonrd variance partition: increase threshold for using 4x4 avg.
In variance partition low resolutions may use varianace based on
4x4 average for better partitioning.
Increase the threshold for doing this at speed = 8.

Improves speed by ~5%, with little loss, < 1%, on RTC_derf set.

Change-Id: Ib5ec420832ccff887a06cb5e1d2c73199b093941
2016-10-21 11:51:06 -07:00
Marco
a7d116aa67 vp9: Speed=8 real-time: Keep the bias_golden feature on.
Small/no change in metrics on RTC set, speed increase by 2-3%.

Change-Id: Iee997bd7433e8e508216e9267b1c31c5a9aa5121
2016-10-20 17:03:51 -07:00
James Zern
7f31bfeddb Revert "vp9_bitstream: Encode tiles in parallel"
This reverts commit 9e8efa5b18.

this change causes ubsan warnings, failures in
vpxenc_vp9_webm_rt_multithread_tiled

BUG=webm:1309

Change-Id: I020c7be985c771bfff4b3de1afe51cc8edb980da
2016-10-18 22:47:48 -07:00
Marco Paniconi
f6980ca68e Merge "vp9: Non-rd variance partition: add condition for 64x64 split." 2016-10-18 00:03:17 +00:00
Marco
55a2b67368 vp9: Non-rd variance partition: add condition for 64x64 split.
Add stronger condition for splitting 64x64, for low noise content.
This reduces dragging artifact near moving head.

Little/no change in metrics on RTC set.

Change-Id: I39b38cfd20f2ece53ff49c2aaf76ba9f82761be1
2016-10-17 12:54:27 -07:00
Vignesh Venkatasubramanian
9e8efa5b18 vp9_bitstream: Encode tiles in parallel
Re-use the tile worker threads to pack the bitstream in parallel
on a per-tile basis.  Restricting this to real-time only for now
(further testing is needed to ensure this does not make 2-pass
worse in any case).

BUG=webm:1309

Change-Id: Ia2c982da56697756e12f02643f589189b3271d98
2016-10-17 10:42:03 -07:00
Vignesh Venkatasubramanian
769292017b vp9_bitstream: Parameterize interp_filter_selected
Facilitates encoding tiles in parallel.

BUG=webm:1309

Change-Id: I37aa336d47babffc8352188dc767eebdb8a99474
2016-10-12 20:22:03 -07:00
Vignesh Venkatasubramanian
04a6010742 Merge "vp9_bitstream: Parameterize max_mv_magnitude" 2016-10-12 21:52:42 +00:00
Vignesh Venkatasubramanian
d03d1c8cd3 vp9_bitstream: Parameterize max_mv_magnitude
Facilitates encoding tiles in parallel.

BUG=webm:1309

Change-Id: I614a5a492c30b6773c30e7294cd6a6f456e02ab4
2016-10-12 12:50:17 -07:00
Marco
57c6bf291e 1 pass vbr: Allow for lookahead alt-ref in real-time mode.
For 1 pass vbr real-time mode:
Allow for the usage of alt-ref frame when non-zero lag-in-frames is used.
Use non-filtered alt-ref, and select usage based on fast scene/content
analysis/detection within the lag of frames.

Positive gains on ytlive set: overall avgPSNR ~3-4%.
Several clips are up between 5-14%, a few clips are neutral/small change.

Current speed decrease is about ~5-10%.

Use the flag USE_ALTREF_FOR_ONE_PASS to enable this feature
(off by default for now).

Change-Id: I802d2bf3d44f9cf01f6d15c76be9c90192314769
2016-10-11 10:13:17 -07:00
Marco
cdbd89197e vp9: 1 pass vbr: some adjustments to gf interval.
Put limit on gf interval based on lag, and allow
for the adjustment on next gf group also on key frame.

Small/neutral change on ytlive metrics.

Change only affects 1 pass vbr real-time mode.

Change-Id: I339c8f4398848698b6e10fe9482c52ca661b94a5
2016-10-11 08:34:12 -07:00
Vignesh Venkatasubramanian
ed50e7710c write_modes: add MACROBLOCKD as a parameter
This will enable bit stream packing of each tile column in
parallel.

BUG=webm:1309

Change-Id: Ie349d8cc5825326218ffda893a50730b2e68ed34
2016-10-07 10:25:02 -07:00
Alex Converse
3063c37600 Remove vpx_realloc()
It only handles the realloc constraint (preserving low elements) by
serendipity, and we don't actually rely on that behavior anyway.
Meanwhile the calls may do extra copying that gets immediately clobbered
by the callers.

Change-Id: I8dfa89e4a81084b084889c27bd272fdf85184e8d
2016-10-05 10:57:56 -07:00
Angie Chiang
5d635365bb Merge "Move highbd txfm input range check from 2d iht transform to 1d idct/iadst" 2016-10-04 16:57:37 +00:00
Angie Chiang
5b073c695b Move highbd txfm input range check from 2d iht transform to 1d idct/iadst
This change will make the highbd txfm input range check more comprehensive

The 25-bit highbd input range is composed by
12 signal input bits + 7 bits for 2D forward transform amplification + 5 bits for
1D inverse transform amplification + 1 bit for contingency in rounding and quantizing

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1286
BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=651625

Change-Id: I04c0796edd7653f8d463fba5dc418132986131e7
2016-10-03 17:21:08 -07:00
James Zern
fb020805f9 Merge "Fix warning when building with GCC 5." 2016-10-03 22:42:52 +00:00
James Zern
c6bc7499d9 Merge "cosmetics,*_neon.c: rm redundant return from void fns" 2016-10-03 22:40:42 +00:00
Geza Lore
0dc12b4a1c Fix warning when building with GCC 5.
These caused the following warning with GCC 5:
     warning: logical not is only applied to the left hand side of
     comparison [-Wlogical-not-parentheses]
     assert(!is_compound == (cm->reference_mode == SINGLE_REFERENCE));

Change-Id: If296aabb2311ceb7d903b395c1549ef81c2cbf9b
(cherry picked from commit c6cf7a6111)
2016-10-01 12:23:15 -07:00
Marco Paniconi
0a9f56f146 Merge "vp9: On change_config() only call update_frame_size if needed." 2016-09-30 21:43:33 +00:00
Marco Paniconi
5e908aff34 Merge "vp9 real-time mode: Change loopfilter speed feature at speed 8." 2016-09-30 21:42:05 +00:00
James Zern
db80c23fd4 cosmetics,*_neon.c: rm redundant return from void fns
+ a couple of 'break's after a return

Change-Id: Ia21f12ebcef98244feb923c17b689fc8115da015
2016-09-30 13:09:57 -07:00
James Zern
b6277a47c7 Merge changes from topic '8bit-hbd-idct'
* changes:
  *idct*_neon.c: add missing rtcd include
  idct,msa/neon: exclude idct files from hbd build
  *rtcd_defs.pl: remove empty specialize calls
2016-09-30 19:36:08 +00:00
Linfeng Zhang
8c744fd978 Merge "Unify loopfilter function names" 2016-09-30 15:58:08 +00:00
James Zern
ed62d27c71 *rtcd_defs.pl: remove empty specialize calls
add_proto adds a 'c' specialization

Change-Id: I0ed0c2240d45264b0e0056ce7c8f63f4a00780bc
2016-09-29 20:38:26 -07:00
Yunqing Wang
9afe2cf599 Merge "Fix an issue in vp9_first_pass for non-mulitple of 16 resolutions" 2016-09-30 00:49:06 +00:00
Linfeng Zhang
7f1f35183a Unify loopfilter function names
Rename vpx_lpf_horizontal_edge_8() to vpx_lpf_horizontal_16().
Rename vpx_lpf_horizontal_edge_16() to vpx_lpf_horizontal_16_dual().

Change-Id: I798ca8fbbd657d06d3db2bfb0fb3321168f49e52
2016-09-29 16:25:42 -07:00
Deepa K G
2745f94deb Fix an issue in vp9_first_pass for non-mulitple of 16 resolutions
This patch sets the 16x16 src_diff to zero and ensures correct calculation
of this_error for block sizes smaller than 16x16.

Change-Id: I7b7c02d267433c9f22c8ac9b8d5df2f499175172
2016-09-29 16:19:23 -07:00
Marco
e765435293 vp9: On change_config() only call update_frame_size if needed.
change_config() may be called often in real-time application,
to update bitrate/framerate or qp-max/min.
No need to do update_frame_size() unless frame size has changed.

Change-Id: I23a51deade1e03adc91c468f9ffde3235298770c
2016-09-29 13:03:26 -07:00
Marco
d017548be6 vp9 real-time mode: Change loopfilter speed feature at speed 8.
For real-time mode at speed 8: turn off MINIMAL_LF at speed 8,
for non-screen content mode.

Visually better, avgPSNR/SSIM on rtc set go up by ~4-5%.
Speed decrease of about ~3%.

Change-Id: I8eb69330f02e0ceece1507d43cfc8a049a1d8291
2016-09-29 12:59:01 -07:00
James Zern
450d89034b vp9_detokenize,decode_coefs: fix signed int overflow
when decoding an invalid bitstream with --enable-vp9-highbitdepth

BUG=webm:1297

Change-Id: I401d87033b4293f2ca595bc51678aad9951ecf15
2016-09-28 22:42:03 -07:00
James Zern
e094e151de Merge "vp9: fix compilation for g++ 6.2.x" 2016-09-28 23:36:23 +00:00
Tristan Matthews
32c375447c vp9: fix compilation for g++ 6.2.x
Inline function called from test/dct16x16_test.cc wouldn't build due to:
  invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type
  {aka double}’ and ‘int’ to binary ‘operator>>’
  return (abs(ref->row) >> 3) < COMPANDED_MVREF_THRESH &&

this converts the test to abs() < COMPANDED_MVREF_THRESH << 3 which
hides the promotion issue.

Regression from commit de993a847f

BUG=webm:1291

Change-Id: I73b5943d07d5b61b709d299114216a2371a8fd62
2016-09-27 23:17:31 -07:00
Debargha Mukherjee
74f038e6f8 Merge "Fix for compile error with range checking" 2016-09-28 00:05:37 +00:00
Paul Wilkins
b3ebea5e8a Merge "Limit max arf boost and scale motion breakout for image size." 2016-09-27 14:08:29 +00:00
Peter de Rivaz
8db503063f Fix for compile error with range checking
Current version does not build with options:
  --enable-vp9-highbitdepth --enable-coefficient-range-checking

Change-Id: Ic3285f1a3e0d6be88da7f2cd8fa5a631368dd03b
2016-09-27 09:28:44 +01:00
Marco
d9fc28c0a1 vp9: Reduce frame loopfilter-level for 1 pass cbr.
Reduce the filt_guess for 1 pass cbr on inter-frames.
This reduces visual artifact seen in rtc clip (jimred.vga),
and improves metrics on rtc set.

Metrics on rtc set for cbr mode overall positive, most clips are up:
Speed 7 rtc: avgPSNR/SSIM up by: ~2.6/3.9%
Speed 8 rtc: avgPSNR/SSIM up by: ~1.3/2.5%

Change-Id: Ia4eccea1c19d65b583516df28823cd756c49464f
2016-09-26 10:12:43 -07:00
paulwilkins
0421d8e318 Limit max arf boost and scale motion breakout for image size.
Added a cap on the maximum boost for an arf based on interval length.
Fixed bug where by the image size was not accounted for in determining
two of the motion breakout thresholds.

Overall small gains of 0.2-0.4% psnr but on large image format clips with
slow zooms the gain may be as much as 20% or more (e.g. in_to_tree
at 1080P)

Change-Id: Id0a47391203026742daa9c97afac5705fd8c4dfb
2016-09-26 15:38:29 +01:00
Scott LaVarnway
60624aa53a Merge "VP9: token decoder expansion" 2016-09-26 12:06:50 +00:00
James Zern
f8c056a895 Merge "vp9_idct: delete dead TODOs" 2016-09-24 01:47:00 +00:00
Scott LaVarnway
87b689f97a VP9: token decoder expansion
This version is based on Change 267683, but does not
use the macros.

Change-Id: I0619fa618decf8bdeef250584d75d70318b5d9a7
2016-09-23 06:24:20 -07:00
Scott LaVarnway
ada850786c Merge "VP9: pass TileWorkerData instead of MACROBLOCKD and vpx_reader." 2016-09-23 11:59:16 +00:00
Scott LaVarnway
7a34f85955 VP9: pass TileWorkerData instead of MACROBLOCKD and vpx_reader.
Change-Id: I869ef0f113c022143b531c44aefa0f1bb267052d
2016-09-22 13:18:36 -07:00
Angie Chiang
99ef84c65a Merge "Detect invalid highbd iht input" 2016-09-22 01:06:38 +00:00