platform/upstream/libvpx.git
8 years agoMerge "Fix ubsan warning: test/datarate_test.cc"
Yaowu Xu [Thu, 16 Jun 2016 19:40:20 +0000 (19:40 +0000)]
Merge "Fix ubsan warning: test/datarate_test.cc"

8 years agoFix ubsan warning: test/datarate_test.cc
Yaowu Xu [Thu, 16 Jun 2016 15:57:29 +0000 (08:57 -0700)]
Fix ubsan warning: test/datarate_test.cc

BUG=webm:1219

Change-Id: I48470a885cd64a60636a982cd68165c41a702306

8 years agoMerge "Fix ubsan warning: vp8/encoder/denoising.c"
Yaowu Xu [Thu, 16 Jun 2016 18:09:09 +0000 (18:09 +0000)]
Merge "Fix ubsan warning: vp8/encoder/denoising.c"

8 years agoMerge "Fix ubsan warning: vp8/encoder/onyx_ifc"
Yaowu Xu [Thu, 16 Jun 2016 16:44:41 +0000 (16:44 +0000)]
Merge "Fix ubsan warning: vp8/encoder/onyx_ifc"

8 years agoMerge "Fix ubsan warning: vp9_cx_iface.c"
Yaowu Xu [Thu, 16 Jun 2016 16:44:35 +0000 (16:44 +0000)]
Merge "Fix ubsan warning: vp9_cx_iface.c"

8 years agoMerge "vp9: Adjustments to nonrd-pickmode for vbr"
Marco Paniconi [Thu, 16 Jun 2016 16:07:06 +0000 (16:07 +0000)]
Merge "vp9: Adjustments to nonrd-pickmode for vbr"

8 years agoFix ubsan warning: vp8/encoder/denoising.c
Yaowu Xu [Thu, 16 Jun 2016 15:53:53 +0000 (08:53 -0700)]
Fix ubsan warning: vp8/encoder/denoising.c

BUG=webm:1219

Change-Id: Iebdedfb27c70909c0849e169473a2a3ec9f58cc7

8 years agoFix ubsan warning: vp8/encoder/onyx_ifc
Yaowu Xu [Thu, 16 Jun 2016 15:32:18 +0000 (08:32 -0700)]
Fix ubsan warning: vp8/encoder/onyx_ifc

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

Change-Id: I4362a1cf79fdcb478b29ddbcdf8091c5f5d10645

8 years agoFix ubsan warning: vp9_cx_iface.c
Yaowu Xu [Thu, 16 Jun 2016 15:28:33 +0000 (08:28 -0700)]
Fix ubsan warning: vp9_cx_iface.c

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

Change-Id: I77584af8b9e25db484d9ced6013da3163a9592c0

8 years agoMerge "Add vp9 encoder API VP9E_GET_LEVEL to provide bitstream level"
Hui Su [Wed, 15 Jun 2016 23:52:18 +0000 (23:52 +0000)]
Merge "Add vp9 encoder API VP9E_GET_LEVEL to provide bitstream level"

8 years agoMerge "vp9: Add bias to last frame in choose_partitioning."
Jacky Chen [Wed, 15 Jun 2016 22:50:04 +0000 (22:50 +0000)]
Merge "vp9: Add bias to last frame in choose_partitioning."

8 years agovp9: Adjustments to nonrd-pickmode for vbr
Marco [Wed, 15 Jun 2016 21:20:32 +0000 (14:20 -0700)]
vp9: Adjustments to nonrd-pickmode for vbr

For VBR: (1) allow newmv mode for golden ref to
select interpolation filter (as in last ref case), and
(2) don't use the more aggressive tx-skip testing logic for large blocks.

Only affects 1 pass real-time vbr mode (speed >= 5).

PSNR/SSIM metrics on ytlive set are all positive, ~0.5-2% gain.

Change-Id: I0ffbb0a9755563a5acd6230c58236e4f19a47266

8 years agoMerge "VP9: block_yrd(): Use RD_COST * instead"
Scott LaVarnway [Wed, 15 Jun 2016 21:02:45 +0000 (21:02 +0000)]
Merge "VP9: block_yrd(): Use RD_COST * instead"

8 years agovp9: Add bias to last frame in choose_partitioning.
JackyChen [Wed, 15 Jun 2016 17:14:14 +0000 (10:14 -0700)]
vp9: Add bias to last frame in choose_partitioning.

This change is only for real-time mode if short_circuit_low_temp_var
is on. Add bias to last frame in choosing ref frame for partitioning,
when y_sad and y_sad_g are close. It speeds up real-time encoding by
0.5% on some clips with less than 0.1% overall PSNR drop on rtc test set.

Change-Id: I2a2110fe36455f3d8f0fc404aef2228f512e8df8

