Commit Graph

80 Commits

Author SHA1 Message Date
Marco
b71ff28a1a vp9: Small threshold adjustment to unittest BasicRateTargeting444
Due to recent change to speed >=7 from commit:219cdab.

Change-Id: I366e7750ec91119881050ff6c05849504c7959e8
2017-01-21 18:19:45 -08:00
Marco
7e3a82c384 vp9: Make the denoiser work with spatial SVC.
If enabled denoiser will only denoise the top spatial layer for now.

Added unittest for SVC with denoising.

Change-Id: Ifa373771c4ecfa208615eb163cc38f1c22c6664b
2017-01-10 17:23:58 -08:00
Marco
63a8257fb7 vp9: SVC unittests: fix to use y4m source.
Comment out check on buffer underrun, as it currently fails
on some of the svc tests.

Also cast the update of bits_in_buffer_model_, as this can
go negative now due to the buffer underrun.
This fixes the issue in #1352.

BUG=webm:1350
BUG=webm:1352

Change-Id: Ibd4ef23921daf09e5c15b000aca904aa4573599c
2017-01-03 15:29:04 -08:00
James Zern
78a24171a6 Revert "vp9: SVC unittests: fix to use y4m source."
This reverts commit f0b491a524.

This change results in unsigned integer overflows (as reported by
-fsanitize=integer) in datarate_test.cc,
for many of --gtest_filter=VP9/DatarateOnePassCbrSvc.OnePassCbrSvc*:
unsigned integer overflow: 167198 - 185560 cannot be represented in type
'unsigned long'

As the encoder didn't change, but the input with the change to
(correctly) use Y4mVideoSource, this revert is merely masking the issue.

BUG=webm:1352

Change-Id: Iecd9a6c83b3fca67c566732a5c92d36193cc2060
2016-12-23 14:18:18 -08:00
Marco
f0b491a524 vp9: SVC unittests: fix to use y4m source.
Comment out check on buffer underrun, as it currently fails
on some of the svc tests.

BUG=webm:1350

Change-Id: I73c88b800cdcc06bd2f900f7b7e2a5fd08248065
2016-12-21 22:59:35 -08:00
Marco
9ba77ed45b vp9; Fix to unitest for high noise.
Source if y4m, and fix comment.

Change-Id: I1eb84977d42dd0f9009c276b56b3fdb03949bfc2
2016-12-21 10:22:34 -08:00
Marco
3fcd595dfb vp9: Add datarate test for denoiser, for high noise case.
Also breakout the denoiser tests, as the denoiser only
runs for real-time speed >=5.

Change-Id: I921b785860c35e9d1ebfad0833673a98490186c2
2016-12-20 16:48:25 -08:00
Marco
076d4bd91a vp9: Fix to crash in svc code.
use_base_mv assumes 2x2 scaling, so fix is to shutoff
this feature unless spatial scale factors are 2.

Added svc unittest for 2 spatial layers with 5x5 scaling,
which generates the issue without this fix.

Also fix some settings in svc unittest:
let the speed setting vary (from 5 to 8), and enable static threshold.

BUG=webm:1344

Change-Id: Idfd0a6c633c21b49a0479601506302cfe974e30e
2016-12-09 08:57:09 -08:00
Marco
5778a7c9cb vp9: Fix some TODOs in svc code.
Change-Id: Ie9f441245987ade9dab38af69adf4dd1fb38ca3f
2016-12-07 13:02:48 -08:00
Marco
ff38b8dfae vp8: Add control for gf boost for 1 pass cbr.
Control already exists for vp9, adding it to vp8.
Usage is only when error_resilient is off.
Added a datarate unittest for non-zero boost.

Change-Id: I4296055ebe2f4f048e8210f344531f6486ac9e35
2016-10-19 09:43:53 -07:00
Jerome Jiang
acd21e053a VP8: Add realtime speed to datarate_test.cc
Change-Id: Ia56f0e8dfba20143be3e69666d9184dd3ca5b563
2016-10-14 17:09:27 -07:00
Marco
f5b8b473db vp8: Adjust thresholds in VP8/DatarateTestLarge tests.
Fix unit_tests_ubsan failure VP8/DatarateTestLarge.BasicBufferModel.
Failure was triggered by commit: df66f8e8.