8 years agoAdd vp9 encoder API VP9E_GET_LEVEL to provide bitstream level
hui su [Thu, 5 May 2016 19:04:42 +0000 (12:04 -0700)]
Add vp9 encoder API VP9E_GET_LEVEL to provide bitstream level

Change-Id: I1ef3df0192491035728fe9d5eb25cc66dc2965de

8 years agoMerge "Match prev_ to number_of_layers"
Johann Koenig [Wed, 15 Jun 2016 18:26:55 +0000 (18:26 +0000)]
Merge "Match prev_ to number_of_layers"

8 years agoMerge "Use data size directly instead of recomputing."
Johann Koenig [Wed, 15 Jun 2016 18:23:33 +0000 (18:23 +0000)]
Merge "Use data size directly instead of recomputing."

8 years agoMerge "vp9: Code clean up for short circuit feature in low temp variance."
Jacky Chen [Wed, 15 Jun 2016 16:49:32 +0000 (16:49 +0000)]
Merge "vp9: Code clean up for short circuit feature in low temp variance."

8 years agoVP9: block_yrd(): Use RD_COST * instead
Scott LaVarnway [Tue, 14 Jun 2016 22:43:31 +0000 (15:43 -0700)]
VP9: block_yrd(): Use RD_COST * instead

of int *rate, int *dist.

Change-Id: I7cbaea5252615b6b45b33e896f637cf7d076588a

8 years agoMerge "VP9: minor block_yrd() refactoring"
Scott LaVarnway [Wed, 15 Jun 2016 11:46:54 +0000 (11:46 +0000)]
Merge "VP9: minor block_yrd() refactoring"

8 years agovp9: Code clean up for short circuit feature in low temp variance.
JackyChen [Tue, 14 Jun 2016 21:25:55 +0000 (14:25 -0700)]
vp9: Code clean up for short circuit feature in low temp variance.

Change-Id: I7573a5cf0ab79abed8d124019c0ed6d9531277f9

8 years agoUse data size directly instead of recomputing.
Johann [Sat, 11 Jun 2016 00:54:33 +0000 (17:54 -0700)]
Use data size directly instead of recomputing.

Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'

int n = (int)VPXMIN(sizeof(clear_buffer), data_end - data);
             ^      ~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~

Change-Id: I964355ceae6b39e22c0196294b25e28387f84945

8 years agoMatch prev_ to number_of_layers
Johann [Sat, 11 Jun 2016 01:00:34 +0000 (18:00 -0700)]
Match prev_ to number_of_layers

Defined as unsigned in VP8_CONFIG

Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'
if (cpi->oxcf.number_of_layers != prev_number_of_layers)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
Change-Id: I969e64cd2bfda6e61c564476dbd35b892b177646

8 years agoActive map and ROI map use unsigned rows/cols
Johann [Sat, 11 Jun 2016 01:17:18 +0000 (18:17 -0700)]
Active map and ROI map use unsigned rows/cols

The vpx_roi_map_t and vpx_active_map_t structures use unsigned rows
and cols but VP8_COMMON uses signed values for mb_rows and mb_cols.

Cleans warning in Android build:
comparison of integers of different signs: 'int' and 'unsigned int'
if (cpi->common.mb_rows != rows || cpi->common.mb_cols != cols)
    ~~~~~~~~~~~~~~~~~~~ ^  ~~~~
comparison of integers of different signs: 'int' and 'unsigned int'
if (cpi->common.mb_rows != rows || cpi->common.mb_cols != cols)
                                   ~~~~~~~~~~~~~~~~~~~ ^  ~~~~
comparison of integers of different signs: 'unsigned int' and 'int'
if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols)
    ~~~~ ^  ~~~~~~~~~~~~~~~~~~~
comparison of integers of different signs: 'unsigned int' and 'int'
if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols)

Change-Id: If1f118c20ffefd2530fbd371e6787cc8a6c31f0a

8 years agoMake new_qc signed
Johann [Mon, 13 Jun 2016 18:56:42 +0000 (11:56 -0700)]
Make new_qc signed

Mode is signed

Cleans warning in Android build:
comparison of integers of different signs: 'int' and 'unsigned int'
if (ctx->oxcf.Mode != new_qc)
    ~~~~~~~~~~~~~~ ^  ~~~~~~

Change-Id: I5cf81c40b103e688a31e1339511f5c9eb27edd38

8 years agoneon hadamard 16x16
Johann [Fri, 10 Jun 2016 22:49:44 +0000 (15:49 -0700)]
neon hadamard 16x16

Runs about twice as fast as C

BUG=webm:1027

Change-Id: I6760d99f4e22259439ca35d746194b12a81bfa71

8 years agoMerge "hadamard 16x16 test"
Johann Koenig [Tue, 14 Jun 2016 19:22:59 +0000 (19:22 +0000)]
Merge "hadamard 16x16 test"

8 years agoMerge "vp9: Encoding cycle reduction for speed 8."
Jacky Chen [Tue, 14 Jun 2016 15:41:31 +0000 (15:41 +0000)]
Merge "vp9: Encoding cycle reduction for speed 8."

8 years agoMerge "Small re-arrangement."
Paul Wilkins [Tue, 14 Jun 2016 11:46:58 +0000 (11:46 +0000)]
Merge "Small re-arrangement."

8 years agohadamard 16x16 test
Johann [Thu, 12 May 2016 20:02:26 +0000 (13:02 -0700)]
hadamard 16x16 test

BUG=webm:1027

Change-Id: Ibe58781905b372b9fe29dace39b4bfdd33fd0f83

8 years agovp9: Encoding cycle reduction for speed 8.
JackyChen [Mon, 6 Jun 2016 23:30:14 +0000 (16:30 -0700)]
vp9: Encoding cycle reduction for speed 8.

1. Skip golden non-zeromv and newmv-last for bsize >= 16x16 if the
temporal variance obtained from choose_partitioning is very low.
2. Skip horz and vert INTRA mode for speed 8.

This change works best on the clips with little noise and with some
motion (e.g. gips_motion which has > 5% speed up). PSNR drop is 1.78%
on rtc test set, no obvious visual quality regression found.

Change-Id: Ib43b5b20e67809d03c5a6890818ddff59e1fc94a

8 years agoVP9: minor block_yrd() refactoring
Scott LaVarnway [Mon, 13 Jun 2016 14:35:45 +0000 (07:35 -0700)]
VP9: minor block_yrd() refactoring

Change-Id: Ic0a81fb5816c8252ca4876753320fde5c28d893f

8 years agoMerge "vp9: Put lower limit on frames_to_key adjustment to gf interval."
Marco Paniconi [Fri, 10 Jun 2016 22:49:48 +0000 (22:49 +0000)]
Merge "vp9: Put lower limit on frames_to_key adjustment to gf interval."

8 years agoMerge "Add a couple of missing WRAPLOW checks"
Debargha Mukherjee [Fri, 10 Jun 2016 21:55:36 +0000 (21:55 +0000)]
Merge "Add a couple of missing WRAPLOW checks"

8 years agoMerge "vp9_diamond_search_sad_avx cosmetics"
James Zern [Fri, 10 Jun 2016 17:30:39 +0000 (17:30 +0000)]
Merge "vp9_diamond_search_sad_avx cosmetics"

8 years agovp9: Put lower limit on frames_to_key adjustment to gf interval.
Marco [Fri, 10 Jun 2016 17:04:46 +0000 (10:04 -0700)]
vp9: Put lower limit on frames_to_key adjustment to gf interval.

For 1 pass vbr.

Change-Id: I6c1c1cca3944150140e896e175b07ed518641b9b

8 years agovp9_diamond_search_sad_avx cosmetics
Scott LaVarnway [Fri, 10 Jun 2016 11:56:21 +0000 (04:56 -0700)]
vp9_diamond_search_sad_avx cosmetics

Fixed cosmetic issues noted in Change 349854.

Change-Id: I1d94070e4066fa920173013c5a36a30dd1cb357d

8 years agoMerge changes I58081309,I502fd707
James Zern [Thu, 9 Jun 2016 22:54:12 +0000 (22:54 +0000)]
Merge changes I58081309,I502fd707

* changes:
  fdct8x8_test: fix unsigned overflow
  fdct4x4_test: fix unsigned overflow

8 years agoAdd a couple of missing WRAPLOW checks
Debargha Mukherjee [Thu, 9 Jun 2016 19:58:27 +0000 (12:58 -0700)]
Add a couple of missing WRAPLOW checks

To make coefficient checking consistent with the VP9 spec sections
8.7.1.6 and 8.7.1.1.

Change-Id: I92e38e89a41d1e482317bb478c48ffa608d2d6ee

8 years agoSmall re-arrangement.
paulwilkins [Fri, 3 Jun 2016 14:42:47 +0000 (15:42 +0100)]
Small re-arrangement.

Move initialization of a some new "twopass" values
to the function vp9_init_second_pass() and some other
small  changes.

Remove #if GROUP_ADAPTIVE_MAXQ as this is always
enabled now.

Change-Id: I1dbec2fd7c419779848aa987c4cd7824d4df8456

8 years agovp9_subexp.h: normalize function prototype
James Zern [Thu, 9 Jun 2016 05:55:53 +0000 (22:55 -0700)]
vp9_subexp.h: normalize function prototype

vp9_prob_diff_update_savings_search_model

updated in:
19e0b40 Refactor probability savings search.