Change-Id: I2c49e5cc24094b15063161bab27b09ec7e6f2045
2016-10-13 09:28:40 -07:00
Marco
065ba0c486 vp8: Adjust threshold on VP8/DatarateTestLarge.DenoiserOffOn.
Fix unit_tests_ubsan failure for VP8/DatarateTestLarge.DenoiserOffOn.
Failure was triggered by commit: df66f8e8.

Change-Id: I7cc5bd309e85950cfc5755e01d0eb942d9ca6984
2016-10-11 16:18:14 -07:00
Marco
dde8004716 Add datarate tests for encoder multi-threads (vp8 and vp9).
Change-Id: I7f9b23026aaee309095cc3f4724125ae319875af
2016-08-24 16:25:36 -07:00
clang-format
9c9d92ae3a test: apply clang-tidy google-readability-braces-around-statements
applied against a x86_64 configure with and without
--enable-vp9-highbitdepth

clang-tidy-3.7.1 \
  -checks='-*,google-readability-braces-around-statements' \
  -header-filter='.*' -fix
+ clang-format afterward

Change-Id: Ia2993ec64cf1eb3505d3bfb39068d9e44cfbce8d
2016-08-05 20:02:28 -07:00
James Zern
068281751c Merge "test: apply clang-format" 2016-08-04 00:27:59 +00:00
clang-format
33e40cb5db test: apply clang-format
Change-Id: I0d9ab85855eb723f653a7bb09b3d0d31dd6cfd2f
2016-07-27 01:58:52 +00:00
jackychen
8ce67d714a vp9 svc: Enable different speed setting for each spatial layer.
This change only affects 1 pass cbr svc mode.

Change-Id: If0da87bb200f7e7762755340c40c8157cc7a16ca
2016-07-25 15:11:43 -07:00
Marco
05fe0f20a6 vp9: Allow usage of lookahead for real-time, 1 pass vbr.
Allow usage of lookahead for VBR in real-time mode, for 1 pass vbr.

Current usage is for fast checking of future scene cuts/changes,
and adjusting rate control (gf interval and active_worst/target size).

Added unittests (datarate) for 1 pass vbr mode, with non-zero lag.

Added an experimental option to limit QP based on lookahead.

Overall positive gain in metrics on ytlive set:
avgPNSR/SSIM up on average ~1-3%; several clips up by 5, 7%.

Change-Id: I960d57dfc89de121c4824b9a9bf88d2814e74b56
2016-07-18 15:20:17 -07:00
James Zern
73b11ec876 datarate_test,DatarateTestLarge: normalize bits type
quiets a msvc warning:
conversion from 'const int64_t' to 'size_t', possible loss of data

Change-Id: I90a2ac6b040454dac7434fc9b63b98c42ea127b1
2016-06-23 23:29:26 -07:00
Yaowu Xu
0cb7f545ad Fix ubsan warning: test/datarate_test.cc
BUG=webm:1219

Change-Id: I48470a885cd64a60636a982cd68165c41a702306
2016-06-16 11:25:21 -07:00
Marco
75d551783d vp9: Add datarate test for 1 pass VBR mode.
Existing tests are only for CBR mode.

Change-Id: Ie3b2cd46236457748e2650901d1a347a730f38af
2016-05-25 14:20:30 -07:00
Marco
11bf7ea354 vp9-svc: Fix to frame dropping in svc mode.
Don't advance the svc frame counters on dropped frame,
since this can break the referencing scheme and lead
to a crash/assert.

Updated svc-datarate unittest to add a lower bitrate test.

Change only affects 1 pass cbr svc, with frame dropper enabled.

Change-Id: Ibb7530b7a587a9344d46898d9286fd9e2ef0779c
2016-03-09 10:15:15 -08:00
Marco
b5ab8812b5 vp9-svc unitests: Add more tests for key frame periods.
Change-Id: Iea237760b508d87dab057dd824e26d2e66fa8433
2016-03-08 10:36:16 -08:00
Marco
38e401b5da vp9-svc: Fix issues with svc with periodic key frames.
Use the superframe counter to set the key frame, and force
it to the key frame on base spatial layer only.
Also, update svc frame counters under frame dropping.

Update unittest: add specific tests with short key frame period.

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