Change-Id: I13ae3106961f0271f51df17ee1c70c99f2d75f8f

8 years agoMerge "vp9: Use nonrd_pick_partition on scene-cut, for speed 5 vbr mode."
Marco Paniconi [Thu, 9 Jun 2016 00:49:02 +0000 (00:49 +0000)]
Merge "vp9: Use nonrd_pick_partition on scene-cut, for speed 5 vbr mode."

8 years agofdct8x8_test: fix unsigned overflow
James Zern [Thu, 9 Jun 2016 00:33:34 +0000 (17:33 -0700)]
fdct8x8_test: fix unsigned overflow

the difference between src and dst will be signed, the error will be
unsigned.
quiets -fsanitize=integer:
unsigned integer overflow: 4294967295 * 4294967295

Change-Id: I580813093ee46284fde7954520dfcb1188f79268

8 years agofdct4x4_test: fix unsigned overflow
James Zern [Thu, 9 Jun 2016 00:29:02 +0000 (17:29 -0700)]
fdct4x4_test: fix unsigned overflow

the difference between src and dst will be signed, the error will be
unsigned.
quiets -fsanitize=integer:
unsigned integer overflow: 4294967295 * 4294967295

Change-Id: I502fd707823c4faaa7f587c9cc0312f057e04904

8 years agovp9: Use nonrd_pick_partition on scene-cut, for speed 5 vbr mode.
Marco [Wed, 8 Jun 2016 20:03:29 +0000 (13:03 -0700)]
vp9: Use nonrd_pick_partition on scene-cut, for speed 5 vbr mode.

On scene-cut detected frames (i.e., high_source_sad = 1), use
nonrd_pick_partition (over choose_part + select_part), as
the nonrd_pick partitioning is generally better.

Small positive increase in metrics on ytlive set (~0.5 - 1%).
Negligle overall speed decrease, as its only used on scene-cut frames.

Only affects 1 pass vbr mode, speed = 5.

Change-Id: I07c89cbdc75f5bb16eb8e0e2773ead0980d2de5c

8 years agovp9: Reduce overshoot factor for setting longer gf interval.
Marco [Wed, 8 Jun 2016 22:13:52 +0000 (15:13 -0700)]
vp9: Reduce overshoot factor for setting longer gf interval.

Only affects 1 pass vbr mode.

Change-Id: Ifd7ff3771eabe322a371b35b159cace6baa3b070

8 years agoMerge "Refactor probability savings search."
Alex Converse [Wed, 8 Jun 2016 17:49:52 +0000 (17:49 +0000)]
Merge "Refactor probability savings search."

8 years agoMerge "Revert "remove vp9_diamond_search_sad_avx.c""
James Zern [Wed, 8 Jun 2016 02:56:00 +0000 (02:56 +0000)]
Merge "Revert "remove vp9_diamond_search_sad_avx.c""

8 years agoMerge "Avoid a potential assertion fail in optimize_b()"
Hui Su [Wed, 8 Jun 2016 00:33:48 +0000 (00:33 +0000)]
Merge "Avoid a potential assertion fail in optimize_b()"

8 years agoRevert "remove vp9_diamond_search_sad_avx.c"
Scott LaVarnway [Wed, 8 Jun 2016 00:21:01 +0000 (17:21 -0700)]
Revert "remove vp9_diamond_search_sad_avx.c"

This reverts commit be12fefa4b7d224e9f39275a6bb4fab01b8bae3b
and commit 057c1c4034ba5b9bf360c5c1f600ebc6d0718c3a.

Also, the mismatch between the avx version and the
c version has been fixed.

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

For a rt encode using 1080p@60fps material, up to 11% performance
improvement overall was seen.

Change-Id: Icd1f216209ebc6fc0b8da885f32f356fa4355ed0

8 years agoAvoid a potential assertion fail in optimize_b()
hui su [Tue, 7 Jun 2016 22:45:04 +0000 (15:45 -0700)]
Avoid a potential assertion fail in optimize_b()

The eob of a block is not perperly set when skip_recode is true,
thus triggering assert(eob <= default_eob) to fail.

Change-Id: Ifecbe33dce2dc4903e0a80bd384dc09bf0dd8a44

8 years agoMerge "ivfdec: tolerate invalid framerates (2)"
James Zern [Tue, 7 Jun 2016 22:39:49 +0000 (22:39 +0000)]
Merge "ivfdec: tolerate invalid framerates (2)"

8 years agoMerge "vp9: Replace the avg_size_inter metric, for 1 pass vbr."
Marco Paniconi [Tue, 7 Jun 2016 22:27:33 +0000 (22:27 +0000)]
Merge "vp9: Replace the avg_size_inter metric, for 1 pass vbr."

8 years agoMerge changes I999ef597,Ic6dc9f53
Johann Koenig [Tue, 7 Jun 2016 21:43:55 +0000 (21:43 +0000)]
Merge changes I999ef597,Ic6dc9f53

* changes:
  configure: Add -mstackrealign flags to CFLAGS on OS/2
  vpx: Add OS/2-specific threading codes

8 years agovp9: Replace the avg_size_inter metric, for 1 pass vbr.
Marco [Mon, 6 Jun 2016 22:11:08 +0000 (15:11 -0700)]
vp9: Replace the avg_size_inter metric, for 1 pass vbr.

Code cleaup, use existing rolling_actual/target metrics instead,
set threshold to get same/similar effect.

Little/no change in metrics on ytlive set.

Change-Id: I74f3c3d0a143a9cf20dc9c3dee54c0f7e6a97a51

8 years agovp9: Small ajustment to settings gf_interval, 1 pass vbr.
Marco [Mon, 6 Jun 2016 18:42:09 +0000 (11:42 -0700)]
vp9: Small ajustment to settings gf_interval, 1 pass vbr.

Add a max condition and lower the min value.

No change in behavior (metrics for yt live set) for the
default min/max_gf_interval=4/16 settings.
Small positive change when min/max_gf_interval=7/16
(for 60fps clips on ytlive set).

Change-Id: I1c1d72425c86c69419ea43fb9730130e81062f91

8 years agoMerge "Move range checks into WRAPLOW"
Debargha Mukherjee [Mon, 6 Jun 2016 16:28:23 +0000 (16:28 +0000)]
Merge "Move range checks into WRAPLOW"

8 years agoivfdec: tolerate invalid framerates (2)
James Zern [Sat, 4 Jun 2016 01:04:54 +0000 (18:04 -0700)]
ivfdec: tolerate invalid framerates (2)

add an upper bound to the framerate denominator above which 30fps will
be reported; fixes warning in corrupt / fuzzed files

Change-Id: I46a6a6f34ab756535cd009fe12273d83dcc1e9f1

8 years agoMerge changes If31d36c8,I10b947e7
James Zern [Sat, 4 Jun 2016 00:56:06 +0000 (00:56 +0000)]
Merge changes If31d36c8,I10b947e7

* changes:
  vpx_dsp,add_noise: remove mmx implementation
  vpx_dsp: remove mmx variance implementations

8 years agoMerge "Fix Visual Studio build failure in filter_selectively_vert_row2() calls"
James Zern [Fri, 3 Jun 2016 20:07:47 +0000 (20:07 +0000)]
Merge "Fix Visual Studio build failure in filter_selectively_vert_row2() calls"

8 years agoMove range checks into WRAPLOW
Debargha Mukherjee [Wed, 25 May 2016 19:24:48 +0000 (12:24 -0700)]
Move range checks into WRAPLOW

Provides more comprehensive coverage for --enable-coefficient-checking.
The intent is to make the --enable-coefficient-checking option
consistent with the VP9 spec.

Change-Id: I12d0120756d17572ca2b2d7e6a2ab9d8071d8d58

8 years agoMerge "Slightly more damped VBR adjustment."
Paul Wilkins [Fri, 3 Jun 2016 17:14:12 +0000 (17:14 +0000)]
Merge "Slightly more damped  VBR adjustment."

8 years agoMerge "Change to get_twopass_worst_quality()"
Paul Wilkins [Fri, 3 Jun 2016 17:13:51 +0000 (17:13 +0000)]
Merge "Change to get_twopass_worst_quality()"

8 years agoMerge "Removed unused data structure."
Paul Wilkins [Fri, 3 Jun 2016 17:13:33 +0000 (17:13 +0000)]
Merge "Removed unused data structure."

8 years agoMerge "Adjustment to VBR rate correction."
Paul Wilkins [Fri, 3 Jun 2016 17:13:13 +0000 (17:13 +0000)]
Merge "Adjustment to VBR rate correction."

8 years agoMerge "Adjustment calculation of active worst quality."
Paul Wilkins [Fri, 3 Jun 2016 17:12:51 +0000 (17:12 +0000)]
Merge "Adjustment calculation of active worst quality."

8 years agoMerge "Remove gf_zeromotion_pct."
Paul Wilkins [Fri, 3 Jun 2016 17:12:25 +0000 (17:12 +0000)]
Merge "Remove gf_zeromotion_pct."

8 years agoFix Visual Studio build failure in filter_selectively_vert_row2() calls
Linfeng Zhang [Fri, 3 Jun 2016 16:28:11 +0000 (09:28 -0700)]
Fix Visual Studio build failure in filter_selectively_vert_row2() calls

Error messages:
 ..\vp9\common\vp9_loopfilter.c(1312): warning C4244: 'function' :