Change-Id: I5b1c9a09253e6e5fbfce51b4cf603ae22d422b01
2016-03-02 16:59:58 -08:00
Marco
c83bcb3474 vp9-svc: Allow for 2 stage downscaling for spatial layers.
For 1 pass cbr mode: allow for two-stage 1:2 scaling
(which will use the 1:2 optimized scaler) if the spatial
layer is 1/4x1/4 of souce.

Without this change, the base layer for 3 spatial layers would
be using the non-normative scaler which is un-optimized/C code.

Change-Id: I9d73f92a4a96927d0f1d6bf75315c1e60513226a
2016-03-01 15:48:42 -08:00
Marco
41667f4ddb vp9-datarate unittests: Include coverage up to speed 8.
Change-Id: I8529cd04ea4f95d21d83f87d56d6dd882d0a5636
2016-02-29 16:18:28 -08:00
Marco
f21ff53830 vp9: Remove effective_bitrate from SVC datarate tests.
Change-Id: I1189c2403463e0aca288ba344052ba1c9cf94390
2016-02-29 13:13:32 -08:00
James Zern
4b00f0ecae datarate_test/ChangingDropFrameThresh: set kf interval
restore the value for VP9 to 9999 to satisfy the current test
expectations; without this
VP9/DatarateTestVP9Large.ChangingDropFrameThresh/8 will overshoot.

Change-Id: I88dad574ae4ab10f923579824c7347ff468c7045
2016-02-26 16:54:36 -08:00
Marco
6a23966c34 vp9-svc: Bugfix for svc in non-rd variance partition.
Reset the scale factors before build_inter_predictors.

Add datarate tests for 3 spatial layers, which exposed this issue.

Change-Id: I7f81efbe44345ecea9fdd5f639a4cca76aed3874
2016-02-26 09:24:18 -08:00
James Zern
14828e756f vp9: set kf_max_dist to a reasonable default (128)
the same as vp8, with the same reasoning from:
2a0d7b1 Reduce the default kf_max_dist to 128.

see also:
https://trac.ffmpeg.org/ticket/4904
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815673

+ restore vpxenc behavior of taking the library default rather than
  forcing 5s

This change also exposes an issue with one-pass svc in cbr mode, keep
the old default in datarate_test.cc for now.

Change-Id: Id6d1244f42490b06fefc1a7b4e12a423a1f83e88
2016-02-25 12:34:12 -08:00
James Zern
cffef113b9 tests: quiet some unused parameter warnings
Change-Id: Iff8b0d77234f78bf407676891bccad92825bfcc6
2016-02-11 19:25:48 -08:00
Marco
f5c07b6803 vp9-svc: Allow frame-dropping in svc datarate control tests.
Remove comment(s) and enable frame-dropper for tests.
Frame dropper for 1 pass svc was fixed a while ago:
https://chromium-review.googlesource.com/#/c/309230/

Change-Id: I5fd3192825b22e562db9210d3dc7b246a1799d8d
2016-01-20 14:00:42 -08:00
Marco
b0027b96ae vp9-svc: Fix to allow setting qp-max/min per spatial and temporal layer.
Change-Id: Ic0ec32c1d7f7c08c9f956592dccbfd9060b1f624
2015-11-23 10:46:34 -08:00
Marco
cb7b2a4f4b Adjust threshold for datarate frame drop test.
Current threshold is little too strict.

Change-Id: I99ec1409d095e0c2fd3b7ab398742cabcc05700b
2015-11-03 08:17:21 -08:00
Marco
c9426aaa1b Add unittest for SVC 1pass CBR mode with 4 threads.
Change-Id: I2b25d495d0dd3eedea31aa12cb908a90480f25de
2015-08-10 09:52:18 -07:00
Marco
a8c5ab2ca6 Remove ABI check for 1 pass CBR SVC.
Remove the ABI check for the controls needed for SVC 1 pass CBR mode.
Bump up the ABI version.

Change-Id: I35b79ee010e14af83c6d1e801d574deaaa2fc7eb
2015-06-03 17:43:22 -07:00
Marco
c139b81a13 Vidyo patch: Rate control for SVC, 1 pass CBR mode.
-Make Rate control work for SVC 1 pass CBR mode.
-Added temporal layering mode.
-Fixed bug in non-rd variance partition.
-Modified/updated the sample encoders (vp9_spatial_svc_encoder, vpx_temporal_svc_encoder).
-Added datarate unittest(s) for 1 pass CBR SVC.