conversion from 'uint64_t' to 'unsigned int', possible loss of data
[.build-x86_64-win64-vs10\vpx.vcxproj]

..\vp9\common\vp9_loopfilter.c(1313): warning C4244: 'function' :
conversion from 'uint64_t' to 'unsigned int', possible loss of data
[.build-x86_64-win64-vs10\vpx.vcxproj]

..\vp9\common\vp9_loopfilter.c(1312): error C2220: warning treated as
error - no 'object' file generated
[.build-x86_64-win64-vs10\vpx.vcxproj]

Change-Id: Ia69260611997cd2ba41c7184a85ecead740a7c07

8 years agoMerge "Slow pshufb removal in 3 intra prediction functions."
Linfeng Zhang [Fri, 3 Jun 2016 16:35:14 +0000 (16:35 +0000)]
Merge "Slow pshufb removal in 3 intra prediction functions."

8 years agoMerge "vp9: Fix valgrind failure for short circuit on low temporal vaiance block."
Jacky Chen [Fri, 3 Jun 2016 16:09:35 +0000 (16:09 +0000)]
Merge "vp9: Fix valgrind failure for short circuit on low temporal vaiance block."

8 years agoSlightly more damped VBR adjustment.
paulwilkins [Wed, 1 Jun 2016 16:13:31 +0000 (17:13 +0100)]
Slightly more damped  VBR adjustment.

Increase in the damping used in adjusting the active Q range.
This does hurt rate accuracy a little in a few extreme cases
especially if the clip is very short*, but helps metrics.

* Note that the adjustment is applied at the GF/ARF group level based
on what happened in the last group.  Hence for very short clips where
the length of a single group may be a significant % of the clip length
there is still scope for some drift that cannot be accommodated.

In practice most data points in our test sets are now much closer to target
than was previously the case with default settings and in some cases are
better even than they were with the command line undershoot and overshoot
parameter was set very low (e.g. 2%). For example in bridge_close at high rates
the old mechanism was unable to adapt enough to prevent extreme overshoot.

Change-Id: I634f8f0e015b5ee64a9f0ccaa2bcfdbc1d360489

8 years agoChange to get_twopass_worst_quality()
paulwilkins [Fri, 27 May 2016 15:04:43 +0000 (16:04 +0100)]
Change to get_twopass_worst_quality()

Change to the calculation of the error divisor used in
get_twopass_worst_quality(). This follows on from other
changes to the rate control that impact the output of this
function.

Change-Id: I414fa9aa1e6a68a64dccea17c3712f44b8a0c10c

8 years agoRemoved unused data structure.
paulwilkins [Fri, 27 May 2016 11:59:25 +0000 (12:59 +0100)]
Removed unused data structure.

Removed unused element from TWOPASS data structure.

Change-Id: I9b662fd8eea727a7978055bc14f7c7328f048a5e

8 years agoAdjustment to VBR rate correction.
paulwilkins [Tue, 24 May 2016 14:21:13 +0000 (15:21 +0100)]
Adjustment to VBR rate correction.

Changes to the function the redistributes bits from overshoot
or undershoot throughout the rest of the clip to respond more
quickly.

Change-Id: I90f10900cdd82cf2ce1d8da4b6f91eb5934310da

8 years agoAdjustment calculation of active worst quality.
paulwilkins [Mon, 23 May 2016 12:57:11 +0000 (13:57 +0100)]
Adjustment calculation of active worst quality.

Added a factor based on the bit spend in the last arf group vs the
target to adjust the choice of the active worst quality in subsequent
groups.

Helps clips where previously there was a big overshoot or undershoot
to adapt and get closer to the target rate.

Change-Id: I67034b801679b99024409489a2273ea6fe23b8e6

8 years agoRemove gf_zeromotion_pct.
paulwilkins [Thu, 2 Jun 2016 16:34:03 +0000 (17:34 +0100)]
Remove gf_zeromotion_pct.

The use of this value is preventing rate adjustment on clips
or sections that have very little motion but high noise and
this can give rise to some sections with massive overshoot.

Change-Id: I9a65c7c1148dc5d3a7d8b23e50fc1733f3661621

8 years agovpx_dsp,add_noise: remove mmx implementation
James Zern [Fri, 3 Jun 2016 06:51:22 +0000 (23:51 -0700)]
vpx_dsp,add_noise: remove mmx implementation

a sse2 version exists, this is a reasonable modern baseline.

Change-Id: If31d36c8412d25b53f41b4a93cf02f46802c0c33

8 years agovpx_dsp: remove mmx variance implementations
James Zern [Fri, 3 Jun 2016 06:46:16 +0000 (23:46 -0700)]
vpx_dsp: remove mmx variance implementations

there are sse2 equivalents for all remaining variance implementations

Change-Id: I10b947e73fc0067688181f819b59e47966bec3d2

8 years agoMerge "ivfdec: tolerate invalid framerates"
James Zern [Fri, 3 Jun 2016 03:15:00 +0000 (03:15 +0000)]
Merge "ivfdec: tolerate invalid framerates"

8 years agovp9: Fix valgrind failure for short circuit on low temporal vaiance block.
JackyChen [Thu, 2 Jun 2016 22:41:58 +0000 (15:41 -0700)]
vp9: Fix valgrind failure for short circuit on low temporal vaiance block.

Add check for actual split before using the variance of the split.

Change-Id: If0f93248be0b16d17738675d16c90516054dad2b

8 years agoSlow pshufb removal in 3 intra prediction functions.
Linfeng Zhang [Tue, 24 May 2016 21:32:49 +0000 (14:32 -0700)]
Slow pshufb removal in 3 intra prediction functions.

Replaced vpx_d45_predictor_4x4_ssse3(), vpx_d45_predictor_8x8_ssse3()
and vpx_d207_predictor_4x4_ssse3() with
created vpx_d45_predictor_4x4_sse2(), vpx_d45_predictor_8x8_sse2()
and vpx_d207_predictor_4x4_sse2() respectively.
It's mostly neutral or slightly worse than ssse3 in good cases and
better than ssse3 in the bad cases (but still worse than using the mmx
regs).

Change-Id: Ib0237ceb71d2c57b8a93fd3170330cfed9d56bdd

8 years agoDisable short circuit feature for low temporal variance.
JackyChen [Thu, 2 Jun 2016 16:41:52 +0000 (09:41 -0700)]
Disable short circuit feature for low temporal variance.

The featrue fails in libvpx_unit_tests-valgrind. Will re-enable it after
fixing the issue.

Change-Id: I8ba132f04e98f4615b31fbff2097eda83c5e42bc

8 years agoMerge "Update filter_selectively_vert_row2()"
Linfeng Zhang [Thu, 2 Jun 2016 16:22:21 +0000 (16:22 +0000)]
Merge "Update filter_selectively_vert_row2()"

8 years agoMerge "firstpass.c: fix an UBSAN/IOC error"
Yaowu Xu [Thu, 2 Jun 2016 16:20:06 +0000 (16:20 +0000)]
Merge "firstpass.c: fix an UBSAN/IOC error"

8 years agofirstpass.c: fix an UBSAN/IOC error
Yaowu Xu [Wed, 1 Jun 2016 00:06:43 +0000 (17:06 -0700)]
firstpass.c: fix an UBSAN/IOC error

Change-Id: I579286e6741b689ae4281a35beb7b8f95c3ffce5

8 years agovp9: Skip some modes when variance is low for big blocks, for 1 pass real-time.
jackychen [Fri, 20 May 2016 20:45:46 +0000 (13:45 -0700)]
vp9: Skip some modes when variance is low for big blocks, for 1 pass real-time.

Skip intra-mode and some inter-modes (newmv, nearmv, nearestmv) for
golden frame if the variance got from choose_partitioning is very low.
Only for 1 pass real-time CBR mode and bsize >= 32x32, it has ~2.5%
speed up with less than 0.1% PSNR drop for rtc test set. Don't see
visual regression.

Change-Id: I70efbc95a1007231ae36f02c5b2fbf6cd35077ad

8 years agoUpdate filter_selectively_vert_row2()
Linfeng Zhang [Tue, 31 May 2016 17:38:01 +0000 (10:38 -0700)]
Update filter_selectively_vert_row2()

Reduce operations and jumps. perf shows CPU time reduced from 1.9% to
1.6% when decoding fdJc1_IBKJA.248.webm on Xeon E5.
Will apply the changes to vp10 after code review.

Change-Id: I9351509922855d8896ddef1ed093b3ca12619a61

8 years agoMerge "vp9: Skip computation of best_sad for newmv, unless needed."
Marco Paniconi [Wed, 1 Jun 2016 17:37:29 +0000 (17:37 +0000)]
Merge "vp9: Skip computation of best_sad for newmv, unless needed."

8 years agoFix UBSAN/IOC errors
Yaowu Xu [Tue, 31 May 2016 23:54:58 +0000 (16:54 -0700)]
Fix UBSAN/IOC errors

1. test/dct16x16_test.cc
2. test/dct32x32_test.cc
3. test/fdct8x8_test.cc

BUG=webm:1225

Change-Id: I9c9315fbd65ddb3b44f688e01ba265fd22192198

8 years agoFix VP8 encoder UBSAN/IOC errors
Yaowu Xu [Tue, 31 May 2016 23:41:49 +0000 (16:41 -0700)]
Fix VP8 encoder UBSAN/IOC errors