Change-Id: Ie94b1b68a56ea1267b5087c625e5df04def2ee48
2015-06-02 07:54:13 -07:00
James Zern
18613408a3 put spatial svc behind an ABI check
this removes the CONFIG_* checks from public headers, but means
'--enable-experimental --enable-spatial-svc' builds will fail without a
local change to the ABI in vpx_encoder.h. this should be all right for
testing this experiment.

Change-Id: Ief55e7b9d1e8332cfce990275e04c29b30af0c4a
2015-03-19 12:29:16 -07:00
Marco
e38066a74d Fix crash with vp9 denoiser on.
Crash occured on very first key frame, because denoiser
temporal function was beng entered.

Updated denoiser unittest to set cpu_used from first frame,
and verified fix fixes the crash.

Change-Id: I3be1124b52846fbbe7248d2c3d6136e086c80bc1
2015-03-13 11:10:02 -07:00
Yunqing Wang
81fc5bf81c Improve skip_txfm thresholds in the non-rd mode selection
Modified the thresholds of deciding whether or not to skip
the transforms in model_rd_for_sb_y(). Used zbin[] instead
of dequant[] to be more precise. Also, modified the checking
coditions.

Rtc set borg test results (at speed 6) showed:
average PSNR gain: 0.138%, overall PSNR gain: 0.158%,
and SSIM gain: 0.177%.

The data rate test was modified slightly as suggested by
Marco.

Change-Id: Ieaf633ab77f4838cb3c45cf69065b29d55f8ae6c
2015-02-19 14:30:46 -08:00
JackyChen
7cb111b148 Unit test for turning VP8 denoiser on/off periodically.
Change-Id: Id537d1126f25c0218adcfb4d6ee641ee81a2169a
2015-01-09 14:51:06 -08:00
JackyChen
e82a3b245e Unit test for turning VP9 denoiser on/off periodically.
Change-Id: Ifd2813e8ccd8af189a8dc89b24efb6a5681714c7
2015-01-07 18:26:41 -08:00
Jingning Han
5b860e1251 Turn denoiser sensitivity on starting from kf in unit test
The denoiser sensitivity level should be set to 1 starting from
key frame. The internal function of denoiser should make the
temporal denoising operations cut off in key frame coding.

Change-Id: Id3e704a73e98e4ea801284a2cbbab2ea9c371d23
2015-01-06 10:08:43 -08:00
Jingning Han
bf758b6afa Enforce error resilient mode on in temporal svc real-time mode
This commit makes the codec automatically turn on error resilient
mode when using real-time mode for temporal scalable coding. It
fixes an enc/dec mismatch issue and re-enables the corresponding
unit test.

Change-Id: Ie1f7134e9a78ddd43e9b1555b3ee991c8a3afd0d
2014-12-02 10:53:01 -08:00
Jingning Han
65d6320cf8 Turn off temporal svc unit test in RTC setting
A hidden enc/dec mismatch bug was accidentally triggered by
https://gerrit.chromium.org/gerrit/#/c/72247/
Adaptively adjust mode test kick-off thresholds in RTC coding

This commit temporarily turns off the broken unit tests to avoid
blocking other CLs while fixing.

Change-Id: I0a0f195030321190ce10879cd833187680576367
2014-12-01 15:14:47 -08:00
JackyChen
4eece0d983 Add a conditional compilation macro to VP8 unit test.
In many tests in VP8, the denoiser is disabled. By adding this
conditional comilation macro, the unit test will not be included
when denoiser is not enabled.

Change-Id: I6edec85c996acca22aacd11161c52408be2660a3
2014-09-18 15:38:32 -07:00
JackyChen
a86e6e8358 Add unit test for VP9 denoiser.
Check basic datarate targeting for a single bitrate
when the denoiser is on.

Change-Id: Iad0e664859ffeb4ae6dd5f6dfb71a121e917e3fb
2014-09-18 11:26:08 -07:00
Marco
503792ffef Add a separate datarate test for denoiser enabled.
Change-Id: Ibc91a46d11ad9c58e340b4346ed813a1be9b404a
2014-08-27 11:31:56 -07:00
Marco
16e52fc155 Enable denoiser for vp8 datarate tests.
Keep one test, BasicBufferModel, with denoiser set off.

Change-Id: I762c2004b3adca24f677535cfa5b991108f31f01
2014-08-26 15:46:24 -07:00