1. vp8/decoder/dboolhuff.c
2. vp8/decoder/dboolhuff.h
3. vp8/encoder/bitstream.c
4. vp8/encoder/boolhuff.h
5. vp8/encoder/rdopt.c

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

Change-Id: I5d315d63fd7aeaee6f3bd79178e593f3db38a6b1

8 years agoivfdec: tolerate invalid framerates
James Zern [Wed, 1 Jun 2016 00:37:59 +0000 (17:37 -0700)]
ivfdec: tolerate invalid framerates

default invalid framerates to 30, quiets warnings in corrupt / fuzzed
files

Change-Id: Ib10d2b67df83cb6f9ed1cd6ef8e0e637aa7099ff

8 years agovariance_avx2.c: UBSAN/IOC fix
Yaowu Xu [Tue, 31 May 2016 23:17:42 +0000 (16:17 -0700)]
variance_avx2.c: UBSAN/IOC fix

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

Change-Id: Ifb3bedf9b4e1b007b21aebaa4beb9ba50424efef

8 years agovp9: Skip computation of best_sad for newmv, unless needed.
Marco [Tue, 31 May 2016 16:37:26 +0000 (09:37 -0700)]
vp9: Skip computation of best_sad for newmv, unless needed.

For non-rd pickmode:
best_pred_sad, computed for NEWMV-last, is only used for
skipping golden non-zero modes. Add condition to avoid this
computation if not used (i.e, if golden nonzero modes are not used).

And remove code for computing best_pred_sad for NEWMV-golden,
since that sad is not used.

No change in behavior; small speed gain (~1%) for svc encodes.

Change-Id: Ic2cbdef6c4e9a233a57c0db0eeac8ad5fcead366

8 years agoMerge "vpx_ports/mem_ops.h: cast the lhs of bitwise shifts of 24."
Tom Finegan [Fri, 27 May 2016 18:52:04 +0000 (18:52 +0000)]
Merge "vpx_ports/mem_ops.h: cast the lhs of bitwise shifts of 24."

8 years agoMerge "acm_random,Rand9Signed: correct cast"
James Zern [Fri, 27 May 2016 18:32:05 +0000 (18:32 +0000)]
Merge "acm_random,Rand9Signed: correct cast"

8 years agoMerge "Upgrade fwht4x4_mmx() to fwht4x4_sse2() for vp9 and vp10."
Linfeng Zhang [Fri, 27 May 2016 17:51:34 +0000 (17:51 +0000)]
Merge "Upgrade fwht4x4_mmx() to fwht4x4_sse2() for vp9 and vp10."

8 years agoacm_random,Rand9Signed: correct cast
James Zern [Fri, 27 May 2016 17:33:56 +0000 (10:33 -0700)]
acm_random,Rand9Signed: correct cast

convert the random value to int16 before subtracting 256 from it; quiets
a ubsan (sanitize=integer) warning

BUG=webm:1225

Change-Id: Ibc2c5a21f30e112bd6c180f7d6a033327c38d0df

8 years agoUpgrade fwht4x4_mmx() to fwht4x4_sse2() for vp9 and vp10.
Linfeng Zhang [Tue, 17 May 2016 19:42:55 +0000 (12:42 -0700)]
Upgrade fwht4x4_mmx() to fwht4x4_sse2() for vp9 and vp10.

Function level timing test shows about 27% time saving on
a Xeon E5-2680 v2 desktop.

Rename vp9_dct_sse2.c to vp9_dct_intrin_sse2.c for vp9 and
rename dct_sse2.c to dct_intrin_sse2.c for vp10 to avoid
duplicate basenames.

Actually vp9_fwht4x4_mmx/sse2() and vp10_fwht4x4_mmx/sse2()
are identical. TODO: They should be unified later if there is
no intention to keep a duplicate.

Change-Id: I3e537b7bbd9ba417c606cd7c68c4dbbfa583f77d

8 years agovpx_ports/mem_ops.h: cast the lhs of bitwise shifts of 24.
Tom Finegan [Fri, 27 May 2016 16:16:35 +0000 (09:16 -0700)]
vpx_ports/mem_ops.h: cast the lhs of bitwise shifts of 24.

C does not allow for shifting into the sign bit of a signed
integer, and the two instances here become signed ints via
promotion. Explcitly cast them to unsigned MEM_VALUE_T to
avoid the problem.

BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=614648

Change-Id: I51165361a8c6cbb5c378cf7e4e0f4b80b3ad9a6e

8 years agoMerge "Upgrade vpx_lpf_{vertical,horizontal}_4 mmx to sse2"
Linfeng Zhang [Fri, 27 May 2016 15:47:28 +0000 (15:47 +0000)]
Merge "Upgrade vpx_lpf_{vertical,horizontal}_4 mmx to sse2"