Compare commits

...

1509 Commits

Author SHA1 Message Date
Yaowu Xu
bc436734bd Use consistent paramemter type
Change-Id: I2ba5c9cb7e9ac6761ac18262564182039cfaad5b
2016-08-05 16:32:48 -07:00
Yaowu Xu
7e89c102c4 vp9-highbitdepth -> vpx-highbitdepth
Change-Id: I1e90cf7ab4bb02c0ef119b0bd1596771edefedff
2016-08-05 15:41:33 -07:00
Zoe Liu
cbed16b8b3 Merge "Code refactoring on Macros related to ref frame numbers" into nextgenv2 2016-08-05 16:59:36 +00:00
Urvang Joshi
9faf9148ec Merge "Make palette code faster: replace nested for loops by a single memcpy()." into nextgenv2 2016-08-05 00:20:11 +00:00
Yaowu Xu
476e44a689 Merge "Replace variants of 'vp8' and 'vp9' with 'vpx'" into nextgenv2 2016-08-04 23:48:59 +00:00
Yaowu Xu
59589d0c4a Merge changes Ic5ddba3c,Ibe7a3248 into nextgenv2
* changes:
  Fix a number of msvc warnings
  Reduce number of frames in lossless tests
2016-08-04 23:27:35 +00:00
Yaowu Xu
fe291b647e Replace variants of 'vp8' and 'vp9' with 'vpx'
Change-Id: Id6cb96b0b15efdda63348d8bfe59fc0533c85ba1
2016-08-04 22:20:38 +00:00
Urvang Joshi
a0a23b7f0c Make palette code faster: replace nested for loops by a single memcpy().
Change-Id: Ia14df45a35c98d680822454fbb8d1763884c1852
2016-08-04 15:01:19 -07:00
Yaowu Xu
56a91f139d Fix a number of msvc warnings
Change-Id: Ic5ddba3ca0c87245617b6dbc78c0f13dc952ce8b
2016-08-04 21:42:56 +00:00
Yaowu Xu
a1b6507e2b Reduce number of frames in lossless tests
This it to reduce the time necessary for these tests.

Change-Id: Ibe7a3248a6c45baf575af85fdffcffc557dd054b
2016-08-04 14:36:29 -07:00
James Zern
6679608386 vp10_inv_txfm2d_test: normalize max_error type
quiets double -> int conversion warning

Change-Id: Ic860d187bc77e18b277eef28310feee1899cdbe6
2016-08-04 12:24:20 -07:00
James Zern
0d5ac98d1c Merge ".clang-format: disable DerivePointerAlignment" into nextgenv2 2016-08-04 19:21:38 +00:00
Yaowu Xu
2b2ee5cdf6 Merge "more cleanup of vp8 and vp9" into nextgenv2 2016-08-04 18:56:46 +00:00
Zoe Liu
1af28f0230 Code refactoring on Macros related to ref frame numbers
We have renamed following Macros to avoid name confusion:

REFS_PER_FRAME --> INTER_REFS_PER_FRAME
(= ALTREF_FRAME - LAST_FRAME + 1)
MAX_REF_FRAMES --> TOTAL_REFS_PER_FRAME
(= ALTREF_FRAME - INTRA_FRAME + 1)

INTER_REFS_PER_FRAME specifies the maximum number of reference frames
that each Inter frame may use.
TOTAL_REFS_PER_FRAME is equal to INTER_REFS_PER_FRAME + 1, which
counts the INTRA_FRAME.

Further, at the encoder side, since REF_FRAMES specifies the maximum
number of the reference frames that the encoder may store, REF_FRAMES
is usually larger than INTER_REFS_PER_FRAME. For example, in the
ext-refs experiment, REF_FRAMES == 8, which allows the encoder to
store maximum 8 reference frames in the buffer, but
INTER_REFS_PER_FRAME equals to 6, which allows each Inter frame may
use up to 6 frames out of the 8 buffered frames as its references.
Hence, in order to explore the possibility to store more reference
frames in future patches, we modified a couple of array sizes to
accomodate the case that the number of buffered reference frames is
not always equal to the number of the references that are being used
by each Inter frame.

Change-Id: I19e42ef608946cc76ebfd3e965a05f4b9b93a0b3
2016-08-04 11:21:28 -07:00
Sarah Parker
108df24d2a Merge "Adjust gm parameter computation to avoid mismatch" into nextgenv2 2016-08-03 21:42:30 +00:00
Yaowu Xu
d9e73a32fc Merge "Cherry pick from AOMedia" into nextgenv2 2016-08-03 19:25:22 +00:00
Yaowu Xu
efe198fb04 Merge "Cherry pick from AOM:" into nextgenv2 2016-08-03 19:25:17 +00:00
Yaowu Xu
a3cff08259 more cleanup of vp8 and vp9
Change-Id: Ic90ebe6136f4b75645ba699d49c0bcb3764ddccf
2016-08-03 12:20:33 -07:00
Sarah Parker
aa810c002c Adjust gm parameter computation to avoid mismatch
The gm parameters need to have WARPED_PRECISION_BITS precision
until they are written to the bitstream because functions in
reconinter use these parameters before they are written to
the bitstream. Previously, the parameters weren't being converted
to WARPED_PRECISION_BITS until they were read from the bitstream
which causes an encode/decode mismatch.

Change-Id: I31e76e9d6f7d24df21af287a72f8c01f1997304d
2016-08-03 12:20:12 -07:00
Yue Chen
0acb76d8eb Merge "Fix a bug and a function name in EXT_INTRA experiment" into nextgenv2 2016-08-03 17:04:15 +00:00
Yaowu Xu
b06147de6b Cherry pick from AOMedia
5b5fbad VP9LfSync->VP10LfSync
b752848 vp8_yv12 -> vpx_yv12
e5068cd VP9->VPX for reference frame flags

Change-Id: Ia36860499c81a5aca8cd6190e7370ec404c0df0f
2016-08-02 16:24:41 -07:00
Yue Chen
31dab60888 Fix a bug and a function name in EXT_INTRA experiment
(1) Apply ALLOW_FILTER_INTRA_MODES flag to the correct place, otherwise
there are bitstream mismatchs when it is 0.
(2) Rename pick_ext_intra_iframe() to pick_ext_intra_interframe().

Change-Id: Ic88c930de1d3f819750f0892df52bde55ae32a91
2016-08-02 16:12:49 -07:00
Yaowu Xu
8bf837f153 Cherry pick from AOM:
68e7e4d0 Remove VP9_CAP_POSTPROC
0738390c Remove vp9_temporal denoise
b89861a4 Remove vp9-postproc

Change-Id: I4ecaa0ac83a519c8174a494378fc23df610ff2a8
2016-08-02 15:29:50 -07:00
Yaowu Xu
134710af32 Disable tests not applicable to VP10
As VP10 does not support multiple layers yet, we disable the ported
tests from VP9.

Change-Id: Ib7577c27e402ede481213b7a64ebee7576a025a5
2016-08-01 13:32:40 -07:00
Hui Su
0594c7f5b1 Merge "Use all possible intra ref pixels for blocks on frame boundary" into nextgenv2 2016-08-01 17:29:09 +00:00
Yaowu Xu
de42ab22bd Merge "Cherry pick renaming changes from AOMedia branch" into nextgenv2 2016-08-01 17:16:07 +00:00
Yaowu Xu
22fda38fa4 Merge "Rename files with vp9_ prefix" into nextgenv2 2016-08-01 17:15:50 +00:00
Yaowu Xu
d4c4724090 Cherry pick renaming changes from AOMedia branch
Manually cherry-picked the following changes:
8c8d16de vp9 -> vpx in names
75b57d39 VP9_ -> VPX_ in function names
761a7088 VP9_INTERP_EXTEND -> VPX_INTERP_EXTEND
4273a52c VP9->VPX in border pixel macros
03568c31 VP9_FRAME_MARKER -> VPX_FRAME_MARKER
2334f51d VP9->VPX in fdct function names

Change-Id: Icc18dbf4b416dd0fa21033b3e19ab8a47c893508
2016-07-29 13:31:32 -07:00
hui su
a4daf360ca Use all possible intra ref pixels for blocks on frame boundary
Tested on lowres and midres, performance impact is neutral.

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

Change-Id: Idaccaf7da7b460e6201efd436c084be66b5d4ebd
2016-07-29 10:06:50 -07:00
Yaowu Xu
ac86d3d668 Merge "More vp8/vp9 clean up" into nextgenv2 2016-07-29 16:50:33 +00:00
Yaowu Xu
5eee90730b Rename files with vp9_ prefix
Change-Id: I9c51ae3a2af698efe32288b807f881385e19822b
2016-07-29 16:45:08 +00:00
Yaowu Xu
3fa28d51af More vp8/vp9 clean up
Change-Id: I8101de20e873c19d03c7fd2977bc22003e395807
2016-07-28 18:22:47 -07:00
hui su
f67ff4a5b7 Fix a missing space
Change-Id: I6a9ab351012b731308d6b4fc78c09744c6afb61a
2016-07-28 09:55:17 -07:00
Jingning Han
3ecf31dbdf Merge "Separate frame context index for different frame types" into nextgenv2 2016-07-28 16:39:45 +00:00
Yaowu Xu
3bd709fafe Remove vp8, vp9 folders
Change-Id: I09b8acd22d031ece52e1fee18b998349bf1cf06b
2016-07-28 14:33:21 +00:00
Jingning Han
8915eb8e9a Separate frame context index for different frame types
This commit makes the encoder to use different frame context index
for different frame types. In the baseline setting, it sets the
frame context index of the overlay frame to be different from other
regular inter frames. In the ext-refs setting, it further allows
the backward reference frame to use a different index.

It improves the compression performance for both settings.

Baseline
lowres  0.12%

ext-refs
lowres  0.50%
midres  0.56%

Change-Id: I7c63ddec9fc296c56a86353cf2c661a740b97a97
2016-07-27 15:35:15 -07:00
James Zern
725f7f9d57 .clang-format: disable DerivePointerAlignment
everything outside of third_party should follow 'PointerAlignment:
right' i.e., associate the '*' with the variable

+ add a note about the clang-format that generated this file

Change-Id: I13e3f4f5fb6e22a8fa7fc3d06879c995b7c41a39
(cherry picked from commit e4290800b21478a3f9548c58b4f15c5ba5393073)
2016-07-26 19:51:45 -07:00
Hui Su
b124b243d4 Merge "ext-intra: squeeze the derivative table" into nextgenv2 2016-07-26 21:53:50 +00:00
hui su
831e009970 ext-intra: squeeze the derivative table
Reduce its size form 270x2 to 90.

Change-Id: Icaacc4258e43cdc19c6f06598fee17c3dd06d7e9
2016-07-26 12:58:22 -07:00
Yaowu Xu
6d6291b119 Merge "Fix compilation error under Clang 4.0." into nextgenv2 2016-07-26 17:21:58 +00:00
Yaowu Xu
077168bb16 Merge "MinArfFreqTest: Don't leak video on failure." into nextgenv2 2016-07-26 17:21:46 +00:00
Yaowu Xu
d8f83fcfd6 Merge "blockiness_test: fix implicit float conversion" into nextgenv2 2016-07-26 17:21:37 +00:00
Yaowu Xu
73eb764a35 Merge "resize_test: fix implicit float->int conversion" into nextgenv2 2016-07-26 17:21:30 +00:00
Yaowu Xu
8e3766f967 Merge "Add VPX_SWAP macro" into nextgenv2 2016-07-26 17:21:22 +00:00
Yaowu Xu
abb842d45c Merge "Make test encoder test driver less likely to leak on failure." into nextgenv2 2016-07-26 17:21:05 +00:00
Yunqing Wang
2cd670d1c8 Merge "Combine vpxcx_set_ref example for VP9 and VP10" into nextgenv2 2016-07-26 04:16:21 +00:00
Ivan Krasin
eb66904d7c Fix compilation error under Clang 4.0.
The LLVM trunk has reached 4.0 and now __clang_major__ is not enough
to distinguish between old XCode Clang and the new 'real' Clang.
Using __apple_build_version__ allows to make this distinction.

BUG=chromium:631144

Change-Id: I0b6e46fddfe4f409c7b7e558bda34872e60ee2d9
2016-07-26 04:12:08 +00:00
Alex Converse
12ca90d383 MinArfFreqTest: Don't leak video on failure.
Change-Id: I250379f0ac8d4929c9032e7343290e2980fc2e77
2016-07-26 04:11:56 +00:00
James Zern
74e230336f blockiness_test: fix implicit float conversion
float->int as reported by -Wfloat-conversion

Change-Id: Icb0ecb9e2d54edb95813d9f2de34cb6c27b63cbd
(cherry picked from commit 5e2791b54da066cc8543c066813373c9274ff53f)
2016-07-26 04:11:46 +00:00
James Zern
60be793eb6 resize_test: fix implicit float->int conversion
Change-Id: I1efc16fa158740a06da719a1ea90c6dd6a182bb4
(cherry picked from commit 325bdddc38ad15cf7dd2bc618461a13cfb006812)
2016-07-26 04:11:37 +00:00
Yury Gitman
a8de3c0c89 Add VPX_SWAP macro
Change-Id: I60e233eddef238ad918183392794084673f27d2d
2016-07-26 04:08:06 +00:00
Alex Converse
1c1bc94899 Make test encoder test driver less likely to leak on failure.
Individual tests still need to be updated.

Change-Id: Ic433d0f742e13560b136f136b72b2a9973970d78
2016-07-26 04:07:42 +00:00
James Zern
e0c265e4cb y4minput.c: correct empty loop formatting
prefer {}s over ';'

Change-Id: I563fc82717e1deb4f42a40e03dca318c6adaa0c1
2016-07-26 04:05:00 +00:00
James Zern
57303cb783 build/make/Makefile: add a 'test_*' default target
allows 'make test_libvpx', etc. some reworking of the makefiles would be
needed to avoid hard coding targets here.

Change-Id: I18982dbf691e7d36ab8bcf5934bab9340687b061
(cherry picked from commit 25085a6ac21fc8e2341b92e2f1f14d5a7fef30c6)
2016-07-26 04:04:28 +00:00
James Zern
ec53ba7dad build/make/Makefile: remove default suffix rules
Change-Id: I15c8976c6478bf75ec617398f49461b310ab7569
2016-07-26 04:02:58 +00:00
Yaowu Xu
3a9e8797c0 Merge "take II: variance_test partial clean-up" into nextgenv2 2016-07-26 04:02:37 +00:00
skal
8dbbcda9c7 take II: variance_test partial clean-up
remove some (but not all yet!) tuple mis-use, and revamp the code a lot.
Factorize some common chores into MainTestClass.

Change-Id: Id37b7330eebe80d19b9d12a454f24ff9be6b1116
2016-07-25 18:01:05 -07:00
Yunqing Wang
2a5a3f6bed Combine vpxcx_set_ref example for VP9 and VP10
Modified the example so that the test script worked correctly. Also
included minor fixes.

Change-Id: If97525dd9b85004a07e91c384132eadae35cdbf8
2016-07-25 15:09:13 -07:00
Yaowu Xu
230c24caaf Merge "inline->INLINE: vpx_dsp/x86/blend_a64_vmask_sse4.c" into nextgenv2 2016-07-25 20:48:53 +00:00
Yunqing Wang
464724c4d2 Merge "Adjust adaptive_rd_thresh speed feature" into nextgenv2 2016-07-25 18:53:28 +00:00
Yaowu Xu
53fb766d2a inline->INLINE: vpx_dsp/x86/blend_a64_vmask_sse4.c
This fixes the build using MSVC.

Change-Id: I7788e28fd4f0c6ff3d405c4b4a2ff59eda3ba8b6
2016-07-25 10:43:12 -07:00
James Zern
3f5a2a8ee2 vp10/ratectrl.c: fix implicit float conversion
float->int as reported by -Wfloat-conversion

Change-Id: I3c55990821d922bda7a7600c00ae8d5dcc3cee94
2016-07-22 18:08:23 -07:00
James Zern
d2fa9fe853 rd_pick_palette_intra_sbuv: fix implicit float conv
float->int as reported by -Wfloat-conversion

Change-Id: I9e3d6ce9dbb0689f214afc8d5950f209275e883d
2016-07-22 18:08:23 -07:00
Sarah Parker
d2e11e9705 Fix compiler errors in warped_motion.c
A few functions and variables were named incorrectly

Change-Id: Ib32fa459c51b9e9aad8bb107e1b689a96d98b368
2016-07-22 15:26:28 -07:00
James Zern
19a95f0e07 Merge "Restore vp10_default_scan_orders[]" into nextgenv2 2016-07-22 22:24:58 +00:00
Yunqing Wang
b171dcb1ee Adjust adaptive_rd_thresh speed feature
Set adaptive_rd_thresh to 0 at speed 0. This allows a thorough mode
search, and eliminates a blocking artifact seen in an encoder test.

Borg test:
1. lowres
Overall PSNR: -0.135%; SSIM: -0.293%;
2. hdres
Overall PSNR: -0.122%; SSIM: -0.208%;
Encoder speed tests: 2% - 6% slower.

Change-Id: Ie7601cb8824df8f6f2ae0b2942bd938600f76990
2016-07-22 15:13:04 -07:00
Sarah Parker
da30900381 Restore vp10_default_scan_orders[]
vp10_default_scan_orders was removed in:
e5848de Rectangular transforms 4x8 & 8x4
This fixes compiler error in vp10_quantize_test.cc
Change-Id: I1b8a637e011f9426c3b41e61e00e3babc80defba
2016-07-22 13:39:40 -07:00
James Zern
e96c20b14d add .clang-format, based on Google style
derived from clang-format 3.7.1; same as used in libaom

Change-Id: I8ea915a41d1f2ea3b0d4e4dab9ebc808e9116f11
2016-07-22 12:14:42 -07:00
Yaowu Xu
44aac61c13 Add and remove explicit type conversions
Change-Id: I8b791fda7c64a0363549add99dc9fcae3b29beae
2016-07-22 10:04:06 -07:00
Yaowu Xu
3826383ca1 Fix compiling issues
Change-Id: I530348b12a1c039842ce4e33d21046fe63878f19
2016-07-22 09:43:22 -07:00
Sarah Parker
0ea035f8b7 Merge "Add affine model to global motion" into nextgenv2 2016-07-21 23:17:33 +00:00
Debargha Mukherjee
a7cfdd9457 Merge "Rectangular transforms 4x8 & 8x4" into nextgenv2 2016-07-21 21:54:12 +00:00
Sarah Parker
e9bd26b826 Add affine model to global motion
Change-Id: I9cd355a3ea344ef66a61028efa25d94f54e7e2bd
2016-07-21 14:50:18 -07:00
Debargha Mukherjee
e5848dea5a Rectangular transforms 4x8 & 8x4
Added a new expt rect-tx to be used in conjunction with ext-tx.
[rect-tx is a temporary config flag and will eventually be
merged into ext-tx once it works correctly with all other
experiments].

Added 4x8 and 8x4 tranforms for use initially with rectangular
sub8x8 y blocks as part of this experiment.

There is about a -0.2% BDRATE improvement on lowres, others pending.

When var-tx is on rectangular transforms are currently not used.
That will be enabled in a subsequent patch.

Change-Id: Iaf3f88ede2740ffe6a0ffb1ef5fc01a16cd0283a
2016-07-21 10:46:41 -07:00
Yaowu Xu
ff3f35c16c Merge "Cleanup x86inc leftovers" into nextgenv2 2016-07-21 02:51:27 +00:00
Yi Luo
f9c01c7b76 Merge "HBD fast path quantization speed improvement" into nextgenv2 2016-07-20 22:48:52 +00:00
Yi Luo
b2663a8a67 HBD fast path quantization speed improvement
- HBD encoder speed improvement (SSE4.1):
  Enable CONFIG_VP9_HIGHBITDEPTH, on Xeon E5-2680,
  50 frames, park_joy_1080p, 12-bit,
  Encoding time reduces from 4846481 to 4177471 (ms)
- Add unit test to verify bit-exact and EOB calculation

Change-Id: I08e8ef3549ddad5ab36d86e78557df3b288537ea
2016-07-20 14:11:10 -07:00
Yaowu Xu
dec16abf7f Cleanup x86inc leftovers
Change-Id: I732d6942d56042a79c4259f775a6045fa95fbeff
2016-07-20 12:32:19 -07:00
Pascal Massimino
c03268b4b5 make signatures match for vp10_init_plane_quantizers
Change-Id: I1efbc91d0ca9183fe34692315307c00c4b346e73
2016-07-20 06:27:36 -07:00
Sarah Parker
0be4d3b11f Merge "Change order of warped motion parameters" into nextgenv2 2016-07-19 21:27:59 +00:00
Zoe Liu
054689b2bf A small refactor on the rate controller
Change-Id: Ie39e16de2457dd201121c62967e4ddaf5a05c33a
2016-07-19 13:55:14 -07:00
James Zern
95fef21468 Merge "fix vp10_convolve() signatures" into nextgenv2 2016-07-19 19:53:08 +00:00
sarahparker
78ea3b3e3e Change order of warped motion parameters
This makes it easier to interface between global motion and warped motion

Change-Id: I850e0a383969a1973f03fb207f100713cda6bb51
2016-07-19 11:04:29 -07:00
Hui Su
096d8ace8e Merge "Extra round of subpel MV search around second best full-pixel MV" into nextgenv2 2016-07-19 16:55:11 +00:00
Wei-ting Lin
3c13124e9b Merge "Allow OVERLAY frames to use the show_exsiting_frame flag" into nextgenv2 2016-07-19 04:28:08 +00:00
Sarah Parker
5fa46c0b60 Add global motion parameters to compressed header
Currently nothing is implemented to compute GM parameters, this
just adds the capability to send them in the bitstream if they
were computed. Still need to implement the reconstruction
based on the parameters in reconinter.

Change-Id: I72aea3c6a9de9f5a40f96da76c82b54a52781fe2
2016-07-18 17:24:07 -07:00
Wei-ting Lin
ccc9e7cfc6 Allow OVERLAY frames to use the show_exsiting_frame flag
ARF with zero strength temporal filter can be reused by setting the
show_existing_frame = 1, and in this case, there is no need to
refresh the reference frame buffer. However, we used the flag
"refresh_golden_frame" as the identifier for the starting point of a gf
group.

A new flags "is_arf_filter_off" is used to record if the filter with
strengrh zero is used.

Change-Id: I25971a760f6e1638d5147fe30488c48125512b1a
2016-07-18 17:15:33 -07:00
Yaowu Xu
681ba36414 Merge "Merge changes from libvpx/master by cherry-pick" into nextgenv2 2016-07-18 22:43:40 +00:00
Sarah Parker
e03af51203 Merge "Add buf0, width, height fields to buf_2d" into nextgenv2 2016-07-18 22:40:37 +00:00
Jingning Han
a555207b20 Merge "Align the quantizers for inter/inter modes in the first pass coding" into nextgenv2 2016-07-18 21:54:05 +00:00
hui su
9a4702417a Extra round of subpel MV search around second best full-pixel MV
Keep track of the best and second best full pixel motion vector
candidates, and do subpel search around both of them.

Compression improvement:
lowres 0.22%   midres 0.23%   hdres 0.18%

No noticeable encoding speed changes observed on lowres test clips.

Change-Id: I5f4df2a03d1db061cfdfdba6138b27e9ea91f089
2016-07-18 12:25:24 -07:00
Zoe Liu
e7869b7168 Correct the experiment names for ext-refs
Change-Id: I83a2b22d12e4573453e2ad866c7ceb430ff062c6
2016-07-18 11:28:31 -07:00
Sarah Parker
166c3250a3 Add buf0, width, height fields to buf_2d
These are needed for the warping function in the global motion
experiment.

Change-Id: Iaab176d0c0b90f6b938e2bac48b24c07e87e3cd9
2016-07-18 11:04:56 -07:00
Johann
2967bf355e Merge changes from libvpx/master by cherry-pick
This commit bring all up-to-date changes from master that are
applicable to nextgenv2. Due to the remove VP10 code in master,
we had to cherry pick the following commits to get those changes:

Add default flags for arm64/armv8 builds

Allows building simple targets with sane default flags.

For example, using the Android arm64 toolchain from the NDK:
https://developer.android.com/ndk/guides/standalone_toolchain.html
./build/tools/make-standalone-toolchain.sh --arch=arm64 \
  --platform=android-24 --install-dir=/tmp/arm64
CROSS=/tmp/arm64/bin/aarch64-linux-android- \
  ~/libvpx/configure --target=arm64-linux-gcc --disable-multithread

BUG=webm:1143

vpx_lpf_horizontal_4_sse2: Remove dead load.

Change-Id: I51026c52baa1f0881fcd5b68e1fdf08a2dc0916e

Fail early when android target does not include --sdk-path

Change-Id: I07e7e63476a2e32e3aae123abdee8b7bbbdc6a8c

configure: clean up var style and set_all usage

Use quotes whenever possible and {} always for variables.

Replace multiple set_all calls with *able_feature().

Conflicts:
	build/make/configure.sh

vp9-svc: Remove some unneeded code/comment.

datarate_test,DatarateTestLarge: normalize bits type

quiets a msvc warning:
conversion from 'const int64_t' to 'size_t', possible loss of data

mips added p6600 cpu support

Removed -funroll-loops

psnr.c: use int64_t for sum of differences

Since the values can be negative.

*.asm: normalize label format

add a trailing ':', though it's optional with the tools we support, it's
more common to use it to mark a label. this also quiets the
orphan-labels warning with nasm/yasm.

BUG=b/29583530

Prevent negative variance

Due to rounding, hbd variance may become negative. This commit put in
check and clamp of negative values to 0.

configure: remove old visual studio support (<2010)

BUG=b/29583530

Conflicts:
	configure

configure: restore vs_version variable

inadvertently lost in the final patchset of:
078dff7 configure: remove old visual studio support (<2010)

this prevents an empty CONFIG_VS_VERSION and avoids make failure

Require x86inc.asm

Force enable x86inc.asm when building for x86. Previously there were
compatibility issues so a flag was added to simplify disabling this
code.

The known issues have been resolved and x86inc.asm is the preferred
abstraction layer (over x86_abi_support.asm).

BUG=b:29583530

convolve_test: fix byte offsets in hbd build

CONVERT_TO_BYTEPTR(x) was corrected in:
003a9d2 Port metric computation changes from nextgenv2
to use the more common (x) within the expansion. offsets should occur
after converting the pointer to the desired type.

+ factorized some common expressions

Conflicts:
	test/convolve_test.cc

vpx_dsp: remove x86inc.asm distinction

BUG=b:29583530

Conflicts:
	vpx_dsp/vpx_dsp.mk
	vpx_dsp/vpx_dsp_rtcd_defs.pl
	vpx_dsp/x86/highbd_variance_sse2.c
	vpx_dsp/x86/variance_sse2.c

test: remove x86inc.asm distinction

BUG=b:29583530

Conflicts:
	test/vp9_subtract_test.cc

configure: remove x86inc.asm distinction

BUG=b:29583530

Change-Id: I59a1192142e89a6a36b906f65a491a734e603617

Update vpx subpixel 1d filter ssse3 asm

Speed test shows the new vertical filters have degradation on Celeron
Chromebook. Added "X86_SUBPIX_VFILTER_PREFER_SLOW_CELERON" to control
the vertical filters activated code. Now just simply active the code
without degradation on Celeron. Later there should be 2 set of vertical
filters ssse3 functions, and let jump table to choose based on CPU type.

improve vpx_filter_block1d* based on replace paddsw+psrlw to pmulhrsw

Make set_reference control API work in VP9

Moved the API patch from NextGenv2. An example was included.
To try it, for example, run the following command:
$ examples/vpx_cx_set_ref vp9 352 288 in.yuv out.ivf 4 30

Conflicts:
	examples.mk
	examples/vpx_cx_set_ref.c
	test/cx_set_ref.sh
	vp9/decoder/vp9_decoder.c

deblock filter : moved from vp8 code branch

The deblocking filters used in vp8 have been moved to vpx_dsp for
use by both vp8 and vp9.

vpx_thread.[hc]: update webp source reference

+ drop the blob hash, the updated reference will be updated in the
commit message

BUG=b/29583578

vpx_thread: use native windows cond var if available

BUG=b/29583578

original webp change:

commit 110ad5835ecd66995d0e7f66dca1b90dea595f5a
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 19:49:58 2015 -0800

    thread: use native windows cond var if available

    Vista / Server 2008 and up. no speed difference observed.

100644 blob 4fc372b7bc6980a9ed3618c8cce5b67ed7b0f412 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

vpx_thread: use InitializeCriticalSectionEx if available

BUG=b/29583578

original webp change:

commit 63fadc9ffacc77d4617526a50c696d21d558a70b
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:38:46 2015 -0800

    thread: use InitializeCriticalSectionEx if available

    Windows Vista / Server 2008 and up

100644 blob f84207d89b3a6bb98bfe8f3fa55cad72dfd061ff src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

vpx_thread: use WaitForSingleObjectEx if available

BUG=b/29583578

original webp change:

commit 0fd0e12bfe83f16ce4f1c038b251ccbc13c62ac2
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:40:26 2015 -0800

    thread: use WaitForSingleObjectEx if available

    Windows XP and up

100644 blob d58f74e5523dbc985fc531cf5f0833f1e9157cf0 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

vpx_thread: use CreateThread for windows phone

BUG=b/29583578

original webp change:

commit d2afe974f9d751de144ef09d31255aea13b442c0
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:41:26 2015 -0800

    thread: use CreateThread for windows phone

    _beginthreadex is unavailable for winrt/uwp

    Change-Id: Ie7412a568278ac67f0047f1764e2521193d74d4d

100644 blob 93f7622797f05f6acc1126e8296c481d276e4047 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

vp9_postproc.c missing extern.

BUG=webm:1256

deblock: missing const on extern const.

postproc - move filling of noise buffer to vpx_dsp.

Fix encoder crashes for odd size input

clean-up vp9_intrapred_test

remove tuple and overkill VP9IntraPredBase class.

postproc: noise style fixes.

gtest-all.cc: quiet an unused variable warning

under windows / mingw builds

vp9_intrapred_test: follow-up cleanup

address few comments from ce050afaf3e288895c3bee4160336e2d2133b6ea

Change-Id: I3eece7efa9335f4210303993ef6c1857ad5c29c8
2016-07-18 10:31:10 -07:00
Jingning Han
2ad40b89b3 Align the quantizers for inter/inter modes in the first pass coding
Use regular extended zero bin quantizer for both inter and intra
modes in the first pass. This doesn't affect lowres and midres
significantly, but would bring back 0.9% coding gains for hdres.

Change-Id: Ifa5977fa7b141fc5be595c0f3a4fc81a93f6606f
2016-07-18 10:16:03 -07:00
skal
87c2db8296 fix vp10_convolve() signatures
fortunately, the call site was calling the function with
the correct parameter order.

Change-Id: Ia48099c18288a2416c8b9a7062d2b8d417fd07df
2016-07-18 15:35:18 +00:00
Yaowu Xu
06c297bd1c Merge "Merge branch 'master' into nextgenv2" into nextgenv2 2016-07-15 04:45:53 +00:00
Yaowu Xu
6fe07a207b Merge branch 'master' into nextgenv2
Change-Id: Ia3c0f2103fd997613d9f16156795028f89f63265
2016-07-14 16:05:48 -07:00
Sarah Parker
010d4a8a93 Merge "Add new_quant quantization in rdopt for 4x4 blocks and intra" into nextgenv2 2016-07-14 22:15:33 +00:00
Debargha Mukherjee
5f8ea94c1f Remove unused zcoeff_blk
from PICK_MODE_CONTEXT and MACROBLOCK

Change-Id: I42f98ce51871948244bdcaaaeb3d0191622116ae
2016-07-14 12:36:03 -07:00
Pascal Massimino
b90dbc3da9 Merge "Fix highbd obmc_variance unit test" into nextgenv2 2016-07-14 18:59:38 +00:00
Sarah Parker
a6aed6e4b3 Add new_quant quantization in rdopt for 4x4 blocks and intra
Originally the uniform quantization function was not being
replaced with the new_quant version in rdopt when new_quant
is turned on. This fixes the bug.

Change-Id: I593793bb909e1e1a6f89544eeca6783fe0576f25
2016-07-14 11:25:13 -07:00
Jingning Han
a387b19619 Fix highbd obmc_variance unit test
Fix the compiling errors in highbd obmc_variance unit test.

Change-Id: Id1bdfd50aeaff996e54067d5e9b369a5fd2d87a8
2016-07-14 10:12:03 -07:00
Hui Su
0c68db43ea Merge "Refactor codes about motion search" into nextgenv2 2016-07-14 00:13:47 +00:00
Jingning Han
75b3224a42 Merge "Fix highbd inter prediction filter sse4 overwriting issue" into nextgenv2 2016-07-13 21:35:29 +00:00
Jingning Han
edbbce8e61 Fix highbd inter prediction filter sse4 overwriting issue
Properly handle the case where the height is an integer multiple
of 4.

Change-Id: I11ac188c13f78db20902e2e333c60ce76ce837c5
2016-07-13 12:51:02 -07:00
Yue Chen
f2b34c3ad8 Merge "Optimize and cleanup obmc predictor and rd search." into nextgenv2 2016-07-13 18:40:49 +00:00
hui su
581636d767 Refactor codes about motion search
1. Add "best_mv" in MACROBLOCK to store the best motion vector
during motion search, so that we don't need to pass its pointer
to various motion search functions.

2. Declare some functions as static when possible.

3. Fix some indents.

Change-Id: I0778146c0866cbc55e245988c59222577ea8260e
2016-07-13 10:12:37 -07:00
Geza Lore
4c4f04ac11 Optimize and cleanup obmc predictor and rd search.
Use vpx_blend_a64_hmask and vpx_blend_a64_vmask to speed up
computing the obmc predictor. Clean up calc_target_weighted_pred.

Encoder speedup: 1.3%
Decoder speedup: 6.5%

Change-Id: I0c774fe53d22399e92a10d1daf3af0010d88d2c5
2016-07-13 16:54:20 +00:00
Geza Lore
ebc2d34cd9 Add SSE4.1 vpx_obmc_variance* implementations and cosmetics
Speedup for these functions: 4x
Also include some cosmetic changes to SAD functions

Change-Id: I344c32c795492507ae08742f52d035a13f583799
2016-07-12 21:04:46 -07:00
Pascal Massimino
6de0e97d97 Merge "Clean up FunctionEquivalenceTest." into nextgenv2 2016-07-13 03:09:52 +00:00
Geza Lore
a3f7ddc347 Clean up FunctionEquivalenceTest.
remove use of tuple in favor of struct.

Change-Id: If3b1aa5c2fc3cfe1446fff7a8fd270f2ca85fedf
2016-07-12 17:01:19 -07:00
Aamir Anis
15aaa601bd Merge "Fix for loop filter selection procedure" into nextgenv2 2016-07-12 23:56:37 +00:00
Aamir Anis
8575709f97 Fix for loop filter selection procedure
Fixed best error reported by loop filter selection, this value is used
during loop restoration to pick best mode. Baseline remains unchanged,
change in BDRate for loop restoration experiment:
-0.628 -> -0.625 for lowres,
-1.262 -> -1.283 for highres.

Change-Id: I69ef1608bc232b250ac46f59e31fdbed1a999dcd
2016-07-12 15:01:07 -07:00
Yi Luo
fde48c980a Merge "HBD convolution filtering (10/12 taps) SSE4.1 optimization" into nextgenv2 2016-07-12 19:28:48 +00:00
Yi Luo
8cacca73bf HBD convolution filtering (10/12 taps) SSE4.1 optimization
- For experiment EXT_INTERP under high bit depth.
- Add unit test to verify bit-exact.
- Speed performance improvement:
  On Xeon E5-2680, park_joy_1080p_12.y4m, 50 frames, encoding time
  drops from 6682503 ms to 5390270 ms.

Change-Id: Iea4debf5414f3accf1eb5672abeab56a0539ac77
2016-07-12 10:13:30 -07:00
Geza Lore
c804e0df05 Cleanup obmc_sad function prototypes.
Name 'wsrc', 'mask' and 'pre' explicitly, rather than
using 'b', 'm' and 'a'.

Change-Id: Iaee6d1ac1211b0b05b47cf98b50570089b12d600
2016-07-12 13:23:33 +01:00
James Zern
b8a28fbb3a Merge changes from topic 'missing-proto' into nextgenv2
* changes:
  vp10/encoder/rdopt.c: make a function static
  vp10/encoder/rd.c: make a function static
  vp10_convolve_ssse3.c: make some functions static
  vp10/encoder/bitstream.[hc]: correct a prototype
  vp10/common/idct.h: add some missing prototypes
  highbd_quantize_intrin_sse2.c: add missing rtcd include
  vp10: add some missing includes
2016-07-12 02:39:24 +00:00
Yue Chen
4ff6d13771 Merge "Cosmetics for vp10/common/vp10_rtcd_defs.pl" into nextgenv2 2016-07-12 01:21:33 +00:00
James Zern
849e990779 vp10/encoder/rdopt.c: make a function static
+ remove vp10_ prefix

quiets a -Wmissing-prototypes warning

BUG=b/29584271

Change-Id: I8821c38009b90296280f9b14233e73c92076e81f
2016-07-11 16:52:11 -07:00
James Zern
0baa08336a vp10/encoder/rd.c: make a function static
+ remove vp10_ prefix

quiets a -Wmissing-prototypes warning

BUG=b/29584271

Change-Id: I6b5d71f8120a6d1fee4c782beb4c6d6eef980f65
2016-07-11 16:52:10 -07:00
James Zern
08bd57ef0d vp10_convolve_ssse3.c: make some functions static
quiets -Wmissing-prototypes warnings

BUG=b/29584271

Change-Id: I4d2eb7f4b45d7b829421976641b3212bcf29e7dd
2016-07-11 16:52:10 -07:00
James Zern
3c127f2e36 vp10/encoder/bitstream.[hc]: correct a prototype
quiets a -Wmissing-prototypes warning

BUG=b/29584271

Change-Id: I91aba2a75dccd6752bdf91837564c2aa45817c09
2016-07-11 16:52:09 -07:00
James Zern
9bf5a1ab46 vp10/common/idct.h: add some missing prototypes
quiets the warning of the same name

BUG=b/29584271

Change-Id: I220cd58e1060f77e3910472fed1b167add3a08f8
2016-07-11 16:52:08 -07:00
James Zern
e046f5efef highbd_quantize_intrin_sse2.c: add missing rtcd include
quiets -Wmissing-prototypes warnings

BUG=b/29584271

Change-Id: Iff5214df0d1781810afbfc20bfaf664f109e2f29
2016-07-11 16:52:08 -07:00
James Zern
bc4341fd94 vp10: add some missing includes
quiets some -Wmissing-prototypes warnings

BUG=b/29584271

Change-Id: I9174728459fcabb6d9ac0028ae58029e52c0da92
2016-07-11 16:52:07 -07:00
Yue Chen
68e19472c1 Cosmetics for vp10/common/vp10_rtcd_defs.pl
Change-Id: Iaf8c6f0b1e340f0406df2871a3dc2ded19b7009a
2016-07-11 23:41:30 +00:00
Debargha Mukherjee
5041ff4921 Merge "Add a few branch hints to vp10_optimize_b." into nextgenv2 2016-07-11 22:30:33 +00:00
Debargha Mukherjee
6770c7361e Merge "Optimize and cleanup supertx predictor." into nextgenv2 2016-07-11 22:30:16 +00:00
Debargha Mukherjee
6bbadfb303 Merge "Improve vpx_blend_* functions." into nextgenv2 2016-07-11 19:30:04 +00:00
Geza Lore
cd489264e1 Optimize and cleanup supertx predictor.
Use vpx_blend_a64_hmask and vpx_blend_a64_vmask to speed up
computing the supertx predictor.

Decoder speedup of up to 4% has been observed.

Change-Id: I255a5ba4cc24f78dc905d25b6e2f7fbafac13253
2016-07-11 18:14:21 +00:00
Geza Lore
bfa59b4a5f Improve vpx_blend_* functions.
- Made source buffers pointers to const.
- Renamed vpx_blend_mask6b to vpx_blend_a64_mask. This is more
  indicative that the function does alpha blending. The 6, or 6b
  suffix was misleading, as the max mask value (64) does not fit into
  6 bits.
- Added VPX_BLEND_* macros to use when needing to blend scalars.
- Use VPX_BLEND_A256 in combine_interintra to be more explicit about
  the operation being done.
- Added versions of vpx_blend_a64_* which take 1D horizontal/vertical
  masks directly and apply them to all rows/columns
  (vpx_blend_a64_hmask and vpx_blend_a64_vmask). The SSE4.1 optimzied
  horizontal version now falls back on the 2D version. This can be
  improved upon if it show up high enough in a profile.
- All vpx_blend_a64_* functions now support block sizes down to 1x1
  (ie: a single pixel). This is for usage convenience. The SSE4.1
  optimized versions fall back on the C implementation if
  w <= 2 or h <= 2. This can again be improved if it becomes hot code.

Change-Id: I13ab3835146ffafe3e1d74d8e9cf64a5abe4144d
2016-07-11 19:05:17 +01:00
Pascal Massimino
e5fb2d4e93 remove ROUNDZ_* macros in favor of just ROUND_* ones
Change-Id: I263088be8d71018deb9cc6a9d2c66307770b824d
2016-07-11 06:27:41 -07:00
Geza Lore
1178f71d99 Merge "Fix unused warning without ext-interp" into nextgenv2 2016-07-11 11:29:17 +00:00
Debargha Mukherjee
5d28183fcf Merge "Refactor and clean up on blend_mask6" into nextgenv2 2016-07-09 06:50:32 +00:00
Yue Chen
5b25323c25 Merge "Fix assertion failures in mips+msa setting" into nextgenv2 2016-07-09 01:07:27 +00:00
Yue Chen
4ab19eac62 Fix assertion failures in mips+msa setting
Directly call c functions, otherwise when EXT_TX is enabled, hybrid
transform other than combination of DCT/ADST has not been implemented, thus
will cause assertion failures in the switch loops in vp10_fhtnxn_msa() and
vp10_ihtnxn_nxn_add_msa().

BUG=webm:1239

Change-Id: I2379a07e5406f9489edcd2f3205682f679c9b091
2016-07-08 17:13:52 -07:00
Jingning Han
9c4b041a80 Merge "Properly reset rate and distortion value for zero pred residual case" into nextgenv2 2016-07-08 22:21:27 +00:00
Debargha Mukherjee
72ef6d7704 Refactor and clean up on blend_mask6
Change-Id: Ie9188471e7dc07ab9c95b22f258b1662e895c533
2016-07-08 15:02:57 -07:00
Jingning Han
985dd03ff7 Merge "Integrate ext-interp into dual filter framework" into nextgenv2 2016-07-08 18:25:14 +00:00
Geza Lore
0b9b3d8643 Add a few branch hints to vp10_optimize_b.
vp10_optimize_b now takes between 40% to 60% of the TOTAL runtime
of the encoder, depending on bit-rate. It also contains 2/3 to 3/4
of the mispredicted branch instructions in the whole program.

Adding a few branch hints makes vp10_optimize_b around 2-5% faster
(dependig on bit-rate) when compiled with gcc/clang.

Change-Id: I1572733e18b4166bc10591b958c5018a9561fa2b
2016-07-08 19:20:35 +01:00
Sarah Parker
6c56def33e Merge "Make new_quant bin widths to be uniform" into nextgenv2 2016-07-08 17:40:55 +00:00
Jingning Han
e3a2aeb05d Integrate ext-interp into dual filter framework
The combination of the two experiments improves the compression
performance gains:

lowres 2.5%
midres 2.1%

Change-Id: Id26c0a9474ce08893aa1d946365c7ff850fab57a
2016-07-08 16:38:59 +00:00
Jingning Han
1bf039ccd5 Properly reset rate and distortion value for zero pred residual case
When the prediction residuals are all zero, reset the coeff rate
cost and the distortion value to be zero. This change doesn't affect
lowres set significantly, but improves several clips in the midres
set, like sintel_480p and mobisode2_480p, by a few percents. The
average performance for midres set is improved by 0.2%.

Change-Id: Idd5ebf2652e556a1b1c569fe3c48dacef3f11c32
2016-07-08 09:09:18 -07:00
Geza Lore
bb5059ff9b Fix unused warning without ext-interp
Change-Id: Ibb63c492eb8278d115262b8fc3cbc761c406b107
2016-07-08 15:48:02 +01:00
Jingning Han
7c393d097f Merge "Fix ioc in trellis optimization with hbd" into nextgenv2 2016-07-08 01:11:17 +00:00
Sarah Parker
88faa2b348 Make new_quant bin widths to be uniform
Change-Id: Iceeca8ecbc43919b43189352a307479d666d1dad
2016-07-07 16:22:32 -07:00
Debargha Mukherjee
c6f9b7f4ee Merge "RD costing fix in loop-restoration expt" into nextgenv2 2016-07-07 22:47:58 +00:00
Debargha Mukherjee
51957b4162 Merge "Remove redundant code in new_quant" into nextgenv2 2016-07-07 21:55:38 +00:00
Debargha Mukherjee
fc3ce72674 Merge "Clean up build_wedge_inter_predictor_from_buf" into nextgenv2 2016-07-07 20:05:12 +00:00
Debargha Mukherjee
aab64cdddc RD costing fix in loop-restoration expt
Change-Id: I8dbc1002f5d6bf8f2409db8c6be4346f1df0590c
2016-07-07 12:54:54 -07:00
Jingning Han
07d35de056 Fix ioc in trellis optimization with hbd
Use int64_t type for distortion. This avoids integer overflow
issues in the trellis optimization function in high bit-depth
settings.

Change-Id: I550c3ca9f11a3191ef8638a152887018cd476141
2016-07-07 12:00:38 -07:00
Debargha Mukherjee
a85e84599b Remove redundant code in new_quant
Change-Id: Ie2534c7c0cc3fc59e7389b55cb066f2b347d846e
2016-07-07 11:55:20 -07:00
Geza Lore
e6f8c17ac5 Remove various testing utilities.
test/assertion_helpers.h
test/randomise.{cc,h}
test/snapshot.h

Modfiy blend_mask6_test.cc not to rely on these.

Change-Id: I88b8933fe0a729a606797e5cd421795a544c612d
2016-07-07 16:22:07 +01:00
Geza Lore
fc28be3b23 Clean up build_wedge_inter_predictor_from_buf
Change-Id: I715f8ffa3e81056a74ca8ac94793009afb781221
2016-07-07 13:12:57 +01:00
Debargha Mukherjee
fabc0ed7ad Merge "Reinstate tests for wedge partition selection optimizations." into nextgenv2 2016-07-07 05:55:07 +00:00
Debargha Mukherjee
9303d428a2 Merge "Add tests for vpx_sum_squares_i16." into nextgenv2 2016-07-07 05:54:45 +00:00
Yue Chen
c7a92f2cad Merge "Add SSE4.1 vpx_obmc_sad* implementations." into nextgenv2 2016-07-07 01:12:20 +00:00
James Zern
abf05c3e60 Merge changes I9433d858,Iafd05637,If08ce6ca into nextgenv2
* changes:
  tests: remove redundant round() definition
  remove visual studio < 2010 workarounds
  configure: remove old visual studio support (<2010)
2016-07-06 23:25:35 +00:00
Yue Chen
87aec58f11 Merge "Refactoring in preparation for OBMC optimizations." into nextgenv2 2016-07-06 22:44:27 +00:00
Geza Lore
aacdf98c9a Add SSE4.1 vpx_obmc_sad* implementations.
Speedup for these functions: 4x

Change-Id: I21baa04f53c6ab308ea3edf3ebacc62970e97454
2016-07-06 19:46:13 +00:00
hui su
4a18771330 mcomp.c: rename variables and remove unnecessary codes
Change-Id: I4ad4061875fa1c8f3801efbcdcb0da47e7c032a5
2016-07-06 10:25:46 -07:00
Geza Lore
471362f61f Add tests for vpx_sum_squares_i16.
Change-Id: I529c34d5bfa85719cb6499a9a3c9d907eccccd56
2016-07-06 15:14:59 +01:00
Geza Lore
2791d9db1e Reinstate tests for wedge partition selection optimizations.
This reinstates the tests from commit
efda2831e5f758b4f350679b5c55c0b9282449b0 with the appropriate
fixes for 32 bit x86 builds.

Change-Id: Ib331906c5b448ca964895ee9cbfd4266f67d1089
2016-07-06 15:09:46 +01:00
Geza Lore
007aa7dd65 Refactoring in preparation for OBMC optimizations.
- Use int32_t instead of int in vpx_obmc{variance,sad} functions
- Remove weigthed_src and obmc mask strides and assume contiguous
  buffers. These inputs can always be packed as contiguous arrays.

Change-Id: I74c09b3fb3337f13d39e13a9cb61e140536f345d
2016-07-04 16:57:17 +01:00
Wei-ting Lin
f9e38a7bb9 Remove reference frame buffer update for show_exsiting_frame
Originally we need to send the refresh flag and the virtual indices
mapping for the reference frame buffer update for show_existing_frame to
have the BWDREF_FRAME replace the LAST_FRAME.

To remove sending this information, we update the the virtual indices
of the reference frame buffer after the last_bipred_frame is encoded,
and therefore the decoder will receive the updated reference mapping
at the next non-show-existing frame.

As a result, we can save 4 bytes per show-existing frame, and get 0.12,
0.2, and 0.07 BDRATE improvement in lowres, derf, and midref test set
respectively.

Change-Id: I63d41ee6ea99884798f0778b789d2701e2f2d3e0
2016-07-01 09:26:54 -07:00
Geza Lore
b04ea832a4 Minor cleanup of inter mode search.
Change-Id: I523a3b30eb80fc6c6ed83638fdb82cf65c22b2e5
2016-07-01 09:00:05 +01:00
Debargha Mukherjee
e5e37e310b Merge "Reject ext-inter compound modes based on modelled RD." into nextgenv2 2016-06-30 18:18:53 +00:00
Jingning Han
3d8cde6618 Merge "Remove unused BITDEPTH_10 definition" into nextgenv2 2016-06-30 16:26:25 +00:00
Jingning Han
fce34bc8ac Merge "Fix shift value in dist_block with hbd" into nextgenv2 2016-06-30 16:26:18 +00:00
Debargha Mukherjee
2756b2f004 Merge "Various cosmetics on the new_quant experiment" into nextgenv2 2016-06-30 16:03:49 +00:00
Geza Lore
532304e468 Reject ext-inter compound modes based on modelled RD.
Reject ext-inter compound modes before doing full rate distortion
evaluation, if the corresponding single reference modes had a lower
modelled RD.

ext-inter speedup up to TBD.

Coding performance: TBD

Change-Id: I358bfb879c5ebe5e7afbf6f540cc784f8de14857
2016-06-30 09:56:17 +01:00
James Zern
6bbb8b79eb tests: remove redundant round() definition
use vpx_ports/msvc.h for compatibility

BUG=b/29583530

Change-Id: I9433d8586cd0b790e7f4d697304298feafe801f1
(cherry picked from commit 0a64929f19cc1ce89f993aa5c9d61a29679eb961)
2016-06-29 17:11:11 -07:00
James Zern
26f6b216a1 remove visual studio < 2010 workarounds
BUG=b/29583530

Change-Id: Iafd05637eb65f4da54a9c857e79204a77646858a
(cherry picked from commit c125f4a594815ad63b50e4b684ada4b44c545932)
2016-06-29 17:11:10 -07:00
James Zern
f8876a22c1 configure: remove old visual studio support (<2010)
BUG=b/29583530

Change-Id: If08ce6ca352f377ac4db6b9b1909b507bba6d872
(cherry picked from commit 078dff72ca7bff079cb3c56d98c588c6ea6d2814)
(cherry picked from commit 046226376533b610ddc700f14409f195aa6abd51)
2016-06-29 17:10:36 -07:00
Jingning Han
e6c8e35dec Remove unused BITDEPTH_10 definition
Change-Id: Ic11f32db352e1ff7b3ed140654ee1a6016ba516f
2016-06-29 16:43:54 -07:00
Jingning Han
49222c3718 Fix shift value in dist_block with hbd
This offset value related to the bit depth has been taken care of
inside the function vp10_highbd_block_error.

Change-Id: I58dd8a53380ba4529d59837e56a951bc81a2962e
2016-06-29 16:42:23 -07:00
Debargha Mukherjee
0eefe6edb4 Remove use_quant_fp speed feature
Change-Id: I22f1299545d4c75d80e72d479be66f66ea142ef1
2016-06-29 13:58:53 -07:00
Debargha Mukherjee
a35597fc7f Various cosmetics on the new_quant experiment
Also extends quant profiles to include quality range.

Change-Id: Ia96e45b6425e1d42ca61fc401f63d4fd7214e448
2016-06-29 13:18:52 -07:00
Debargha Mukherjee
d5ddb56721 Merge "Remove skip_txfm optimization." into nextgenv2 2016-06-29 17:52:39 +00:00
Sarah Parker
ac626ee7ac Merge "Fix compiler warnings in yv12extend.c" into nextgenv2 2016-06-29 03:29:13 +00:00
Sarah Parker
cbb7c65794 Merge "Fix compiler warnings in vp10_convolve_optimz_test.cc" into nextgenv2 2016-06-29 02:03:10 +00:00
Sarah Parker
29f36f7e37 Fix compiler warnings in yv12extend.c
Change-Id: I1f6f5b8861c4081b1f4b85c531c5d7ef0cb67bab
2016-06-28 17:42:44 -07:00
Sarah Parker
9576374952 Fix compiler warnings in vp10_convolve_optimz_test.cc
Change-Id: I11b717e1652dff440a54f6977527d544b0c5ed29
2016-06-28 17:13:03 -07:00
Alex Converse
0dc56b6a15 ethread_test: Remove vp10 as test parameter.
Change-Id: I043418cde5a2562520ff37cdf81436abc2c9821a
2016-06-28 14:32:15 -07:00
Geza Lore
92922be83c Remove skip_txfm optimization.
Commit 0d6980d7a1caa592058f8d5d618b012c160772f7 removed some use
of the skip_txfm optimization, and the rest are not productive.

The current use of this optimization is only used with --good
and --cpu-used >= 3, however the overhead of this is higher than the
speedup it yields.

Removing this, and subsequently simplifying model_rd_for_sb yields
a net encoder speedup:
--cpu-used=0    ~1.5% faster
--cpu-used=3    ~2.0% faster

The code simplification is also significant.

Change-Id: I1dd668c32de15a2e912c59c42379d0f9e1032ff8
2016-06-28 10:03:03 +01:00
Sarah Parker
7458f11766 Merge "Quantization fix for new-quant/var-tx" into nextgenv2 2016-06-28 02:21:35 +00:00
Hui Su
487bdac2f9 Merge "Rename the initial MV search candidate" into nextgenv2 2016-06-28 00:37:48 +00:00
Hui Su
3426f11459 Merge "Refactor vp10_pattern_search" into nextgenv2 2016-06-28 00:24:02 +00:00
Debargha Mukherjee
f3dfa0c36a Quantization fix for new-quant/var-tx
Also use the fp quantizer consistently

lowres: -0.07 BDRATE improvement

Change-Id: I9174f6ad54a74d38541004b99cb3689d0c09be55
2016-06-27 17:22:09 -07:00
Hui Su
ab9940293e Merge "Fix a bug in vp10_pattern_search()" into nextgenv2 2016-06-27 23:09:10 +00:00
Jingning Han
3667d62e06 Merge "Disable trellis optimized quantization in the first-pass" into nextgenv2 2016-06-27 21:34:42 +00:00
Yi Luo
dd2064a0ac Merge "Fix bugs in convolution filter optimization" into nextgenv2 2016-06-27 21:33:45 +00:00
Jingning Han
813201e174 Disable trellis optimized quantization in the first-pass
This resolves the use of uninitialized value in the first-pass
encoding.

Change-Id: I78bc19214a1bfde5c5641424550cbbe4e52cae99
2016-06-27 12:46:07 -07:00
Sarah Parker
cc16c5d805 Merge "Add multiple quantization profiles to new_quant experiment" into nextgenv2 2016-06-27 18:46:25 +00:00
Yi Luo
8404253f81 Fix bugs in convolution filter optimization
- Fix the over-writing bug in horizontal filtering as width = 2.
- Fix 10-tap vertical filtering which no longer reads one row of
  pixel above the block.
- Fix 10-tap filter zero padding.
- Encoder speed slow down ~4.0%, compared to,
  81ad953 Convolution vertical filter SSSE3 optimization

Change-Id: I9bb294a4529300081c29bf284e6bc6eb081cc536
2016-06-27 10:23:38 -07:00
hui su
09a77e1052 Rename the initial MV search candidate
Its old name "ref_mv" is confusing.

Change-Id: I7ac8f346c468bcf3c0e7692582d423fb7a1f113a
2016-06-24 21:47:00 -07:00
hui su
19f3eaa657 Refactor vp10_pattern_search
Combine it with vp10_pattern_search_sad

Change-Id: I47a3b34dfefad9fc8abd23fcc197f6aea3419873
2016-06-24 21:44:59 -07:00
hui su
15f0bf47e7 Fix a bug in vp10_pattern_search()
Should use sub-pel MV instead of full-pixel MV as input parameter
to calc_int_cost_list().

Change-Id: I054d94220a090ca54c8d24df265193ee345cd439
2016-06-24 21:17:00 -07:00
Debargha Mukherjee
9f2167aede Merge "Turn on ActiveMapRefreshTest for Vp10" into nextgenv2 2016-06-25 00:32:21 +00:00
Sarah Parker
fbe6fb2773 Add multiple quantization profiles to new_quant experiment
Add the ability to pick between 3 quantization profiles.
The profile is chosen based on the entropy context at the
block level.

Change-Id: Iaea0485798441b7d635962c2563f3a477f582dac
2016-06-24 16:16:13 -07:00
Debargha Mukherjee
cf0cdfc55e Turn on ActiveMapRefreshTest for Vp10
Also reduce number of frames coded for VP10.

Change-Id: I7de908861620b6f4f08513516110fd584660d994
2016-06-24 12:55:03 -07:00
Yi Luo
2003cd8011 Merge "Change register loading to fix stack overflow issue" into nextgenv2 2016-06-24 18:47:21 +00:00
Yi Luo
08184e32de Change register loading to fix stack overflow issue
- Use _mm_loadl_epi64 instead of _mm_loadu_si128 for
  uint16_t temp2[4 * 4] buffer.
- Refer to:
  d0de89a remove vpx_highbd_1[02]_sub_pixel_variance4x4_sse4_1
BUG=webm:1242

Change-Id: Ieff555c8dd8070937f27f4ec8535b77e1ed5b8b2
2016-06-24 10:39:49 -07:00
Jingning Han
bf89ee7109 Merge "Use uniform quantizer for sub8x8 block coding" into nextgenv2 2016-06-24 17:07:46 +00:00
Jingning Han
0353e8d6b8 Merge "Refactor sub8x8 block transform and quantization process" into nextgenv2 2016-06-24 17:07:35 +00:00
Jingning Han
45c9add28c Merge "Make recursive txfm partitioning use uniform quantizer" into nextgenv2 2016-06-24 03:18:11 +00:00
Jingning Han
d100948ca2 Use uniform quantizer for sub8x8 block coding
Use the trellis optimization based uniform quantizer to encode the
sub8x8 block coding.

Change-Id: Ibbf7791b0aa430b7c67ef38eac3af6379578f56d
2016-06-23 17:01:00 -07:00
Jingning Han
bbe1b2217b Refactor sub8x8 block transform and quantization process
This commit refactors the transform and quantization process for
sub8x8 blocks and unifies the related functions.

Change-Id: I005f61f3eb49eec44f947b906c4e308cab9935a2
2016-06-23 16:56:05 -07:00
Jingning Han
db78fa9abb Make recursive txfm partitioning use uniform quantizer
Replace the expanded zero-bin quantizer with uniform quantizer in
the recursive transform block partitioning scheme. This improves
the compression performance by 0.4% for lowres.

Change-Id: I1c32ce9ebba0f0760e36a2c5bd20f2f5887ea5b4
2016-06-23 15:23:43 -07:00
Yi Luo
2f52813ebd Merge "Convolution vertical filter SSSE3 optimization" into nextgenv2 2016-06-23 22:01:19 +00:00
Jingning Han
dde6e2b1d3 Merge "Enforce trellis optimization for 1-pass encoding" into nextgenv2 2016-06-23 21:38:03 +00:00
Yi Luo
81ad95363a Convolution vertical filter SSSE3 optimization
- Apply 8-pixel vertical filtering direction parallelism.
- Add unit tests to verify bit exact.
- Encoder speed improves ~29% (enable EXT_INTERP) on Xeon E5-2680.
- Combinational cycle count of vp10_convolve() drops from 26.06%
  to 6.73%.

Change-Id: Ic1ae48f8fb1909991577947a8c00d07832737e57
2016-06-23 12:56:47 -07:00
Jingning Han
8aca4c3495 Enforce trellis optimization for 1-pass encoding
This fixes the unit test failure in the 1-pass settings of
EndToEndTestLarge.EndtoEndPSNRTest

bug=webm:1243

Change-Id: I7667c341f7c063f7ffb83786446bbbd1e498c1aa
2016-06-23 12:18:28 -07:00
Yi Luo
76ff9b3097 Merge "Fix input buffer initialization in convolution filter test" into nextgenv2 2016-06-23 18:43:03 +00:00
Jingning Han
95d99ae1f0 Merge "Refactor reference frame type defs" into nextgenv2 2016-06-23 16:51:25 +00:00
Alex Converse
8505967430 Merge "Reject sub8x8 partitions with SEG_LVL_SKIP." into nextgenv2 2016-06-23 16:50:04 +00:00
Alex Converse
5a019e148e Reject sub8x8 partitions with SEG_LVL_SKIP.
Change-Id: I2503f163464862dc3a7a3141d43d3f07c81b33d2
2016-06-23 16:20:51 +00:00
Geza Lore
c9e7675c1a Force SIMPLE_TRANSLATION motion for SEG_LVL_SKIP blocks.
Change-Id: Ib8ac19f25d06351b8aabed742aa0be66e28ec4d4
2016-06-23 14:09:16 +01:00
Jingning Han
b605de074d Refactor reference frame type defs
Move the reference frame type definitions to common/enums.h file.
Replace hard coded numbers.
Combine repeated definitions.

Change-Id: I288e079a03e448014cc181bcdb3f88ee8ec8d139
2016-06-22 12:34:44 -07:00
Yi Luo
f26a48bd52 Fix input buffer initialization in convolution filter test
Change-Id: I70c0da96a81463d752e88b134b6fde012bd5823d
2016-06-22 11:46:16 -07:00
Zoe Liu
cb2c037c06 Remove unnecessary macros
Change-Id: Id0975947b4e7b76b2c2464905f3b9a29245946c2
2016-06-22 10:25:40 -07:00
Yue Chen
883e3b840f Merge "(Cosmetics) Remove unnecessary new parameters in obmc experiment" into nextgenv2 2016-06-22 17:22:47 +00:00
Debargha Mukherjee
78842b2870 Merge "Reinstate "Optimize wedge partition selection." without tests." into nextgenv2 2016-06-22 16:59:40 +00:00
Yue Chen
02596589e7 (Cosmetics) Remove unnecessary new parameters in obmc experiment
pred_variance in obmc experiment is equivalant to recon_variance in
baseline

Change-Id: Iba8fb9bd973898be5a0d87a507ceaf65c75bdc51
2016-06-22 06:24:32 +00:00
Jingning Han
c797e709a2 Merge "Fix uninitialized context use case in supertx and var-tx" into nextgenv2 2016-06-22 05:47:45 +00:00
Jingning Han
7272750702 Merge "Make drl support bi-directional reference frames" into nextgenv2 2016-06-22 05:47:34 +00:00
Hui Su
09d7d76b21 Merge "Remove an unnecessary if()" into nextgenv2 2016-06-22 04:10:41 +00:00
Hui Su
467bb16215 Merge "Skip optimizing larger coefficients in trellis quant module" into nextgenv2 2016-06-22 04:10:21 +00:00
James Zern
5d14586392 Merge "remove vpx_highbd_1[02]_sub_pixel_variance4x4_sse4_1" into nextgenv2 2016-06-22 03:13:31 +00:00
Jingning Han
d26815569f Fix uninitialized context use case in supertx and var-tx
This commit fixes the use of uninitialized context values in the
combination of supertx and var-tx.

Change-Id: I2d36badf5c9806ea402ce3e19515cc299e6b79e8
2016-06-22 00:46:22 +00:00
Jingning Han
c2195c5b7e Make drl support bi-directional reference frames
This commit refactors the reference frame structure used in the
dynamic motion vector referencing system, and makes it support
the bi-directional reference frames. This resolves unit test
failure (enc/dec mismatch) when both are turned on.

The compression performance (ref-mv + ext-refs) is improved by
0.2% for lowres.

Change-Id: I233624d8fccc1f69e82295f94de984ff056365dc
2016-06-21 17:39:30 -07:00
Debargha Mukherjee
997b491272 Merge "Add 1D version of vpx_sum_squares_i16" into nextgenv2 2016-06-22 00:33:18 +00:00
Alex Converse
27d3905cae Merge "Cleanup dist_block()" into nextgenv2 2016-06-22 00:16:10 +00:00
hui su
9981cb8b0f Remove an unnecessary if()
The condition of this if() is always true.

Change-Id: I251715d519414d1a3d0a78eb3d025df11d913298
2016-06-21 14:56:11 -07:00
hui su
e067755930 Skip optimizing larger coefficients in trellis quant module
This achieves a few percent speed increase without hurting
compression performance.

Change-Id: I040e9bb69274f7de843bdd15926a5c924b30a731
2016-06-21 14:55:52 -07:00
Geza Lore
135d663159 Reinstate "Optimize wedge partition selection." without tests.
This reinstates commit efda2831e5f758b4f350679b5c55c0b9282449b0
without the tests and with fixes for 32 bit x86 builds.

Change-Id: I34be4fe1e8a67686d26ba256fd7efe0eb6a569e8
2016-06-21 20:31:50 +01:00
Geza Lore
52141c9111 Add 1D version of vpx_sum_squares_i16
Change-Id: I1829f931749a26aec38c896b609c5a2640d6dfaf
2016-06-21 20:31:50 +01:00
Debargha Mukherjee
7f929d292d Merge "Always respect tile bounds in calc_target_weighted_pred." into nextgenv2 2016-06-21 18:33:40 +00:00
Debargha Mukherjee
db328a6b18 Merge "Fix false uninitialized warnings (GCC 5+)." into nextgenv2 2016-06-21 17:12:13 +00:00
Geza Lore
78bd14b38d Always respect tile bounds in calc_target_weighted_pred.
The tile boundaries should now be respected even between tile rows.
regardless of whether ext-tile is used or not.

Change-Id: I5a39fd274451114a4264215f97f12be2c908016d
2016-06-21 17:56:29 +01:00
Jingning Han
02b8212be8 Merge "Handle two identical states in the trellis chain" into nextgenv2 2016-06-21 16:04:31 +00:00
Geza Lore
7de2ba3eae Fix false uninitialized warnings (GCC 5+).
Change-Id: Ia00c754ddaf22bb7f1dfcd20106db6293bf4b070
2016-06-21 12:54:17 +01:00
Jingning Han
5223a4b405 Handle two identical states in the trellis chain
When the next two states are identical, skip repeated cost table
fetch and multiplication operations. This makes the trellis unit
about 5% faster.

Change-Id: I0dbf7ad0a5732044e4e45dd59e9431a251c678f2
2016-06-20 16:59:28 -07:00
Yue Chen
474ea305ea Merge "Fix RDO issue of obmc + speed feature fast_inter_tx_type_search" into nextgenv2 2016-06-20 21:57:24 +00:00
Yi Luo
f1a50db2d1 Merge "Convolution horizontal filter SSSE3 optimization" into nextgenv2 2016-06-20 20:06:02 +00:00
Yi Luo
229690a95c Convolution horizontal filter SSSE3 optimization
- Apply signal direction/4-pixel vertical/8-pixel vertical
  parallelism.
- Add unit test to verify the bit exact result.
- Overall encoding time improves ~24% on Xeon E5-2680 CPU.

Change-Id: I104dcbfd43451476fee1f94cd16ca5f965878e59
2016-06-20 11:10:30 -07:00
Jingning Han
a5bcf03030 Merge "Use precise rate estimate for zero_token" into nextgenv2 2016-06-20 16:47:33 +00:00
Jingning Han
899a989d3a Merge "Optimize the use case of token_cost table" into nextgenv2 2016-06-20 16:47:20 +00:00
Debargha Mukherjee
dc5431ad4b Merge "Turn on AqSegment tests for VP10" into nextgenv2 2016-06-20 16:47:13 +00:00
Yue Chen
1273c39c03 Fix RDO issue of obmc + speed feature fast_inter_tx_type_search
Change-Id: I86a967ad2d824ca7877626eed9eb11f0e057b22d
2016-06-20 16:38:12 +00:00
Yue Chen
b37c279ab5 Merge "Re-enable ActiveMapTest for VP10" into nextgenv2 2016-06-20 16:37:53 +00:00
Jingning Han
86b7d39a83 Merge "Fix unit test failure in obmc exp" into nextgenv2 2016-06-18 22:38:53 +00:00
James Zern
d0de89a12a remove vpx_highbd_1[02]_sub_pixel_variance4x4_sse4_1
these cause ASan errors VP10/EndToEndTestLarge.EndtoEndPSNRTest

BUG=webm:1242

Change-Id: I0334e3b255b14e18f61970c3721ae748dc79727b
2016-06-17 19:46:20 -07:00
Jingning Han
887f020691 Fix unit test failure in obmc exp
Properly restore the rate cost in the inner search loop of obmc
prediction. This avoids unexpected encoding behavior. It fixes
the unit test failure in obmc experiment:

AltRefForcedKeyTestLarge.Frame1IsKey/2

Change-Id: I667b219dfcf2f2c63d9d984900ed3cfd10c354bd
2016-06-17 17:44:03 -07:00
Yue Chen
0c73623d2c Merge "Make variance based partitioning compatible with SEG_LVL_SKIP" into nextgenv2 2016-06-18 00:19:42 +00:00
Jingning Han
8293759056 Merge "Skip restore token_cache value" into nextgenv2 2016-06-17 21:59:53 +00:00
Geza Lore
dc5ae1e34c Merge "Fix warnings from gtest under GCC 5 or newer." into nextgenv2 2016-06-17 20:10:14 +00:00
Zoe Liu
5805a14ca6 Merge bi-predictive frames to EXT_REFS
This patch removed the experiment of BIDIR_PRED and merged the feature
into the experiment of EXT_REFS:

(1) Each frame now has up to 6 reference frames, namely
    LAST_FRAME, LAST2_FRAME, LAST3_FRAME, GOLDEN_FRAME, (forward) and
    BWDREF_FRAME, ALTREF_FRAME (backward);
    LAST4_FRAME has been removed;
(2) First pass still keeps the 8 updates:
    KF_UPDATE, LF_UPDATE, GF_UPDATE, ARF_UPDATE, OVERLAY_UPDATE, and
    BRF_UPDATE, LAST_BIPRED_UPDATE, BI_PRED_UPDATE;
(3) show_existing_frame==1 is supported in the experiment of EXT_REFS;
(4) New encoding modes are added for both single-ref and compound cases,
    through the use of the 2 extra forward references (LAST2 & LAST3)
    and the 1 extra backward reference (BWDREF).

RD performance wise, using Overall PSNR: Avg/BDRate
        Bipred only      Prev EXT_REFS    Current EXT_REFS with bipred
lowres: -3.474/-3.324    -1.748/-1.586    -4.613/-4.387
derflr: -2.097/-1.353    -1.439/-1.215    -3.120/-2.252
midres: -2.129/-1.901    -1.345/-1.185    -2.898/-2.636

If in vp10/encoder/firstpass.h, change BFG_INTERVAL from 2 to 3, i.e. to
use 2 bi-predictive frames than 1, a further improvement may be
obtained:
                 Current EXT_REFS with bipred
        1 bi-predictive frame    2 bi-predictive frames
lowres: -4.613/-4.387            -4.675/-4.465
derflr: -3.120/-2.252            -3.333/-2.516
midres: -2.898/-2.636            -3.406/-3.095

Change-Id: Ib06fe9ea0a5cfd7418a1d79b978ee9d80bf191cb
2016-06-17 12:43:39 -07:00
Geza Lore
7172e97abe Re-enable ActiveMapTest for VP10
Change-Id: I030fdde966b9911712eca131d095015afd9b0d8a
2016-06-17 20:33:58 +01:00
Geza Lore
169431b84a Make variance based partitioning compatible with SEG_LVL_SKIP
Inter blocks that have SEG_LVL_SKIP active must be at least 8x8 in
size for bitstream conformance (see read_inter_block_mode_info in
decodemv.c).

This patch makes the variance based partitioning scheme stop at 8x8
blocks in inter frames. This satisfies the SEG_LVL_SKIP constraint
and is more in line with the original implementation of this function
(before it got extended for 128x128 superblocks).

BUG=webm:1234

Change-Id: I1fdd894569a9c0817713a77daabe4c8b8e1d00c0
2016-06-17 20:31:05 +01:00
Jingning Han
019b750867 Use precise rate estimate for zero_token
This commit takes the precise rate estimate for zero_token rate
cost update. It improves the compression performance:

lowres 0.15%
midres 0.23%

Change-Id: I36761079f75ce43c814f8c663667e359d4ac2cd4
2016-06-17 10:57:30 -07:00
Jingning Han
90ea281f29 Optimize the use case of token_cost table
Reduce the cache footprint of the token_costs table.

Change-Id: Ie989e60c6479ac3251cadaac9c7e795ccba52f4e
2016-06-17 10:15:34 -07:00
Geza Lore
4c83fdd3d7 Fix warnings from gtest under GCC 5 or newer.
Change-Id: I9661f2fe9d315dccae69caa70d929b5d9d93b7db
2016-06-17 15:36:06 +01:00
Jingning Han
019dbb4cdc Merge "Rework table access operations in vp10_optimize_b function" into nextgenv2 2016-06-17 00:25:50 +00:00
Alex Converse
cf7968dcea Cleanup dist_block()
Change-Id: Iff0c0548924efd5a01c3a301cc5b4cdfda42e87e
2016-06-16 15:27:22 -07:00
Jingning Han
c187429865 Skip restore token_cache value
The trellis optimization is going backward. Hence there is no need
to restore the token_cache values that is behind the current node
in the scan order.

Change-Id: I4da8a2e3f78bf9630e6667c85d8c387c5d94de9a
2016-06-16 15:18:46 -07:00
Yue Chen
6ab5dbee4f Merge "Make supertx skip bits observe segment level coding." into nextgenv2 2016-06-16 22:03:45 +00:00
Jingning Han
37bf29b916 Rework table access operations in vp10_optimize_b function
Localize table access. This provides another 10% speed-up to
the unit.

Change-Id: Ib902121f412f78e2bd501b9799c8c64462f803b5
2016-06-16 14:33:16 -07:00
Debargha Mukherjee
907b5124fd Merge "Change supertx syntax order." into nextgenv2 2016-06-16 18:25:05 +00:00
Zoe Liu
5201280f70 Disable the unit test of ArfFreq for BIDIR_PRED
The test in arf_freq assumes any no-show frame as ALTREF_FRAME and
then calculate the minimum run between two consecutive ALTREF_FRAME's
based on this assumption. As BWDREF_FRAME is also a no-show frame and
the minimum run between two consecutive BWDREF_FRAME's may vary
between 1 and any arbitrary positive number as long as it does not
exceed the golden frame group interval, this test does not apply to
the experiment of BIDIR_PRED.

Change-Id: I70efb2c691fdc18601dbb8a7735ac2f27817e75a
2016-06-16 09:45:57 -07:00
Geza Lore
7f6518a4b7 Make supertx skip bits observe segment level coding.
Change-Id: Id918d502c8f89e236bcb51949d7ad34efa017321
2016-06-16 17:41:46 +01:00
Geza Lore
984cc04a22 Change supertx syntax order.
Move the supertx skip bit and transform type past the recursive
prediction blocks. This is in preparation for using the segment level
skip feature for supertx blocks.

Change-Id: I8319414b0734144a9264e8a4a60940b6716b12a8
2016-06-16 17:41:39 +01:00
Zoe Liu
a0d122079d Merge "Fix the superframe unit test for BIDIR_PRED" into nextgenv2 2016-06-16 16:15:07 +00:00
Debargha Mukherjee
567ee69b24 Turn on AqSegment tests for VP10
Also shortens the test and changes some of the parameters.

Change-Id: Ieda4aeffa55550fbb9e4235f735c383ef6baf32c
2016-06-16 07:26:39 -07:00
Geza Lore
8192010e32 Plug leak of variance tree.
The speed features can change per frame, so remove condition on
releasing the variance tree.

Change-Id: I651c87a1504266d737e6d98f14fd3ed30d84e01d
2016-06-16 13:21:03 +01:00
Debargha Mukherjee
43115f6878 Merge "Use correct size load in vpx_avg_4x4_sse2." into nextgenv2 2016-06-16 12:15:47 +00:00
Debargha Mukherjee
f9fc898d56 Merge "Split some slower tests based on cpu-used" into nextgenv2 2016-06-16 11:46:36 +00:00
Geza Lore
ffa9173378 Use correct size load in vpx_avg_4x4_sse2.
The old version used 64 bit loads, and then ignored the top half
of the result. This can cause asan failures if we read past the end
of a buffer. Switched to using 32 bit loads instead.

Change-Id: I57da127a26f869fb4b4f700b55408f6dc2fbbc1a
2016-06-16 11:49:24 +01:00
Debargha Mukherjee
6abddf37f8 Split some slower tests based on cpu-used
Change-Id: Idf84475fe06666d5c73c9d86dfc5c23bef170086
2016-06-15 23:14:51 -07:00
James Zern
94e84bbc07 cosmetics,test.mk: fix a typo
Change-Id: Ib74a494e1cf50a356f51e8185e19ca66fcb896a2
2016-06-15 20:33:04 -07:00
James Zern
fba6f748e8 rename vp9_end_to_end_test.cc -> end_to_end_test.cc
this is shared between vp9/10

BUG=webm:1235

Change-Id: I2f44b15268a33453a1c1e0c691d4fc1fc12d0263
2016-06-15 18:30:22 -07:00
James Zern
2710f76692 vp9_end_to_end_test: enable in vp10-only builds
this file is shared between vp9 & vp10; this makes it available in the
presence of --disable-vp9

BUG=webm:1235

Change-Id: Iaf060c3c09afd2c7df69995b0c01589f78d4945e
2016-06-15 18:28:30 -07:00
Zoe Liu
1aa674b588 Fix the superframe unit test for BIDIR_PRED
Change-Id: I2ef8e479893403581711abc020509c6863c2035d
2016-06-15 17:18:26 -07:00
Sarah Parker
50c5921517 Add EndToEndTestLarge for VP10 non-highbitdepth
The current test case is only run for vp9 and vp10 when HBD
is enabled. This was mistakenly removed in:

d53f9a3 Enable VP10 HBD PSNR checking unit test

Change-Id: I88b8168ad1efd805d759238a037653a2901bf50d
2016-06-15 19:45:24 +00:00
Jingning Han
d10161eafc Merge "Refactor trellis optimization process" into nextgenv2 2016-06-15 19:16:30 +00:00
Debargha Mukherjee
918ad13b56 Merge "Pick up correct dequant for segment with new-quant." into nextgenv2 2016-06-15 16:51:38 +00:00
Debargha Mukherjee
00b6ad1ebf Merge "Disable loop restoration when LPF_PICK_MINIMAL_LPF." into nextgenv2 2016-06-15 16:50:55 +00:00
Debargha Mukherjee
00f1580a14 Merge "Remove magic number from traversal (CYCLIC_REFRESH_AQ)." into nextgenv2 2016-06-15 16:50:15 +00:00
Debargha Mukherjee
e20a29d3b0 Merge "Select segment based loopfilter strength for supertx blocks." into nextgenv2 2016-06-15 16:49:34 +00:00
Debargha Mukherjee
343fe016ae Merge "Remove now superfluous argument from predict_b_extend." into nextgenv2 2016-06-15 16:48:13 +00:00
Debargha Mukherjee
52c71f749d Merge "Rework supertx segment handling and adaptive quantization." into nextgenv2 2016-06-15 16:47:58 +00:00
Debargha Mukherjee
b2aabeffc4 Merge "Minor refactor of decode_block for supertx." into nextgenv2 2016-06-15 16:47:28 +00:00
Debargha Mukherjee
3b84c803d8 Merge "Re-initialise quantiser after changing segment." into nextgenv2 2016-06-15 16:45:57 +00:00
Debargha Mukherjee
1b735da7d5 Merge "Refactor variance aq." into nextgenv2 2016-06-15 16:45:21 +00:00
Debargha Mukherjee
46f048e397 Merge "Pass segment id explicitly to quantizer init." into nextgenv2 2016-06-15 16:44:37 +00:00
Debargha Mukherjee
095c88e470 Merge "Fix estimate_wedge_sign with high bit-depth." into nextgenv2 2016-06-15 16:43:51 +00:00
Jingning Han
c457fc3553 Merge "Rework transform quantization pipeline" into nextgenv2 2016-06-15 16:07:10 +00:00
Jingning Han
08bf788ebd Merge "Refactor the trellis optimization process" into nextgenv2 2016-06-15 16:07:03 +00:00
Jingning Han
e9c44a76a2 Refactor trellis optimization process
This commit refactors the trellis coefficient optimization process.
It saves multiplications used to generate the final dequantized
coefficients. It also removes two memset operations on quantized
and dequantized coefficient sets.

The trellis coefficient optimization is on average running over
10% faster.

Change-Id: If3aa26d2a706c3012bf2b7ac059bf1825250e81f
2016-06-15 09:06:13 -07:00
Geza Lore
d3df694fa8 Fix estimate_wedge_sign with high bit-depth.
This fixes some crashes in
VP10/EndToEndTestLarge.EndtoEndPSNRTest/ with high bit-depth and
ext-inter.

Change-Id: I10f0f08e1be4bd5c388616074d4aa3f91a2fda7a
2016-06-15 10:52:29 +01:00
Hui Su
1f493d1ff8 Merge "Speed up ext-intra inter frame encoding" into nextgenv2 2016-06-15 02:46:06 +00:00
Hui Su
e7fb03c8ae Merge "ext-intra: refactor rd loop in interframe" into nextgenv2 2016-06-15 02:46:00 +00:00
Jingning Han
1faf288798 Rework transform quantization pipeline
This commit reworks the transform and quantization unit. It enables
the use of adaptive quantization for intra modes. This further
improves the compression performance:
lowres 0.36%
midres 0.79%
hdres  0.73%

The key frame coding performance is improved:
lowres 1.7%
midres 1.9%
hdres  3.3%

The overall coding gains are:
lowres 1.1%
midres 1.8%
hdres  2.3%

Change-Id: Iaec1a3a4c1d5eac883ab526ed076d957060479dd
2016-06-14 16:32:04 -07:00
Hui Su
69f6fd2134 Merge "Fix rate cost calculation for ext-intra" into nextgenv2 2016-06-14 23:11:25 +00:00
Hui Su
703585b244 Merge "Handle intra modes when tx type speed feature is enabled" into nextgenv2 2016-06-14 22:37:19 +00:00
Jingning Han
48f5125749 Merge "Fix enc/dec mismatch in non-420 settings" into nextgenv2 2016-06-14 21:54:08 +00:00
hui su
8c3b3d3686 Handle intra modes when tx type speed feature is enabled
Change-Id: I9dc156214f3b3ded33ab30d558124b3151548161
2016-06-14 13:46:53 -07:00
hui su
8f9c9b28a8 Speed up ext-intra inter frame encoding
Skip filter intra mode search when regular intra modes have large
rd cost.

Encoding speed improvement:  8%.

Compression performance drop: 0.02%  / 0.09%  / 0.03% on
                              lowres / midres / hdres

Change-Id: I94d3e48781bff6ae6895a54f271dd65c959bb976
2016-06-14 13:46:17 -07:00
hui su
70566f0563 ext-intra: refactor rd loop in interframe
Move filter intra modes search to the end, after regular
mode search.

On average no performance changes.

Change-Id: I9293c8fdf706ebf831fbd61c6bb81959790f4848
2016-06-14 13:46:17 -07:00
hui su
7fa61d7d51 Fix rate cost calculation for ext-intra
It was broken by commit 8ee640f979.

Change-Id: I26b9eba810c74849b0805e64da2d269ab0685cb9
2016-06-14 13:46:17 -07:00
Jingning Han
a116ab7092 Merge "Make tx_type speed feature default" into nextgenv2 2016-06-14 20:45:03 +00:00
Geza Lore
1e46c740c3 Pick up correct dequant for segment with new-quant.
Change-Id: Id73500305a7cc581c11461c9ddb1b22dd8f5d8f4
2016-06-14 16:47:17 +01:00
Geza Lore
3cf3ce949f Disable loop restoration when LPF_PICK_MINIMAL_LPF.
The speed feature sf->lpf_picl == LPF_PICK_MINIMAL_LPF is used
to disable loop filtering. This did not work with the loop-restoration
experiment, but now it is respected.

Note that this speed feature is only used in real-time cpu-used >= 8
settings.

Change-Id: I193723c9ac5f802ec31d8c8b4d37650796e065fd
2016-06-14 16:07:51 +01:00
Geza Lore
58168f5bf4 Remove magic number from traversal (CYCLIC_REFRESH_AQ).
mi->stride now depends on the maximum superblock size, and hence
the constant 8 padding is no longer appropriate. Traverse the array
using mi->stride instead.

Change-Id: I8e84b9fe1728f6663f8c10765fe32206375f1e71
2016-06-14 16:07:51 +01:00
Geza Lore
44b91a0e76 Select segment based loopfilter strength for supertx blocks.
Segment based loopfilter strength for supertx coded blocks is now
selected based on the minimum of all segment IDs within a supertx
coded block (same as the quantiser settings).

Change-Id: Ib056bd0d05f6a1d3b512a76deb4e2ad4db0f7dc4
2016-06-14 16:07:51 +01:00
Geza Lore
7faae780a5 Remove now superfluous argument from predict_b_extend.
Change-Id: I7a76756842af9ce806c6e0e1f98f294af748e8bd
2016-06-14 16:07:50 +01:00
Geza Lore
7dd90c9d22 Rework supertx segment handling and adaptive quantization.
Segment level quantizer settings for supertx coded blocks are now
selected based on the minimum of all segment IDs within a supertx
coded block.

This also fixes the 3 adaptive quantization modes with supertx.

Change-Id: Ib5db099539d4f82f240e1d745d6e5264f8b34cde
2016-06-14 16:07:50 +01:00
Geza Lore
32992fa0b1 Minor refactor of decode_block for supertx.
Exit early from function when supertx is used, rather than putting
the bulk of the function body in a single conditional.

Change-Id: I41f388a45bd46e4a6ee1c51f26782ed9bddff4e5
2016-06-14 16:07:50 +01:00
Geza Lore
9e95919414 Re-initialise quantiser after changing segment.
When using VARIANCE_AQ, we can change the segment assignment after
initialising the quantiser in set_offsets, so re-initialise it when
we do so.

Change-Id: I1f168553aaf0ade419f0d4bf05820cd591b87659
2016-06-14 16:07:50 +01:00
Geza Lore
d60523bc28 Refactor variance aq.
Explicitly signal when the segment map is being refreshed when
using VARIANE_AQ. This simplifies decisions about when the segment id
needs to be set from the previous segment map vs based on the current
variance.

Change-Id: Ieb12c950e9cfbc3f53f4d184880071dea805563c
2016-06-14 16:07:50 +01:00
Geza Lore
2a588555bb Pass segment id explicitly to quantizer init.
This is purely refactoring in preparation of fixing supertx segment
handling

Change-Id: I74bcae34241fdf2b592e1cd45b67af77b9e16c9a
2016-06-14 16:07:37 +01:00
Debargha Mukherjee
ed3034e066 Merge "A crash fix for supertx / ext-inter combination." into nextgenv2 2016-06-14 14:44:55 +00:00
Jingning Han
a4ea8fd8b8 Fix enc/dec mismatch in non-420 settings
This commit makes the dual filter experiment work with non-420
settings. It fixes unit test failure in EndToEndTestLarge.

Change-Id: I04f7afdee78f91389d9ff72947efa152098af930
2016-06-14 00:21:48 +00:00
James Zern
05bd964adc Merge "Revert "Add 1D version of vpx_sum_squares_i16"" into nextgenv2 2016-06-14 00:04:57 +00:00
Debargha Mukherjee
902ee5060c A crash fix for supertx / ext-inter combination.
Change-Id: I9860376c98aa3b25f5bf86ed13d4a7631fa6b153
2016-06-13 13:57:30 -07:00
Jingning Han
a9a8c5993b Refactor the trellis optimization process
Speed up the trellis optimization unit by 10%.

Change-Id: If055f6c0589a405c008d2900bb8fbc11b1246f66
2016-06-13 12:19:57 -07:00
Jingning Han
04f26783c4 Make tx_type speed feature default
Revisit the compression performance and complexity trade-off after
making the SIMD version of trellis optimizations. Before that,
reduce the transform-quantization function calls temporarily. This
would cause about 0.3% performance drop for lowres set.

Change-Id: I16917a6bd5c44ec6cd8cd0b59f3c336c4fd96dd2
2016-06-13 12:19:54 -07:00
James Zern
d2ca083c9f Merge "active_map_refresh_test: fix missing file w/vp10-only" into nextgenv2 2016-06-13 19:08:05 +00:00
Jingning Han
4588676cfb Merge "Trellis based adaptive quantization" into nextgenv2 2016-06-13 17:36:19 +00:00
James Zern
a8ba2eb3d3 active_map_refresh_test: fix missing file w/vp10-only
Change-Id: I6413b7622a3c8524ec0409e087cf7c92f79e4f2d
2016-06-11 09:49:02 -07:00
Debargha Mukherjee
81f8b3f31c Merge "Some refactoring to support warped motion mode" into nextgenv2 2016-06-10 23:18:39 +00:00
Zoe Liu
1d1286bfb4 Fix one typo in the comment
Change-Id: Ie98fd60426b18980ec85572f3cfc9ce0b97a5361
2016-06-10 15:58:30 -07:00
Alex Converse
11ce75968f Merge "Turn on ActiveMapTest speeds [0,5) with all experiments." into nextgenv2 2016-06-10 21:52:57 +00:00
Jingning Han
25ca322957 Trellis based adaptive quantization
This commit combines uniform quantizer with trellis based coefficient
level optimization. It improves the codebase compression performance:

lowres 0.8%
midres 1.0%
hdres  1.6%

Note that the current trellis optimization unit is using C code. This
will make the cost of the overall quantization process slower. A number
of optimizations will come up next.

Change-Id: Id441dd238e4844409d0f08f82604be777f3f5282
2016-06-10 12:56:14 -07:00
Debargha Mukherjee
03be30ba3e Some refactoring to support warped motion mode
Change-Id: I15d54a3ae48b2b33082668116792c6595bdb3ddb
2016-06-10 12:04:18 -07:00
Debargha Mukherjee
8b118faa61 Merge "Adds higher precision for homography model 3rd row" into nextgenv2 2016-06-10 18:47:17 +00:00
Sarah Parker
e14f61b924 Merge "Move new quant experiment from nextgen" into nextgenv2 2016-06-10 17:26:33 +00:00
Jingning Han
b77dfccf00 Merge "Add MIN_TX_SIZE definition" into nextgenv2 2016-06-10 16:04:38 +00:00
Sarah Parker
a21afd421b Move new quant experiment from nextgen
This experiment implements non-uniform quantization where
the width of the bins increases gradually to more closely
match a laplacian distribution of the coeficcients.

Performance Gain:
derflr: 0.15%
hevcmr: 0.675%

Change-Id: I25234244e3bcd94b87c1f77cf682190b61c8ef94
2016-06-10 08:06:22 -07:00
James Zern
5e831c548f Revert "Add 1D version of vpx_sum_squares_i16"
This reverts commit f19700fe52850d051e505ec1b085f25060f7d054.

This crashes in SSE2/SumSquares2DTest.RandomValues/0 under x86 due to
alignment issues

Change-Id: I135d83ba6a7894c09d7c7a139b7eaf876416b40c
2016-06-09 23:42:15 -07:00
James Zern
667db87a1b Merge "Revert "Optimize wedge partition selection."" into nextgenv2 2016-06-10 03:49:29 +00:00
Angie Chiang
95340fccb3 Revert "Optimize wedge partition selection."
This reverts commit efda2831e5f758b4f350679b5c55c0b9282449b0.

This commit causes segmentation fault at SSE2/SumSquares2DTest.RandomValues/0

Change-Id: I171937e4daf6f15323e8206418773deb03bd8c53
2016-06-09 19:17:37 -07:00
Sarah Parker
9d924a0c4a Fix vp9_end_to_end_test for vp10 HBD
This test is failing when no experiments are turned on. PSNR is
31.96 when the threshold is 32.

broken since:
0d6980d Remove swap buffer speed feature

Change-Id: I3c29815b40d5282c37f52f4345b56992f8558b2e
2016-06-09 18:47:47 -07:00
Debargha Mukherjee
b0bdc3c1a8 Merge "Add warped motion config flag" into nextgenv2 2016-06-09 22:36:07 +00:00
Debargha Mukherjee
bcf4e0aba8 Add warped motion config flag
Change-Id: I4b5e1251dc215073384e168a6f845ae059d6c4f2
2016-06-09 13:58:56 -07:00
Aamir Anis
de2a20b411 Merge "Updated loop restoration" into nextgenv2 2016-06-09 20:57:09 +00:00
Alex Converse
587b8a11d0 Turn on ActiveMapTest speeds [0,5) with all experiments.
Change-Id: I7da9e6a85648aa69e5e20d825b717d51e3c6809c
2016-06-09 13:51:00 -07:00
Alex Converse
d279cadbe0 Port active map / cyclic refresh fixes to VP10.
Bring commits 575e81f and 3d6b8a6 to VP10. These changes predate
the creation of the active map cyclic refresh test.

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

Change-Id: I3559b6933ffa5649926a4b214e45ed0fae523a25
2016-06-09 16:52:43 +00:00
Debargha Mukherjee
560a15e62d Adds higher precision for homography model 3rd row
Also adds a function to integerize a double model.

Change-Id: Ie09b3e165492cf66ab81fe25d4bc2422a5e6defd
2016-06-09 04:12:57 -07:00
Jingning Han
f59bf76eef Merge "Take out skip_recode speed feature" into nextgenv2 2016-06-08 21:46:55 +00:00
Jingning Han
cedf90a9d6 Merge "Remove swap buffer speed feature" into nextgenv2 2016-06-08 19:45:54 +00:00
Jingning Han
68cd946994 Add MIN_TX_SIZE definition
Change-Id: I399d601d40827ac383a6687cbeaec59e9a9c63e4
2016-06-08 11:29:02 -07:00
Jingning Han
025fa11c75 Take out skip_recode speed feature
The assumption doesn't hold true in the current codebase. Remove
this speed feature to simplify the codebase.

Change-Id: I9b69f484c9b7cd612b825047cc5b2fce63ee0af7
2016-06-08 18:27:36 +00:00
Jingning Han
0d6980d7a1 Remove swap buffer speed feature
The inter prediction residual can undergo different transform types
during the rate-distortion optimization search. The assumption used
in this speed feature no longer holds true. This commit removes the
related code to clean up the codebase and clear out unit test
failure in higher speed setting.

Change-Id: I7f7cd4df2345ed3e607c9fae75b38cd2dbde0cac
2016-06-08 11:27:00 -07:00
Jingning Han
b48eb90023 Merge "Add tx type speed feature to recursive transform block partitioning" into nextgenv2 2016-06-07 23:44:01 +00:00
Jingning Han
0b7f864213 Merge "Rework the tx type speed feature" into nextgenv2 2016-06-07 23:42:43 +00:00
Angie Chiang
d9410d2d43 Merge "Move #if out of TEST_P in vp10_fwd/inv_txfm2d_test.cc" into nextgenv2 2016-06-07 22:02:28 +00:00
Zoe Liu
ba61de387b Merge "Fix a RD performance bug in bipredictive frames" into nextgenv2 2016-06-07 21:34:56 +00:00
Alex Converse
b47cc0fceb Merge "Turn ActiveMapTest back on." into nextgenv2 2016-06-07 20:28:25 +00:00
Debargha Mukherjee
31da10b41f Merge "Pick up top left mbmi for supertx decode." into nextgenv2 2016-06-07 20:23:44 +00:00
Debargha Mukherjee
ac232300a2 Merge "Zero segment counter before accumulating." into nextgenv2 2016-06-07 20:23:20 +00:00
Alex Converse
7e26f01342 Turn ActiveMapTest back on.
If it's creating problems with some experiments, disable it under the
actual conditions where it doesn't work and file a bug.

Change-Id: Iab9f4bfe42ea926d49d371918da25f9a8938a20f
2016-06-07 11:59:15 -07:00
Jingning Han
33dafdb58b Add tx type speed feature to recursive transform block partitioning
Change-Id: I45440a72b4287d98cbe21b72defc67138a8eb953
2016-06-07 11:34:30 -07:00
Geza Lore
6279d1293d Pick up top left mbmi for supertx decode.
This ensures using the correct segment_id downstream in
reconstruct_inter_block.

Change-Id: Ia8b6ec60de51fa2e26c326d3c537abb18aea75ae
2016-06-07 19:34:11 +01:00
Jingning Han
9a858e868c Rework the tx type speed feature
This commit re-works the transform type speed feature. It moves
the transform type selection outside of the coding mode loop. This
avoids repeated motion search if the best prediction mode is
chosen as NEWMV. It improves the speed performance for clips that
contain more motion activities.

For mobile_cif at 1000 kbps, this makes the baseline encoding 7%
faster and makes the encoding with dynamic motion vector referencing
scheme enabled 10% faster.

Change-Id: I93e2714b3e461303372c4b66a4134ee212faffd1
2016-06-07 11:32:27 -07:00
Zoe Liu
5414abb4a0 Fix a RD performance bug in bipredictive frames
This patch will make sure the use of the BWDREF_FRAME for the
encoding of both the two types of bipredictive frames, namely
LAST_BIPRED_UPDATE and BIPRED_UPDATE. To realize it, the
updates on the cpi->ref_frame_flags have been moved to before
the encoding of one frame, instread of originally handled after
the encoding of one frame.

RD performance has been improved slightly, approximately by 0.17%
compared to before the applying of this patch:

lowres: Avg -3.474; BDRate -3.324
derflr: Avg -2.097; BDRate -1.353

Change-Id: I0aa19afd752293e345489fbff104c4351ca5498c
2016-06-07 09:45:10 -07:00
Geza Lore
f304d5c8e7 Zero segment counter before accumulating.
The segment counts are computed as part of packing the bitstream,
so they might have been computed already in the recode loop. Zero
the accumulator to avoid double counting.

This fixes some encoder/decoder mismatches.

Change-Id: Ib7816034cbbb1db41101116b706302b02fad3a2c
2016-06-07 17:02:03 +01:00
Debargha Mukherjee
d3180b8b97 Merge "Fix build failure happened in reconinter.c" into nextgenv2 2016-06-07 14:22:25 +00:00
Debargha Mukherjee
13155e7725 Merge "Optimize wedge partition selection." into nextgenv2 2016-06-07 09:50:13 +00:00
Debargha Mukherjee
24a04f9048 Merge "Fix decoder crash with supertx" into nextgenv2 2016-06-07 09:46:48 +00:00
Aamir Anis
99d9a8fe30 Updated loop restoration
1. Wiener restoration filter now has normalization and evaluation of
quantization procedure.
2. Corrected scaling of bits in RD cost computation.
3. Changed dynamic range and number of bits for Wiener filter.
Observed gains: Overall 0.58% for low_res, 0.7% for mid_res sequences.

Change-Id: I8928b3ea493bfe1790926b00388d6c4bafc08e19
2016-06-06 15:49:52 -07:00
Angie Chiang
2250c6b07b Fix build failure happened in reconinter.c
Change-Id: Ifd5ed91e4e91238fb53a202c8d76c11fbb9ccf7c
2016-06-06 14:41:14 -07:00
Angie Chiang
f67196b2ed Move #if out of TEST_P in vp10_fwd/inv_txfm2d_test.cc
Change-Id: I1d5b2408f27a1e277574c2238f1e49e884596309
2016-06-06 12:45:54 -07:00
Jingning Han
3713949b6d Merge "Make ref-mv experiment support ActiveMap" into nextgenv2 2016-06-06 16:06:41 +00:00
Geza Lore
efda2831e5 Optimize wedge partition selection.
We can optimize wedge partition selection by pre-computing the
residuals of the 2 underlying predictors, and then blend these
to compute the sse of the compound predictor, without actually
having to compute and subtract the compound predictor.

Similarly we can pre-compute a proxy array which we can use to
cheaply check which mask sign would have lower sse.

Details are in wedge_utils.c.

Mathematically these are equivalence transformations, but due to the
finite precision the encoder output will be perturbed, though on
average this should make 0% difference.

ext-inter gains about ~4.5% speedup.

Change-Id: Ib2657c3209ae161b4090b58b4b6c392641bf2792
2016-06-06 14:43:10 +01:00
Geza Lore
6c4306c27d Fix decoder crash with supertx
xd->plane[0].n4_h and xd->plane[0].n4_w are not set at that point
when using supertx.

While this fixes the immediate crash described in the referenced
bug report, there are still issues in the ref-mv experiment that
causes these tests to fail, so they are kept disabled.

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

Change-Id: Ibf8ef02847a903f8d10e6be28e16694db10c75af
2016-06-06 09:58:11 +01:00
Debargha Mukherjee
b85d0adadf Merge "Always include the cost of tx size in rate for Y." into nextgenv2 2016-06-03 22:57:17 +00:00
Debargha Mukherjee
33c57e6223 Merge "Check if sub8x8 rd stats are valid before reusing them." into nextgenv2 2016-06-03 22:38:56 +00:00
Debargha Mukherjee
fc61d92bf8 Merge "Compute rate of partition type accurately for edge blocks." into nextgenv2 2016-06-03 22:37:33 +00:00
Jingning Han
27d8a948c1 Make ref-mv experiment support ActiveMap
Reset the ref_mv_idx and predicted motion vector when the coding
block belongs to skip segment.

Change-Id: I5746ab315a436b829b64a1a25121989d3c11c995
2016-06-03 15:04:18 -07:00
Geza Lore
b87078d51e Always include the cost of tx size in rate for Y.
The transform can only be skipped if both Y and U/V can be skipped, so
we always include the cost of tx size in the rate for Y. This will
get later subtracted if the transform is actually skipped.

Change-Id: I136a223e5596f18b69bb9f743e7e08438183a215
2016-06-03 11:51:35 -07:00
Geza Lore
d9870c32a9 Check if sub8x8 rd stats are valid before reusing them.
Change-Id: I5d49f15a07de58c226d4003b4691e001abf1f3f8
2016-06-03 11:47:34 -07:00
Geza Lore
8ee640f979 Compute cost of UV mode accurately for intra blocks.
We used to cache the cost of the UV mode from the search with a
different previously tried Y mode, but the UV mode is contexted
on the Y mode, so caching the cost is inaccurate.

Change-Id: Ib003510afb6fc9befb7808b67b0be64f1c0a0804
2016-06-03 11:13:51 -07:00
Geza Lore
1354c6942c Compute rate of partition type accurately for edge blocks.
This patch factors in the different partition coding syntax used for
right and bottom edge blocks when doing RD search.

Change-Id: I2f31650512b6a4a7a2c03352414693aff6fbf87b
2016-06-03 06:43:34 -07:00
Debargha Mukherjee
353930d212 Merge "Add 1D version of vpx_sum_squares_i16" into nextgenv2 2016-06-03 13:27:50 +00:00
Debargha Mukherjee
5590c48937 Merge "Move template specializations into .cc from .h" into nextgenv2 2016-06-03 13:27:43 +00:00
Debargha Mukherjee
cfa03374f8 Merge "Factor out x86 SIMD intrinsic synonyms" into nextgenv2 2016-06-03 13:27:29 +00:00
Debargha Mukherjee
1e160ce559 Merge "Factor out model_rd_from_sse" into nextgenv2 2016-06-03 13:27:22 +00:00
Debargha Mukherjee
cbf51c5ba0 Merge "Pre-compute and use contiguous wedge masks." into nextgenv2 2016-06-03 13:27:02 +00:00
Geza Lore
f19700fe52 Add 1D version of vpx_sum_squares_i16
Change-Id: I0d7bda2fe6f995a9e88a9f66540b4979b3f7fab1
2016-06-03 09:34:55 +01:00
Geza Lore
5a69ee0e11 Move template specializations into .cc from .h
Change-Id: I6d8775c1fa228fde25016a401e3c22a8e3da42f9
2016-06-03 09:34:55 +01:00
Geza Lore
9ebca46933 Factor out x86 SIMD intrinsic synonyms
Change-Id: Idc4ac3ccd2ba19087cdb74a3e4a6774ac50386aa
2016-06-03 09:34:55 +01:00
Geza Lore
73bc3119be Factor out model_rd_from_sse
Change-Id: Ia60ff0ecc8d083870fadbfe07d494d1e2c080489
2016-06-03 09:34:55 +01:00
Geza Lore
ab29978e9f Pre-compute and use contiguous wedge masks.
This is purely a refactoring patch and has no functional effect.

Uses of these masks can be arranged such that all input blocks are
contiguous in memory (stride == block width). In this case 1D versions
of  operations can be used. 1D vector operations have superior performance
over 2D block equivalents as they are more processor cache friendly and
they can do away with a second loop overhead.

Change-Id: I2b76c9888aea2c857cc497e8a4b2841fd3dad54e
2016-06-03 00:16:22 -07:00
Debargha Mukherjee
17c4f1c7f5 Merge "Use standard rounding in combine_interintra." into nextgenv2 2016-06-02 19:29:16 +00:00
Debargha Mukherjee
7534a15c3a Merge "Warped motion functions added" into nextgenv2 2016-06-02 19:28:03 +00:00
Geza Lore
888e90e823 Use standard rounding in combine_interintra.
Use the same rounding method that is used throughout the codebase,
where the halfway value is rounded up rather than down.

Change-Id: I04e92850bc69a7d7a07b06e3d2ce97f6f2ada321
2016-06-02 16:26:05 +01:00
Alex Converse
380c4ee32d Merge "segmentation: Don't use uninitialized probability data." into nextgenv2 2016-06-01 17:50:37 +00:00
Alex Converse
6bae20ca43 Merge "Replace some vpxbool calls with entropy coder agnostic calls." into nextgenv2 2016-05-31 23:58:00 +00:00
Alex Converse
7a6cb59dbb segmentation: Don't use uninitialized probability data.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1224

Change-Id: I17b76fcf0d8c191850350d5aa50dcc007b8b0cdc
2016-05-31 16:42:29 -07:00
Hui Su
afaefc89eb Merge "ext-intra: speed up keyframe encoding" into nextgenv2 2016-05-31 23:21:03 +00:00
Hui Su
118167a47d Merge "Add a speed feature for inter tx type search" into nextgenv2 2016-05-31 23:20:57 +00:00
Hui Su
60b52a1334 Merge "Add a speed feature for intra tx type search" into nextgenv2 2016-05-31 23:20:52 +00:00
James Zern
1d9cf262f7 Merge "vp10_inv_txfm2d_test: fix memory leak" into nextgenv2 2016-05-31 23:19:47 +00:00
Alex Converse
aee0091161 Replace some vpxbool calls with entropy coder agnostic calls.
Change-Id: Ifbcd0714fcf994c43b69255185456c7a255df66c
2016-05-31 15:42:19 -07:00
Debargha Mukherjee
faf3c2cd38 Warped motion functions added
Change-Id: I5064ef1421e17c3ecafe70e7ff1fc7db0c16cc8f
2016-05-31 14:03:23 -07:00
hui su
fa933553da ext-intra: speed up keyframe encoding
130% speed increase for keyframe encoding, with 0.4%
compression loss.

When kf-max-dist=150, 1.5% speed increase with 0.03%
compression loss.

Change-Id: I4cf7314ab95b9eb6dd17f314aca8955522c82676
2016-05-31 10:34:44 -07:00
hui su
f523d7b540 Add a speed feature for inter tx type search
Seperate prediction mode and tx type search for inter
modes. Enabled for speed >=1.

baseline:
speed increase     40%
compression drop   0.30%/0.29% on lowres/midres

ext-tx:
speed increase    160%
compression drop  1.08%/0.95% on lowres/midres

Change-Id: Ieb34b1ee80df6980d16e26a5783e08cc0deae55b
2016-05-31 10:34:35 -07:00
hui su
38e6dd71bb Add a speed feature for intra tx type search
Add a speed feature to seperate prediction mode and tx type search
for intra modes: search for best intra prediction mode with fixed
default tx type first, then choose the best tx type for the
selected mode.

Coding performance drop:
baseline
  lowres 0.10% midres 0.08% hdres 0.14%
with ext-tx
  lowres 0.14% midres 0.25% hdres 0.20%

Speed improvement is 20% for baseline and 17% for ext-tx.

It is turned on for speed >= 1.

Change-Id: Ia5e8d39e8a4e2e42c521bfde938f8b6a98ab24f9
2016-05-31 10:33:56 -07:00
Zoe Liu
e89ca180c2 Make the bi-predictive frame group interval adjustable
This is for the bidir-pred experiment. Previously the length of the
bi-predictive frame group interval is fixed at 2, i.e. one
bi-predictive frame may be inserted every other frame. This patch
makes the length adjustable, i.e. any positive number may be
specified, but the use of the backward ref will be turned off if the
bi-predictive frame group interval is larger than the golden frame
group.

Further, an additional rate factor level has been added:
INTER_LOW
, which applies to LAST_BIPRED_UPDATE frames that are not used as
references.

Change-Id: I5514d34a64dd486bbb5756c2d0612946f598a789
2016-05-28 16:46:45 -07:00
Hui Su
6fd7f7dd3e Merge "ext-intra: refactor mode info. writing and reading" into nextgenv2 2016-05-28 04:34:59 +00:00
James Zern
5d237f0986 vp10_inv_txfm2d_test: fix memory leak
input_, ref_input_ and output_ were being allocated with new[] followed
by vpx_memalign, remove the former

Change-Id: Ia16d0f9b9317042a24445095ad3c284f4e7bb481
2016-05-26 20:04:59 -07:00
Hui Su
e717ece4ab Merge "Add a quick path in build_intra_predictors" into nextgenv2 2016-05-26 22:12:53 +00:00
hui su
e5f47d4334 ext-intra: refactor mode info. writing and reading
No performance changes.

Change-Id: I001068330ea217a993aee9b79d7ffead0d23100e
2016-05-26 14:56:40 -07:00
Hui Su
88eaf5d6ce Merge "Skip unnecessary calculations in ext-intra" into nextgenv2 2016-05-26 18:03:02 +00:00
hui su
bad6e169bf Add a quick path in build_intra_predictors
For the cases where no reference data is available.

Change-Id: Ibf1ac9b7073acc2c7fc44da893f3d608dc74bc1e
2016-05-25 15:21:57 -07:00
Yi Luo
469d002f4e Merge "Integrate HBD inverse HT flip types sse4.1 optimization" into nextgenv2 2016-05-25 21:35:14 +00:00
Yi Luo
bfe4c0ae07 Integrate HBD inverse HT flip types sse4.1 optimization
- tx_size: 4x4, 8x8, 16x16.
- tx_type: FLIPADST_DCT, DCT_FLIPADST, FLIPADST_FLIPADST,
  ADST_FLIPADST, FLIPADST_ADST.
- Encoder speed improvement:
  park_joy_1080p_12: ~11%, crowd_run_1080p_12: ~7%.
- Add unit test cases for bit-exact against C.

Change-Id: Ia69d069031fa76c4625e845bfbfe7e6f6ed6e841
2016-05-25 12:32:10 -07:00
James Zern
008f27e70a Merge "add vp10 ActiveMap/ActiveMapRefreshTest" into nextgenv2 2016-05-25 19:05:02 +00:00
Yi Luo
cb507ff29a Merge "HBD inverse HT 8x8 and 16x16 sse4.1 optimization" into nextgenv2 2016-05-24 22:06:07 +00:00
Zoe Liu
cf5083d4cd Added an experiment "bidir_pred" for backward prediction
Major parts have been implemented as follows:
(1) Added BRF_UPDATE, LASTNRF_UPDATE, and NRF_UPDATE in firstpass.c;
(2) Added the handling for the scenario of
"cpi->common.show_existing_frame == 1" at the encoder;
(3) Added a new reference frame of BWDREF_FRAME;
(4) Have bwd-ref work with upsampled references.

Note that when the experiment of "ext_refs" turned on, this experiment
will be turned off automatically currently.

RD performance in Overall PSNR has been improved, compared against the
VP10 baseline:

lowres: Avg -3.312; BDRate -3.154
derflr: Avg -1.927; BDRate -1.176
midres: Avg -2.149; BDRate -2.001
hdres : Avg -0.567; BDRate -0.588

Change-Id: I4c06ff51cc20194bffbd4d2346e57ba3dcf6b62c
2016-05-24 13:55:57 -07:00
Yi Luo
28cdee448d HBD inverse HT 8x8 and 16x16 sse4.1 optimization
- Covers tx_type: DCT_DCT, DCT_ADST, ADST_DCT, ADST_ADST.
- Encoding speed improves ~27% on crowd_run_1080p_12.
- Merge 4x4, 8x8, 16x16 unit tests in one test file.

Change-Id: I058ef5254d068a9523a826480c78ebbdd231824c
2016-05-24 12:55:30 -07:00
Debargha Mukherjee
89f5b6a0b6 Merge "Remove redundant memcpy from wedge predictor." into nextgenv2 2016-05-24 17:33:54 +00:00
Debargha Mukherjee
416da08102 Merge "Pick up bit-depth from the right place" into nextgenv2 2016-05-24 17:33:22 +00:00
Geza Lore
2935b4db0e Remove redundant memcpy from wedge predictor.
Removing redundant calls to memcpy from
build_wedge_inter_predictor_from_buf yields a net 4% encoder speedup
with ext-inter only. The output is identical.

Change-Id: If97d4e323a5c8aca90c84a25a72085e006b05446
2016-05-24 11:31:18 +01:00
Geza Lore
62b6331753 Pick up bit-depth from the right place
Change-Id: Icbdb036d7927b77b84bd78e8348ec8b5be88df08
2016-05-24 11:08:23 +01:00
hui su
4a741a5d5c Skip unnecessary calculations in ext-intra
Around 5% speedup.

Change-Id: I1c552e4e58fbf5637c0b5a97dd2cc4f83a1ca201
2016-05-23 17:24:19 -07:00
Zoe Liu
a63147ae77 Fix --test-decode=warn to test mismatch
This patch always compares the most recent show frames between
the encoder and the decoder to test the mismatch.

Change-Id: I68a91ad0996a598231450debfd616e24992419b5
2016-05-23 17:01:53 -07:00
Debargha Mukherjee
fb65f9b54b Merge "Add optimized vpx_blend_mask6" into nextgenv2 2016-05-23 23:43:52 +00:00
Geza Lore
a661bc87c4 Add optimized vpx_blend_mask6
This is to replace vp10/common/reconinter.c:build_masked_compound.
Functionality is equivalent, but the interface is slightly more
generic.

Total encoder speedup with ext-inter: ~7.5%

Change-Id: Iee18b83ae324ffc9c7f7dc16d4b2b06adb4d4305
2016-05-23 16:28:58 +01:00
Debargha Mukherjee
fa5022978d Merge "Wedge refactoring to handle signs better" into nextgenv2 2016-05-20 23:19:39 +00:00
Jingning Han
8c9f6c5531 Merge "Clear redundant condition check from vp10_ext_tile_test.cc" into nextgenv2 2016-05-20 22:10:41 +00:00
Debargha Mukherjee
e5de2ad632 Wedge refactoring to handle signs better
Mostly refactoring. Handles signs better though results are
more or less neutral.

Change-Id: If499537c8f8da4f34d104ebfda072eb4c85fb12f
2016-05-20 14:12:52 -07:00
Yaowu Xu
93921097a6 Merge "Properly handle the filter extension in highbd setting" into nextgenv2 2016-05-20 20:00:51 +00:00
Yaowu Xu
17611f2f73 Merge "Fix build when vp8 is disabled" into nextgenv2 2016-05-20 19:59:48 +00:00
Yaowu Xu
7fd0e1b991 Merge "Port change to highbitdepth code path" into nextgenv2 2016-05-20 19:59:41 +00:00
Yaowu Xu
0924bcd824 Fix build when vp8 is disabled
Change-Id: Ie1765f086b10d0f7c4d72961d238dfe0d6056dc2
2016-05-20 11:33:07 -07:00
Yaowu Xu
ba794ea356 Port change to highbitdepth code path
This fixes the crash in encoder when configure with both  highbitdepth
and dual-filter.

Change-Id: Ie06cc528094f4b31b7fc0ba75e7b15cae031d707
2016-05-20 11:30:37 -07:00
Hui Su
83713e7059 Merge "Use standard rounding in intra filters." into nextgenv2 2016-05-20 16:36:04 +00:00
Jingning Han
f1c283f4de Merge "Rework sub8x8 chroma component inter predictor" into nextgenv2 2016-05-20 15:50:32 +00:00
Jingning Han
7488ae014b Merge "Remove unused private variables from vp10_inv_txfm2d_test.cc" into nextgenv2 2016-05-20 01:23:25 +00:00
Yaowu Xu
a9fc1cc257 Fix a build issue
When both obmc and dual_filter is enabled.

Change-Id: I56b127573a6cca31469bb357cf7a6a9c3df64071
2016-05-19 14:24:41 -07:00
Yue Chen
a33e3d12cb Merge "Fix obmc + ext-interp interference" into nextgenv2 2016-05-19 18:08:52 +00:00
Jingning Han
d84a2e7dc0 Properly handle the filter extension in highbd setting
This commit makes the filter extension in highbd aware of the
dual filter and ext-interp experiments to prevent enc/dec mismatch
when both experiments are turned on.

Change-Id: I11ac1f041bd5f73d61e839d6386d9c5d008da3f7
2016-05-19 09:59:48 -07:00
Jingning Han
e816401a81 Clear redundant condition check from vp10_ext_tile_test.cc
Change-Id: I74e9df9e314e49b931c23a81d14f5a9e143b0b7d
2016-05-19 09:31:18 -07:00
Jingning Han
7d5ccccd47 Remove unused private variables from vp10_inv_txfm2d_test.cc
Change-Id: Ie933d754aca649bdf17cd679b9a31239bf413b63
2016-05-19 09:21:13 -07:00
Yi Luo
5fec33012e Merge "Fix to conform Google's coding convention" into nextgenv2 2016-05-19 16:07:01 +00:00
Jingning Han
0f513752a0 Rework sub8x8 chroma component inter predictor
This commit makes the sub8x8 chroma component inter predictor
operate at 2x2 block level. This allows one to use the actual motion
vector associated with each individal pixel block. It improves the
compression performance

lowres  0.40%
midres  0.25%
hdres   0.15%

Change-Id: Ia40e07cc7fde463dbf660018850e024932136c4f
2016-05-19 09:03:57 -07:00
Jingning Han
936ed0804d Merge "Account sub8x8 block reference filter type for prob context" into nextgenv2 2016-05-19 15:04:31 +00:00
Jingning Han
300083da27 Merge "Re-structure probability model context for prediction filter type" into nextgenv2 2016-05-19 15:04:18 +00:00
Geza Lore
fa63b5514a Use standard rounding in intra filters.
Use the same rounding method that is used throughout the codebase,
where the halfway value is rounded up rather than down.

Change-Id: Ie969ed7eb9fcc88a93a90c7e274fd82f336c7e4d
2016-05-19 13:16:42 +01:00
Geza Lore
009bd1153e Fix obmc + ext-interp interference
With ext-interp, a switchable interpolation filter is coded iff the
motion vector uses fractional pixel movement (ie, true subpixel
movement). With ext-interp and obmc enabled at the same time, the RD
search proceeds as:
1. Do motion search
2. Do interpolation filter search iff subpixel motion, otherwise use
   EIGHTTAP_REGULAR
3. Evaluate obmc=0
4. Evaluete obmc=1 - This involves another motion search

If the motion search in step 4 yields an integer motion vector, while
the search in step 1 did not, then an interp_filter value other than
EIGHTTAP_REGULAR is invalid, and will cause an assertion failure
at output time, or a mismatch if not using --enable-debug.

The fix sets the interp_filter to EIGHTTAP_REGULAR if obmc=1 is picked
with an integer motion vector.

Change-Id: I4685d1ad537f41d833dc9eb64845956b67886cca
2016-05-19 11:30:07 +01:00
Yi Luo
346d2449f0 Fix to conform Google's coding convention
- Confirm input coeff buffer is 16-byte aligned.
- sizeof() prefer variable name instead of type.
- Fix function name (Capital first letter then Pascal case).
- Long base class name uses a newline (with colon and 4 space indent).
- Remove a unnecessary reference function variable.
- Method declaration precedes variable declaration in class definition.

Change-Id: I317f7e679926b5219f58c5f7d14512e94985e7fe
2016-05-18 18:15:53 -07:00
Zoe Liu
011f020447 Refactor on getting upsampled reference frame
Reused a function that has been used in getting the normal
reference frames.

Change-Id: Ic4f7dac5c396d689a72699ab79fd580747f8bd65
2016-05-18 16:00:23 -07:00
Jingning Han
9161464f6c Account sub8x8 block reference filter type for prob context
If a reference block is coded with sub8x8 block size, and if it
has sub-pixel level motion vectors, its prediction filter type
should be used as context information.

The coding performance gains of dual filter type coding scheme are
lowres  0.57%
hdres   0.88%

Change-Id: I68b98f2518d02f11c29d0256aeb45b2580fe5cac
2016-05-18 12:35:31 -07:00
Angie Chiang
b0612009bd Merge "Turn on flip in inverse txfm2d" into nextgenv2 2016-05-18 18:37:41 +00:00
Angie Chiang
6f28581b26 Turn on flip in inverse txfm2d
Fix build failed
Reduce txfm test time

Change-Id: Ieaf6b27f3a272d06286f817f01230413fa8adcf6
2016-05-18 11:26:57 -07:00
James Zern
8c125eaf28 Merge "vpx_dsp/*.[hc]: add missing vpx_dsp_rtcd.h include" into nextgenv2 2016-05-18 18:25:00 +00:00
Jingning Han
27d44a1843 Re-structure probability model context for prediction filter type
This commit reworks the probability model contexts used in the
prediction filter type entropy coding.

Change-Id: I7abc68cb469248d0d7ca1046da3c086ecb7b066a
2016-05-18 11:11:43 -07:00
Yi Luo
18ecb16c30 Merge "Integrate HBD row/column flip fwd txfm SSE4.1 optimization" into nextgenv2 2016-05-18 17:45:45 +00:00
Debargha Mukherjee
f1ddf6eb04 Merge "Reducing computation of interintra modes" into nextgenv2 2016-05-18 17:21:15 +00:00
James Zern
297c752106 vpx_dsp/*.[hc]: add missing vpx_dsp_rtcd.h include
Change-Id: I103be7eee36492f8619144ce8325bc916d4975c7
(cherry picked from commit 2184692c07c15290b424d538ae942d5f60eb7df8)
2016-05-18 05:39:49 +00:00
Yi Luo
1d307368a9 Integrate HBD row/column flip fwd txfm SSE4.1 optimization
- Integrate 5 flip transform types for each 4x4, 8x8, and 16x16
  block, for experiment, EXT_TX.
- Encoder speed improves about 12%-15%.
- Update the unit tests for bit-exact result against C.

Change-Id: Idf27c87f1e516ca5b66c7b70142477a115404ccb
2016-05-18 03:48:01 +00:00
Jingning Han
9f55543c06 Merge "Silience compiler warnings in unsigned int" into nextgenv2 2016-05-18 01:18:46 +00:00
Jingning Han
436f78fab7 Silience compiler warnings in unsigned int
Add suffix u to clarify the unsigned int constant when the value
is above 2^31.

Change-Id: Ic712096285b7bf37deaeb5ad1b6b117fc0d67093
2016-05-17 16:46:42 -07:00
Debargha Mukherjee
049dbe7786 Reducing computation of interintra modes
Use model for interintra mode search.
Speed-up about 5-10% with about 0.04 drop in efficiency.

lowres: -2.60%

Change-Id: I825bf0ba8a46eb7f19fc528c25b8df066fb8ea95
2016-05-17 07:28:06 -07:00
James Zern
a81a75184c Merge "vp10/rdopt,rd_pick_intra4x4block: port tsan fix from vp9" into nextgenv2 2016-05-17 03:04:00 +00:00
James Zern
8eba4ac46e vp10/rdopt,rd_pick_intra4x4block: port tsan fix from vp9
minus the non-existent nonrd portion. original change:

commit d642294b1c57a5adacb1038ff45766c38bae8a6d
Author: Jingning Han <jingning@google.com>
Date:   Thu Feb 11 12:36:49 2016 -0800

    Fix tsan error in VP9 sub8x8 intra mode search

    This commit fixes issue 1141. The issue was triggered in multi-tile
    encoding. The change properly saves and restores the block context
    information in the real-time mode selection process. It removes
    several redundant memcpy operations in sub8x8 intra block mode
    search.

    Change-Id: I35c9ad197f4bd500ec39b5fc833f052f19eee010

Change-Id: Idfa38c54c9e645479f6870d46f71fb1e91c071da
2016-05-16 17:20:29 -07:00
Jingning Han
4677e1a718 Unify the per directional filter type system for compound modes
For the current stage, we assume a single prediction filter type
per direction in the settings of compound inter prediction modes.

Change-Id: I12a1afdd364b93fcee870bd11ad01fc40ab48cff
2016-05-16 14:41:08 -07:00
Jingning Han
d567e14e81 Enable per motion component filter type selection
Change-Id: I73823fc94f296d225dece7156de71b30bae3fcb7
2016-05-16 14:38:43 -07:00
Jingning Han
c4e7fde68a Merge "Properly handle 2D filter boundary extension" into nextgenv2 2016-05-16 21:34:28 +00:00
Yi Luo
ceabb00704 Merge "HBD inverse HT 4x4 SSE4.1 optimization" into nextgenv2 2016-05-16 21:15:08 +00:00
Debargha Mukherjee
250c6af087 Merge "Various wedge enhancements" into nextgenv2 2016-05-16 21:11:35 +00:00
Debargha Mukherjee
fb8ea1736b Various wedge enhancements
Increases number of wedges for smaller block and removes
wedge coding mode for blocks larger than 32x32.

Also adds various other enhancements for subsequent experimentation,
including adding provision for multiple smoothing functions
(though one is used currently), adds a speed feature that decides
the sign for interinter wedges using a fast mechanism, and refactors
wedge representations.

lowres: -2.651% BDRATE

Most of the gain is due to increase in codebook size for 8x8 - 16x16.

Change-Id: I50669f558c8d0d45e5a6f70aca4385a185b58b5b
2016-05-16 12:41:47 -07:00
Jingning Han
14dd5538e9 Properly handle 2D filter boundary extension
The amount of border extension needed in the first stage inter
filtering is decided by the length of the second stage filter
kernel.

Change-Id: Icddbc58c02234d5df09ff0eeebcf166ffe689203
2016-05-16 11:49:27 -07:00
Angie Chiang
af87a7b0ca Merge changes I6aa75c66,Id5f0fade,I368d365e,Ibaf7b00b into nextgenv2
* changes:
  Refactor and add flip unit test to vp10_inv_txfm2d_test.cc
  Add flip feature to vp10_inv_txfm2d.c
  add unit test for highbd flip transform
  Refactor vp10_fwd_txfm2d_test.cc
2016-05-16 18:12:18 +00:00
Angie Chiang
fdaad9f673 Refactor and add flip unit test to vp10_inv_txfm2d_test.cc
Change-Id: I6aa75c66429a0178852cf8df88f16eaa8e36b629
2016-05-13 12:30:51 -07:00
Angie Chiang
909bbe734a Add flip feature to vp10_inv_txfm2d.c
Change-Id: Id5f0fade42749d2bed5553eda0d690af22b6c5b1
2016-05-13 12:21:58 -07:00
Angie Chiang
6a75253311 add unit test for highbd flip transform
Change-Id: I368d365ee0f58373bc399b615febd790addb2c36
2016-05-13 12:20:06 -07:00
Angie Chiang
716f1bd46c Refactor vp10_fwd_txfm2d_test.cc
Change-Id: Ibaf7b00bfe247df3e665ea3a0241667cb130e16c
2016-05-13 12:13:31 -07:00
Yi Luo
a3a69b400c HBD inverse HT 4x4 SSE4.1 optimization
- Tx_type: DCT_DCT, DCT_ADST, ADST_DCT, ADST_ADST.
- Encoder overall instruction count drops 2.91%.
- Decoder overall instruction count drops 1.01%.
- Add unit test to test bit-exact result against C.

Change-Id: I908c9e0e5106c58f67dd72d28760e6c9ce54278e
2016-05-13 12:08:43 -07:00
Jingning Han
09ed43ed56 Add static to memcpy_short_addr
Change-Id: I4a713784395bf13aaba2f7b175a6e93d50373a2f
2016-05-12 16:16:52 -07:00
Jingning Han
5b573d650a Fix vp10_inv_txfm2d.round_trip test failure
Avoid accessing transform type that is not 2D-DCT if the transform
size is 64x64. This fixes an assert failure in this unit test.

Change-Id: I0dee865ea0925f5743b8a25c2f90eb6522b4d272
2016-05-12 16:09:02 -07:00
Jingning Han
cacd634791 Fix vp10_get_inv_txfm_64x64_cfg
Add a missing break statement to prevent unintended behavior.

Change-Id: I54ecc95d4a35d4011e85af5635c94015cc944331
2016-05-12 16:07:23 -07:00
Jingning Han
ddee66f2e4 Refactor the inter predictor for supertx
This commit unifies the inter predictor used in supertx at both
encoder and decoder sides. It removes the redundant decoder
implementations related to border extension.

Change-Id: I03985cee52604a518394232fa9258ce057af9c00
2016-05-12 14:43:24 -07:00
Jingning Han
7ac38a7143 Merge "Unify the use of inter predictor in encoder and decoder" into nextgenv2 2016-05-12 21:27:07 +00:00
Jingning Han
d6c881358b Unify the use of inter predictor in encoder and decoder
This commit unifies the inter predictor used in the encoder and
decoder side for super-tx experiment. This resolves an enc/dec
mismatch found in nextgenv2 nightly-run unit test.

Change-Id: I16ab8d6063edf9d2fba79473f470f1a592cc10a0
2016-05-12 12:52:30 -07:00
Yunqing Wang
e7ebe26dd5 Merge "Add decoder APIs and unit tests in tile-coding experiment" into nextgenv2 2016-05-12 19:05:58 +00:00
Angie Chiang
1e587ae616 Merge "Add flip option for vp10_fwd_txfm2d_#x#_c" into nextgenv2 2016-05-12 18:08:28 +00:00
Jingning Han
aad8c94fb7 Merge "Fix highbd masked variance function declaration" into nextgenv2 2016-05-12 01:29:38 +00:00
Yunqing Wang
8e5e338727 Add decoder APIs and unit tests in tile-coding experiment
In the tile-coding experiment,
1. In tile decoder, added 2 set control APIs:
   VP10_SET_DECODE_TILE_ROW and VP10_SET_DECODE_TILE_COL. It allowed
   users to set the range of decoding at frame level.
2. Added a unit test while tile-coding experiment is on. It tested
   both tile encoder and decoder to make sure the encoded frame
   can be decoded as a whole frame or as independent tiles.

Change-Id: I73fd0632b685047cb9376008127cde72efa3fb2b
2016-05-11 16:47:26 -07:00
James Zern
18112f6724 add vp10 ActiveMap/ActiveMapRefreshTest
currently disabled as they result in ASan errors

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

Change-Id: I9c80910adc5dc2cd6eccb3030d33043df53e7ec5
2016-05-11 16:33:29 -07:00
Jingning Han
5538c2cb00 Fix highbd masked variance function declaration
Fix the variable type mismatch between highbd_calc_masked_var_t and
the actual function definiton. This clears the related compiler
warnings in highbd with ext-inter experiment.

Change-Id: I0423318b16c867ed84700084ad21ca6e42edb321
2016-05-11 15:52:58 -07:00
Debargha Mukherjee
55598d1b3d Merge "Cost wedge sign/index properly in rdopt." into nextgenv2 2016-05-11 20:55:40 +00:00
Angie Chiang
f8629918a8 Merge "Remove vp10_fwd_txfm2d_sse4_test.cc" into nextgenv2 2016-05-11 19:04:03 +00:00
Geza Lore
c1b739014f Cost wedge sign/index properly in rdopt.
Lowres improves by about 0.1%

lowres: -2.164 BDRATE

Change-Id: I393bbb92700bfbb8763ace424f4edc2d672a74b4
2016-05-11 11:59:10 -07:00
Debargha Mukherjee
c590c590e6 Merge "Adjust smoothing function for wedge to be sharper" into nextgenv2 2016-05-11 18:02:08 +00:00
Yue Chen
372e12b959 Merge "Add single motion search for OBMC predictor" into nextgenv2 2016-05-11 17:20:32 +00:00
Debargha Mukherjee
81abbc203e Adjust smoothing function for wedge to be sharper
Improves performance by 0.2%

lowres: -2.052% BDRATE

Also increases precision of the shift parameters (for further
investigation into different wedge shifts).

Change-Id: I59fcab9baa002e52a6487ed8d617185840a678ed
2016-05-11 09:35:43 -07:00
Geza Lore
0778f05cab Compute end of frame precisely with selective tile decoding.
Change-Id: I0ee480d437411bebe240bedff204682833efb131
2016-05-11 11:11:14 +01:00
Yue Chen
370f203a40 Add single motion search for OBMC predictor
Weighted single motion search is implemented for obmc predictor.
When NEWMV mode is used, to determine the MV for the current block,
we run weighted motion search to compare the weighted prediction
with (source - weighted prediction using neighbors' MVs), in which
the distortion is the actual prediction error of obmc prediction.

Coding gain: 0.404/0.425/0.366 for lowres/midres/hdres
Speed impact: +14% encoding time
              (obmc w/o mv search 13%-> obmc w/ mv search 27%)

Change-Id: Id7ad3fc6ba295b23d9c53c8a16a4ac1677ad835c
2016-05-10 18:27:45 -07:00
Angie Chiang
1954fa390f Add flip option for vp10_fwd_txfm2d_#x#_c
Will add unit test to test/vp10_fwd_txfm2d_test.cc later

Change-Id: I626900c67fca4eee2ad0ae1828188527a04a5362
2016-05-10 18:14:57 -07:00
Angie Chiang
b5331459c2 Remove vp10_fwd_txfm2d_sse4_test.cc
Functions vp10_fwd_txfm2d_#x#_sse4_1 tested in this file
will be tested in vp10_fhts#x#_test.cc
Remove this to avoid duplication

Change-Id: Iaf21ab85b9a164fcf2a4574b3e13217e43b6255e
2016-05-10 17:06:40 -07:00
Yaowu Xu
dc73c3332e Merge "Move count buffers from stack to heap" into nextgenv2 2016-05-10 23:58:59 +00:00
Jingning Han
005564813d Merge "Remove unused highbd_fdct32x32 function" into nextgenv2 2016-05-10 23:16:41 +00:00
Jingning Han
4b639fcf43 Merge "Remove unused highbd_ihalfcenter32_c function" into nextgenv2 2016-05-10 23:16:35 +00:00
Jingning Han
dd4352b5cd Merge "Fix high bit-depth build with ext-inter and dual-filter exps" into nextgenv2 2016-05-10 23:16:26 +00:00
Yaowu Xu
102cdf94ed Move count buffers from stack to heap
This fixes the stack overflow issue on MSVC build.

Change-Id: Icb0a78e5992a097d2192979ec2432546eaa452dd
2016-05-10 14:49:26 -07:00
Jingning Han
5cf3408ba1 Remove unused highbd_fdct32x32 function
The encoder is using vp10_fwd_txfm2d_32x32 now.

Change-Id: I719f18ec0b065f1e062d01fd300533dd2f17c712
2016-05-10 14:33:34 -07:00
Jingning Han
6b9a507f82 Remove unused highbd_ihalfcenter32_c function
Change-Id: I4390fcbdf353d79dadc021d83d40891e518997dc
2016-05-10 14:27:16 -07:00
Jingning Han
f28550d348 Fix high bit-depth build with ext-inter and dual-filter exps
Change-Id: Ie4a884899d73cafea439ecab6ff4de54652b8c28
2016-05-10 14:17:13 -07:00
Sarah Parker
f6acf8ad7c Move new quant experiment in quant_common.c from nextgen
NEW_QUANT allows bin widths to be modified as a factor of the nominal
quantization step size. This adds functions to get dequantization
values based on the dequantization offset and 3 knots for a single
quantization profile.

Change-Id: I41f10599997e943cb3391c7a0847d8485b9d8b43
2016-05-10 13:40:37 -07:00
Debargha Mukherjee
3fbe6e5e49 Merge "Wedge rd improvements" into nextgenv2 2016-05-10 20:34:00 +00:00
Debargha Mukherjee
447032eb32 Wedge rd improvements
Improves speed by about 10-15% by combining y-only rd with
modeling function in a better way.
Also, coding efficiency improves by about 0.1%

lowres: -1.805% BDRATE with ext-inter

Change-Id: I6ef1f8942ec6806252f3fcf749ae4f30dffe42b1
2016-05-10 11:47:48 -07:00
Alex Converse
fcc7edd48f Merge "Fix some ans const warnings." into nextgenv2 2016-05-10 18:26:53 +00:00
Yaowu Xu
bf692e853d Merge "Fix build without dual-filter" into nextgenv2 2016-05-10 18:10:44 +00:00
Yaowu Xu
0f1ee1caeb Merge "Remove "const" for parameters passed by value" into nextgenv2 2016-05-10 18:05:27 +00:00
Debargha Mukherjee
03009b2e9e Merge "Use multiple tiles in V10 tile independence tests." into nextgenv2 2016-05-10 18:01:08 +00:00
Debargha Mukherjee
61ac55314d Merge "Break tile row dependencies." into nextgenv2 2016-05-10 18:00:34 +00:00
Debargha Mukherjee
a53337740d Merge "Fix interintra predictor buffer overflow." into nextgenv2 2016-05-10 17:59:33 +00:00
Yaowu Xu
fc9deb6b0c Remove "const" for parameters passed by value
This commit removes const from parameters that are passed by value
for consistency in code style.

Change-Id: I2947c4e9cc6e809c4b9b4c162046e45127b8a41c
2016-05-10 09:30:44 -07:00
Yunqing Wang
a2676565d3 Merge "Refine VP10 REFRESH_FRAME_CONTEXT_MODE" into nextgenv2 2016-05-10 15:53:48 +00:00
Yi Luo
73d28a4068 Merge "Change inverse HT function argument from TXFM_2D_CFG* to int" into nextgenv2 2016-05-10 15:38:11 +00:00
Yaowu Xu
9e41323f13 Merge "Make type conversions explicit" into nextgenv2 2016-05-10 14:33:05 +00:00
Geza Lore
559e8d8e50 Fix build without dual-filter
Change-Id: I91946940c1540c9f935161da89155ed304055fda
2016-05-10 13:12:07 +01:00
Geza Lore
d29062c4da Use multiple tiles in V10 tile independence tests.
Change-Id: I6e5c1cbe1bf40d2f7a0d8bd821cac8ce626ce3b8
2016-05-10 13:09:54 +01:00
Geza Lore
9ab9438fbb Break tile row dependencies.
When not using ext-tile, there were still dependencies between tile
rows due to various tools (eg intra predictors) relying on the above
row or above mode info, which can be in the above tile. This is now
broken (the same way as it was when ext-tile is enabled) by fixing
the appropriate predicates.

Change-Id: I107dd0d8481775a792f14e05cfbbd761f16cdc1e
2016-05-10 13:09:47 +01:00
Geza Lore
e9d2e36264 Fix interintra predictor buffer overflow.
When constructing the intra predictor for rectangular interintra blocks,
the last row/column of the first square is copied back into the source
image (which is the current reconstructed image buffer) before
predicting the second square. The code used to use the height instead
of width for vertical rectangles, and vice versa for horizontal
rectangles, leading to overwriting the block on the right/below. This
leads to an encode/decode mismatch if the right/below block is in a
different tile and is encoded before the current block, which did happen
with multi-threaded encoding tests. This is now fixed.

Change-Id: I073a2a447a98b842b1394d72cc774a78cb296921
2016-05-10 09:53:29 +01:00
Geza Lore
e0dcab9d0c Print mismatch location for failing tests.
Change-Id: Ied6929bf5ac41ca25ee4df4ef19edada5bf1e8cd
2016-05-10 09:53:29 +01:00
Yi Luo
cd8cfb8675 Change inverse HT function argument from TXFM_2D_CFG* to int
This change has no performance impact. It prepares the proper
function interface for better performance optimization.

Change-Id: I12e2f2deaf7f3adc603de0a74852116468c762f6
2016-05-09 18:34:16 -07:00
Yi Luo
6f3e71606f Merge "HBD hybrid transform 16x16 SSE4.1 optimization" into nextgenv2 2016-05-09 23:58:05 +00:00
Alex Converse
a2db5815c0 Merge "Fix ans+ref_mv build." into nextgenv2 2016-05-09 23:55:48 +00:00
Jingning Han
0a91b2da26 Merge "Fix unit test failure due to ext-inter and dual filter" into nextgenv2 2016-05-09 23:54:07 +00:00
Alex Converse
6e14846c9f Fix some ans const warnings.
Change-Id: I508d497803d0c1085aa6a8b26d7a574cb27dd6e2
2016-05-09 16:50:03 -07:00
Sarah Parker
d119a5f5c8 Merge "Edit ext-tx so it isn't doing redundant prunes" into nextgenv2 2016-05-09 22:57:37 +00:00
Alex Converse
8c9da4e943 Fix ans+ref_mv build.
Use vp10_read/write instead of vpx_read/write.

Change-Id: I2b7f17e9cdbea14ff48f4bd9776dd3e6aff17a2b
2016-05-09 15:35:58 -07:00
Alex Converse
afad52c670 Merge "Remove the ANS rename on pack_mb_tokens()." into nextgenv2 2016-05-09 22:16:35 +00:00
Jingning Han
6b8acc2868 Merge "Fix dual filter type for high bit-depth" into nextgenv2 2016-05-09 22:06:09 +00:00
Yunqing Wang
484ba02435 Refine VP10 REFRESH_FRAME_CONTEXT_MODE
In VP10, REFRESH_FRAME_CONTEXT_OFF mode is only set when the error
resillient mode is on. Instead of being used to decide how to update
the frame contexts, it is used to decide if or not to reset the
frame contexts.

To verify, ran borg test on lowres set. The result is neutral.
Overall PSNR: -0.006%; SSIM: -0.006%.

Change-Id: Ic48265cf7488e80c6f5aab3eef7ba1c273506419
2016-05-09 14:20:50 -07:00
Sarah Parker
f546383b73 Edit ext-tx so it isn't doing redundant prunes
The original pruning function was not taking into account
that certain tx sizes/block sizes use a reduced tx set.

Prune 1: -0.3% performance drop, 20% speedup on foreman video
Prune 2: -0.48% perfomance drop, 30% speedup on foreman video

Change-Id: I557e919d97a89f787b47b3c8579a080db57f91d0
2016-05-09 13:35:42 -07:00
Zoe Liu
b9d0d3f4c7 Turn on the use of upsampled refs for ext-refs
Without this patch, the experiment of ext-refs showed almost no coding
gains compared to the baseline. This is because when ext-refs is on, the
use of upsampled reference is off.

With this patch, the ext-refs experiment works with the upsampled
references and shows coding gains in Overall PSNR as follows, with ~5%
slow down for encoding time:

lowres: Avg - -0.965;  BDRate - -0.844
derflr: Avg - -0.847;  BDRate - -0.669

Note that the previous patch a912c6ec314d816767a4c3eb4e5e1bddcc4c1186
that "Make LAST_FRAME always point to the newly coded frame in ext-refs"
made ext-refs work with the upsampled refereces.

Change-Id: Id79248d71760109fb9198af4f45718b17455555f
2016-05-09 13:34:08 -07:00
Alex Converse
4d22cc1578 Remove the ANS rename on pack_mb_tokens().
This fixes the ans+var_tx combination.

Change-Id: I4c34edb1deac4475c97ce1907c1d6bdf23ce3fc0
2016-05-09 12:02:01 -07:00
Yi Luo
412ad22f46 HBD hybrid transform 16x16 SSE4.1 optimization
- Tx_type: DCT_DCT, DCT_ADST, ADST_DCT, ADST_ADST.
- Update vp10_fht16x16_test.cc to do bit-exact test against
  latest C version.
- HBD encoder speed improves ~1.8%.

Change-Id: Icfc799a212e5289bcf6cedcae3722032133a2bc6
2016-05-09 11:07:01 -07:00
Jingning Han
1215793007 Fix unit test failure due to ext-inter and dual filter
Make the inter predictor use the right filter type to avoid
enc/dec mismatch.

Change-Id: I2aa416d50450188ec2057dca3338fa258314e562
2016-05-09 16:41:57 +00:00
Geza Lore
1d2d1e752e Merge "Add SSE2 versions of 128x128 vpx_sad*" into nextgenv2 2016-05-09 10:30:59 +00:00
Geza Lore
edf6a708c1 Merge "Unbreak VP9 threading tests." into nextgenv2 2016-05-09 10:30:46 +00:00
Jingning Han
9de916eb20 Fix dual filter type for high bit-depth
This commit fixes the compiler error in high bit-depth inter
predictor when dual filter type experiment is turned on.

Change-Id: I404a76a246477f2fcffc38a3275007d5dfe229cd
2016-05-09 02:14:48 +00:00
Jingning Han
df56fcdf52 Merge "Reduce sizes of some of the tests" into nextgenv2 2016-05-09 02:14:38 +00:00
Yaowu Xu
98c59c98ba Make type conversions explicit
This eliminates MSVC compiler warnings.

Change-Id: Id6ace2586ed7c6248366905b133448fe8ecbd53d
2016-05-07 20:33:40 +00:00
Yaowu Xu
569101bed8 Merge "Make parameter types consistent" into nextgenv2 2016-05-07 20:33:25 +00:00
Yaowu Xu
1a6ec3c756 Merge "Change initializations to be compatible with MSVC" into nextgenv2 2016-05-07 20:33:12 +00:00
Zoe Liu
a912c6ec31 Make LAST_FRAME always point to the newly coded frame in ext-refs
This patch changes the encoder only for the ext-refs experiment. For
each newly coded frame to refresh the LAST_FRAME, the decoder is
notified that the LAST4_FRAME is to be refreshed, and read out the
updated reference frame buffer vitural indexes for the next coded
frame in a way that:
LAST4_FRAME => LAST_FRAME,
LAST_FRAME  => LAST2_FRAME,
LAST2_FRAME => LAST3_FRAME, and
LAST3_FRAME => LAST4_FRAME.

Compared against the original ext-refs experiment in TOT, a small gain
is achieved in overall PSNR:
lowres Avg: -0.154
lowres BDRate: -0.044

Change-Id: I648810c146a3cd915b408274a9373b7d38324864
2016-05-07 00:27:51 -07:00
Jingning Han
bd33326372 Dual prediction filter type for motion compensated reference
Make the bit-stream level support per direction filter type coding
for motion compensated reference.

Change-Id: I61a2360b301075f6734cfd9711b7ae68f214174d
2016-05-07 03:03:04 +00:00
Debargha Mukherjee
a5c4dcb553 Reduce sizes of some of the tests
Change-Id: I846410bd61253d0271c6315d266c6edc2808621d
2016-05-06 17:23:01 -07:00
Yi Luo
7c5fd6aadc Merge "Normalize naming/testing convention in vp10_fht8x8_test.cc" into nextgenv2 2016-05-06 23:48:17 +00:00
Yaowu Xu
ad841b7dac Make parameter types consistent
This fixes compiler warnings from MSVC.

Change-Id: Iaac0e994869561371295578a893f766493ce0544
2016-05-06 23:39:46 +00:00
Yi Luo
fcf54fb7df Normalize naming/testing convention in vp10_fht8x8_test.cc
Use clear and correct type/function names.
Add ASM_REGISTER_STATE_CHECK wrapper for SSE4.1 function.
Conform macro EXPECT_EQ(expected, actual) convention.

Change-Id: I26c6430bea98a4fcb9727eb411b86a3b7abce933
2016-05-06 14:32:12 -07:00
Yaowu Xu
33993798e1 Change initializations to be compatible with MSVC
Change-Id: If5473dadc40d3caea61953fbd112a01939dc1183
2016-05-06 14:20:15 -07:00
Yaowu Xu
71d4e444c1 Merge "Change initializations of variables with type "int_mv"" into nextgenv2 2016-05-06 20:21:39 +00:00
Jingning Han
eb366a0312 Merge "Clean up ext-interp experiment" into nextgenv2 2016-05-06 17:16:56 +00:00
Alex Converse
d5a5bc6522 Merge "Rename pick_filter_intra." into nextgenv2 2016-05-06 16:57:53 +00:00
Yaowu Xu
824a8b228d Change initializations of variables with type "int_mv"
This is to make MSVC happy and eliminate build errors.

Change-Id: Ic81e7c7516923913e6e7a652b691953e4a1af8aa
2016-05-06 16:52:12 +00:00
Yaowu Xu
3be8c5fc64 Merge "Replace inline with INLINE" into nextgenv2 2016-05-06 16:48:54 +00:00
Geza Lore
a0e1c23277 Add SSE2 versions of 128x128 vpx_sad*
Encoder speedup with all experiments enabled approx 15%.

Change-Id: Ib3c771d8da00989ddc9112b71b48ce7c5594e91a
2016-05-06 14:18:00 +01:00
Geza Lore
855b6d7a56 Unbreak VP9 threading tests.
Change-Id: If4eb7094986513ee2e49f7456a2248ad1c54d833
2016-05-06 13:27:52 +01:00
Yaowu Xu
f2512710d5 Replace inline with INLINE
This fixes build issues under MSVC

Change-Id: I6db6a43cba2e8ddb099b676f1ae019fe2742f366
2016-05-05 18:28:04 -07:00
Alex Converse
130cccba8d Rename pick_filter_intra.
The word 'pick' is usually used in functions that make decisions where
the bitstream allows multiple legal choices, and not to limit the
bitstream format itself.

Change-Id: Ia60709c29e004475e1aa8861aefded27ebaf4712
2016-05-05 17:06:54 -07:00
Jingning Han
8b084b683c Clean up ext-interp experiment
Remove the unused sub-experiments within the ext-interp experiment.

Change-Id: I716e3392412d02c56f9395a86c9cab02f580fa59
2016-05-05 16:29:21 -07:00
Jingning Han
2041979a09 Remove misc-fixes flag from the experimental list
This flag is not in effect in the codebase. The related contents
have been merged.

Change-Id: I7125ccbedf39e4683d117ecb72ffdd7547c23fc4
2016-05-05 16:11:32 -07:00
Sarah Parker
9dfe45a84d Merge "Add 1D tx set that corresponds to reduced ext tx inter sets" into nextgenv2 2016-05-05 23:06:14 +00:00
Sarah Parker
867f664e17 Add config flag for new_quant experiment
Change-Id: I3575f688ad473d9750a16c7dae74f5f97d026b26
2016-05-05 22:15:23 +00:00
Zoe Liu
adaa685215 Merge "Add the experiment of bidir-pred" into nextgenv2 2016-05-05 22:04:57 +00:00
Zoe Liu
9e974b86de Add the experiment of bidir-pred
This experiment will implement the use of a backward prediction
reference without temporal filtering. No overlay frame will be
transmitted, instead, the flag of show_existing_frame will be turned
on.

Change-Id: I361a3004344e2ca6b63723f660635c0d790ee036
2016-05-05 14:32:48 -07:00
Jingning Han
4862363e6a Merge "Remove a redundant variable definition from sub8x8 RD loop" into nextgenv2 2016-05-05 21:17:31 +00:00
Debargha Mukherjee
47fd87e77f Merge "Fix mismatch with ext-interp." into nextgenv2 2016-05-05 21:06:51 +00:00
Debargha Mukherjee
8dcb06fd20 Merge "Refactor supertx rd search" into nextgenv2 2016-05-05 21:06:18 +00:00
Jingning Han
cf51217148 Remove a redundant variable definition from sub8x8 RD loop
Change-Id: I464cbb75fbd3872f66ca024dd803605542a9d887
2016-05-05 12:41:05 -07:00
Geza Lore
1502d9e44a Fix mismatch with ext-interp.
The encoder signals the interp filter type in the frame header if all
blocks use the same filter (see bitstream.c:fix_interp_filter). This
decision is made based on the counts, but with ext-interp, the counts
are actually only incremented for blocks that fail vp10_is_interp_needed
(see for example encodeframe.c:update_state), otherwise a default value
is used (EIGHTTAP_REGULAR). The decoder however first checks if the
interp filter is signaled at the frame level, and uses that filter type
for all blocks, even if the default value should have been used.

This patch makes the decoder first check with vp10_is_interp_needed
to see if the default value should be used and then checks the frame
level signaling, which reconciles the difference between encoder and
decoder.

Change-Id: I87857ade42dea06b0d5ec2a029e9219268334dbb
2016-05-05 18:24:21 +01:00
Geza Lore
688f9ed6c3 Improve multi-threaded encode/decode test.
The test used to test that multi-threaded encode/decode resulted in
the same reconstructed image as single-threaded encode/decode. This
however did not mean that the multi-threaded encoder produced the same
bitstream as the single-threaded encoder, as the multi-threaded encoder
could use different forward probability updates and still produce a
bitstream that is sub optimal but yields the same reconstructed image.
The test now asserts that the bitstream is the same as well as the
reconstructed image. Also added more cpu-use values for testing VP10.

Change-Id: I324ed33a702c488b39e077f750d81a1ad1d7ea87
2016-05-05 18:23:31 +01:00
Geza Lore
a905c45c77 Refactor supertx rd search
General code cleanup, but also use the same supertx condition for
ext-partition-types as for conventional partitions.

Change-Id: If86eb18b3c07b9c60434eec2c98b97ce93665b67
2016-05-05 18:20:12 +01:00
Geza Lore
c9cb346e56 Merge "Fix vp10_accumulate_frame_counts once and for all." into nextgenv2 2016-05-05 10:19:41 +00:00
Yaowu Xu
8502727a59 Merge "Change to call build_masked_compound_highbd()" into nextgenv2 2016-05-05 04:09:26 +00:00
Jingning Han
8b2a708b19 Merge "Refactor intra filter type context fetch function" into nextgenv2 2016-05-05 03:32:06 +00:00
Yaowu Xu
f0c7e76717 Change to call build_masked_compound_highbd()
from combine_interintra_highbd(). This fixes a crash in encoder in
highbitdepth build.

Change-Id: I0aa4cc30200703ff21e9990163bb26ace41aabbc
2016-05-04 15:58:15 -07:00
Jingning Han
928d72f365 Refactor intra filter type context fetch function
Factor out common codes from vp10_get_pred_context_intra_interp().
This prevents a potential invalid access of pointers xd->left_mbmi
and xd->above_mbmi.

The coding statistics are identical.

Change-Id: I72dbf9380da7359b997bbe925010faab8e9e7f8d
2016-05-04 15:48:27 -07:00
Yaowu Xu
357c5387d7 Remove the use of non-declared "plane"
The variable is not defined, it is not needed by the called function
either.

Change-Id: Ia601c03231afc0ae68a10ae1f35e8fc4121c3d28
2016-05-04 12:39:37 -07:00
Yaowu Xu
0d7dc0cae1 Change to use proper type in vp10_token_state
"qc" in vp10_token_state is used to save quantized coefficients, this
commit changes the type from short to tran_low_t to properly reflect
the value range for highbitdepth build.

This fixes an out-of-range bug when optimize_b is used in highbitdepth
build.

Change-Id: I914c6fd3d3f4b9d061f9ed7cc5f08a883ab59dcd
2016-05-04 11:59:10 -07:00
Sarah Parker
3da61efe3b Add 1D tx set that corresponds to reduced ext tx inter sets
This is the set of 1D transforms that are used in each
ext_tx_used_inter set. The 1D sets will help speed up
the ext tx pruning functions.

Change-Id: Ib46ad26be2df60b3bfcd2f22d96e7f38ae286df5
2016-05-04 11:42:32 -07:00
Geza Lore
c959151fa2 Fix vp10_accumulate_frame_counts once and for all.
This ensures the multi-threaded and single-threaded encoder/decoder
always uses the same probability contexts.

Change-Id: I6f1e7c6bd8808c390c1dc0a628ae97db3acedf6d
2016-05-04 11:32:40 +01:00
Debargha Mukherjee
e536a1cc07 Merge "Compute end of frame data precisely with ext-tile." into nextgenv2 2016-05-03 22:42:42 +00:00
Debargha Mukherjee
4f5045299e Merge "Refactoring and uv fix for wedge" into nextgenv2 2016-05-03 22:36:24 +00:00
Debargha Mukherjee
6c056de8a9 Merge "Test tile row independence." into nextgenv2 2016-05-03 21:50:29 +00:00
Debargha Mukherjee
e88ce7442a Merge "Configure tiles in tests when using ext-tile." into nextgenv2 2016-05-03 21:49:48 +00:00
Jingning Han
9f35cafaa1 Merge "Replace hard coded values in mv_has_subpel" into nextgenv2 2016-05-03 19:25:19 +00:00
Geza Lore
cba70d29ba Compute end of frame data precisely with ext-tile.
Decoding superframes correctly requires computing the end of the
frame contents in the bitstream precisely. This patch enables
ext-tile to do so.

Also extended superframe_test to test with multiple tiles if using
ext-tile.

Change-Id: I04bb8cde8755a3d764ee3c36aa8b7a6c5c9db742
2016-05-03 19:03:00 +01:00
Geza Lore
1982d67774 Test tile row independence.
Tile rows should now be independent, so make pbi->inv_tile_order
invert the decoding order of tile rows as well as tile columns.
This should improve test coverage. Also added more tile configurations
to the tile_independence_tests.

Change-Id: I14b0f2fa9241c1acaf9e2a07071952cb33feca77
2016-05-03 19:03:00 +01:00
Geza Lore
67a2ff7f90 Configure tiles in tests when using ext-tile.
With ext-tile enabled, the encoder test driver needs to configure the
tile sizes wit different values to encode using a single tile, and to
decode all tiles. This should fix most unit test failures.

Change-Id: I0a0d26737414669791f3bd8d80c537db09f06072
2016-05-03 19:02:11 +01:00
Jingning Han
c19ab86202 Merge "Add dual_filter into the experimental flag list" into nextgenv2 2016-05-03 17:29:31 +00:00
Yi Luo
40b524c58e Merge "Enable VP10 HBD PSNR checking unit test" into nextgenv2 2016-05-03 16:20:23 +00:00
Jingning Han
39775e1099 Add dual_filter into the experimental flag list
Change-Id: I3f240fb46716b70e7c0ddd40660f55e1285875cd
2016-05-03 09:18:34 -07:00
Jingning Han
113f8d8746 Replace hard coded values in mv_has_subpel
Change-Id: Id437740c2db1a3a56c1ad29d8b51bb763c044c1d
2016-05-03 09:08:06 -07:00
Debargha Mukherjee
3407785536 Refactoring and uv fix for wedge
lowres: -1.72%

Change-Id: I4c883097caac72fab8e01945454579891617145e
2016-05-03 08:02:08 -07:00
Angie Chiang
47af3efc6e Merge "Fix vp10 highbd psnr calculation" into nextgenv2 2016-05-03 01:29:51 +00:00
Yi Luo
bb6984a833 Merge "Add the 64-bit CPU cycle count utility function" into nextgenv2 2016-05-03 00:51:28 +00:00
Yi Luo
681150f6d3 Add the 64-bit CPU cycle count utility function
Change-Id: Ie87245bbdf5735bc9729199eeb07899d81dbf267
(cherry picked from commit b547a2f38cfab81f6cbe392b9eb48ab0c12b80cf)
2016-05-02 23:16:42 +00:00
Angie Chiang
cf26c03ce9 Fix vp10 highbd psnr calculation
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1209
Change-Id: Ia189ec4c1cc9bbcb79a45d1904567d943e2b3bb6
2016-05-02 15:37:32 -07:00
Yi Luo
d53f9a398a Enable VP10 HBD PSNR checking unit test
We enable this unit test to protect the high bit depth picture
quality from degrading under VP10 optimization and new experimental
tools.

Change-Id: I6297a44cf01954773e06549ab2a68c319fc848a8
2016-05-02 11:29:58 -07:00
Yue Chen
326975ada3 Merge "Bug fixes for obmc/ext-inter/ext-tile experiment" into nextgenv2 2016-05-02 18:09:08 +00:00
Yi Luo
9be7075f61 Merge "HBD hybrid transform 8x8 SSE4.1 optimization" into nextgenv2 2016-05-02 17:34:50 +00:00
Jingning Han
2a39296d57 Merge "Fix encoder failure in segmentation mode" into nextgenv2 2016-05-02 15:39:12 +00:00
Yue Chen
c1d473849e Bug fixes for obmc/ext-inter/ext-tile experiment
Fix 1: in ext-inter + obmc config, properly identify if the left
predictor used for obmc is a compound one in the case that the
neighbor uses wedgeinterinter pred and we will dump the ALTREF part.
This will fix the seg fault in unit test:
VP10/AltRefForcedKeyTestLarge.Frame1IsKey/0

Fix 2: in ext-tile + obmc experiment, handle the case that the
above block does not fit in the same row tile with the current one,
so as to prevent potential crashes.

Change-Id: I1c177d4f4ad15e10d11d8756e146496437753eea
2016-04-29 19:03:39 -07:00
Jingning Han
e729d28c08 Fix encoder failure in segmentation mode
This commit fixes an encoder segment fault in the codebase, when
the segmentation feature is turned on. The issue was introduced in

5cce322 Porting ext_partition experiment from nextgen

Change-Id: Ifb4c06c5a6976114a8bd061d40d0338a136abaaf
2016-04-29 17:59:26 -07:00
Yi Luo
299c5fc202 HBD hybrid transform 8x8 SSE4.1 optimization
- Tx_type: DCT_DCT, DCT_ADST, ADST_DCT, ADST_ADST.
- Update bit-exact unit test against current C version.
- HBD encoder speed improves ~3.8%.

Change-Id: Ie13925ba11214eef2b5326814940638507bf68ec
2016-04-29 17:04:52 -07:00
Debargha Mukherjee
88fe7871be Refactor wedge generation
Change-Id: I2ec4f562e28a4673477e20186f9d6167b24b76b8
2016-04-28 17:51:21 -07:00
Debargha Mukherjee
cf3ee22597 Merge "Make the backward updates work with bitshifts" into nextgenv2 2016-04-28 20:25:53 +00:00
Debargha Mukherjee
e4bf50b9b9 Make the backward updates work with bitshifts
Removes integer divides from backward updates for VP10.
Currently this is put in as part of the entropy experiment.
Coding efficiency change is in the noise level.

Change-Id: I5b3c0ab6169ee6d82d0ca1778e264fd4577cdd32
2016-04-28 11:51:18 -07:00
Debargha Mukherjee
7ff7943455 Brings back near-near compound mode into ext-inter
lowres: improves by 0.1%

Change-Id: I245019916bf47c6e24bc8c3953b86715ab0193c9
2016-04-28 11:34:13 -07:00
Geza Lore
bf93b38561 Fix some mismatches when using ext-interp.
With ext interp, write_switchable_interp_filter calls
vp10_is_interp_needed, which needs access to the reference frame
buffers to check if they are scaled, the ref frame buffer pointer
at this point used to be uninitialized in the encoder resulting in
bitstream syntax mismatch when the encoder/decoder did not read/write
the interp filter element consistently.

Change-Id: Ie0be2a19cbfcb5639a751aa857458e91c23b8fe3
2016-04-28 18:09:54 +01:00
Alex Converse
b93a1e6b44 Merge changes Ia2dd6bb1,Id1220b03 into nextgenv2
* changes:
  transform tests: Avoid #if inside INSTANTIATE_TEST_CASE_P
  variance_test: Avoid #if inside INSTANTIATE_TEST_CASE_P
2016-04-27 23:59:14 +00:00
Alex Converse
4aafcd220d Merge "convolve_test: Avoid #if inside INSTANTIATE_TEST_CASE_P" into nextgenv2 2016-04-27 23:47:30 +00:00
Alex Converse
13c3757067 Merge "buf_ans: Misc cleanup." into nextgenv2 2016-04-27 23:02:39 +00:00
Hui Su
338c9e704a Merge "ext-intra: completely remove floating point operations" into nextgenv2 2016-04-27 22:00:22 +00:00
Alex Converse
2e520f2768 transform tests: Avoid #if inside INSTANTIATE_TEST_CASE_P
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1200

Change-Id: Ia2dd6bb1ca2dff4422753af4a00156a12e488ed0
2016-04-27 14:39:38 -07:00
Alex Converse
25de2e15a9 variance_test: Avoid #if inside INSTANTIATE_TEST_CASE_P
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1200

Change-Id: Id1220b03e7be931e298848de381fdbce911e4a73
2016-04-27 14:39:37 -07:00
Alex Converse
f03e238f6b convolve_test: Avoid #if inside INSTANTIATE_TEST_CASE_P
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1200

Change-Id: I7f7754e7d1288b103a4510303d10afc68a7d8ca8
2016-04-27 14:39:31 -07:00
Alex Converse
38dfee802f Merge "Fix vp10 txfm on MSVC 2015." into nextgenv2 2016-04-27 21:38:31 +00:00
Alex Converse
fc838a04be buf_ans: Misc cleanup.
Change-Id: I18a3ef2ee6cdda57abcd27683b30b4e3136182c0
2016-04-27 14:10:15 -07:00
Debargha Mukherjee
bd76fc0492 Merge "Turn skip recode off temporarily for ref-mv" into nextgenv2 2016-04-27 20:43:32 +00:00
Alex Converse
97673cb128 Fix vp10 txfm on MSVC 2015.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1187

Change-Id: Ied6d3d003ed6ab9cf4f03cdd1d0037ae755254f4
2016-04-27 19:40:02 +00:00
hui su
6e39af3697 ext-intra: completely remove floating point operations
No performance changes

Change-Id: Ia489041253423ddf8ebc7e2d41fbfb9e138109f0
2016-04-27 12:08:38 -07:00
Jingning Han
22a68fb047 Merge "Fix compound mv costing for ref-mv." into nextgenv2 2016-04-27 17:15:16 +00:00
Debargha Mukherjee
a671241a6e Turn skip recode off temporarily for ref-mv
To fix tests in VP10/AltRefForcedKeyTestLarge.Frame1IsKey/*

Change-Id: I2f4f9fea515c9935d57006b709a9dd524f174b25
2016-04-27 09:55:30 -07:00
Debargha Mukherjee
bc982cc994 Merge "Initialize dummy variables." into nextgenv2 2016-04-27 16:36:24 +00:00
Geza Lore
264d5c446e Fix compound mv costing for ref-mv.
I believe this is necessary for computing the correct rate,
when not doing joint_motion_search.

Change-Id: I7634d6d7a5e6f0a6998edb4d577dd047d80df3c8
2016-04-27 13:37:29 +01:00
Geza Lore
d29ec48504 Initialize dummy variables.
Valgrind flags these up as needed by handle_inter_mode.
Initializing fixes some assertion failures in the unit tests with
only ref-mv enabled.

Change-Id: I4d56c356692745dbecd9f790cdbb8dbfbaf72d55
2016-04-27 13:35:12 +01:00
Geza Lore
4e177393f0 Fix ext-tile without ext-partition.
Default case (when ext-partition was not configured) was incorrect
in encoder tile size initialization.

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

Change-Id: Ibe57cb1dc16b9fa300573816fc16d2d2f6849fc6
2016-04-27 11:14:48 +01:00
Yue Chen
88bb103f75 Merge "Optimization for EXT_INTER + OBMC" into nextgenv2 2016-04-27 06:29:38 +00:00
Yue Chen
3ac12aecc5 Optimization for EXT_INTER + OBMC
Remove the restriction that the neighboring predictor cannot be
used in obmc prediction if it is an interintra or wedgeinterinter
block. The inter predictor of the interintra block, or the first
inter predictor(using LAST or GOLDEN frame) of the wedgeinterinter
block will be exploited in obmc prediction.

Coding gain: 0.248% (2.833%->3.081%) lowres

Change-Id: I4ac0368b9d2f2956f266b30c1ac97db8bafa0742
2016-04-26 16:50:10 -07:00
Debargha Mukherjee
e5b8a01fd5 Merge "Reduce intra transform set" into nextgenv2 2016-04-26 23:32:16 +00:00
Yue Chen
02e941d371 Merge "Remove double counting for mv costs" into nextgenv2 2016-04-26 21:40:13 +00:00
Jingning Han
2f2448aec9 Merge "Rework motion vector precision limit" into nextgenv2 2016-04-26 21:31:10 +00:00
Yue Chen
34177e673d Remove double counting for mv costs
The bug is introduced by commit 1a0352d, in which mv costs are
counted twice in joint_motion_search() in ext_inter experiment.

Change-Id: Ibace453df999d3c2e781d73f1f0912038fee2d4e
2016-04-26 13:01:52 -07:00
Hui Su
3f7a709676 Merge "ext-intra: get rid of some floating operations." into nextgenv2 2016-04-26 18:53:33 +00:00
Jingning Han
8678ab4c55 Rework motion vector precision limit
This commit enables 1/8 luma component motion vector precision
for all motion vector cases. It improves the compression performance
of lowres by 0.13% and hdres by 0.49%.

Change-Id: Iccfc85e8ee1c0154dfbd18f060344f1e3db5dc18
2016-04-26 10:14:26 -07:00
Debargha Mukherjee
8851acc5ed Reduce intra transform set
Reduce transform set for intra for 8x8 and smalller to 7 from 12.
Also fixes an issue with prob updates.

Enocder Speed-up about 8-10%

Coding efficiency very little change.
lowres: -2.996 (from -3.055 before)
midres: -2.482 (from -2.552 before)

Change-Id: I4ba50ff967521b33c748fe423bd92f7cf4105ebc
2016-04-26 10:10:55 -07:00
Hui Su
1e93a3e64e Merge "Keep track of zcoeff_blk in tx size/type search" into nextgenv2 2016-04-26 16:41:50 +00:00
hui su
ad50c226e6 ext-intra: get rid of some floating operations.
No performance changes.

Change-Id: Idd4043090fec09e57520bc970ed2e39e6f7e1a5e
2016-04-25 14:44:42 -07:00
Debargha Mukherjee
022da62579 Merge "Clear X87 register state before using double." into nextgenv2 2016-04-25 21:42:23 +00:00
Yi Luo
333ff883e1 Merge "HBD hybrid transform 4x4 SSE4.1 optimization" into nextgenv2 2016-04-25 19:43:35 +00:00
Geza Lore
23c4116ebb Clear X87 register state before using double.
MMX and X87 floating point instructions cannot be mixed freely on
the 32 bit x86 architecture.

This fixes a lot of unit tests in the 32bit build with
--enable-ext-intra.

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

Change-Id: I0e1c3565f4b9cb4fc2d716e94d9c40e68b36fac8
2016-04-25 10:30:20 -07:00
Alex Converse
d4fe243cdf Merge "Raise the probability resolution for rANS tokens to 10-bits per symbol" into nextgenv2 2016-04-25 17:11:16 +00:00
Yi Luo
a4593f17ca HBD hybrid transform 4x4 SSE4.1 optimization
- Optimization on tx_type: DCT_DCT, DCT_ADST, ADST_DCT, ADST_ADST.
- Overall encoder speed improves ~4.5%-6%.
- Update bit-exact unit test against current C version.

Change-Id: If751c030612245b1c2470200c9570cf40d655504
2016-04-25 09:53:09 -07:00
Jingning Han
b4cbe54ed6 Merge "Fix out-of-bound memory access in loop filter" into nextgenv2 2016-04-25 16:13:04 +00:00
Jingning Han
221c09aa99 Merge "Refactor sub-pixel motion search" into nextgenv2 2016-04-25 16:12:51 +00:00
James Zern
0aa6435c45 vp10/rdopt: quiet unused variable warning
when CONFIG_REF_MV and CONFIG_EXT_INTER are enabled

Change-Id: I17fa2b5fe0e1878333099cc5fa2b1ee36636b4d3
2016-04-23 16:59:45 +00:00
Yue Chen
8ce563bf92 Merge "Fix EXT_INTER unit test failure in 32-bit builds" into nextgenv2 2016-04-23 16:51:08 +00:00
Jingning Han
004c7fa668 Fix out-of-bound memory access in loop filter
This commit fixes an out-of-bound memory access case in the
loop filter mask setting. This issue was introduced in

10232ed Refactor loopfilter level arrays to 2D.
https://chromium-review.googlesource.com/#/c/336645/

Change-Id: I7101a4a79b9ecfdd8ec5ef13a0b314cc95f48d12
2016-04-22 22:57:14 -07:00
Yue Chen
6daf1a460e Fix EXT_INTER unit test failure in 32-bit builds
Align new buffers that are used in interintra and wedgeinterinter prediction.
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1196

Change-Id: I1ef49fdf13c79a22cf8a1737e3d3052da0a92dfe
2016-04-22 22:37:13 -07:00
Jingning Han
cdf989adb7 Silence compiler above-boundary warnings
Change-Id: I6d806f92e8d38d5b0b01bc8e0fd97bd8839c84df
2016-04-22 15:49:34 -07:00
Alex Converse
1f57aa38cd Raise the probability resolution for rANS tokens to 10-bits per symbol
Change-Id: I397b5a9371c85d1df401d261143c985623e9def6
2016-04-22 15:48:11 -07:00
Jingning Han
77d451ecca Refactor sub-pixel motion search
Unify the rate cost used in the motion estimation process.

Change-Id: I8e52ca9f29eee3469553433302b62fb02a038919
2016-04-22 22:27:09 +00:00
Jingning Han
0dccc85c98 Replace left shift with multiplications
This avoids the potential risk in left shift of negative numbers.

Change-Id: I7aecb499ee6ce7342b172adc4741de5c6c107a24
2016-04-22 20:56:02 +00:00
Jingning Han
3f6ec144e5 Fix an enc/dec mismatch issue in ext-inter experiment
This commit fixes an encoding decision process issue that could
trigger enc/dec mismatch in the ext-inter experiment.

Change-Id: I6f10d1fd2fd1aa04e51df04c39a65cf72ac66c42
2016-04-22 20:49:29 +00:00
Yi Luo
cf7f00691f Change hybrid transform function argument from TXFM_2D_CFG* to int
Unit test shows manually developed SSE4.1 code would performs ~30%
  better if TXFM_2D_CFG configuration is set in lower level. This
  change only updates function signature. There is no performance
  impact.

Change-Id: I62692bd50a21ffc8a944bbd6c155c0a2020ad77b
2016-04-21 18:37:21 -07:00
Alex Converse
8f2fa04181 Unbreak the non-var_tx build.
Change-Id: I76cc3d88122de42f035fbf6508bdf3fd7c995012
2016-04-21 13:27:19 -07:00
Debargha Mukherjee
53968c3917 Merge "Fix uninitialized blk_skip for VAR TX." into nextgenv2 2016-04-21 19:56:17 +00:00
Alex Converse
67058089b4 Merge "Move ZERO_TOKEN into the ANS coef tokenset." into nextgenv2 2016-04-21 18:08:04 +00:00
Angie Chiang
7d598d658c Merge "relax txfm test error constraint" into nextgenv2 2016-04-20 02:17:40 +00:00
Alex Converse
fcea1485bb Merge "Store ANS token CDFs in the FRAME_CONTEXT rather than in a global table." into nextgenv2 2016-04-19 23:29:14 +00:00
Alex Converse
3829cd2f2f Move ZERO_TOKEN into the ANS coef tokenset.
Change-Id: I87943e027437543ab31fa3ae1aa8b2de3a063ae5
2016-04-19 15:29:47 -07:00
Jingning Han
1a0352d18e Merge "Handle zero motion vector residual" into nextgenv2 2016-04-19 21:20:08 +00:00
Hui Su
1e02f2e8a4 Merge "Adjust optimize_b RD parameters" into nextgenv2 2016-04-19 21:18:50 +00:00
Hui Su
ee8c72d95a Merge "Enable optimize_b for intra blocks" into nextgenv2 2016-04-19 21:18:37 +00:00
Angie Chiang
aea0cc5041 Merge "Change the naming of txfm#d_test" into nextgenv2 2016-04-19 19:52:03 +00:00
Angie Chiang
218dfbd547 Change the naming of txfm#d_test
Change-Id: I151b18b38f7a000fb6e431cd42675ac4e7e9e3ca
2016-04-19 11:59:00 -07:00
hui su
7dffb43267 Keep track of zcoeff_blk in tx size/type search
Prevent potential problems when per transform block
zero forcing is re-enabled (a To-Do).

Change-Id: I03b0ab2a86d88058441f2ca18994cfd2e6329898
2016-04-19 11:45:11 -07:00
Yue Chen
feb2184c4e Merge "Remove an unsuccessful adaption of overlap sizes in obmc experiment" into nextgenv2 2016-04-19 18:41:02 +00:00
hui su
ad59b08f76 Adjust optimize_b RD parameters
Coding gain:
lowres  0.44%
midres  0.24%
hdres   0.32%

Change-Id: Ie558203b2b2bf5c16cd49b114df3d696c4f35049
2016-04-19 09:54:08 -07:00
hui su
e43c21112d Enable optimize_b for intra blocks
Coding gain:
lowres  0.05%
midres  0.10%
hdres   0.18%

Change-Id: I508b150c02588f911a8ddddfe73c770f0819fe10
2016-04-19 09:50:45 -07:00
Alex Converse
6ca364606b Store ANS token CDFs in the FRAME_CONTEXT rather than in a global table.
This will facilitate bringing the zero node into the token set while
allowing its probability to vary independently.

Change-Id: I57b44c0fce44debb8e612021e44713b229d1b3cf
2016-04-19 09:39:48 -07:00
Alex Converse
ab759be8d9 Merge "Use an exponential growth approach for the ANS reversal buffer." into nextgenv2 2016-04-19 16:39:18 +00:00
Geza Lore
7aa95be980 Fix uninitialized blk_skip for VAR TX.
x->blk_skip used to be uninitialized (leftover from encoding the
previous block), if cm->tx_mode != TX_MODE_SELECT (which is used with
higher --cpu-used or --rt options). This resulted in degraded coding
performance when using cm->tx_mode != TX_MODE_SELECT.

This fixes the VP10/EndToEndTestLarge.EndtoEndPSNRTest/40 unit test.

Also fixed an edge effect where encode_block in encodemb.c used the
formal width of the block (without cropping at the right edge), to
look up blk_skip, while select_tx_block in rdopt.c used the cropped
width to set blk_skip.

Change-Id: I76d0f49ac5ab3ab54203573e0d7fcfcc1c6aa10d
2016-04-19 17:00:20 +01:00
Yaowu Xu
efc6aa0c97 Merge "Merge branch 'master' into nextgenv2" into nextgenv2 2016-04-19 15:43:58 +00:00
Geza Lore
8d64b53dc8 Revert "Fix uninitialized blk_skip for VAR TX."
This reverts commit e7b89d88354708790211ff3949fdc705a4fa1672.
2016-04-19 15:41:56 +01:00
Geza Lore
e7b89d8835 Fix uninitialized blk_skip for VAR TX.
x->blk_skip used to be uninitialzied (leftover from encoding the
previous block), if cm->tx_mode != TX_MODE_SELECT (which is used with
higher --cpu-used or --rt options). This resulted in degraded coding
performance when uning cm->tx_mode != TX_MODE_SELECT.

This fixes the VP10/EndToEndTestLarge.EndtoEndPSNRTest/40 unit test.

Change-Id: If39062927446798c626fc93694b4e6a4f35fa5da
2016-04-19 14:22:48 +01:00
Jingning Han
ec2ffda599 Handle zero motion vector residual
This commit handles the zero motion vector residuals for single
and compound reference modes, respectively. It improves the coding
performance by 0.13% with no additional encoding complexity.

Change-Id: I16075a836025bd2746da2ff4698fb9261e4b08c1
2016-04-18 18:14:01 -07:00
Yi Luo
3cf1a082e0 Merge "Disable HBD 4x4 DCT_DCT HT test" into nextgenv2 2016-04-18 23:07:25 +00:00
Yue Chen
c0fd271932 Remove an unsuccessful adaption of overlap sizes in obmc experiment
We removed this adaption, which intended to reduce the size of
overlapped region if the neighboring block is a non-skip one. Thus,
now the width/height of the overlapping region is fixed as a half of
the current block.

Performance improvement (lowres/midres): 0.111%/0.102%

Change-Id: Ife75dad9d4eb355c78a05178b50cc015c442884f
2016-04-18 15:27:59 -07:00
Yaowu Xu
ed04e82a04 Merge branch 'master' into nextgenv2
Conflicts:
	vp10/common/scan.c
	vp9/common/vp9_pred_common.c
	vp9/decoder/vp9_decoder.c

Change-Id: Id559d98ea676da15d60ed464ddb6c48d3eed1111
2016-04-18 15:15:05 -07:00
Jingning Han
2aa6117bda Refactor transform selection process
This commit re-arranges the transform type and size selectio
process. It removes an unnecessary rate-distortion cost computation
step. Local experiments show that this speeds up the encoding
process by 6% for both the baseline and the ext-intra experiment.

Change-Id: Iab3b86a63a1e9e55548466791ed5d29a0575c1e7
2016-04-18 19:45:56 +00:00
Jingning Han
c5449d3eb7 Merge "Refactor rd_variance_adjustment function" into nextgenv2 2016-04-18 19:45:45 +00:00
Angie Chiang
caf066f845 Merge changes I67543d36,I763f2924 into nextgenv2
* changes:
  Reduce shift in txfm8x8
  Let txfm's constant bit be the same for each stage
2016-04-18 19:40:33 +00:00
Yi Luo
dd04329367 Disable HBD 4x4 DCT_DCT HT test
- HBD HT unit tests will be modified to test against new algorithm.

Change-Id: Iba58eeb21a45612685c93c98d7c846dab25e6638
2016-04-18 12:24:31 -07:00
Angie Chiang
d72560e10d Merge "Fit adst/dct's stage range into 32-bit in bd12" into nextgenv2 2016-04-18 18:40:28 +00:00
Angie Chiang
cf3ef18fc4 Merge "Remove double operation from tx_size selection" into nextgenv2 2016-04-18 18:11:36 +00:00
Yi Luo
a431a93cb1 Merge "Improvement on hybrid transform 4x4 DCT_DCT SSE4.1 optimization" into nextgenv2 2016-04-18 18:04:06 +00:00
Angie Chiang
6de4a77df3 Remove double operation from tx_size selection
This CL fix the bug
rdopt.c:1687: choose_tx_size_from_rd: Assertion
`mbmi->tx_type == DCT_DCT' failed

It is caused by
1) mms register access before double operation
2) different compiler behaviors
code:
  int64_t a = INT64_MAX;
  double b = 1. * INT64_MAX;
  printf("a < b: %d\n", a < b);
result:
  a < b: 0

code:
  --target=x86-linux-gcc
  int64_t a = INT64_MAX;
  double b = 1. * INT64_MAX;
  printf("a < b: %d\n", a < b);
result:
  a < b: 1

I remove the double operation and test it with EXT_TX experiment.
The psnr change is around 0.05%, which is considered as noise level.

Change-Id: If8935c70c8603617fcfa8571accd30ccdda786a0
2016-04-18 11:00:13 -07:00
Jingning Han
c8312daad1 Refactor rd_variance_adjustment function
Compute the reconstruction variance in the prediction mode search.

Change-Id: Id9c7635a9c9f5383e61c0e427e95234211834301
2016-04-18 09:37:34 -07:00
Yue Chen
16a99e967c Merge "Optimization for EXT_INTER + OBMC combination" into nextgenv2 2016-04-17 18:54:33 +00:00
Yue Chen
321794c4d5 Optimization for EXT_INTER + OBMC combination
In the rd loop, check the perf of obmc, whose mv is copied from regular
inter predictor, when wedge interinter is better than regular inter
(previously it will force allow_obmc = 0). The condition of the early
termination before this step is relaxed to avoid skipping too many obmc
predictions. The rates of the overhead are properly calculated for these tools.

The logic of the bitstream syntax:
(a single ref) the interintra flag is sent first, only if it is 0, we
send the obmc flag;
(compound refs) the obmc flag is sent first, only if it is 0, we send
the wedge interinter flag

Coding gain
lowres: 0.428% (2.287%->2.715%)

Change-Id: I5f3a34640b398e313cbf84235c9fe2073eb2173f
2016-04-15 17:03:20 -07:00
Yi Luo
71fa2b2218 Merge "Fix an unaligned memory allocation in HT 4x4 speed test" into nextgenv2 2016-04-15 23:56:21 +00:00
Angie Chiang
e7f64756a1 Merge "remove redundant header" into nextgenv2 2016-04-15 22:44:33 +00:00
Angie Chiang
8de8499cc9 remove redundant header
Change-Id: Ib0e880c341adebb238f43a6caeb661e2094e7a93
2016-04-15 15:34:05 -07:00
Angie Chiang
1b0092a76e relax txfm test error constraint
The error is increases because we reduce the const bit
of txfm

Change-Id: I0235a3fdb7dc6a4c0cd1c8cebb369df2a5071b94
2016-04-15 15:25:53 -07:00
Yi Luo
f53ecc21b0 Fix an unaligned memory allocation in HT 4x4 speed test
- Allocate 16-byte aligned memory.
- Disable speed test in unit tests.

Change-Id: Ibef734f4b9d39ad50e9b2e8e0a5d74565d57b409
2016-04-15 14:59:31 -07:00
Yi Luo
f095ea7dd6 Improvement on hybrid transform 4x4 DCT_DCT SSE4.1 optimization
- Implemented Angie's new fwd txfm algorithm.
- Improve ~100% than last 64-bit version; 3 times faster than
  original C code.
- Passed bit-exact unit test.

Change-Id: Ica30b9768706604a6d69fe42da778441f0f5f02e
2016-04-15 14:16:30 -07:00
Jingning Han
4d503d1043 Remove duplicated TxfmFunc declarations
Change-Id: If3876610a1fbce0988cc21ea917596bbb467df93
2016-04-15 12:03:21 -07:00
Zoe Liu
9638ee1f4e Merge "Fix segfault with --cpu-used >= 3 and ext-refs." into nextgenv2 2016-04-15 16:41:15 +00:00
Geza Lore
77d197e635 Fix segfault with --cpu-used >= 3 and ext-refs.
With ext-ref enabled, it is possible that when trying to encode the
first true ALTREF frame after a keyframe, the previous ALTREF frame
(alias for the keyframe) is the same as one of the new LAST{2,3,4}
reference frames, and hence cpi->ref_frame_flags will have the ALTREF
bit clear, as computed by get_ref_frame_flags in encoder.c.

sf->alt_ref_search_fp forces the previous ALTREF frame to
be used as the only possible  reference when encoding a new ALTREF
frame, but due to cpi->ref_frame_flags, some buffers will not be
initialized (see rdopt.c:7689 yv12_mb), leading to a segfault.

get_ref_frame_flags in encoder.c has been changed to prefer to keep
the  LAST frame, then the ALTREF frame, then any of the LAST{2,3,4}
frames and then the GOLDEN frame in that order of preference in case
any of them are the same. This avoids the segfault and behaves the
same for the baseline.

Change-Id: I4da1991667614009da5d3061a6316c0d5dbc6c0c
2016-04-15 11:17:22 +01:00
Angie Chiang
0a715add2e Reduce shift in txfm8x8
Change-Id: I67543d365cbef3c3e113f01660ae8cb744cc556d
2016-04-14 19:12:22 -07:00
Angie Chiang
dfa532cc2a Let txfm's constant bit be the same for each stage
Change-Id: I763f2924afca526db371231bca18b38879bdf793
2016-04-14 15:46:54 -07:00
Angie Chiang
02d23fbbf4 Fit adst/dct's stage range into 32-bit in bd12
Change-Id: Ie428c6f0655873de3e77e844a2f2e4203cf47dff
2016-04-14 15:44:05 -07:00
Jingning Han
019683e963 Merge "Clean up motion vector precision check in the encoding process" into nextgenv2 2016-04-14 20:55:51 +00:00
Jingning Han
79bef030f2 Merge "Apply motion vector precision check to candidate mv" into nextgenv2 2016-04-14 20:55:45 +00:00
Jingning Han
03a468f9ac Merge "Enable mode conversion in sub8x8 block" into nextgenv2 2016-04-14 19:01:15 +00:00
Alex Converse
031fd260f1 Merge "Disable the TestSuperframeIndexIsOptional test with ANS." into nextgenv2 2016-04-14 18:57:28 +00:00
Jingning Han
6af8f63d96 Clean up motion vector precision check in the encoding process
Remove unnecessary motion vector precision check in the encoding
process.

Change-Id: Ica32933c7d138f499f36b1dedec14c894b27d85a
2016-04-14 11:37:19 -07:00
Jingning Han
525995a3d9 Apply motion vector precision check to candidate mv
This avoids repeatedly checking the candidate motion vector
precision level at the decoder end. The compression performance
varies at 0.01% level.

Change-Id: I4a88e95decd900d0cac9a0c2e70ba43ef7ecac38
2016-04-14 09:44:41 -07:00
Jingning Han
cd39224cff Merge "Speed up dynamic motion vector referencing system" into nextgenv2 2016-04-14 16:16:43 +00:00
Hui Su
436a6cc4e7 Merge "ext-tx: use raster scan order for identity transform" into nextgenv2 2016-04-13 23:52:35 +00:00
Jingning Han
885a81f468 Merge "Fix a few mis-use cases of MAX_MV_REF_CANDIDATES" into nextgenv2 2016-04-13 23:44:25 +00:00
Angie Chiang
716f0ea3cf Merge changes I92819356,I50b5a313,I807e60c6,I8a8df9fd into nextgenv2
* changes:
  Branch dct to new implementation for bd12
  Change dct32x32's range
  Fit dct's stage range into 32-bit when bitdepth is 12
  Pass tx_type into get_tx_scale
2016-04-13 23:24:41 +00:00
Alex Converse
91c985fc28 Merge "Convert some vpx boolcoder calls back to vp10 generic calls." into nextgenv2 2016-04-13 23:04:17 +00:00
Hui Su
85a3f5b740 Merge "Speed-up in tx_size search" into nextgenv2 2016-04-13 23:02:21 +00:00
Jingning Han
9a1a8f1d8e Speed up dynamic motion vector referencing system
Skip transform type search in modes with ref_mv_idx > 0. This
brings down the additional encoding time cost due to the DMR system
from 32% to 17%, at minimal coding performance regression.

Change-Id: Ie82e1d2831a313c6f1e47f7da221b51345023eb3
2016-04-13 15:51:36 -07:00
Jingning Han
f33a0a8215 Fix a few mis-use cases of MAX_MV_REF_CANDIDATES
Fix several use cases where MAX_MV_REF_CANDIDATES is mixed up with
is_compound flag to avoid potential coding interruption.

Change-Id: Ifdee1ef8a81ef6d1c155315c6c6a3074aa7a8b5e
2016-04-13 15:16:55 -07:00
Alex Converse
5d2b0f93b9 Use an exponential growth approach for the ANS reversal buffer.
Memory constrained hardware can window the data via our standard windowing
mechanism, tiles.

Change-Id: Ib1cfd157604a8c9d9f9a9f2b0ba3bc2fd0643082
2016-04-13 15:16:29 -07:00
Alex Converse
c3688e398c Disable the TestSuperframeIndexIsOptional test with ANS.
Change-Id: Id55a741e2015c4e01d156d3fe5319498b016b9cf
2016-04-13 14:58:40 -07:00
Jingning Han
e07dbaa2f5 Enable mode conversion in sub8x8 block
Convert the newmv mode into reference motion vector modes.

Change-Id: I51bd2543dafb70345c1340fba700b44f67f20853
2016-04-13 14:35:54 -07:00
Zoe Liu
1d043d56da Merge "Make ext-refs respect encoding flags." into nextgenv2 2016-04-13 19:31:30 +00:00
Debargha Mukherjee
200e50568b Merge "Fix 2 warning when building with GCC 5." into nextgenv2 2016-04-13 19:28:25 +00:00
hui su
6a7ddd84bb Speed-up in tx_size search
Do not consider 4x4 transform when the maximum possible transform
size is 32x32.

Overall encoding speed is increased by more than 10%. Compression
performance is neutral on lowres, midres, and hdres.

Change-Id: Ifac61c3c9f4b0ab392bffd4d1faa373d91014cf1
2016-04-13 10:19:00 -07:00
hui su
b72aa72a90 ext-tx: use raster scan order for identity transform
coding gain of ext-tx:
screen_content 12.73% -> 13.05%

Change-Id: I5fc8cf0db84c3e56dd3cb7675e1d81c9c575bc57
2016-04-13 09:42:43 -07:00
Alex Converse
70bd058352 Merge "Fix the tree diagram comment." into nextgenv2 2016-04-13 16:14:18 +00:00
Geza Lore
c50aaf3049 Make ext-refs respect encoding flags.
The VP8_EFLAG_NO_UPD_LAST and VP8_EFLAG_NO_REF_LAST flags can be
passed to the encoder to signal that it should not update/reference
the LAST ref frame when encoding the current frame. With
--enable-ext-refs turned on, the new LAST2 LAST3 and LAST4 ref frames
could still be used or updated, which causes the
  VP10/ErrorResilienceTestLarge.DropFramesWithoutRecovery/{0,1,2}
tests to fail.

With this patch, if --enable-ext-refs is used, then
VP8_EFLAG_NO_UPD_LAST and VP8_EFLAG_NO_REF_LAST also applies to the
new LAST2 LAST3 and LAST4 ref frames, as well as the LAST ref frame.

Change-Id: If482b1c09bbaf914eca8e0348a2367bff261661d
2016-04-13 12:03:58 +01:00
Geza Lore
c6cf7a6111 Fix 2 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
2016-04-13 10:49:52 +01:00
Alex Converse
c1729d12b8 Merge "ANS: Remove extra buffer size checks causing a false decode error." into nextgenv2 2016-04-13 01:37:05 +00:00
Alex Converse
af56299119 Fix the tree diagram comment.
Clear up a multiline comment warning and clarify the comment.

Change-Id: Ie0277b4ed4a088a9751e6998f2aeae57d302e6d4
2016-04-12 16:57:08 -07:00
Hui Su
9e8cad3be7 Merge "Add vp10_ prefix to full_to_model_counts and fill_token_costs" into nextgenv2 2016-04-12 23:38:47 +00:00
Alex Converse
493a585273 ANS: Remove extra buffer size checks causing a false decode error.
The minimal ans partition size is now one byte. This is checked in
ans_read_init().

The read_is_valid() condition is handled by setup_token_decoder().

Change-Id: I7b202b896630bc4285532208bf7cf84567afe158
2016-04-12 15:19:30 -07:00
Yi Luo
6db95602e4 Merge "Optimized HBD block subtraction for all block sizes" into nextgenv2 2016-04-12 21:22:32 +00:00
Debargha Mukherjee
ec1365a0c9 Merge "Extend variance based partitioning to 128x128 superblocks" into nextgenv2 2016-04-12 19:42:35 +00:00
Yi Luo
0f80b1f754 Optimized HBD block subtraction for all block sizes
- Interface function takes a local MxN function to call based on the
  block size.
- Repetition call (w/o cache line miss) shows improvement:
  ~63% - ~340%.
- Overall encoder speed improvement: ~0.9%.

Change-Id: Ieff8f3d192415c61d6d58d8b99bb2a722004823f
2016-04-12 12:04:43 -07:00
hui su
0792748646 Add vp10_ prefix to full_to_model_counts and fill_token_costs
Change-Id: I5e6c644fb09f7a80c88142dfdfa05cf5be260241
2016-04-12 11:06:47 -07:00
Angie Chiang
027d12b7d6 Merge changes I359aa49c,Ic8ca5afb into nextgenv2
* changes:
  Generalize txfm scale in highbd quantizer
  Parameterize transform scale for quantizer
2016-04-12 18:02:05 +00:00
Alex Converse
e7224b7866 Convert some vpx boolcoder calls back to vp10 generic calls.
Change-Id: I362f753ff42d4c4fb94df2419cdaad423d7a4229
2016-04-12 11:00:52 -07:00
Geza Lore
61af8981b0 Extend variance based partitioning to 128x128 superblocks
Change-Id: I41edf266d5540a9b070a5e65bc397dd3da210507
2016-04-12 09:40:11 +01:00
Debargha Mukherjee
648538959d Merge "Use reduced transform set for 16x16" into nextgenv2 2016-04-11 23:32:29 +00:00
Debargha Mukherjee
c4da5d500e Use reduced transform set for 16x16
Speed increase for ext-tx by 20% for a BDRATE drop of 0.26%.
The ext-tx expt becomes -2.66% BDRATE (reduced from -2.92%) for
the lowres set.

It turns out that reducing the set of transforms for intra from
12 to 5 makes very little difference in coding performance (~0.04%).
Most of the performance drop comes from the reduction is transform
set for inter. Currently there is a provision to control that with
a macro.

Change-Id: I7de05527bf72f96acc1e0ab8a74a849da0a141e5
2016-04-11 13:04:41 -07:00
Sarah Parker
33ccd0f85e Merge "Fix prune one and two to make compatible with new transforms" into nextgenv2 2016-04-11 17:12:28 +00:00
Yi Luo
fd367c243e Merge "Some cosmetic improvements since HBD variance 4x4 optimization" into nextgenv2 2016-04-11 16:04:02 +00:00
Yi Luo
4c792f2814 Merge "Add unit tests for HBD variance 4x4 SSE4.1 optimization" into nextgenv2 2016-04-11 16:03:38 +00:00
Debargha Mukherjee
9930a00ed7 Merge "Refactor PC_TREE root handling." into nextgenv2 2016-04-09 13:33:53 +00:00
Debargha Mukherjee
38b26b0dc3 Merge "Make subpel masked motion work with upsampled refs" into nextgenv2 2016-04-09 13:30:09 +00:00
Hui Su
5e558121fe Merge "Changes to scan order neighbors" into nextgenv2 2016-04-08 21:18:16 +00:00
Hui Su
7fcf94eb23 Merge "Reformat scan order neighbors" into nextgenv2 2016-04-08 20:57:50 +00:00
Sarah Parker
19e3c6415c Fix prune one and two to make compatible with new transforms
Update svm parameters with training data using new transforms
and remove DST from pruning functions.

Change-Id: I7bd1c4744455d571c1ecfb4cea14c25ac291f002
2016-04-08 11:47:48 -07:00
Yi Luo
c249689b48 Add unit tests for HBD variance 4x4 SSE4.1 optimization
Change-Id: Ib4ceb53cbbc35ecb4e55d74bed30282310075004
2016-04-08 11:16:30 -07:00
hui su
f94d699c09 Changes to scan order neighbors
-Fix some bugs in row_scan and col_scan. In some cases, the above
or left neighbor was not considered even though it is available.

-When above or left neighbor is not available, try using the
top-left, top-right or bottom-left neighbor.

Compression improvement:
lowres   0.20%
midres   0.16%
hdres    0.20%

Change-Id: If521665589c7f29277b8e9223f21f4a8bf3fef39
2016-04-08 11:08:57 -07:00
hui su
b76118b736 Reformat scan order neighbors
Change-Id: Iafcd080612012b08f3cbff45335c12f434543f38
2016-04-08 10:50:13 -07:00
Yi Luo
e5f4e8eab9 Some cosmetic improvements since HBD variance 4x4 optimization
Change-Id: I414c1fabd2e3a9b1d9daa8a90f85a0bace8bd3cd
2016-04-08 10:32:13 -07:00
Geza Lore
f2be4f6058 Refactor PC_TREE root handling.
Change-Id: Id8b16c1b18bd6f909e72aae3fd582dd3503c88c6
2016-04-08 17:01:00 +01:00
Debargha Mukherjee
c485b10416 Make subpel masked motion work with upsampled refs
Change-Id: Id483354e73e983793370b55a1a6a1f2dcd137dc9
2016-04-08 08:54:58 -07:00
Alex Converse
bb0e692151 Convert palette from double to float.
About 20% less time spent coding in vp10_k_means().

Change-Id: I5cf7605cde869a269776197bace70de353b07d83
2016-04-07 15:17:30 -07:00
Alex Converse
d1327aec1b Add roundf and lroundf replacements for VS < 2013.
Change-Id: I25678279ab44672acf680bf04d9c551156e2904b
2016-04-07 15:17:30 -07:00
Geza Lore
454989ff32 Make superblock size variable at the frame level.
The uncompressed frame header contains a bit to signal whether the
frame is encoded using 64x64 or 128x128 superblocks. This can vary
between any 2 frames.

vpxenc gained the --sb-size={64,128,dynamic} option, which allows the
configuration of the superblock size used (default is dynamic). 64/128
will force the encoder to always use the specified superblock size.
Dynamic would enable the encoder to choose the sb size for each
frame, but this is not implemented yet (dynamic does the same as 128
for now).

Constraints on tile sizes depend on the superblock size, the following
is a summary of the current bitstream syntax and semantics:

If both --enable-ext-tile is OFF and --enable-ext-partition is OFF:
     The tile coding in this case is the same as VP9. In particular,
     tiles have a minimum width of 256 pixels and a maximum width of
     4096 pixels. The tile width must be multiples of 64 pixels
     (except for the rightmost tile column). There can be a maximum
     of 64 tile columns and 4 tile rows.

If --enable-ext-tile is OFF and --enable-ext-partition is ON:
     Same constraints as above, except that tile width must be
     multiples of 128 pixels (except for the rightmost tile column).

There is no change in the bitstream syntax used for coding the tile
configuration if --enable-ext-tile is OFF.

If --enable-ext-tile is ON and --enable-ext-partition is ON:
     This is the new large scale tile coding configuration. The
     minimum/maximum tile width and height are 64/4096 pixels. Tile
     width and height must be multiples of 64 pixels. The uncompressed
     header contains two 6 bit fields that hold the tile width/heigh
     in units of 64 pixels. The maximum number of tile rows/columns
     is only limited by the maximum frame size of 65536x65536 pixels
     that can be coded in the bitstream. This yields a maximum of
     1024x1024 tile rows and columns (of 64x64 tiles in a 65536x65536
     frame).

If both --enable-ext-tile is ON and --enable-ext-partition is ON:
     Same applies as above, except that in the bitstream the 2 fields
     containing the tile width/height are in units of the superblock
     size, and the superblock size itself is also coded in the bitstream.
     If the uncompressed header signals the use of 64x64 superblocks,
     then the tile width/height fields are 6 bits wide and are in units
     of 64 pixels. If the uncompressed header signals the use of 128x128
     superblocks, then the tile width/height fields are 5 bits wide and
     are in units of 128 pixels.

The above is a summary of the bitstream. The user interface to vpxenc
(and the equivalent encoder API) behaves a follows:

If --enable-ext-tile is OFF:
     No change in the user interface. --tile-columns and --tile-rows
     specify the base 2 logarithm of the desired number of tile columns
     and tile rows. The actual number of tile rows and tile columns,
     and the particular tile width and tile height are computed by the
     codec ensuring all of the above constraints are respected.

If --enable-ext-tile is ON, but --enable-ext-partition is OFF:
     No change in the user interface. --tile-columns and --tile-rows
     specify the WIDTH and HEIGHT of the tiles in unit of 64 pixels.
     The valid values are in the range [1, 64] (which corresponds to
     [64, 4096] pixels in increments of 64.

If both --enable-ext-tile is ON and --enable-ext-partition is ON:
     If --sb-size=64 (default):
         The user interface is the same as in the previous point.
         --tile-columns and --tile-rows specify tile WIDTH and HEIGHT,
         in units of 64 pixels, in the range [1, 64] (which corresponds
         to [64, 4096] pixels in increments of 64).
     If --sb-size=128 or --sb-size=dynamic:
         --tile-columns and --tile-rows specify tile WIDTH and HEIGHT,
         in units of 128 pixels in the range [1, 32] (which corresponds
         to [128, 4096] pixels in increments of 128).

Change-Id: Idc9beee1ad12ff1634e83671985d14c680f9179a
2016-04-07 10:34:25 +01:00
Angie Chiang
6161f35037 Fix compile error of vp10_fwd_txfm2d_sse4_test.cc
Change-Id: I14a0821631e404d59a1121f7517f97de8d6f790f
2016-04-06 16:26:04 -07:00
Angie Chiang
24f9e42f69 Merge "Test c version in vp10_fwd_txfm2d_test.cc" into nextgenv2 2016-04-06 22:18:23 +00:00
Angie Chiang
6e16582dfd Merge "Put vp10_txfm_test.h into libvpx_test namespace" into nextgenv2 2016-04-06 21:58:08 +00:00
Angie Chiang
29a06a1733 Put vp10_txfm_test.h into libvpx_test namespace
Change-Id: I32ff059143d777fa4518d8e404ff16c890c7fecb
2016-04-06 10:29:27 -07:00
Julia Robson
4300e50cce Fixing assertion in *Large unit tests
In certain cases the code was subtracting the obmc cost
despite it not having been added previously.
For example with ref_mv, supertx, ext_inter, obmc & ext_refs
enabled the following test was failing but now passes:
"VP10/ArfFreqTestLarge.MinArfFreqTest/33"

Change-Id: I966853f34c18d5a1d4c7a56fa201c1b02973fc88
2016-04-06 11:22:10 +01:00
Julia Robson
0f05873c89 Fixing error when building with ref_mv experiment
Code was using variable that was only defined when
var_tx was also enabled

Change-Id: Ide02ff99b433bfc5c95b71e700c66562020cedae
2016-04-06 11:22:10 +01:00
Debargha Mukherjee
de3d15bb2c Merge "Refactoring and cosmetic changes to ext-inter expt" into nextgenv2 2016-04-06 01:19:06 +00:00
Angie Chiang
01862037c8 Test c version in vp10_fwd_txfm2d_test.cc
Change-Id: I6d9a5f790e984d76d0a5af4ca32ccc1c582805ee
2016-04-05 18:03:13 -07:00
Debargha Mukherjee
0fc82ea1cf Refactoring and cosmetic changes to ext-inter expt
Change-Id: Icd457480744b7734b3c412c9fed43be738373334
2016-04-05 15:16:18 -07:00
Yi Luo
c3e07b22c4 Fix high bit depth mask and variance reference function
- Use arithmetic AND (&) instead of logical AND (&&) to
  generate correct testing input.
- Fix variance reference function to be consistent with
  our codebase implementation.
- Refer to the following issue:
https://bugs.chromium.org/p/webm/issues/detail?id=1166

Change-Id: I8c1ebb03e22dc9e1dcd96bdf935fc126cee71307
2016-04-05 12:58:06 -07:00
Yi Luo
e6b089be43 Merge "Optimized HBD 4x4 variance calculation" into nextgenv2 2016-04-05 18:41:09 +00:00
Geza Lore
8917146a12 Fix supertx with ext-tile.
Change-Id: Ic2135c3812be009085c7c8e8dc15ee2ba618a67e
2016-04-05 12:49:55 +01:00
Angie Chiang
ff8c490b9a Branch dct to new implementation for bd12
Change-Id: I9281935653aacce22ac3100f79fb956c249e2bf3
2016-04-04 12:40:10 -07:00
Yi Luo
250935cab3 Optimized HBD 4x4 variance calculation
vpx_highbd_8/10/12_variance4x4_sse4_1 improves performance ~7%-11%.

Change-Id: Ida22bb2a2f7a58037cfd73e186d4f6267a960c02
2016-04-04 11:28:59 -07:00
Angie Chiang
f1060f5bc4 Change dct32x32's range
Bitdepth 10/12:
Fit coefficient range into 32 bits
Fit codfficient * const range into 32 bits

Bitdepth 8:
Fit coefficient range into 16 bits
Fit codfficient * constant range into 32 bits

Change-Id: I50b5a3132e8a9f5155c971ab0f6eb52876d2b5ca
2016-04-04 11:21:11 -07:00
Angie Chiang
39b3c025fa Fit dct's stage range into 32-bit when bitdepth is 12
Change-Id: I807e60c6dcacc50c087adcbdb1df022f8541efc5
2016-04-04 11:13:44 -07:00
Geza Lore
f0290cd127 Refactor get_partition to be universal.
Change-Id: I3a2fe4073bb94c5afc24d9274e6edcdb3aed934f
2016-04-04 15:22:25 +01:00
Geza Lore
e0dbfdeedc Minor refactoring of partition type processing.
Change-Id: Idcb1e94298d4b7d8832d285548ec2d2ced4b2988
2016-04-04 14:51:10 +01:00
Angie Chiang
75ae90f7a9 Pass tx_type into get_tx_scale
Change-Id: I8a8df9fdefa492f66cf2cd29b0b081ad69b5d85e
2016-04-01 12:53:10 -07:00
Alex Converse
d649065ea3 Merge "Remove duplicate ans parameter in bitstream functions." into nextgenv2 2016-04-01 18:35:11 +00:00
Alex Converse
c961bcc594 Merge "ANS experiment: Use ANS everywhere." into nextgenv2 2016-04-01 18:34:50 +00:00
Alex Converse
0f68d80420 Remove duplicate ans parameter in bitstream functions.
Change-Id: Icd459209dae328f90c9a875259fe5d201b2a4e45
2016-04-01 11:33:06 -07:00
Alex Converse
fb9186d68d ANS experiment: Use ANS everywhere.
Use ANS for all entropy coded data in VP10 including the compressed header and
modes and motion vectors. ANS tokens continue to be used for DCT tokens.

Change-Id: Idf709a747150601e4d95d81ecfb3dc7253d349df
2016-04-01 11:32:31 -07:00
Debargha Mukherjee
2fba8189de Merge "Loopfilter fix" into nextgenv2 2016-04-01 17:48:09 +00:00
Angie Chiang
9f879b3c5f Merge "change vp10_fwd_txfm2d_#x#_sse2 to vp10_fwd_txfm2d_#x#_sse4_1" into nextgenv2 2016-04-01 17:25:23 +00:00
Angie Chiang
2c2b9bd455 Merge "Remove redundant code from vp10_fwd_txfm2d.c" into nextgenv2 2016-04-01 17:25:13 +00:00
Angie Chiang
1b755039c6 Merge "Simplify rounding in vp10_[fwd/inv]_txfm[1/2]d_#x#" into nextgenv2 2016-04-01 17:24:50 +00:00
Angie Chiang
0a9eedfbef Merge "Add vp10_fwd_txfm2d_sse2" into nextgenv2 2016-04-01 17:24:34 +00:00
Debargha Mukherjee
f7457f5e89 Loopfilter fix
Fixes mismatch introduced in
https://chromium-review.googlesource.com/#/c/336645

Change-Id: I15cded221c18dbf87b5029bc464e975d5c7c40e3
2016-03-31 19:57:42 -07:00
Yaowu Xu
a416d5bd2d Fix a build issue
Change-Id: Ifdb32c487632098496bf59fcc76c518f8f0426d2
2016-03-31 16:06:24 -07:00
Debargha Mukherjee
2a6389bb8b Merge "Fix interpolation values and decouple interintra" into nextgenv2 2016-03-31 21:47:10 +00:00
Debargha Mukherjee
2be211e971 Fix interpolation values and decouple interintra
Decouples interintra modes and probability models from regular
intra modes, to enable creating/optimizing new interintra modes.
Also, fixes interpolation values for 128x128 interintra and obmc.

Change-Id: I5c2016db49b8f029164e5fe84c6274d4e02ff90e
2016-03-31 12:12:51 -07:00
Debargha Mukherjee
6d3fc82b7f Merge changes Id20526d0,Iee08d975 into nextgenv2
* changes:
  Refactor loopfilter level arrays to 2D.
  Rename MI_BLOCK_SIZE and MI_MASK macros.
2016-03-31 18:48:20 +00:00
Yi Luo
48aa76ac35 Fixed HBD variance unit test on incorrect bit mask operation
- Change logical AND (&&) to arithmetic AND (&).
- Disable failed unit tests for next-step fixing.
https://bugs.chromium.org/p/webm/issues/detail?id=1166

Change-Id: I75cf8d114fa995731ae1cf4c782b134781274a1f
2016-03-31 09:17:59 -07:00
Jingning Han
aae7e0f6a4 Merge "Refactor the sub8x8 block motion search control" into nextgenv2 2016-03-31 15:50:38 +00:00
Geza Lore
10232eda8e Refactor loopfilter level arrays to 2D.
Change-Id: Id20526d0b6d1371dc9f45cb8b5f24b6974da7bc4
2016-03-31 15:52:12 +01:00
Geza Lore
511da8cbe5 Rename MI_BLOCK_SIZE and MI_MASK macros.
Rename MI_BLOCK_SIZE.* -> MAX_MIB_SIZE.* (MIB is for MI Block).
Rename MI_MASK.* -> MAX_MIB_MASK.*

There are no functional changes.

This is in preparation for coding the superblock size at the frame
level, which will require some of these constants to become variables.
The new names better reflect future semantics, and hence make the code
clearer.

Change-Id: Iee08d97554cf4cc16a5dc166a3ffd1ab91529992
2016-03-31 09:57:41 +01:00
Alex Converse
615482af92 Merge "Use write_modes_b_wrapper throughout." into nextgenv2 2016-03-31 06:04:03 +00:00
Hui Su
cce6688c31 Merge "Set block size upper bound for Palette mode" into nextgenv2 2016-03-31 00:23:11 +00:00
Geza Lore
9d288bf698 Use write_modes_b_wrapper throughout.
Change-Id: Ifbef3aa6e6b0dbc3701a9ef91b8b685a918d84f4
2016-03-30 22:26:54 +00:00
Angie Chiang
c7c40d2329 Generalize txfm scale in highbd quantizer
Change-Id: I359aa49c09b244e0d44ebd09442e365a3d22556c
2016-03-30 15:25:26 -07:00
Angie Chiang
25520d8dc3 change vp10_fwd_txfm2d_#x#_sse2 to vp10_fwd_txfm2d_#x#_sse4_1
The speed performance for running 20k times  is as follows

Notice that the vp10_highbd_fdct#x#_sse2 version is
16-bit version plus range check

The rest are 32-bit version

vp10_fwd_txfm2d_4x4_c (2 ms)
vp10_fwd_txfm2d_8x8_c (9 ms)
vp10_fwd_txfm2d_16x16_c (45 ms)
vp10_fwd_txfm2d_32x32_c (233 ms)

vp10_fwd_txfm2d_4x4_sse4_1 (2 ms)
vp10_fwd_txfm2d_8x8_sse4_1 (3 ms)
vp10_fwd_txfm2d_16x16_sse4_1 (16 ms)
vp10_fwd_txfm2d_32x32_sse4_1 (80 ms)

vp10_highbd_fdct4x4_c (1 ms)
vp10_highbd_fdct8x8_c (3 ms)
vp10_highbd_fdct16x16_c (17 ms)
highbd_fdct32x32_c (160 ms)

vp10_highbd_fdct4x4_sse2 (0 ms)
vp10_highbd_fdct8x8_sse2 (2 ms)
vp10_highbd_fdct16x16_sse2 (8 ms)
highbd_fdct32x32_sse2 (105 ms)

Change-Id: I24daf1e0d4d66e91e4ce61ef71cefa7b70ee90ce
2016-03-30 15:25:26 -07:00
Angie Chiang
c75f64780b Remove redundant code from vp10_fwd_txfm2d.c
Change-Id: I87ae5e93957616c0f5160a4f679e42f77092c33f
2016-03-30 15:25:26 -07:00
Angie Chiang
f2b311f580 Simplify rounding in vp10_[fwd/inv]_txfm[1/2]d_#x#
Change-Id: I24ce46e157dc5b9c0d75000a1a48e9c136ed4ee1
2016-03-30 15:25:26 -07:00
Angie Chiang
11d2bb5429 Add vp10_fwd_txfm2d_sse2
Change-Id: Idfbe3c7f5a7eb799c03968171006f21bf3d96091
2016-03-30 15:25:26 -07:00
Angie Chiang
64413a6ca7 Parameterize transform scale for quantizer
This is to facilitate changing transform scale later

Change-Id: Ic8ca5afba57d2489ebd191ccc40c1b31605a0d8c
2016-03-30 15:25:26 -07:00
hui su
cbb8be769d Set block size upper bound for Palette mode
Avoid buffer overflow in case of such new experiments as
128 x 128 superblock size.

Change-Id: Ib775f3925a85fc87227c0ddd9b6a6110a12ef196
2016-03-30 14:39:44 -07:00
Debargha Mukherjee
8d3a4aa891 Some fixes/speed-ups on inter-intra part of ext-inter
Fixes an issue with rectangular inter-intra blocks.
Includes various other refactoring and cleanups to enable fast mixing
of inter and intra predictors.
Uses only the best single inter reference so far for the inter-intra
search.

About 30% speed-up with a 0.1% hit in performance.

This is part one of overhauling on the ext-inter experiment. To be
continued in subsequent patches.

Change-Id: Id10ee100c78c6e00009a3a4f930a4435ef403a95
2016-03-30 14:39:29 -07:00
Debargha Mukherjee
91707ac79e Merge "Extend superblock size fo 128x128 pixels." into nextgenv2 2016-03-30 20:55:32 +00:00
Geza Lore
552d5cd715 Extend superblock size fo 128x128 pixels.
If --enable-ext-partition is used at build time, the superblock size
(sometimes also referred to as coding unit (CU) size) is extended to
128x128 pixels.

Change-Id: Ie09cec6b7e8d765b7555ff5d80974aab60803f3a
2016-03-30 18:23:06 +01:00
Debargha Mukherjee
e467627f33 Merge "Fix for ext_interp experiment" into nextgenv2 2016-03-30 14:44:39 +00:00
Debargha Mukherjee
cd1d01b96a Merge "Add new config flag for global motion experiment" into nextgenv2 2016-03-30 14:36:45 +00:00
Jingning Han
b6238b413e Refactor the sub8x8 block motion search control
Change-Id: Ia340e66e0a61403070adf8e4f18f00eab143f8f7
2016-03-29 09:53:55 -07:00
Hui Su
aa6f5724ec Merge "Palette mode: record selected transform type" into nextgenv2 2016-03-29 16:23:07 +00:00
Alex Converse
21ce8b9671 Merge "Force the VPX boolcoder trees in the ANS test." into nextgenv2 2016-03-29 16:23:00 +00:00
Yaowu Xu
37241e6f95 Merge "Merge branch 'masterbase' into nextgenv2" into nextgenv2 2016-03-29 16:05:53 +00:00
Julia Robson
068e799459 Fix for ext_interp experiment
Amends previous commit to also handle subsampling correctly.
Change ID of prev commit: I6b07e6cf9b287ba4b5bd6599af4a7412e50b3bdc

Was causing occassional failures for 422 streams due to accessing
elements beyond the extent of the bmi array.

Change-Id: I37ebabf4c01ca84bcd1851428172bdf753805d98
2016-03-29 16:09:49 +01:00
hui su
4ab00912c4 Palette mode: record selected transform type
Change-Id: I4c3d3224571176ac924d79ddfaba56990fc4000e
2016-03-28 20:43:59 -07:00
Jingning Han
78ee83125b Merge "Fix a rdcost computation issue in sub8x8 block mode search" into nextgenv2 2016-03-29 00:51:01 +00:00
Yaowu Xu
c810740c36 Merge branch 'masterbase' into nextgenv2
Conflicts:
	vp9/encoder/vp9_encoder.c
	vpx_dsp/x86/convolve.h

Change-Id: I60c3532936bedd796a75dfe78245a95ec21e2e55
2016-03-28 17:44:28 -07:00
Jingning Han
7279a4748f Merge "Rename run_rd_check to run_mv_search" into nextgenv2 2016-03-28 23:10:48 +00:00
Jingning Han
b534987110 Merge "Rework the predicted motion vector for sub8x8 block" into nextgenv2 2016-03-28 23:10:35 +00:00
Jingning Han
d133524e7c Fix a rdcost computation issue in sub8x8 block mode search
Compute the rate-distortion cost for sub8x8 blocks with integer
motion vectors.

Change-Id: I7dc034fcc4bec3850f26d1f9ae0595c91df1137e
2016-03-28 23:09:53 +00:00
Jingning Han
59d45d603b Rename run_rd_check to run_mv_search
Improve the readability in the related rate-distortion optimization
search control function of sub8x8 blocks.

Change-Id: I7f7456bf40a98aa5146abfe0488cda745b84d899
2016-03-28 21:59:10 +00:00
Jingning Han
0586460938 Rework the predicted motion vector for sub8x8 block
This commit makes the sub8x8 block to use its nearest neighbor's
motion vector as predicted motion vector for NEWMV mode. It improves
the coding performance by 0.12%.

Change-Id: I99e56715b327573ce7e8a26e3515a4984dadfd98
2016-03-28 14:58:17 -07:00
Angie Chiang
4144a11552 Merge "Use vp10_[fwd/inv]_txfm2d_add_32x32 for bd 10" into nextgenv2 2016-03-28 19:20:48 +00:00
Alex Converse
7b22c1d433 Force the VPX boolcoder trees in the ANS test.
Change-Id: I282f958c35aabcdfaf1077f8909c56c999420937
2016-03-28 12:10:08 -07:00
Yunqing Wang
89a8174fec Merge "Make set_reference control API work in VP9 and VP10" into nextgenv2 2016-03-28 18:33:03 +00:00
Hui Su
14f2d03b4b Merge "Fix assertion fail in build_intra_predictors" into nextgenv2 2016-03-28 18:14:47 +00:00
Angie Chiang
33833aefdd Merge "Use vp10_[fwd/inv]_txfm2d_add_#x# for bd 10" into nextgenv2 2016-03-28 18:11:47 +00:00
Angie Chiang
46b234478f Use vp10_[fwd/inv]_txfm2d_add_32x32 for bd 10
Change-Id: I996c48a90d7d71b52594a91a35cb8712c7fc212e
2016-03-28 11:08:40 -07:00
Alex Converse
72e29c3a73 Merge changes I3c72a2d8,I9905f3a8 into nextgenv2
* changes:
  Add pluggable bitwriters.
  Add pluggable bitreaders.
2016-03-28 16:59:18 +00:00
Yunqing Wang
9aaa3c933c Make set_reference control API work in VP9 and VP10
Moved the API patch from NextGen to NextGenv2 and also added this
API to VP10. An example was included. To try it, for example, run
the following command:
$ examples/vpx_cx_set_ref vp10 352 288 in.yuv out.ivf 4 30

Change-Id: Ib56bc3d365e530cfc8d859a13ddbf4c007907b81
2016-03-28 09:55:24 -07:00
Hui Su
9ab6e589b0 Merge "Fixes for Palette mode" into nextgenv2 2016-03-28 16:44:34 +00:00
hui su
f24b91c9e1 Fix assertion fail in build_intra_predictors
Change-Id: Id6683b9593b52aa0d159f8f013782d9e0bd07206
2016-03-28 09:37:54 -07:00
Yi Luo
80bc1d1d90 Merge "8x8/16x16 HT types V_DCT to H_FLIPADST SSE2 optimization" into nextgenv2 2016-03-28 15:39:24 +00:00
hui su
8a128c2a72 Fixes for Palette mode
This patch fixes 2 issues in Palette mode:
1. More memory is needed in PALETTE_BUFFER for 444 video format.
2. A merge issue caused by
https://chromium-review.googlesource.com/#/c/333940/7

Change-Id: I2aedc7dfdfb6b66fbd600189ec6e1e2cc6120d40
2016-03-25 18:16:44 -07:00
Alex Converse
9859dde47b Merge "Use speed 2 on superframe test." into nextgenv2 2016-03-26 00:49:06 +00:00
Alex Converse
0aef392f1b Use speed 2 on superframe test.
No need to do avoid shortcuts when all we are testing is the superframe
syntax. Decreases the run time up the VP10 version of the test from 22
seconds to 3 seconds on my machine.

Change-Id: If0c3551cbb8af8b803e02629e803e5f09da76cd1
2016-03-26 00:48:21 +00:00
Alex Converse
297c91a857 Merge "Fix failing test: VP10/SuperframeTest.TestSuperframeIndexIsOptional/0" into nextgenv2 2016-03-26 00:14:21 +00:00
Yi Luo
770bf71503 8x8/16x16 HT types V_DCT to H_FLIPADST SSE2 optimization
- Wrote function: fidtx8_sse2() and fidtx16_sse2().
- Turned on vp10_fht8x8_sse2()/vp10_fht16x16_sse2() for new types.
- Updated 8x8/16x16 unit tests for accuracy/speed.
- Running 20K times with random numbers and getting through
  tx type from V_DCT to H_FLIPADST, SSE2 speed improvement:
  8x8: ~131%
  16x16: ~66%

Change-Id: Ibbb707e932a08fec3b1f423a7dab280a1d696c9a
2016-03-25 16:48:19 -07:00
Alex Converse
c5d118f103 Fix failing test: VP10/SuperframeTest.TestSuperframeIndexIsOptional/0
Failing since: 66f2f65 Merge MISC_FIXES

Change-Id: I8135d6a9d74972c595f1b6294fb842e68f91e50e
2016-03-25 16:07:00 -07:00
Yue Chen
e63792e5cf A major speed up for obmc experiment
Skip checking obmc when regular inter predictor is not so good (the
rd-cost for Y residual is greater than the total rd of the best mode
so far.)

Performance change compared to full rd search:
  +0.006% lowres, -0.056% midres
Encoding time :
  1.14X baseline (was 1.42X)

Change-Id: I11350f955a20e1a2331be458537a915e09fbedf3
2016-03-25 14:06:52 -07:00
Alex Converse
d5c6b83431 Merge "Fix memory leak and slopiness around the uncompressed ANS buffer." into nextgenv2 2016-03-25 20:08:01 +00:00
Yunqing Wang
916bdfd9ac Merge "Recover tile coding performance" into nextgenv2 2016-03-25 19:18:58 +00:00
Alex Converse
30097af4ea Fix memory leak and slopiness around the uncompressed ANS buffer.
Change-Id: Ic9ed1f88f5550b69a45a0fdc71aae5864db7e178
2016-03-25 11:11:07 -07:00
Alex Converse
65bea98d74 Add pluggable bitwriters.
This will make the code change for a pure ANS experiment manageable.

Change-Id: I3c72a2d8e75afa2cc8e56992ee91f4760202f4d4
2016-03-25 11:02:41 -07:00
Alex Converse
efd566ff93 Add pluggable bitreaders.
This will make the code change for a pure ANS experiment manageable.

Change-Id: I9905f3a89f492a4346860463a72fa8c52aac4c8e
2016-03-25 11:02:41 -07:00
Hui Su
f9d77d66e6 Merge "Speed up ext-intra" into nextgenv2 2016-03-25 17:52:33 +00:00
Yunqing Wang
bdcc14051b Recover tile coding performance
After porting tile coding from VP9 to VP10, some performance
degradation was seen because of the difference between VP9 and
Vp10 baseline. This patch disabled some features in VP10 while
tile coding is turned on. Also, an encoder control API was added
back for this use case.

Change-Id: I8f736db8388408a8cc35320a2f80abb02906571c
2016-03-25 09:05:25 -07:00
hui su
c85a68123f Speed up ext-intra
Skip filtered intra modes search in inter frame when DC mode is
worse than the best mode so far.

With ext-intra enabled, the overall speed is increased by 20~40%;
performance drop is 0.03% on lowres and 0.05% on midres.

Change-Id: I75d2503b067cf5e46e3533b97fb01497e125baa7
2016-03-24 21:43:18 -07:00
Yi Luo
07a1fd413f Merge "4x4 hybrid transform type V_DCT to H_FLIPADST SSE2 optimization" into nextgenv2 2016-03-25 00:07:17 +00:00
Yi Luo
4970388c23 4x4 hybrid transform type V_DCT to H_FLIPADST SSE2 optimization
- Added function fidtx4_sse2().
- Turned on vp10_fht4x4_sse2() for these tx types.
- Updated 4x4 unit test for speed/accuracy.
- 4x4 Unit test passed.
- Running 20K times with random numbers for tx type from
  V_DCT to H_FLIPADST, SSE2 against C, speed improves ~46%.

Change-Id: I828088b7f98dc0f5939a72e3fcd6cb0b8d8dd8bf
2016-03-24 15:09:18 -07:00
Jingning Han
9cb3664c0e Fix compiling error in highbd transform unit test
Change-Id: Id09e1913c1ac965b78df2e67471807019c89f8ab
2016-03-24 21:30:43 +00:00
Jingning Han
fa76102929 Merge "Fix an enc/dec mismatch issue in DRL experiment" into nextgenv2 2016-03-24 19:02:13 +00:00
Jingning Han
4823dc364e Fix an enc/dec mismatch issue in DRL experiment
This was broken due the leakage between consecutive CLs.

Change-Id: I08ba8c67a42871d9488729ed854845641aa7ca30
2016-03-24 09:48:54 -07:00
Geza Lore
490ba1ad25 Port large scale tile coding features from nextgen.
If configured with --enable-ext-tile, the codec uses an alternative
tile coding syntax in the bitstream. Changes include::
 - The maximum number of tile rows and columns is extended to 1024
   each.
 - The minimum tile width/height is 64 pixels (1 superblock).
 - A tile copy mode is added where a tile directly reuse the coded
   data of a previous tile
 - The meaning of the tile-columns and tile-rows codec parameters are
   overloaded to mean tile-width and tile-height in units of 64
   pixels.
 - All tiles should now be independent, including rows within the
   same columns, so large scale parallel, or independent decoding is
   possible.
 - vpxdec also gained the options to decode only a particular tile,
   tile row, or tile column.

Changes without --enable-ext-tile:
 - All tiles should now be independent, including rows within the
   same columns, so large scale parallel, or independent decoding is
   possible.
 - vpxenc default tile configuration changed to use 1 tile column.

Change-Id: I0cd08ad550967ac18622dae5e98ad23d581cb33e
2016-03-24 09:26:05 +00:00
Angie Chiang
b4334460cb Merge "Call vp10_fwd_txfm_4x4 in encode_inter_mb_segment" into nextgenv2 2016-03-24 00:38:04 +00:00
Yi Luo
ea94451f20 Merge "Misc. updates for highbd changes" into nextgenv2 2016-03-23 22:43:47 +00:00
Sarah Parker
091f0804e4 Add new config flag for global motion experiment
Change-Id: I312af6af911cd0f52357745324b74e56a8d08d70
2016-03-23 15:24:44 -07:00
Yi Luo
659c2c98e1 Misc. updates for highbd changes
- Use Makefile to control the build for highbd_fwd_txfm_sse4.c.
- Fixed hybrid transform (HT) types due to recent update.
- Added new unit test cases for highbd HT.

Change-Id: Ifd768a9b429a8c21ed40c1de8152fb5ac71e2f90
2016-03-23 12:10:52 -07:00
Jingning Han
1fcb5fc755 Refactor motion vector residual coding process
This commit separates the predicted motion vector from the nearestmv
motion vector in the coding process for both regular and sub8x8
block sizes.

Change-Id: I703490513b0194e6669ebf719352db015facb3e1
2016-03-23 12:10:38 -07:00
Angie Chiang
d9a0cbb1b7 Use vp10_[fwd/inv]_txfm2d_add_#x# for bd 10
Change-Id: Ie35bdbd7aafae693e3106d7ccbbdd8e65ee8800c
2016-03-23 12:05:12 -07:00
Angie Chiang
2b93fde9da Call vp10_fwd_txfm_4x4 in encode_inter_mb_segment
Change-Id: Ieabe5534e5f4fb3f2d751a3cfc682208b3913715
2016-03-23 11:43:45 -07:00
Yi Luo
deb33056d1 Merge "Highbd fht4x4 SSE4.1 optimization for DCT_DCT mode - Setup function vp10_highbd_fht4x4_sse4_1 for highbd SSE4.1 intrinsics optimization. - Wrote SSE4.1 functions: load_buffer_4x4(), write_buffer_4x4(), and fdct4x4_sse4_1(). - Used logic right shift to avoid coeff memory write/read. - Turned on vp10_highbd_fht4x4_sse4_1 for DCT_DCT mode only. - Improved overall encoding performance >2.3% for 50 frames sequence, park_joy_1080p_12.y4m, in which, --input-bit-depth=12, --bit-depth=12, 50 frames. - Unit test passed." into nextgenv2 2016-03-23 18:30:40 +00:00
Hui Su
daf2fb42e6 Merge "Add "entropy" experiment" into nextgenv2 2016-03-23 17:50:57 +00:00
Alex Converse
a06e39a945 Merge "Add buf_ans.h to the Makefile." into nextgenv2 2016-03-23 16:27:13 +00:00
Alex Converse
b5454b245a Merge "Add some ANS helpers needed to replace the vpx bool coder with pure ANS." into nextgenv2 2016-03-23 16:21:58 +00:00
Hui Su
13501fe45f Merge "Small speed up for super_block_uvrd" into nextgenv2 2016-03-23 16:16:46 +00:00
Yi Luo
977dccd12c Highbd fht4x4 SSE4.1 optimization for DCT_DCT mode
- Setup function vp10_highbd_fht4x4_sse4_1 for highbd SSE4.1
  intrinsics optimization.
- Wrote SSE4.1 functions: load_buffer_4x4(), write_buffer_4x4(),
  and fdct4x4_sse4_1().
- Used logic right shift to avoid coeff memory write/read.
- Turned on vp10_highbd_fht4x4_sse4_1 for DCT_DCT mode only.
- Improved overall encoding performance >2.3% for 50 frames
  sequence, park_joy_1080p_12.y4m, in which, --input-bit-depth=12,
  --bit-depth=12, 50 frames.
- Unit test passed.

Change-Id: Idd6dc6e472cbbf235f0ade4f66fbe859a860a004
2016-03-23 09:13:45 -07:00
Debargha Mukherjee
7a3bae768e Merge "Porting ext_partition experiment from nextgen" into nextgenv2 2016-03-23 04:58:38 +00:00
Debargha Mukherjee
a61e506200 Make the tile independence test shorter
Uses 15 frames instead of 30. Also only test speed 0 for VP10.

Change-Id: Icace050edd974622d83bdf843058f63bd8d3a84b
2016-03-22 18:00:04 -07:00
Alex Converse
6b9cb8c489 Add some ANS helpers needed to replace the vpx bool coder with pure ANS.
Change-Id: I32b63fca020c410cef16e93379b4e6e281ccbccd
2016-03-22 16:23:23 -07:00
Yue Chen
2613b5e9d6 Merge "Refactor prediction functions of OBMC" into nextgenv2 2016-03-22 21:06:16 +00:00
Julia Robson
5cce322a09 Porting ext_partition experiment from nextgen
This has been ported under ext_partition_types because it is due
to be combined with the coding_unit_size experiment which is
already being ported under ext_partition

Change-Id: I47af869ae123ddf0aa99160dac644059d14266ee
2016-03-22 12:29:01 -07:00
Alex Converse
b00c09026c Wrap write_modes functions with macros to avoid ifdefs at all the callsites.
Change-Id: I5a960bf63ec404f0fbfe6a404f436ef4122a219d
2016-03-22 10:02:23 -07:00
Angie Chiang
9d380d8872 Merge "mv vp10_fwd_txfm2d_#x# into vp10_rtcd.h" into nextgenv2 2016-03-22 01:07:56 +00:00
Angie Chiang
063e965d7d Merge "Passing TXFM_TYPE instead of func pointer" into nextgenv2 2016-03-22 01:07:42 +00:00
Yue Chen
b5083af67a Merge "Refactor transform type-size search function" into nextgenv2 2016-03-22 00:58:44 +00:00
Jingning Han
4df51c8de4 Merge "Refactor sub8x8 reference motion vector search function" into nextgenv2 2016-03-22 00:07:45 +00:00
Jingning Han
bfdcccd8a1 Merge "Rework the DRL syntax entropy coding system" into nextgenv2 2016-03-22 00:07:36 +00:00
Yue Chen
2e3f77316d Refactor prediction functions of OBMC
Merge the functions that generate prediction by above/left predictors
for the encoder and the decoder.

Change-Id: I57e53a8f2eb8d3028c4ed0c9abdcbf00503f95a0
2016-03-21 17:04:13 -07:00
Yue Chen
7c1f6d1862 Refactor transform type-size search function
Decompose choose_tx_size_from_rd into three functions that determine
the transform coding rd at different stages. Besides the original
function, txfm_yrd() calculates the rd for fixed size and type.
choose_tx_size_fix_type() fixes the type and searches for the size.
It can enable other experiments to do restricted tx searches so as to
reduce the impact on speed.
Similar refactoring is done for select_tx_type_yrd() in VAR_TX.

Performance change in baseline is trivial:
0.014/0.001/-0.020 for lowres/midres/hdres.

Change-Id: I2ecbf6066329be088ec1bfb69013b657b14b8afe
2016-03-21 16:12:05 -07:00
Alex Converse
e6a136e864 Add buf_ans.h to the Makefile.
Change-Id: I6339912d240a1c2c3aa2f7303e7ca4d9721a29f4
2016-03-21 14:13:26 -07:00
Yaowu Xu
cbfc15b11b Merge "Properly set rate_nocoef when pallete mode is used" into nextgenv2 2016-03-21 20:44:17 +00:00
Debargha Mukherjee
c28dbdf665 Merge "Adds 1D transforms for ADST/FlipADST to make 16" into nextgenv2 2016-03-21 20:40:21 +00:00
Alex Converse
d324c6b025 Write MB tokens using the forward buffered ANS writer.
This allows sharing more code paths with the rest of the code an allows
for easier compatibility with the other experiments.

Change-Id: Id288b533805a4d0657ec2f17542f2e6ad23ebdb4
2016-03-21 18:43:14 +00:00
Alex Converse
109ef96a5f Merge "Add a placeholder forward buffered ANS coder." into nextgenv2 2016-03-21 18:41:32 +00:00
Debargha Mukherjee
1b17559327 Adds 1D transforms for ADST/FlipADST to make 16
Makes a set of 16 transforms total, adding all 1D
combinations of ADST and FlipADST, and removng all DST
transforms.

lowres, midres both improve by about 0.1% and hdres by
-0.378% in BDRATE but with fewer transforms that are also
simpler.

Further experiments to continue later.

Change-Id: I7348a4c0e12078fdea5ae3a2d36a89a319ffcc6e
2016-03-21 11:19:36 -07:00
Yaowu Xu
c96c3fa2b3 Properly set rate_nocoef when pallete mode is used
Change-Id: Iff04c82b3d3b5cf2c7700717c3c3d678bbbb9f9b
2016-03-21 11:07:53 -07:00
Angie Chiang
abd447e339 mv vp10_fwd_txfm2d_#x# into vp10_rtcd.h
Change-Id: Iad7352698786791b0fd7c005a7edfd1724b71599
2016-03-21 10:51:54 -07:00
Angie Chiang
40ef86f27d Passing TXFM_TYPE instead of func pointer
This is to facilitate sse2 implementation

Change-Id: Id2f53e83c5508c4445d9b1bba00a649cb4da6b74
2016-03-21 10:50:59 -07:00
Jingning Han
66df6e7c7f Refactor sub8x8 reference motion vector search function
Rework the interface to allow codec store the reference motion
vector list information for coding process.

Change-Id: I47e26587f6c0808655e4626f316ec7614a7ad8ed
2016-03-21 10:02:08 -07:00
Jingning Han
5c9d315572 Rework the DRL syntax entropy coding system
This commit re-designs the probability model for the syntax elements
of the dynamic motion vector referencing system.

Change-Id: Icfb8203c7e8f64e10e99f5890e25e6f6b15fe5d1
2016-03-21 09:52:33 -07:00
Jingning Han
4914ae4622 Merge "Enable dynamic motion vector referencing for newmv mode" into nextgenv2 2016-03-19 00:40:04 +00:00
Debargha Mukherjee
6074403d2d Merge "Add ext_partition_types config option" into nextgenv2 2016-03-18 23:51:55 +00:00
Debargha Mukherjee
3c065ac46a Merge "Refactor bsse and skip_txfm in MACROBLOCK." into nextgenv2 2016-03-18 23:51:40 +00:00
Debargha Mukherjee
05029a47a1 Merge "Refactor save_context restore_context in rd_pick_partition." into nextgenv2 2016-03-18 23:51:06 +00:00
Debargha Mukherjee
0ac48f8f65 Merge "Refactor mbmi->inter_tx_size to 2D array." into nextgenv2 2016-03-18 23:50:25 +00:00
Sarah Parker
0adb805db9 Merge "Remove prune three from speed features" into nextgenv2 2016-03-18 21:29:24 +00:00
Sarah Parker
fab5454a16 Remove prune three from speed features
Not getting good results for this feature, will try again
when transforms are frozen.

Change-Id: Id12396786cb9369ad34d0bd845f7beba3a037726
2016-03-18 13:06:40 -07:00
Alex Converse
44ce668063 Add a placeholder forward buffered ANS coder.
This buffered ANS coder supports coding the symbols in forward (decode)
order. Rather than windowing or growing the buffer, right now this
coder merely asserts that the buffer will never overflow.

This approach should allow ANS to be used as a drop in replacement for
other entropy coders rather than requiring complicated reversal logic
throughout the codebase.

Change-Id: I6689271233d0e22fea94c51950415dad5af96598
2016-03-18 19:33:45 +00:00
Yaowu Xu
42e5c2ad8a Two minor logic fixes
Change-Id: I1d5624fb2f34f87a55613036851034ec7c2d0b76
2016-03-18 11:48:19 -07:00
Jingning Han
93748c3e4f Enable dynamic motion vector referencing for newmv mode
This commit enables the dynamic motion vector predictor for NEWMV
mode. It allows the codec to select the best motion vector predictor
in a rate-distortion optimization framework for motion vector
residual coding. The compression performance is improved:
lowres  0.14%
midres  0.27%
hdres   0.24%

Change-Id: I6a601c74eb6cb0b71a613336d40363359f2edecd
2016-03-18 09:51:37 -07:00
hui su
30d2d9783e Small speed up for super_block_uvrd
Eearly termination if U plane RD cost is large enough.

No notable compression performance changes.

Change-Id: Ieeefc5859cb55d94391b502b4bd840bc8bcb2578
2016-03-18 09:28:10 -07:00
Geza Lore
f8cfb72a32 Refactor bsse and skip_txfm in MACROBLOCK.
Simple refactoring to 2 dimensional arrays, in preparation for 128
wide superblocks.

Change-Id: I40d447bd9fbd4f755534ea3cc82fc8f4676cea07
2016-03-18 15:30:10 +00:00
Geza Lore
efe7d4e5a2 Refactor mbmi->inter_tx_size to 2D array.
This is in preparation of increasing the superblock size.

Change-Id: I9197e397399fbe8aec1178a45ea0337dd90412d7
2016-03-18 15:30:09 +00:00
Julia Robson
8bc8f2711a Add ext_partition_types config option
Change-Id: I91d280a64d1da77be31004ea91d08d1a70529e42
2016-03-18 15:22:42 +00:00
Hui Su
cb61bfa695 Merge "Minor bug fix in ex-intra experiment" into nextgenv2 2016-03-18 05:01:56 +00:00
hui su
507c55b227 Minor bug fix in ex-intra experiment
No performance change observed from borg tests.

Change-Id: I20c232c5dde8cfc84452a4c7185389bd8b812ffd
2016-03-17 19:37:21 -07:00
Sarah Parker
99235fd908 Merge "Fix hbd segfault for prune_one and prune_two" into nextgenv2 2016-03-17 22:40:47 +00:00
Angie Chiang
cb3072ca4a Refactor: call inv_txfm_add
Change-Id: I52c209a5db1b4a6525c04b70291a08ab5a68c6fe
2016-03-17 11:19:00 -07:00
Angie Chiang
6b55b8dc93 Refactor:Merge inverse_transform_block_inter/intra
Merge inverse_transform_block_inter inverse_transform_block_intra
to inverse_transform_block

Change-Id: I0f561830e639e3bf8d831c28a7c784cb0c4c8b09
2016-03-17 11:19:00 -07:00
Angie Chiang
e8bcce1255 Merge "add dct 64x64 transform" into nextgenv2 2016-03-17 18:15:11 +00:00
Sarah Parker
79dd1ee907 Fix hbd segfault for prune_one and prune_two
Change-Id: I71da102550aa7d81961e5f10c71058d5fa8dc6c4
2016-03-17 09:58:29 -07:00
Geza Lore
24659dbca3 Refactor save_context restore_context in rd_pick_partition.
This is a cosmetic patch that removes a great deal of conditional
compilation around CONFIG_VAR_TX from the partition search function.

Change-Id: I9dcef9d4fe6847b793c77bdf565a5cacbdfacd59
2016-03-17 15:53:59 +00:00
Yaowu Xu
51f951292a Merge "Properly save and restore skip related variables" into nextgenv2 2016-03-17 14:41:03 +00:00
Angie Chiang
ed2514a22c add dct 64x64 transform
Change-Id: I131c4d1216cd156e520b8a91c4438c2d3c6602cb
2016-03-16 19:37:21 -07:00
Yunqing Wang
a129905c70 Merge "Optimize HBD up-sampled prediction functions" into nextgenv2 2016-03-16 23:52:08 +00:00
Yaowu Xu
4fcc4f816e Properly save and restore skip related variables
Change-Id: Id52744e140585c08d047fb395b75ac9318a0b4c3
2016-03-16 16:28:52 -07:00
hui su
83b47af18d Add "entropy" experiment
This patch added two features to improve entropy coding efficiency
for coefficient tokens.

1. Choose 1 of 4 default probability tables based on q-index for
key-frames.
It is ported from nextgen branch:
https://chromium-review.googlesource.com/#/c/280586/

2. Do backward update after each superblock (64X64) row using
subframe token counts.

Coding gain: 0.1% on lowres; 0.42% on midres; 0.36% on hdres.
Much larger gain for key-frames: 2.6%, 2.3%, 1.7%.

Design doc: go/huisu-entropy

Change-Id: Ia3b6a615636be09247d70e4c520405637561532b
2016-03-16 11:55:50 -07:00
Angie Chiang
f330444a09 Merge "remove filter_cache" into nextgenv2 2016-03-16 17:21:53 +00:00
Geza Lore
c2005c578b Factor out zeroing above and left context.
Change-Id: I6e5d8cff869c7415a924f845c9e6ccaabe2b7a9b
2016-03-16 13:08:29 +00:00
Geza Lore
8735c17ceb Fix build without supertx.
Change-Id: Ib60821487710f6cf06aaa8ddcbdd5487ba1cbe4f
2016-03-16 13:08:13 +00:00
Yaowu Xu
fced640a0a Merge "Properly set the estimate of rate_nocoef" into nextgenv2 2016-03-15 23:23:12 +00:00
Yaowu Xu
2becffaef5 Properly set the estimate of rate_nocoef
This commit fixes the computation of rate_nocoef for situation when
rate_y is uninitialized at INT_MAX for  x->skip is true.

Change-Id: If3dde4e4ee16667f4408067d3bb3084f916272f1
2016-03-15 15:00:53 -07:00
Angie Chiang
b6fef12481 remove filter_cache
PSNR test
        lowres  hdres
lowbd   -0.013  0.067
highbd  -0.044  0.039

Change-Id: Iefdb1e966bd004b2027456778185b675e8fb9b81
2016-03-15 14:40:59 -07:00
Hui Su
c67dd39adc Merge "Add "entropy" experiment flag" into nextgenv2 2016-03-15 20:46:09 +00:00
Debargha Mukherjee
dcbbb81605 Merge "Refactor 1D transforms" into nextgenv2 2016-03-15 19:08:07 +00:00
hui su
08d7f44c39 Add "entropy" experiment flag
For experiments to improve compression efficiency of entropy coding.

Change-Id: Idf30dc554bd7eea3a79d21d18515c3e6b8f64b26
2016-03-15 11:44:01 -07:00
Debargha Mukherjee
cb37db126e Merge "Fix copy/zero macros." into nextgenv2 2016-03-15 17:45:31 +00:00
Jingning Han
b00aa8f216 Merge "Turn off 32x32 transform type selection" into nextgenv2 2016-03-15 16:59:37 +00:00
Geza Lore
a301f5e03d Fix copy/zero macros.
Change-Id: I2df3b6ecd35406ee05c2aa4e49be779e73e1bdc6
2016-03-15 10:57:58 +00:00
Debargha Mukherjee
9b88762b17 Refactor 1D transforms
In preparation for adding more 1D variants with ADST/FlipADST/etc.

BDRATE actually improves by 0.21% on lowres.

Change-Id: I2fa4720c69fe001fa666119a284dfc6b17fffab2
2016-03-14 22:30:09 -07:00
Yunqing Wang
5f5552d846 Optimize HBD up-sampled prediction functions
Optimized 2 up-sampled reference prediction functions in high-bit
depth case. This reduced the HBD encoding time by 3%.

Change-Id: I8663ffb5234f5e70168c0fc9ca676309fe8e98f2
2016-03-14 19:04:33 -07:00
Hui Su
429d304bc1 Merge "Fix typos in unit tests" into nextgenv2 2016-03-15 01:15:06 +00:00
Yue Chen
66e6fb84de Merge "Speed up rd selection in OBMC experiment" into nextgenv2 2016-03-15 00:14:06 +00:00
hui su
b1a3871542 Fix typos in unit tests
Change-Id: Idff52b337ab2d494c0c26e0d2c71ab3ee8208691
2016-03-14 16:32:41 -07:00
Yue Chen
b5f8b70ce5 Speed up rd selection in OBMC experiment
Instead of testing all interpfilter-BMC/OBMC combinations, we choose
the best interpolation filter based on regular inter prediction.

Reduction in encoding time: ~10%
Drop in performance gain: 0.08% lowres, 0.04% midres

Change-Id: Ifc19097a918ac76b529db9af4c60e2c70e93f7ad
2016-03-14 15:36:44 -07:00
Jingning Han
a2c87a3dda Turn off 32x32 transform type selection
Temporarily disable transform type selection for 32x32 transform
block size. This speeds up the encoding process. For bus at CIF
150 frames, the encoding time goes from 896s -> 762s (11% faster).
The compression performance for lowres set is improved by 0.15%,
and -0.029% for hdres.

Change-Id: If239b272970eb302150bec13b8cf192fbe045332
2016-03-14 11:31:03 -07:00
Yunqing Wang
91b8236cdd Merge "Add high-precision sub-pixel search as a speed feature" into nextgenv2 2016-03-12 02:26:36 +00:00
Angie Chiang
46cd6ee9bd Merge "Fix sub8x8 interpolation full pixel bug" into nextgenv2 2016-03-12 01:45:27 +00:00
Yunqing Wang
e6e2d886d3 Add high-precision sub-pixel search as a speed feature
Using the up-sampled reference frames in sub-pixel motion search is
enabled as a speed feature for good-quality mode speed 0 and speed 1.

Change-Id: Ieb454bf8c646ddb99e87bd64c8e74dbd78d84a50
2016-03-11 16:32:11 -08:00
Debargha Mukherjee
e38e2ad86e Merge "Fix an overflow in highbitdepth loop restoration" into nextgenv2 2016-03-11 21:48:37 +00:00
Angie Chiang
c0f708c03a Merge "convolve8 sse2 test" into nextgenv2 2016-03-11 19:57:30 +00:00
Hui Su
f0e0a7e7e9 Merge "Complete (mostly) migration of palette mode" into nextgenv2 2016-03-11 19:52:41 +00:00
Hui Su
571072b84b Merge "Fix a bug in ext-intra experiment" into nextgenv2 2016-03-11 19:52:34 +00:00
Debargha Mukherjee
7ea59de69c Fix an overflow in highbitdepth loop restoration
Change-Id: Ie20cd35a4c96443c0de234d2cf097187a70ec8dd
2016-03-11 11:48:24 -08:00
Hui Su
f7fbc54bd1 Merge "Fix compiler warnings" into nextgenv2 2016-03-11 19:47:39 +00:00
hui su
8102aeb368 Fix a bug in ext-intra experiment
Change-Id: I6fab352eb1f7d9c5dc783a4d4d878b6b42838ca2
2016-03-11 10:23:51 -08:00
hui su
8fce4b8543 Fix compiler warnings
Change-Id: I00314ec296e8368f1239a556b3a55feac9cec7ae
2016-03-11 10:13:08 -08:00
Jingning Han
68d9a14e9f Merge "Enable hybrid 1-D/2-D transform coding for highbd setting" into nextgenv2 2016-03-11 18:09:11 +00:00
hui su
78b0bd0a0d Complete (mostly) migration of palette mode
Coding gain on screen_content is 12.2% (was 6.6%).

Some features such as frame-level color buffer, adaptive
entropy coding, are coming in future patches.

Change-Id: I2658cf5ec0cbb02cff685475759f3b68c9807697
2016-03-11 09:56:21 -08:00
Sarah Parker
09368fcf99 Filling in speed feature functions for ext tx search
Filled in prune one and prune two. Prune three is still
being experimented with.

Change-Id: Ic07f828c448e86cacb0369aa3a9a0feb2edae054
2016-03-10 14:08:13 -08:00
Debargha Mukherjee
ce4b35d510 Merge "Adds compound wedge prediction modes" into nextgenv2 2016-03-10 17:44:45 +00:00
Jingning Han
c453ae53d0 Enable hybrid 1-D/2-D transform coding for highbd setting
This commit enables the hybrid 1-D/2-D transform coding scheme for
high bit-depth setting. It improves the compression performance of
ext-tx experiment by 0.98% for lowres_all set.

Change-Id: Ic27f5037f2c36b095a93b9f15dbae34bdcdf00aa
2016-03-10 08:58:07 -08:00
Debargha Mukherjee
f34deab243 Adds compound wedge prediction modes
Incorporates wedge compound prediction modes.

Change-Id: Ie73b54b629105b9dcc5f3763be87f35b09ad2ec7
2016-03-10 07:19:54 -08:00
Jingning Han
ccc809f30c Merge "Fix an assertion condition in transform type search" into nextgenv2 2016-03-10 00:20:30 +00:00
Yi Luo
431e35913e Merge "Implemented DST 16x16 SSE2 intrinsics optimization" into nextgenv2 2016-03-09 22:27:44 +00:00
Jingning Han
240ae9729e Merge "Add horizontal and vertical scan order for 1-D transform" into nextgenv2 2016-03-09 20:47:06 +00:00
Angie Chiang
836e83c49f Fix sub8x8 interpolation full pixel bug
Change-Id: I5df744dc6b21ed9dbbf6ddf38004f2a9e88b7d00
2016-03-09 11:15:19 -08:00
Jingning Han
02734b6457 Fix an assertion condition in transform type search
Change-Id: I442475e559be2acdc1c2a3e5ca021b3de77adda5
2016-03-09 19:07:23 +00:00
Jingning Han
e0413094fb Add horizontal and vertical scan order for 1-D transform
This commit enables the 1-D transform to use Manhattan grid vertical
and horizontal scan order for transform coefficient entropy coding.

Enabled in inter prediction mode, the hybrid 1D/2D transform coding
scheme outperforms the 2D-DCT based coding system used in VP9 by
lowres_all  1.7%
hdres_all   1.4%

As one coding option, in addition to the existing 17 other transform
types in ext-tx experiment, the 1D/2D hybrid transform improves
the coding gains:
lowres_all  2.2% -> 3.0%

Change-Id: I9cefa9d9e38224546d0afd67feecd9f8d4a16ab0
2016-03-09 10:58:23 -08:00
hui su
954e560f9e Refactor entropy coding of transform size
No performance change.

Change-Id: If35125fed909d89235b303514f77a33183bb36b3
2016-03-08 16:46:00 -08:00
Yi Luo
50a164a1f6 Implemented DST 16x16 SSE2 intrinsics optimization
- Implemented fdst16_sse2(), fdst16_8col() against C version: fdst16().
- Turned on 7 DST related hybrid txfm types in vp10_fht16x16_sse2().
- Replaced vp10_fht10x10_c() with vp10_fht16x16_sse2() in
  fwd_txfm_16x16().
- Added vp10_fht16x16_sse2() unit test against C version:
  vp10_fht16x16_c() (--gtest_filter=*VP10Trans16x16*).
- Unit test passed.
- Speed improvement: 2.4%, 3.2%, 3.2%, for city_cif.y4m, garden_sif.y4m,
  and mobile_cif.y4m.

Change-Id: Ib30a67ce5d5964bef143d588d0f8fa438be8901f
2016-03-08 14:56:38 -08:00
Debargha Mukherjee
e3d001ea43 Merge "Adds an ext-tile config flag to host new tiling" into nextgenv2 2016-03-08 17:14:45 +00:00
Yaowu Xu
de661cdbc5 Merge "Fix several MSVC compiler warning/errors" into nextgenv2 2016-03-08 16:44:17 +00:00
Debargha Mukherjee
86088511bd Adds an ext-tile config flag to host new tiling
Change-Id: I6c3bf5545c42030b484a8aaf434b63bd409a0487
2016-03-08 07:18:07 -08:00
Yaowu Xu
28eb784e46 Fix several MSVC compiler warning/errors
Change-Id: Iccaacee9b7a66b016b5747a3902c236888ad4ba1
2016-03-07 17:00:03 -08:00
Yi Luo
cf9c95c32c Merge "Added vp10_fht8x8_sse2() unit test" into nextgenv2 2016-03-08 00:30:06 +00:00
Yue Chen
043b698a87 Merge "Calculate the distortion in pixel domain for sub8x8 rd selection" into nextgenv2 2016-03-08 00:13:46 +00:00
Yue Chen
ef8f7c1211 Calculate the distortion in pixel domain for sub8x8 rd selection
Pixel domain distortion calculation is enabled for the rd loop of
inter sub8x8 and intra 4x4 cases.

Coding gain: 0.124% derflr, 0.122% derfhd

Change-Id: I43b47fe81b4f5ccc1c66bc626bd310c413a1ed87
2016-03-07 14:49:22 -08:00
Yi Luo
6ab062124d Added vp10_fht8x8_sse2() unit test
- Inherited base class TransformTestBase to derived class VP10Trans8x8HT.
- Employed RunCoeffCheck() to test vp10_fht8x8_sse2() against C reference
  function vp10_fht8x8_c().
- fdst8_sse2() related seven hybrid transform cases are covered in this
  test.
- Test passed (4 test cases w/o EXT_TX; 16 test cases with EXT_TX).

Change-Id: Id9a9b308c707164a120d9ceb2c30e572026fb1d0
2016-03-07 14:25:07 -08:00
Alex Converse
76d4fdd391 Merge "ANS: Switch from PDFs to CDFs." into nextgenv2 2016-03-07 20:51:45 +00:00
Debargha Mukherjee
c7d77b32dc Merge "Extend convolution functions to 128x128 for ext-partition." into nextgenv2 2016-03-07 19:54:45 +00:00
Debargha Mukherjee
6adfba7c0f Merge "Make sharp filter 10 tap and makes sharp2 sharper" into nextgenv2 2016-03-07 19:51:42 +00:00
Yi Luo
42c08a3f52 Merge "Added vp10_fht4x4_sse2() unit test" into nextgenv2 2016-03-07 19:18:34 +00:00
Jingning Han
79c5a533cd Merge "Hybrid 1-D/2-D transform coding" into nextgenv2 2016-03-07 19:15:44 +00:00
Jingning Han
a8dc9694a4 Hybrid 1-D/2-D transform coding
This commit enables a hybrid 1-D/2-D transform coding scheme and
the accompany entropy coding system. It currently uses hybrid
1-D/2-D DCT transform coding. It provides coding performance gains:

lowres_all  0.55%
hdres_all   0.43%

Change-Id: I2b30dcafd21eb2bb3371f6e854cbab440a4dfa78
2016-03-07 09:27:46 -08:00
Sarah Parker
df3849370a Merge "Adding speed feature interface for ext tx search" into nextgenv2 2016-03-07 16:32:55 +00:00
Debargha Mukherjee
1815961469 Merge "Add 128 pixel variance and SAD functions" into nextgenv2 2016-03-07 16:02:05 +00:00
Geza Lore
938b8dfc73 Extend convolution functions to 128x128 for ext-partition.
Change-Id: I7f7e26cd1d58eb38417200550c6fbf4108c9f942
2016-03-07 11:39:27 +00:00
Hui Su
5e5bef6c18 Merge "Cleanup in get_uv_tx_size" into nextgenv2 2016-03-05 07:42:26 +00:00
hui su
c3c1c6f405 Cleanup in get_uv_tx_size
Change-Id: Ia2aa7558f9f53da7dff970b30fe0a94958159ffb
2016-03-04 16:53:19 -08:00
Yue Chen
10cdeab42a Fix a bug in obmc prediction
For left side obmc, the input of the mask function is corrected as
the column coordinate.
Also, minor fixes for a compiler warning.

Change-Id: Ia981ef443d5b0285a93d73e5c7ab83f8c3a23464
2016-03-04 15:54:14 -08:00
Yi Luo
267f73a1f7 Added vp10_fht4x4_sse2() unit test
Inherited class TransformTestBase to derived class VP10Trans4x4HT.
Employed RunCoeffCheck() to test vp10_fht4x4_sse2() against
C reference vp10_fht4x4_c().
fdst4_sse2() related seven hybrid transform cases are covered
 in this test.
Wrote a header file for test base class. Some modification to
make sure the base class can be used for 8x8, 16x16, 32x32 cases.
All related tests passed.

Change-Id: I6b19a39d3ea30b657847781e78e73b829998a57a
2016-03-04 14:19:30 -08:00
Sarah Parker
2ca7d42e7e Adding speed feature interface for ext tx search
This sets up the interface for 3 speed features that progressively
eliminate a greater number of transforms in ext tx using
pre-trained support vector machines.
Each speed feature still needs to be implemented.

Change-Id: Ia508aeadc0cffdc080fb227f357a5d1dfbca08e2
2016-03-04 10:27:21 -08:00
Jingning Han
351ca31238 Merge "Apply mv precision check to reference mv candidate" into nextgenv2 2016-03-04 16:54:27 +00:00
Jingning Han
04cb49385e Merge "Properly restore transform block skip flag in RD search" into nextgenv2 2016-03-03 23:30:58 +00:00
Jingning Han
7174d637e8 Properly restore transform block skip flag in RD search
This commit fixes an encoding issue related to var-tx and ref-mv
experiments that causes the codec to use random values for transform
block skip flag.

Change-Id: I8daa6d6b88ea45b5bbeb81b43dd0eeff545c8e5a
2016-03-03 13:52:49 -08:00
Yi Luo
6231b6b077 Merge "Fixed a computation bug in fdct16_sse2()" into nextgenv2 2016-03-03 20:05:36 +00:00
Debargha Mukherjee
7d2618bc70 Make sharp filter 10 tap and makes sharp2 sharper
There is a ~0.1% gain.

Various experiments with different kinds of windowing functions to
follow.

Change-Id: I0787fddca53607ab39e53f919066839301938e68
2016-03-03 12:01:55 -08:00
Geza Lore
697bf5beff Add 128 pixel variance and SAD functions
Change-Id: I8fde245b32c9e586683a28aa6925da0b83850b39
2016-03-03 10:24:29 +00:00
Alex Converse
6bbbe31656 ANS: Switch from PDFs to CDFs.
Make the RANS implementation operate on cumulative distribution
functions rather than individual probability distribution functions.
CDFs have shown themselves more flexible to work with.

Reduces decoding memory usage from scaling O(num_distributions *
symbol_resolution) to O(num_distributions).

No bitstream change. This is an purely implementation change.

Change-Id: I4e18d3a0a3d37a36a61487c3d778f9d088b0b374
2016-03-03 09:32:54 +00:00
Jingning Han
13fb7c1b88 Apply mv precision check to reference mv candidate
This allows the codec to use effective motion vector as the candidate
to produce the reference motion vector list.

Change-Id: Ib90be705fe28200c13376d6d7741800a61f13043
2016-03-02 20:14:07 -08:00
Yi Luo
68d6a5073a Fixed a computation bug in fdct16_sse2()
fdct16_sse2() was not bit-exact with C reference, fdct16().
The inconsistency was found by writing a unit test for
vp10_fht16x16_sse2().  Since the unit test needs a pending
change on the inherited base class.  I will commit this unit
test after making a header file for this base class.
Passed the uncommitted unit test: vp10_fht16x16_test.cc.

Change-Id: If2b617883c633a3ea90c19e1d018240c8007102b
2016-03-02 15:20:12 -08:00
hui su
ebc6e058db Fix a bug in vp10_predict_intra_block
Avoid mistakenly setting "have_right" as 0 for UV channel in blocks
of width no larger than 8.

Change-Id: Ic2b031e32f967a23fd118a052bf9edd7d5a3abe6
2016-03-02 11:22:09 -08:00
Debargha Mukherjee
339ef0ce7a Merge "Adds masked variance and sad functions for wedge" into nextgenv2 2016-03-02 03:28:39 +00:00
Debargha Mukherjee
1d69ceee5c Adds masked variance and sad functions for wedge
Adds masked variance and sad functions needed for wedge
prediction modes to come.

Change-Id: I25b231bbc345e6a494316abb0a7d5cd5586a3a54
2016-03-01 17:28:56 -08:00
Yaowu Xu
9425616615 Merge "Fix a unused function warning with var_tx on" into nextgenv2 2016-03-02 01:11:17 +00:00
Hui Su
90fe1cffbf Merge "Fix a couple of minor bugs in vp10_has_right and vp10_has_bottom" into nextgenv2 2016-03-02 00:33:38 +00:00
Yunqing Wang
84f982080a Minor fix in header files
Move functions to be included in extern "C".

Change-Id: If57fa5eb7955763cf99e6839dde4d7221fad75ea
2016-03-01 13:16:03 -08:00
Yaowu Xu
3d89d059dc Merge "Fix an overflow issue for HBD" into nextgenv2 2016-03-01 19:22:48 +00:00
Yaowu Xu
0cfa89c0eb Fix a unused function warning with var_tx on
Change-Id: I1e65d7e1586d8c7c65bb150b1a928cf3adf97366
2016-03-01 11:05:48 -08:00
hui su
935a837c01 Fix a couple of minor bugs in vp10_has_right and vp10_has_bottom
The above-right and left-bottom pixels were sometimes not used even
though they are available. Results on lowres_all and hdres_all are
mostly neutral.

Change-Id: Ic13533dd498442ad5592b83bb5fabf053cc8e8f0
2016-03-01 10:09:04 -08:00
Yaowu Xu
5c613ea881 Fix an overflow issue for HBD
The sum of squared value of a block can overflow 32bit, this commit
changes to use int64_t to avoid the overflow issue.

Change-Id: I78fcd6999634f186f86d649cfce85d97a993d040
2016-03-01 09:44:04 -08:00
Angie Chiang
7667733991 Update obmc counts in multithread mode
Change-Id: I0743e00dad9d36a87870c480922f5ae904bd5c9d
2016-02-29 17:09:02 -08:00
Yunqing Wang
342a368fd4 Do sub-pixel motion search in up-sampled reference frames
Up-sampled the reference frames to 8 times in each dimension using
the 8-tap interpolation filter. In sub-pixel motion search, use the
up-sampled reference frames to find the best matching blocks. This
largely improved the motion search precision, and thus, improved
the compression quality. There was no change in decoder side.

Borg test and speed test results:
1. On derflr set,
Overall PSNR gain: 1.306%, and SSIM gain: 1.512%.
Average speed loss on derf set was 6.0%.
2. On stdhd set,
Overall PSNR gain: 0.754%, and SSIM gain: 0.814%.
On hevchd set,
Overall PSNR gain: 0.465%, and SSIM gain: 0.527%.
Speed loss on HD clips was 3.5%.

Change-Id: I300ebaafff57e88914f3dedc8784cb21d316b04f
2016-02-29 12:14:47 -08:00
Debargha Mukherjee
db084506d8 A build fix and some other cosmetic changes
Fixes some issues introduced by a merge of two patches.
Also decouples the temporal interpolation filter from the switchable
filters for now for ease of experimentation with both separately.

Change-Id: If1c7c08adf00e0cf818fe8d0d3656c26ea65eb32
2016-02-29 10:20:52 -08:00
Debargha Mukherjee
48589e8d07 Merge "Some refactoring and cleanups of interp filter" into nextgenv2 2016-02-29 15:55:48 +00:00
Hui Su
95428a5926 Merge "Fix compiler warnings" into nextgenv2 2016-02-27 05:04:02 +00:00
Jingning Han
0fc0c1a32d Merge "Enable improved temporal filter in ext-interp experiment" into nextgenv2 2016-02-27 01:22:15 +00:00
Jingning Han
dca86af8f4 Merge "Unify frame border extension operation" into nextgenv2 2016-02-27 01:22:03 +00:00
Debargha Mukherjee
bab2912b5e Some refactoring and cleanups of interp filter
Includes various cosmetic changes and refactoring including
naming the sharp filters differently (since they are no longer
8-tap).

Change-Id: Ida5a19ca0daa9f6a64a6734394c685b2a4a2564a
2016-02-26 15:42:49 -08:00
Jingning Han
95d35a4a0b Enable improved temporal filter in ext-interp experiment
It improves the coding performance by 0.3%.

Change-Id: I9703abd705ceacdf9e7424428e5120253cadcc18
2016-02-26 21:59:51 +00:00
Jingning Han
d1d11fc6dd Unify frame border extension operation
This commit unifies the encoder and decoder border extension and
motion compensated prediction process. Remove the decoder specific
flow to simplify the development flow.

Change-Id: I9c43bbe6d7c017e6da2db6a62c5bf3d0af7ccfce
2016-02-26 13:58:53 -08:00
hui su
4aeabf1b0d Fix compiler warnings
Change-Id: Id7240260cec471a3f8d0986b9c8df06efda925f9
2016-02-26 13:52:49 -08:00
Geza Lore
7ded038af5 Port interintra experiment from nextgen.
The interintra experiment, which combines an inter prediction and an
inter prediction have been ported from the nextgen branch. The
experiment is merged into ext_inter, so there is no separate configure
option to enable it.

Change-Id: I0cc20cefd29e9b77ab7bbbb709abc11512320325
2016-02-26 13:01:51 -08:00
Debargha Mukherjee
3287f5519e Merge "Hooks to use 32x32 masked transforms for ext-tx" into nextgenv2 2016-02-26 20:54:37 +00:00
Yi Luo
b347c3c5e5 Merge "Implemented DST 8x8 with SSE2 intrinsics." into nextgenv2 2016-02-26 19:10:00 +00:00
Jingning Han
2b7196a8bb Merge "Use sharp filter for alter reference frame generation" into nextgenv2 2016-02-26 16:24:59 +00:00
Jingning Han
83ecafbd95 Merge "Enable context based motion vector entropy coding" into nextgenv2 2016-02-26 16:24:49 +00:00
Yaowu Xu
a570cefcf8 Merge "Extend vpxssim to handle more HBD combinations" into nextgenv2 2016-02-26 15:57:40 +00:00
Jingning Han
72eda13e50 Use sharp filter for alter reference frame generation
This commit uses 12-tap sharp filter to generate alter reference
frame. It improves the compression performance by
derf    0.45%
hevcmr  0.35%
stdhd   0.79%

No encoding time change is observed.

Change-Id: Ia5dc26d5aae6b9b0cb782e5a28dc5066eeeb2ec8
2016-02-25 14:20:38 -08:00
Hui Su
1226e734a0 Merge "Add test for screen content coding tools in end to end test" into nextgenv2 2016-02-25 03:47:03 +00:00
Angie Chiang
8878fa4f9a convolve8 sse2 test
This experiment shows that when frame size is 64x64
vpx_highbd_convolve8_sse2 and vpx_convolve8_sse2's speed are similar.
However when frame size becomes 1024x1024
vpx_highbd_convolve8_sse2 is around 50% slower than vpx_convolve8_sse2
we think the bottleneck is from memory IO

VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_8_64
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_8_64 (17 ms)
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_16_64
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_16_64 (42 ms)
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_32_64
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_32_64 (139 ms)
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_64_64
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_64_64 (499 ms)

VP10ConvolveTest.vpx_convolve8_sse2_speed_l_8_64
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_8_64 (16 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_16_64
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_16_64 (40 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_32_64
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_32_64 (130 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_64_64
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_64_64 (485 ms)

VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_8_1024
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_8_1024 (32 ms)
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_16_1024
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_16_1024 (61 ms)
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_32_1024
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_32_1024 (196 ms)
VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_64_1024

VP10ConvolveTest.vpx_highbd_convolve8_sse2_speed_64_1024 (694 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_8_1024
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_8_1024 (21 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_16_1024
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_16_1024 (44 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_32_1024
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_32_1024 (138 ms)
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_64_1024
VP10ConvolveTest.vpx_convolve8_sse2_speed_l_64_1024 (491 ms)

Change-Id: I3131a031e0380e8eae748cfcccc6cbb961d05943
2016-02-24 17:01:20 -08:00
hui su
827e1b3fef Add test for screen content coding tools in end to end test
Test screen content coding tools (currently only palette) at
speed 1 and two-pass.

Change-Id: I3c467aee1cd9c366c65a3abfdccfafa0416b59b7
2016-02-24 15:27:07 -08:00
Yi Luo
0353f596e9 Implemented DST 8x8 with SSE2 intrinsics.
Implemented fdst8_sse2() function against C version: fdst8().
Added seven DST related hybrid transform types in vp10_fht8x8_sse2().
Replaced vp10_fht8x8_c() with vp10_fht8x8_sse2() in fwd_txfm_8x8().
Speedup: 18.1%, 11.5%, 22.0% based on speed test from
city_cif.y4m, garden_sif.y4m, mobile_cif.y4m.

Change-Id: Ia4aa1ea44c7a33e494f64ce843037f8703f975e3
2016-02-24 14:58:01 -08:00
Debargha Mukherjee
da2d4a7afc Hooks to use 32x32 masked transforms for ext-tx
Adds hooks to use 32x32 ext-tx. Also adds scan orders for the masked
transforms for 32x32.
Make macro USE_MSKTX_FOR_32X32 1 in blockd.h to support 32x32 masked
transforms for ext-tx.

Change-Id: Ie6564830266651fcafae2d536c274dafd664ce17
2016-02-24 13:08:37 -08:00
Debargha Mukherjee
389efb289e Adds an utility macro ROUNDZ_POWER_OF_TWO
This macro works for the shift parameter being 0.
The ROUND_POWER_OF_TWO macro does not.

Change-Id: I8434d2933892e09bbc0d2dafc934d0c3637df347
2016-02-24 12:35:29 -08:00
Hui Su
aa703adb46 Merge "Fix some compiler warnings." into nextgenv2 2016-02-24 20:28:37 +00:00
Debargha Mukherjee
ad574d4008 Merge "Some fixes in reconintra" into nextgenv2 2016-02-24 20:25:25 +00:00
hui su
8537826eb4 Fix some compiler warnings.
"taking the absolute value of unsigned type 'unsigned int' has no effect"

Change-Id: Iea1f67c2a3171a98ca89d5dc7192a5508d086c16
2016-02-24 11:17:33 -08:00
Yaowu Xu
aa6c754635 Merge remote-tracking branch 'webm/master' into nextgenv2 2016-02-24 10:53:17 -08:00
Debargha Mukherjee
3ef0db078e Some fixes in reconintra
Change-Id: I0b0fa7c9853ce12d39ee21829686b308154b2c61
2016-02-24 10:49:35 -08:00
Debargha Mukherjee
557cb9a879 Merge "Rename above and left offset variables." into nextgenv2 2016-02-24 18:48:22 +00:00
Debargha Mukherjee
c1e51beba6 Merge "Experiment to use image domain dist in baseline." into nextgenv2 2016-02-24 18:30:50 +00:00
Geza Lore
44dba01f3e Rename above and left offset variables.
These variable names were legacy from a previous version of this
function and in the current version they were confusingly backwards.

Change-Id: I4f6c1628f296fd5b650fd9c5e2d56d7daf66a3f6
2016-02-24 17:39:48 +00:00
Jingning Han
47bc2a5741 Enable context based motion vector entropy coding
This commit enables a context based motion vector entropy coding
conditioned on dynamic reference motion vector list. This (along with
the previous CL) imporves the coding gains due to dynamic motion
vector referencing based entropy coding:
derf   0.1%
hevcmr 0.2%
stdhd  0.7%
hevchr 0.4%

No encoding time change was observed.

Change-Id: I179c723844079195f6952a12582996a3ca9e9914
2016-02-24 09:02:32 -08:00
Yue Chen
02e734168c Merge "Optimizing obmc rd decision by checking the real rd cost" into nextgenv2 2016-02-23 23:05:06 +00:00
Yue Chen
a614262edb Optimizing obmc rd decision by checking the real rd cost
Instead of using model_rd_for_sb() to estimate the cost and make the
decision on bmc/obmc, we use super_block_yrd/uvrd() to calculate and
compare the real rd costs of bmc and obmc.

Average bit-rate reduction(%) of obmc experiment:
derflr/derfhd/hevcmr/hevchd
2.353/TBD/TBD/TBD
Before the optimization, the coding gain was:
1.582/1.109/1.600/1.164

Note: there is still some mysterious bug because that compared to
the previous version, the performance at low bit rate drops a lot.

Change-Id: I8dbee04a272190f10516a3953c1ae690f8136766
2016-02-23 14:16:12 -08:00
hui su
875aa1c58c Fix palette mode
It was broken by commit 3787b17439d00d3684646e97c18d231860dae8b9

Change-Id: I2be0f6243e8716b9ca4c0321de381419108d1abe
2016-02-23 12:01:23 -08:00
Alex Converse
05f33142f5 Merge "Port "Better workaround for Bug 1089." to vp10 (nextgenv2)." into nextgenv2 2016-02-23 17:53:57 +00:00
Geza Lore
3c4b56c4dd Experiment to use image domain dist in baseline.
Change-Id: Ib29f510289716b5ab5c7d74d32a450c190308a83
2016-02-23 09:35:40 -08:00
Yaowu Xu
272dbaa13f Merge "Cleanup psnr.h" into nextgenv2 2016-02-23 17:13:34 +00:00
Angie Chiang
5340d1424d Merge "Merge 12sharp filter into ext-interp" into nextgenv2 2016-02-23 01:26:23 +00:00
Yaowu Xu
ec6b8d8b76 Merge "Add shift stage in FASTSSIM computation" into nextgenv2 2016-02-23 00:43:18 +00:00
Angie Chiang
e4af6a42a7 Merge 12sharp filter into ext-interp
Change-Id: I7df48e7f3b57f212798ef4be86f28aed928fc3e0
2016-02-22 16:26:38 -08:00
Yaowu Xu
eeaf8e6b6c Extend vpxssim to handle more HBD combinations
Change-Id: I38426d946b74c9090a265d34b89e2db6693927c2
2016-02-22 16:09:08 -08:00
Yaowu Xu
38cfc45e07 Cleanup psnr.h
Change-Id: Id026e72ee655ee5bd645a89e378da0d462be367d
2016-02-22 15:37:40 -08:00
Angie Chiang
a90f8b8c8f Merge "sync dec/enc mv clamp behavior in prediction" into nextgenv2 2016-02-22 23:30:10 +00:00
Yaowu Xu
d1c5cd4a30 Add shift stage in FASTSSIM computation
This commits adds a shift stage for FASTSSIM computaton when source
bit depth is different from working bit depth, to make sure metric
results are calculated in bit_depth consistent with source.

Change-Id: I997799634076ef7b00fd051710544681ed536185
2016-02-22 14:58:10 -08:00
Yaowu Xu
be5d1693fb Merge "Add shift stage for PSNRHVS computation" into nextgenv2 2016-02-22 21:56:00 +00:00
Angie Chiang
e9336e4dfc sync dec/enc mv clamp behavior in prediction
Change-Id: I12ce1da18b3db7bd2f36e0424a264b3c36fbed61
2016-02-22 11:36:03 -08:00
Angie Chiang
94493e606d Merge "Fix 12 TAP convolution bug" into nextgenv2 2016-02-22 19:03:06 +00:00
Yaowu Xu
af3a8381ef Merge "Move psnrhvs function declaration to psnr.h" into nextgenv2 2016-02-22 18:46:39 +00:00
Yaowu Xu
9bce2f76fb Merge "Extend HBDMetricTest" into nextgenv2 2016-02-22 18:46:26 +00:00
Yaowu Xu
195bf52bca Add shift stage for PSNRHVS computation
This commit adds the ability to shift down the working buffer when
source bit_depth is different than working bit_depth. It does so
by shift down to be consistent with source bit_depth.

Change-Id: Idfdbfc614d73fe445d62e35e642cc7d75e9dc4ff
2016-02-22 10:22:42 -08:00
Alex Converse
9fce131de8 Port "Better workaround for Bug 1089." to vp10 (nextgenv2).
Don't initialize first pass costs for a number of symbols where first
pass probabilities aren't initialized.

As a side effect, an illegal read in the ANS experiment is fixed.

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

Change-Id: I97438c357bd88f52f5a15c697031cf0c3cc8f510
2016-02-22 10:19:03 -08:00
Jingning Han
404c512786 Merge "Unify motion vector cost system" into nextgenv2 2016-02-22 17:38:00 +00:00
Jingning Han
a10814e11e Merge "Account context based prob model for motion vector cost estimate" into nextgenv2 2016-02-22 17:37:42 +00:00
Jingning Han
1f984a5a63 Merge "Vectorize motion vector probability models" into nextgenv2 2016-02-22 17:37:29 +00:00
Jingning Han
682dad0ec7 Merge "Store predicted motion vectors" into nextgenv2 2016-02-22 17:14:05 +00:00
Yaowu Xu
6e695da2d9 Move psnrhvs function declaration to psnr.h
From "ssim.h"

Change-Id: Ie53378794149ef8a844b4eb47ad4f08579de4b60
2016-02-22 08:38:49 -08:00
Jingning Han
fec5988657 Unify motion vector cost system
This commit unifies the motion vector cost buffers for full pixel
and sub-pixel motion search. The new motion vector coding system
provides 0.5% coding gains for 720p and above sequences and 0.2%
for lower resolution sets.

Change-Id: I927ec81eadc39d11a3c12b375221a1ddd2e8bf24
2016-02-21 22:21:28 -08:00
Yaowu Xu
f6a7b17a35 Extend HBDMetricTest
This commit extends the HBDMetricTests to handle testing for metric
computation where input source depth is different from working bit
depth.

Change-Id: I5d11101cc9603a3fd09e8439816bb982a0f1b654
2016-02-20 21:19:18 -08:00
Angie Chiang
1e403064b9 Fix 12 TAP convolution bug
Priviously, we do 12-tap interpolation even there is no sub pixel,
This could cause a bug becuase decoder doesn't extend border when there
is no sub pixel. In this situation, if we still do interpolation, we
will access the border extension which doesn't exist and cause a
memory error

Change-Id: I55b879722f0a10c5d13261bd9617a75c826a2418
2016-02-19 19:31:38 -08:00
Jingning Han
03c01bc3c0 Account context based prob model for motion vector cost estimate
This commit accounts for the context based probability model for
motion vector cost estimate in rate-distortion optimization.

Change-Id: Ia068a9395dcb4ecc348f128b17b8d24734660b83
2016-02-19 16:32:51 -08:00
Yi Luo
961668c91c Merge "Initial SSE2 function fdst4_sse2()." into nextgenv2 2016-02-20 00:31:31 +00:00
Jingning Han
df59bb8986 Vectorize motion vector probability models
This commit converts the scalar motion vector probability model
into vector format for later precise estimate.

Change-Id: I7008d047ecc1b9577aa8442b4db2df312be869dc
2016-02-19 16:20:41 -08:00
Jingning Han
876c8b03e6 Store predicted motion vectors
Change-Id: I51307a217eeba14dbdaa2522be474530316a4faa
2016-02-19 14:25:34 -08:00
Yi Luo
5456aee6fc Initial SSE2 function fdst4_sse2().
Applied DST sse2 to 4x4 transform.

Fixed DST coefficient packing to satisfy 4x4 transpose requirement.

Change-Id: I9164714c77049523dbbc9e145ebb10d7911fba9d
2016-02-19 11:13:37 -08:00
Yaowu Xu
5712456bd9 Merge "Properly normalize HBD sse computation" into nextgenv2 2016-02-19 02:26:47 +00:00
Yaowu Xu
0c0f3efdeb Properly normalize HBD sse computation
This fixes a bug in HBD sum of squared error computation introduced
in  #abd00505d1c658cc106bad51369197270a299f92.

Change-Id: I9d4e8627eb8ea491bac44794c40c7f1e6ba135dc
2016-02-18 15:42:19 -08:00
Hui Su
286480de9b Merge "Speed-up for ext-intra" into nextgenv2 2016-02-18 23:12:45 +00:00
Debargha Mukherjee
9a019bce84 Merge "cost_coeff speed improvements" into nextgenv2 2016-02-18 19:31:18 +00:00
hui su
c4b69eb0eb Speed-up for ext-intra
-Avoid unnecessary calculations
-Use SIMD when possible

Encoder is about 5% faster with the extra intra prediction angles
enabled.

Change-Id: I131056befe327cedab217ad4a40d5f2a11318acc
2016-02-18 10:50:57 -08:00
Julia Robson
c6eba0b47a cost_coeff speed improvements
Preliminary tests indicated that these changes make cost_coeffs
approximately 20% faster which is a 2% improvement overall

Change-Id: Iaf013ba75884415cd824e98349f654ffb1c3ef33
2016-02-18 13:18:39 +00:00
Yaowu Xu
acc4addb60 Merge "Add tests for Highbitdepth PSNR metric computations" into nextgenv2 2016-02-18 01:01:00 +00:00
Yaowu Xu
7823fbb45c Merge "Move PSNR related functions into vpx_dsp/psnr.c" into nextgenv2 2016-02-18 01:00:54 +00:00
Yaowu Xu
9fb593d0fc Add tests for Highbitdepth PSNR metric computations
Change-Id: I07324155f73bbdbe25bb7a7ccd587ebf9010ac7a
2016-02-17 21:28:22 +00:00
Yaowu Xu
7538501ad1 Move PSNR related functions into vpx_dsp/psnr.c
This makes all metric computation to locate at some place, also gets
rid of duplicate code between vp9 and vp10.

Change-Id: I24a2707d183a2419cd18a8343010adae185ffcd4
2016-02-17 13:05:34 -08:00
Jingning Han
dd1391a005 Merge "Fix enc/dec mismatch in dynamic mv referenceing experiment" into nextgenv2 2016-02-17 19:03:14 +00:00
Debargha Mukherjee
35d9eadf08 Merge "Extends ext-tx to support 32x32 masked transforms" into nextgenv2 2016-02-17 18:33:10 +00:00
Debargha Mukherjee
7485498773 Extends ext-tx to support 32x32 masked transforms
Adds new 32x32 masked 1-d transforms that combine 1-D length-16
DCT with length-16 identity transforms.

To be continued in subsequent patches.

Change-Id: I0b4f66492d44c079b3c3b531ba48a97201de1484
2016-02-17 09:31:34 -08:00
Jingning Han
95247be0bf Fix enc/dec mismatch in dynamic mv referenceing experiment
This commit fixes an enc/dec mismatch in the dynamic motion vector
referencing experiment introduced in 837ef00.

Change-Id: I9fbe116fce118a80ef0f96bf41ce1f802547c2ee
2016-02-17 09:29:54 -08:00
Yaowu Xu
6ed7f7a516 Merge branch 'master' into nextgenv2 2016-02-17 07:23:58 -08:00
Yue Chen
907f88c4e6 Fixing a bug in obmc prediction in the rd loop
This bug made the rd loop use one-side obmc (compound of the current
predictor and the predictors of the left mi's, while the above ones
are ignored by mistake) to determine whether to use obmc. This fix
improved the compression performance by ~0.6% on different test sets.

Coding gain (%) of obmc experiment on derflr/derfhd/hevcmr/hevchd:
1.568/TBD/1.628/TBD

Change-Id: I43b239bedf9a8eebfd02315b1b036e140a998140
2016-02-16 14:43:45 -08:00
Debargha Mukherjee
f9c25498eb Merge "Tweak encoding flags for supertx." into nextgenv2 2016-02-16 22:10:30 +00:00
Debargha Mukherjee
907544a328 Merge "Code cleanup: remove redundant DST1 code" into nextgenv2 2016-02-16 19:43:25 +00:00
Geza Lore
c582aacb7a Tweak encoding flags for supertx.
Change-Id: I46f69d3a176897294d33c3f6d30b23c75b6267a8
2016-02-16 11:24:17 -08:00
Debargha Mukherjee
1badceada8 Code cleanup: remove redundant DST1 code
Removes the USE_DST2 flag that was on by default. DST2 performs
slightly better that DST1 and is faster to compute.

Change-Id: Ifb788f3f0a0e1995d7625230cec144b876f01206
2016-02-16 10:36:02 -08:00
Hui Su
0107373234 Merge "Add a speed feature to skip transform type selection" into nextgenv2 2016-02-16 18:31:18 +00:00
Debargha Mukherjee
8cc04ef505 Merge "Further supertx costing fixes." into nextgenv2 2016-02-16 18:02:24 +00:00
Debargha Mukherjee
6f49446dfa Merge "Fix double counting of compound reference bit cost." into nextgenv2 2016-02-16 17:55:49 +00:00
Geza Lore
abd00505d1 Add optimized vpx_sum_squares_2d_i16 for vp10.
Using this we can eliminate large numbers of calls to predict intra,
and is also faster than most of the variance functions it replaces.
This is an equivalence transform so coding performance is unaffected.

Encoder speedup is approx 7% when var_tx, super_tx and ext_tx are all
enabled.

Change-Id: I0d4c83afc4a97a1826f3abd864bd68e41bb504fb
2016-02-15 16:54:52 +00:00
Yue Chen
d1cad9c3f5 Overlapped block motion compensation experiment
In this experiment, an obmc inter prediction mode is enabled for
>= 8X8 inter blocks. When the obmc flag is on, the regular block-
based motion compensation will be refined by using predictors of
the above and left blocks.
Fixed some compatibility issues with vp9_highbitdepth, supertx,
ref_mv, and ext_interp.

Coding gain (%) on derflr/hevcmr/hevchd
OBMC:
1.047/1.022/0.708
OBMC + SUPERTX:
1.652/1.616/1.137
SUPERTX:
0.862/0.779/0.630

Change-Id: I5d8d3c4729c6d3ccb03ec7034563107893103b7f
2016-02-12 13:36:25 -08:00
Alex Converse
a45d5d3f94 Merge "Port switch to 9-bit rate cost to vp10." into nextgenv2 2016-02-12 21:15:35 +00:00
Geza Lore
599003969d Further supertx costing fixes.
Change-Id: I85897168c7fda3fd79daaba985b6607fd7df476b
2016-02-12 11:47:26 -08:00
Jingning Han
18eaf8e6fc Merge "Refactor vp10_drl_idx concept" into nextgenv2 2016-02-12 19:39:44 +00:00
Debargha Mukherjee
937c97faed Merge "Adding loop wiener restoration" into nextgenv2 2016-02-12 19:32:18 +00:00
Debargha Mukherjee
8b0a5b8718 Adding loop wiener restoration
Adds a wiener filter based restoration scheme in loop which can
be optionally selected instead of the bilateral filter.

The LMMSE filter generated per frame is a separable symmetric 7
tap filter. Three parameters for each of horizontal and vertical
filters are transmitted in the bitstream. The fourth parameter
is obtained assuming the sum is normalized to 1.
Also integerizes the bilateral filters, along with other
refactoring necessary in order to support the new switchable
restoration type framework.

derflr: -0.75% BDRATE

[A lot of videos still prefer bilateral, however since many frames
now use the simpler separable filter, the decoding speed is
much better].

Further experiments to follow, related to replacing the bilateral.

Change-Id: I6b1879983d50aab7ec5647340b6aef6b22299636
2016-02-12 09:56:24 -08:00
Yaowu Xu
18b6e9a36f Merge branch 'masterbase' into nextgenv2
Conflicts:
	vp10/encoder/rdopt.c

Change-Id: If720e7f9810378d24bf9fd51a95fd29c3bc5d774
2016-02-12 09:19:30 -08:00
Yaowu Xu
13efa8a089 Merge "Refactor internal stats code" into nextgenv2 2016-02-12 16:37:16 +00:00
Yaowu Xu
1a69cb286f Refactor internal stats code
Also removed the use of postprocessing in computing internal stats.

Change-Id: Ib8fdbdfe7b7ca05cd1a034a373aa7762fa44323c
2016-02-12 07:31:29 -08:00
Yaowu Xu
89a1ab395c Merge "Enable computing PSNRHVS for hbd build" into nextgenv2 2016-02-12 15:24:28 +00:00
Jingning Han
a39e83d743 Refactor vp10_drl_idx concept
Remove the implicit assumption on offsetting the index by 1.

Change-Id: I6f1d391e067d57b7e45b9287e866014dbc16da71
2016-02-11 16:38:13 -08:00
Debargha Mukherjee
c1924b9ff0 Merge "Complete high bitdepth VAR_TX implementation." into nextgenv2 2016-02-12 00:16:18 +00:00
Angie Chiang
368e3d9293 Merge "Refactor: add predict_interp_filter() to simplify the flow in handle_inter_mode" into nextgenv2 2016-02-12 00:16:13 +00:00
Yaowu Xu
bb8ca08816 Enable computing PSNRHVS for hbd build
This commit adds computation of PSNRHVS for highbitdepth build, it
also adds tests to make sure the calculation of psnrhvs metric for
10 and 12 bit correct.

Change-Id: Iac8a8073d2b3e3ba5d368829d770793212fa63b6
2016-02-11 13:17:59 -08:00
Jingning Han
57c83b330e Remove redundant parameters from vp10_txfm_rd_in_plane_supertx()
Change-Id: Icb164403239f88f18fd64de75d4881d33d3ab1cc
2016-02-11 11:53:22 -08:00
Jingning Han
f70134f729 Align rate-distortion cost metric for chroma compoments
This commit aligns the rate-distortion metrics for both luma and
chroma components in super transform rate-distortion optimization.
It improves the coding gains due to var-tx and supertx experiments
by 0.2% for high resolution test sets.

Change-Id: Ib89d99e29cb5ee27b1f867e301954d4164d8b364
2016-02-11 11:07:09 -08:00
Jingning Han
5c772f38fa Format clean-ups in transform experiments
Change-Id: Ib2843cb03ae452ce9fec3a94c709431ea0202d8b
2016-02-11 11:07:00 -08:00
Alex Converse
b3ad81288f Port switch to 9-bit rate cost to vp10.
Brings the following commits to vp10:
269428e Tie the bit cost scale to a define.
d13385c Switch to 9-bit rate cost constants built on a 256 probability denominator.
ad43a73 Fix a signed overflow in vp9 motion cost.
1c9b091 Fix some interger overflow errors
fac947d Restore previous motion search bit-error scale.

Change-Id: I598ba7ee7efcde18439c31dfa96b86cbf297a580
2016-02-11 09:54:24 -08:00
Geza Lore
432e875dce Complete high bitdepth VAR_TX implementation.
VAR_TX now works in the high bitdepth configuration.

Change-Id: I4114d7d9ed59c598f1e4d35b8e75876c07074ba7
2016-02-11 10:49:56 +00:00
Yaowu Xu
00380700fb Merge "Enable computing of FastSSIM for HBD build" into nextgenv2 2016-02-11 05:43:55 +00:00
Hui Su
6779be2487 Merge "Refactor rd_pick_intra_angle_" into nextgenv2 2016-02-11 01:44:14 +00:00
Yaowu Xu
c0874f2441 Enable computing of FastSSIM for HBD build
This commit adds the computation of fastSSIM for highbitdepth build,
it also modifies the hbdmetric test to be more generic and applicable
for fastSSIM.

The 255 used for calculating ssim constants c1 and c2 is not exactly
scaled by 4x and 16x to 1023 and 4095, therefore requries the metric
test to have a thresold more tolerant than 0, currently at 0.03dB.

Change-Id: I631829da7773de400e77fc36004156e5e126c7e0
2016-02-10 17:11:58 -08:00
Yue Chen
e25ccffcef Adding the config tag for the OBMC experiment
obmc: We add an obmc prediction mode at superblock level.
When it is enabled, predictors of the above and left blocks
are used to refine the regular block-based motion compensation.

Change-Id: I6310104ea3dfece16d736351e368861471dd1c9b
2016-02-10 15:58:08 -08:00
hui su
5a7c8d8c1d Refactor rd_pick_intra_angle_
Change-Id: I6c78188bdedb52655678c63f6a767567b256a880
2016-02-10 15:41:04 -08:00
Angie Chiang
c0035cc480 Refactor: add predict_interp_filter() to
simplify the flow in handle_inter_mode

Change-Id: Ic7934c0a5d0a79bdf546b4d2d106035449b475a6
2016-02-10 15:32:10 -08:00
hui su
329e340dc5 Add a speed feature to skip transform type selection
Setting FIXED_TX_TYPE as 1 makes the encoder skip tx_type search,
about twice as fast.

This speed feature is off by defualt; we can turn it on when we
want to quickly test new ideas.

Change-Id: Ieab5807d17fcd54fce3e8ae2f59a18b42eb79408
2016-02-10 15:11:01 -08:00
Yaowu Xu
6eaca90d65 Merge "Add a test for VPXSSIM computation for HBD inputs" into nextgenv2 2016-02-10 22:50:41 +00:00
Angie Chiang
ed5a6bd947 Merge "fix range_check error in vp10_[fwd/inv]_txfm1d.c" into nextgenv2 2016-02-10 21:21:57 +00:00
Yaowu Xu
988f27bfcf Add a test for VPXSSIM computation for HBD inputs
Change-Id: I61dc0f43d073b62d0eab8cd7471c2d76e03379bf
2016-02-10 12:49:19 -08:00
Jingning Han
3c8bd0d3de Merge "Resolve conflict between var-tx and super-tx" into nextgenv2 2016-02-10 18:54:21 +00:00
Jingning Han
4c6c82a2e8 Resolve conflict between var-tx and super-tx
This commit aligns the rate-distortion metric for the recursive
transform block partitioning and the super transform. It resolves
the conflicts between these two experiments. The coding performance
gains of the combined experiments (var-tx + super-tx) has been
improved:

derf   0.89%  ->  1.9%
hevcmr 1.06%  ->  1.8%
stdhd  0.29%  ->  1.4%
hevchr 0.80%  ->  2.3%

Change-Id: I7e33994ad70c1b2751435620815f867d82172f41
2016-02-10 09:36:40 -08:00
Jingning Han
ba1bed68ec Merge "Remove redundant void statement" into nextgenv2 2016-02-10 16:50:18 +00:00
Jingning Han
32a6a55b66 Merge "Replace arbitrary number with defs" into nextgenv2 2016-02-10 16:50:05 +00:00
Jingning Han
260da6ca8d Merge "Entropy coding for dynamic ref mv modes" into nextgenv2 2016-02-10 16:49:46 +00:00
Geza Lore
fd5463571e Fix double counting of compound reference bit cost.
These costs are added in separately just before the computed
ref_costs_* are added in the calling functions, so they were
effectively double counted.

Change-Id: Ic941d0243460cc2e750791cfc508e97d8b90e8fd
2016-02-10 13:37:31 +00:00
Jingning Han
875da8c666 Remove redundant void statement
Change-Id: Ia9ccba156a8a3ada6928be53eb6258fb68b6c9f1
2016-02-09 21:27:13 -08:00
Jingning Han
6d5d4395b5 Replace arbitrary number with defs
Change-Id: Ia5a68f26c67d13d3f2dd3b3f8afabb781e2c8f73
2016-02-09 21:27:13 -08:00
Angie Chiang
f98565755a fix range_check error in vp10_[fwd/inv]_txfm1d.c
Change-Id: I7a810323fc33fb6d373c3f5bb4d5d0d33170948c
2016-02-09 16:01:11 -08:00
Angie Chiang
7a8c7853c1 Remove C99 struct init syle in fwd/inv config
Change-Id: Ieeb458353af6c903445518eef60328c62ca5c741
2016-02-09 15:38:27 -08:00
Jingning Han
14a7aada68 Merge "Fix partition type costing." into nextgenv2 2016-02-09 22:31:14 +00:00
Debargha Mukherjee
34aa5e1d21 Merge "A variety of fixes for supertx/var-tx rd costing" into nextgenv2 2016-02-09 17:16:23 +00:00
Geza Lore
4ac6727438 Fix partition type costing.
This patch makes rd optimization use the same context for computing
the rate cost of coding the partitioning as the packer actually uses
when emitting it in write_modes_sb.

Change-Id: Idb1427bb2f9c37ab80c6aa182f7ff754ef0595cb
2016-02-09 10:36:53 +00:00
Debargha Mukherjee
e2c1ea9422 A variety of fixes for supertx/var-tx rd costing
Change-Id: I8a3d59378abb1dfa4e614b2975c2db05d4224bd5
2016-02-08 21:46:08 -08:00
Yaowu Xu
27bd9939a3 Merge "Fix a bug in HBD buffer size computation" into nextgenv2 2016-02-09 04:40:46 +00:00
Yaowu Xu
bb5f9e431f Fix a bug in HBD buffer size computation
The value of use_highbitdepth flag is used for compute the size for
high bit depth buffer allocation, which should take value 0 or 1
depending on if the buffer is used for high bit depth or not.
Previously, the values is set to 8 or 0, this commit fixes the issue
and properly set the value for this flag to 1 or 0.

This cuts the size of highbitdepth buffer memory allocation to 2/9 of
the size prior to the fix.

Change-Id: I401518b5a6147e5d8a973e54f7ca6bc1892065e0
2016-02-08 18:52:08 -08:00
Jingning Han
4958987b2a Entropy coding for dynamic ref mv modes
This commit enables entropy coding for dynamic reference motion
vector modes. The probability model is contexted on the ranking
categories of the reference motion vector candidates.

Change-Id: I09b58d98a409d63ec1a407331e29f8945b7ef17d
2016-02-08 17:05:24 -08:00
Debargha Mukherjee
d46c1f2349 Explicitly set tx_type for sub8x8 blocks
Fixes an issue where the tx_type was not set correctly for
sub8x8 inter and intra blocks. In the current syntax, for
sub8x8 blocks, there is still a single tx_type that is
transmitted. Ideally, this should be searched for the best
rd performance, albeit at the expense of encode speed.
For now, we just set it to DCT_DCT. Previously it was left
incorrectly as what was used for the previous non sub8x8
block.

derflr: BDRATE -0.277%

Change-Id: If76ba903bfbfd4d374cf1ac7d1daee50e92f0edd
2016-02-08 16:22:25 -08:00
Jingning Han
afd73539bb Merge "Enable dynamic ref motion vector mode for compound inter block" into nextgenv2 2016-02-09 00:04:36 +00:00
Yaowu Xu
1c8fa6a5ca Merge "Change to use local variables consistently" into nextgenv2 2016-02-08 23:58:23 +00:00
Yaowu Xu
f8cd25df1d Merge "Remove a flavor of SSIM that is never really used." into nextgenv2 2016-02-08 23:39:04 +00:00
Yaowu Xu
ff70d988c6 Merge "Set a max dB value for PSNR_HVS and FAST_SSIM" into nextgenv2 2016-02-08 23:38:58 +00:00
Yaowu Xu
78bca69138 Merge "Fix msvc compiler warnings" into nextgenv2 2016-02-08 23:38:48 +00:00
Yaowu Xu
e76714f4eb Merge "Normalize fdct8x8 in psnrhvs computation" into nextgenv2 2016-02-08 23:38:41 +00:00
Yaowu Xu
090eaadf20 Change to use local variables consistently
This commit does not change the computation, nor results.

Change-Id: I1a7bb47050220d970f075458b507c5e55d93b22e
2016-02-08 11:38:04 -08:00
Jingning Han
28e0393f23 Enable dynamic ref motion vector mode for compound inter block
This commit enables the dynamic reference motion vector coding mode
for the compound inter blocks.

Change-Id: Ibe78fd8de6989db392cd67a9d81a69d680345ba1
2016-02-08 11:24:15 -08:00
Yaowu Xu
204e77e059 Remove a flavor of SSIM that is never really used.
Change-Id: I61ea7f63acbcfeecd3f7dba5a5a38b980efc802b
2016-02-08 11:22:08 -08:00
Yaowu Xu
efe1b1dbf7 Set a max dB value for PSNR_HVS and FAST_SSIM
Now set at 100.0 instead of infinite

Change-Id: I41bae0c4bd95a26f9819584e7311b7945df1271a
2016-02-08 10:55:25 -08:00
Angie Chiang
355e586f45 Merge "Experiment: use 12 taps for sharp filter" into nextgenv2 2016-02-08 18:33:51 +00:00
Angie Chiang
eb71ef9235 Merge "add convolution function with adjustable length" into nextgenv2 2016-02-08 18:32:38 +00:00
Yaowu Xu
c89bcae560 Merge "Fixed warnings of unused functions" into nextgenv2 2016-02-08 18:18:47 +00:00
Yaowu Xu
3c28b4a8ff Fix msvc compiler warnings
There were a number of compiler warnings:
1. int16_t to uint8_t in recon_intra.c;
2. double to float conversions in psnrhvs.c
3. intptr_t to int in quantize.c
4. size_t to int32_t in decoder.c

Change-Id: Id95423b17779dcfa6cf39d9a90fe8cb8b910f5df
2016-02-08 10:14:08 -08:00
Yaowu Xu
d2ef991f9e Merge "Fix bad merge artifacts" into nextgenv2 2016-02-08 17:25:54 +00:00
Yaowu Xu
ac898d221f Normalize fdct8x8 in psnrhvs computation
This is to match the scale to the fdct8x8 used in original daala
psnrhvs computation.

Change-Id: Ic30b50747ba9c340bcb679f7439640046c69f90a
2016-02-08 17:13:18 +00:00
Angie Chiang
b9d3fbe0c5 Experiment: use 12 taps for sharp filter
Set USE_12_SHARP_FILTER to 1 to turn on the experiment
The psnr percentages increase
       derf   stdhd
lowbd  +0.332 +0.318
highbd +0.476 +0.507

Change-Id: I783c0fc764ee8541645e100453c9b2073924e209
2016-02-05 17:39:37 -08:00
Angie Chiang
d5349112e8 add convolution function with adjustable length
Change-Id: I1a5b1e15a188ef11594d0c6ac0dbd42aac59cfca
2016-02-05 17:33:19 -08:00
Yaowu Xu
4d90ae4b49 Fixed warnings of unused functions
And enabled the warning flag in configure for vp10.

Change-Id: If556d6fac65755af3d6ed7fe71b8eca0ef1b1965
2016-02-05 14:34:09 -08:00
Hui Su
e5bd08185a Merge "Add a speed feature for intra filter search" into nextgenv2 2016-02-05 18:49:24 +00:00
Yaowu Xu
105da4128d Fix bad merge artifacts
Temporaly disable warning for unused function for vp10, needs clean
out the warnings before re-enable the flag for vp10.

Change-Id: I5636f8cd607423f6ea6963db9c2cbd688e30b495
2016-02-05 09:04:41 -08:00
Yaowu Xu
48b2713553 Merge branch 'master' into nextgenv2 2016-02-05 05:00:06 -08:00
Hui Su
9604f69005 Merge "Add 8-tap interpolation filter options for intra prediction" into nextgenv2 2016-02-04 23:06:28 +00:00
Jingning Han
d1c2949eb4 Merge "Generalize the dynamic reference motion vector coding mode" into nextgenv2 2016-02-04 22:28:56 +00:00
Yaowu Xu
027cc8c873 merge per-segment lossless feature in misc_fixes
Change-Id: I56d56781d371c99aa5cdd2db1cbc0a17437723e9
2016-02-04 08:31:16 -08:00
Debargha Mukherjee
9909b5414e Merge "Fix for supertx: ignore skip_txfm optimization" into nextgenv2 2016-02-04 04:28:29 +00:00
hui su
5b618b7cae Add a speed feature for intra filter search
Seperate the prediction angle search and fitler search.
It can reduce the computation overhead of filter search by as much
as 85%, while keeping more than 50% of the coding gain.

Change-Id: Id152f71e20ebcaca8b429bdd4ca1fbeb646fc6bf
2016-02-03 15:12:06 -08:00
Yaowu Xu
aac86aa093 Merge "Merge branch 'master' into nextgenv2" into nextgenv2 2016-02-03 22:54:25 +00:00
hui su
3b1c766802 Add 8-tap interpolation filter options for intra prediction
BD-rate performance improvement (on top of ext-intra):
derflr  0.22%
hevclr  0.36%
hevcmr  0.48%
hevchr  0.37%
stdhd   0.19%

Average speed impact on some derf clips is about 40% slower (on
top of ext-intra). Speed improvment is a to-do.

Change-Id: I8fe3fe8c5e4f60d0462778adbcc15c84dfbe7a25
2016-02-03 14:19:20 -08:00
Jingning Han
4fb8b217e6 Generalize the dynamic reference motion vector coding mode
This commit generalizes dynamic reference motion vector coding mode
to support multiple candidate modes in the rate-distortion
optimization scheme and to support the selection in the bit-stream
syntax. The maximum number of modes allowed is currently limited to
4. The syntax elements for the dynamic reference motion vector
modes are using binary codes. The scheme supports single reference
frame.

It improves the compression performance
derf   0.135%
hevcmr 0.098%

Change-Id: Id053d6ce76e8365e52727bd0d12d28ce3de2e0e8
2016-02-03 11:57:42 -08:00
Jingning Han
6cfb488500 Merge "Account for zero-forcing operation in selective ref mv mode" into nextgenv2 2016-02-03 19:07:28 +00:00
Jingning Han
590265eaf1 Account for zero-forcing operation in selective ref mv mode
It makes the encoder accounts for the block zero-forcing operation
when optimizing the mode decisions.

Change-Id: I2c8e243756080b446b8a53a9679f75c4c47148cf
2016-02-03 09:26:35 -08:00
Yaowu Xu
238cc11cce Merge branch 'master' into nextgenv2
Change-Id: Ib050607fa5c0288360ff224fd048445d16568520
2016-02-03 09:26:13 -08:00
Debargha Mukherjee
7cdb078673 Merge "Supertx fix for 422 colour subsampling" into nextgenv2 2016-02-03 17:19:09 +00:00
Geza Lore
17a3d31d85 Fix for supertx: ignore skip_txfm optimization
Change-Id: I80eedb548c449ec43c6b5b88c5493b665606906e
2016-02-03 12:51:39 +00:00
Julia Robson
4fbd678f99 Supertx fix for 422 colour subsampling
Fixes assertion for football_422_4sif.y4m when supertx, var_tx and
ext_tx are all enabled. Problem was after subsampling, the u and v
blocks being encoded were no longer square.

Change-Id: Ie626f30a2e64538d33343a26d5124a79a6f2b985
2016-02-03 12:17:25 +00:00
Jingning Han
67cf8908bc Enable adaptive motion vector referencing mode
This commit allows an adaptive motion vector referencing mode
approach. It checks the available reference motion vector candidate
list and decides the amount of motion vector referencing modes. The
current implementation assumes simple binary coding for the syntax.

The compression performance is improved by
derf   0.11%
hevcmr 0.38%
stdhd  0.09%
hevchr 0.23%

The coding gains due to the new reference motion vector system are
derf   1.0%
hevcmr 1.7%
stdhd  1.4%
hevchr 1.3%

Change-Id: Idf932fc373546fe59c8741f1b933ff656e8dbc3f
2016-02-02 15:15:40 -08:00
Debargha Mukherjee
331b029590 Merge "Fixing a issue of calculating tx cost for SUPERTX+VAR_TX" into nextgenv2 2016-02-02 15:14:39 +00:00
Yaowu Xu
0839d02b4c Merge branch 'master' into nextgenv2 2016-02-02 05:00:05 -08:00
Angie Chiang
392d577c49 Merge "Pass filter type instead of filter array" into nextgenv2 2016-02-02 02:32:16 +00:00
Angie Chiang
10ad97bc55 Pass filter type instead of filter array
Change-Id: I25f2149ddaa332722f7ab82e8f832a253c4b6ab3
2016-02-01 17:03:50 -08:00
Debargha Mukherjee
9953279978 Merge "Refactor to separate restoration from loop filter" into nextgenv2 2016-02-02 00:17:14 +00:00
Yaowu Xu
9568a284ab Fix automerge errors
Change-Id: I24d415bafe617eac894427088d7b2fbe0b7e04d7
2016-02-01 14:03:49 -08:00
Yaowu Xu
3ba144f81d Merge branch 'master' into nextgenv2 2016-02-01 05:00:05 -08:00
Yaowu Xu
8678ecd1ef Merge branch 'master' into nextgenv2 2016-01-31 05:00:05 -08:00
Yaowu Xu
8dc6f3f5c2 Merge branch 'master' into nextgenv2 2016-01-30 05:00:05 -08:00
Debargha Mukherjee
f0a4485e54 Refactor to separate restoration from loop filter
Change-Id: Iab517862d957f3aa2a664e9349d57bbf424febb3
2016-01-29 15:39:23 -08:00
Debargha Mukherjee
af99a61697 Merge "Cosmetic changes to loop restoration" into nextgenv2 2016-01-29 20:57:04 +00:00
Yue Chen
11af20dbeb Fixing a issue of calculating tx cost for SUPERTX+VAR_TX
Update blk_skip in update_state_supertx() and rd_supertx_sb().
Performance (SUPERTX+VAR_TX): TBD
(Eventually will merge update_state() and update_state_supertx())

Change-Id: I34ef982b80151ba2dfba745859cb2ca7b90dc888
2016-01-29 09:31:04 +00:00
Yaowu Xu
646f831fbd Merge branch 'master' into nextgenv2 2016-01-28 07:32:05 -08:00
Debargha Mukherjee
3eb10fcf21 Cosmetic changes to loop restoration
Also adds a normalized filtering function to be used later.

Change-Id: I30e2140e664db635602f26a73b81ce8e008dff5e
2016-01-27 17:33:36 -08:00
Debargha Mukherjee
b831fafceb Merge "Fixes ext-interp experiment" into nextgenv2 2016-01-27 19:16:55 +00:00
Debargha Mukherjee
eef57c1e99 Fixes ext-interp experiment
Fixes integer pel MV usage for the sub8x8 case, which fixes a
rare mismatch issue.

Also adds some other minor missing code related to filter threshes.

Change-Id: I6b07e6cf9b287ba4b5bd6599af4a7412e50b3bdc
2016-01-27 09:24:48 -08:00
Yaowu Xu
35e55871ab Merge branch 'master' into nextgenv2 2016-01-27 05:00:06 -08:00
Geza Lore
5aa655f79a Reintroduce VAR_TX fix
Reintroduce part of
Iaf2b717e6b8626b2b6a03226127221b776b49884
Which was later reverted in
I4c5b40ec63a6f19521191d3c730af87db3c4bc00

Change-Id: If3e5610ba3985ae7b4d952d8e616982465ac667a
2016-01-26 15:27:47 +00:00
Geza Lore
f33755ef1f Always recode SUPERTX blocks.
There is still an assertion failure when tokenizing transform
coefficients for a supertx block, due to the eob not being set
consistently with the coefficients, so we always recode supertx blocks
for now. Also added further PICK_MODE_CONTEXT instances to avoid
potential clash between horizontal/vertical/split partition SUPERTX
trials.

Change-Id: I5f3da1fa0d8d20fc21face170487e1a285fd1cc6
2016-01-26 15:21:07 +00:00
Geza Lore
753dcbe5f9 Merge "Update VAR_TX related context when using SUPERTX." into nextgenv2 2016-01-26 15:20:32 +00:00
Yaowu Xu
f512a311f2 Merge branch 'master' into nextgenv2 2016-01-26 05:00:05 -08:00
Geza Lore
22cfc841d5 Update VAR_TX related context when using SUPERTX.
The encoder did not update left_txfm_context and above_txfm_context in
MACROBLOCKD (used for choosing the probability context for the vartx
split bits) when the supertx bit was set for a block. The deoder on the
other hand did update these for supertx blocks. The encoder used these
to compute the context counts, which the packer then uses to adapt it's
probabilities. This results in the packer and the decoder using
different probabilities.

This patch harmonizes the encoder and the decoder by making the encoder
update the mentioned context for supertx coded blocks.

Change-Id: I3a22132124b1bce2ee501d640ceab374b19e3ca1
2016-01-26 01:18:56 +00:00
Geza Lore
56686b4514 Initalize mbmi->tx_size during rdopt.
This is necessary when using SUPERTX, as the bitstream packer relies on
tx_size being set correctly to decide whether to output the block using
supertx or not.

Change-Id: I79e776b3b810f4a15b9dbc6afdd6fc90c73c8934
2016-01-26 01:18:56 +00:00
Geza Lore
e7c0e157d2 Set inter_tx_size for supertx coded blocks.
The loop filter relies on inter_tx_size in MB_MODE_INFO being set
properly when VAR_TX is enabled. Supertx coded blocks did not set this
previously at all, and the differing garbage values eventually resulted
in in a YUV mismatch between encoder and decoder after loop filtering.

This patch fixes this by setting inter_tx_size to the proper supertx
size in both the encoder and the decoder. This should also mean that
loop filtering is done at the proper transform boundaries, even when
supertx or vartx is being used.

Change-Id: I41a564cd6d34ce4a8313ad4efa89d905f5ead731
2016-01-26 01:18:56 +00:00
Debargha Mukherjee
a8122bb957 A minor assert fix for supertx
Change-Id: I532fff64ccaa1f38240ba7ca5ce2f7e1eb531771
2016-01-25 17:15:51 -08:00
Debargha Mukherjee
3e63170fdd Merge "Some supertx fixes" into nextgenv2 2016-01-25 22:21:53 +00:00
Debargha Mukherjee
9a8a6a1b35 Some supertx fixes
Fixes some of the issues introduced by a merge from master.

derflr: -0.893% BDRATE
hevcmr: -1.667% BDRATE

Change-Id: I4c5b40ec63a6f19521191d3c730af87db3c4bc00
2016-01-25 10:36:41 -08:00
Yaowu Xu
33768c24af Merge branch 'master' into nextgenv2 2016-01-24 05:00:05 -08:00
Yue Chen
968bbc7bb2 Adding new compound modes to EXT_INTER experiment
Combinations of different mv modes for two reference frames
are allowed in compound inter modes. 9 options are enabled,
including NEAREST_NEARESTMV, NEAREST_NEARMV, NEAR_NEARESTMV,
NEAREST_NEWMV, NEW_NEARESTMV, NEAR_NEWMV, NEW_NEARMV, ZERO_ZEROMV,
and NEW_NEWMV.
This experiment is mostly deported from the nextgen branch.
It is made compatible with other experiments

Coding gain of EXT_INTER(derflr/hevcmr/hevchd): 0.533%/0.728%/0.639%

Change-Id: Id47e97284e6481b186870afbad33204b7a33dbb0
2016-01-22 13:52:16 -08:00
Yaowu Xu
53c9ffd06f Fix a merge mistake
Change-Id: I0769ca1abd42521a24078dc9ba7093ccb5e362ee
2016-01-22 10:48:10 -08:00
Debargha Mukherjee
11d3899c60 Merge "A fix for a missing tx_type" into nextgenv2 2016-01-22 18:36:46 +00:00
Yaowu Xu
94322a9f9b Merge branch 'master' into nextgenv2
Change-Id: I0a82fa1cbe4ee7c7831d2d174f140a40d09a06c5
2016-01-22 08:46:06 -08:00
Debargha Mukherjee
4e406f702c A fix for a missing tx_type
Change-Id: I165cd06256175edb7739020379ba3098251f4a7c
2016-01-22 03:29:39 -08:00
Debargha Mukherjee
ade60d4fe9 Merge "Fixes for var_tx when ext_tx is not enabled" into nextgenv2 2016-01-22 06:09:36 +00:00
Debargha Mukherjee
0a5c176011 Merge "Some fixes on tx size/type selection" into nextgenv2 2016-01-22 04:02:11 +00:00
Yue Chen
91f55290ef Merge "Relocate supertx prob update" into nextgenv2 2016-01-22 03:45:38 +00:00
Julia Robson
9fe188e4a5 Fixes for var_tx when ext_tx is not enabled
This patch fixes a couple of issues caused by change-id:
I15d20ce5292b70f0c2b4ba55c1f1318181481596
Changes to the code for when the ext_tx experiment is not enabled
were merged from master but as var_tx does not exist on master
the changes had not been applied to the case when var_tx experiment
is enabled

Change-Id: Iaf2b717e6b8626b2b6a03226127221b776b49884
2016-01-21 17:46:03 -08:00
Debargha Mukherjee
8d69a6e816 Some fixes on tx size/type selection
For ext_tx experiment.

Change-Id: Ie37b9b456b09bde8b606fb978fee4cca8d0326b7
2016-01-21 17:45:30 -08:00
Debargha Mukherjee
b1d49f24b4 Build fix for vp9
Change-Id: I1b93ea826487f9033de70fc4563ade410fe07d74
2016-01-21 17:41:36 -08:00
Yue Chen
fb29aec42c Relocate supertx prob update
Move it from vp10_adapt_intra_frame_probs() to
vp10_adapt_inter_frame_probs() because intra frames do not use
supertx.

Change-Id: I28c7391944848666054d4b990ac17a8ae08aaaee
2016-01-21 17:41:21 -08:00
Debargha Mukherjee
09f3615606 Merge "Loop restoration filter" into nextgenv2 2016-01-21 17:43:39 +00:00
Debargha Mukherjee
0880b42129 Merge "Making the forward transform consistent with high bit depth" into nextgenv2 2016-01-21 15:22:48 +00:00
Debargha Mukherjee
84ca7a9f0f Loop restoration filter
Current implementation is a bilateral filter whose
parameters are transmitted in the bitstream.

derflr: -0.647% BDRATE
hevcmr: -0.794% BDRATE

This is a prelimary patch. Various other variations are to
be investigated next, that will hopefully be less expensive
on the decoder side.

Change-Id: I50634ae8f5014ad0bf7432306348908a349d81e1
2016-01-20 17:59:46 -08:00
Yaowu Xu
a40d486215 Merge branch 'master' into nextgenv2
Change-Id: I4e5dd38caa9608252235265c7f2342b183f99815
2016-01-20 09:24:41 -08:00
Julia Robson
c178b2d192 Making the forward transform consistent with high bit depth
This patch changes the code for 16bit buffers to use the same
optimisation as is used for 8bit buffers. (See change-Id:
I0452da1786d59bc8bcbe0a35fdae9f623d1d44e1 for more information
about the optimisation)

Change-Id: I5f327a13a7b01fc356114a2aa9d1261bf76d8d69
2016-01-20 12:03:16 +00:00
hui su
2778b1cbb9 Fix a bug with ext-intra when skip_recode is enabled
Change-Id: I906945d61254149b315a6de81ac6373ed31791e6
2016-01-19 14:54:31 -08:00
Debargha Mukherjee
63b57c311d Merge "Adding experimental tags for new experiments" into nextgenv2 2016-01-19 16:58:21 +00:00
Yaowu Xu
d32c38c75c Merge branch 'master' into nextgenv2 2016-01-16 05:00:06 -08:00
Yue Chen
1ac858794a EXT_INTER experiment
NEW2MV is enabled, representing a new motion vector predicted from
NEARMV. It is mostly ported from nextgen, where it was named
NEW_INTER.
A few fixes are done for sub8x8 RDO to correct some misused
mv references in the original patch.
A 'bug-fix' for encoding complexity is done, reducing the additional
encoding time from 50% to 20%. In sub8x8 case, the old patch
did motion search for every interpolation filter (vp9 only
searches once). This fix also slightly improves the coding gain.
This experiment has been made compatible with REF_MV and EXT_REFS.

Coding gain (derflr/hevcmr/hevchd): 0.267%/0.542%/0.257%

Change-Id: I9a94c5f292e7454492a877f65072e8aedba087d4
2016-01-15 14:47:02 -08:00
Debargha Mukherjee
6a5a08ee1c Adding experimental tags for new experiments
ext-partition: to hold partition extensions (ex. ext-partition,
ext-coding-unit-size from nextgen)
loop-restore: to hold in-loop restoration filter (ex. loop-postfilter
from nextgen and other Wiener restoration filters)

Change-Id: I71c7f1588f05fb0f2b00f7004a78e90c9cceae3f
2016-01-15 12:55:03 -08:00
Debargha Mukherjee
eee6afe0b9 Fixing some compile issues
Fixes a breakage introduced with the latest merge from master and
cleans up a couple of compiler warnings.

Change-Id: Ia55b39ba78e43f6fe52c54d7f34faa4dd6bbbf26
2016-01-15 11:02:30 -08:00
Yaowu Xu
44da65fb44 Merge branch 'master' into nextgenv2 2016-01-14 13:57:27 -08:00
Jingning Han
c38fc52df4 Merge "Handle single ref mv pair in the candidate list for compound mode" into nextgenv2 2016-01-14 02:55:36 +00:00
Yaowu Xu
727ca802bf Merge "Merge branch 'master' into nextgenv2" into nextgenv2 2016-01-14 00:26:45 +00:00
Jingning Han
3944cfb14d Handle single ref mv pair in the candidate list for compound mode
This commit considers the case where a single reference motion
vector pair is found in the candidate list. It treats this pair
as the effective motion vector for nearestmv mode. This improves
the coding performance by 0.06% for stdhd sets.

Change-Id: I9ce12f456b52912933e05c18c3841a78c26155d2
2016-01-13 16:19:27 -08:00
Yaowu Xu
0367f32ea8 Merge branch 'master' into nextgenv2
Manually resovled the following conflicts:
	vp10/common/blockd.h
	vp10/common/entropy.h
	vp10/common/entropymode.c
	vp10/common/entropymode.h
	vp10/common/enums.h
	vp10/common/thread_common.c
	vp10/decoder/decodeframe.c
	vp10/decoder/decodemv.c
	vp10/encoder/bitstream.c
	vp10/encoder/encodeframe.c
	vp10/encoder/rd.c
	vp10/encoder/rdopt.c

Change-Id: I15d20ce5292b70f0c2b4ba55c1f1318181481596
2016-01-13 13:18:06 -08:00
Debargha Mukherjee
e9db70fb63 Merge "Use specific PICK_MODE_CONTEXT for supertx." into nextgenv2 2016-01-13 19:41:39 +00:00
Jingning Han
177601b561 Merge "Generate compound reference motion vector" into nextgenv2 2016-01-13 19:37:38 +00:00
Jingning Han
97629f5961 Merge "Refactor ref mv stack system" into nextgenv2 2016-01-13 19:36:16 +00:00
Jingning Han
33cc1bd21d Generate compound reference motion vector
This commit allows the codec to add motion vector pairs into
the candidate list. It further improves the compression performance
by 0.1% across derf, hevcmr, stdhd, and hevchr sets without adding
encode/decode time.

Change-Id: I88d36da25a2a89bb506d411844af667081eba98b
2016-01-12 15:28:47 -08:00
Alex Converse
0f840cc3eb Compress the final ANS state.
The '110' prefix on a final byte indicates a superframe marker. Coded
data is not allowed to use this pattern on a final byte.

Code |state - l_base| little endian with the following prefix scheme:
Prefix '00': Single byte coded state.
Prefix '01': Two bytes le coded state.
Prefix '10': Three bytes le coded state.

Change-Id: Ibc953b67675b567394b93de39b7cb22cadc47435
2016-01-12 23:11:17 +00:00
Alex Converse
5311ad9e83 Merge "Code DCT tokens with ANS" into nextgenv2 2016-01-12 23:08:36 +00:00
Alex Converse
dff3ea7ab3 Merge "Add an implementation of Asymetric Numeral Systems (ANS)." into nextgenv2 2016-01-12 23:05:31 +00:00
Geza Lore
e4663e6da1 Use specific PICK_MODE_CONTEXT for supertx.
Change-Id: I402d10dd666ebc4a06ce4472810a7e22f2e056ff
2016-01-12 13:06:42 +00:00
Alex Converse
d1893f64e0 Code DCT tokens with ANS
Change-Id: I452f9675325a5f45bfbbe3e7e135009a125539f1
2016-01-12 09:08:19 +00:00
Alex Converse
9ffcb469fb Add an implementation of Asymetric Numeral Systems (ANS).
Change-Id: Ie41bc72127e700887566dcc951da9d83a0b94891
2016-01-11 16:26:30 -08:00
Jingning Han
253a200d3b Refactor ref mv stack system
This commit re-works the reference motion vector stack process
and make it support extended context set. It unifies reference
motion vector checking process for row and column scan, as well as
for single block scan.

Change-Id: I68c05cde93cf8b0ca2ef4d1523399f405bd0a337
2016-01-11 12:39:29 -08:00
Debargha Mukherjee
d738ce2b0a Merge "Fixing issue with txfm context when var_tx and supertx are enabled" into nextgenv2 2016-01-11 18:40:25 +00:00
Jingning Han
387a10e3dc Enable context analyzer for inter mode entropy coding
It allows the codec to account for certain corner cases when
processing inter prediction mode entropy coding.

Change-Id: Ied451f4fff26ba579f6556554b8381ff2ccd0003
2016-01-08 10:27:27 -08:00
Yaowu Xu
c557efafeb Merge branch 'master' into nextgenv2 2016-01-08 05:00:05 -08:00
Geza Lore
a167244346 Fix 2 bugs when using both SUPERTX and EXT_TX
Change-Id: Ibcbe470a97880c294600345337054ed9af84de2b
2016-01-07 12:13:35 -08:00
Julia Robson
54fbf7e55f Fixing issue with txfm context when var_tx and supertx are enabled
In the decoder, the txfm context was not being set for supertx
blocks.

Change-Id: Ifa0882bba36bc54bbd9dba3e370317b5531e33d3
2016-01-07 15:23:08 +00:00
Yaowu Xu
c67fca154e Merge branch 'master' into nextgenv2 2016-01-07 05:00:06 -08:00
Debargha Mukherjee
b5480b3594 Merge "Change to rd costing for CONFIG_VAR_TX" into nextgenv2 2016-01-06 23:49:01 +00:00
Yaowu Xu
55118ad061 Merge branch 'master' into nextgenv2
Conflicts:
	vp10/decoder/decodeframe.c
	vp10/encoder/bitstream.c

Change-Id: I743449f49b723d2ce357832619a28b53369d0547
2016-01-06 08:36:18 -08:00
Peter de Rivaz
2f943131df Change to rd costing for CONFIG_VAR_TX
In select_tx_block I believe the rd cost was ignoring the bits
needed to encode the split bit.

Change-Id: Iacbf705b880db9a68967a994406ba90ecf693ab8
2016-01-05 15:35:43 +00:00
Debargha Mukherjee
3787b17439 Super transform - ported from nextgen branch
Various additional changes were made to make the experiment
compatible with misc_fixes.

derflr: +0.979%
hevcmr: +0.865%

Speed-wise with --enable-supertx the encoder is only about 10%
slower than without. Decoding impact is about 30% slowdown.

Note this does not work with ext-tx or var-tx yet. That is
a TODO.

Change-Id: If25af4241a7a9efbd28f58eda3c4f044c7a7ef4b
2016-01-04 22:12:57 -08:00
Hui Su
717be7bcd5 Merge "Use precise rate cost for intra modes in inter frames" into nextgenv2 2016-01-04 18:17:59 +00:00
hui su
1559afda85 Use precise rate cost for intra modes in inter frames
derflr +0.021%
hevclr +0.207%
hevcmr +0.035%
stdhd  +0.042%

Change-Id: Ic750df93bcc0a261a66a9b19d939a5cd61a6b516
2016-01-04 08:35:29 -08:00
Zoe Liu
9581f3d49a Replaced a hard-coded value with the macro
Change-Id: I2aec63d8a600e319d037b764b0609092bce1e483
2015-12-30 17:16:51 -08:00
Yaowu Xu
250213ac7e Merge branch 'master' into nextgenv2 2015-12-29 05:00:05 -08:00
hui su
0681f6f1df ext-intra experiment: exploit left-bottom bundary
ext-intra vs nextgenv2 baseline:
derflr +1.12% (was +1.06%)
hevcmr +2.26% (was +2.15%)

Change-Id: I6cc7612d0d7e81e200aa962988db1ea7680626d7
2015-12-28 10:47:40 -08:00
Yaowu Xu
14b0443792 Merge branch 'master' into nextgenv2 2015-12-23 05:00:05 -08:00
Yaowu Xu
7c6144bc4a Merge branch 'master' into nextgenv2 2015-12-22 05:00:05 -08:00
Zoe Liu
a2832f1b5b Merge "Cleared the EXT_REFS code to make it more legible." into nextgenv2 2015-12-21 18:26:35 +00:00
Debargha Mukherjee
305fac7a19 Merge "Fix for high bitdepth temporal filter" into nextgenv2 2015-12-21 17:41:26 +00:00
Yaowu Xu
f73feedb9e Merge branch 'master' into nextgenv2 2015-12-19 05:00:06 -08:00
Yaowu Xu
7330108009 Merge branch 'master' into nextgenv2 2015-12-18 05:00:05 -08:00
Zoe Liu
a4d0c7148b Cleared the EXT_REFS code to make it more legible.
Change-Id: I309c4e16fd305bcfa590d14f957a9598d23c7ee6
2015-12-17 16:46:28 -08:00
Zoe Liu
ec36a2b061 Restore the flexibility for the new 3 references
For the experiment of EXT_REFS, removed the previous special handling
on the new last 3 references, i.e. LAST2_FRAME, LAST3_FRAME, and
LAST4_FRAME, at the decoder, so that these new last references are
treated the same way as the other 3 references (LAST_FRAME,
GOLDEN_FRAME, and ALTREF_FRAME). Encoder changes have been made
accordingly to realize this flexibility.

Change-Id: Ic6546f9443b4377bb7e7b101bfa3e70a8b8d1c65
2015-12-17 16:34:02 -08:00
Debargha Mukherjee
8b9efaa161 Merge "Replace DST1 in ext_tx experiment with DST2" into nextgenv2 2015-12-16 23:47:28 +00:00
Yaowu Xu
dab7515aa4 Merge branch 'master' into nextgenv2
With a few manual fixes of merge conflicts.

Change-Id: I0dd65ff90f9fa8606e5563f528659e2607b12376
2015-12-16 09:00:57 -08:00
Angie Chiang
d6695b8a0e Merge "Refactor vp10_encode_block_intra" into nextgenv2 2015-12-15 19:59:33 +00:00
Debargha Mukherjee
49d9730f60 Replace DST1 in ext_tx experiment with DST2
The DST2 is implemented by input alternate sign-flip, followed
by DCT, followed by output reversal.
Results are roughly the same, but it should be easier to optimize
the DST2.
[Interestingly a mtrix multuiply implementation is about 0.1%
better].

Change-Id: If9ae5fdba87767fb0e6c163a62b77ee66a8d3afc
2015-12-15 11:30:48 -08:00
Yaowu Xu
b37e8b0e00 Merge branch 'master' into nextgenv2 2015-12-15 05:00:05 -08:00
Jingning Han
6f1f0d896a Merge "Enable adaptive prediction mode coding" into nextgenv2 2015-12-15 04:38:15 +00:00
Angie Chiang
0919edd4d2 Refactor vp10_encode_block_intra
1) Add VP10_XFORM_QUANT_SKIP_QUANT mode for vp10_xform_quant
2) Let encode_block call vp10_xform_quant so that its code flow
   is clear

Change-Id: I122d5cf6a089f444ae018f3e4bf844be847e17ee
2015-12-11 14:30:24 -08:00
Angie Chiang
30ee689da3 Merge "Refactor vp10_xform_quant" into nextgenv2 2015-12-11 20:29:04 +00:00
Yaowu Xu
f07d73b9bf Merge branch 'master' into nextgenv2
Change-Id: Id0b784b115602e2502b42fa972a5ae210435a3be
2015-12-11 08:58:40 -08:00
Debargha Mukherjee
104636a39a Some fixes from merging MISC_FIXES config
Change-Id: I3f77e952af3c441a50479bb5d278ea0fd6cf62c6
2015-12-10 15:17:33 -08:00
Jingning Han
aa5d53eb17 Enable adaptive prediction mode coding
This commit allows the codec to analyze the reference motion vector
candidate list and adaptively reduce the size of inter prediction
mode set.

Change-Id: Ied6a403843b860d66f26ed485c1825c05c71bdfc
2015-12-10 09:02:32 -08:00
Jingning Han
8edbe4d6db Merge "Allow precise classification for refmv mode context" into nextgenv2 2015-12-10 03:26:24 +00:00
Jingning Han
48365e10bb Merge "Re-design motion compensated prediction mode entropy coding system" into nextgenv2 2015-12-10 03:26:05 +00:00
Jingning Han
0d65cae638 Allow precise classification for refmv mode context
Combine the nearest ref mv count and the total ref mv count for
mode context.

Change-Id: I342a2b126bf7d2d30c344911260d9769a923026b
2015-12-10 02:03:32 +00:00
Jingning Han
1dc18077b8 Re-design motion compensated prediction mode entropy coding system
This commit re-works the entropy coding scheme of the motion
compensated prediction modes. It allows more flexible hyperplane
partition for precise classification.

Change-Id: Iba5035c76691946cf1386b6c495e399c3d9c8fc5
2015-12-09 18:02:20 -08:00
Yaowu Xu
f757782f22 Merge branch 'master' into nextgenv2
Change-Id: I6f8b540854ddc78fc4a2a8045b194a888749a3cb
2015-12-09 08:09:30 -08:00
Peter de Rivaz
5283e57786 Fix for high bitdepth temporal filter
The 8bit temporal filter has changed to use non-local means.
This fix adds the same change into the high bitdepth code.

Change-Id: I3375b13a7d914fc8aa9eb4aac1d2e4d9b74b782f
2015-12-09 15:53:01 +00:00
Debargha Mukherjee
9fbc394036 Merge "Fix for crash when using high bitdepth and var-tx" into nextgenv2 2015-12-08 19:17:10 +00:00
Hui Su
cdffec73e9 Merge "Bring palette back to nextgenv2" into nextgenv2 2015-12-08 17:44:22 +00:00
Peter de Rivaz
22850493b6 Fix for crash when using high bitdepth and var-tx
Change-Id: Ide48fa4312f7828f99290f7a2be878f5673fa716
2015-12-08 15:58:21 +00:00
hui su
c93e5cc3e9 Bring palette back to nextgenv2
It was removed by the master branch merge.

Change-Id: I4b2a524c9e052e41063359afcb4ba22bf78344cf
2015-12-07 18:24:15 -08:00
hui su
bf0ff0907e Miscellaneous changes in reconintra.c
Fix a bug in vp10_has_right;
Some cosmetic changes.

Tiny performance improvement (0.02%~0.04%) on derflr and hevcmr.

Change-Id: Iee829003a20f32d6185a08bab2bd4201806be2b3
2015-12-07 17:08:27 -08:00
Yaowu Xu
69f4930041 Merge branch 'master' into nextgenv2
Conflicts:
	vp10/common/blockd.h
	vp10/common/entropymode.h
	vp10/common/reconintra.c
	vp10/decoder/decodemv.c
	vp10/encoder/bitstream.c
	vp10/encoder/encoder.h
	vp10/encoder/rd.c
	vp10/encoder/rdopt.c
	vp10/encoder/tokenize.h

Change-Id: Ic4891839b6f0474026d6d69821e38edec9632df1
2015-12-07 11:37:14 -08:00
Jingning Han
f5bed806fb Merge "Extend reference motion vector candidate range" into nextgenv2 2015-12-04 06:00:02 +00:00
Angie Chiang
88cae8b422 Refactor vp10_xform_quant
1) Add facade to quantize b/fp/dc version so that their interface
   are the same.
2) Merge vp10_xform_quant b/fp/dc version to one function so that
   the code flow in encodemb.c is clear

Change-Id: Ib62d6215438fc2d07f4e7e72393f964832d6746f
2015-12-03 15:28:11 -08:00
Angie Chiang
2b3f1d36b3 Merge changes Iea45fd22,If174d8dd,I9f539491 into nextgenv2
* changes:
  Add facade to inverse txfm
  Create hybrid_fwd_txfm.c
  merge txfm_#x#_1 into txfm_#x#
2015-12-03 22:29:03 +00:00
Jingning Han
e15fb2bb99 Extend reference motion vector candidate range
This commit adds top-right corner and collocated block into the
reference motion vector candidate check list.

Change-Id: I892a4c7fb04ddda44e0f9dfe769471252d40c42b
2015-12-03 09:25:20 -08:00
Yaowu Xu
3e2273fcee Merge branch 'master' into nextgenv2 2015-12-03 05:00:05 -08:00
Yaowu Xu
24e2b4c005 Merge branch 'master' into nextgenv2 2015-12-02 05:00:05 -08:00
hui su
d7c8bc77c6 Speed up angle search in intra mode selection
Estimate angle histogram using gradient analysis, then skip those
angles that are unlikely to be chosen.

On ext-intra experiment, turning off filter-intra modes:
for all-key-frame setting, computation overhead is reduced
by about 40%, coding gain dropped from +2.08% to +1.96% (derflr);
with kf-max-dist=150, computation overhead is reduced
by about 60%, coding gain dropped from +0.58% to +0.49% (derflr).

Change-Id: I36687410fb10561b8e1a8eebb1528cf17755bd5b
2015-12-01 11:15:47 -08:00
Yaowu Xu
d1486c3837 Merge branch 'master' into nextgenv2 2015-12-01 05:00:05 -08:00
Angie Chiang
a245d9f88c Add facade to inverse txfm
Add inv_txfm and highbd_inv_txfm as facades of inverse transform
such that the code flow in encodemb.c can be simpler

Change-Id: Iea45fd22dd8b173f8eb3919ca6502636f7bcfcf7
2015-11-25 13:50:40 -08:00
Jingning Han
40cedd6763 Refactor sub8x8 ref motion vector search
Take out an unnecessary use of the mode context array.

Change-Id: I4032ed18464e5ec49a2160bea964bad9b716ee54
2015-11-25 13:42:59 -08:00
Angie Chiang
96baa73ed9 Create hybrid_fwd_txfm.c
Move txfm functions from encodemb to hybrid_twd_txfm.c
to make encodemb's code flow clear

Change-Id: If174d8ddb490d149c103e5127d30ef19adfbed13
2015-11-25 12:51:25 -08:00
Debargha Mukherjee
63def292eb Merge "Fix ext-tx experiment for highbitdepth" into nextgenv2 2015-11-25 17:33:12 +00:00
Jingning Han
35921b897b Merge "Make sub8x8 block ref mv search consistent to regular blocks" into nextgenv2 2015-11-25 16:47:01 +00:00
Yaowu Xu
49f5903dd2 Merge branch 'master' into nextgenv2 2015-11-25 05:00:05 -08:00
Jingning Han
7f4bab0697 Make sub8x8 block ref mv search consistent to regular blocks
Check all motion vectors in the immediate above and left blocks if
the reference conditions matched.

Change-Id: I8bf33bfcee99e8150232c7681fdeade307024272
2015-11-24 21:58:10 -08:00
Jingning Han
c7b31a5c49 Remove a redundant argument in setup_ref_mv_list
Change-Id: I215071bff55f8ba6347fa985414b40723b4986f5
2015-11-25 02:22:16 +00:00
Jingning Han
731dcd3e6a Merge "Integrate motion vector stack into codec" into nextgenv2 2015-11-25 02:21:53 +00:00
Angie Chiang
30e325a94b merge txfm_#x#_1 into txfm_#x#
Change-Id: I9f539491fe676898246976c91d5ac4804a155803
2015-11-24 18:21:27 -08:00
Jingning Han
e7569225f1 Merge "Refactor tokenization coding tree" into nextgenv2 2015-11-25 01:15:05 +00:00
Jingning Han
e5c57c580a Integrate motion vector stack into codec
This commit ports the motion vector stack from motion field
analyzer to the encoding and decoding pipeline.

Change-Id: Ie283c1e1a15b4c17a1c7c175ce322bf053bb7840
2015-11-25 01:14:44 +00:00
Jingning Han
11bac096f2 Merge "Analyze motion field to produce reference motion vectors" into nextgenv2 2015-11-25 01:14:12 +00:00
Jingning Han
2ec5ed258a Refactor tokenization coding tree
Expand the tokenization tree writing to support per transform block
type coding in next CLs.

Change-Id: I3560e658f89cc500eb49603f95dd2b4e99045f5b
2015-11-24 16:01:51 -08:00
Jingning Han
254d3e172a Analyze motion field to produce reference motion vectors
This commit allows the codec to analyze the motion field in the
avaiable above and left neighboring area to produce a set of
reference motion vectors for each reference frame. These reference
motion vectors are ranked according to the likelihood that it will
be picked.

Change-Id: I82e6cd990a7716848bb7b6f5f2b1829966ff2483
2015-11-24 15:52:55 -08:00
Debargha Mukherjee
6ef5d8c4ed Merge "Reduce transform options for ext-tx experiment" into nextgenv2 2015-11-24 21:30:10 +00:00
Zoe Liu
9c62f9282f Merge "Added 3 more reference frames for inter prediction." into nextgenv2 2015-11-24 19:47:03 +00:00
Debargha Mukherjee
13e0cfb8c7 Fix ext-tx experiment for highbitdepth
Change-Id: I610e18f150d73378283882ae81f5f77c367d2956
2015-11-24 10:38:37 -08:00
Yaowu Xu
ea78294030 Merge branch 'master' into nextgenv2 2015-11-24 05:00:05 -08:00
Debargha Mukherjee
56ab215dad Reduce transform options for ext-tx experiment
Reduces the transform optons for INTRA as well as INTER when
transform size is 16x16 to not use any of the DSTs.
Thus, a total of 10 options are used for 16x16, while 4x4
and 8x8 still uses 17 options.

derflr/hevchd actually improves a little, while hevcmr drops
a little.

About 10% speed improvement.

Change-Id: I920a182231e052cdd622f8bb67085c16c572cb1e
2015-11-23 12:58:48 -08:00
Jingning Han
c335bfeb56 Move n8_w and n8_h out of experiment flag
These primitive variables are commonly required by many other
experiments as well. The use of n4_w and n4_h was originally
introduced in the vp9 decoder implementation.

Change-Id: I93d701d891e3860f31150031e3b9a2b29a3993d2
2015-11-23 09:46:11 -08:00
Yaowu Xu
c1629ca53b Merge branch 'master' into nextgenv2 2015-11-21 05:00:05 -08:00
Zoe Liu
3ec1601e37 Added 3 more reference frames for inter prediction.
Under the experiment of EXT_REFS: LAST2_FRAME, LAST3_FRAME, and
LAST4_FRAME.

Coding efficiency: derflr +1.601%; hevchr +1.895%
Speed: Encoder slowed down by ~75%

Change-Id: Ifeee5f049c2c1f7cb29bc897622ef88897082ecf
2015-11-20 17:00:24 -08:00
Angie Chiang
6e9ed38d1f Merge "Add vp10_inv_txfm2d" into nextgenv2 2015-11-20 18:22:49 +00:00
Yaowu Xu
c00abfa3ee Merge branch 'master' into nextgenv2 2015-11-20 05:00:05 -08:00
Jingning Han
0c8110efe1 Merge "Add ref-mv experiment flag" into nextgenv2 2015-11-19 23:01:54 +00:00
Hui Su
7dfed5cf21 Merge "Turn off tx type selection for intra blocks by default" into nextgenv2 2015-11-19 19:50:57 +00:00
Jingning Han
fe8ecc843b Add ref-mv experiment flag
Change-Id: Ie2101e362aeb01681313adf67596bc6b479e873e
2015-11-19 11:40:56 -08:00
Yaowu Xu
8c95116d96 Merge branch 'master' into nextgenv2 2015-11-19 05:00:06 -08:00
hui su
d894d34d04 Turn off tx type selection for intra blocks by default
Coding gain on derflr drops to +1.83%.

Change-Id: If68c429f09422a70513d9f1e8e36e10c928e034a
2015-11-18 23:16:25 -08:00
Yaowu Xu
7eeb7671d5 Merge branch 'master' into nextgenv2 2015-11-18 05:00:05 -08:00
Angie Chiang
4fd0ba8f6f Add vp10_inv_txfm2d
Change-Id: Ib63062a52c688e65bae5eb0052ce69d73d96c9c5
2015-11-17 19:53:28 -08:00
Hui Su
4d3cf45992 Merge "Merge MISC_FIXES" into nextgenv2 2015-11-18 01:08:21 +00:00
hui su
66f2f65ef7 Merge MISC_FIXES
Remove MISC_FIXES flags except for the changes on MV precision, which
has a 0.1% performance drop.

On derflr, the impact is -0.012%.

Change-Id: I0a74e5a212dd0cb827192a318c92a714c9681e45
2015-11-17 15:06:08 -08:00
hui su
af084fbec1 Fix some unused variable warnings
Change-Id: Ia7680ddf00dd50dd66bbb5753bae30b937988800
2015-11-17 10:40:25 -08:00
Jingning Han
5f9e089b1d Merge "Limit the reset range of inter_tx_size array" into nextgenv2 2015-11-16 16:58:08 +00:00
Jingning Han
4ae193eec7 Merge "Alternate reference frame" into nextgenv2 2015-11-16 16:04:14 +00:00
Jingning Han
0f34e35d26 Limit the reset range of inter_tx_size array
Reset the effective range of inter_tx_size, instead of the entire
array in the rate-distortion optimization loop.

Change-Id: Id453fbd6dddfe69f4e451ba8518c083326d5dd53
2015-11-15 20:56:04 -08:00
Yaowu Xu
7c5fe4cbff Merge branch 'master' into nextgenv2 2015-11-14 05:00:06 -08:00
Debargha Mukherjee
e9b18242eb Merge "Adding experiment for supertransform" into nextgenv2 2015-11-13 23:50:21 +00:00
Hui Su
83388fb0af Merge "refactor ext-intra" into nextgenv2 2015-11-13 21:19:27 +00:00
hui su
4aa50c17df refactor ext-intra
Coding gain remains about the same, while overall speed is
substantially increased.

Change-Id: I2989bebcfd21092cd6a02653d4df4a3bf6780874
2015-11-13 12:12:09 -08:00
Debargha Mukherjee
5bbacd9bda Adding experiment for supertransform
Change-Id: Ie43027f7d46c43df137fd4a7f731ff6ccb78fcee
2015-11-13 11:32:17 -08:00
Yaowu Xu
b0ab6a3bbd Merge branch 'master' into nextgenv2 2015-11-13 05:00:05 -08:00
Zoe Liu
49c34da379 Merge "Fixed a few sanity checks." into nextgenv2 2015-11-13 04:55:54 +00:00
Angie Chiang
35ec6d2b88 Merge changes Ifafbd497,I042bba27,Id6fd8558,Id5b79519 into nextgenv2
* changes:
  Add adst_dct config to vp10_inv_txfm2d_cfg
  Add adst_adst config to vp10_inv_txfm2d_cfg
  Add dct_adst config to vp10_inv_txfm2d_cfg
  Add dct_dct config to vp10_inv_txfm2d_cfg
2015-11-12 23:38:44 +00:00
Jingning Han
140182b96c Alternate reference frame
This commit re-designs the alternate reference frame generation
process. It employs non-local mean approach to produce more stable
pixel estimation for alternate reference frame. It improves the
compression performance gains:
derf   0.5%
hevcmr 0.8%
stdhd  1.3%
hevchr 1.0%

The encoding time at speed 0 is not affected.

Change-Id: Iaa757f0da189ce93812d69617a81bf630d449848
2015-11-12 11:16:59 -08:00
Yaowu Xu
80b30f46a5 Merge branch 'master' into nextgenv2 2015-11-12 05:00:05 -08:00
Angie Chiang
7104079efb Add adst_dct config to vp10_inv_txfm2d_cfg
Change-Id: Ifafbd4974be44685ab2550ed159dbf0411b6f031
2015-11-11 18:02:42 -08:00
Angie Chiang
164ba2a2d8 Add adst_adst config to vp10_inv_txfm2d_cfg
Change-Id: I042bba27540ab2a3d8a00871980295e98f616480
2015-11-11 17:59:22 -08:00
Angie Chiang
db88473ea9 Add dct_adst config to vp10_inv_txfm2d_cfg
Change-Id: Id6fd8558452f64c4ac30d7cb656b659f0587b5d6
2015-11-11 17:55:35 -08:00
Angie Chiang
09c2809a50 Add dct_dct config to vp10_inv_txfm2d_cfg
Change-Id: Id5b795198552443a700413284a1015296e267dcf
2015-11-11 17:51:55 -08:00
Zoe Liu
2096296421 Fixed a few sanity checks.
Change-Id: Ieec4a7be5945dc6de192e2d8292ab978baf47f53
2015-11-11 10:38:17 -08:00
Yaowu Xu
edaf8c4596 Merge branch 'master' into nextgenv2 2015-11-11 05:00:06 -08:00
Yaowu Xu
0e929ef94d Merge "Replace inline with INLINE" into nextgenv2 2015-11-11 01:31:14 +00:00
Yaowu Xu
843e2bad4b Merge "Fix msvc compling" into nextgenv2 2015-11-11 01:31:06 +00:00
Jingning Han
73e75e9dbc Merge "Fix an encoding failure case when speed features are on" into nextgenv2 2015-11-11 01:25:55 +00:00
Angie Chiang
0694844fae Merge "Add vp10_fwd_txfm2d_test" into nextgenv2 2015-11-11 00:28:35 +00:00
Yaowu Xu
a08bfb778a Replace inline with INLINE
Change-Id: I37b5ed9fef0e97feabd856bd4c1b4c7869991a34
2015-11-10 16:09:09 -08:00
Yaowu Xu
72a6cb62ee Fix msvc compling
Change-Id: I5abd6d2fd198b3789732e81b23a5bac009af5290
2015-11-10 16:08:09 -08:00
Jingning Han
35b3bd3e3b Fix an encoding failure case when speed features are on
This commit fixes an encoding failure case triggered when early
termination feature is turned on for transform block size search.
It resolves the corresponding enc/dec mismatch issue.

Change-Id: I2c5b7d8b1efe25fe3810e6ed307f4b1865dede49
2015-11-10 16:04:00 -08:00
Yaowu Xu
dcbe42298a Merge "Get test to build with MSVC" into nextgenv2 2015-11-10 23:08:51 +00:00
Angie Chiang
af38f6fca4 Add vp10_fwd_txfm2d_test
Change-Id: Icbc17403430751d3a841f822a190f0c30450d603
2015-11-09 15:18:15 -08:00
Yaowu Xu
4bc259db3d Get test to build with MSVC
Added _USE_MATH_DEFINES to make sure M_PI can be refered to definitions
in math.h for MSVC

Change-Id: Idca128910384593a002eb08bae72c739fb998e19
2015-11-09 12:07:25 -08:00
Yaowu Xu
b49ac0b160 Merge branch 'master' into nextgenv2
Change-Id: I8811bfd8fc132b9f515707e795bb6308e4bf263b
2015-11-09 09:52:18 -08:00
Debargha Mukherjee
bc54f9dc00 Merge "Resolve conficts caused by master branch merging" into nextgenv2 2015-11-06 23:35:07 +00:00
Angie Chiang
c7c69d88af Merge changes I7ca0cc34,I97189d6e,I4e2b51cf,I21158867,I8d73beee into nextgenv2
* changes:
  Add adst_dct config to vp10_fwd_txfm2d_cfg
  Add adst_adst config to vp10_fwd_txfm2d_cfg
  Add dct_adst config to vp10_fwd_txfm2d_cfg
  Add dct_dct config to vp10_fwd_txfm2d_cfg
  Add vp10_fwd_txfm2d_8x8/16x16/32x32
2015-11-06 23:34:56 +00:00
Angie Chiang
e26c712ab2 Merge "Add vp10_fwd_txfm2d_4x4" into nextgenv2 2015-11-06 23:34:35 +00:00
hui su
707cd03658 Resolve conficts caused by master branch merging
Change-Id: I167e241b789331572581fcb0567ebe535b4b9345
2015-11-06 14:35:08 -08:00
Angie Chiang
45222e5b20 Add adst_dct config to vp10_fwd_txfm2d_cfg
Change-Id: I7ca0cc341ae36ac9f7aa24789f8872161b832b7b
2015-11-06 10:47:46 -08:00
Angie Chiang
786f1af891 Add adst_adst config to vp10_fwd_txfm2d_cfg
Change-Id: I97189d6e917929c756a3f89fe0ab66077a0a5436
2015-11-06 10:47:46 -08:00
Angie Chiang
634d0bdc7c Add dct_adst config to vp10_fwd_txfm2d_cfg
Change-Id: I4e2b51cf5b0dedb9ea1106747edb76835804fffc
2015-11-06 10:47:46 -08:00
Angie Chiang
51c0c35c6a Add dct_dct config to vp10_fwd_txfm2d_cfg
Change-Id: I21158867fb2b762d3632d0664ebe70c68d0953e1
2015-11-06 10:47:46 -08:00
Angie Chiang
f08141c734 Add vp10_fwd_txfm2d_8x8/16x16/32x32
Change-Id: I8d73beee5a619d26f3f8640a6679150d874522c4
2015-11-06 10:47:45 -08:00
Angie Chiang
ff7fe99342 Add vp10_fwd_txfm2d_4x4
Change-Id: I9bca3b1c76b64575366d71ab65ffef7264ce0c9b
2015-11-06 10:39:27 -08:00
Debargha Mukherjee
85514c40ae New interpolation experiment
Adds a new interpolation experiment.

Improves entropy coding to send the filter type only if
the motion vectors have subpel components.
Adds one new 8-tap smooth filter, and tweaks the others.

derflr: +0.695%
hevcmr: +0.305%

About 5% encode slowdown. No visible impact for decoding.

Also makes the interpolation framework flexible to support both
strictly interpolating filters as well as non-interpolating
filters that filter integer offsets. This is mainly for
further experimentation and if not found useful the code will
be removed.

Change-Id: I8db9cde56ca916be771fe54a130d608bf10786e6
2015-11-06 09:51:34 -08:00
Hui Su
9b3ad185dc Merge "ext-intra experiment" into nextgenv2 2015-11-06 17:40:49 +00:00
Yaowu Xu
fe4160d8e3 Merge branch 'master' into nextgenv2 2015-11-06 05:00:06 -08:00
Debargha Mukherjee
70e514ce78 Merge "Flip the result of the inverse transform for FLIPADST." into nextgenv2 2015-11-06 09:20:46 +00:00
Debargha Mukherjee
46d2cc5714 Merge "Eliminate copying for FLIPADST in fwd transforms." into nextgenv2 2015-11-06 08:37:25 +00:00
Angie Chiang
444acd771b Add vp10_inv_txfm1d_test
Change-Id: I3b76c0146af7f191cdae31d2b53ab6d51ac791a4
2015-11-04 14:23:56 -08:00
Angie Chiang
b0df5e0f9e Add iadst32
Change-Id: I3a53ee51146d0bd4b0fe4b27c286e8c921f9823b
2015-11-04 14:23:56 -08:00
Angie Chiang
35486a6b88 Add iadst16
Change-Id: I093881aacaf9a070f78cc4eea2e8a6ede8a71792
2015-11-04 14:23:56 -08:00
Angie Chiang
0ca0cc240b Add iadst8
Change-Id: Ia58e4735d7d7bfd2ac55259c32705118c6745c6d
2015-11-04 14:23:56 -08:00
Angie Chiang
ba69089e65 Add iadst4
Change-Id: Ie419b2b1e939a41c30ed609e1ba46f5f6609b2a5
2015-11-04 14:23:56 -08:00
Angie Chiang
7467833401 Add idct32
Change-Id: I75412bdc4bd0d9c90e8b56e02e0e467a2d9957f9
2015-11-04 14:23:56 -08:00
Angie Chiang
d3cee565ad Add idct16
Change-Id: I8e5ba3a3f9b64ccbf038e371525e897774729b06
2015-11-04 14:23:56 -08:00
Angie Chiang
bd9db2f55b Add idct8
Change-Id: I8092a6f229b196c5c8b7dcd2dff8aaf68253e422
2015-11-04 14:23:56 -08:00
Angie Chiang
7d2b7b6944 Add idct4
Change-Id: I1d1b6822452772cec95160491c7bc6d3bba1f5c2
2015-11-04 14:23:56 -08:00
Angie Chiang
b934148fb6 Add vp10_fwd_txfm1d_test
Change-Id: If3bef2be355227cfc2932e4471b84c21c7cd2b90
2015-11-04 14:23:56 -08:00
Angie Chiang
a9253a2029 Add fadst32
Change-Id: I77299f0e39fc7cef91e7e420513dbd05194f320a
2015-11-04 14:23:56 -08:00
Angie Chiang
a7d26f4e80 Add fadst16
Change-Id: I5175e39b5df73646488f74b2a9e4a463ae79d91a
2015-11-04 14:23:56 -08:00
Debargha Mukherjee
12fac1c281 Merge "Fix transform tables in C implementations." into nextgenv2 2015-11-04 21:11:38 +00:00
Angie Chiang
3813c2bc46 Merge "Add fadst8" into nextgenv2 2015-11-04 20:21:08 +00:00
Angie Chiang
498866b699 Merge "Add fadst4" into nextgenv2 2015-11-04 20:20:57 +00:00
Jingning Han
de00c163c7 Merge "Simplify txfm rate-distortion optimization" into nextgenv2 2015-11-04 19:31:03 +00:00
Jingning Han
493d02347c Simplify txfm rate-distortion optimization
This commit refactors the rate-distortion optimization scheme for
transform block coding. When both ext-tx and var-tx experiments
are turned on, the encoding time for bus_cif at 1000 kbps goes down
from 706377 ms to 666503 ms (5.6% speed-up). The coding statics
remain unchanged.

Change-Id: I20835db573725580aad79c16220f799ce01f2093
2015-11-04 10:25:48 -08:00
Geza Lore
4f5108090a Flip the result of the inverse transform for FLIPADST.
When using FLIPADST, the vp10_inv_txfm_add functions used to flip
the destination array, add the result of the inverse transform, to it
and then flip the destination back. This has been replaced by
flipping the result of the inverse transform before adding it to the
destination. Up-Down flipping is done by negating the destination
stride, and staring from the bottom, so it should now be free.
Left-right flipping is done with the usual SSE2 instructions in the
optimized code.

The C functions match the SSE2 functions as expected, so the C functions
now do the flipping as well when required. Adding this cleanly required
some refactoring of the C functions, but there is no measurable
performance impact when ext-tx is not enabled.

Encode speedup with ext-tx enabled is about 3%.

Change-Id: I5b04e5d720f0b9f0d54fd8607a8764f2314c7234
2015-11-04 17:11:44 +00:00
Yaowu Xu
4aafd01861 Merge branch 'master' into nextgenv2 2015-11-04 05:00:05 -08:00
hui su
be3559ba07 ext-intra experiment
Currently there are two parts in this experiment: extra directional intra
prediction modes and the filter intra modes migrated from the nextgen branch.

Several macros are defined in "blockd.h" to provide controls of the experiment
settings. Setting "DR_ONLY" as 1 (default is 0) means we only use directional
modes, and skip the filter-intra modes; "EXT_INTRA_ANGLES" (default is 128)
defines the number of different angles we want to support; setting
"ANGLE_FAST_SEARCH" as 1 (default is 1) means we use fast sub-optimal search
for the best prediction angle, instead of exhaustive search. The fast search
is about 6 times faster than the exhaustive search, while preserving about
60% of the coding gains.

With extra directional prediction modes (fast search), we observe the following
code gains (number in parentheses is for all-key-frame setting):
derflr +0.42%  (+1.79%)
hevclr +0.78%  (+2.19%)
hevcmr +1.20%  (+3.49%)
stdhd  +0.56%
Speed-wise, about 110% slower for key frames, and 30% slower overall.

The gains of filter intra modes mostly add up with the gains of directional
modes. The overall coding gain of this experiment:
derflr +0.94%
hevclr +1.46%
hevcmr +1.94%
stdhd  +1.58%

Change-Id: Ida9ad00cdb33aff422d06eb42b4f4e5f25df8a2a
2015-11-03 18:46:02 -08:00
Jingning Han
4101154d5b Merge "Re-work rate-distortion optimization scheme for transform coding" into nextgenv2 2015-11-03 22:47:21 +00:00
hui su
a3a1b2d052 Speed up per-commit test for nextgenv2 branch
Jenkins per-commit test need to be expedited as more experiments are
added into the nextgenv2 branch. This patch does the following:

thread test: change the length of test clip from 5 frames to 3 frames;
only test speed 1.
ArfFreq test: marked as "large".

The tests marked as "large" will be removed from per-commit test
(to nightly test).

Change-Id: I62b373c52b481dcd281e741ebf5098408a97ff4d
2015-11-03 12:27:19 -08:00
Geza Lore
01bb4a318d Eliminate copying for FLIPADST in fwd transforms.
This patch eliminates the copying of data when using FLIPADST forward
transforms, by incorporating the necessary data flipping into the
load_buffer_* functions of the SSE2 optimized forward transforms. The
load_buffer_* functions are normally inlined, so the overhead of copying
the data is removed and the overhead of flipping is minimized. Left to
right flipping is still not free, as the columns need to be shuffled in
registers.

To preserve identity between the C and SSE2 implementations, the
appropriate C implementations now also do the data flipping as part of
the transform, rather than relying on the caller for flipping the input.

Overall speedup is about 1.5-2% in encode on my tests. Note that these
are only the forward transforms. Inverse transforms to come in a later
patch.

There are also a few code hygiene changes:
- Fixed some indents of switch statements.
- DCT_DCT transform now always use vp10_fht* functions, which dispatch
  to vpx_fdct* for DCT_DCT (some of them used to call vpx_fdct*
  directly, some of them used to call vp10_fht*).

Change-Id: I93439257dc5cd104ac6129cfed45af142fb64574
2015-11-03 17:10:55 +00:00
Geza Lore
2b39bcec29 Fix transform tables in C implementations.
These tables were out of sync with the indexing enum since the
refactoring in commit 4f16f119 (change 303389), due to the removal
of the ext_tx_to_txtype lookup table. This patch just puts them
back in order.

Change-Id: Ieb7d57654f61b99b511d54c9ba09abbd5e8d0d14
2015-11-03 17:10:51 +00:00
Jingning Han
696ee004a5 Re-work rate-distortion optimization scheme for transform coding
This commit re-works the rate-distortion optimization scheme for
transform coding. It improves the overall compression performance.
For derf set, the ext-tx experiment provides 2.27% coding gains,
and the new scheme that integrates multiple transform type selection
and recursive transform block partitioning provides a total of 3.24%
coding gains.

Change-Id: Ia1887c4c44b73dfb915d091d96660a99f09d5cc3
2015-11-03 09:03:53 -08:00
Jingning Han
6d43a53a0c Merge "Incorporate flexible tx type and tx partition in RD scheme" into nextgenv2 2015-11-03 16:43:48 +00:00
Yaowu Xu
2c32861814 Merge branch 'master' into nextgenv2 2015-11-03 05:00:04 -08:00
Jingning Han
4b594d3d00 Incorporate flexible tx type and tx partition in RD scheme
This commit hooks up the rate-distortion optimization system to
fully exploit recursive transform block partition and multiple
transform type. The compression performance of the two experiments
largely adds up. For derf set, ext-tx provides additional 2.1%
coding gains on top of the gains due to recursive transform block
partition (0.69%).

Change-Id: I1091fb9545f74e489a6a2489dc3c12f5abd05043
2015-11-02 17:40:05 -08:00
Jingning Han
506e3b136c Merge "Fix block size computation in coeff token packing" into nextgenv2 2015-11-03 00:28:15 +00:00
Jingning Han
4b0ef55f10 Fix block size computation in coeff token packing
Correctly compute the block size in bit-stream coefficient token
packing. This fixes an enc/dec mismatch at very high bit-rates.

Change-Id: I37bf084731dc660df0c695cad406ddcd0f9eb904
2015-11-02 14:55:55 -08:00
Debargha Mukherjee
51c357083c Merge "Adding placeholders for new expts to be added" into nextgenv2 2015-11-02 20:25:36 +00:00
Jingning Han
dfd054649f Merge "Make loop filter support recursive transform block partitioning" into nextgenv2 2015-11-02 19:06:48 +00:00
Debargha Mukherjee
73e06f33b5 Adding placeholders for new expts to be added
Change-Id: I38952cd55b91f35e5db45bc8e6a20ef25069c464
--ext-refs:   extended references - for multi-ref in nextgen
--ext-inter:  extended inter - for new_inter/copy_mode in nextgen
--ext-interp: for new interpolation
2015-11-02 09:58:58 -08:00
Jingning Han
88b3b23619 Merge "Refactor loop filter mask" into nextgenv2 2015-10-31 18:21:33 +00:00
Jingning Han
365fa8d12d Merge "Fix a switch condition in select_tx_block" into nextgenv2 2015-10-31 18:20:54 +00:00
Yaowu Xu
893468dd04 Merge branch 'master' into nextgenv2 2015-10-31 05:00:04 -07:00
Jingning Han
94266f4f34 Make loop filter support recursive transform block partitioning
This commit allows the loop filter to account for the recursive
transform block partition when selecting the filter and mask.

Change-Id: I62b6c2dcc0497cbe1f264b03c46163f55d2c9752
2015-10-30 15:42:25 -07:00
Jingning Han
6727943ceb Refactor loop filter mask
This commit refactors the loop filter selection process to support
variable transform block sizes based filter mask. It disables the
multi-thread loop filter implementation to simplify the experiments.
The speed impact on speed 0 encoding is negligible.

Change-Id: Ia470b6da9ad833fe6eb72d2cbeda9296b21910ec
2015-10-30 15:25:16 -07:00
Jingning Han
47c7fd984e Fix a switch condition in select_tx_block
Change-Id: I3d90a0286c5ef559b91ad298db97e8990becf85f
2015-10-30 13:01:52 -07:00
Angie Chiang
27a739b650 Add fadst8
Change-Id: Ida4f292b824a29b4ffac8cad6e4042867f427979
2015-10-30 12:18:54 -07:00
Angie Chiang
1ef285bfe9 Add fadst4
Change-Id: I320a1cf82d1705e5ec7fe1870327f70ce8493489
2015-10-30 12:18:08 -07:00
Angie Chiang
0a6cab1dbc Add fdct32
Change-Id: Ifc709b62313cca0101638ed85ddb5c82e5f84fac
2015-10-30 12:07:40 -07:00
Angie Chiang
67e5b45dad Add fdct16
Change-Id: Id155b76d6694ba3fe5184ed2c20d57db4951ebf8
2015-10-30 12:05:24 -07:00
Angie Chiang
3eb719f6b0 Add fdct8
Change-Id: I66b884bc831324b5295c7874aa23f62042157834
2015-10-30 11:24:06 -07:00
Angie Chiang
ba78f80b01 Merge "Add fdct4" into nextgenv2 2015-10-30 17:41:21 +00:00
Jingning Han
b86b76bb4a Merge "Support per transform block skip coding" into nextgenv2 2015-10-30 16:58:03 +00:00
Jingning Han
bfeac5e19c Support per transform block skip coding
Allow the encoder to drop individual transform block coding.

Change-Id: I2c2b2985254cb92baf891f03daa33f067279373b
2015-10-30 08:55:17 -07:00
Yaowu Xu
cca1b39586 Merge branch 'master' into nextgenv2 2015-10-30 05:00:05 -07:00
Jingning Han
366bf3c2b6 Merge "Reset txfm context condition for skip coded blocks" into nextgenv2 2015-10-30 02:15:34 +00:00
Jingning Han
981f09a1f1 Reset txfm context condition for skip coded blocks
If a block has all coefficients quantized to zero, the codec will
assume that it uses largest transform block size.

Change-Id: Icd4e8e7cdc4b6af6974f87169e50b040ebfe9020
2015-10-29 18:02:37 -07:00
Jingning Han
88b9e90a56 Turn off fixed tx size in frame header
Temporarily turn off the fixed transform size at frame level.

Change-Id: I94a6a3b18893909d33fb7fa91e73ee3568b537b2
2015-10-29 14:30:56 -07:00
Angie Chiang
2e0aa9fb28 Add fdct4
Change-Id: Ic4539cb6c2d421ddffa44f58d3ce21bd797b57c6
2015-10-29 14:05:25 -07:00
Jingning Han
3edad6e887 Enable entropy coding of recursive transform block partition
This commit enables the entropy coding of the recursive transform
block partition syntax.

Change-Id: I0c2509fb7b9822d12a721f9ebf9327fac83c777e
2015-10-29 11:06:46 -07:00
Debargha Mukherjee
bdaa257674 Merge "Refactoring tx-types to add more flexibility" into nextgenv2 2015-10-29 16:51:14 +00:00
Yaowu Xu
fff670456d Merge branch 'master' into nextgenv2 2015-10-29 05:00:05 -07:00
Debargha Mukherjee
8a4292441f Refactoring tx-types to add more flexibility
Allows inter and intra tx_types to have different sets of
transforms for different tx_size/sb_type combinations.

Change-Id: Ic0ac1daef7a9fb15c4210271e4d04cd36e5cec8e
2015-10-28 23:31:32 -07:00
Jingning Han
71c156070c Use precise distortion metric
Rework the rate distortion optimization pipeline. Use precise
distortion metric that accounts for the forward and inverse
transform rounding effect.

Change-Id: Ibe19ce9791ec3547739294cc3012dd9e11f4ea49
2015-10-28 11:47:14 -07:00
Jingning Han
4bfed0b32e Account for variable txfm sizes in coeff token packing
This commit makes the coefficient token packtization process account
for variable transform block sizes supported in a single processing
block. It fixes an enc/dec mismatch issue when var-tx, ext-tx, and
misc-fixes experiments are all turned on.

Change-Id: I2e8946e6f72de567603a568debbadad11196430c
2015-10-28 11:45:31 -07:00
Yaowu Xu
eb7b5f660d Merge branch 'master' into nextgenv2
Change-Id: I63dc39d1ec9ad2e2454da6f5956dcd4367b87190
2015-10-28 08:14:16 -07:00
Jingning Han
f847a16a7c Add tx_type counts in key frame
Properly update the transform type counts in key frame coding at
decoder. It fixes an enc/dec mismatch issue when both ext-tx and
misc-fixes are turned on.

Change-Id: I1e40a77c8d8157d5ff254b072ce474d8dfbaa3ae
2015-10-27 16:51:45 -07:00
Debargha Mukherjee
0526305151 Merge "Accumulate EXT_TX counts for multithread" into nextgenv2 2015-10-27 18:48:25 +00:00
Peter de Rivaz
325b96dcac Accumulate EXT_TX counts for multithread
EXT_TX introduces some new symbols to be decoded.
The encoder counts how many times these are used.
In multithreaded mode, the counts from the worker threads
need to be accumulated into the main thread.

This change means that VP10/VPxEncoderThreadTest now works
with more choices of cpu-used and number of passes.

Change-Id: Ibe7e6a3c58145265f4ead155ff98fb4cb37c3513
2015-10-27 09:41:07 -07:00
Yaowu Xu
b6da40ad82 Merge branch 'master' into nextgenv2
Change-Id: I0e4030a37354bb23b3aa8be5cc1473770b9e7b06
2015-10-27 08:28:09 -07:00
Jingning Han
236623cf2c Fix early termination flag in recursive transform block search
Properly reset the early termination flag in the recursive transform
block partitioning rate-distortion optimization scheme.

Change-Id: Ibfe918f21f11dcb1ec267c09f954c635305cc95a
2015-10-26 19:41:14 -07:00
Jingning Han
f0dee7765a Fix lossless coding
Use inter_block_yrd as rate-distortion optimization for lossless
coding. This fixes transform coefficient buffer swap use case and
resolves the unit test failure related to lossless coding.

Change-Id: I1512dab5ed5760c31f7de21a06e8d9ed1eb081fa
2015-10-26 22:03:39 +00:00
Debargha Mukherjee
c655b5f5f5 Test fix for VP10
Disbales threading test for speeds > 0 and all modes other than
2-pass temporarily.

Change-Id: I098ef2b16f575c039a7f6a21244dd87eee6960ce
2015-10-26 22:03:05 +00:00
Jingning Han
232098a774 Merge "Make transform block partition scheme support use largest txfm setting" into nextgenv2 2015-10-26 19:37:57 +00:00
Jingning Han
01ba752a0d Make transform block partition scheme support use largest txfm setting
This commit properly resets the recursive transform block partition
array in the settings of using largest transform block size at frame
header level. It fixes one of the unit test failure related to the use
of frame level fixed transform block size with 440 color format.

Change-Id: I6750f323e2c2510c080ffc3af82ce2041f4f60b8
2015-10-26 11:13:36 -07:00
Yaowu Xu
c6d31ecce0 Merge branch 'master' into nextgenv2 2015-10-26 08:57:30 -07:00
Jingning Han
3ff3313502 Silence compiler warnings when high bit-depth is turned on
Clear the compiler warnings when both ext-tx and high bit-depth
are turned on.

Change-Id: I2e02f1f29043f2952fe215f8183b5bfd80e16f58
2015-10-23 14:51:16 -07:00
Jingning Han
79fe7246c1 Properly handle non-420 color format in recursive transform scheme
This commit makes the recursive transform block partitioning properly
handle the non-420 color format. It resolves an enc/dec mismatch
issue in that setting when var-tx experiment is turned on.

Change-Id: I48a91de02c11b3153f897d1cca0ae948eec15605
2015-10-23 14:42:01 -07:00
Debargha Mukherjee
f1c4b79d72 Build fix for ext-tx
Change-Id: Ifab43f85f6ae1be6b9f95521f79ba49055353b5f
2015-10-23 21:38:50 +00:00
Jingning Han
48c7de0fce Fix enc/dec mismatch in var-tx experiment
This commit fixes an enc/dec mismatch issue in recursive transform
partitioning experiment due to merge conflict.

Change-Id: I66146ef806c008902c91d54f4f8c7ccf47996b78
2015-10-23 13:58:38 -07:00
Yaowu Xu
ed8bddaac8 Merge "Merge branch 'masterbase' into nextgenv2" into nextgenv2 2015-10-23 01:32:19 +00:00
Yaowu Xu
37d17b6518 Merge branch 'masterbase' into nextgenv2
Conflicts:
	configure

Change-Id: I7f331981e19338451d16030f0ac1179db2e08c4d
2015-10-22 18:31:26 -07:00
Yaowu Xu
df33be4b22 Merge "Fix merge defects" into nextgenv2 2015-10-23 01:28:32 +00:00
Yaowu Xu
5a27b3bb85 Fix merge defects
This commit fixes the merge conflicts between master and nextgenv2 and
disable early termination in choose_tx_size() to avoid failure in test.

The test failures are pre-existing, some of the issue were fixed in
masterbase already, so will have another merge to introduce the fixes.

Change-Id: Ib71889661955e73aedbb4db49d8be70425281dcb
2015-10-22 18:25:41 -07:00
Jingning Han
18aea429af Merge "Reset tx_type in recursive transform block partitioning" into nextgenv2 2015-10-22 21:34:32 +00:00
Jingning Han
d3e5545fa6 Reset tx_type in recursive transform block partitioning
Temporarily reset the transform type in the inter modes when
recursive transform block partitioning is used. This resolves an
enc/dec mismatch issue in nextgenv2 codebase when both var-tx and
ext-tx experiments are turned on.

Change-Id: I2543f0a567243da95b237752d46964b07b669ad9
2015-10-22 14:28:56 -07:00
Yaowu Xu
4ac2ae3a4d Merge branch 'masterbase' into nextgenv2
Conflicts:
	configure
	test/vp9_encoder_parms_get_to_decoder.cc
	vp10/common/blockd.h
	vp10/common/entropymode.c
	vp10/common/entropymode.h
	vp10/common/idct.c
	vp10/decoder/decodeframe.c
	vp10/decoder/decodemv.c
	vp10/encoder/bitstream.c
	vp10/encoder/encodeframe.c
	vp10/encoder/encodemb.c
	vp10/encoder/encoder.c
	vp10/encoder/encoder.h
	vp10/encoder/rd.c
	vp10/encoder/rdopt.c
	vp10/encoder/tokenize.c
	vp10/encoder/tokenize.h
	vp9/decoder/vp9_decodeframe.c
	vp9/decoder/vp9_decoder.h
	vp9/encoder/vp9_aq_cyclicrefresh.c
	vp9/encoder/vp9_encoder.h
	vp9/vp9_cx_iface.c
	vpx/vp8cx.h
	vpx_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c
	vpx_scale/yv12config.h

Change-Id: I604a329d38badec7a11e8ede16ca1404476e9b93
2015-10-22 11:40:44 -07:00
Jingning Han
20484048a9 Fix compiler error with high bit-depth and var-tx
Clear the compiler errors when both high bit-depth and recursive
transform block partition experiments are enabled.

Change-Id: If0b6396851f10c28b4f26350322ccd1ba2fc9aff
2015-10-21 17:38:00 -07:00
Jingning Han
6a9ed8d2b6 Fix forward transform bit range limits
Change-Id: I13c0ecff8c58a0571d9de4bc5fbbebe72533ccdb
2015-10-15 09:09:44 -07:00
Jingning Han
8198be113d Fix a compiler error under ext-tx experiment flag
Change-Id: Ib3df8c10b9df5627358ae3315b05b81fdca60535
2015-10-14 19:46:35 -07:00
Jingning Han
1e48f74d9a Enable early termination in the recursive transform block search
It makes the encoder 5% faster for CIF clips and 12% faster for
1080p clips.

Change-Id: I073408dbb4d50675a79db8794fe73975ac957b91
2015-10-13 21:14:58 +00:00
Jingning Han
3a27961cf3 Refactor recursive transform block scheme
This commit re-designs the recursive transform block partition
rate-distortion optimization framework. It allows the encoder to
improve speed by 10%.

Change-Id: I6dd3a7dd428a530d8012e5c6ddc40e650c8b392b
2015-10-13 21:13:29 +00:00
Jingning Han
2cdc12742d Rate-distortion optimization for recursive transform block coding
This commit enables the rate-distortion optimization for recursive
transform block coding scheme.

Change-Id: Id6a8336ca847bb3af1e94cbfb51db1f4da12d38f
2015-10-13 12:49:03 -07:00
Jingning Han
a8dad55c82 Make chroma component RD estimate support transform partition
This commit makes the rate-distortion optimization for chroma
component support the recursive transform block coding scheme.

Change-Id: I1bfed6d05b0ebb3905cb625222401e2ccbae10f3
2015-10-08 18:04:03 -07:00
Jingning Han
704985e65a Add decoder support to recursive transform block partition
This commit allows the decoder to recursively parse and rebuild
the pixel blocks.

Change-Id: I510f3a30ae7cdad5b70725c66882b00a0594e96f
2015-10-08 16:16:41 -07:00
Jingning Han
52bb9dd45c Make tokenization process support recursive transform block coding
This commit makes the transform, quantization, tokenization and
their corresponding inverse operations support recursive transform
block coding process.

Change-Id: I71f2ef3a7c2d3db7cfc63c1fd3f1337e8e0360b5
2015-10-08 08:46:02 -07:00
Jingning Han
cffcfdb809 Add support to recursive transform block coding
This commit re-designs the bitstream syntax to support recursive
transform block partition. The initial stage targets the inter
prediction residuals.

Change-Id: I556ab3c68c198387a2fd2d02e2b475e83cd417c3
2015-10-07 19:33:13 -07:00
Jingning Han
056c741ac7 Merge "Use explicit block position in foreach_transformed_block" into nextgenv2 2015-10-08 01:39:37 +00:00
Jingning Han
ebc48efe37 Use explicit block position in foreach_transformed_block
Add the row and column index to the argument list of unit functions
called by foreach_transformed_block wrapper. This avoids the
repeated internal parsing according to the block index.

Change-Id: I42b3578eac258ebaba7a7c74f684de9abab521a6
2015-10-07 16:32:19 -07:00
hui su
4b447e7b05 Add ext_intra experiment
Experiment for extended/extra intra prediction.

Change-Id: Icfeaeb62bafd69474302d2de36d42c6a077a46c2
2015-10-07 11:26:44 -07:00
Jingning Han
00ca5c1c98 Simplify vp10_xform_quant index parsing
Change-Id: Id7f7a9b2e53fc0074b55d58143f296afad6b844e
2015-10-06 17:19:23 -07:00
Hui Su
cd7c7a9d3b Merge "Refactor ext-tx experiment" into nextgenv2 2015-10-05 19:31:51 +00:00
Hui Su
6a9f0db997 Merge "Extend ext_tx experiment to intra blocks" into nextgenv2 2015-10-05 19:31:33 +00:00
Zoe Liu
8806955dbd Added is_compound_ref() to identify compound prediction
Change-Id: I7e3bf9f181e0cfbebf7afe93dabb03384b595b79
2015-10-02 13:47:15 -07:00
hui su
4f16f11993 Refactor ext-tx experiment
Remove unnecessary transform type lookups and unused codes.

Change-Id: Ib52d26690468996b1501b419d919643c8ea5ecaa
2015-10-02 11:00:51 -07:00
hui su
3fa0129caf Extend ext_tx experiment to intra blocks
ext-tx on derflr +2.30% (was +1.84%)

Change-Id: Ic91565cacc38e7a8e1200d054ed7bf99295fe19e
2015-10-02 09:39:38 -07:00
hui su
f53153db42 Fix a bug induced in 0c2e393c3274da40e228a157a483c03380492092
ext-tx on derflr: +1.841% (was +1.756)

Change-Id: Ic8c59a6fa3c77b0d2a2c493fe8cb758d91b0d886
2015-10-01 15:59:21 -07:00
Hui Su
2858110294 Merge "Add identity transform to ext-tx experiment" into nextgenv2 2015-10-01 18:17:48 +00:00
hui su
2afe7320c8 Add identity transform to ext-tx experiment
ext-tx on derflr: +1.756% (was +1.648)

Change-Id: I8a87970fa589e8f5f96db7aa68ec9b6c98e20188
2015-09-30 18:47:46 -07:00
Yaowu Xu
0f29a024af Move vp10-specific functions to vp10 from vpx_dsp
They are used by VP10 only, are now moved to vp10 and made static.

Change-Id: I4a4d4f1ceae1f7143240629bb94f8daf2733879d
2015-09-30 17:19:08 -07:00
Hui Su
4b7043f804 Merge "ext-tx experiment support in choose_largest_tx_size" into nextgenv2 2015-09-30 15:14:17 +00:00
Debargha Mukherjee
3e8cceb3fc Speed up of DST and the search in ext_tx
Adds an early termination to the ext_tx search, and also
implements the DST transforms more efficiently.

About 4 times faster with the ext-tx experiment.

There is a 0.09% drop in performance on derflr from 1.735% to
1.648%, but worth it with the speedup achieved.

Change-Id: I2ede9d69c557f25e0a76cd5d701cc0e36e825c7c
2015-09-29 19:11:43 -07:00
Yaowu Xu
7c514e2dfd Merged branch 'master' into nextgenv2
Resolved Conflicts in the following files:
        configure
        vp10/common/idct.c
        vp10/encoder/dct.c
        vp10/encoder/encodemb.c
        vp10/encoder/rdopt.c

Change-Id: I4cb3986b0b80de65c722ca29d53a0a57f5a94316
2015-09-29 16:17:32 -07:00
hui su
6c81e37916 ext-tx experiment support in choose_largest_tx_size
Change-Id: Ic161b8b257a02c1c43e515d830c1051d0de074de
2015-09-29 12:09:15 -07:00
hui su
07154b0216 Refactor ext-tx experiment
At this point, ext-tx compapred to baseline +1.735%.

Change-Id: Ia16ac293e2cc87e06a0d898c1d52a8f3495ff814
2015-09-23 09:14:49 -07:00
hui su
8e273b23ad Adjust rd calculation in choose_tx_size_from_rd
Consider tha case in which skipping transform coefficients is more
efficient.

derflr +0.13%
hevclr +0.11%
hevcmr +0.14%
hevchr +0.22%

with ext-tx, the impact is -0.02%.

Change-Id: I0aa2965cf9e152396623c2fee62545bd3a3a7f07
2015-09-23 09:13:55 -07:00
hui su
38debe512e Simplify choose_tx_size_from_rd
No impact on performance.

Change-Id: Ib0420b190c9d83ef47b14ea78d5918a6a5078e3a
2015-09-23 09:08:47 -07:00
Debargha Mukherjee
b2ec0a0d1c Merge "Changes to ext-tx probs" into nextgenv2 2015-09-18 00:41:57 +00:00
Debargha Mukherjee
09ff5f2792 Merge remote-tracking branch 'origin/master' into nextgenv2
Periodic merge to get master changes into nextgenv2.

Change-Id: I6f0e4b470f193da03f1a8cb8e6a93ae39395699a
2015-09-17 16:33:18 -07:00
Debargha Mukherjee
c4b4db4b12 Changes to ext-tx probs
Slight improvement in performance.
derflr: +1.828%

Change-Id: I74f5d3743a2b9c27e8b97c266c702dd1a791f73e
2015-09-17 11:04:10 -07:00
Debargha Mukherjee
31341374d7 Inter UV blocks use the same transform type as Y
Extend the ext_tx experiment to make the UV inter blocks use
the same transform type as the extended transform type used
for Y.

derflr: +1.792% (about +0.06)

Change-Id: I4a77e1f7764b2e8b523e28f42ba13559dde4f0ca
2015-09-16 09:55:12 -07:00
Debargha Mukherjee
b8bc026c72 Misc. ext_tx fixes/enhancements
derflr: +1.732% (8-bit)

Change-Id: I9c04c8249646ff96eacacfa1dcb0bd118c04e84a
2015-09-15 10:00:54 -07:00
Debargha Mukherjee
4ce81d666e Comprehensive support for symmetric DST
Creates new hybrid transforms combining symmetric DST with
ADST and DCT. Thus a total of 16 transforms are supported.

derfl: +1.659% (up about 0.2%)

Change-Id: Idde1cecdb59527890bf05da740099c3f6a5b9764
2015-09-10 11:13:59 -07:00
Debargha Mukherjee
ab3042ba3b Some refactoring of EXT_TX
Change-Id: I61359787fdacdeb245e2798031a6e06e4afb83e0
2015-09-09 17:13:22 -07:00
Debargha Mukherjee
9fc691efbe Backport EXT_TX experiment from nextgen
Does not include DST1 yet.

derflr: +1.437 (8-bit internal), +7.243 (12-bit internal)
with --enable-ext-tx

Change-Id: I91f1759fd2de794755eb6384cda52e80e979cb7d
2015-09-09 09:42:51 -07:00
hui su
b3cc3a07b0 Enable ADST for UV channel
derflr +0.202%
hevclf +0.207%
hevcmr +0.095%
hevchr +0.077%

Tested locally on several derf sequences, speed (encoder + decoder)
is slower by less than 1%.

It is part of the EXT_TX experiment, which is to be continued to
explore different transform variants.

Change-Id: I05d44994a62106538a9a241ed8d89bd7c5d14761
2015-08-26 13:25:30 -07:00
Debargha Mukherjee
26addefc34 Merge "Merge remote-tracking branch 'origin/master' into nextgenv2" into nextgenv2 2015-08-26 19:19:24 +00:00
Debargha Mukherjee
a396e2017f Merge remote-tracking branch 'origin/master' into nextgenv2
Merges changes from master to nextgenv2

Change-Id: Ia86490127d01ffde3e376dac2760d84e6b09a2e7
2015-08-25 10:27:02 -07:00
839 changed files with 87719 additions and 181443 deletions

68
.clang-format Normal file
View File

@ -0,0 +1,68 @@
---
Language: Cpp
# BasedOnStyle: Google
# Generated with clang-format 3.7.1
AccessModifierOffset: -1
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Right
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
...

5
README
View File

@ -79,9 +79,6 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86-os2-gcc
x86-solaris-gcc
x86-win32-gcc
x86-win32-vs7
x86-win32-vs8
x86-win32-vs9
x86-win32-vs10
x86-win32-vs11
x86-win32-vs12
@ -98,8 +95,6 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86_64-linux-icc
x86_64-solaris-gcc
x86_64-win64-gcc
x86_64-win64-vs8
x86_64-win64-vs9
x86_64-win64-vs10
x86_64-win64-vs11
x86_64-win64-vs12

View File

@ -168,12 +168,6 @@ endif
define rtcd_dep_template
rtcd_dep_template_SRCS := $(addprefix $(LOCAL_PATH)/, $(LOCAL_SRC_FILES))
rtcd_dep_template_SRCS := $$(rtcd_dep_template_SRCS:.neon=)
ifeq ($(CONFIG_VP8), yes)
$$(rtcd_dep_template_SRCS): vp8_rtcd.h
endif
ifeq ($(CONFIG_VP9), yes)
$$(rtcd_dep_template_SRCS): vp9_rtcd.h
endif
ifeq ($(CONFIG_VP10), yes)
$$(rtcd_dep_template_SRCS): vp10_rtcd.h
endif

View File

@ -26,7 +26,7 @@ test-no-data-check:: .DEFAULT
testdata:: .DEFAULT
utiltest: .DEFAULT
exampletest-no-data-check utiltest-no-data-check: .DEFAULT
test_%: .DEFAULT ;
# Note: md5sum is not installed on OS X, but openssl is. Openssl may not be
# installed on cygwin, so we need to autodetect here.
@ -418,7 +418,6 @@ ifneq ($(call enabled,DIST-SRCS),)
DIST-SRCS-yes += build/make/gen_asm_deps.sh
DIST-SRCS-yes += build/make/Makefile
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_proj.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_vcxproj.sh
DIST-SRCS-$(CONFIG_MSVS) += build/make/msvs_common.sh
@ -449,3 +448,5 @@ all: $(BUILD_TARGETS)
install:: $(INSTALL_TARGETS)
dist: $(INSTALL_TARGETS)
test::
.SUFFIXES: # Delete default suffix rules

View File

@ -186,24 +186,6 @@ add_extralibs() {
# Boolean Manipulation Functions
#
enable_codec(){
enabled $1 || echo " enabling $1"
set_all yes $1
is_in $1 vp8 vp9 vp10 && \
set_all yes $1_encoder && \
set_all yes $1_decoder
}
disable_codec(){
disabled $1 || echo " disabling $1"
set_all no $1
is_in $1 vp8 vp9 vp10 && \
set_all no $1_encoder && \
set_all no $1_decoder
}
enable_feature(){
set_all yes $*
}
@ -220,6 +202,20 @@ disabled(){
eval test "x\$$1" = "xno"
}
enable_codec(){
enabled "${1}" || echo " enabling ${1}"
enable_feature "${1}"
is_in "${1}" vp8 vp9 vp10 && enable_feature "${1}_encoder" "${1}_decoder"
}
disable_codec(){
disabled "${1}" || echo " disabling ${1}"
disable_feature "${1}"
is_in "${1}" vp8 vp9 vp10 && disable_feature "${1}_encoder" "${1}_decoder"
}
# Iterates through positional parameters, checks to confirm the parameter has
# not been explicitly (force) disabled, and enables the setting controlled by
# the parameter when the setting is not disabled.
@ -945,6 +941,9 @@ EOF
check_add_cflags -mfpu=neon #-ftree-vectorize
check_add_asflags -mfpu=neon
fi
elif [ ${tgt_isa} = "arm64" ] || [ ${tgt_isa} = "armv8" ]; then
check_add_cflags -march=armv8-a
check_add_asflags -march=armv8-a
else
check_add_cflags -march=${tgt_isa}
check_add_asflags -march=${tgt_isa}
@ -1012,6 +1011,10 @@ EOF
;;
android*)
if [ -z "${sdk_path}" ]; then
die "Must specify --sdk-path for Android builds."
fi
SDK_PATH=${sdk_path}
COMPILER_LOCATION=`find "${SDK_PATH}" \
-name "arm-linux-androideabi-gcc*" -print -quit`
@ -1150,13 +1153,13 @@ EOF
if [ -n "${tune_cpu}" ]; then
case ${tune_cpu} in
p5600)
check_add_cflags -mips32r5 -funroll-loops -mload-store-pairs
check_add_cflags -mips32r5 -mload-store-pairs
check_add_cflags -msched-weight -mhard-float -mfp64
check_add_asflags -mips32r5 -mhard-float -mfp64
check_add_ldflags -mfp64
;;
i6400)
check_add_cflags -mips64r6 -mabi=64 -funroll-loops -msched-weight
i6400|p6600)
check_add_cflags -mips64r6 -mabi=64 -msched-weight
check_add_cflags -mload-store-pairs -mhard-float -mfp64
check_add_asflags -mips64r6 -mabi=64 -mhard-float -mfp64
check_add_ldflags -mips64r6 -mabi=64 -mfp64
@ -1393,10 +1396,6 @@ EOF
fi
fi
if [ "${tgt_isa}" = "x86_64" ] || [ "${tgt_isa}" = "x86" ]; then
soft_enable use_x86inc
fi
# Position Independent Code (PIC) support, for building relocatable
# shared objects
enabled gcc && enabled pic && check_add_cflags -fPIC

View File

@ -1,490 +0,0 @@
#!/bin/bash
##
## Copyright (c) 2010 The WebM project authors. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
##
self=$0
self_basename=${self##*/}
self_dirname=$(dirname "$0")
. "$self_dirname/msvs_common.sh"|| exit 127
show_help() {
cat <<EOF
Usage: ${self_basename} --name=projname [options] file1 [file2 ...]
This script generates a Visual Studio project file from a list of source
code files.
Options:
--help Print this message
--exe Generate a project for building an Application
--lib Generate a project for creating a static library
--dll Generate a project for creating a dll
--static-crt Use the static C runtime (/MT)
--target=isa-os-cc Target specifier (required)
--out=filename Write output to a file [stdout]
--name=project_name Name of the project (required)
--proj-guid=GUID GUID to use for the project
--module-def=filename File containing export definitions (for DLLs)
--ver=version Version (7,8,9) of visual studio to generate for
--src-path-bare=dir Path to root of source tree
-Ipath/to/include Additional include directories
-DFLAG[=value] Preprocessor macros to define
-Lpath/to/lib Additional library search paths
-llibname Library to link against
EOF
exit 1
}
generate_filter() {
local var=$1
local name=$2
local pats=$3
local file_list_sz
local i
local f
local saveIFS="$IFS"
local pack
echo "generating filter '$name' from ${#file_list[@]} files" >&2
IFS=*
open_tag Filter \
Name=$name \
Filter=$pats \
UniqueIdentifier=`generate_uuid` \
file_list_sz=${#file_list[@]}
for i in ${!file_list[@]}; do
f=${file_list[i]}
for pat in ${pats//;/$IFS}; do
if [ "${f##*.}" == "$pat" ]; then
unset file_list[i]
objf=$(echo ${f%.*}.obj \
| sed -e "s,$src_path_bare,," \
-e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
open_tag File RelativePath="$f"
if [ "$pat" == "asm" ] && $asm_use_custom_step; then
# Avoid object file name collisions, i.e. vpx_config.c and
# vpx_config.asm produce the same object file without
# this additional suffix.
objf=${objf%.obj}_asm.obj
for plat in "${platforms[@]}"; do
for cfg in Debug Release; do
open_tag FileConfiguration \
Name="${cfg}|${plat}" \
tag Tool \
Name="VCCustomBuildTool" \
Description="Assembling \$(InputFileName)" \
CommandLine="$(eval echo \$asm_${cfg}_cmdline) -o \$(IntDir)\\$objf" \
Outputs="\$(IntDir)\\$objf" \
close_tag FileConfiguration
done
done
fi
if [ "$pat" == "c" ] || \
[ "$pat" == "cc" ] || [ "$pat" == "cpp" ]; then
for plat in "${platforms[@]}"; do
for cfg in Debug Release; do
open_tag FileConfiguration \
Name="${cfg}|${plat}" \
tag Tool \
Name="VCCLCompilerTool" \
ObjectFile="\$(IntDir)\\$objf" \
close_tag FileConfiguration
done
done
fi
close_tag File
break
fi
done
done
close_tag Filter
IFS="$saveIFS"
}
# Process command line
unset target
for opt in "$@"; do
optval="${opt#*=}"
case "$opt" in
--help|-h) show_help
;;
--target=*) target="${optval}"
;;
--out=*) outfile="$optval"
;;
--name=*) name="${optval}"
;;
--proj-guid=*) guid="${optval}"
;;
--module-def=*) link_opts="${link_opts} ModuleDefinitionFile=${optval}"
;;
--exe) proj_kind="exe"
;;
--dll) proj_kind="dll"
;;
--lib) proj_kind="lib"
;;
--src-path-bare=*)
src_path_bare=$(fix_path "$optval")
src_path_bare=${src_path_bare%/}
;;
--static-crt) use_static_runtime=true
;;
--ver=*)
vs_ver="$optval"
case "$optval" in
[789])
;;
*) die Unrecognized Visual Studio Version in $opt
;;
esac
;;
-I*)
opt=${opt##-I}
opt=$(fix_path "$opt")
opt="${opt%/}"
incs="${incs}${incs:+;}&quot;${opt}&quot;"
yasmincs="${yasmincs} -I&quot;${opt}&quot;"
;;
-D*) defines="${defines}${defines:+;}${opt##-D}"
;;
-L*) # fudge . to $(OutDir)
if [ "${opt##-L}" == "." ]; then
libdirs="${libdirs}${libdirs:+;}&quot;\$(OutDir)&quot;"
else
# Also try directories for this platform/configuration
opt=${opt##-L}
opt=$(fix_path "$opt")
libdirs="${libdirs}${libdirs:+;}&quot;${opt}&quot;"
libdirs="${libdirs}${libdirs:+;}&quot;${opt}/\$(PlatformName)/\$(ConfigurationName)&quot;"
libdirs="${libdirs}${libdirs:+;}&quot;${opt}/\$(PlatformName)&quot;"
fi
;;
-l*) libs="${libs}${libs:+ }${opt##-l}.lib"
;;
-*) die_unknown $opt
;;
*)
# The paths in file_list are fixed outside of the loop.
file_list[${#file_list[@]}]="$opt"
case "$opt" in
*.asm) uses_asm=true
;;
esac
;;
esac
done
# Make one call to fix_path for file_list to improve performance.
fix_file_list file_list
outfile=${outfile:-/dev/stdout}
guid=${guid:-`generate_uuid`}
asm_use_custom_step=false
uses_asm=${uses_asm:-false}
case "${vs_ver:-8}" in
7) vs_ver_id="7.10"
asm_use_custom_step=$uses_asm
warn_64bit='Detect64BitPortabilityProblems=true'
;;
8) vs_ver_id="8.00"
asm_use_custom_step=$uses_asm
warn_64bit='Detect64BitPortabilityProblems=true'
;;
9) vs_ver_id="9.00"
asm_use_custom_step=$uses_asm
warn_64bit='Detect64BitPortabilityProblems=false'
;;
esac
[ -n "$name" ] || die "Project name (--name) must be specified!"
[ -n "$target" ] || die "Target (--target) must be specified!"
if ${use_static_runtime:-false}; then
release_runtime=0
debug_runtime=1
lib_sfx=mt
else
release_runtime=2
debug_runtime=3
lib_sfx=md
fi
# Calculate debug lib names: If a lib ends in ${lib_sfx}.lib, then rename
# it to ${lib_sfx}d.lib. This precludes linking to release libs from a
# debug exe, so this may need to be refactored later.
for lib in ${libs}; do
if [ "$lib" != "${lib%${lib_sfx}.lib}" ]; then
lib=${lib%.lib}d.lib
fi
debug_libs="${debug_libs}${debug_libs:+ }${lib}"
done
# List Keyword for this target
case "$target" in
x86*) keyword="ManagedCProj"
;;
*) die "Unsupported target $target!"
esac
# List of all platforms supported for this target
case "$target" in
x86_64*)
platforms[0]="x64"
asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} &quot;\$(InputPath)&quot;"
asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} &quot;\$(InputPath)&quot;"
;;
x86*)
platforms[0]="Win32"
asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} &quot;\$(InputPath)&quot;"
asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} &quot;\$(InputPath)&quot;"
;;
*) die "Unsupported target $target!"
;;
esac
generate_vcproj() {
case "$proj_kind" in
exe) vs_ConfigurationType=1
;;
dll) vs_ConfigurationType=2
;;
*) vs_ConfigurationType=4
;;
esac
echo "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>"
open_tag VisualStudioProject \
ProjectType="Visual C++" \
Version="${vs_ver_id}" \
Name="${name}" \
ProjectGUID="{${guid}}" \
RootNamespace="${name}" \
Keyword="${keyword}" \
open_tag Platforms
for plat in "${platforms[@]}"; do
tag Platform Name="$plat"
done
close_tag Platforms
open_tag Configurations
for plat in "${platforms[@]}"; do
plat_no_ws=`echo $plat | sed 's/[^A-Za-z0-9_]/_/g'`
open_tag Configuration \
Name="Debug|$plat" \
OutputDirectory="\$(SolutionDir)$plat_no_ws/\$(ConfigurationName)" \
IntermediateDirectory="$plat_no_ws/\$(ConfigurationName)/${name}" \
ConfigurationType="$vs_ConfigurationType" \
CharacterSet="1" \
case "$target" in
x86*)
case "$name" in
vpx)
tag Tool \
Name="VCCLCompilerTool" \
Optimization="0" \
AdditionalIncludeDirectories="$incs" \
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
RuntimeLibrary="$debug_runtime" \
UsePrecompiledHeader="0" \
WarningLevel="3" \
DebugInformationFormat="2" \
$warn_64bit \
$uses_asm && tag Tool Name="YASM" IncludePaths="$incs" Debug="true"
;;
*)
tag Tool \
Name="VCCLCompilerTool" \
Optimization="0" \
AdditionalIncludeDirectories="$incs" \
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
RuntimeLibrary="$debug_runtime" \
UsePrecompiledHeader="0" \
WarningLevel="3" \
DebugInformationFormat="2" \
$warn_64bit \
$uses_asm && tag Tool Name="YASM" IncludePaths="$incs" Debug="true"
;;
esac
;;
esac
case "$proj_kind" in
exe)
case "$target" in
x86*)
case "$name" in
*)
tag Tool \
Name="VCLinkerTool" \
AdditionalDependencies="$debug_libs \$(NoInherit)" \
AdditionalLibraryDirectories="$libdirs" \
GenerateDebugInformation="true" \
ProgramDatabaseFile="\$(OutDir)/${name}.pdb" \
;;
esac
;;
esac
;;
lib)
case "$target" in
x86*)
tag Tool \
Name="VCLibrarianTool" \
OutputFile="\$(OutDir)/${name}${lib_sfx}d.lib" \
;;
esac
;;
dll)
tag Tool \
Name="VCLinkerTool" \
AdditionalDependencies="\$(NoInherit)" \
LinkIncremental="2" \
GenerateDebugInformation="true" \
AssemblyDebug="1" \
TargetMachine="1" \
$link_opts \
;;
esac
close_tag Configuration
open_tag Configuration \
Name="Release|$plat" \
OutputDirectory="\$(SolutionDir)$plat_no_ws/\$(ConfigurationName)" \
IntermediateDirectory="$plat_no_ws/\$(ConfigurationName)/${name}" \
ConfigurationType="$vs_ConfigurationType" \
CharacterSet="1" \
WholeProgramOptimization="0" \
case "$target" in
x86*)
case "$name" in
vpx)
tag Tool \
Name="VCCLCompilerTool" \
Optimization="2" \
FavorSizeorSpeed="1" \
AdditionalIncludeDirectories="$incs" \
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
RuntimeLibrary="$release_runtime" \
UsePrecompiledHeader="0" \
WarningLevel="3" \
DebugInformationFormat="0" \
$warn_64bit \
$uses_asm && tag Tool Name="YASM" IncludePaths="$incs"
;;
*)
tag Tool \
Name="VCCLCompilerTool" \
AdditionalIncludeDirectories="$incs" \
Optimization="2" \
FavorSizeorSpeed="1" \
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
RuntimeLibrary="$release_runtime" \
UsePrecompiledHeader="0" \
WarningLevel="3" \
DebugInformationFormat="0" \
$warn_64bit \
$uses_asm && tag Tool Name="YASM" IncludePaths="$incs"
;;
esac
;;
esac
case "$proj_kind" in
exe)
case "$target" in
x86*)
case "$name" in
*)
tag Tool \
Name="VCLinkerTool" \
AdditionalDependencies="$libs \$(NoInherit)" \
AdditionalLibraryDirectories="$libdirs" \
;;
esac
;;
esac
;;
lib)
case "$target" in
x86*)
tag Tool \
Name="VCLibrarianTool" \
OutputFile="\$(OutDir)/${name}${lib_sfx}.lib" \
;;
esac
;;
dll) # note differences to debug version: LinkIncremental, AssemblyDebug
tag Tool \
Name="VCLinkerTool" \
AdditionalDependencies="\$(NoInherit)" \
LinkIncremental="1" \
GenerateDebugInformation="true" \
TargetMachine="1" \
$link_opts \
;;
esac
close_tag Configuration
done
close_tag Configurations
open_tag Files
generate_filter srcs "Source Files" "c;cc;cpp;def;odl;idl;hpj;bat;asm;asmx"
generate_filter hdrs "Header Files" "h;hm;inl;inc;xsd"
generate_filter resrcs "Resource Files" "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
generate_filter resrcs "Build Files" "mk"
close_tag Files
tag Globals
close_tag VisualStudioProject
# This must be done from within the {} subshell
echo "Ignored files list (${#file_list[@]} items) is:" >&2
for f in "${file_list[@]}"; do
echo " $f" >&2
done
}
generate_vcproj |
sed -e '/"/s;\([^ "]\)/;\1\\;g' > ${outfile}
exit
<!--
TODO: Add any files not captured by filters.
<File
RelativePath=".\ReadMe.txt"
>
</File>
-->

View File

@ -55,16 +55,11 @@ indent_pop() {
parse_project() {
local file=$1
if [ "$sfx" = "vcproj" ]; then
local name=`grep Name "$file" | awk 'BEGIN {FS="\""}{if (NR==1) print $2}'`
local guid=`grep ProjectGUID "$file" | awk 'BEGIN {FS="\""}{if (NR==1) print $2}'`
else
local name=`grep RootNamespace "$file" | sed 's,.*<.*>\(.*\)</.*>.*,\1,'`
local guid=`grep ProjectGuid "$file" | sed 's,.*<.*>\(.*\)</.*>.*,\1,'`
fi
# save the project GUID to a varaible, normalizing to the basename of the
# vcproj file without the extension
# vcxproj file without the extension
local var
var=${file##*/}
var=${var%%.${sfx}}
@ -72,13 +67,8 @@ parse_project() {
eval "${var}_name=$name"
eval "${var}_guid=$guid"
if [ "$sfx" = "vcproj" ]; then
cur_config_list=`grep -A1 '<Configuration' $file |
grep Name | cut -d\" -f2`
else
cur_config_list=`grep -B1 'Label="Configuration"' $file |
grep Condition | cut -d\' -f4`
fi
new_config_list=$(for i in $config_list $cur_config_list; do
echo $i
done | sort | uniq)
@ -103,25 +93,6 @@ process_project() {
eval "${var}_guid=$guid"
echo "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"$name\", \"$file\", \"$guid\""
indent_push
eval "local deps=\"\${${var}_deps}\""
if [ -n "$deps" ] && [ "$sfx" = "vcproj" ]; then
echo "${indent}ProjectSection(ProjectDependencies) = postProject"
indent_push
for dep in $deps; do
eval "local dep_guid=\${${dep}_guid}"
[ -z "${dep_guid}" ] && die "Unknown GUID for $dep (dependency of $var)"
echo "${indent}$dep_guid = $dep_guid"
done
indent_pop
echo "${indent}EndProjectSection"
fi
indent_pop
echo "EndProject"
}
@ -191,11 +162,7 @@ process_makefile() {
IFS=$'\r'$'\n'
local TAB=$'\t'
cat <<EOF
ifeq (\$(CONFIG_VS_VERSION),7)
MSBUILD_TOOL := devenv.com
else
MSBUILD_TOOL := msbuild.exe
endif
found_devenv := \$(shell which \$(MSBUILD_TOOL) >/dev/null 2>&1 && echo yes)
.nodevenv.once:
${TAB}@echo " * \$(MSBUILD_TOOL) not found in path."
@ -204,7 +171,7 @@ ${TAB}@echo " * You will have to build all configurations manually using the"
${TAB}@echo " * Visual Studio IDE. To allow make to build them automatically,"
${TAB}@echo " * add the Common7/IDE directory of your Visual Studio"
${TAB}@echo " * installation to your path, eg:"
${TAB}@echo " * C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"
${TAB}@echo " * C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE"
${TAB}@echo " * "
${TAB}@touch \$@
CLEAN-OBJS += \$(if \$(found_devenv),,.nodevenv.once)
@ -221,16 +188,9 @@ clean::
${TAB}rm -rf "$platform"/"$config"
.PHONY: $nows_sln_config
ifneq (\$(found_devenv),)
ifeq (\$(CONFIG_VS_VERSION),7)
$nows_sln_config: $outfile
${TAB}\$(MSBUILD_TOOL) $outfile -build "$config"
else
$nows_sln_config: $outfile
${TAB}\$(MSBUILD_TOOL) $outfile -m -t:Build \\
${TAB}${TAB}-p:Configuration="$config" -p:Platform="$platform"
endif
else
$nows_sln_config: $outfile .nodevenv.once
${TAB}@echo " * Skipping build of $sln_config (\$(MSBUILD_TOOL) not in path)."
@ -255,23 +215,12 @@ for opt in "$@"; do
;;
--ver=*) vs_ver="$optval"
case $optval in
[789]|10|11|12|14)
10|11|12|14)
;;
*) die Unrecognized Visual Studio Version in $opt
;;
esac
;;
--ver=*) vs_ver="$optval"
case $optval in
7) sln_vers="8.00"
sln_vers_str="Visual Studio .NET 2003"
;;
[89])
;;
*) die "Unrecognized Visual Studio Version '$optval' in $opt"
;;
esac
;;
--target=*) target="${optval}"
;;
-*) die_unknown $opt
@ -281,16 +230,7 @@ for opt in "$@"; do
done
outfile=${outfile:-/dev/stdout}
mkoutfile=${mkoutfile:-/dev/stdout}
case "${vs_ver:-8}" in
7) sln_vers="8.00"
sln_vers_str="Visual Studio .NET 2003"
;;
8) sln_vers="9.00"
sln_vers_str="Visual Studio 2005"
;;
9) sln_vers="10.00"
sln_vers_str="Visual Studio 2008"
;;
case "${vs_ver:-10}" in
10) sln_vers="11.00"
sln_vers_str="Visual Studio 2010"
;;
@ -304,14 +244,7 @@ case "${vs_ver:-8}" in
sln_vers_str="Visual Studio 2015"
;;
esac
case "${vs_ver:-8}" in
[789])
sfx=vcproj
;;
10|11|12|14)
sfx=vcxproj
;;
esac
sfx=vcxproj
for f in "${file_list[@]}"; do
parse_project $f

View File

@ -320,14 +320,7 @@ EOF
print <<EOF;
#if HAVE_DSPR2
void vpx_dsputil_static_init();
#if CONFIG_VP8
void dsputil_static_init();
#endif
vpx_dsputil_static_init();
#if CONFIG_VP8
dsputil_static_init();
#endif
#endif
}
#endif

61
configure vendored
View File

@ -34,12 +34,10 @@ Advanced options:
${toggle_codec_srcs} in/exclude codec library source code
${toggle_debug_libs} in/exclude debug version of libraries
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
${toggle_vpx_highbitdepth} use VPX high bit depth (10/12) profiles
${toggle_better_hw_compatibility}
enable encoder to produce streams with better
hardware decoder compatibility
${toggle_vp8} VP8 codec support
${toggle_vp9} VP9 codec support
${toggle_vp10} VP10 codec support
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
${toggle_postproc} postprocessing
@ -98,11 +96,11 @@ EOF
# all_platforms is a list of all supported target platforms. Maintain
# alphabetically by architecture, generic-gnu last.
all_platforms="${all_platforms} arm64-darwin-gcc"
all_platforms="${all_platforms} arm64-linux-gcc"
all_platforms="${all_platforms} armv6-linux-rvct"
all_platforms="${all_platforms} armv6-linux-gcc"
all_platforms="${all_platforms} armv6-none-rvct"
all_platforms="${all_platforms} arm64-darwin-gcc"
all_platforms="${all_platforms} arm64-linux-gcc"
all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
@ -112,6 +110,7 @@ all_platforms="${all_platforms} armv7-win32-vs11"
all_platforms="${all_platforms} armv7-win32-vs12"
all_platforms="${all_platforms} armv7-win32-vs14"
all_platforms="${all_platforms} armv7s-darwin-gcc"
all_platforms="${all_platforms} armv8-linux-gcc"
all_platforms="${all_platforms} mips32-linux-gcc"
all_platforms="${all_platforms} mips64-linux-gcc"
all_platforms="${all_platforms} sparc-solaris-gcc"
@ -132,9 +131,6 @@ all_platforms="${all_platforms} x86-linux-icc"
all_platforms="${all_platforms} x86-os2-gcc"
all_platforms="${all_platforms} x86-solaris-gcc"
all_platforms="${all_platforms} x86-win32-gcc"
all_platforms="${all_platforms} x86-win32-vs7"
all_platforms="${all_platforms} x86-win32-vs8"
all_platforms="${all_platforms} x86-win32-vs9"
all_platforms="${all_platforms} x86-win32-vs10"
all_platforms="${all_platforms} x86-win32-vs11"
all_platforms="${all_platforms} x86-win32-vs12"
@ -152,8 +148,6 @@ all_platforms="${all_platforms} x86_64-linux-gcc"
all_platforms="${all_platforms} x86_64-linux-icc"
all_platforms="${all_platforms} x86_64-solaris-gcc"
all_platforms="${all_platforms} x86_64-win64-gcc"
all_platforms="${all_platforms} x86_64-win64-vs8"
all_platforms="${all_platforms} x86_64-win64-vs9"
all_platforms="${all_platforms} x86_64-win64-vs10"
all_platforms="${all_platforms} x86_64-win64-vs11"
all_platforms="${all_platforms} x86_64-win64-vs12"
@ -195,13 +189,8 @@ if [ ${doxy_major:-0} -ge 1 ]; then
fi
# disable codecs when their source directory does not exist
[ -d "${source_path}/vp8" ] || disable_codec vp8
[ -d "${source_path}/vp9" ] || disable_codec vp9
[ -d "${source_path}/vp10" ] || disable_codec vp10
# disable vp10 codec by default
disable_codec vp10
# install everything except the sources, by default. sources will have
# to be enabled when doing dist builds, since that's no longer a common
# case.
@ -218,16 +207,10 @@ enable_feature os_support
enable_feature temporal_denoising
CODECS="
vp8_encoder
vp8_decoder
vp9_encoder
vp9_decoder
vp10_encoder
vp10_decoder
"
CODEC_FAMILIES="
vp8
vp9
vp10
"
@ -270,7 +253,27 @@ EXPERIMENT_LIST="
spatial_svc
fp_mb_stats
emulate_hardware
misc_fixes
var_tx
rect_tx
ref_mv
dual_filter
ext_tx
ext_intra
ext_inter
ext_interp
ext_refs
global_motion
new_quant
supertx
ans
loop_restoration
ext_partition
ext_partition_types
ext_tile
obmc
warped_motion
entropy
bidir_pred
"
CONFIG_LIST="
dependency_tracking
@ -279,7 +282,6 @@ CONFIG_LIST="
install_bins
install_libs
install_srcs
use_x86inc
debug
gprof
gcov
@ -322,7 +324,7 @@ CONFIG_LIST="
temporal_denoising
vp9_temporal_denoising
coefficient_range_checking
vp9_highbitdepth
vpx_highbitdepth
better_hw_compatibility
experimental
size_limit
@ -341,7 +343,6 @@ CMDLINE_SELECT="
gprof
gcov
pic
use_x86inc
optimizations
ccache
runtime_cpu_detect
@ -383,7 +384,7 @@ CMDLINE_SELECT="
vp9_temporal_denoising
coefficient_range_checking
better_hw_compatibility
vp9_highbitdepth
vpx_highbitdepth
experimental
"
@ -653,17 +654,9 @@ process_toolchain() {
vs*) enable_feature msvs
enable_feature solution
vs_version=${tgt_cc##vs}
case $vs_version in
[789])
VCPROJ_SFX=vcproj
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_proj.sh
;;
10|11|12|14)
VCPROJ_SFX=vcxproj
gen_vcproj_cmd=${source_path}/build/make/gen_msvs_vcxproj.sh
enabled werror && gen_vcproj_cmd="${gen_vcproj_cmd} --enable-werror"
;;
esac
all_targets="${all_targets} solution"
INLINE="__forceinline"
;;

View File

@ -108,22 +108,6 @@ ifeq ($(CONFIG_WEBM_IO),yes)
endif
vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
vpxenc.DESCRIPTION = Full featured encoder
ifeq ($(CONFIG_SPATIAL_SVC),yes)
EXAMPLES-$(CONFIG_VP9_ENCODER) += vp9_spatial_svc_encoder.c
vp9_spatial_svc_encoder.SRCS += args.c args.h
vp9_spatial_svc_encoder.SRCS += ivfenc.c ivfenc.h
vp9_spatial_svc_encoder.SRCS += tools_common.c tools_common.h
vp9_spatial_svc_encoder.SRCS += video_common.h
vp9_spatial_svc_encoder.SRCS += video_writer.h video_writer.c
vp9_spatial_svc_encoder.SRCS += vpx_ports/msvc.h
vp9_spatial_svc_encoder.SRCS += vpxstats.c vpxstats.h
vp9_spatial_svc_encoder.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
vp9_spatial_svc_encoder.DESCRIPTION = VP9 Spatial SVC Encoder
endif
ifneq ($(CONFIG_SHARED),yes)
EXAMPLES-$(CONFIG_VP9_ENCODER) += resize_util.c
endif
EXAMPLES-$(CONFIG_ENCODERS) += vpx_temporal_svc_encoder.c
vpx_temporal_svc_encoder.SRCS += ivfenc.c ivfenc.h
@ -143,16 +127,6 @@ simple_decoder.SRCS += vpx_ports/mem_ops.h
simple_decoder.SRCS += vpx_ports/mem_ops_aligned.h
simple_decoder.SRCS += vpx_ports/msvc.h
simple_decoder.DESCRIPTION = Simplified decoder loop
EXAMPLES-$(CONFIG_DECODERS) += postproc.c
postproc.SRCS += ivfdec.h ivfdec.c
postproc.SRCS += tools_common.h tools_common.c
postproc.SRCS += video_common.h
postproc.SRCS += video_reader.h video_reader.c
postproc.SRCS += vpx_ports/mem_ops.h
postproc.SRCS += vpx_ports/mem_ops_aligned.h
postproc.SRCS += vpx_ports/msvc.h
postproc.GUID = 65E33355-F35E-4088-884D-3FD4905881D7
postproc.DESCRIPTION = Decoder postprocessor control
EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
decode_to_md5.SRCS += md5_utils.h md5_utils.c
decode_to_md5.SRCS += ivfdec.h ivfdec.c
@ -172,14 +146,14 @@ simple_encoder.SRCS += video_writer.h video_writer.c
simple_encoder.SRCS += vpx_ports/msvc.h
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
simple_encoder.DESCRIPTION = Simplified encoder loop
EXAMPLES-$(CONFIG_VP9_ENCODER) += vp9_lossless_encoder.c
vp9_lossless_encoder.SRCS += ivfenc.h ivfenc.c
vp9_lossless_encoder.SRCS += tools_common.h tools_common.c
vp9_lossless_encoder.SRCS += video_common.h
vp9_lossless_encoder.SRCS += video_writer.h video_writer.c
vp9_lossless_encoder.SRCS += vpx_ports/msvc.h
vp9_lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366
vp9_lossless_encoder.DESCRIPTION = Simplified lossless VP9 encoder
EXAMPLES-$(CONFIG_VP10_ENCODER) += lossless_encoder.c
lossless_encoder.SRCS += ivfenc.h ivfenc.c
lossless_encoder.SRCS += tools_common.h tools_common.c
lossless_encoder.SRCS += video_common.h
lossless_encoder.SRCS += video_writer.h video_writer.c
lossless_encoder.SRCS += vpx_ports/msvc.h
lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366
lossless_encoder.DESCRIPTION = Simplified lossless encoder
EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
twopass_encoder.SRCS += ivfenc.h ivfenc.c
twopass_encoder.SRCS += tools_common.h tools_common.c
@ -206,40 +180,30 @@ set_maps.SRCS += video_writer.h video_writer.c
set_maps.SRCS += vpx_ports/msvc.h
set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
set_maps.DESCRIPTION = Set active and ROI maps
EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8cx_set_ref.c
vp8cx_set_ref.SRCS += ivfenc.h ivfenc.c
vp8cx_set_ref.SRCS += tools_common.h tools_common.c
vp8cx_set_ref.SRCS += video_common.h
vp8cx_set_ref.SRCS += video_writer.h video_writer.c
vp8cx_set_ref.SRCS += vpx_ports/msvc.h
vp8cx_set_ref.GUID = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A
vp8cx_set_ref.DESCRIPTION = VP8 set encoder reference frame
ifeq ($(CONFIG_MULTI_RES_ENCODING),yes)
ifeq ($(CONFIG_LIBYUV),yes)
EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8_multi_resolution_encoder.c
vp8_multi_resolution_encoder.SRCS += ivfenc.h ivfenc.c
vp8_multi_resolution_encoder.SRCS += tools_common.h tools_common.c
vp8_multi_resolution_encoder.SRCS += video_writer.h video_writer.c
vp8_multi_resolution_encoder.SRCS += vpx_ports/msvc.h
vp8_multi_resolution_encoder.SRCS += $(LIBYUV_SRCS)
vp8_multi_resolution_encoder.GUID = 04f8738e-63c8-423b-90fa-7c2703a374de
vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
ifeq ($(CONFIG_VP10_ENCODER), yes)
ifeq ($(CONFIG_DECODERS),yes)
EXAMPLES-yes += vpxcx_set_ref.c
vpxcx_set_ref.SRCS += ivfenc.h ivfenc.c
vpxcx_set_ref.SRCS += tools_common.h tools_common.c
vpxcx_set_ref.SRCS += video_common.h
vpxcx_set_ref.SRCS += video_writer.h video_writer.c
vpxcx_set_ref.GUID = 65D7F14A-2EE6-4293-B958-AB5107A03B55
vpxcx_set_ref.DESCRIPTION = VP10 set encoder reference frame
endif
endif
# Handle extra library flags depending on codec configuration
# We should not link to math library (libm) on RVCT
# when building for bare-metal targets
ifeq ($(CONFIG_OS_SUPPORT), yes)
CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m
CODEC_EXTRA_LIBS-$(CONFIG_VP9) += m
CODEC_EXTRA_LIBS-$(CONFIG_VP10) += m
else
ifeq ($(CONFIG_GCC), yes)
CODEC_EXTRA_LIBS-$(CONFIG_VP8) += m
CODEC_EXTRA_LIBS-$(CONFIG_VP9) += m
CODEC_EXTRA_LIBS-$(CONFIG_VP10) += m
endif
endif
#
@ -256,10 +220,8 @@ ifeq ($(HAVE_ALT_TREE_LAYOUT),yes)
INC_PATH-yes := $(SRC_PATH_BARE)/../include
else
LIB_PATH-yes += $(if $(BUILD_PFX),$(BUILD_PFX),.)
INC_PATH-$(CONFIG_VP8_DECODER) += $(SRC_PATH_BARE)/vp8
INC_PATH-$(CONFIG_VP8_ENCODER) += $(SRC_PATH_BARE)/vp8
INC_PATH-$(CONFIG_VP9_DECODER) += $(SRC_PATH_BARE)/vp9
INC_PATH-$(CONFIG_VP9_ENCODER) += $(SRC_PATH_BARE)/vp9
INC_PATH-$(CONFIG_VP10_DECODER) += $(SRC_PATH_BARE)/vp10
INC_PATH-$(CONFIG_VP10_ENCODER) += $(SRC_PATH_BARE)/vp10
endif
INC_PATH-$(CONFIG_LIBYUV) += $(SRC_PATH_BARE)/third_party/libyuv/include
LIB_PATH := $(call enabled,LIB_PATH)

View File

@ -21,7 +21,7 @@
static const char *exec_name;
void usage_exit(void) {
fprintf(stderr, "vp9_lossless_encoder: Example demonstrating VP9 lossless "
fprintf(stderr, "lossless_encoder: Example demonstrating lossless "
"encoding feature. Supports raw input only.\n");
fprintf(stderr, "Usage: %s <width> <height> <infile> <outfile>\n", exec_name);
exit(EXIT_FAILURE);

View File

@ -1,138 +0,0 @@
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// Postprocessing Decoder
// ======================
//
// This example adds postprocessing to the simple decoder loop.
//
// Initializing Postprocessing
// ---------------------------
// You must inform the codec that you might request postprocessing at
// initialization time. This is done by passing the VPX_CODEC_USE_POSTPROC
// flag to `vpx_codec_dec_init`. If the codec does not support
// postprocessing, this call will return VPX_CODEC_INCAPABLE. For
// demonstration purposes, we also fall back to default initialization if
// the codec does not provide support.
//
// Using Adaptive Postprocessing
// -----------------------------
// VP6 provides "adaptive postprocessing." It will automatically select the
// best postprocessing filter on a frame by frame basis based on the amount
// of time remaining before the user's specified deadline expires. The
// special value 0 indicates that the codec should take as long as
// necessary to provide the best quality frame. This example gives the
// codec 15ms (15000us) to return a frame. Remember that this is a soft
// deadline, and the codec may exceed it doing its regular processing. In
// these cases, no additional postprocessing will be done.
//
// Codec Specific Postprocessing Controls
// --------------------------------------
// Some codecs provide fine grained controls over their built-in
// postprocessors. VP8 is one example. The following sample code toggles
// postprocessing on and off every 15 frames.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vpx/vp8dx.h"
#include "vpx/vpx_decoder.h"
#include "../tools_common.h"
#include "../video_reader.h"
#include "./vpx_config.h"
static const char *exec_name;
void usage_exit(void) {
fprintf(stderr, "Usage: %s <infile> <outfile>\n", exec_name);
exit(EXIT_FAILURE);
}
int main(int argc, char **argv) {
int frame_cnt = 0;
FILE *outfile = NULL;
vpx_codec_ctx_t codec;
vpx_codec_err_t res;
VpxVideoReader *reader = NULL;
const VpxInterface *decoder = NULL;
const VpxVideoInfo *info = NULL;
exec_name = argv[0];
if (argc != 3)
die("Invalid number of arguments.");
reader = vpx_video_reader_open(argv[1]);
if (!reader)
die("Failed to open %s for reading.", argv[1]);
if (!(outfile = fopen(argv[2], "wb")))
die("Failed to open %s for writing", argv[2]);
info = vpx_video_reader_get_info(reader);
decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc);
if (!decoder)
die("Unknown input codec.");
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
res = vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL,
VPX_CODEC_USE_POSTPROC);
if (res == VPX_CODEC_INCAPABLE)
die_codec(&codec, "Postproc not supported by this decoder.");
if (res)
die_codec(&codec, "Failed to initialize decoder.");
while (vpx_video_reader_read_frame(reader)) {
vpx_codec_iter_t iter = NULL;
vpx_image_t *img = NULL;
size_t frame_size = 0;
const unsigned char *frame = vpx_video_reader_get_frame(reader,
&frame_size);
++frame_cnt;
if (frame_cnt % 30 == 1) {
vp8_postproc_cfg_t pp = {0, 0, 0};
if (vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp))
die_codec(&codec, "Failed to turn off postproc.");
} else if (frame_cnt % 30 == 16) {
vp8_postproc_cfg_t pp = {VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE,
4, 0};
if (vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp))
die_codec(&codec, "Failed to turn on postproc.");
};
// Decode the frame with 15ms deadline
if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 15000))
die_codec(&codec, "Failed to decode frame");
while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) {
vpx_img_write(img, outfile);
}
}
printf("Processed %d frames.\n", frame_cnt);
if (vpx_codec_destroy(&codec))
die_codec(&codec, "Failed to destroy codec");
printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n",
info->frame_width, info->frame_height, argv[2]);
vpx_video_reader_close(reader);
fclose(outfile);
return EXIT_SUCCESS;
}

View File

@ -1,731 +0,0 @@
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/*
* This is an example demonstrating multi-resolution encoding in VP8.
* High-resolution input video is down-sampled to lower-resolutions. The
* encoder then encodes the video and outputs multiple bitstreams with
* different resolutions.
*
* This test also allows for settings temporal layers for each spatial layer.
* Different number of temporal layers per spatial stream may be used.
* Currently up to 3 temporal layers per spatial stream (encoder) are supported
* in this test.
*/
#include "./vpx_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <sys/time.h>
#include "vpx_ports/vpx_timer.h"
#include "vpx/vpx_encoder.h"
#include "vpx/vp8cx.h"
#include "vpx_ports/mem_ops.h"
#include "../tools_common.h"
#define interface (vpx_codec_vp8_cx())
#define fourcc 0x30385056
void usage_exit(void) {
exit(EXIT_FAILURE);
}
/*
* The input video frame is downsampled several times to generate a multi-level
* hierarchical structure. NUM_ENCODERS is defined as the number of encoding
* levels required. For example, if the size of input video is 1280x720,
* NUM_ENCODERS is 3, and down-sampling factor is 2, the encoder outputs 3
* bitstreams with resolution of 1280x720(level 0), 640x360(level 1), and
* 320x180(level 2) respectively.
*/
/* Number of encoders (spatial resolutions) used in this test. */
#define NUM_ENCODERS 3
/* Maximum number of temporal layers allowed for this test. */
#define MAX_NUM_TEMPORAL_LAYERS 3
/* This example uses the scaler function in libyuv. */
#include "third_party/libyuv/include/libyuv/basic_types.h"
#include "third_party/libyuv/include/libyuv/scale.h"
#include "third_party/libyuv/include/libyuv/cpu_id.h"
int (*read_frame_p)(FILE *f, vpx_image_t *img);
static int read_frame(FILE *f, vpx_image_t *img) {
size_t nbytes, to_read;
int res = 1;
to_read = img->w*img->h*3/2;
nbytes = fread(img->planes[0], 1, to_read, f);
if(nbytes != to_read) {
res = 0;
if(nbytes > 0)
printf("Warning: Read partial frame. Check your width & height!\n");
}
return res;
}
static int read_frame_by_row(FILE *f, vpx_image_t *img) {
size_t nbytes, to_read;
int res = 1;
int plane;
for (plane = 0; plane < 3; plane++)
{
unsigned char *ptr;
int w = (plane ? (1 + img->d_w) / 2 : img->d_w);
int h = (plane ? (1 + img->d_h) / 2 : img->d_h);
int r;
/* Determine the correct plane based on the image format. The for-loop
* always counts in Y,U,V order, but this may not match the order of
* the data on disk.
*/
switch (plane)
{
case 1:
ptr = img->planes[img->fmt==VPX_IMG_FMT_YV12? VPX_PLANE_V : VPX_PLANE_U];
break;
case 2:
ptr = img->planes[img->fmt==VPX_IMG_FMT_YV12?VPX_PLANE_U : VPX_PLANE_V];
break;
default:
ptr = img->planes[plane];
}
for (r = 0; r < h; r++)
{
to_read = w;
nbytes = fread(ptr, 1, to_read, f);
if(nbytes != to_read) {
res = 0;
if(nbytes > 0)
printf("Warning: Read partial frame. Check your width & height!\n");
break;
}
ptr += img->stride[plane];
}
if (!res)
break;
}
return res;
}
static void write_ivf_file_header(FILE *outfile,
const vpx_codec_enc_cfg_t *cfg,
int frame_cnt) {
char header[32];
if(cfg->g_pass != VPX_RC_ONE_PASS && cfg->g_pass != VPX_RC_LAST_PASS)
return;
header[0] = 'D';
header[1] = 'K';
header[2] = 'I';
header[3] = 'F';
mem_put_le16(header+4, 0); /* version */
mem_put_le16(header+6, 32); /* headersize */
mem_put_le32(header+8, fourcc); /* headersize */
mem_put_le16(header+12, cfg->g_w); /* width */
mem_put_le16(header+14, cfg->g_h); /* height */
mem_put_le32(header+16, cfg->g_timebase.den); /* rate */
mem_put_le32(header+20, cfg->g_timebase.num); /* scale */
mem_put_le32(header+24, frame_cnt); /* length */
mem_put_le32(header+28, 0); /* unused */
(void) fwrite(header, 1, 32, outfile);
}
static void write_ivf_frame_header(FILE *outfile,
const vpx_codec_cx_pkt_t *pkt)
{
char header[12];
vpx_codec_pts_t pts;
if(pkt->kind != VPX_CODEC_CX_FRAME_PKT)
return;
pts = pkt->data.frame.pts;
mem_put_le32(header, pkt->data.frame.sz);
mem_put_le32(header+4, pts&0xFFFFFFFF);
mem_put_le32(header+8, pts >> 32);
(void) fwrite(header, 1, 12, outfile);
}
/* Temporal scaling parameters */
/* This sets all the temporal layer parameters given |num_temporal_layers|,
* including the target bit allocation across temporal layers. Bit allocation
* parameters will be passed in as user parameters in another version.
*/
static void set_temporal_layer_pattern(int num_temporal_layers,
vpx_codec_enc_cfg_t *cfg,
int bitrate,
int *layer_flags)
{
assert(num_temporal_layers <= MAX_NUM_TEMPORAL_LAYERS);
switch (num_temporal_layers)
{
case 1:
{
/* 1-layer */
cfg->ts_number_layers = 1;
cfg->ts_periodicity = 1;
cfg->ts_rate_decimator[0] = 1;
cfg->ts_layer_id[0] = 0;
cfg->ts_target_bitrate[0] = bitrate;
// Update L only.
layer_flags[0] = VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF;
break;
}
case 2:
{
/* 2-layers, with sync point at first frame of layer 1. */
cfg->ts_number_layers = 2;
cfg->ts_periodicity = 2;
cfg->ts_rate_decimator[0] = 2;
cfg->ts_rate_decimator[1] = 1;
cfg->ts_layer_id[0] = 0;
cfg->ts_layer_id[1] = 1;
// Use 60/40 bit allocation as example.
cfg->ts_target_bitrate[0] = 0.6f * bitrate;
cfg->ts_target_bitrate[1] = bitrate;
/* 0=L, 1=GF */
// ARF is used as predictor for all frames, and is only updated on
// key frame. Sync point every 8 frames.
// Layer 0: predict from L and ARF, update L and G.
layer_flags[0] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_UPD_ARF;
// Layer 1: sync point: predict from L and ARF, and update G.
layer_flags[1] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_UPD_LAST |
VP8_EFLAG_NO_UPD_ARF;
// Layer 0, predict from L and ARF, update L.
layer_flags[2] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
// Layer 1: predict from L, G and ARF, and update G.
layer_flags[3] = VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_UPD_LAST |
VP8_EFLAG_NO_UPD_ENTROPY;
// Layer 0
layer_flags[4] = layer_flags[2];
// Layer 1
layer_flags[5] = layer_flags[3];
// Layer 0
layer_flags[6] = layer_flags[4];
// Layer 1
layer_flags[7] = layer_flags[5];
break;
}
case 3:
default:
{
// 3-layers structure where ARF is used as predictor for all frames,
// and is only updated on key frame.
// Sync points for layer 1 and 2 every 8 frames.
cfg->ts_number_layers = 3;
cfg->ts_periodicity = 4;
cfg->ts_rate_decimator[0] = 4;
cfg->ts_rate_decimator[1] = 2;
cfg->ts_rate_decimator[2] = 1;
cfg->ts_layer_id[0] = 0;
cfg->ts_layer_id[1] = 2;
cfg->ts_layer_id[2] = 1;
cfg->ts_layer_id[3] = 2;
// Use 40/20/40 bit allocation as example.
cfg->ts_target_bitrate[0] = 0.4f * bitrate;
cfg->ts_target_bitrate[1] = 0.6f * bitrate;
cfg->ts_target_bitrate[2] = bitrate;
/* 0=L, 1=GF, 2=ARF */
// Layer 0: predict from L and ARF; update L and G.
layer_flags[0] = VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_REF_GF;
// Layer 2: sync point: predict from L and ARF; update none.
layer_flags[1] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_UPD_LAST |
VP8_EFLAG_NO_UPD_ENTROPY;
// Layer 1: sync point: predict from L and ARF; update G.
layer_flags[2] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_UPD_LAST;
// Layer 2: predict from L, G, ARF; update none.
layer_flags[3] = VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_UPD_LAST |
VP8_EFLAG_NO_UPD_ENTROPY;
// Layer 0: predict from L and ARF; update L.
layer_flags[4] = VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_REF_GF;
// Layer 2: predict from L, G, ARF; update none.
layer_flags[5] = layer_flags[3];
// Layer 1: predict from L, G, ARF; update G.
layer_flags[6] = VP8_EFLAG_NO_UPD_ARF |
VP8_EFLAG_NO_UPD_LAST;
// Layer 2: predict from L, G, ARF; update none.
layer_flags[7] = layer_flags[3];
break;
}
}
}
/* The periodicity of the pattern given the number of temporal layers. */
static int periodicity_to_num_layers[MAX_NUM_TEMPORAL_LAYERS] = {1, 8, 8};
int main(int argc, char **argv)
{
FILE *infile, *outfile[NUM_ENCODERS];
FILE *downsampled_input[NUM_ENCODERS - 1];
char filename[50];
vpx_codec_ctx_t codec[NUM_ENCODERS];
vpx_codec_enc_cfg_t cfg[NUM_ENCODERS];
int frame_cnt = 0;
vpx_image_t raw[NUM_ENCODERS];
vpx_codec_err_t res[NUM_ENCODERS];
int i;
long width;
long height;
int length_frame;
int frame_avail;
int got_data;
int flags = 0;
int layer_id = 0;
int layer_flags[VPX_TS_MAX_PERIODICITY * NUM_ENCODERS]
= {0};
int flag_periodicity;
/*Currently, only realtime mode is supported in multi-resolution encoding.*/
int arg_deadline = VPX_DL_REALTIME;
/* Set show_psnr to 1/0 to show/not show PSNR. Choose show_psnr=0 if you
don't need to know PSNR, which will skip PSNR calculation and save
encoding time. */
int show_psnr = 0;
int key_frame_insert = 0;
uint64_t psnr_sse_total[NUM_ENCODERS] = {0};
uint64_t psnr_samples_total[NUM_ENCODERS] = {0};
double psnr_totals[NUM_ENCODERS][4] = {{0,0}};
int psnr_count[NUM_ENCODERS] = {0};
int64_t cx_time = 0;
/* Set the required target bitrates for each resolution level.
* If target bitrate for highest-resolution level is set to 0,
* (i.e. target_bitrate[0]=0), we skip encoding at that level.
*/
unsigned int target_bitrate[NUM_ENCODERS]={1000, 500, 100};
/* Enter the frame rate of the input video */
int framerate = 30;
/* Set down-sampling factor for each resolution level.
dsf[0] controls down sampling from level 0 to level 1;
dsf[1] controls down sampling from level 1 to level 2;
dsf[2] is not used. */
vpx_rational_t dsf[NUM_ENCODERS] = {{2, 1}, {2, 1}, {1, 1}};
/* Set the number of temporal layers for each encoder/resolution level,
* starting from highest resoln down to lowest resoln. */
unsigned int num_temporal_layers[NUM_ENCODERS] = {3, 3, 3};
if(argc!= (7 + 3 * NUM_ENCODERS))
die("Usage: %s <width> <height> <frame_rate> <infile> <outfile(s)> "
"<rate_encoder(s)> <temporal_layer(s)> <key_frame_insert> <output psnr?> \n",
argv[0]);
printf("Using %s\n",vpx_codec_iface_name(interface));
width = strtol(argv[1], NULL, 0);
height = strtol(argv[2], NULL, 0);
framerate = strtol(argv[3], NULL, 0);
if(width < 16 || width%2 || height <16 || height%2)
die("Invalid resolution: %ldx%ld", width, height);
/* Open input video file for encoding */
if(!(infile = fopen(argv[4], "rb")))
die("Failed to open %s for reading", argv[4]);
/* Open output file for each encoder to output bitstreams */
for (i=0; i< NUM_ENCODERS; i++)
{
if(!target_bitrate[i])
{
outfile[i] = NULL;
continue;
}
if(!(outfile[i] = fopen(argv[i+5], "wb")))
die("Failed to open %s for writing", argv[i+4]);
}
// Bitrates per spatial layer: overwrite default rates above.
for (i=0; i< NUM_ENCODERS; i++)
{
target_bitrate[i] = strtol(argv[NUM_ENCODERS + 5 + i], NULL, 0);
}
// Temporal layers per spatial layers: overwrite default settings above.
for (i=0; i< NUM_ENCODERS; i++)
{
num_temporal_layers[i] = strtol(argv[2 * NUM_ENCODERS + 5 + i], NULL, 0);
if (num_temporal_layers[i] < 1 || num_temporal_layers[i] > 3)
die("Invalid temporal layers: %d, Must be 1, 2, or 3. \n",
num_temporal_layers);
}
/* Open file to write out each spatially downsampled input stream. */
for (i=0; i< NUM_ENCODERS - 1; i++)
{
// Highest resoln is encoder 0.
if (sprintf(filename,"ds%d.yuv",NUM_ENCODERS - i) < 0)
{
return EXIT_FAILURE;
}
downsampled_input[i] = fopen(filename,"wb");
}
key_frame_insert = strtol(argv[3 * NUM_ENCODERS + 5], NULL, 0);
show_psnr = strtol(argv[3 * NUM_ENCODERS + 6], NULL, 0);
/* Populate default encoder configuration */
for (i=0; i< NUM_ENCODERS; i++)
{
res[i] = vpx_codec_enc_config_default(interface, &cfg[i], 0);
if(res[i]) {
printf("Failed to get config: %s\n", vpx_codec_err_to_string(res[i]));
return EXIT_FAILURE;
}
}
/*
* Update the default configuration according to needs of the application.
*/
/* Highest-resolution encoder settings */
cfg[0].g_w = width;
cfg[0].g_h = height;
cfg[0].rc_dropframe_thresh = 0;
cfg[0].rc_end_usage = VPX_CBR;
cfg[0].rc_resize_allowed = 0;
cfg[0].rc_min_quantizer = 2;
cfg[0].rc_max_quantizer = 56;
cfg[0].rc_undershoot_pct = 100;
cfg[0].rc_overshoot_pct = 15;
cfg[0].rc_buf_initial_sz = 500;
cfg[0].rc_buf_optimal_sz = 600;
cfg[0].rc_buf_sz = 1000;
cfg[0].g_error_resilient = 1; /* Enable error resilient mode */
cfg[0].g_lag_in_frames = 0;
/* Disable automatic keyframe placement */
/* Note: These 3 settings are copied to all levels. But, except the lowest
* resolution level, all other levels are set to VPX_KF_DISABLED internally.
*/
cfg[0].kf_mode = VPX_KF_AUTO;
cfg[0].kf_min_dist = 3000;
cfg[0].kf_max_dist = 3000;
cfg[0].rc_target_bitrate = target_bitrate[0]; /* Set target bitrate */
cfg[0].g_timebase.num = 1; /* Set fps */
cfg[0].g_timebase.den = framerate;
/* Other-resolution encoder settings */
for (i=1; i< NUM_ENCODERS; i++)
{
memcpy(&cfg[i], &cfg[0], sizeof(vpx_codec_enc_cfg_t));
cfg[i].rc_target_bitrate = target_bitrate[i];
/* Note: Width & height of other-resolution encoders are calculated
* from the highest-resolution encoder's size and the corresponding
* down_sampling_factor.
*/
{
unsigned int iw = cfg[i-1].g_w*dsf[i-1].den + dsf[i-1].num - 1;
unsigned int ih = cfg[i-1].g_h*dsf[i-1].den + dsf[i-1].num - 1;
cfg[i].g_w = iw/dsf[i-1].num;
cfg[i].g_h = ih/dsf[i-1].num;
}
/* Make width & height to be multiplier of 2. */
// Should support odd size ???
if((cfg[i].g_w)%2)cfg[i].g_w++;
if((cfg[i].g_h)%2)cfg[i].g_h++;
}
// Set the number of threads per encode/spatial layer.
// (1, 1, 1) means no encoder threading.
cfg[0].g_threads = 2;
cfg[1].g_threads = 1;
cfg[2].g_threads = 1;
/* Allocate image for each encoder */
for (i=0; i< NUM_ENCODERS; i++)
if(!vpx_img_alloc(&raw[i], VPX_IMG_FMT_I420, cfg[i].g_w, cfg[i].g_h, 32))
die("Failed to allocate image", cfg[i].g_w, cfg[i].g_h);
if (raw[0].stride[VPX_PLANE_Y] == raw[0].d_w)
read_frame_p = read_frame;
else
read_frame_p = read_frame_by_row;
for (i=0; i< NUM_ENCODERS; i++)
if(outfile[i])
write_ivf_file_header(outfile[i], &cfg[i], 0);
/* Temporal layers settings */
for ( i=0; i<NUM_ENCODERS; i++)
{
set_temporal_layer_pattern(num_temporal_layers[i],
&cfg[i],
cfg[i].rc_target_bitrate,
&layer_flags[i * VPX_TS_MAX_PERIODICITY]);
}
/* Initialize multi-encoder */
if(vpx_codec_enc_init_multi(&codec[0], interface, &cfg[0], NUM_ENCODERS,
(show_psnr ? VPX_CODEC_USE_PSNR : 0), &dsf[0]))
die_codec(&codec[0], "Failed to initialize encoder");
/* The extra encoding configuration parameters can be set as follows. */
/* Set encoding speed */
for ( i=0; i<NUM_ENCODERS; i++)
{
int speed = -6;
/* Lower speed for the lowest resolution. */
if (i == NUM_ENCODERS - 1) speed = -4;
if(vpx_codec_control(&codec[i], VP8E_SET_CPUUSED, speed))
die_codec(&codec[i], "Failed to set cpu_used");
}
/* Set static threshold = 1 for all encoders */
for ( i=0; i<NUM_ENCODERS; i++)
{
if(vpx_codec_control(&codec[i], VP8E_SET_STATIC_THRESHOLD, 1))
die_codec(&codec[i], "Failed to set static threshold");
}
/* Set NOISE_SENSITIVITY to do TEMPORAL_DENOISING */
/* Enable denoising for the highest-resolution encoder. */
if(vpx_codec_control(&codec[0], VP8E_SET_NOISE_SENSITIVITY, 1))
die_codec(&codec[0], "Failed to set noise_sensitivity");
for ( i=1; i< NUM_ENCODERS; i++)
{
if(vpx_codec_control(&codec[i], VP8E_SET_NOISE_SENSITIVITY, 0))
die_codec(&codec[i], "Failed to set noise_sensitivity");
}
/* Set the number of token partitions */
for ( i=0; i<NUM_ENCODERS; i++)
{
if(vpx_codec_control(&codec[i], VP8E_SET_TOKEN_PARTITIONS, 1))
die_codec(&codec[i], "Failed to set static threshold");
}
/* Set the max intra target bitrate */
for ( i=0; i<NUM_ENCODERS; i++)
{
unsigned int max_intra_size_pct =
(int)(((double)cfg[0].rc_buf_optimal_sz * 0.5) * framerate / 10);
if(vpx_codec_control(&codec[i], VP8E_SET_MAX_INTRA_BITRATE_PCT,
max_intra_size_pct))
die_codec(&codec[i], "Failed to set static threshold");
//printf("%d %d \n",i,max_intra_size_pct);
}
frame_avail = 1;
got_data = 0;
while(frame_avail || got_data)
{
struct vpx_usec_timer timer;
vpx_codec_iter_t iter[NUM_ENCODERS]={NULL};
const vpx_codec_cx_pkt_t *pkt[NUM_ENCODERS];
flags = 0;
frame_avail = read_frame_p(infile, &raw[0]);
if(frame_avail)
{
for ( i=1; i<NUM_ENCODERS; i++)
{
/*Scale the image down a number of times by downsampling factor*/
/* FilterMode 1 or 2 give better psnr than FilterMode 0. */
I420Scale(raw[i-1].planes[VPX_PLANE_Y], raw[i-1].stride[VPX_PLANE_Y],
raw[i-1].planes[VPX_PLANE_U], raw[i-1].stride[VPX_PLANE_U],
raw[i-1].planes[VPX_PLANE_V], raw[i-1].stride[VPX_PLANE_V],
raw[i-1].d_w, raw[i-1].d_h,
raw[i].planes[VPX_PLANE_Y], raw[i].stride[VPX_PLANE_Y],
raw[i].planes[VPX_PLANE_U], raw[i].stride[VPX_PLANE_U],
raw[i].planes[VPX_PLANE_V], raw[i].stride[VPX_PLANE_V],
raw[i].d_w, raw[i].d_h, 1);
/* Write out down-sampled input. */
length_frame = cfg[i].g_w * cfg[i].g_h *3/2;
if (fwrite(raw[i].planes[0], 1, length_frame,
downsampled_input[NUM_ENCODERS - i - 1]) !=
length_frame)
{
return EXIT_FAILURE;
}
}
}
/* Set the flags (reference and update) for all the encoders.*/
for ( i=0; i<NUM_ENCODERS; i++)
{
layer_id = cfg[i].ts_layer_id[frame_cnt % cfg[i].ts_periodicity];
flags = 0;
flag_periodicity = periodicity_to_num_layers
[num_temporal_layers[i] - 1];
flags = layer_flags[i * VPX_TS_MAX_PERIODICITY +
frame_cnt % flag_periodicity];
// Key frame flag for first frame.
if (frame_cnt == 0)
{
flags |= VPX_EFLAG_FORCE_KF;
}
if (frame_cnt > 0 && frame_cnt == key_frame_insert)
{
flags = VPX_EFLAG_FORCE_KF;
}
vpx_codec_control(&codec[i], VP8E_SET_FRAME_FLAGS, flags);
vpx_codec_control(&codec[i], VP8E_SET_TEMPORAL_LAYER_ID, layer_id);
}
/* Encode each frame at multi-levels */
/* Note the flags must be set to 0 in the encode call if they are set
for each frame with the vpx_codec_control(), as done above. */
vpx_usec_timer_start(&timer);
if(vpx_codec_encode(&codec[0], frame_avail? &raw[0] : NULL,
frame_cnt, 1, 0, arg_deadline))
{
die_codec(&codec[0], "Failed to encode frame");
}
vpx_usec_timer_mark(&timer);
cx_time += vpx_usec_timer_elapsed(&timer);
for (i=NUM_ENCODERS-1; i>=0 ; i--)
{
got_data = 0;
while( (pkt[i] = vpx_codec_get_cx_data(&codec[i], &iter[i])) )
{
got_data = 1;
switch(pkt[i]->kind) {
case VPX_CODEC_CX_FRAME_PKT:
write_ivf_frame_header(outfile[i], pkt[i]);
(void) fwrite(pkt[i]->data.frame.buf, 1,
pkt[i]->data.frame.sz, outfile[i]);
break;
case VPX_CODEC_PSNR_PKT:
if (show_psnr)
{
int j;
psnr_sse_total[i] += pkt[i]->data.psnr.sse[0];
psnr_samples_total[i] += pkt[i]->data.psnr.samples[0];
for (j = 0; j < 4; j++)
{
psnr_totals[i][j] += pkt[i]->data.psnr.psnr[j];
}
psnr_count[i]++;
}
break;
default:
break;
}
printf(pkt[i]->kind == VPX_CODEC_CX_FRAME_PKT
&& (pkt[i]->data.frame.flags & VPX_FRAME_IS_KEY)? "K":"");
fflush(stdout);
}
}
frame_cnt++;
}
printf("\n");
printf("Frame cnt and encoding time/FPS stats for encoding: %d %f %f \n",
frame_cnt,
1000 * (float)cx_time / (double)(frame_cnt * 1000000),
1000000 * (double)frame_cnt / (double)cx_time);
fclose(infile);
printf("Processed %ld frames.\n",(long int)frame_cnt-1);
for (i=0; i< NUM_ENCODERS; i++)
{
/* Calculate PSNR and print it out */
if ( (show_psnr) && (psnr_count[i]>0) )
{
int j;
double ovpsnr = sse_to_psnr(psnr_samples_total[i], 255.0,
psnr_sse_total[i]);
fprintf(stderr, "\n ENC%d PSNR (Overall/Avg/Y/U/V)", i);
fprintf(stderr, " %.3lf", ovpsnr);
for (j = 0; j < 4; j++)
{
fprintf(stderr, " %.3lf", psnr_totals[i][j]/psnr_count[i]);
}
}
if(vpx_codec_destroy(&codec[i]))
die_codec(&codec[i], "Failed to destroy codec");
vpx_img_free(&raw[i]);
if(!outfile[i])
continue;
/* Try to rewrite the file header with the actual frame count */
if(!fseek(outfile[i], 0, SEEK_SET))
write_ivf_file_header(outfile[i], &cfg[i], frame_cnt-1);
fclose(outfile[i]);
}
printf("\n");
return EXIT_SUCCESS;
}

View File

@ -1,919 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/*
* This is an example demonstrating how to implement a multi-layer
* VP9 encoding scheme based on spatial scalability for video applications
* that benefit from a scalable bitstream.
*/
#include <math.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "../args.h"
#include "../tools_common.h"
#include "../video_writer.h"
#include "../vpx_ports/vpx_timer.h"
#include "vpx/svc_context.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
#include "../vpxstats.h"
#include "vp9/encoder/vp9_encoder.h"
#define OUTPUT_RC_STATS 1
static const arg_def_t skip_frames_arg =
ARG_DEF("s", "skip-frames", 1, "input frames to skip");
static const arg_def_t frames_arg =
ARG_DEF("f", "frames", 1, "number of frames to encode");
static const arg_def_t threads_arg =
ARG_DEF("th", "threads", 1, "number of threads to use");
#if OUTPUT_RC_STATS
static const arg_def_t output_rc_stats_arg =
ARG_DEF("rcstat", "output_rc_stats", 1, "output rc stats");
#endif
static const arg_def_t width_arg = ARG_DEF("w", "width", 1, "source width");
static const arg_def_t height_arg = ARG_DEF("h", "height", 1, "source height");
static const arg_def_t timebase_arg =
ARG_DEF("t", "timebase", 1, "timebase (num/den)");
static const arg_def_t bitrate_arg = ARG_DEF(
"b", "target-bitrate", 1, "encoding bitrate, in kilobits per second");
static const arg_def_t spatial_layers_arg =
ARG_DEF("sl", "spatial-layers", 1, "number of spatial SVC layers");
static const arg_def_t temporal_layers_arg =
ARG_DEF("tl", "temporal-layers", 1, "number of temporal SVC layers");
static const arg_def_t temporal_layering_mode_arg =
ARG_DEF("tlm", "temporal-layering-mode", 1, "temporal layering scheme."
"VP9E_TEMPORAL_LAYERING_MODE");
static const arg_def_t kf_dist_arg =
ARG_DEF("k", "kf-dist", 1, "number of frames between keyframes");
static const arg_def_t scale_factors_arg =
ARG_DEF("r", "scale-factors", 1, "scale factors (lowest to highest layer)");
static const arg_def_t passes_arg =
ARG_DEF("p", "passes", 1, "Number of passes (1/2)");
static const arg_def_t pass_arg =
ARG_DEF(NULL, "pass", 1, "Pass to execute (1/2)");
static const arg_def_t fpf_name_arg =
ARG_DEF(NULL, "fpf", 1, "First pass statistics file name");
static const arg_def_t min_q_arg =
ARG_DEF(NULL, "min-q", 1, "Minimum quantizer");
static const arg_def_t max_q_arg =
ARG_DEF(NULL, "max-q", 1, "Maximum quantizer");
static const arg_def_t min_bitrate_arg =
ARG_DEF(NULL, "min-bitrate", 1, "Minimum bitrate");
static const arg_def_t max_bitrate_arg =
ARG_DEF(NULL, "max-bitrate", 1, "Maximum bitrate");
static const arg_def_t lag_in_frame_arg =
ARG_DEF(NULL, "lag-in-frames", 1, "Number of frame to input before "
"generating any outputs");
static const arg_def_t rc_end_usage_arg =
ARG_DEF(NULL, "rc-end-usage", 1, "0 - 3: VBR, CBR, CQ, Q");
static const arg_def_t speed_arg =
ARG_DEF("sp", "speed", 1, "speed configuration");
static const arg_def_t aqmode_arg =
ARG_DEF("aq", "aqmode", 1, "aq-mode off/on");
#if CONFIG_VP9_HIGHBITDEPTH
static const struct arg_enum_list bitdepth_enum[] = {
{"8", VPX_BITS_8},
{"10", VPX_BITS_10},
{"12", VPX_BITS_12},
{NULL, 0}
};
static const arg_def_t bitdepth_arg =
ARG_DEF_ENUM("d", "bit-depth", 1, "Bit depth for codec 8, 10 or 12. ",
bitdepth_enum);
#endif // CONFIG_VP9_HIGHBITDEPTH
static const arg_def_t *svc_args[] = {
&frames_arg, &width_arg, &height_arg,
&timebase_arg, &bitrate_arg, &skip_frames_arg, &spatial_layers_arg,
&kf_dist_arg, &scale_factors_arg, &passes_arg, &pass_arg,
&fpf_name_arg, &min_q_arg, &max_q_arg, &min_bitrate_arg,
&max_bitrate_arg, &temporal_layers_arg, &temporal_layering_mode_arg,
&lag_in_frame_arg, &threads_arg, &aqmode_arg,
#if OUTPUT_RC_STATS
&output_rc_stats_arg,
#endif
#if CONFIG_VP9_HIGHBITDEPTH
&bitdepth_arg,
#endif
&speed_arg,
&rc_end_usage_arg, NULL
};
static const uint32_t default_frames_to_skip = 0;
static const uint32_t default_frames_to_code = 60 * 60;
static const uint32_t default_width = 1920;
static const uint32_t default_height = 1080;
static const uint32_t default_timebase_num = 1;
static const uint32_t default_timebase_den = 60;
static const uint32_t default_bitrate = 1000;
static const uint32_t default_spatial_layers = 5;
static const uint32_t default_temporal_layers = 1;
static const uint32_t default_kf_dist = 100;
static const uint32_t default_temporal_layering_mode = 0;
static const uint32_t default_output_rc_stats = 0;
static const int32_t default_speed = -1; // -1 means use library default.
static const uint32_t default_threads = 0; // zero means use library default.
typedef struct {
const char *input_filename;
const char *output_filename;
uint32_t frames_to_code;
uint32_t frames_to_skip;
struct VpxInputContext input_ctx;
stats_io_t rc_stats;
int passes;
int pass;
} AppInput;
static const char *exec_name;
void usage_exit(void) {
fprintf(stderr, "Usage: %s <options> input_filename output_filename\n",
exec_name);
fprintf(stderr, "Options:\n");
arg_show_usage(stderr, svc_args);
exit(EXIT_FAILURE);
}
static void parse_command_line(int argc, const char **argv_,
AppInput *app_input, SvcContext *svc_ctx,
vpx_codec_enc_cfg_t *enc_cfg) {
struct arg arg = {0};
char **argv = NULL;
char **argi = NULL;
char **argj = NULL;
vpx_codec_err_t res;
int passes = 0;
int pass = 0;
const char *fpf_file_name = NULL;
unsigned int min_bitrate = 0;
unsigned int max_bitrate = 0;
char string_options[1024] = {0};
// initialize SvcContext with parameters that will be passed to vpx_svc_init
svc_ctx->log_level = SVC_LOG_DEBUG;
svc_ctx->spatial_layers = default_spatial_layers;
svc_ctx->temporal_layers = default_temporal_layers;
svc_ctx->temporal_layering_mode = default_temporal_layering_mode;
#if OUTPUT_RC_STATS
svc_ctx->output_rc_stat = default_output_rc_stats;
#endif
svc_ctx->speed = default_speed;
svc_ctx->threads = default_threads;
// start with default encoder configuration
res = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), enc_cfg, 0);
if (res) {
die("Failed to get config: %s\n", vpx_codec_err_to_string(res));
}
// update enc_cfg with app default values
enc_cfg->g_w = default_width;
enc_cfg->g_h = default_height;
enc_cfg->g_timebase.num = default_timebase_num;
enc_cfg->g_timebase.den = default_timebase_den;
enc_cfg->rc_target_bitrate = default_bitrate;
enc_cfg->kf_min_dist = default_kf_dist;
enc_cfg->kf_max_dist = default_kf_dist;
enc_cfg->rc_end_usage = VPX_CQ;
// initialize AppInput with default values
app_input->frames_to_code = default_frames_to_code;
app_input->frames_to_skip = default_frames_to_skip;
// process command line options
argv = argv_dup(argc - 1, argv_ + 1);
for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step) {
arg.argv_step = 1;
if (arg_match(&arg, &frames_arg, argi)) {
app_input->frames_to_code = arg_parse_uint(&arg);
} else if (arg_match(&arg, &width_arg, argi)) {
enc_cfg->g_w = arg_parse_uint(&arg);
} else if (arg_match(&arg, &height_arg, argi)) {
enc_cfg->g_h = arg_parse_uint(&arg);
} else if (arg_match(&arg, &timebase_arg, argi)) {
enc_cfg->g_timebase = arg_parse_rational(&arg);
} else if (arg_match(&arg, &bitrate_arg, argi)) {
enc_cfg->rc_target_bitrate = arg_parse_uint(&arg);
} else if (arg_match(&arg, &skip_frames_arg, argi)) {
app_input->frames_to_skip = arg_parse_uint(&arg);
} else if (arg_match(&arg, &spatial_layers_arg, argi)) {
svc_ctx->spatial_layers = arg_parse_uint(&arg);
} else if (arg_match(&arg, &temporal_layers_arg, argi)) {
svc_ctx->temporal_layers = arg_parse_uint(&arg);
#if OUTPUT_RC_STATS
} else if (arg_match(&arg, &output_rc_stats_arg, argi)) {
svc_ctx->output_rc_stat = arg_parse_uint(&arg);
#endif
} else if (arg_match(&arg, &speed_arg, argi)) {
svc_ctx->speed = arg_parse_uint(&arg);
} else if (arg_match(&arg, &aqmode_arg, argi)) {
svc_ctx->aqmode = arg_parse_uint(&arg);
} else if (arg_match(&arg, &threads_arg, argi)) {
svc_ctx->threads = arg_parse_uint(&arg);
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
svc_ctx->temporal_layering_mode =
enc_cfg->temporal_layering_mode = arg_parse_int(&arg);
if (svc_ctx->temporal_layering_mode) {
enc_cfg->g_error_resilient = 1;
}
} else if (arg_match(&arg, &kf_dist_arg, argi)) {
enc_cfg->kf_min_dist = arg_parse_uint(&arg);
enc_cfg->kf_max_dist = enc_cfg->kf_min_dist;
} else if (arg_match(&arg, &scale_factors_arg, argi)) {
snprintf(string_options, sizeof(string_options), "%s scale-factors=%s",
string_options, arg.val);
} else if (arg_match(&arg, &passes_arg, argi)) {
passes = arg_parse_uint(&arg);
if (passes < 1 || passes > 2) {
die("Error: Invalid number of passes (%d)\n", passes);
}
} else if (arg_match(&arg, &pass_arg, argi)) {
pass = arg_parse_uint(&arg);
if (pass < 1 || pass > 2) {
die("Error: Invalid pass selected (%d)\n", pass);
}
} else if (arg_match(&arg, &fpf_name_arg, argi)) {
fpf_file_name = arg.val;
} else if (arg_match(&arg, &min_q_arg, argi)) {
snprintf(string_options, sizeof(string_options), "%s min-quantizers=%s",
string_options, arg.val);
} else if (arg_match(&arg, &max_q_arg, argi)) {
snprintf(string_options, sizeof(string_options), "%s max-quantizers=%s",
string_options, arg.val);
} else if (arg_match(&arg, &min_bitrate_arg, argi)) {
min_bitrate = arg_parse_uint(&arg);
} else if (arg_match(&arg, &max_bitrate_arg, argi)) {
max_bitrate = arg_parse_uint(&arg);
} else if (arg_match(&arg, &lag_in_frame_arg, argi)) {
enc_cfg->g_lag_in_frames = arg_parse_uint(&arg);
} else if (arg_match(&arg, &rc_end_usage_arg, argi)) {
enc_cfg->rc_end_usage = arg_parse_uint(&arg);
#if CONFIG_VP9_HIGHBITDEPTH
} else if (arg_match(&arg, &bitdepth_arg, argi)) {
enc_cfg->g_bit_depth = arg_parse_enum_or_int(&arg);
switch (enc_cfg->g_bit_depth) {
case VPX_BITS_8:
enc_cfg->g_input_bit_depth = 8;
enc_cfg->g_profile = 0;
break;
case VPX_BITS_10:
enc_cfg->g_input_bit_depth = 10;
enc_cfg->g_profile = 2;
break;
case VPX_BITS_12:
enc_cfg->g_input_bit_depth = 12;
enc_cfg->g_profile = 2;
break;
default:
die("Error: Invalid bit depth selected (%d)\n", enc_cfg->g_bit_depth);
break;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
} else {
++argj;
}
}
// There will be a space in front of the string options
if (strlen(string_options) > 0)
vpx_svc_set_options(svc_ctx, string_options + 1);
if (passes == 0 || passes == 1) {
if (pass) {
fprintf(stderr, "pass is ignored since there's only one pass\n");
}
enc_cfg->g_pass = VPX_RC_ONE_PASS;
} else {
if (pass == 0) {
die("pass must be specified when passes is 2\n");
}
if (fpf_file_name == NULL) {
die("fpf must be specified when passes is 2\n");
}
if (pass == 1) {
enc_cfg->g_pass = VPX_RC_FIRST_PASS;
if (!stats_open_file(&app_input->rc_stats, fpf_file_name, 0)) {
fatal("Failed to open statistics store");
}
} else {
enc_cfg->g_pass = VPX_RC_LAST_PASS;
if (!stats_open_file(&app_input->rc_stats, fpf_file_name, 1)) {
fatal("Failed to open statistics store");
}
enc_cfg->rc_twopass_stats_in = stats_get(&app_input->rc_stats);
}
app_input->passes = passes;
app_input->pass = pass;
}
if (enc_cfg->rc_target_bitrate > 0) {
if (min_bitrate > 0) {
enc_cfg->rc_2pass_vbr_minsection_pct =
min_bitrate * 100 / enc_cfg->rc_target_bitrate;
}
if (max_bitrate > 0) {
enc_cfg->rc_2pass_vbr_maxsection_pct =
max_bitrate * 100 / enc_cfg->rc_target_bitrate;
}
}
// Check for unrecognized options
for (argi = argv; *argi; ++argi)
if (argi[0][0] == '-' && strlen(argi[0]) > 1)
die("Error: Unrecognized option %s\n", *argi);
if (argv[0] == NULL || argv[1] == 0) {
usage_exit();
}
app_input->input_filename = argv[0];
app_input->output_filename = argv[1];
free(argv);
if (enc_cfg->g_w < 16 || enc_cfg->g_w % 2 || enc_cfg->g_h < 16 ||
enc_cfg->g_h % 2)
die("Invalid resolution: %d x %d\n", enc_cfg->g_w, enc_cfg->g_h);
printf(
"Codec %s\nframes: %d, skip: %d\n"
"layers: %d\n"
"width %d, height: %d,\n"
"num: %d, den: %d, bitrate: %d,\n"
"gop size: %d\n",
vpx_codec_iface_name(vpx_codec_vp9_cx()), app_input->frames_to_code,
app_input->frames_to_skip,
svc_ctx->spatial_layers, enc_cfg->g_w, enc_cfg->g_h,
enc_cfg->g_timebase.num, enc_cfg->g_timebase.den,
enc_cfg->rc_target_bitrate, enc_cfg->kf_max_dist);
}
#if OUTPUT_RC_STATS
// For rate control encoding stats.
struct RateControlStats {
// Number of input frames per layer.
int layer_input_frames[VPX_MAX_LAYERS];
// Total (cumulative) number of encoded frames per layer.
int layer_tot_enc_frames[VPX_MAX_LAYERS];
// Number of encoded non-key frames per layer.
int layer_enc_frames[VPX_MAX_LAYERS];
// Framerate per layer (cumulative).
double layer_framerate[VPX_MAX_LAYERS];
// Target average frame size per layer (per-frame-bandwidth per layer).
double layer_pfb[VPX_MAX_LAYERS];
// Actual average frame size per layer.
double layer_avg_frame_size[VPX_MAX_LAYERS];
// Average rate mismatch per layer (|target - actual| / target).
double layer_avg_rate_mismatch[VPX_MAX_LAYERS];
// Actual encoding bitrate per layer (cumulative).
double layer_encoding_bitrate[VPX_MAX_LAYERS];
// Average of the short-time encoder actual bitrate.
// TODO(marpan): Should we add these short-time stats for each layer?
double avg_st_encoding_bitrate;
// Variance of the short-time encoder actual bitrate.
double variance_st_encoding_bitrate;
// Window (number of frames) for computing short-time encoding bitrate.
int window_size;
// Number of window measurements.
int window_count;
};
// Note: these rate control stats assume only 1 key frame in the
// sequence (i.e., first frame only).
static void set_rate_control_stats(struct RateControlStats *rc,
vpx_codec_enc_cfg_t *cfg) {
unsigned int sl, tl;
// Set the layer (cumulative) framerate and the target layer (non-cumulative)
// per-frame-bandwidth, for the rate control encoding stats below.
const double framerate = cfg->g_timebase.den / cfg->g_timebase.num;
for (sl = 0; sl < cfg->ss_number_layers; ++sl) {
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
const int layer = sl * cfg->ts_number_layers + tl;
const int tlayer0 = sl * cfg->ts_number_layers;
if (cfg->ts_number_layers == 1)
rc->layer_framerate[layer] = framerate;
else
rc->layer_framerate[layer] =
framerate / cfg->ts_rate_decimator[tl];
if (tl > 0) {
rc->layer_pfb[layer] = 1000.0 *
(cfg->layer_target_bitrate[layer] -
cfg->layer_target_bitrate[layer - 1]) /
(rc->layer_framerate[layer] -
rc->layer_framerate[layer - 1]);
} else {
rc->layer_pfb[tlayer0] = 1000.0 *
cfg->layer_target_bitrate[tlayer0] /
rc->layer_framerate[tlayer0];
}
rc->layer_input_frames[layer] = 0;
rc->layer_enc_frames[layer] = 0;
rc->layer_tot_enc_frames[layer] = 0;
rc->layer_encoding_bitrate[layer] = 0.0;
rc->layer_avg_frame_size[layer] = 0.0;
rc->layer_avg_rate_mismatch[layer] = 0.0;
}
}
rc->window_count = 0;
rc->window_size = 15;
rc->avg_st_encoding_bitrate = 0.0;
rc->variance_st_encoding_bitrate = 0.0;
}
static void printout_rate_control_summary(struct RateControlStats *rc,
vpx_codec_enc_cfg_t *cfg,
int frame_cnt) {
unsigned int sl, tl;
int tot_num_frames = 0;
double perc_fluctuation = 0.0;
printf("Total number of processed frames: %d\n\n", frame_cnt - 1);
printf("Rate control layer stats for sl%d tl%d layer(s):\n\n",
cfg->ss_number_layers, cfg->ts_number_layers);
for (sl = 0; sl < cfg->ss_number_layers; ++sl) {
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
const int layer = sl * cfg->ts_number_layers + tl;
const int num_dropped = (tl > 0) ?
(rc->layer_input_frames[layer] - rc->layer_enc_frames[layer]) :
(rc->layer_input_frames[layer] - rc->layer_enc_frames[layer] - 1);
if (!sl)
tot_num_frames += rc->layer_input_frames[layer];
rc->layer_encoding_bitrate[layer] = 0.001 * rc->layer_framerate[layer] *
rc->layer_encoding_bitrate[layer] / tot_num_frames;
rc->layer_avg_frame_size[layer] = rc->layer_avg_frame_size[layer] /
rc->layer_enc_frames[layer];
rc->layer_avg_rate_mismatch[layer] =
100.0 * rc->layer_avg_rate_mismatch[layer] /
rc->layer_enc_frames[layer];
printf("For layer#: sl%d tl%d \n", sl, tl);
printf("Bitrate (target vs actual): %d %f.0 kbps\n",
cfg->layer_target_bitrate[layer],
rc->layer_encoding_bitrate[layer]);
printf("Average frame size (target vs actual): %f %f bits\n",
rc->layer_pfb[layer], rc->layer_avg_frame_size[layer]);
printf("Average rate_mismatch: %f\n",
rc->layer_avg_rate_mismatch[layer]);
printf("Number of input frames, encoded (non-key) frames, "
"and percent dropped frames: %d %d %f.0 \n",
rc->layer_input_frames[layer], rc->layer_enc_frames[layer],
100.0 * num_dropped / rc->layer_input_frames[layer]);
printf("\n");
}
}
rc->avg_st_encoding_bitrate = rc->avg_st_encoding_bitrate / rc->window_count;
rc->variance_st_encoding_bitrate =
rc->variance_st_encoding_bitrate / rc->window_count -
(rc->avg_st_encoding_bitrate * rc->avg_st_encoding_bitrate);
perc_fluctuation = 100.0 * sqrt(rc->variance_st_encoding_bitrate) /
rc->avg_st_encoding_bitrate;
printf("Short-time stats, for window of %d frames: \n", rc->window_size);
printf("Average, rms-variance, and percent-fluct: %f %f %f \n",
rc->avg_st_encoding_bitrate,
sqrt(rc->variance_st_encoding_bitrate),
perc_fluctuation);
if (frame_cnt != tot_num_frames)
die("Error: Number of input frames not equal to output encoded frames != "
"%d tot_num_frames = %d\n", frame_cnt, tot_num_frames);
}
vpx_codec_err_t parse_superframe_index(const uint8_t *data,
size_t data_sz,
uint32_t sizes[8], int *count) {
// A chunk ending with a byte matching 0xc0 is an invalid chunk unless
// it is a super frame index. If the last byte of real video compression
// data is 0xc0 the encoder must add a 0 byte. If we have the marker but
// not the associated matching marker byte at the front of the index we have
// an invalid bitstream and need to return an error.
uint8_t marker;
marker = *(data + data_sz - 1);
*count = 0;
if ((marker & 0xe0) == 0xc0) {
const uint32_t frames = (marker & 0x7) + 1;
const uint32_t mag = ((marker >> 3) & 0x3) + 1;
const size_t index_sz = 2 + mag * frames;
// This chunk is marked as having a superframe index but doesn't have
// enough data for it, thus it's an invalid superframe index.
if (data_sz < index_sz)
return VPX_CODEC_CORRUPT_FRAME;
{
const uint8_t marker2 = *(data + data_sz - index_sz);
// This chunk is marked as having a superframe index but doesn't have
// the matching marker byte at the front of the index therefore it's an
// invalid chunk.
if (marker != marker2)
return VPX_CODEC_CORRUPT_FRAME;
}
{
// Found a valid superframe index.
uint32_t i, j;
const uint8_t *x = &data[data_sz - index_sz + 1];
for (i = 0; i < frames; ++i) {
uint32_t this_sz = 0;
for (j = 0; j < mag; ++j)
this_sz |= (*x++) << (j * 8);
sizes[i] = this_sz;
}
*count = frames;
}
}
return VPX_CODEC_OK;
}
#endif
// Example pattern for spatial layers and 2 temporal layers used in the
// bypass/flexible mode. The pattern corresponds to the pattern
// VP9E_TEMPORAL_LAYERING_MODE_0101 (temporal_layering_mode == 2) used in
// non-flexible mode.
void set_frame_flags_bypass_mode(int sl, int tl, int num_spatial_layers,
int is_key_frame,
vpx_svc_ref_frame_config_t *ref_frame_config) {
for (sl = 0; sl < num_spatial_layers; ++sl) {
if (!tl) {
if (!sl) {
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF |
VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
} else {
if (is_key_frame) {
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_LAST |
VP8_EFLAG_NO_REF_ARF |
VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
} else {
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_ARF |
VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
}
}
} else if (tl == 1) {
if (!sl) {
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF |
VP8_EFLAG_NO_UPD_LAST |
VP8_EFLAG_NO_UPD_GF;
} else {
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_ARF |
VP8_EFLAG_NO_UPD_LAST |
VP8_EFLAG_NO_UPD_GF;
}
}
if (tl == 0) {
ref_frame_config->lst_fb_idx[sl] = sl;
if (sl)
ref_frame_config->gld_fb_idx[sl] = sl - 1;
else
ref_frame_config->gld_fb_idx[sl] = 0;
ref_frame_config->alt_fb_idx[sl] = 0;
} else if (tl == 1) {
ref_frame_config->lst_fb_idx[sl] = sl;
ref_frame_config->gld_fb_idx[sl] = num_spatial_layers + sl - 1;
ref_frame_config->alt_fb_idx[sl] = num_spatial_layers + sl;
}
}
}
int main(int argc, const char **argv) {
AppInput app_input = {0};
VpxVideoWriter *writer = NULL;
VpxVideoInfo info = {0};
vpx_codec_ctx_t codec;
vpx_codec_enc_cfg_t enc_cfg;
SvcContext svc_ctx;
uint32_t i;
uint32_t frame_cnt = 0;
vpx_image_t raw;
vpx_codec_err_t res;
int pts = 0; /* PTS starts at 0 */
int frame_duration = 1; /* 1 timebase tick per frame */
FILE *infile = NULL;
int end_of_stream = 0;
int frames_received = 0;
#if OUTPUT_RC_STATS
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
struct RateControlStats rc;
vpx_svc_layer_id_t layer_id;
vpx_svc_ref_frame_config_t ref_frame_config;
int sl, tl;
double sum_bitrate = 0.0;
double sum_bitrate2 = 0.0;
double framerate = 30.0;
#endif
struct vpx_usec_timer timer;
int64_t cx_time = 0;
memset(&svc_ctx, 0, sizeof(svc_ctx));
svc_ctx.log_print = 1;
exec_name = argv[0];
parse_command_line(argc, argv, &app_input, &svc_ctx, &enc_cfg);
// Allocate image buffer
#if CONFIG_VP9_HIGHBITDEPTH
if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ?
VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
enc_cfg.g_w, enc_cfg.g_h, 32)) {
die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h);
}
#else
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, enc_cfg.g_w, enc_cfg.g_h, 32)) {
die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
if (!(infile = fopen(app_input.input_filename, "rb")))
die("Failed to open %s for reading\n", app_input.input_filename);
// Initialize codec
if (vpx_svc_init(&svc_ctx, &codec, vpx_codec_vp9_cx(), &enc_cfg) !=
VPX_CODEC_OK)
die("Failed to initialize encoder\n");
#if OUTPUT_RC_STATS
if (svc_ctx.output_rc_stat) {
set_rate_control_stats(&rc, &enc_cfg);
framerate = enc_cfg.g_timebase.den / enc_cfg.g_timebase.num;
}
#endif
info.codec_fourcc = VP9_FOURCC;
info.time_base.numerator = enc_cfg.g_timebase.num;
info.time_base.denominator = enc_cfg.g_timebase.den;
if (!(app_input.passes == 2 && app_input.pass == 1)) {
// We don't save the bitstream for the 1st pass on two pass rate control
writer = vpx_video_writer_open(app_input.output_filename, kContainerIVF,
&info);
if (!writer)
die("Failed to open %s for writing\n", app_input.output_filename);
}
#if OUTPUT_RC_STATS
// For now, just write temporal layer streams.
// TODO(wonkap): do spatial by re-writing superframe.
if (svc_ctx.output_rc_stat) {
for (tl = 0; tl < enc_cfg.ts_number_layers; ++tl) {
char file_name[PATH_MAX];
snprintf(file_name, sizeof(file_name), "%s_t%d.ivf",
app_input.output_filename, tl);
outfile[tl] = vpx_video_writer_open(file_name, kContainerIVF, &info);
if (!outfile[tl])
die("Failed to open %s for writing", file_name);
}
}
#endif
// skip initial frames
for (i = 0; i < app_input.frames_to_skip; ++i)
vpx_img_read(&raw, infile);
if (svc_ctx.speed != -1)
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
if (svc_ctx.threads)
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
if (svc_ctx.speed >= 5 && svc_ctx.aqmode == 1)
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
// Encode frames
while (!end_of_stream) {
vpx_codec_iter_t iter = NULL;
const vpx_codec_cx_pkt_t *cx_pkt;
if (frame_cnt >= app_input.frames_to_code || !vpx_img_read(&raw, infile)) {
// We need one extra vpx_svc_encode call at end of stream to flush
// encoder and get remaining data
end_of_stream = 1;
}
// For BYPASS/FLEXIBLE mode, set the frame flags (reference and updates)
// and the buffer indices for each spatial layer of the current
// (super)frame to be encoded. The temporal layer_id for the current frame
// also needs to be set.
// TODO(marpan): Should rename the "VP9E_TEMPORAL_LAYERING_MODE_BYPASS"
// mode to "VP9E_LAYERING_MODE_BYPASS".
if (svc_ctx.temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
layer_id.spatial_layer_id = 0;
// Example for 2 temporal layers.
if (frame_cnt % 2 == 0)
layer_id.temporal_layer_id = 0;
else
layer_id.temporal_layer_id = 1;
// Note that we only set the temporal layer_id, since we are calling
// the encode for the whole superframe. The encoder will internally loop
// over all the spatial layers for the current superframe.
vpx_codec_control(&codec, VP9E_SET_SVC_LAYER_ID, &layer_id);
set_frame_flags_bypass_mode(sl, layer_id.temporal_layer_id,
svc_ctx.spatial_layers,
frame_cnt == 0,
&ref_frame_config);
vpx_codec_control(&codec, VP9E_SET_SVC_REF_FRAME_CONFIG,
&ref_frame_config);
// Keep track of input frames, to account for frame drops in rate control
// stats/metrics.
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
layer_id.temporal_layer_id];
}
}
vpx_usec_timer_start(&timer);
res = vpx_svc_encode(&svc_ctx, &codec, (end_of_stream ? NULL : &raw),
pts, frame_duration, svc_ctx.speed >= 5 ?
VPX_DL_REALTIME : VPX_DL_GOOD_QUALITY);
vpx_usec_timer_mark(&timer);
cx_time += vpx_usec_timer_elapsed(&timer);
printf("%s", vpx_svc_get_message(&svc_ctx));
fflush(stdout);
if (res != VPX_CODEC_OK) {
die_codec(&codec, "Failed to encode frame");
}
while ((cx_pkt = vpx_codec_get_cx_data(&codec, &iter)) != NULL) {
switch (cx_pkt->kind) {
case VPX_CODEC_CX_FRAME_PKT: {
SvcInternal_t *const si = (SvcInternal_t *)svc_ctx.internal;
if (cx_pkt->data.frame.sz > 0) {
#if OUTPUT_RC_STATS
uint32_t sizes[8];
int count = 0;
#endif
vpx_video_writer_write_frame(writer,
cx_pkt->data.frame.buf,
cx_pkt->data.frame.sz,
cx_pkt->data.frame.pts);
#if OUTPUT_RC_STATS
// TODO(marpan/wonkap): Put this (to line728) in separate function.
if (svc_ctx.output_rc_stat) {
vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
parse_superframe_index(cx_pkt->data.frame.buf,
cx_pkt->data.frame.sz, sizes, &count);
// Note computing input_layer_frames here won't account for frame
// drops in rate control stats.
// TODO(marpan): Fix this for non-bypass mode so we can get stats
// for dropped frames.
if (svc_ctx.temporal_layering_mode !=
VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
layer_id.temporal_layer_id];
}
}
for (tl = layer_id.temporal_layer_id;
tl < enc_cfg.ts_number_layers; ++tl) {
vpx_video_writer_write_frame(outfile[tl],
cx_pkt->data.frame.buf,
cx_pkt->data.frame.sz,
cx_pkt->data.frame.pts);
}
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
for (tl = layer_id.temporal_layer_id;
tl < enc_cfg.ts_number_layers; ++tl) {
const int layer = sl * enc_cfg.ts_number_layers + tl;
++rc.layer_tot_enc_frames[layer];
rc.layer_encoding_bitrate[layer] += 8.0 * sizes[sl];
// Keep count of rate control stats per layer, for non-key
// frames.
if (tl == layer_id.temporal_layer_id &&
!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY)) {
rc.layer_avg_frame_size[layer] += 8.0 * sizes[sl];
rc.layer_avg_rate_mismatch[layer] +=
fabs(8.0 * sizes[sl] - rc.layer_pfb[layer]) /
rc.layer_pfb[layer];
++rc.layer_enc_frames[layer];
}
}
}
// Update for short-time encoding bitrate states, for moving
// window of size rc->window, shifted by rc->window / 2.
// Ignore first window segment, due to key frame.
if (frame_cnt > rc.window_size) {
tl = layer_id.temporal_layer_id;
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
sum_bitrate += 0.001 * 8.0 * sizes[sl] * framerate;
}
if (frame_cnt % rc.window_size == 0) {
rc.window_count += 1;
rc.avg_st_encoding_bitrate += sum_bitrate / rc.window_size;
rc.variance_st_encoding_bitrate +=
(sum_bitrate / rc.window_size) *
(sum_bitrate / rc.window_size);
sum_bitrate = 0.0;
}
}
// Second shifted window.
if (frame_cnt > rc.window_size + rc.window_size / 2) {
tl = layer_id.temporal_layer_id;
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
sum_bitrate2 += 0.001 * 8.0 * sizes[sl] * framerate;
}
if (frame_cnt > 2 * rc.window_size &&
frame_cnt % rc.window_size == 0) {
rc.window_count += 1;
rc.avg_st_encoding_bitrate += sum_bitrate2 / rc.window_size;
rc.variance_st_encoding_bitrate +=
(sum_bitrate2 / rc.window_size) *
(sum_bitrate2 / rc.window_size);
sum_bitrate2 = 0.0;
}
}
}
#endif
}
printf("SVC frame: %d, kf: %d, size: %d, pts: %d\n", frames_received,
!!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY),
(int)cx_pkt->data.frame.sz, (int)cx_pkt->data.frame.pts);
if (enc_cfg.ss_number_layers == 1 && enc_cfg.ts_number_layers == 1)
si->bytes_sum[0] += (int)cx_pkt->data.frame.sz;
++frames_received;
break;
}
case VPX_CODEC_STATS_PKT: {
stats_write(&app_input.rc_stats,
cx_pkt->data.twopass_stats.buf,
cx_pkt->data.twopass_stats.sz);
break;
}
default: {
break;
}
}
}
if (!end_of_stream) {
++frame_cnt;
pts += frame_duration;
}
}
// Compensate for the extra frame count for the bypass mode.
if (svc_ctx.temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
const int layer = sl * enc_cfg.ts_number_layers +
layer_id.temporal_layer_id;
--rc.layer_input_frames[layer];
}
}
printf("Processed %d frames\n", frame_cnt);
fclose(infile);
#if OUTPUT_RC_STATS
if (svc_ctx.output_rc_stat) {
printout_rate_control_summary(&rc, &enc_cfg, frame_cnt);
printf("\n");
}
#endif
if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
if (app_input.passes == 2)
stats_close(&app_input.rc_stats, 1);
if (writer) {
vpx_video_writer_close(writer);
}
#if OUTPUT_RC_STATS
if (svc_ctx.output_rc_stat) {
for (tl = 0; tl < enc_cfg.ts_number_layers; ++tl) {
vpx_video_writer_close(outfile[tl]);
}
}
#endif
printf("Frame cnt and encoding time/FPS stats for encoding: %d %f %f \n",
frame_cnt,
1000 * (float)cx_time / (double)(frame_cnt * 1000000),
1000000 * (double)frame_cnt / (double)cx_time);
vpx_img_free(&raw);
// display average size, psnr
printf("%s", vpx_svc_dump_statistics(&svc_ctx));
vpx_svc_release(&svc_ctx);
return EXIT_SUCCESS;
}

View File

@ -517,13 +517,13 @@ int main(int argc, char **argv) {
struct RateControlMetrics rc;
int64_t cx_time = 0;
const int min_args_base = 11;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_bit_depth_t bit_depth = VPX_BITS_8;
int input_bit_depth = 8;
const int min_args = min_args_base + 1;
#else
const int min_args = min_args_base;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
double sum_bitrate = 0.0;
double sum_bitrate2 = 0.0;
double framerate = 30.0;
@ -531,7 +531,7 @@ int main(int argc, char **argv) {
exec_name = argv[0];
// Check usage and arguments.
if (argc < min_args) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n", argv[0]);
@ -539,7 +539,7 @@ int main(int argc, char **argv) {
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> \n", argv[0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
encoder = get_vpx_encoder_by_name(argv[3]);
@ -563,7 +563,7 @@ int main(int argc, char **argv) {
die("Invalid number of arguments");
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (strtol(argv[argc-1], NULL, 0)) {
case 8:
bit_depth = VPX_BITS_8;
@ -590,7 +590,7 @@ int main(int argc, char **argv) {
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
die("Failed to allocate image", width, height);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Populate encoder configuration.
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
@ -603,13 +603,13 @@ int main(int argc, char **argv) {
cfg.g_w = width;
cfg.g_h = height;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (bit_depth != VPX_BITS_8) {
cfg.g_bit_depth = bit_depth;
cfg.g_input_bit_depth = input_bit_depth;
cfg.g_profile = 2;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Timebase format e.g. 30fps: numerator=1, demoninator = 30.
cfg.g_timebase.num = strtol(argv[6], NULL, 0);
@ -697,13 +697,13 @@ int main(int argc, char **argv) {
cfg.ss_number_layers = 1;
// Initialize codec.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (vpx_codec_enc_init(
&codec, encoder->codec_interface(), &cfg,
bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH))
#else
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
die_codec(&codec, "Failed to initialize encoder");
if (strncmp(encoder->name, "vp8", 3) == 0) {

455
examples/vpxcx_set_ref.c Normal file
View File

@ -0,0 +1,455 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// VP10 Set Reference Frame
// ============================
//
// This is an example demonstrating how to overwrite the VP10 encoder's
// internal reference frame. In the sample we set the last frame to the
// current frame. This technique could be used to bounce between two cameras.
//
// The decoder would also have to set the reference frame to the same value
// on the same frame, or the video will become corrupt. The 'test_decode'
// variable is set to 1 in this example that tests if the encoder and decoder
// results are matching.
//
// Usage
// -----
// This example encodes a raw video. And the last argument passed in specifies
// the frame number to update the reference frame on. For example, run
// examples/vpx_cx_set_ref vp10 352 288 in.yuv out.ivf 4 30
// The parameter is parsed as follows:
//
//
// Extra Variables
// ---------------
// This example maintains the frame number passed on the command line
// in the `update_frame_num` variable.
//
//
// Configuration
// -------------
//
// The reference frame is updated on the frame specified on the command
// line.
//
// Observing The Effects
// ---------------------
// The encoder and decoder results should be matching when the same reference
// frame setting operation is done in both encoder and decoder. Otherwise,
// the encoder/decoder mismatch would be seen.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vpx/vp8cx.h"
#include "vpx/vpx_decoder.h"
#include "vpx/vpx_encoder.h"
#include "./tools_common.h"
#include "./video_writer.h"
static const char *exec_name;
void usage_exit() {
fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile> "
"<frame> <limit(optional)>\n",
exec_name);
exit(EXIT_FAILURE);
}
static int compare_img(const vpx_image_t *const img1,
const vpx_image_t *const img2) {
uint32_t l_w = img1->d_w;
uint32_t c_w =
(img1->d_w + img1->x_chroma_shift) >> img1->x_chroma_shift;
const uint32_t c_h =
(img1->d_h + img1->y_chroma_shift) >> img1->y_chroma_shift;
uint32_t i;
int match = 1;
match &= (img1->fmt == img2->fmt);
match &= (img1->d_w == img2->d_w);
match &= (img1->d_h == img2->d_h);
for (i = 0; i < img1->d_h; ++i)
match &= (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y],
img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y],
l_w) == 0);
for (i = 0; i < c_h; ++i)
match &= (memcmp(img1->planes[VPX_PLANE_U] + i * img1->stride[VPX_PLANE_U],
img2->planes[VPX_PLANE_U] + i * img2->stride[VPX_PLANE_U],
c_w) == 0);
for (i = 0; i < c_h; ++i)
match &= (memcmp(img1->planes[VPX_PLANE_V] + i * img1->stride[VPX_PLANE_V],
img2->planes[VPX_PLANE_V] + i * img2->stride[VPX_PLANE_V],
c_w) == 0);
return match;
}
#define mmin(a, b) ((a) < (b) ? (a) : (b))
static void find_mismatch(const vpx_image_t *const img1,
const vpx_image_t *const img2,
int yloc[4], int uloc[4], int vloc[4]) {
const uint32_t bsize = 64;
const uint32_t bsizey = bsize >> img1->y_chroma_shift;
const uint32_t bsizex = bsize >> img1->x_chroma_shift;
const uint32_t c_w =
(img1->d_w + img1->x_chroma_shift) >> img1->x_chroma_shift;
const uint32_t c_h =
(img1->d_h + img1->y_chroma_shift) >> img1->y_chroma_shift;
int match = 1;
uint32_t i, j;
yloc[0] = yloc[1] = yloc[2] = yloc[3] = -1;
for (i = 0, match = 1; match && i < img1->d_h; i += bsize) {
for (j = 0; match && j < img1->d_w; j += bsize) {
int k, l;
const int si = mmin(i + bsize, img1->d_h) - i;
const int sj = mmin(j + bsize, img1->d_w) - j;
for (k = 0; match && k < si; ++k) {
for (l = 0; match && l < sj; ++l) {
if (*(img1->planes[VPX_PLANE_Y] +
(i + k) * img1->stride[VPX_PLANE_Y] + j + l) !=
*(img2->planes[VPX_PLANE_Y] +
(i + k) * img2->stride[VPX_PLANE_Y] + j + l)) {
yloc[0] = i + k;
yloc[1] = j + l;
yloc[2] = *(img1->planes[VPX_PLANE_Y] +
(i + k) * img1->stride[VPX_PLANE_Y] + j + l);
yloc[3] = *(img2->planes[VPX_PLANE_Y] +
(i + k) * img2->stride[VPX_PLANE_Y] + j + l);
match = 0;
break;
}
}
}
}
}
uloc[0] = uloc[1] = uloc[2] = uloc[3] = -1;
for (i = 0, match = 1; match && i < c_h; i += bsizey) {
for (j = 0; match && j < c_w; j += bsizex) {
int k, l;
const int si = mmin(i + bsizey, c_h - i);
const int sj = mmin(j + bsizex, c_w - j);
for (k = 0; match && k < si; ++k) {
for (l = 0; match && l < sj; ++l) {
if (*(img1->planes[VPX_PLANE_U] +
(i + k) * img1->stride[VPX_PLANE_U] + j + l) !=
*(img2->planes[VPX_PLANE_U] +
(i + k) * img2->stride[VPX_PLANE_U] + j + l)) {
uloc[0] = i + k;
uloc[1] = j + l;
uloc[2] = *(img1->planes[VPX_PLANE_U] +
(i + k) * img1->stride[VPX_PLANE_U] + j + l);
uloc[3] = *(img2->planes[VPX_PLANE_U] +
(i + k) * img2->stride[VPX_PLANE_U] + j + l);
match = 0;
break;
}
}
}
}
}
vloc[0] = vloc[1] = vloc[2] = vloc[3] = -1;
for (i = 0, match = 1; match && i < c_h; i += bsizey) {
for (j = 0; match && j < c_w; j += bsizex) {
int k, l;
const int si = mmin(i + bsizey, c_h - i);
const int sj = mmin(j + bsizex, c_w - j);
for (k = 0; match && k < si; ++k) {
for (l = 0; match && l < sj; ++l) {
if (*(img1->planes[VPX_PLANE_V] +
(i + k) * img1->stride[VPX_PLANE_V] + j + l) !=
*(img2->planes[VPX_PLANE_V] +
(i + k) * img2->stride[VPX_PLANE_V] + j + l)) {
vloc[0] = i + k;
vloc[1] = j + l;
vloc[2] = *(img1->planes[VPX_PLANE_V] +
(i + k) * img1->stride[VPX_PLANE_V] + j + l);
vloc[3] = *(img2->planes[VPX_PLANE_V] +
(i + k) * img2->stride[VPX_PLANE_V] + j + l);
match = 0;
break;
}
}
}
}
}
}
static void testing_decode(vpx_codec_ctx_t *encoder,
vpx_codec_ctx_t *decoder,
vpx_codec_enc_cfg_t *cfg,
unsigned int frame_out,
int *mismatch_seen) {
vpx_image_t enc_img, dec_img;
struct vp9_ref_frame ref_enc, ref_dec;
if (*mismatch_seen)
return;
ref_enc.idx = 0;
ref_dec.idx = 0;
if (vpx_codec_control(encoder, VP9_GET_REFERENCE, &ref_enc))
die_codec(encoder, "Failed to get encoder reference frame");
enc_img = ref_enc.img;
if (vpx_codec_control(decoder, VP9_GET_REFERENCE, &ref_dec))
die_codec(decoder, "Failed to get decoder reference frame");
dec_img = ref_dec.img;
if (!compare_img(&enc_img, &dec_img)) {
int y[4], u[4], v[4];
*mismatch_seen = 1;
find_mismatch(&enc_img, &dec_img, y, u, v);
printf("Encode/decode mismatch on frame %d at"
" Y[%d, %d] {%d/%d},"
" U[%d, %d] {%d/%d},"
" V[%d, %d] {%d/%d}",
frame_out,
y[0], y[1], y[2], y[3],
u[0], u[1], u[2], u[3],
v[0], v[1], v[2], v[3]);
}
vpx_img_free(&enc_img);
vpx_img_free(&dec_img);
}
static int encode_frame(vpx_codec_ctx_t *ecodec,
vpx_codec_enc_cfg_t *cfg,
vpx_image_t *img,
unsigned int frame_in,
VpxVideoWriter *writer,
int test_decode,
vpx_codec_ctx_t *dcodec,
unsigned int *frame_out,
int *mismatch_seen) {
int got_pkts = 0;
vpx_codec_iter_t iter = NULL;
const vpx_codec_cx_pkt_t *pkt = NULL;
int got_data;
const vpx_codec_err_t res = vpx_codec_encode(ecodec, img, frame_in, 1,
0, VPX_DL_GOOD_QUALITY);
if (res != VPX_CODEC_OK)
die_codec(ecodec, "Failed to encode frame");
got_data = 0;
while ((pkt = vpx_codec_get_cx_data(ecodec, &iter)) != NULL) {
got_pkts = 1;
if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
if (!(pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT)) {
*frame_out += 1;
}
if (!vpx_video_writer_write_frame(writer,
pkt->data.frame.buf,
pkt->data.frame.sz,
pkt->data.frame.pts)) {
die_codec(ecodec, "Failed to write compressed frame");
}
printf(keyframe ? "K" : ".");
fflush(stdout);
got_data = 1;
// Decode 1 frame.
if (test_decode) {
if (vpx_codec_decode(dcodec, pkt->data.frame.buf,
(unsigned int)pkt->data.frame.sz, NULL, 0))
die_codec(dcodec, "Failed to decode frame.");
}
}
}
// Mismatch checking
if (got_data && test_decode) {
testing_decode(ecodec, dcodec, cfg, *frame_out, mismatch_seen);
}
return got_pkts;
}
int main(int argc, char **argv) {
FILE *infile = NULL;
// Encoder
vpx_codec_ctx_t ecodec = {0};
vpx_codec_enc_cfg_t cfg = {0};
unsigned int frame_in = 0;
vpx_image_t raw;
vpx_codec_err_t res;
VpxVideoInfo info = {0};
VpxVideoWriter *writer = NULL;
const VpxInterface *encoder = NULL;
// Test encoder/decoder mismatch.
int test_decode = 1;
// Decoder
vpx_codec_ctx_t dcodec;
unsigned int frame_out = 0;
// The frame number to set reference frame on
unsigned int update_frame_num = 0;
int mismatch_seen = 0;
const int fps = 30;
const int bitrate = 500;
const char *codec_arg = NULL;
const char *width_arg = NULL;
const char *height_arg = NULL;
const char *infile_arg = NULL;
const char *outfile_arg = NULL;
unsigned int limit = 0;
exec_name = argv[0];
if (argc < 7)
die("Invalid number of arguments");
codec_arg = argv[1];
width_arg = argv[2];
height_arg = argv[3];
infile_arg = argv[4];
outfile_arg = argv[5];
encoder = get_vpx_encoder_by_name(codec_arg);
if (!encoder)
die("Unsupported codec.");
update_frame_num = atoi(argv[6]);
// In VP10, the reference buffers (cm->buffer_pool->frame_bufs[i].buf) are
// allocated while calling vpx_codec_encode(), thus, setting reference for
// 1st frame isn't supported.
if (update_frame_num <= 1)
die("Couldn't parse frame number '%s'\n", argv[6]);
if (argc > 7) {
limit = atoi(argv[7]);
if (update_frame_num > limit)
die("Update frame number couldn't larger than limit\n");
}
info.codec_fourcc = encoder->fourcc;
info.frame_width = strtol(width_arg, NULL, 0);
info.frame_height = strtol(height_arg, NULL, 0);
info.time_base.numerator = 1;
info.time_base.denominator = fps;
if (info.frame_width <= 0 ||
info.frame_height <= 0 ||
(info.frame_width % 2) != 0 ||
(info.frame_height % 2) != 0) {
die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
}
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
info.frame_height, 1)) {
die("Failed to allocate image.");
}
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res)
die_codec(&ecodec, "Failed to get default codec config.");
cfg.g_w = info.frame_width;
cfg.g_h = info.frame_height;
cfg.g_timebase.num = info.time_base.numerator;
cfg.g_timebase.den = info.time_base.denominator;
cfg.rc_target_bitrate = bitrate;
cfg.g_lag_in_frames = 3;
writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info);
if (!writer)
die("Failed to open %s for writing.", outfile_arg);
if (!(infile = fopen(infile_arg, "rb")))
die("Failed to open %s for reading.", infile_arg);
if (vpx_codec_enc_init(&ecodec, encoder->codec_interface(), &cfg, 0))
die_codec(&ecodec, "Failed to initialize encoder");
// Disable alt_ref.
if (vpx_codec_control(&ecodec, VP8E_SET_ENABLEAUTOALTREF, 0))
die_codec(&ecodec, "Failed to set enable auto alt ref");
if (test_decode) {
const VpxInterface *decoder = get_vpx_decoder_by_name(codec_arg);
if (vpx_codec_dec_init(&dcodec, decoder->codec_interface(), NULL, 0))
die_codec(&dcodec, "Failed to initialize decoder.");
}
// Encode frames.
while (vpx_img_read(&raw, infile)) {
if (limit && frame_in >= limit)
break;
if (update_frame_num > 1 && frame_out + 1 == update_frame_num) {
vpx_ref_frame_t ref;
ref.frame_type = VP8_LAST_FRAME;
ref.img = raw;
// Set reference frame in encoder.
if (vpx_codec_control(&ecodec, VP8_SET_REFERENCE, &ref))
die_codec(&ecodec, "Failed to set reference frame");
printf(" <SET_REF>");
// If set_reference in decoder is commented out, the enc/dec mismatch
// would be seen.
if (test_decode) {
if (vpx_codec_control(&dcodec, VP8_SET_REFERENCE, &ref))
die_codec(&dcodec, "Failed to set reference frame");
}
}
encode_frame(&ecodec, &cfg, &raw, frame_in, writer, test_decode,
&dcodec, &frame_out, &mismatch_seen);
frame_in++;
if (mismatch_seen)
break;
}
// Flush encoder.
if (!mismatch_seen)
while (encode_frame(&ecodec, &cfg, NULL, frame_in, writer, test_decode,
&dcodec, &frame_out, &mismatch_seen)) {}
printf("\n");
fclose(infile);
printf("Processed %d frames.\n", frame_out);
if (test_decode) {
if (!mismatch_seen)
printf("Encoder/decoder results are matching.\n");
else
printf("Encoder/decoder results are NOT matching.\n");
}
if (test_decode)
if (vpx_codec_destroy(&dcodec))
die_codec(&dcodec, "Failed to destroy decoder");
vpx_img_free(&raw);
if (vpx_codec_destroy(&ecodec))
die_codec(&ecodec, "Failed to destroy encoder.");
vpx_video_writer_close(writer);
return EXIT_SUCCESS;
}

56
libs.mk
View File

@ -53,62 +53,6 @@ CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
include $(SRC_PATH_BARE)/vpx_util/vpx_util.mk
CODEC_SRCS-yes += $(addprefix vpx_util/,$(call enabled,UTIL_SRCS))
ifeq ($(CONFIG_VP8),yes)
VP8_PREFIX=vp8/
include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8_common.mk
endif
ifeq ($(CONFIG_VP8_ENCODER),yes)
include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8cx.mk
CODEC_SRCS-yes += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_CX_SRCS))
CODEC_EXPORTS-yes += $(addprefix $(VP8_PREFIX),$(VP8_CX_EXPORTS))
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP8_PREFIX)/%
CODEC_DOC_SECTIONS += vp8 vp8_encoder
endif
ifeq ($(CONFIG_VP8_DECODER),yes)
include $(SRC_PATH_BARE)/$(VP8_PREFIX)vp8dx.mk
CODEC_SRCS-yes += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_DX_SRCS))
CODEC_EXPORTS-yes += $(addprefix $(VP8_PREFIX),$(VP8_DX_EXPORTS))
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP8_PREFIX)/%
CODEC_DOC_SECTIONS += vp8 vp8_decoder
endif
ifeq ($(CONFIG_VP9),yes)
VP9_PREFIX=vp9/
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9_common.mk
endif
ifeq ($(CONFIG_VP9_ENCODER),yes)
VP9_PREFIX=vp9/
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9cx.mk
CODEC_SRCS-yes += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_CX_SRCS))
CODEC_EXPORTS-yes += $(addprefix $(VP9_PREFIX),$(VP9_CX_EXPORTS))
CODEC_SRCS-yes += $(VP9_PREFIX)vp9cx.mk vpx/vp8.h vpx/vp8cx.h
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
INSTALL-LIBS-$(CONFIG_SPATIAL_SVC) += include/vpx/svc_context.h
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP9_PREFIX)/%
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h
CODEC_DOC_SECTIONS += vp9 vp9_encoder
endif
ifeq ($(CONFIG_VP9_DECODER),yes)
VP9_PREFIX=vp9/
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9dx.mk
CODEC_SRCS-yes += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_DX_SRCS))
CODEC_EXPORTS-yes += $(addprefix $(VP9_PREFIX),$(VP9_DX_EXPORTS))
CODEC_SRCS-yes += $(VP9_PREFIX)vp9dx.mk vpx/vp8.h vpx/vp8dx.h
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP9_PREFIX)/%
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
CODEC_DOC_SECTIONS += vp9 vp9_decoder
endif
VP9_PREFIX=vp9/
$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
# VP10 make file
ifeq ($(CONFIG_VP10),yes)
VP10_PREFIX=vp10/

View File

@ -113,15 +113,22 @@ TEST_P(ActiveMapRefreshTest, Test) {
cfg_.rc_end_usage = VPX_CBR;
cfg_.kf_max_dist = 90000;
::libvpx_test::Y4mVideoSource video("desktop_credits.y4m", 0, 30);
::libvpx_test::Y4mVideoSource video_holder("desktop_credits.y4m", 0, 30);
#if CONFIG_VP10
const int nframes = codec_ == &libvpx_test::kVP10 ? 10 : 30;
#else
const int nframes = 30;
#endif // CONFIG_VP10
::libvpx_test::Y4mVideoSource video("desktop_credits.y4m", 0, nframes);
::libvpx_test::Y4mVideoSource video_holder("desktop_credits.y4m", 0, nframes);
video_holder.Begin();
y4m_holder_ = &video_holder;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
VP9_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
#if CONFIG_VP10
VP10_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(5, 6));
#endif // CONFIG_VP10
} // namespace

View File

@ -65,10 +65,7 @@ class ActiveMapTest
}
}
int cpu_used_;
};
TEST_P(ActiveMapTest, Test) {
void DoTest() {
// Validate that this non multiple of 64 wide clip encodes
cfg_.g_lag_in_frames = 0;
cfg_.rc_target_bitrate = 400;
@ -76,14 +73,31 @@ TEST_P(ActiveMapTest, Test) {
cfg_.g_pass = VPX_RC_ONE_PASS;
cfg_.rc_end_usage = VPX_CBR;
cfg_.kf_max_dist = 90000;
::libvpx_test::I420VideoSource video("hantro_odd.yuv", kWidth, kHeight, 30,
1, 0, 20);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
int cpu_used_;
};
TEST_P(ActiveMapTest, Test) {
DoTest();
}
VP9_INSTANTIATE_TEST_CASE(ActiveMapTest,
class ActiveMapTestLarge : public ActiveMapTest {};
TEST_P(ActiveMapTestLarge, Test) {
DoTest();
}
VP10_INSTANTIATE_TEST_CASE(ActiveMapTestLarge,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(0, 9));
::testing::Range(0, 5));
VP10_INSTANTIATE_TEST_CASE(ActiveMapTest,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(5, 9));
} // namespace

View File

@ -13,6 +13,7 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#include "vpx_dsp/postproc.h"
#include "vpx_mem/vpx_mem.h"
namespace {
@ -40,50 +41,6 @@ double stddev6(char a, char b, char c, char d, char e, char f) {
return sqrt(v);
}
// TODO(jimbankoski): The following 2 functions are duplicated in each codec.
// For now the vp9 one has been copied into the test as is. We should normalize
// these in vpx_dsp and not have 3 copies of these unless there is different
// noise we add for each codec.
double gaussian(double sigma, double mu, double x) {
return 1 / (sigma * sqrt(2.0 * 3.14159265)) *
(exp(-(x - mu) * (x - mu) / (2 * sigma * sigma)));
}
int setup_noise(int size_noise, char *noise) {
char char_dist[300];
const int ai = 4;
const int qi = 24;
const double sigma = ai + .5 + .6 * (63 - qi) / 63.0;
/* set up a lookup table of 256 entries that matches
* a gaussian distribution with sigma determined by q.
*/
int next = 0;
for (int i = -32; i < 32; i++) {
int a_i = (int) (0.5 + 256 * gaussian(sigma, 0, i));
if (a_i) {
for (int j = 0; j < a_i; j++) {
char_dist[next + j] = (char)(i);
}
next = next + a_i;
}
}
for (; next < 256; next++)
char_dist[next] = 0;
for (int i = 0; i < size_noise; i++) {
noise[i] = char_dist[rand() & 0xff]; // NOLINT
}
// Returns the most negative value in distribution.
return char_dist[0];
}
TEST_P(AddNoiseTest, CheckNoiseAdded) {
DECLARE_ALIGNED(16, char, blackclamp[16]);
DECLARE_ALIGNED(16, char, whiteclamp[16]);
@ -92,12 +49,12 @@ TEST_P(AddNoiseTest, CheckNoiseAdded) {
const int height = 64;
const int image_size = width * height;
char noise[3072];
const int clamp = vpx_setup_noise(4.4, sizeof(noise), noise);
const int clamp = setup_noise(3072, noise);
for (int i = 0; i < 16; i++) {
blackclamp[i] = -clamp;
whiteclamp[i] = -clamp;
bothclamp[i] = -2 * clamp;
blackclamp[i] = clamp;
whiteclamp[i] = clamp;
bothclamp[i] = 2 * clamp;
}
uint8_t *const s = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
@ -127,7 +84,7 @@ TEST_P(AddNoiseTest, CheckNoiseAdded) {
// Check to make sure don't roll over.
for (int i = 0; i < image_size; ++i) {
EXPECT_GT((int)s[i], 10) << "i = " << i;
EXPECT_GT(static_cast<int>(s[i]), clamp) << "i = " << i;
}
// Initialize pixels in the image to 0 and check for roll under.
@ -138,7 +95,7 @@ TEST_P(AddNoiseTest, CheckNoiseAdded) {
// Check to make sure don't roll under.
for (int i = 0; i < image_size; ++i) {
EXPECT_LT((int)s[i], 245) << "i = " << i;
EXPECT_LT(static_cast<int>(s[i]), 255 - clamp) << "i = " << i;
}
vpx_free(s);
@ -153,11 +110,12 @@ TEST_P(AddNoiseTest, CheckCvsAssembly) {
const int image_size = width * height;
char noise[3072];
const int clamp = setup_noise(3072, noise);
const int clamp = vpx_setup_noise(4.4, sizeof(noise), noise);
for (int i = 0; i < 16; i++) {
blackclamp[i] = -clamp;
whiteclamp[i] = -clamp;
bothclamp[i] = -2 * clamp;
blackclamp[i] = clamp;
whiteclamp[i] = clamp;
bothclamp[i] = 2 * clamp;
}
uint8_t *const s = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
@ -175,7 +133,7 @@ TEST_P(AddNoiseTest, CheckCvsAssembly) {
width, height, width));
for (int i = 0; i < image_size; ++i) {
EXPECT_EQ((int)s[i], (int)d[i]) << "i = " << i;
EXPECT_EQ(static_cast<int>(s[i]), static_cast<int>(d[i])) << "i = " << i;
}
vpx_free(d);

View File

@ -14,62 +14,6 @@
#include "test/util.h"
namespace {
#if CONFIG_VP8_ENCODER
// lookahead range: [kLookAheadMin, kLookAheadMax).
const int kLookAheadMin = 5;
const int kLookAheadMax = 26;
class AltRefTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<int> {
protected:
AltRefTest() : EncoderTest(GET_PARAM(0)), altref_count_(0) {}
virtual ~AltRefTest() {}
virtual void SetUp() {
InitializeConfig();
SetMode(libvpx_test::kTwoPassGood);
}
virtual void BeginPassHook(unsigned int pass) {
altref_count_ = 0;
}
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
libvpx_test::Encoder *encoder) {
if (video->frame() == 1) {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
encoder->Control(VP8E_SET_CPUUSED, 3);
}
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
if (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) ++altref_count_;
}
int altref_count() const { return altref_count_; }
private:
int altref_count_;
};
TEST_P(AltRefTest, MonotonicTimestamps) {
const vpx_rational timebase = { 33333333, 1000000000 };
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = 1000;
cfg_.g_lag_in_frames = GET_PARAM(1);
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 30);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
EXPECT_GE(altref_count(), 1);
}
VP8_INSTANTIATE_TEST_CASE(AltRefTest,
::testing::Range(kLookAheadMin, kLookAheadMax));
#endif // CONFIG_VP8_ENCODER
class AltRefForcedKeyTestLarge
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
@ -95,11 +39,6 @@ class AltRefForcedKeyTestLarge
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
// override test default for tile columns if necessary.
#if CONFIG_VP9_ENCODER
if (GET_PARAM(0) == &libvpx_test::kVP9) {
encoder->Control(VP9E_SET_TILE_COLUMNS, 6);
}
#endif
#if CONFIG_VP10_ENCODER
if (GET_PARAM(0) == &libvpx_test::kVP10) {
encoder->Control(VP9E_SET_TILE_COLUMNS, 6);
@ -152,16 +91,6 @@ TEST_P(AltRefForcedKeyTestLarge, ForcedFrameIsKey) {
}
}
VP8_INSTANTIATE_TEST_CASE(
AltRefForcedKeyTestLarge,
::testing::Values(::libvpx_test::kOnePassGood),
::testing::Range(0, 9));
VP9_INSTANTIATE_TEST_CASE(
AltRefForcedKeyTestLarge,
::testing::Values(::libvpx_test::kOnePassGood),
::testing::Range(0, 9));
VP10_INSTANTIATE_TEST_CASE(
AltRefForcedKeyTestLarge,
::testing::Values(::libvpx_test::kOnePassGood),

View File

@ -38,6 +38,22 @@ class AqSegmentTest
}
}
void DoTest(int aq_mode) {
aq_mode_ = aq_mode;
cfg_.kf_max_dist = 12;
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_lag_in_frames = 6;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_target_bitrate = 300;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv",
352, 288, 30, 1, 0, 15);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
int set_cpu_used_;
int aq_mode_;
};
@ -45,65 +61,42 @@ class AqSegmentTest
// Validate that this AQ segmentation mode (AQ=1, variance_ap)
// encodes and decodes without a mismatch.
TEST_P(AqSegmentTest, TestNoMisMatchAQ1) {
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_target_bitrate = 300;
aq_mode_ = 1;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 100);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
DoTest(1);
}
// Validate that this AQ segmentation mode (AQ=2, complexity_aq)
// encodes and decodes without a mismatch.
TEST_P(AqSegmentTest, TestNoMisMatchAQ2) {
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_target_bitrate = 300;
aq_mode_ = 2;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 100);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
DoTest(2);
}
// Validate that this AQ segmentation mode (AQ=3, cyclic_refresh_aq)
// encodes and decodes without a mismatch.
TEST_P(AqSegmentTest, TestNoMisMatchAQ3) {
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_target_bitrate = 300;
aq_mode_ = 3;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 100);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
DoTest(3);
}
VP9_INSTANTIATE_TEST_CASE(AqSegmentTest,
class AqSegmentTestLarge : public AqSegmentTest {};
TEST_P(AqSegmentTestLarge, TestNoMisMatchAQ1) {
DoTest(1);
}
TEST_P(AqSegmentTestLarge, TestNoMisMatchAQ2) {
DoTest(2);
}
TEST_P(AqSegmentTestLarge, TestNoMisMatchAQ3) {
DoTest(3);
}
VP10_INSTANTIATE_TEST_CASE(AqSegmentTest,
::testing::Values(::libvpx_test::kRealTime,
::libvpx_test::kOnePassGood),
::testing::Range(3, 9));
::testing::Range(5, 9));
VP10_INSTANTIATE_TEST_CASE(AqSegmentTestLarge,
::testing::Values(::libvpx_test::kRealTime,
::libvpx_test::kOnePassGood),
::testing::Range(3, 5));
} // namespace

View File

@ -15,7 +15,7 @@
#include "test/util.h"
#include "test/y4m_video_source.h"
#include "test/yuv_video_source.h"
#include "vp9/encoder/vp9_ratectrl.h"
#include "vp10/encoder/ratectrl.h"
namespace {
@ -50,9 +50,9 @@ const TestVideoParam kTestVectors[] = {
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
{"rush_hour_444.y4m", 352, 288, 30, 1,
8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// Add list of profile 2/3 test videos here ...
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
const TestEncodeParam kEncodeVectors[] = {
@ -78,19 +78,19 @@ int is_extension_y4m(const char *filename) {
return !strcmp(dot, ".y4m");
}
class ArfFreqTest
class ArfFreqTestLarge
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith3Params<TestVideoParam, \
TestEncodeParam, int> {
protected:
ArfFreqTest()
ArfFreqTestLarge()
: EncoderTest(GET_PARAM(0)),
test_video_param_(GET_PARAM(1)),
test_encode_param_(GET_PARAM(2)),
min_arf_requested_(GET_PARAM(3)) {
}
virtual ~ArfFreqTest() {}
virtual ~ArfFreqTestLarge() {}
virtual void SetUp() {
InitializeConfig();
@ -175,7 +175,7 @@ class ArfFreqTest
if (min_arf_requested_)
return min_arf_requested_;
else
return vp9_rc_get_default_min_gf_interval(
return vp10_rc_get_default_min_gf_interval(
test_video_param_.width, test_video_param_.height,
(double)test_video_param_.framerate_num /
test_video_param_.framerate_den);
@ -190,7 +190,7 @@ class ArfFreqTest
int run_of_visible_frames_;
};
TEST_P(ArfFreqTest, MinArfFreqTest) {
TEST_P(ArfFreqTestLarge, MinArfFreqTest) {
cfg_.rc_target_bitrate = kBitrate;
cfg_.g_error_resilient = 0;
cfg_.g_profile = test_video_param_.profile;
@ -200,53 +200,50 @@ TEST_P(ArfFreqTest, MinArfFreqTest) {
if (cfg_.g_bit_depth > 8)
init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
libvpx_test::VideoSource *video;
testing::internal::scoped_ptr<libvpx_test::VideoSource> video;
if (is_extension_y4m(test_video_param_.filename)) {
video = new libvpx_test::Y4mVideoSource(test_video_param_.filename,
0, kFrames);
video.reset(new libvpx_test::Y4mVideoSource(test_video_param_.filename,
0, kFrames));
} else {
video = new libvpx_test::YUVVideoSource(test_video_param_.filename,
video.reset(new libvpx_test::YUVVideoSource(test_video_param_.filename,
test_video_param_.fmt,
test_video_param_.width,
test_video_param_.height,
test_video_param_.framerate_num,
test_video_param_.framerate_den,
0, kFrames);
0, kFrames));
}
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
ASSERT_NO_FATAL_FAILURE(RunLoop(video.get()));
const int min_run = GetMinVisibleRun();
const int min_arf_dist_requested = GetMinArfDistanceRequested();
if (min_run != ARF_NOT_SEEN && min_run != ARF_SEEN_ONCE) {
const int min_arf_dist = min_run + 1;
EXPECT_GE(min_arf_dist, min_arf_dist_requested);
}
delete(video);
}
VP9_INSTANTIATE_TEST_CASE(
ArfFreqTest,
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
#if CONFIG_VP9_HIGHBITDEPTH
# if CONFIG_VP10_ENCODER
#if CONFIG_VPX_HIGHBITDEPTH || CONFIG_EXT_REFS
#if CONFIG_VP10_ENCODER
// TODO(angiebird): 25-29 fail in high bitdepth mode.
// TODO(zoeliu): This ArfFreqTest does not work with BWDREF_FRAME, as
// BWDREF_FRAME is also a non-show frame, and the minimum run between two
// consecutive BWDREF_FRAME's may vary between 1 and any arbitrary positive
// number as long as it does not exceed the gf_group interval.
INSTANTIATE_TEST_CASE_P(
DISABLED_VP10, ArfFreqTest,
DISABLED_VP10, ArfFreqTestLarge,
::testing::Combine(
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
&libvpx_test::kVP10)),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors)));
# endif // CONFIG_VP10_ENCODER
#endif // CONFIG_VP10_ENCODER
#else
VP10_INSTANTIATE_TEST_CASE(
ArfFreqTest,
ArfFreqTestLarge,
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH || CONFIG_EXT_REFS
} // namespace

View File

@ -0,0 +1,367 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/register_state_check.h"
#include "test/function_equivalence_test.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#include "./vp10_rtcd.h"
#include "vp10/common/enums.h"
#include "vpx_dsp/blend.h"
using libvpx_test::FunctionEquivalenceTest;
namespace {
template<typename F, typename T>
class BlendA64Mask1DTest : public FunctionEquivalenceTest<F> {
public:
static const int kIterations = 10000;
static const int kMaxWidth = MAX_SB_SIZE * 5; // * 5 to cover longer strides
static const int kMaxHeight = MAX_SB_SIZE;
static const int kBufSize = kMaxWidth * kMaxHeight;
static const int kMaxMaskWidth = 2 * MAX_SB_SIZE;
static const int kMaxMaskSize = kMaxMaskWidth;
virtual ~BlendA64Mask1DTest() {}
virtual void Execute(const T *p_src0, const T *p_src1) = 0;
void Common() {
w_ = 1 << this->rng_(MAX_SB_SIZE_LOG2 + 1);
h_ = 1 << this->rng_(MAX_SB_SIZE_LOG2 + 1);
dst_offset_ = this->rng_(33);
dst_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
src0_offset_ = this->rng_(33);
src0_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
src1_offset_ = this->rng_(33);
src1_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
T *p_src0;
T *p_src1;
switch (this->rng_(3)) {
case 0: // Separate sources
p_src0 = src0_;
p_src1 = src1_;
break;
case 1: // src0 == dst
p_src0 = dst_tst_;
src0_stride_ = dst_stride_;
src0_offset_ = dst_offset_;
p_src1 = src1_;
break;
case 2: // src1 == dst
p_src0 = src0_;
p_src1 = dst_tst_;
src1_stride_ = dst_stride_;
src1_offset_ = dst_offset_;
break;
default:
FAIL();
}
Execute(p_src0, p_src1);
for (int r = 0 ; r < h_ ; ++r) {
for (int c = 0 ; c < w_ ; ++c) {
ASSERT_EQ(dst_ref_[dst_offset_ + r * dst_stride_ + c],
dst_tst_[dst_offset_ + r * dst_stride_ + c]);
}
}
}
T dst_ref_[kBufSize];
T dst_tst_[kBufSize];
size_t dst_stride_;
size_t dst_offset_;
T src0_[kBufSize];
size_t src0_stride_;
size_t src0_offset_;
T src1_[kBufSize];
size_t src1_stride_;
size_t src1_offset_;
uint8_t mask_[kMaxMaskSize];
int w_;
int h_;
};
//////////////////////////////////////////////////////////////////////////////
// 8 bit version
//////////////////////////////////////////////////////////////////////////////
typedef void (*F8B)(uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w);
typedef libvpx_test::FuncParam<F8B> TestFuncs;
class BlendA64Mask1DTest8B : public BlendA64Mask1DTest<F8B, uint8_t> {
protected:
void Execute(const uint8_t *p_src0, const uint8_t *p_src1) {
params_.ref_func(dst_ref_ + dst_offset_, dst_stride_,
p_src0 + src0_offset_, src0_stride_,
p_src1 + src1_offset_, src1_stride_, mask_, h_, w_);
ASM_REGISTER_STATE_CHECK(
params_.tst_func(dst_tst_ + dst_offset_, dst_stride_,
p_src0 + src0_offset_, src0_stride_,
p_src1 + src1_offset_, src1_stride_, mask_, h_, w_));
}
};
TEST_P(BlendA64Mask1DTest8B, RandomValues) {
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_.Rand8();
dst_tst_[i] = rng_.Rand8();
src0_[i] = rng_.Rand8();
src1_[i] = rng_.Rand8();
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(VPX_BLEND_A64_MAX_ALPHA + 1);
Common();
}
}
TEST_P(BlendA64Mask1DTest8B, ExtremeValues) {
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_(2) + 254;
dst_tst_[i] = rng_(2) + 254;
src0_[i] = rng_(2) + 254;
src1_[i] = rng_(2) + 254;
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(2) + VPX_BLEND_A64_MAX_ALPHA - 1;
Common();
}
}
static void blend_a64_hmask_ref(
uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w) {
uint8_t mask2d[BlendA64Mask1DTest8B::kMaxMaskSize]
[BlendA64Mask1DTest8B::kMaxMaskSize];
for (int row = 0 ; row < h ; ++row)
for (int col = 0 ; col < w ; ++col)
mask2d[row][col] = mask[col];
vpx_blend_a64_mask_c(dst, dst_stride,
src0, src0_stride,
src1, src1_stride,
&mask2d[0][0], BlendA64Mask1DTest8B::kMaxMaskSize,
h, w, 0, 0);
}
static void blend_a64_vmask_ref(
uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w) {
uint8_t mask2d[BlendA64Mask1DTest8B::kMaxMaskSize]
[BlendA64Mask1DTest8B::kMaxMaskSize];
for (int row = 0 ; row < h ; ++row)
for (int col = 0 ; col < w ; ++col)
mask2d[row][col] = mask[row];
vpx_blend_a64_mask_c(dst, dst_stride,
src0, src0_stride,
src1, src1_stride,
&mask2d[0][0], BlendA64Mask1DTest8B::kMaxMaskSize,
h, w, 0, 0);
}
INSTANTIATE_TEST_CASE_P(
C, BlendA64Mask1DTest8B,
::testing::Values(TestFuncs(blend_a64_hmask_ref, vpx_blend_a64_hmask_c),
TestFuncs(blend_a64_vmask_ref, vpx_blend_a64_vmask_c)));
#if HAVE_SSE4_1
INSTANTIATE_TEST_CASE_P(
SSE4_1, BlendA64Mask1DTest8B,
::testing::Values(
TestFuncs(blend_a64_hmask_ref, vpx_blend_a64_hmask_sse4_1),
TestFuncs(blend_a64_vmask_ref, vpx_blend_a64_vmask_sse4_1)));
#endif // HAVE_SSE4_1
#if CONFIG_VPX_HIGHBITDEPTH
//////////////////////////////////////////////////////////////////////////////
// High bit-depth version
//////////////////////////////////////////////////////////////////////////////
typedef void (*FHBD)(uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w, int bd);
typedef libvpx_test::FuncParam<FHBD> TestFuncsHBD;
class BlendA64Mask1DTestHBD : public BlendA64Mask1DTest<FHBD, uint16_t> {
protected:
void Execute(const uint16_t *p_src0, const uint16_t *p_src1) {
params_.ref_func(CONVERT_TO_BYTEPTR(dst_ref_ + dst_offset_), dst_stride_,
CONVERT_TO_BYTEPTR(p_src0 + src0_offset_), src0_stride_,
CONVERT_TO_BYTEPTR(p_src1 + src1_offset_), src1_stride_,
mask_, h_, w_, bit_depth_);
ASM_REGISTER_STATE_CHECK(params_.tst_func(
CONVERT_TO_BYTEPTR(dst_tst_ + dst_offset_), dst_stride_,
CONVERT_TO_BYTEPTR(p_src0 + src0_offset_), src0_stride_,
CONVERT_TO_BYTEPTR(p_src1 + src1_offset_), src1_stride_,
mask_, h_, w_, bit_depth_));
}
int bit_depth_;
};
TEST_P(BlendA64Mask1DTestHBD, RandomValues) {
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
switch (rng_(3)) {
case 0:
bit_depth_ = 8;
break;
case 1:
bit_depth_ = 10;
break;
default:
bit_depth_ = 12;
break;
}
const int hi = 1 << bit_depth_;
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_(hi);
dst_tst_[i] = rng_(hi);
src0_[i] = rng_(hi);
src1_[i] = rng_(hi);
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(VPX_BLEND_A64_MAX_ALPHA + 1);
Common();
}
}
TEST_P(BlendA64Mask1DTestHBD, ExtremeValues) {
for (int iter = 0 ; iter < 1000 && !HasFatalFailure(); ++iter) {
switch (rng_(3)) {
case 0:
bit_depth_ = 8;
break;
case 1:
bit_depth_ = 10;
break;
default:
bit_depth_ = 12;
break;
}
const int hi = 1 << bit_depth_;
const int lo = hi - 2;
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_(hi - lo) + lo;
dst_tst_[i] = rng_(hi - lo) + lo;
src0_[i] = rng_(hi - lo) + lo;
src1_[i] = rng_(hi - lo) + lo;
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(2) + VPX_BLEND_A64_MAX_ALPHA - 1;
Common();
}
}
static void highbd_blend_a64_hmask_ref(
uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w, int bd) {
uint8_t mask2d[BlendA64Mask1DTestHBD::kMaxMaskSize]
[BlendA64Mask1DTestHBD::kMaxMaskSize];
for (int row = 0 ; row < h ; ++row)
for (int col = 0 ; col < w ; ++col)
mask2d[row][col] = mask[col];
vpx_highbd_blend_a64_mask_c(dst, dst_stride,
src0, src0_stride,
src1, src1_stride,
&mask2d[0][0],
BlendA64Mask1DTestHBD::kMaxMaskSize,
h, w, 0, 0, bd);
}
static void highbd_blend_a64_vmask_ref(
uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w, int bd) {
uint8_t mask2d[BlendA64Mask1DTestHBD::kMaxMaskSize]
[BlendA64Mask1DTestHBD::kMaxMaskSize];
for (int row = 0 ; row < h ; ++row)
for (int col = 0 ; col < w ; ++col)
mask2d[row][col] = mask[row];
vpx_highbd_blend_a64_mask_c(dst, dst_stride,
src0, src0_stride,
src1, src1_stride,
&mask2d[0][0],
BlendA64Mask1DTestHBD::kMaxMaskSize,
h, w, 0, 0, bd);
}
INSTANTIATE_TEST_CASE_P(
C, BlendA64Mask1DTestHBD,
::testing::Values(
TestFuncsHBD(highbd_blend_a64_hmask_ref, vpx_highbd_blend_a64_hmask_c),
TestFuncsHBD(highbd_blend_a64_vmask_ref, vpx_highbd_blend_a64_vmask_c)));
#if HAVE_SSE4_1
INSTANTIATE_TEST_CASE_P(
SSE4_1, BlendA64Mask1DTestHBD,
::testing::Values(
TestFuncsHBD(highbd_blend_a64_hmask_ref,
vpx_highbd_blend_a64_hmask_sse4_1),
TestFuncsHBD(highbd_blend_a64_vmask_ref,
vpx_highbd_blend_a64_vmask_sse4_1)));
#endif // HAVE_SSE4_1
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

288
test/blend_a64_mask_test.cc Normal file
View File

@ -0,0 +1,288 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/register_state_check.h"
#include "test/function_equivalence_test.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#include "./vp10_rtcd.h"
#include "vp10/common/enums.h"
#include "vpx_dsp/blend.h"
using libvpx_test::FunctionEquivalenceTest;
namespace {
template<typename F, typename T>
class BlendA64MaskTest : public FunctionEquivalenceTest<F> {
protected:
static const int kIterations = 10000;
static const int kMaxWidth = MAX_SB_SIZE * 5; // * 5 to cover longer strides
static const int kMaxHeight = MAX_SB_SIZE;
static const int kBufSize = kMaxWidth * kMaxHeight;
static const int kMaxMaskWidth = 2 * MAX_SB_SIZE;
static const int kMaxMaskSize = kMaxMaskWidth * kMaxMaskWidth;
virtual ~BlendA64MaskTest() {}
virtual void Execute(const T *p_src0, const T *p_src1) = 0;
void Common() {
w_ = 1 << this->rng_(MAX_SB_SIZE_LOG2 + 1);
h_ = 1 << this->rng_(MAX_SB_SIZE_LOG2 + 1);
subx_ = this->rng_(2);
suby_ = this->rng_(2);
dst_offset_ = this->rng_(33);
dst_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
src0_offset_ = this->rng_(33);
src0_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
src1_offset_ = this->rng_(33);
src1_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
mask_stride_ = this->rng_(kMaxWidth + 1 - w_ * (subx_ ? 2 : 1)) +
w_ * (subx_ ? 2 : 1);
T *p_src0;
T *p_src1;
switch (this->rng_(3)) {
case 0: // Separate sources
p_src0 = src0_;
p_src1 = src1_;
break;
case 1: // src0 == dst
p_src0 = dst_tst_;
src0_stride_ = dst_stride_;
src0_offset_ = dst_offset_;
p_src1 = src1_;
break;
case 2: // src1 == dst
p_src0 = src0_;
p_src1 = dst_tst_;
src1_stride_ = dst_stride_;
src1_offset_ = dst_offset_;
break;
default:
FAIL();
}
Execute(p_src0, p_src1);
for (int r = 0 ; r < h_ ; ++r) {
for (int c = 0 ; c < w_ ; ++c) {
ASSERT_EQ(dst_ref_[dst_offset_ + r * dst_stride_ + c],
dst_tst_[dst_offset_ + r * dst_stride_ + c]);
}
}
}
T dst_ref_[kBufSize];
T dst_tst_[kBufSize];
size_t dst_stride_;
size_t dst_offset_;
T src0_[kBufSize];
size_t src0_stride_;
size_t src0_offset_;
T src1_[kBufSize];
size_t src1_stride_;
size_t src1_offset_;
uint8_t mask_[kMaxMaskSize];
size_t mask_stride_;
int w_;
int h_;
bool suby_;
bool subx_;
};
//////////////////////////////////////////////////////////////////////////////
// 8 bit version
//////////////////////////////////////////////////////////////////////////////
typedef void (*F8B)(uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride,
int h, int w, int suby, int subx);
typedef libvpx_test::FuncParam<F8B> TestFuncs;
class BlendA64MaskTest8B : public BlendA64MaskTest<F8B, uint8_t> {
protected:
void Execute(const uint8_t *p_src0, const uint8_t *p_src1) {
params_.ref_func(dst_ref_ + dst_offset_, dst_stride_,
p_src0 + src0_offset_, src0_stride_,
p_src1 + src1_offset_, src1_stride_,
mask_, kMaxMaskWidth, h_, w_, suby_, subx_);
ASM_REGISTER_STATE_CHECK(
params_.tst_func(dst_tst_ + dst_offset_, dst_stride_,
p_src0 + src0_offset_, src0_stride_,
p_src1 + src1_offset_, src1_stride_,
mask_, kMaxMaskWidth, h_, w_, suby_, subx_));
}
};
TEST_P(BlendA64MaskTest8B, RandomValues) {
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_.Rand8();
dst_tst_[i] = rng_.Rand8();
src0_[i] = rng_.Rand8();
src1_[i] = rng_.Rand8();
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(VPX_BLEND_A64_MAX_ALPHA + 1);
Common();
}
}
TEST_P(BlendA64MaskTest8B, ExtremeValues) {
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_(2) + 254;
dst_tst_[i] = rng_(2) + 254;
src0_[i] = rng_(2) + 254;
src1_[i] = rng_(2) + 254;
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(2) + VPX_BLEND_A64_MAX_ALPHA - 1;
Common();
}
}
#if HAVE_SSE4_1
INSTANTIATE_TEST_CASE_P(
SSE4_1_C_COMPARE, BlendA64MaskTest8B,
::testing::Values(
TestFuncs(vpx_blend_a64_mask_c, vpx_blend_a64_mask_sse4_1)));
#endif // HAVE_SSE4_1
#if CONFIG_VPX_HIGHBITDEPTH
//////////////////////////////////////////////////////////////////////////////
// High bit-depth version
//////////////////////////////////////////////////////////////////////////////
typedef void (*FHBD)(uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride,
int h, int w, int suby, int subx, int bd);
typedef libvpx_test::FuncParam<FHBD> TestFuncsHBD;
class BlendA64MaskTestHBD : public BlendA64MaskTest<FHBD, uint16_t> {
protected:
void Execute(const uint16_t *p_src0, const uint16_t *p_src1) {
params_.ref_func(CONVERT_TO_BYTEPTR(dst_ref_ + dst_offset_), dst_stride_,
CONVERT_TO_BYTEPTR(p_src0 + src0_offset_), src0_stride_,
CONVERT_TO_BYTEPTR(p_src1 + src1_offset_), src1_stride_,
mask_, kMaxMaskWidth, h_, w_, suby_, subx_, bit_depth_);
ASM_REGISTER_STATE_CHECK(params_.tst_func(
CONVERT_TO_BYTEPTR(dst_tst_ + dst_offset_), dst_stride_,
CONVERT_TO_BYTEPTR(p_src0 + src0_offset_), src0_stride_,
CONVERT_TO_BYTEPTR(p_src1 + src1_offset_), src1_stride_,
mask_, kMaxMaskWidth, h_, w_, suby_, subx_, bit_depth_));
}
int bit_depth_;
};
TEST_P(BlendA64MaskTestHBD, RandomValues) {
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
switch (rng_(3)) {
case 0:
bit_depth_ = 8;
break;
case 1:
bit_depth_ = 10;
break;
default:
bit_depth_ = 12;
break;
}
const int hi = 1 << bit_depth_;
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_(hi);
dst_tst_[i] = rng_(hi);
src0_[i] = rng_(hi);
src1_[i] = rng_(hi);
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(VPX_BLEND_A64_MAX_ALPHA + 1);
Common();
}
}
TEST_P(BlendA64MaskTestHBD, ExtremeValues) {
for (int iter = 0 ; iter < 1000 && !HasFatalFailure(); ++iter) {
switch (rng_(3)) {
case 0:
bit_depth_ = 8;
break;
case 1:
bit_depth_ = 10;
break;
default:
bit_depth_ = 12;
break;
}
const int hi = 1 << bit_depth_;
const int lo = hi - 2;
for (int i = 0 ; i < kBufSize ; ++i) {
dst_ref_[i] = rng_(hi - lo) + lo;
dst_tst_[i] = rng_(hi - lo) + lo;
src0_[i] = rng_(hi - lo) + lo;
src1_[i] = rng_(hi - lo) + lo;
}
for (int i = 0 ; i < kMaxMaskSize ; ++i)
mask_[i] = rng_(2) + VPX_BLEND_A64_MAX_ALPHA - 1;
Common();
}
}
#if HAVE_SSE4_1
INSTANTIATE_TEST_CASE_P(
SSE4_1_C_COMPARE, BlendA64MaskTestHBD,
::testing::Values(
TestFuncsHBD(vpx_highbd_blend_a64_mask_c,
vpx_highbd_blend_a64_mask_sse4_1)));
#endif // HAVE_SSE4_1
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -1,229 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#if CONFIG_VP9_ENCODER
#include "./vp9_rtcd.h"
#endif
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vpx_mem/vpx_mem.h"
extern "C"
double vp9_get_blockiness(const unsigned char *img1, int img1_pitch,
const unsigned char *img2, int img2_pitch,
int width, int height);
using libvpx_test::ACMRandom;
namespace {
class BlockinessTestBase : public ::testing::Test {
public:
BlockinessTestBase(int width, int height) : width_(width), height_(height) {}
static void SetUpTestCase() {
source_data_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
reference_data_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
}
static void TearDownTestCase() {
vpx_free(source_data_);
source_data_ = NULL;
vpx_free(reference_data_);
reference_data_ = NULL;
}
virtual void TearDown() {
libvpx_test::ClearSystemState();
}
protected:
// Handle frames up to 640x480
static const int kDataAlignment = 16;
static const int kDataBufferSize = 640*480;
virtual void SetUp() {
source_stride_ = (width_ + 31) & ~31;
reference_stride_ = width_ * 2;
rnd_.Reset(ACMRandom::DeterministicSeed());
}
void FillConstant(uint8_t *data, int stride, uint8_t fill_constant,
int width, int height) {
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
data[h * stride + w] = fill_constant;
}
}
}
void FillConstant(uint8_t *data, int stride, uint8_t fill_constant) {
FillConstant(data, stride, fill_constant, width_, height_);
}
void FillRandom(uint8_t *data, int stride, int width, int height) {
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
data[h * stride + w] = rnd_.Rand8();
}
}
}
void FillRandom(uint8_t *data, int stride) {
FillRandom(data, stride, width_, height_);
}
void FillRandomBlocky(uint8_t *data, int stride) {
for (int h = 0; h < height_; h += 4) {
for (int w = 0; w < width_; w += 4) {
FillRandom(data + h * stride + w, stride, 4, 4);
}
}
}
void FillCheckerboard(uint8_t *data, int stride) {
for (int h = 0; h < height_; h += 4) {
for (int w = 0; w < width_; w += 4) {
if (((h/4) ^ (w/4)) & 1)
FillConstant(data + h * stride + w, stride, 255, 4, 4);
else
FillConstant(data + h * stride + w, stride, 0, 4, 4);
}
}
}
void Blur(uint8_t *data, int stride, int taps) {
int sum = 0;
int half_taps = taps / 2;
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < taps; ++w) {
sum += data[w + h * stride];
}
for (int w = taps; w < width_; ++w) {
sum += data[w + h * stride] - data[w - taps + h * stride];
data[w - half_taps + h * stride] = (sum + half_taps) / taps;
}
}
for (int w = 0; w < width_; ++w) {
for (int h = 0; h < taps; ++h) {
sum += data[h + w * stride];
}
for (int h = taps; h < height_; ++h) {
sum += data[w + h * stride] - data[(h - taps) * stride + w];
data[(h - half_taps) * stride + w] = (sum + half_taps) / taps;
}
}
}
int width_, height_;
static uint8_t* source_data_;
int source_stride_;
static uint8_t* reference_data_;
int reference_stride_;
ACMRandom rnd_;
};
#if CONFIG_VP9_ENCODER
typedef std::tr1::tuple<int, int> BlockinessParam;
class BlockinessVP9Test
: public BlockinessTestBase,
public ::testing::WithParamInterface<BlockinessParam> {
public:
BlockinessVP9Test() : BlockinessTestBase(GET_PARAM(0), GET_PARAM(1)) {}
protected:
int CheckBlockiness() {
return vp9_get_blockiness(source_data_, source_stride_,
reference_data_, reference_stride_,
width_, height_);
}
};
#endif // CONFIG_VP9_ENCODER
uint8_t* BlockinessTestBase::source_data_ = NULL;
uint8_t* BlockinessTestBase::reference_data_ = NULL;
#if CONFIG_VP9_ENCODER
TEST_P(BlockinessVP9Test, SourceBlockierThanReference) {
// Source is blockier than reference.
FillRandomBlocky(source_data_, source_stride_);
FillConstant(reference_data_, reference_stride_, 128);
int super_blocky = CheckBlockiness();
EXPECT_EQ(0, super_blocky) << "Blocky source should produce 0 blockiness.";
}
TEST_P(BlockinessVP9Test, ReferenceBlockierThanSource) {
// Source is blockier than reference.
FillConstant(source_data_, source_stride_, 128);
FillRandomBlocky(reference_data_, reference_stride_);
int super_blocky = CheckBlockiness();
EXPECT_GT(super_blocky, 0.0)
<< "Blocky reference should score high for blockiness.";
}
TEST_P(BlockinessVP9Test, BlurringDecreasesBlockiness) {
// Source is blockier than reference.
FillConstant(source_data_, source_stride_, 128);
FillRandomBlocky(reference_data_, reference_stride_);
int super_blocky = CheckBlockiness();
Blur(reference_data_, reference_stride_, 4);
int less_blocky = CheckBlockiness();
EXPECT_GT(super_blocky, less_blocky)
<< "A straight blur should decrease blockiness.";
}
TEST_P(BlockinessVP9Test, WorstCaseBlockiness) {
// Source is blockier than reference.
FillConstant(source_data_, source_stride_, 128);
FillCheckerboard(reference_data_, reference_stride_);
int super_blocky = CheckBlockiness();
Blur(reference_data_, reference_stride_, 4);
int less_blocky = CheckBlockiness();
EXPECT_GT(super_blocky, less_blocky)
<< "A straight blur should decrease blockiness.";
}
#endif // CONFIG_VP9_ENCODER
using std::tr1::make_tuple;
//------------------------------------------------------------------------------
// C functions
#if CONFIG_VP9_ENCODER
const BlockinessParam c_vp9_tests[] = {
make_tuple(320, 240),
make_tuple(318, 242),
make_tuple(318, 238),
};
INSTANTIATE_TEST_CASE_P(C, BlockinessVP9Test, ::testing::ValuesIn(c_vp9_tests));
#endif
} // namespace

View File

@ -78,9 +78,6 @@ TEST_P(BordersTest, TestLowBitrate) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
::libvpx_test::kTwoPassGood));
} // namespace

View File

@ -1,189 +0,0 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <string>
#include "./vpx_config.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/md5_helper.h"
#include "test/util.h"
#if CONFIG_WEBM_IO
#include "test/webm_video_source.h"
#endif
namespace {
#if CONFIG_WEBM_IO
const int kLegacyByteAlignment = 0;
const int kLegacyYPlaneByteAlignment = 32;
const int kNumPlanesToCheck = 3;
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
const char kVP9Md5File[] = "vp90-2-02-size-lf-1920x1080.webm.md5";
struct ByteAlignmentTestParam {
int byte_alignment;
vpx_codec_err_t expected_value;
bool decode_remaining;
};
const ByteAlignmentTestParam kBaTestParams[] = {
{kLegacyByteAlignment, VPX_CODEC_OK, true},
{32, VPX_CODEC_OK, true},
{64, VPX_CODEC_OK, true},
{128, VPX_CODEC_OK, true},
{256, VPX_CODEC_OK, true},
{512, VPX_CODEC_OK, true},
{1024, VPX_CODEC_OK, true},
{1, VPX_CODEC_INVALID_PARAM, false},
{-2, VPX_CODEC_INVALID_PARAM, false},
{4, VPX_CODEC_INVALID_PARAM, false},
{16, VPX_CODEC_INVALID_PARAM, false},
{255, VPX_CODEC_INVALID_PARAM, false},
{2048, VPX_CODEC_INVALID_PARAM, false},
};
// Class for testing byte alignment of reference buffers.
class ByteAlignmentTest
: public ::testing::TestWithParam<ByteAlignmentTestParam> {
protected:
ByteAlignmentTest()
: video_(NULL),
decoder_(NULL),
md5_file_(NULL) {}
virtual void SetUp() {
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
ASSERT_TRUE(video_ != NULL);
video_->Init();
video_->Begin();
const vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
ASSERT_TRUE(decoder_ != NULL);
OpenMd5File(kVP9Md5File);
}
virtual void TearDown() {
if (md5_file_ != NULL)
fclose(md5_file_);
delete decoder_;
delete video_;
}
void SetByteAlignment(int byte_alignment, vpx_codec_err_t expected_value) {
decoder_->Control(VP9_SET_BYTE_ALIGNMENT, byte_alignment, expected_value);
}
vpx_codec_err_t DecodeOneFrame(int byte_alignment_to_check) {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
CheckDecodedFrames(byte_alignment_to_check);
if (res == VPX_CODEC_OK)
video_->Next();
return res;
}
vpx_codec_err_t DecodeRemainingFrames(int byte_alignment_to_check) {
for (; video_->cxdata() != NULL; video_->Next()) {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
if (res != VPX_CODEC_OK)
return res;
CheckDecodedFrames(byte_alignment_to_check);
}
return VPX_CODEC_OK;
}
private:
// Check if |data| is aligned to |byte_alignment_to_check|.
// |byte_alignment_to_check| must be a power of 2.
void CheckByteAlignment(const uint8_t *data, int byte_alignment_to_check) {
ASSERT_EQ(0u, reinterpret_cast<size_t>(data) % byte_alignment_to_check);
}
// Iterate through the planes of the decoded frames and check for
// alignment based off |byte_alignment_to_check|.
void CheckDecodedFrames(int byte_alignment_to_check) {
libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
const vpx_image_t *img;
// Get decompressed data
while ((img = dec_iter.Next()) != NULL) {
if (byte_alignment_to_check == kLegacyByteAlignment) {
CheckByteAlignment(img->planes[0], kLegacyYPlaneByteAlignment);
} else {
for (int i = 0; i < kNumPlanesToCheck; ++i) {
CheckByteAlignment(img->planes[i], byte_alignment_to_check);
}
}
CheckMd5(*img);
}
}
// TODO(fgalligan): Move the MD5 testing code into another class.
void OpenMd5File(const std::string &md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "MD5 file open failed. Filename: "
<< md5_file_name_;
}
void CheckMd5(const vpx_image_t &img) {
ASSERT_TRUE(md5_file_ != NULL);
char expected_md5[33];
char junk[128];
// Read correct md5 checksums.
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
ASSERT_NE(EOF, res) << "Read md5 data failed";
expected_md5[32] = '\0';
::libvpx_test::MD5 md5_res;
md5_res.Add(&img);
const char *const actual_md5 = md5_res.Get();
// Check md5 match.
ASSERT_STREQ(expected_md5, actual_md5) << "MD5 checksums don't match";
}
libvpx_test::WebMVideoSource *video_;
libvpx_test::VP9Decoder *decoder_;
FILE *md5_file_;
};
TEST_F(ByteAlignmentTest, SwitchByteAlignment) {
const int num_elements = 14;
const int byte_alignments[] = { 0, 32, 64, 128, 256, 512, 1024,
0, 1024, 32, 512, 64, 256, 128 };
for (int i = 0; i < num_elements; ++i) {
SetByteAlignment(byte_alignments[i], VPX_CODEC_OK);
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame(byte_alignments[i]));
}
SetByteAlignment(byte_alignments[0], VPX_CODEC_OK);
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames(byte_alignments[0]));
}
TEST_P(ByteAlignmentTest, TestAlignment) {
const ByteAlignmentTestParam t = GetParam();
SetByteAlignment(t.byte_alignment, t.expected_value);
if (t.decode_remaining)
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames(t.byte_alignment));
}
INSTANTIATE_TEST_CASE_P(Alignments, ByteAlignmentTest,
::testing::ValuesIn(kBaTestParams));
#endif // CONFIG_WEBM_IO
} // namespace

View File

@ -13,10 +13,10 @@
#include "./vpx_config.h"
#include "vpx/vpx_decoder.h"
#include "vpx/vpx_encoder.h"
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
#if CONFIG_VP10_ENCODER
#include "vpx/vp8cx.h"
#endif
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER || CONFIG_VP10_DECODER
#if CONFIG_VP10_DECODER
#include "vpx/vp8dx.h"
#endif
@ -68,191 +68,6 @@ class CodecTestWith3Params : public ::testing::TestWithParam<
std::tr1::tuple< const libvpx_test::CodecFactory*, T1, T2, T3 > > {
};
/*
* VP8 Codec Definitions
*/
#if CONFIG_VP8
class VP8Decoder : public Decoder {
public:
VP8Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
: Decoder(cfg, deadline) {}
VP8Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
unsigned long deadline) // NOLINT
: Decoder(cfg, flag, deadline) {}
protected:
virtual vpx_codec_iface_t* CodecInterface() const {
#if CONFIG_VP8_DECODER
return &vpx_codec_vp8_dx_algo;
#else
return NULL;
#endif
}
};
class VP8Encoder : public Encoder {
public:
VP8Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
const unsigned long init_flags, TwopassStatsStore *stats)
: Encoder(cfg, deadline, init_flags, stats) {}
protected:
virtual vpx_codec_iface_t* CodecInterface() const {
#if CONFIG_VP8_ENCODER
return &vpx_codec_vp8_cx_algo;
#else
return NULL;
#endif
}
};
class VP8CodecFactory : public CodecFactory {
public:
VP8CodecFactory() : CodecFactory() {}
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
unsigned long deadline) const {
return CreateDecoder(cfg, 0, deadline);
}
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
const vpx_codec_flags_t flags,
unsigned long deadline) const { // NOLINT
#if CONFIG_VP8_DECODER
return new VP8Decoder(cfg, flags, deadline);
#else
return NULL;
#endif
}
virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const {
#if CONFIG_VP8_ENCODER
return new VP8Encoder(cfg, deadline, init_flags, stats);
#else
return NULL;
#endif
}
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
int usage) const {
#if CONFIG_VP8_ENCODER
return vpx_codec_enc_config_default(&vpx_codec_vp8_cx_algo, cfg, usage);
#else
return VPX_CODEC_INCAPABLE;
#endif
}
};
const libvpx_test::VP8CodecFactory kVP8;
#define VP8_INSTANTIATE_TEST_CASE(test, ...)\
INSTANTIATE_TEST_CASE_P(VP8, test, \
::testing::Combine( \
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
&libvpx_test::kVP8)), \
__VA_ARGS__))
#else
#define VP8_INSTANTIATE_TEST_CASE(test, ...)
#endif // CONFIG_VP8
/*
* VP9 Codec Definitions
*/
#if CONFIG_VP9
class VP9Decoder : public Decoder {
public:
VP9Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
: Decoder(cfg, deadline) {}
VP9Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
unsigned long deadline) // NOLINT
: Decoder(cfg, flag, deadline) {}
protected:
virtual vpx_codec_iface_t* CodecInterface() const {
#if CONFIG_VP9_DECODER
return &vpx_codec_vp9_dx_algo;
#else
return NULL;
#endif
}
};
class VP9Encoder : public Encoder {
public:
VP9Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
const unsigned long init_flags, TwopassStatsStore *stats)
: Encoder(cfg, deadline, init_flags, stats) {}
protected:
virtual vpx_codec_iface_t* CodecInterface() const {
#if CONFIG_VP9_ENCODER
return &vpx_codec_vp9_cx_algo;
#else
return NULL;
#endif
}
};
class VP9CodecFactory : public CodecFactory {
public:
VP9CodecFactory() : CodecFactory() {}
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
unsigned long deadline) const {
return CreateDecoder(cfg, 0, deadline);
}
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
const vpx_codec_flags_t flags,
unsigned long deadline) const { // NOLINT
#if CONFIG_VP9_DECODER
return new VP9Decoder(cfg, flags, deadline);
#else
return NULL;
#endif
}
virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const {
#if CONFIG_VP9_ENCODER
return new VP9Encoder(cfg, deadline, init_flags, stats);
#else
return NULL;
#endif
}
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
int usage) const {
#if CONFIG_VP9_ENCODER
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
#elif CONFIG_VP10_ENCODER
return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
#else
return VPX_CODEC_INCAPABLE;
#endif
}
};
const libvpx_test::VP9CodecFactory kVP9;
#define VP9_INSTANTIATE_TEST_CASE(test, ...)\
INSTANTIATE_TEST_CASE_P(VP9, test, \
::testing::Combine( \
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
&libvpx_test::kVP9)), \
__VA_ARGS__))
#else
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
#endif // CONFIG_VP9
/*
* VP10 Codec Definitions
*/

View File

@ -1,60 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/util.h"
#include "test/video_source.h"
namespace {
class ConfigTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
protected:
ConfigTest() : EncoderTest(GET_PARAM(0)),
frame_count_in_(0), frame_count_out_(0), frame_count_max_(0) {}
virtual ~ConfigTest() {}
virtual void SetUp() {
InitializeConfig();
SetMode(GET_PARAM(1));
}
virtual void BeginPassHook(unsigned int /*pass*/) {
frame_count_in_ = 0;
frame_count_out_ = 0;
}
virtual void PreEncodeFrameHook(libvpx_test::VideoSource* /*video*/) {
++frame_count_in_;
abort_ |= (frame_count_in_ >= frame_count_max_);
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t* /*pkt*/) {
++frame_count_out_;
}
unsigned int frame_count_in_;
unsigned int frame_count_out_;
unsigned int frame_count_max_;
};
TEST_P(ConfigTest, LagIsDisabled) {
frame_count_max_ = 2;
cfg_.g_lag_in_frames = 15;
libvpx_test::DummyVideoSource video;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
EXPECT_EQ(frame_count_in_, frame_count_out_);
}
VP8_INSTANTIATE_TEST_CASE(ConfigTest, ONE_PASS_TEST_MODES);
} // namespace

View File

@ -1,224 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#if CONFIG_VP9_ENCODER
#include "./vp9_rtcd.h"
#endif
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vpx_dsp/ssim.h"
#include "vpx_mem/vpx_mem.h"
extern "C"
double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch,
uint8_t *img2, int img2_pitch,
int width, int height,
Ssimv *sv2, Metrics *m,
int do_inconsistency);
using libvpx_test::ACMRandom;
namespace {
class ConsistencyTestBase : public ::testing::Test {
public:
ConsistencyTestBase(int width, int height) : width_(width), height_(height) {}
static void SetUpTestCase() {
source_data_[0] = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
reference_data_[0] = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
source_data_[1] = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
reference_data_[1] = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
ssim_array_ = new Ssimv[kDataBufferSize / 16];
}
static void ClearSsim() {
memset(ssim_array_, 0, kDataBufferSize / 16);
}
static void TearDownTestCase() {
vpx_free(source_data_[0]);
source_data_[0] = NULL;
vpx_free(reference_data_[0]);
reference_data_[0] = NULL;
vpx_free(source_data_[1]);
source_data_[1] = NULL;
vpx_free(reference_data_[1]);
reference_data_[1] = NULL;
delete[] ssim_array_;
}
virtual void TearDown() {
libvpx_test::ClearSystemState();
}
protected:
// Handle frames up to 640x480
static const int kDataAlignment = 16;
static const int kDataBufferSize = 640*480;
virtual void SetUp() {
source_stride_ = (width_ + 31) & ~31;
reference_stride_ = width_ * 2;
rnd_.Reset(ACMRandom::DeterministicSeed());
}
void FillRandom(uint8_t *data, int stride, int width, int height) {
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
data[h * stride + w] = rnd_.Rand8();
}
}
}
void FillRandom(uint8_t *data, int stride) {
FillRandom(data, stride, width_, height_);
}
void Copy(uint8_t *reference, uint8_t *source) {
memcpy(reference, source, kDataBufferSize);
}
void Blur(uint8_t *data, int stride, int taps) {
int sum = 0;
int half_taps = taps / 2;
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < taps; ++w) {
sum += data[w + h * stride];
}
for (int w = taps; w < width_; ++w) {
sum += data[w + h * stride] - data[w - taps + h * stride];
data[w - half_taps + h * stride] = (sum + half_taps) / taps;
}
}
for (int w = 0; w < width_; ++w) {
for (int h = 0; h < taps; ++h) {
sum += data[h + w * stride];
}
for (int h = taps; h < height_; ++h) {
sum += data[w + h * stride] - data[(h - taps) * stride + w];
data[(h - half_taps) * stride + w] = (sum + half_taps) / taps;
}
}
}
int width_, height_;
static uint8_t* source_data_[2];
int source_stride_;
static uint8_t* reference_data_[2];
int reference_stride_;
static Ssimv *ssim_array_;
Metrics metrics_;
ACMRandom rnd_;
};
#if CONFIG_VP9_ENCODER
typedef std::tr1::tuple<int, int> ConsistencyParam;
class ConsistencyVP9Test
: public ConsistencyTestBase,
public ::testing::WithParamInterface<ConsistencyParam> {
public:
ConsistencyVP9Test() : ConsistencyTestBase(GET_PARAM(0), GET_PARAM(1)) {}
protected:
double CheckConsistency(int frame) {
EXPECT_LT(frame, 2)<< "Frame to check has to be less than 2.";
return
vpx_get_ssim_metrics(source_data_[frame], source_stride_,
reference_data_[frame], reference_stride_,
width_, height_, ssim_array_, &metrics_, 1);
}
};
#endif // CONFIG_VP9_ENCODER
uint8_t* ConsistencyTestBase::source_data_[2] = {NULL, NULL};
uint8_t* ConsistencyTestBase::reference_data_[2] = {NULL, NULL};
Ssimv* ConsistencyTestBase::ssim_array_ = NULL;
#if CONFIG_VP9_ENCODER
TEST_P(ConsistencyVP9Test, ConsistencyIsZero) {
FillRandom(source_data_[0], source_stride_);
Copy(source_data_[1], source_data_[0]);
Copy(reference_data_[0], source_data_[0]);
Blur(reference_data_[0], reference_stride_, 3);
Copy(reference_data_[1], source_data_[0]);
Blur(reference_data_[1], reference_stride_, 3);
double inconsistency = CheckConsistency(1);
inconsistency = CheckConsistency(0);
EXPECT_EQ(inconsistency, 0.0)
<< "Should have 0 inconsistency if they are exactly the same.";
// If sources are not consistent reference frames inconsistency should
// be less than if the source is consistent.
FillRandom(source_data_[0], source_stride_);
FillRandom(source_data_[1], source_stride_);
FillRandom(reference_data_[0], reference_stride_);
FillRandom(reference_data_[1], reference_stride_);
CheckConsistency(0);
inconsistency = CheckConsistency(1);
Copy(source_data_[1], source_data_[0]);
CheckConsistency(0);
double inconsistency2 = CheckConsistency(1);
EXPECT_LT(inconsistency, inconsistency2)
<< "Should have less inconsistency if source itself is inconsistent.";
// Less of a blur should be less inconsistent than more blur coming off a
// a frame with no blur.
ClearSsim();
FillRandom(source_data_[0], source_stride_);
Copy(source_data_[1], source_data_[0]);
Copy(reference_data_[0], source_data_[0]);
Copy(reference_data_[1], source_data_[0]);
Blur(reference_data_[1], reference_stride_, 4);
CheckConsistency(0);
inconsistency = CheckConsistency(1);
ClearSsim();
Copy(reference_data_[1], source_data_[0]);
Blur(reference_data_[1], reference_stride_, 8);
CheckConsistency(0);
inconsistency2 = CheckConsistency(1);
EXPECT_LT(inconsistency, inconsistency2)
<< "Stronger Blur should produce more inconsistency.";
}
#endif // CONFIG_VP9_ENCODER
using std::tr1::make_tuple;
//------------------------------------------------------------------------------
// C functions
#if CONFIG_VP9_ENCODER
const ConsistencyParam c_vp9_tests[] = {
make_tuple(320, 240),
make_tuple(318, 242),
make_tuple(318, 238),
};
INSTANTIATE_TEST_CASE_P(C, ConsistencyVP9Test,
::testing::ValuesIn(c_vp9_tests));
#endif
} // namespace

View File

@ -13,14 +13,11 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_filter.h"
#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_dsp/vpx_filter.h"
#include "vpx_mem/vpx_mem.h"
@ -28,7 +25,7 @@
namespace {
static const unsigned int kMaxDimension = 64;
static const unsigned int kMaxDimension = MAX_SB_SIZE;
typedef void (*ConvolveFunc)(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
@ -69,6 +66,25 @@ struct ConvolveFunctions {
typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
#define ALL_SIZES(convolve_fn) \
make_tuple(128, 64, &convolve_fn), \
make_tuple(64, 128, &convolve_fn), \
make_tuple(128, 128, &convolve_fn), \
make_tuple(4, 4, &convolve_fn), \
make_tuple(8, 4, &convolve_fn), \
make_tuple(4, 8, &convolve_fn), \
make_tuple(8, 8, &convolve_fn), \
make_tuple(16, 8, &convolve_fn), \
make_tuple(8, 16, &convolve_fn), \
make_tuple(16, 16, &convolve_fn), \
make_tuple(32, 16, &convolve_fn), \
make_tuple(16, 32, &convolve_fn), \
make_tuple(32, 32, &convolve_fn), \
make_tuple(64, 32, &convolve_fn), \
make_tuple(32, 64, &convolve_fn), \
make_tuple(64, 64, &convolve_fn)
#else
#define ALL_SIZES(convolve_fn) \
make_tuple(4, 4, &convolve_fn), \
make_tuple(8, 4, &convolve_fn), \
@ -83,6 +99,7 @@ typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
make_tuple(64, 32, &convolve_fn), \
make_tuple(32, 64, &convolve_fn), \
make_tuple(64, 64, &convolve_fn)
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
#define VP9_FILTER_WEIGHT 128
@ -117,7 +134,7 @@ void filter_block2d_8_c(const uint8_t *src_ptr,
// = 23
// and filter_max_width = 16
//
uint8_t intermediate_buffer[71 * kMaxDimension];
uint8_t intermediate_buffer[(kMaxDimension+8) * kMaxDimension];
const int intermediate_next_stride =
1 - static_cast<int>(intermediate_height * output_width);
@ -199,13 +216,13 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
assert(output_width <= kMaxDimension);
assert(output_height <= kMaxDimension);
filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64,
filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, kMaxDimension,
output_width, output_height);
block2d_average_c(tmp, 64, dst_ptr, dst_stride,
block2d_average_c(tmp, kMaxDimension, dst_ptr, dst_stride,
output_width, output_height);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
const unsigned int src_stride,
const int16_t *HFilter,
@ -230,7 +247,7 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
* = 23
* and filter_max_width = 16
*/
uint16_t intermediate_buffer[71 * kMaxDimension];
uint16_t intermediate_buffer[(kMaxDimension+8) * kMaxDimension];
const int intermediate_next_stride =
1 - static_cast<int>(intermediate_height * output_width);
@ -319,12 +336,13 @@ void highbd_filter_average_block2d_8_c(const uint16_t *src_ptr,
assert(output_width <= kMaxDimension);
assert(output_height <= kMaxDimension);
highbd_filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64,
highbd_filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
tmp, kMaxDimension,
output_width, output_height, bd);
highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride,
highbd_block2d_average_c(tmp, kMaxDimension, dst_ptr, dst_stride,
output_width, output_height);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
public:
@ -336,7 +354,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
vpx_memalign(kDataAlignment, kOutputBufferSize));
output_ref_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kOutputBufferSize));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
input16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment,
(kInputBufferSize + 1) * sizeof(uint16_t))) + 1;
@ -356,7 +374,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
output_ = NULL;
vpx_free(output_ref_);
output_ref_ = NULL;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_free(input16_ - 1);
input16_ = NULL;
vpx_free(output16_);
@ -368,7 +386,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
protected:
static const int kDataAlignment = 16;
static const int kOuterBlockSize = 256;
static const int kOuterBlockSize = 4*kMaxDimension;
static const int kInputStride = kOuterBlockSize;
static const int kOutputStride = kOuterBlockSize;
static const int kInputBufferSize = kOuterBlockSize * kOuterBlockSize;
@ -391,7 +409,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
virtual void SetUp() {
UUT_ = GET_PARAM(2);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ != 0)
mask_ = (1 << UUT_->use_highbd_) - 1;
else
@ -409,12 +427,12 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
for (int i = 0; i < kInputBufferSize; ++i) {
if (i & 1) {
input_[i] = 255;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
input16_[i] = mask_;
#endif
} else {
input_[i] = prng.Rand8Extremes();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
input16_[i] = prng.Rand16() & mask_;
#endif
}
@ -423,15 +441,16 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
void SetConstantInput(int value) {
memset(input_, value, kInputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_memset16(input16_, value, kInputBufferSize);
#endif
}
void CopyOutputToRef() {
memcpy(output_ref_, output_, kOutputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH
memcpy(output16_ref_, output16_, kOutputBufferSize);
#if CONFIG_VPX_HIGHBITDEPTH
memcpy(output16_ref_, output16_,
kOutputBufferSize * sizeof(output16_ref_[0]));
#endif
}
@ -443,46 +462,46 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
uint8_t *input() const {
#if CONFIG_VP9_HIGHBITDEPTH
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return input_ + BorderTop() * kOuterBlockSize + BorderLeft();
return input_ + offset;
} else {
return CONVERT_TO_BYTEPTR(input16_ + BorderTop() * kOuterBlockSize +
BorderLeft());
return CONVERT_TO_BYTEPTR(input16_) + offset;
}
#else
return input_ + BorderTop() * kOuterBlockSize + BorderLeft();
return input_ + offset;
#endif
}
uint8_t *output() const {
#if CONFIG_VP9_HIGHBITDEPTH
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ + BorderTop() * kOuterBlockSize + BorderLeft();
return output_ + offset;
} else {
return CONVERT_TO_BYTEPTR(output16_ + BorderTop() * kOuterBlockSize +
BorderLeft());
return CONVERT_TO_BYTEPTR(output16_) + offset;
}
#else
return output_ + BorderTop() * kOuterBlockSize + BorderLeft();
return output_ + offset;
#endif
}
uint8_t *output_ref() const {
#if CONFIG_VP9_HIGHBITDEPTH
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft();
return output_ref_ + offset;
} else {
return CONVERT_TO_BYTEPTR(output16_ref_ + BorderTop() * kOuterBlockSize +
BorderLeft());
return CONVERT_TO_BYTEPTR(output16_ref_) + offset;
}
#else
return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft();
return output_ref_ + offset;
#endif
}
uint16_t lookup(uint8_t *list, int index) const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return list[index];
} else {
@ -494,7 +513,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
void assign_val(uint8_t *list, int index, uint16_t val) const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
list[index] = (uint8_t) val;
} else {
@ -513,7 +532,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
unsigned int dst_stride,
unsigned int output_width,
unsigned int output_height) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
filter_average_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
dst_ptr, dst_stride, output_width,
@ -540,7 +559,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
unsigned int dst_stride,
unsigned int output_width,
unsigned int output_height) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
dst_ptr, dst_stride, output_width, output_height);
@ -560,7 +579,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
static uint8_t* input_;
static uint8_t* output_;
static uint8_t* output_ref_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static uint16_t* input16_;
static uint16_t* output16_;
static uint16_t* output16_ref_;
@ -571,7 +590,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
uint8_t* ConvolveTest::input_ = NULL;
uint8_t* ConvolveTest::output_ = NULL;
uint8_t* ConvolveTest::output_ref_ = NULL;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t* ConvolveTest::input16_ = NULL;
uint16_t* ConvolveTest::output16_ = NULL;
uint16_t* ConvolveTest::output16_ref_ = NULL;
@ -701,7 +720,7 @@ const int16_t kInvalidFilter[8] = { 0 };
TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
uint8_t* const in = input();
uint8_t* const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t* ref;
@ -763,7 +782,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
uint8_t* const in = input();
uint8_t* const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t* ref;
@ -781,7 +800,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();
} else {
@ -845,7 +864,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
TEST_P(ConvolveTest, FilterExtremes) {
uint8_t *const in = input();
uint8_t *const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t *ref;
@ -863,7 +882,7 @@ TEST_P(ConvolveTest, FilterExtremes) {
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();
} else {
@ -882,7 +901,7 @@ TEST_P(ConvolveTest, FilterExtremes) {
while (seed_val < 256) {
for (int y = 0; y < 8; ++y) {
for (int x = 0; x < 8; ++x) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
assign_val(in, y * kOutputStride + x - SUBPEL_TAPS / 2 + 1,
((seed_val >> (axis ? y : x)) & 1) * mask_);
#else
@ -975,7 +994,7 @@ TEST_P(ConvolveTest, CheckScalingFiltering) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define WRAP(func, bd) \
void wrap_ ## func ## _ ## bd(const uint8_t *src, ptrdiff_t src_stride, \
uint8_t *dst, ptrdiff_t dst_stride, \
@ -989,14 +1008,12 @@ void wrap_ ## func ## _ ## bd(const uint8_t *src, ptrdiff_t src_stride, \
w, h, bd); \
}
#if HAVE_SSE2 && ARCH_X86_64
#if CONFIG_USE_X86INC
WRAP(convolve_copy_sse2, 8)
WRAP(convolve_avg_sse2, 8)
WRAP(convolve_copy_sse2, 10)
WRAP(convolve_avg_sse2, 10)
WRAP(convolve_copy_sse2, 12)
WRAP(convolve_avg_sse2, 12)
#endif // CONFIG_USE_X86INC
WRAP(convolve8_horiz_sse2, 8)
WRAP(convolve8_avg_horiz_sse2, 8)
WRAP(convolve8_vert_sse2, 8)
@ -1088,13 +1105,9 @@ INSTANTIATE_TEST_CASE_P(C, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_c));
#if HAVE_SSE2 && ARCH_X86_64
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const ConvolveFunctions convolve8_sse2(
#if CONFIG_USE_X86INC
wrap_convolve_copy_sse2_8, wrap_convolve_avg_sse2_8,
#else
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
#endif // CONFIG_USE_X86INC
wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8,
@ -1102,11 +1115,7 @@ const ConvolveFunctions convolve8_sse2(
wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8);
const ConvolveFunctions convolve10_sse2(
#if CONFIG_USE_X86INC
wrap_convolve_copy_sse2_10, wrap_convolve_avg_sse2_10,
#else
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
#endif // CONFIG_USE_X86INC
wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10,
wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10,
@ -1114,11 +1123,7 @@ const ConvolveFunctions convolve10_sse2(
wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10);
const ConvolveFunctions convolve12_sse2(
#if CONFIG_USE_X86INC
wrap_convolve_copy_sse2_12, wrap_convolve_avg_sse2_12,
#else
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
#endif // CONFIG_USE_X86INC
wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12,
@ -1132,11 +1137,7 @@ const ConvolveParam kArrayConvolve_sse2[] = {
};
#else
const ConvolveFunctions convolve8_sse2(
#if CONFIG_USE_X86INC
vpx_convolve_copy_sse2, vpx_convolve_avg_sse2,
#else
vpx_convolve_copy_c, vpx_convolve_avg_c,
#endif // CONFIG_USE_X86INC
vpx_convolve8_horiz_sse2, vpx_convolve8_avg_horiz_sse2,
vpx_convolve8_vert_sse2, vpx_convolve8_avg_vert_sse2,
vpx_convolve8_sse2, vpx_convolve8_avg_sse2,
@ -1145,7 +1146,7 @@ const ConvolveFunctions convolve8_sse2(
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
const ConvolveParam kArrayConvolve_sse2[] = { ALL_SIZES(convolve8_sse2) };
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_sse2));
#endif
@ -1180,7 +1181,8 @@ INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve8_avx2));
#endif // HAVE_AVX2 && HAVE_SSSE3
#if HAVE_NEON
// TODO(any): Make NEON versions support 128x128 128x64 64x128 block sizes
#if HAVE_NEON && !(CONFIG_VP10 && CONFIG_EXT_PARTITION)
#if HAVE_NEON_ASM
const ConvolveFunctions convolve8_neon(
vpx_convolve_copy_neon, vpx_convolve_avg_neon,
@ -1206,7 +1208,8 @@ INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest,
::testing::ValuesIn(kArrayConvolve8_neon));
#endif // HAVE_NEON
#if HAVE_DSPR2
// TODO(any): Make DSPR2 versions support 128x128 128x64 64x128 block sizes
#if HAVE_DSPR2 && !(CONFIG_VP10 && CONFIG_EXT_PARTITION)
const ConvolveFunctions convolve8_dspr2(
vpx_convolve_copy_dspr2, vpx_convolve_avg_dspr2,
vpx_convolve8_horiz_dspr2, vpx_convolve8_avg_horiz_dspr2,
@ -1221,7 +1224,8 @@ INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve8_dspr2));
#endif // HAVE_DSPR2
#if HAVE_MSA
// TODO(any): Make MSA versions support 128x128 128x64 64x128 block sizes
#if HAVE_MSA && !(CONFIG_VP10 && CONFIG_EXT_PARTITION)
const ConvolveFunctions convolve8_msa(
vpx_convolve_copy_msa, vpx_convolve_avg_msa,
vpx_convolve8_horiz_msa, vpx_convolve8_avg_horiz_msa,

View File

@ -27,7 +27,7 @@ class CpuSpeedTest
encoding_mode_(GET_PARAM(1)),
set_cpu_used_(GET_PARAM(2)),
min_psnr_(kMaxPSNR),
tune_content_(VP9E_CONTENT_DEFAULT) {}
tune_content_(VPX_CONTENT_DEFAULT) {}
virtual ~CpuSpeedTest() {}
virtual void SetUp() {
@ -83,7 +83,7 @@ TEST_P(CpuSpeedTest, TestQ0) {
cfg_.rc_min_quantizer = 0;
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0,
20);
10);
init_flags_ = VPX_CODEC_USE_PSNR;
@ -92,7 +92,7 @@ TEST_P(CpuSpeedTest, TestQ0) {
}
TEST_P(CpuSpeedTest, TestScreencastQ0) {
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 25);
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 10);
cfg_.g_timebase = video.timebase();
cfg_.rc_2pass_vbr_minsection_pct = 5;
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
@ -107,14 +107,14 @@ TEST_P(CpuSpeedTest, TestScreencastQ0) {
}
TEST_P(CpuSpeedTest, TestTuneScreen) {
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 25);
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 10);
cfg_.g_timebase = video.timebase();
cfg_.rc_2pass_vbr_minsection_pct = 5;
cfg_.rc_2pass_vbr_minsection_pct = 2000;
cfg_.rc_target_bitrate = 2000;
cfg_.rc_max_quantizer = 63;
cfg_.rc_min_quantizer = 0;
tune_content_ = VP9E_CONTENT_SCREEN;
tune_content_ = VPX_CONTENT_SCREEN;
init_flags_ = VPX_CODEC_USE_PSNR;
@ -133,7 +133,7 @@ TEST_P(CpuSpeedTest, TestEncodeHighBitrate) {
cfg_.rc_min_quantizer = 0;
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0,
20);
10);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
@ -148,17 +148,11 @@ TEST_P(CpuSpeedTest, TestLowBitrate) {
cfg_.rc_min_quantizer = 40;
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0,
20);
10);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
VP9_INSTANTIATE_TEST_CASE(
CpuSpeedTest,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
::libvpx_test::kRealTime),
::testing::Range(0, 9));
VP10_INSTANTIATE_TEST_CASE(
CpuSpeedTest,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),

View File

@ -1,134 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cmath>
#include <map>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
#include "test/util.h"
namespace {
// CQ level range: [kCQLevelMin, kCQLevelMax).
const int kCQLevelMin = 4;
const int kCQLevelMax = 63;
const int kCQLevelStep = 8;
const unsigned int kCQTargetBitrate = 2000;
class CQTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<int> {
public:
// maps the cqlevel to the bitrate produced.
typedef std::map<int, uint32_t> BitrateMap;
static void SetUpTestCase() {
bitrates_.clear();
}
static void TearDownTestCase() {
ASSERT_TRUE(!HasFailure())
<< "skipping bitrate validation due to earlier failure.";
uint32_t prev_actual_bitrate = kCQTargetBitrate;
for (BitrateMap::const_iterator iter = bitrates_.begin();
iter != bitrates_.end(); ++iter) {
const uint32_t cq_actual_bitrate = iter->second;
EXPECT_LE(cq_actual_bitrate, prev_actual_bitrate)
<< "cq_level: " << iter->first
<< ", bitrate should decrease with increase in CQ level.";
prev_actual_bitrate = cq_actual_bitrate;
}
}
protected:
CQTest() : EncoderTest(GET_PARAM(0)), cq_level_(GET_PARAM(1)) {
init_flags_ = VPX_CODEC_USE_PSNR;
}
virtual ~CQTest() {}
virtual void SetUp() {
InitializeConfig();
SetMode(libvpx_test::kTwoPassGood);
}
virtual void BeginPassHook(unsigned int /*pass*/) {
file_size_ = 0;
psnr_ = 0.0;
n_frames_ = 0;
}
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
libvpx_test::Encoder *encoder) {
if (video->frame() == 1) {
if (cfg_.rc_end_usage == VPX_CQ) {
encoder->Control(VP8E_SET_CQ_LEVEL, cq_level_);
}
encoder->Control(VP8E_SET_CPUUSED, 3);
}
}
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
psnr_ += pow(10.0, pkt->data.psnr.psnr[0] / 10.0);
n_frames_++;
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
file_size_ += pkt->data.frame.sz;
}
double GetLinearPSNROverBitrate() const {
double avg_psnr = log10(psnr_ / n_frames_) * 10.0;
return pow(10.0, avg_psnr / 10.0) / file_size_;
}
int cq_level() const { return cq_level_; }
size_t file_size() const { return file_size_; }
int n_frames() const { return n_frames_; }
static BitrateMap bitrates_;
private:
int cq_level_;
size_t file_size_;
double psnr_;
int n_frames_;
};
CQTest::BitrateMap CQTest::bitrates_;
TEST_P(CQTest, LinearPSNRIsHigherForCQLevel) {
const vpx_rational timebase = { 33333333, 1000000000 };
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = kCQTargetBitrate;
cfg_.g_lag_in_frames = 25;
cfg_.rc_end_usage = VPX_CQ;
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 30);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const double cq_psnr_lin = GetLinearPSNROverBitrate();
const unsigned int cq_actual_bitrate =
static_cast<unsigned int>(file_size()) * 8 * 30 / (n_frames() * 1000);
EXPECT_LE(cq_actual_bitrate, kCQTargetBitrate);
bitrates_[cq_level()] = cq_actual_bitrate;
// try targeting the approximate same bitrate with VBR mode
cfg_.rc_end_usage = VPX_VBR;
cfg_.rc_target_bitrate = cq_actual_bitrate;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const double vbr_psnr_lin = GetLinearPSNROverBitrate();
EXPECT_GE(cq_psnr_lin, vbr_psnr_lin);
}
VP8_INSTANTIATE_TEST_CASE(CQTest,
::testing::Range(kCQLevelMin, kCQLevelMax,
kCQLevelStep));
} // namespace

77
test/cx_set_ref.sh Executable file
View File

@ -0,0 +1,77 @@
#!/bin/sh
##
## Copyright (c) 2016 The WebM project authors. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
##
## This file tests the libvpx cx_set_ref example. To add new tests to this
## file, do the following:
## 1. Write a shell function (this is your test).
## 2. Add the function to cx_set_ref_tests (on a new line).
##
. $(dirname $0)/tools_common.sh
# Environment check: $YUV_RAW_INPUT is required.
cx_set_ref_verify_environment() {
if [ ! -e "${YUV_RAW_INPUT}" ]; then
echo "Libvpx test data must exist in LIBVPX_TEST_DATA_PATH."
return 1
fi
}
# Runs cx_set_ref and updates the reference frame before encoding frame 90.
# $1 is the codec name.
vpx_set_ref() {
local codec="$1"
local encoder="${LIBVPX_BIN_PATH}/vpxcx_set_ref${VPX_TEST_EXE_SUFFIX}"
if [ "$codec" = "vp8" ]; then
encoder="${LIBVPX_BIN_PATH}/vp8cx_set_ref${VPX_TEST_EXE_SUFFIX}"
fi
local output_file="${VPX_TEST_OUTPUT_DIR}/${codec}cx_set_ref_${codec}.ivf"
local ref_frame_num=90
if [ ! -x "${encoder}" ]; then
elog "${encoder} does not exist or is not executable."
return 1
fi
if [ "$codec" = "vp8" ]; then
eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
"${ref_frame_num}" ${devnull}
else
eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
"${ref_frame_num}" ${devnull}
fi
[ -e "${output_file}" ] || return 1
}
cx_set_ref_vp8() {
if [ "$(vp8_encode_available)" = "yes" ]; then
vpx_set_ref vp8 || return 1
fi
}
cx_set_ref_vp9() {
if [ "$(vp9_encode_available)" = "yes" ]; then
vpx_set_ref vp9 || return 1
fi
}
cx_set_ref_vp10() {
if [ "$(vp10_encode_available)" = "yes" ]; then
vpx_set_ref vp10 || return 1
fi
}
cx_set_ref_tests="cx_set_ref_vp8 cx_set_ref_vp9 cx_set_ref_vp10"
run_tests cx_set_ref_verify_environment "${cx_set_ref_tests}"

View File

@ -135,65 +135,12 @@ class DatarateTestLarge : public ::libvpx_test::EncoderTest,
double duration_;
double file_datarate_;
double effective_datarate_;
size_t bits_in_last_frame_;
int64_t bits_in_last_frame_;
int denoiser_on_;
int denoiser_offon_test_;
int denoiser_offon_period_;
};
#if CONFIG_TEMPORAL_DENOISING
// Check basic datarate targeting, for a single bitrate, but loop over the
// various denoiser settings.
TEST_P(DatarateTestLarge, DenoiserLevels) {
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 140);
for (int j = 1; j < 5; ++j) {
// Run over the denoiser levels.
// For the temporal denoiser (#if CONFIG_TEMPORAL_DENOISING) the level j
// refers to the 4 denoiser modes: denoiserYonly, denoiserOnYUV,
// denoiserOnAggressive, and denoiserOnAdaptive.
// For the spatial denoiser (if !CONFIG_TEMPORAL_DENOISING), the level j
// refers to the blur thresholds: 20, 40, 60 80.
// The j = 0 case (denoiser off) is covered in the tests below.
denoiser_on_ = j;
cfg_.rc_target_bitrate = 300;
ResetModel();
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.95)
<< " The datarate for the file exceeds the target!";
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.3)
<< " The datarate for the file missed the target!";
}
}
// Check basic datarate targeting, for a single bitrate, when denoiser is off
// and on.
TEST_P(DatarateTestLarge, DenoiserOffOn) {
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 299);
cfg_.rc_target_bitrate = 300;
ResetModel();
// The denoiser is off by default.
denoiser_on_ = 0;
// Set the offon test flag.
denoiser_offon_test_ = 1;
denoiser_offon_period_ = 100;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.95)
<< " The datarate for the file exceeds the target!";
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.3)
<< " The datarate for the file missed the target!";
}
#endif // CONFIG_TEMPORAL_DENOISING
TEST_P(DatarateTestLarge, BasicBufferModel) {
denoiser_on_ = 0;
@ -704,68 +651,6 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) {
}
}
#if CONFIG_VP9_TEMPORAL_DENOISING
// Check basic datarate targeting, for a single bitrate, when denoiser is on.
TEST_P(DatarateTestVP9Large, DenoiserLevels) {
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 2;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_lag_in_frames = 0;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 140);
// For the temporal denoiser (#if CONFIG_VP9_TEMPORAL_DENOISING),
// there is only one denoiser mode: denoiserYonly(which is 1),
// but may add more modes in the future.
cfg_.rc_target_bitrate = 300;
ResetModel();
// Turn on the denoiser.
denoiser_on_ = 1;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
<< " The datarate for the file is lower than target by too much!";
ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.15)
<< " The datarate for the file is greater than target by too much!";
}
// Check basic datarate targeting, for a single bitrate, when denoiser is off
// and on.
TEST_P(DatarateTestVP9Large, DenoiserOffOn) {
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 2;
cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_lag_in_frames = 0;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 299);
// For the temporal denoiser (#if CONFIG_VP9_TEMPORAL_DENOISING),
// there is only one denoiser mode: denoiserYonly(which is 1),
// but may add more modes in the future.
cfg_.rc_target_bitrate = 300;
ResetModel();
// The denoiser is off by default.
denoiser_on_ = 0;
// Set the offon test flag.
denoiser_offon_test_ = 1;
denoiser_offon_period_ = 100;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
<< " The datarate for the file is lower than target by too much!";
ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.15)
<< " The datarate for the file is greater than target by too much!";
}
#endif // CONFIG_VP9_TEMPORAL_DENOISING
class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
public:
@ -1145,12 +1030,9 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SpatialLayers4threads) {
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
}
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
::testing::Values(::libvpx_test::kOnePassGood,
::libvpx_test::kRealTime),
::testing::Range(2, 9));
VP9_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
/* VP10 does not support multiple layers yet.
VP10_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(5, 9));
::testing::Range(5, 8));
*/
} // namespace

View File

@ -14,31 +14,23 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_entropy.h"
#include "vp9/common/vp9_scan.h"
#include "vp10/common/entropy.h"
#include "vp10/common/scan.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
#include "vpx_ports/mem.h"
#include "vpx_ports/msvc.h" // for round()
using libvpx_test::ACMRandom;
namespace {
#ifdef _MSC_VER
static int round(double x) {
if (x < 0)
return static_cast<int>(ceil(x - 0.5));
else
return static_cast<int>(floor(x + 0.5));
}
#endif
const int kNumCoeffs = 256;
const double C1 = 0.995184726672197;
const double C2 = 0.98078528040323;
@ -258,15 +250,15 @@ void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride,
int tx_type) {
vp9_fht16x16_c(in, out, stride, tx_type);
vp10_fht16x16_c(in, out, stride, tx_type);
}
void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
int tx_type) {
vp9_iht16x16_256_add_c(in, dest, stride, tx_type);
vp10_iht16x16_256_add_c(in, dest, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct16x16_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct16x16_256_add_c(in, out, stride, 10);
}
@ -276,21 +268,21 @@ void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) {
}
void idct16x16_10_ref(const tran_low_t *in, uint8_t *out, int stride,
int /*tx_type*/) {
int tx_type) {
idct16x16_10(in, out, stride);
}
void idct16x16_12_ref(const tran_low_t *in, uint8_t *out, int stride,
int /*tx_type*/) {
int tx_type) {
idct16x16_12(in, out, stride);
}
void iht16x16_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
vp9_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 10);
vp10_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 10);
}
void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
vp9_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 12);
vp10_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 12);
}
#if HAVE_SSE2
@ -318,7 +310,7 @@ void idct16x16_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
}
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class Trans16x16TestBase {
public:
@ -339,7 +331,7 @@ class Trans16x16TestBase {
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
@ -350,7 +342,7 @@ class Trans16x16TestBase {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
@ -364,7 +356,7 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -372,7 +364,7 @@ class Trans16x16TestBase {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -454,7 +446,7 @@ class Trans16x16TestBase {
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
#endif
@ -476,7 +468,7 @@ class Trans16x16TestBase {
// clear reconstructed pixel buffers
memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
#endif
@ -488,7 +480,7 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
inv_txfm_ref(output_ref_block, ref, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(output_ref_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
inv_txfm_ref(output_ref_block, CONVERT_TO_BYTEPTR(ref16), pitch_,
tx_type_);
@ -499,7 +491,7 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
for (int j = 0; j < kNumCoeffs; ++j)
EXPECT_EQ(ref[j], dst[j]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
for (int j = 0; j < kNumCoeffs; ++j)
EXPECT_EQ(ref16[j], dst16[j]);
@ -515,10 +507,10 @@ class Trans16x16TestBase {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int i = 0; i < count_test_block; ++i) {
double out_r[kNumCoeffs];
@ -529,12 +521,12 @@ class Trans16x16TestBase {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
in[j] = src16[j] - dst16[j];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -544,20 +536,20 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, 16));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
16));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const uint32_t error = diff * diff;
EXPECT_GE(1u, error)
<< "Error: 16x16 IDCT has error " << error
@ -570,14 +562,14 @@ class Trans16x16TestBase {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 10000;
const int eob = 10;
const int16_t *scan = vp9_default_scan_orders[TX_16X16].scan;
const int16_t *scan = vp10_default_scan_orders[TX_16X16].scan;
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int i = 0; i < count_test_block; ++i) {
for (int j = 0; j < kNumCoeffs; ++j) {
@ -590,31 +582,31 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
dst[j] = 0;
ref[j] = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
dst16[j] = 0;
ref16[j] = 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
if (bit_depth_ == VPX_BITS_8) {
ref_txfm(coeff, ref, pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
} else {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
#else
const uint32_t diff = dst[j] - ref[j];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const uint32_t error = diff * diff;
EXPECT_EQ(0u, error)
<< "Error: 16x16 IDCT Comparison has error " << error
@ -646,7 +638,7 @@ class Trans16x16DCT
fwd_txfm_ref = fdct16x16_ref;
inv_txfm_ref = idct16x16_ref;
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth_) {
case VPX_BITS_10:
inv_txfm_ref = idct16x16_10_ref;
@ -713,7 +705,7 @@ class Trans16x16HT
fwd_txfm_ref = fht16x16_ref;
inv_txfm_ref = iht16x16_ref;
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth_) {
case VPX_BITS_10:
inv_txfm_ref = iht16x16_10;
@ -778,7 +770,7 @@ class InvTrans16x16DCT
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
void RunFwdTxfm(int16_t * /*in*/, tran_low_t * /*out*/, int /*stride*/) {}
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {}
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
inv_txfm_(out, dst, stride);
}
@ -810,7 +802,7 @@ class PartialTrans16x16Test
};
TEST_P(PartialTrans16x16Test, Extremes) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -832,7 +824,7 @@ TEST_P(PartialTrans16x16Test, Extremes) {
}
TEST_P(PartialTrans16x16Test, Random) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -855,7 +847,7 @@ TEST_P(PartialTrans16x16Test, Random) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans16x16DCT,
::testing::Values(
@ -867,24 +859,24 @@ INSTANTIATE_TEST_CASE_P(
C, Trans16x16DCT,
::testing::Values(
make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans16x16HT,
::testing::Values(
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 0, VPX_BITS_10),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 1, VPX_BITS_10),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 2, VPX_BITS_10),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 3, VPX_BITS_10),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 0, VPX_BITS_12),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 1, VPX_BITS_12),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 2, VPX_BITS_12),
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_12, 3, VPX_BITS_12),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 0, VPX_BITS_10),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 1, VPX_BITS_10),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 2, VPX_BITS_10),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_10, 3, VPX_BITS_10),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 0, VPX_BITS_12),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 1, VPX_BITS_12),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 2, VPX_BITS_12),
make_tuple(&vp10_highbd_fht16x16_c, &iht16x16_12, 3, VPX_BITS_12),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 0, VPX_BITS_8),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 3, VPX_BITS_8)));
INSTANTIATE_TEST_CASE_P(
C, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_highbd_fdct16x16_1_c, VPX_BITS_8),
@ -894,16 +886,16 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
C, Trans16x16HT,
::testing::Values(
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 0, VPX_BITS_8),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht16x16_c, &vp10_iht16x16_256_add_c, 3, VPX_BITS_8)));
INSTANTIATE_TEST_CASE_P(C, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_c,
VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans16x16DCT,
::testing::Values(
@ -911,7 +903,7 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct16x16_256_add_neon, 0, VPX_BITS_8)));
#endif
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16DCT,
::testing::Values(
@ -920,20 +912,20 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16HT,
::testing::Values(
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 0,
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 0,
VPX_BITS_8),
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 1,
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 1,
VPX_BITS_8),
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 2,
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 2,
VPX_BITS_8),
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 3,
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_sse2, 3,
VPX_BITS_8)));
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_sse2,
VPX_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16DCT,
::testing::Values(
@ -950,10 +942,13 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16HT,
::testing::Values(
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 3,
make_tuple(&vp10_fht16x16_sse2,
&vp10_iht16x16_256_add_c, 0, VPX_BITS_8),
make_tuple(&vp10_fht16x16_sse2,
&vp10_iht16x16_256_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht16x16_sse2,
&vp10_iht16x16_256_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht16x16_sse2, &vp10_iht16x16_256_add_c, 3,
VPX_BITS_8)));
// Optimizations take effect at a threshold of 3155, so we use a value close to
// that to test both branches.
@ -971,9 +966,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_sse2,
VPX_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, Trans16x16DCT,
::testing::Values(
@ -982,13 +977,16 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
MSA, Trans16x16HT,
::testing::Values(
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 0, VPX_BITS_8),
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 1, VPX_BITS_8),
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 2, VPX_BITS_8),
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 3,
VPX_BITS_8)));
make_tuple(&vp10_fht16x16_msa,
&vp10_iht16x16_256_add_msa, 0, VPX_BITS_8),
make_tuple(&vp10_fht16x16_msa,
&vp10_iht16x16_256_add_msa, 1, VPX_BITS_8),
make_tuple(&vp10_fht16x16_msa,
&vp10_iht16x16_256_add_msa, 2, VPX_BITS_8),
make_tuple(&vp10_fht16x16_msa,
&vp10_iht16x16_256_add_msa, 3, VPX_BITS_8)));
INSTANTIATE_TEST_CASE_P(MSA, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_msa,
VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -14,29 +14,22 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vp10_rtcd.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_entropy.h"
#include "vp10/common/entropy.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
#include "vpx_ports/mem.h"
#include "vpx_ports/msvc.h" // for round()
using libvpx_test::ACMRandom;
namespace {
#ifdef _MSC_VER
static int round(double x) {
if (x < 0)
return static_cast<int>(ceil(x - 0.5));
else
return static_cast<int>(floor(x + 0.5));
}
#endif
const int kNumCoeffs = 1024;
const double kPi = 3.141592653589793238462643383279502884;
@ -80,7 +73,7 @@ typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
Trans32x32Param;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10);
}
@ -88,7 +81,7 @@ void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> {
public:
@ -121,7 +114,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
@ -133,7 +126,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
@ -145,7 +138,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block,
CONVERT_TO_BYTEPTR(dst16), 32));
@ -153,7 +146,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -257,7 +250,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
@ -271,7 +264,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
@ -285,13 +278,13 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, CONVERT_TO_BYTEPTR(dst16), 32));
#endif
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -323,7 +316,7 @@ class PartialTrans32x32Test
};
TEST_P(PartialTrans32x32Test, Extremes) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -345,7 +338,7 @@ TEST_P(PartialTrans32x32Test, Extremes) {
}
TEST_P(PartialTrans32x32Test, Random) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -368,7 +361,7 @@ TEST_P(PartialTrans32x32Test, Random) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans32x32Test,
::testing::Values(
@ -400,9 +393,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(C, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_c,
VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans32x32Test,
::testing::Values(
@ -410,9 +403,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_c,
&vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans32x32Test,
::testing::Values(
@ -423,9 +416,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2,
VPX_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans32x32Test,
::testing::Values(
@ -442,9 +435,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2,
VPX_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
AVX2, Trans32x32Test,
::testing::Values(
@ -452,9 +445,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_avx2,
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
#endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, Trans32x32Test,
::testing::Values(
@ -465,5 +458,5 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(MSA, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_msa,
VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -21,12 +21,6 @@ namespace {
TEST(DecodeAPI, InvalidParams) {
static const vpx_codec_iface_t *kCodecs[] = {
#if CONFIG_VP8_DECODER
&vpx_codec_vp8_dx_algo,
#endif
#if CONFIG_VP9_DECODER
&vpx_codec_vp9_dx_algo,
#endif
#if CONFIG_VP10_DECODER
&vpx_codec_vp10_dx_algo,
#endif
@ -61,91 +55,4 @@ TEST(DecodeAPI, InvalidParams) {
}
}
#if CONFIG_VP8_DECODER
TEST(DecodeAPI, OptionalParams) {
vpx_codec_ctx_t dec;
#if CONFIG_ERROR_CONCEALMENT
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, NULL,
VPX_CODEC_USE_ERROR_CONCEALMENT));
#else
EXPECT_EQ(VPX_CODEC_INCAPABLE,
vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, NULL,
VPX_CODEC_USE_ERROR_CONCEALMENT));
#endif // CONFIG_ERROR_CONCEALMENT
}
#endif // CONFIG_VP8_DECODER
#if CONFIG_VP9_DECODER
// Test VP9 codec controls after a decode error to ensure the code doesn't
// misbehave.
void TestVp9Controls(vpx_codec_ctx_t *dec) {
static const int kControls[] = {
VP8D_GET_LAST_REF_UPDATES,
VP8D_GET_FRAME_CORRUPTED,
VP9D_GET_DISPLAY_SIZE,
VP9D_GET_FRAME_SIZE
};
int val[2];
for (int i = 0; i < NELEMENTS(kControls); ++i) {
const vpx_codec_err_t res = vpx_codec_control_(dec, kControls[i], val);
switch (kControls[i]) {
case VP8D_GET_FRAME_CORRUPTED:
EXPECT_EQ(VPX_CODEC_ERROR, res) << kControls[i];
break;
default:
EXPECT_EQ(VPX_CODEC_OK, res) << kControls[i];
break;
}
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
vpx_codec_control_(dec, kControls[i], NULL));
}
vp9_ref_frame_t ref;
ref.idx = 0;
EXPECT_EQ(VPX_CODEC_ERROR, vpx_codec_control(dec, VP9_GET_REFERENCE, &ref));
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
vpx_codec_control(dec, VP9_GET_REFERENCE, NULL));
vpx_ref_frame_t ref_copy;
const int width = 352;
const int height = 288;
ASSERT_TRUE(
vpx_img_alloc(&ref_copy.img, VPX_IMG_FMT_I420, width, height, 1) != NULL);
ref_copy.frame_type = VP8_LAST_FRAME;
EXPECT_EQ(VPX_CODEC_ERROR,
vpx_codec_control(dec, VP8_COPY_REFERENCE, &ref_copy));
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
vpx_codec_control(dec, VP8_COPY_REFERENCE, NULL));
vpx_img_free(&ref_copy.img);
}
TEST(DecodeAPI, Vp9InvalidDecode) {
const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
const char filename[] =
"invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf";
libvpx_test::IVFVideoSource video(filename);
video.Init();
video.Begin();
ASSERT_TRUE(!HasFailure());
vpx_codec_ctx_t dec;
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
const uint32_t frame_size = static_cast<uint32_t>(video.frame_size());
#if CONFIG_VP9_HIGHBITDEPTH
EXPECT_EQ(VPX_CODEC_MEM_ERROR,
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
#else
EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM,
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
#endif
vpx_codec_iter_t iter = NULL;
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
TestVp9Controls(&dec);
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
}
#endif // CONFIG_VP9_DECODER
} // namespace

View File

@ -268,6 +268,6 @@ TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) {
printf("}\n");
}
VP9_INSTANTIATE_TEST_CASE(
VP10_INSTANTIATE_TEST_CASE(
VP9NewEncodeDecodePerfTest, ::testing::Values(::libvpx_test::kTwoPassGood));
} // namespace

View File

@ -18,6 +18,7 @@
namespace libvpx_test {
const char kVP8Name[] = "WebM Project VP8";
const char kVP10Name[] = "WebM Project VP10";
vpx_codec_err_t Decoder::PeekStream(const uint8_t *cxdata, size_t size,
vpx_codec_stream_info_t *stream_info) {
@ -46,6 +47,11 @@ bool Decoder::IsVP8() const {
return strncmp(kVP8Name, codec_name, sizeof(kVP8Name) - 1) == 0;
}
bool Decoder::IsVP10() const {
const char *codec_name = GetDecoderName();
return strncmp(kVP10Name, codec_name, sizeof(kVP10Name) - 1) == 0;
}
void DecoderTest::HandlePeekResult(Decoder *const decoder,
CompressedVideoSource *video,
const vpx_codec_err_t res_peek) {

View File

@ -107,6 +107,8 @@ class Decoder {
bool IsVP8() const;
bool IsVP10() const;
vpx_codec_ctx_t * GetDecoder() {
return &decoder_;
}

View File

@ -20,9 +20,9 @@
#include "vpx_scale/yv12config.h"
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_reconinter.h"
#include "vp9/encoder/vp9_context_tree.h"
#include "vp9/encoder/vp9_denoiser.h"
#include "vp10/common/reconinter.h"
#include "vp10/encoder/context_tree.h"
#include "vp10/encoder/denoiser.h"
using libvpx_test::ACMRandom;

View File

@ -20,12 +20,6 @@ namespace {
TEST(EncodeAPI, InvalidParams) {
static const vpx_codec_iface_t *kCodecs[] = {
#if CONFIG_VP8_ENCODER
&vpx_codec_vp8_cx_algo,
#endif
#if CONFIG_VP9_ENCODER
&vpx_codec_vp9_cx_algo,
#endif
#if CONFIG_VP10_ENCODER
&vpx_codec_vp10_cx_algo,
#endif

View File

@ -197,6 +197,6 @@ TEST_P(VP9EncodePerfTest, PerfTest) {
}
}
VP9_INSTANTIATE_TEST_CASE(
VP10_INSTANTIATE_TEST_CASE(
VP9EncodePerfTest, ::testing::Values(::libvpx_test::kRealTime));
} // namespace

View File

@ -13,6 +13,7 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "vpx_ports/mem.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/encode_test_driver.h"
@ -34,29 +35,19 @@ void Encoder::InitEncoder(VideoSource *video) {
init_flags_);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
#if CONFIG_VP9_ENCODER
if (CodecInterface() == &vpx_codec_vp9_cx_algo) {
// Default to 1 tile column for VP9.
const int log2_tile_columns = 0;
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
log2_tile_columns);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
} else
#endif
#if CONFIG_VP10_ENCODER
if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
// Default to 1 tile column for VP10.
// Default to 1 tile column for VP10. With CONFIG_EXT_TILE, the
// default is already the largest possible tile size
#if !CONFIG_EXT_TILE
const int log2_tile_columns = 0;
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
log2_tile_columns);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
#endif // !CONFIG_EXT_TILE
} else
#endif
{
#if CONFIG_VP8_ENCODER
ASSERT_EQ(&vpx_codec_vp8_cx_algo, CodecInterface())
<< "Unknown Codec Interface";
#endif
}
}
}
@ -138,38 +129,120 @@ void EncoderTest::SetMode(TestMode mode) {
else
passes_ = 1;
}
static bool compare_plane(const uint8_t *const buf1, const int stride1,
const uint8_t *const buf2, const int stride2,
const int w, const int h,
int *const mismatch_row,
int *const mismatch_col,
int *const mismatch_pix1,
int *const mismatch_pix2) {
int r, c;
for (r = 0; r < h; ++r) {
for (c = 0; c < w; ++c) {
const int pix1 = buf1[r * stride1 + c];
const int pix2 = buf2[r * stride2 + c];
if (pix1 != pix2) {
if (mismatch_row != NULL)
*mismatch_row = r;
if (mismatch_col != NULL)
*mismatch_col = c;
if (mismatch_pix1 != NULL)
*mismatch_pix1 = pix1;
if (mismatch_pix2 != NULL)
*mismatch_pix2 = pix2;
return false;
}
}
}
return true;
}
// The function should return "true" most of the time, therefore no early
// break-out is implemented within the match checking process.
static bool compare_img(const vpx_image_t *img1,
const vpx_image_t *img2) {
bool match = (img1->fmt == img2->fmt) &&
(img1->cs == img2->cs) &&
(img1->d_w == img2->d_w) &&
(img1->d_h == img2->d_h);
const vpx_image_t *img2,
int *const mismatch_row,
int *const mismatch_col,
int *const mismatch_plane,
int *const mismatch_pix1,
int *const mismatch_pix2) {
const unsigned int width_y = img1->d_w;
const unsigned int height_y = img1->d_h;
unsigned int i;
for (i = 0; i < height_y; ++i)
match = (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y],
img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y],
width_y) == 0) && match;
const unsigned int width_uv = (img1->d_w + 1) >> 1;
const unsigned int height_uv = (img1->d_h + 1) >> 1;
for (i = 0; i < height_uv; ++i)
match = (memcmp(img1->planes[VPX_PLANE_U] + i * img1->stride[VPX_PLANE_U],
img2->planes[VPX_PLANE_U] + i * img2->stride[VPX_PLANE_U],
width_uv) == 0) && match;
for (i = 0; i < height_uv; ++i)
match = (memcmp(img1->planes[VPX_PLANE_V] + i * img1->stride[VPX_PLANE_V],
img2->planes[VPX_PLANE_V] + i * img2->stride[VPX_PLANE_V],
width_uv) == 0) && match;
return match;
const unsigned int w_y = img1->d_w;
const unsigned int h_y = img1->d_h;
const unsigned int w_uv = ROUND_POWER_OF_TWO(w_y, img1->x_chroma_shift);
const unsigned int h_uv = ROUND_POWER_OF_TWO(h_y, img1->y_chroma_shift);
if (img1->fmt != img2->fmt
|| img1->cs != img2->cs
|| img1->d_w != img2->d_w
|| img1->d_h != img2->d_h) {
if (mismatch_row != NULL)
*mismatch_row = -1;
if (mismatch_col != NULL)
*mismatch_col = -1;
return false;
}
if (!compare_plane(img1->planes[VPX_PLANE_Y], img1->stride[VPX_PLANE_Y],
img2->planes[VPX_PLANE_Y], img2->stride[VPX_PLANE_Y],
w_y, h_y,
mismatch_row, mismatch_col,
mismatch_pix1, mismatch_pix2)) {
if (mismatch_plane != NULL)
*mismatch_plane = VPX_PLANE_Y;
return false;
}
if (!compare_plane(img1->planes[VPX_PLANE_U], img1->stride[VPX_PLANE_U],
img2->planes[VPX_PLANE_U], img2->stride[VPX_PLANE_U],
w_uv, h_uv,
mismatch_row, mismatch_col,
mismatch_pix1, mismatch_pix2)) {
if (mismatch_plane != NULL)
*mismatch_plane = VPX_PLANE_U;
return false;
}
if (!compare_plane(img1->planes[VPX_PLANE_V], img1->stride[VPX_PLANE_V],
img2->planes[VPX_PLANE_V], img2->stride[VPX_PLANE_V],
w_uv, h_uv,
mismatch_row, mismatch_col,
mismatch_pix1, mismatch_pix2)) {
if (mismatch_plane != NULL)
*mismatch_plane = VPX_PLANE_U;
return false;
}
return true;
}
void EncoderTest::MismatchHook(const vpx_image_t* /*img1*/,
const vpx_image_t* /*img2*/) {
ASSERT_TRUE(0) << "Encode/Decode mismatch found";
void EncoderTest::MismatchHook(const vpx_image_t* img_enc,
const vpx_image_t* img_dec) {
int mismatch_row = 0;
int mismatch_col = 0;
int mismatch_plane = 0;
int mismatch_pix_enc = 0;
int mismatch_pix_dec = 0;
ASSERT_FALSE(compare_img(img_enc, img_dec,
&mismatch_row, &mismatch_col,
&mismatch_plane,
&mismatch_pix_enc,
&mismatch_pix_dec));
GTEST_FAIL()
<< "Encode/Decode mismatch found:"
<< std::endl
<< " pixel value enc/dec: " << mismatch_pix_enc << "/" << mismatch_pix_dec
<< std::endl
<< " plane: " << mismatch_plane
<< std::endl
<< " row/col: " << mismatch_row << "/" << mismatch_col
<< std::endl;
}
void EncoderTest::RunLoop(VideoSource *video) {
@ -189,11 +262,11 @@ void EncoderTest::RunLoop(VideoSource *video) {
cfg_.g_pass = VPX_RC_LAST_PASS;
BeginPassHook(pass);
Encoder* const encoder = codec_->CreateEncoder(cfg_, deadline_, init_flags_,
&stats_);
ASSERT_TRUE(encoder != NULL);
testing::internal::scoped_ptr<Encoder> encoder(
codec_->CreateEncoder(cfg_, deadline_, init_flags_, &stats_));
ASSERT_TRUE(encoder.get() != NULL);
video->Begin();
ASSERT_NO_FATAL_FAILURE(video->Begin());
encoder->InitEncoder(video);
ASSERT_FALSE(::testing::Test::HasFatalFailure());
@ -202,13 +275,23 @@ void EncoderTest::RunLoop(VideoSource *video) {
// NOTE: fragment decoder and partition encoder are only supported by VP8.
if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION)
dec_init_flags |= VPX_CODEC_USE_INPUT_FRAGMENTS;
Decoder* const decoder = codec_->CreateDecoder(dec_cfg, dec_init_flags, 0);
testing::internal::scoped_ptr<Decoder> decoder(
codec_->CreateDecoder(dec_cfg, dec_init_flags, 0));
#if CONFIG_VP10 && CONFIG_EXT_TILE
if (decoder->IsVP10()) {
// Set dec_cfg.tile_row = -1 and dec_cfg.tile_col = -1 so that the whole
// frame is decoded.
decoder->Control(VP10_SET_DECODE_TILE_ROW, -1);
decoder->Control(VP10_SET_DECODE_TILE_COL, -1);
}
#endif
bool again;
for (again = true; again; video->Next()) {
again = (video->img() != NULL);
PreEncodeFrameHook(video);
PreEncodeFrameHook(video, encoder);
PreEncodeFrameHook(video, encoder.get());
encoder->EncodeFrame(video, frame_flags_);
CxDataIterator iter = encoder->GetCxData();
@ -221,11 +304,11 @@ void EncoderTest::RunLoop(VideoSource *video) {
switch (pkt->kind) {
case VPX_CODEC_CX_FRAME_PKT:
has_cxdata = true;
if (decoder && DoDecode()) {
if (decoder.get() != NULL && DoDecode()) {
vpx_codec_err_t res_dec = decoder->DecodeFrame(
(const uint8_t*)pkt->data.frame.buf, pkt->data.frame.sz);
if (!HandleDecodeResult(res_dec, *video, decoder))
if (!HandleDecodeResult(res_dec, *video, decoder.get()))
break;
has_dxdata = true;
@ -247,7 +330,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
// Flush the decoder when there are no more fragments.
if ((init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION) && has_dxdata) {
const vpx_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0);
if (!HandleDecodeResult(res_dec, *video, decoder))
if (!HandleDecodeResult(res_dec, *video, decoder.get()))
break;
}
@ -256,7 +339,8 @@ void EncoderTest::RunLoop(VideoSource *video) {
DxDataIterator dec_iter = decoder->GetDxData();
const vpx_image_t *img_dec = dec_iter.Next();
if (img_enc && img_dec) {
const bool res = compare_img(img_enc, img_dec);
const bool res = compare_img(img_enc, img_dec,
NULL, NULL, NULL, NULL, NULL);
if (!res) { // Mismatch
MismatchHook(img_enc, img_dec);
}
@ -270,10 +354,6 @@ void EncoderTest::RunLoop(VideoSource *video) {
EndPassHook();
if (decoder)
delete decoder;
delete encoder;
if (!Continue())
break;
}

View File

@ -16,7 +16,7 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
#if CONFIG_VP10_ENCODER
#include "vpx/vp8cx.h"
#endif
#include "vpx/vpx_encoder.h"
@ -143,7 +143,7 @@ class Encoder {
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
}
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
#if CONFIG_VP10_ENCODER
void Control(int ctrl_id, vpx_active_map_t *arg) {
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();

View File

@ -14,7 +14,7 @@
#include "test/encode_test_driver.h"
#include "test/util.h"
#include "test/y4m_video_source.h"
#include "vp9/vp9_dx_iface.h"
#include "vp10/vp10_dx_iface.c"
namespace {
@ -100,7 +100,7 @@ class VpxEncoderParmsGetToDecoder
reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv);
FrameWorkerData *const worker_data =
reinterpret_cast<FrameWorkerData *>(priv->frame_workers[0].data1);
VP9_COMMON *const common = &worker_data->pbi->common;
VP10_COMMON *const common = &worker_data->pbi->common;
if (encode_parms.lossless) {
EXPECT_EQ(0, common->base_qindex);
@ -111,11 +111,7 @@ class VpxEncoderParmsGetToDecoder
}
EXPECT_EQ(encode_parms.error_resilient, common->error_resilient_mode);
if (encode_parms.error_resilient) {
EXPECT_EQ(1, common->frame_parallel_decoding_mode);
EXPECT_EQ(0, common->use_prev_frame_mvs);
} else {
EXPECT_EQ(encode_parms.frame_parallel,
common->frame_parallel_decoding_mode);
}
EXPECT_EQ(encode_parms.color_range, common->color_range);
EXPECT_EQ(encode_parms.cs, common->color_space);
@ -147,7 +143,7 @@ TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
delete video;
}
VP9_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
VP10_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
::testing::ValuesIn(kVP9EncodeParameterSet),
::testing::ValuesIn(kVP9EncodePerfTestVectors));
} // namespace

View File

@ -25,6 +25,20 @@ const unsigned int kFrames = 10;
const int kBitrate = 500;
// List of psnr thresholds for speed settings 0-7 and 5 encoding modes
const double kPsnrThreshold[][5] = {
// Note:
// VP10 HBD average PSNR is slightly lower than VP9.
// We make two cases here to enable the testing and
// guard picture quality.
#if CONFIG_VP10_ENCODER && CONFIG_VPX_HIGHBITDEPTH
{ 36.0, 37.0, 37.0, 37.0, 37.0 },
{ 31.0, 36.0, 36.0, 36.0, 36.0 },
{ 31.0, 35.0, 35.0, 35.0, 35.0 },
{ 31.0, 34.0, 34.0, 34.0, 34.0 },
{ 31.0, 33.0, 33.0, 33.0, 33.0 },
{ 31.0, 32.0, 32.0, 32.0, 32.0 },
{ 30.0, 31.0, 31.0, 31.0, 31.0 },
{ 29.0, 30.0, 30.0, 30.0, 30.0 },
#else
{ 36.0, 37.0, 37.0, 37.0, 37.0 },
{ 35.0, 36.0, 36.0, 36.0, 36.0 },
{ 34.0, 35.0, 35.0, 35.0, 35.0 },
@ -33,6 +47,7 @@ const double kPsnrThreshold[][5] = {
{ 31.0, 32.0, 32.0, 32.0, 32.0 },
{ 30.0, 31.0, 31.0, 31.0, 31.0 },
{ 29.0, 30.0, 30.0, 30.0, 30.0 },
#endif // CONFIG_VPX_HIGHBITDEPTH && CONFIG_VP10_ENCODER
};
typedef struct {
@ -48,7 +63,7 @@ const TestVideoParam kTestVectors[] = {
{"park_joy_90p_8_422.y4m", 8, VPX_IMG_FMT_I422, VPX_BITS_8, 1},
{"park_joy_90p_8_444.y4m", 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
{"park_joy_90p_8_440.yuv", 8, VPX_IMG_FMT_I440, VPX_BITS_8, 1},
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
{"park_joy_90p_10_420.y4m", 10, VPX_IMG_FMT_I42016, VPX_BITS_10, 2},
{"park_joy_90p_10_422.y4m", 10, VPX_IMG_FMT_I42216, VPX_BITS_10, 3},
{"park_joy_90p_10_444.y4m", 10, VPX_IMG_FMT_I44416, VPX_BITS_10, 3},
@ -57,7 +72,7 @@ const TestVideoParam kTestVectors[] = {
{"park_joy_90p_12_422.y4m", 12, VPX_IMG_FMT_I42216, VPX_BITS_12, 3},
{"park_joy_90p_12_444.y4m", 12, VPX_IMG_FMT_I44416, VPX_BITS_12, 3},
{"park_joy_90p_12_440.yuv", 12, VPX_IMG_FMT_I44016, VPX_BITS_12, 3},
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
// Encoding modes tested
@ -126,6 +141,11 @@ class EndToEndTestLarge
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
// Test screen coding tools at cpu_used = 1 && encoding mode is two-pass.
if (cpu_used_ == 1 && encoding_mode_ == ::libvpx_test::kTwoPassGood)
encoder->Control(VP9E_SET_TUNE_CONTENT, VPX_CONTENT_SCREEN);
else
encoder->Control(VP9E_SET_TUNE_CONTENT, VPX_CONTENT_DEFAULT);
if (encoding_mode_ != ::libvpx_test::kRealTime) {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
@ -181,29 +201,10 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) {
delete(video);
}
VP9_INSTANTIATE_TEST_CASE(
EndToEndTestLarge,
::testing::ValuesIn(kEncodingModeVectors),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
#if CONFIG_VP9_HIGHBITDEPTH
# if CONFIG_VP10_ENCODER
// TODO(angiebird): many fail in high bitdepth mode.
INSTANTIATE_TEST_CASE_P(
DISABLED_VP10, EndToEndTestLarge,
::testing::Combine(
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
&libvpx_test::kVP10)),
::testing::ValuesIn(kEncodingModeVectors),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors)));
# endif // CONFIG_VP10_ENCODER
#else
VP10_INSTANTIATE_TEST_CASE(
EndToEndTestLarge,
::testing::ValuesIn(kEncodingModeVectors),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
#endif // CONFIG_VP9_HIGHBITDEPTH
} // namespace

View File

@ -15,19 +15,19 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
#include "./vp10_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_entropy.h"
#include "vp10/common/entropy.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
using libvpx_test::ACMRandom;
namespace {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int kNumIterations = 1000;
typedef int64_t (*ErrorBlockFunc)(const tran_low_t *coeff,
@ -157,55 +157,19 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
<< "First failed at test case " << first_failure;
}
#if HAVE_SSE2 || HAVE_AVX
using std::tr1::make_tuple;
#if CONFIG_USE_X86INC
int64_t wrap_vp9_highbd_block_error_8bit_c(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
int64_t *ssz, int bps) {
EXPECT_EQ(8, bps);
return vp9_highbd_block_error_8bit_c(coeff, dqcoeff, block_size, ssz);
}
#if HAVE_SSE2
int64_t wrap_vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
int64_t *ssz, int bps) {
EXPECT_EQ(8, bps);
return vp9_highbd_block_error_8bit_sse2(coeff, dqcoeff, block_size, ssz);
}
INSTANTIATE_TEST_CASE_P(
SSE2, ErrorBlockTest,
::testing::Values(
make_tuple(&vp9_highbd_block_error_sse2,
&vp9_highbd_block_error_c, VPX_BITS_10),
make_tuple(&vp9_highbd_block_error_sse2,
&vp9_highbd_block_error_c, VPX_BITS_12),
make_tuple(&vp9_highbd_block_error_sse2,
&vp9_highbd_block_error_c, VPX_BITS_8),
make_tuple(&wrap_vp9_highbd_block_error_8bit_sse2,
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
make_tuple(&vp10_highbd_block_error_sse2,
&vp10_highbd_block_error_c, VPX_BITS_10),
make_tuple(&vp10_highbd_block_error_sse2,
&vp10_highbd_block_error_c, VPX_BITS_12),
make_tuple(&vp10_highbd_block_error_sse2,
&vp10_highbd_block_error_c, VPX_BITS_8)));
#endif // HAVE_SSE2
#if HAVE_AVX
int64_t wrap_vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
int64_t *ssz, int bps) {
EXPECT_EQ(8, bps);
return vp9_highbd_block_error_8bit_avx(coeff, dqcoeff, block_size, ssz);
}
INSTANTIATE_TEST_CASE_P(
AVX, ErrorBlockTest,
::testing::Values(
make_tuple(&wrap_vp9_highbd_block_error_8bit_avx,
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
#endif // HAVE_AVX
#endif // CONFIG_USE_X86INC
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -164,6 +164,7 @@ class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
mismatch_psnr_ += mismatch_psnr;
++mismatch_nframes_;
// std::cout << "Mismatch frame psnr: " << mismatch_psnr << "\n";
::libvpx_test::EncoderTest::MismatchHook(img1, img2);
}
void SetErrorFrames(int num, unsigned int *list) {
@ -590,12 +591,6 @@ TEST_P(ErrorResilienceTestLargeCodecControls, CodecControl3TemporalLayers) {
}
}
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
::testing::Values(true));
VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
ONE_PASS_TEST_MODES);
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
::testing::Values(true));
// SVC-related tests don't run for VP10 since SVC is not supported.
VP10_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
::testing::Values(false));

192
test/ethread_test.cc Normal file
View File

@ -0,0 +1,192 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <string>
#include <vector>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/md5_helper.h"
#include "test/util.h"
#include "test/y4m_video_source.h"
namespace {
class VPxEncoderThreadTest
: public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
protected:
VPxEncoderThreadTest()
: EncoderTest(GET_PARAM(0)),
encoder_initialized_(false),
encoding_mode_(GET_PARAM(1)),
set_cpu_used_(GET_PARAM(2)) {
init_flags_ = VPX_CODEC_USE_PSNR;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.w = 1280;
cfg.h = 720;
decoder_ = codec_->CreateDecoder(cfg, 0);
#if CONFIG_VP10 && CONFIG_EXT_TILE
if (decoder_->IsVP10()) {
decoder_->Control(VP10_SET_DECODE_TILE_ROW, -1);
decoder_->Control(VP10_SET_DECODE_TILE_COL, -1);
}
#endif
size_enc_.clear();
md5_dec_.clear();
md5_enc_.clear();
}
virtual ~VPxEncoderThreadTest() {
delete decoder_;
}
virtual void SetUp() {
InitializeConfig();
SetMode(encoding_mode_);
if (encoding_mode_ != ::libvpx_test::kRealTime) {
cfg_.g_lag_in_frames = 3;
cfg_.rc_end_usage = VPX_VBR;
cfg_.rc_2pass_vbr_minsection_pct = 5;
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
} else {
cfg_.g_lag_in_frames = 0;
cfg_.rc_end_usage = VPX_CBR;
cfg_.g_error_resilient = 1;
}
cfg_.rc_max_quantizer = 56;
cfg_.rc_min_quantizer = 0;
}
virtual void BeginPassHook(unsigned int /*pass*/) {
encoder_initialized_ = false;
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource * /*video*/,
::libvpx_test::Encoder *encoder) {
if (!encoder_initialized_) {
#if CONFIG_VP10 && CONFIG_EXT_TILE
encoder->Control(VP9E_SET_TILE_COLUMNS, 1);
if (codec_ == &libvpx_test::kVP10) {
// TODO(geza): Start using multiple tile rows when the multi-threaded
// encoder can handle them
encoder->Control(VP9E_SET_TILE_ROWS, 32);
} else {
encoder->Control(VP9E_SET_TILE_ROWS, 0);
}
#else
// Encode 4 tile columns.
encoder->Control(VP9E_SET_TILE_COLUMNS, 2);
encoder->Control(VP9E_SET_TILE_ROWS, 0);
#endif // CONFIG_VP10 && CONFIG_EXT_TILE
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
if (encoding_mode_ != ::libvpx_test::kRealTime) {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
} else {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 0);
encoder->Control(VP9E_SET_AQ_MODE, 3);
}
encoder_initialized_ = true;
}
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
size_enc_.push_back(pkt->data.frame.sz);
::libvpx_test::MD5 md5_enc;
md5_enc.Add(reinterpret_cast<uint8_t*>(pkt->data.frame.buf),
pkt->data.frame.sz);
md5_enc_.push_back(md5_enc.Get());
const vpx_codec_err_t res = decoder_->DecodeFrame(
reinterpret_cast<uint8_t*>(pkt->data.frame.buf), pkt->data.frame.sz);
if (res != VPX_CODEC_OK) {
abort_ = true;
ASSERT_EQ(VPX_CODEC_OK, res);
}
const vpx_image_t *img = decoder_->GetDxData().Next();
if (img) {
::libvpx_test::MD5 md5_res;
md5_res.Add(img);
md5_dec_.push_back(md5_res.Get());
}
}
void DoTest() {
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 15, 18);
cfg_.rc_target_bitrate = 1000;
// Encode using single thread.
cfg_.g_threads = 1;
init_flags_ = VPX_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
std::vector<size_t> single_thr_size_enc;
std::vector<std::string> single_thr_md5_enc;
std::vector<std::string> single_thr_md5_dec;
single_thr_size_enc = size_enc_;
single_thr_md5_enc = md5_enc_;
single_thr_md5_dec = md5_dec_;
size_enc_.clear();
md5_enc_.clear();
md5_dec_.clear();
// Encode using multiple threads.
cfg_.g_threads = 4;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
std::vector<size_t> multi_thr_size_enc;
std::vector<std::string> multi_thr_md5_enc;
std::vector<std::string> multi_thr_md5_dec;
multi_thr_size_enc = size_enc_;
multi_thr_md5_enc = md5_enc_;
multi_thr_md5_dec = md5_dec_;
size_enc_.clear();
md5_enc_.clear();
md5_dec_.clear();
// Check that the vectors are equal.
ASSERT_EQ(single_thr_size_enc, multi_thr_size_enc);
ASSERT_EQ(single_thr_md5_enc, multi_thr_md5_enc);
ASSERT_EQ(single_thr_md5_dec, multi_thr_md5_dec);
}
bool encoder_initialized_;
::libvpx_test::TestMode encoding_mode_;
int set_cpu_used_;
::libvpx_test::Decoder *decoder_;
std::vector<size_t> size_enc_;
std::vector<std::string> md5_enc_;
std::vector<std::string> md5_dec_;
};
TEST_P(VPxEncoderThreadTest, EncoderResultTest) {
DoTest();
}
class VPxEncoderThreadTestLarge : public VPxEncoderThreadTest {};
TEST_P(VPxEncoderThreadTestLarge, EncoderResultTest) {
DoTest();
}
VP10_INSTANTIATE_TEST_CASE(
VPxEncoderThreadTest,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
::testing::Range(3, 9));
VP10_INSTANTIATE_TEST_CASE(
VPxEncoderThreadTestLarge,
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
::testing::Range(1, 3));
} // namespace

View File

@ -1,493 +0,0 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <string>
#include "./vpx_config.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/md5_helper.h"
#include "test/test_vectors.h"
#include "test/util.h"
#if CONFIG_WEBM_IO
#include "test/webm_video_source.h"
#endif
namespace {
const int kVideoNameParam = 1;
struct ExternalFrameBuffer {
uint8_t *data;
size_t size;
int in_use;
};
// Class to manipulate a list of external frame buffers.
class ExternalFrameBufferList {
public:
ExternalFrameBufferList()
: num_buffers_(0),
ext_fb_list_(NULL) {}
virtual ~ExternalFrameBufferList() {
for (int i = 0; i < num_buffers_; ++i) {
delete [] ext_fb_list_[i].data;
}
delete [] ext_fb_list_;
}
// Creates the list to hold the external buffers. Returns true on success.
bool CreateBufferList(int num_buffers) {
if (num_buffers < 0)
return false;
num_buffers_ = num_buffers;
ext_fb_list_ = new ExternalFrameBuffer[num_buffers_];
EXPECT_TRUE(ext_fb_list_ != NULL);
memset(ext_fb_list_, 0, sizeof(ext_fb_list_[0]) * num_buffers_);
return true;
}
// Searches the frame buffer list for a free frame buffer. Makes sure
// that the frame buffer is at least |min_size| in bytes. Marks that the
// frame buffer is in use by libvpx. Finally sets |fb| to point to the
// external frame buffer. Returns < 0 on an error.
int GetFreeFrameBuffer(size_t min_size, vpx_codec_frame_buffer_t *fb) {
EXPECT_TRUE(fb != NULL);
const int idx = FindFreeBufferIndex();
if (idx == num_buffers_)
return -1;
if (ext_fb_list_[idx].size < min_size) {
delete [] ext_fb_list_[idx].data;
ext_fb_list_[idx].data = new uint8_t[min_size];
memset(ext_fb_list_[idx].data, 0, min_size);
ext_fb_list_[idx].size = min_size;
}
SetFrameBuffer(idx, fb);
return 0;
}
// Test function that will not allocate any data for the frame buffer.
// Returns < 0 on an error.
int GetZeroFrameBuffer(size_t min_size, vpx_codec_frame_buffer_t *fb) {
EXPECT_TRUE(fb != NULL);
const int idx = FindFreeBufferIndex();
if (idx == num_buffers_)
return -1;
if (ext_fb_list_[idx].size < min_size) {
delete [] ext_fb_list_[idx].data;
ext_fb_list_[idx].data = NULL;
ext_fb_list_[idx].size = min_size;
}
SetFrameBuffer(idx, fb);
return 0;
}
// Marks the external frame buffer that |fb| is pointing to as free.
// Returns < 0 on an error.
int ReturnFrameBuffer(vpx_codec_frame_buffer_t *fb) {
if (fb == NULL) {
EXPECT_TRUE(fb != NULL);
return -1;
}
ExternalFrameBuffer *const ext_fb =
reinterpret_cast<ExternalFrameBuffer*>(fb->priv);
if (ext_fb == NULL) {
EXPECT_TRUE(ext_fb != NULL);
return -1;
}
EXPECT_EQ(1, ext_fb->in_use);
ext_fb->in_use = 0;
return 0;
}
// Checks that the ximage data is contained within the external frame buffer
// private data passed back in the ximage.
void CheckXImageFrameBuffer(const vpx_image_t *img) {
if (img->fb_priv != NULL) {
const struct ExternalFrameBuffer *const ext_fb =
reinterpret_cast<ExternalFrameBuffer*>(img->fb_priv);
ASSERT_TRUE(img->planes[0] >= ext_fb->data &&
img->planes[0] < (ext_fb->data + ext_fb->size));
}
}
private:
// Returns the index of the first free frame buffer. Returns |num_buffers_|
// if there are no free frame buffers.
int FindFreeBufferIndex() {
int i;
// Find a free frame buffer.
for (i = 0; i < num_buffers_; ++i) {
if (!ext_fb_list_[i].in_use)
break;
}
return i;
}
// Sets |fb| to an external frame buffer. idx is the index into the frame
// buffer list.
void SetFrameBuffer(int idx, vpx_codec_frame_buffer_t *fb) {
ASSERT_TRUE(fb != NULL);
fb->data = ext_fb_list_[idx].data;
fb->size = ext_fb_list_[idx].size;
ASSERT_EQ(0, ext_fb_list_[idx].in_use);
ext_fb_list_[idx].in_use = 1;
fb->priv = &ext_fb_list_[idx];
}
int num_buffers_;
ExternalFrameBuffer *ext_fb_list_;
};
#if CONFIG_WEBM_IO
// Callback used by libvpx to request the application to return a frame
// buffer of at least |min_size| in bytes.
int get_vp9_frame_buffer(void *user_priv, size_t min_size,
vpx_codec_frame_buffer_t *fb) {
ExternalFrameBufferList *const fb_list =
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
return fb_list->GetFreeFrameBuffer(min_size, fb);
}
// Callback used by libvpx to tell the application that |fb| is not needed
// anymore.
int release_vp9_frame_buffer(void *user_priv,
vpx_codec_frame_buffer_t *fb) {
ExternalFrameBufferList *const fb_list =
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
return fb_list->ReturnFrameBuffer(fb);
}
// Callback will not allocate data for frame buffer.
int get_vp9_zero_frame_buffer(void *user_priv, size_t min_size,
vpx_codec_frame_buffer_t *fb) {
ExternalFrameBufferList *const fb_list =
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
return fb_list->GetZeroFrameBuffer(min_size, fb);
}
// Callback will allocate one less byte than |min_size|.
int get_vp9_one_less_byte_frame_buffer(void *user_priv, size_t min_size,
vpx_codec_frame_buffer_t *fb) {
ExternalFrameBufferList *const fb_list =
reinterpret_cast<ExternalFrameBufferList*>(user_priv);
return fb_list->GetFreeFrameBuffer(min_size - 1, fb);
}
// Callback will not release the external frame buffer.
int do_not_release_vp9_frame_buffer(void *user_priv,
vpx_codec_frame_buffer_t *fb) {
(void)user_priv;
(void)fb;
return 0;
}
#endif // CONFIG_WEBM_IO
// Class for testing passing in external frame buffers to libvpx.
class ExternalFrameBufferMD5Test
: public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<const char*> {
protected:
ExternalFrameBufferMD5Test()
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
md5_file_(NULL),
num_buffers_(0) {}
virtual ~ExternalFrameBufferMD5Test() {
if (md5_file_ != NULL)
fclose(md5_file_);
}
virtual void PreDecodeFrameHook(
const libvpx_test::CompressedVideoSource &video,
libvpx_test::Decoder *decoder) {
if (num_buffers_ > 0 && video.frame_number() == 0) {
// Have libvpx use frame buffers we create.
ASSERT_TRUE(fb_list_.CreateBufferList(num_buffers_));
ASSERT_EQ(VPX_CODEC_OK,
decoder->SetFrameBufferFunctions(
GetVP9FrameBuffer, ReleaseVP9FrameBuffer, this));
}
}
void OpenMD5File(const std::string &md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: "
<< md5_file_name_;
}
virtual void DecompressedFrameHook(const vpx_image_t &img,
const unsigned int frame_number) {
ASSERT_TRUE(md5_file_ != NULL);
char expected_md5[33];
char junk[128];
// Read correct md5 checksums.
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
ASSERT_NE(EOF, res) << "Read md5 data failed";
expected_md5[32] = '\0';
::libvpx_test::MD5 md5_res;
md5_res.Add(&img);
const char *const actual_md5 = md5_res.Get();
// Check md5 match.
ASSERT_STREQ(expected_md5, actual_md5)
<< "Md5 checksums don't match: frame number = " << frame_number;
}
// Callback to get a free external frame buffer. Return value < 0 is an
// error.
static int GetVP9FrameBuffer(void *user_priv, size_t min_size,
vpx_codec_frame_buffer_t *fb) {
ExternalFrameBufferMD5Test *const md5Test =
reinterpret_cast<ExternalFrameBufferMD5Test*>(user_priv);
return md5Test->fb_list_.GetFreeFrameBuffer(min_size, fb);
}
// Callback to release an external frame buffer. Return value < 0 is an
// error.
static int ReleaseVP9FrameBuffer(void *user_priv,
vpx_codec_frame_buffer_t *fb) {
ExternalFrameBufferMD5Test *const md5Test =
reinterpret_cast<ExternalFrameBufferMD5Test*>(user_priv);
return md5Test->fb_list_.ReturnFrameBuffer(fb);
}
void set_num_buffers(int num_buffers) { num_buffers_ = num_buffers; }
int num_buffers() const { return num_buffers_; }
private:
FILE *md5_file_;
int num_buffers_;
ExternalFrameBufferList fb_list_;
};
#if CONFIG_WEBM_IO
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
// Class for testing passing in external frame buffers to libvpx.
class ExternalFrameBufferTest : public ::testing::Test {
protected:
ExternalFrameBufferTest()
: video_(NULL),
decoder_(NULL),
num_buffers_(0) {}
virtual void SetUp() {
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
ASSERT_TRUE(video_ != NULL);
video_->Init();
video_->Begin();
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
ASSERT_TRUE(decoder_ != NULL);
}
virtual void TearDown() {
delete decoder_;
delete video_;
}
// Passes the external frame buffer information to libvpx.
vpx_codec_err_t SetFrameBufferFunctions(
int num_buffers,
vpx_get_frame_buffer_cb_fn_t cb_get,
vpx_release_frame_buffer_cb_fn_t cb_release) {
if (num_buffers > 0) {
num_buffers_ = num_buffers;
EXPECT_TRUE(fb_list_.CreateBufferList(num_buffers_));
}
return decoder_->SetFrameBufferFunctions(cb_get, cb_release, &fb_list_);
}
vpx_codec_err_t DecodeOneFrame() {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
CheckDecodedFrames();
if (res == VPX_CODEC_OK)
video_->Next();
return res;
}
vpx_codec_err_t DecodeRemainingFrames() {
for (; video_->cxdata() != NULL; video_->Next()) {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
if (res != VPX_CODEC_OK)
return res;
CheckDecodedFrames();
}
return VPX_CODEC_OK;
}
private:
void CheckDecodedFrames() {
libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
const vpx_image_t *img = NULL;
// Get decompressed data
while ((img = dec_iter.Next()) != NULL) {
fb_list_.CheckXImageFrameBuffer(img);
}
}
libvpx_test::WebMVideoSource *video_;
libvpx_test::VP9Decoder *decoder_;
int num_buffers_;
ExternalFrameBufferList fb_list_;
};
#endif // CONFIG_WEBM_IO
// This test runs through the set of test vectors, and decodes them.
// Libvpx will call into the application to allocate a frame buffer when
// needed. The md5 checksums are computed for each frame in the video file.
// If md5 checksums match the correct md5 data, then the test is passed.
// Otherwise, the test failed.
TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) {
const std::string filename = GET_PARAM(kVideoNameParam);
libvpx_test::CompressedVideoSource *video = NULL;
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
const int jitter_buffers = 4;
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
set_num_buffers(num_buffers);
#if CONFIG_VP8_DECODER
// Tell compiler we are not using kVP8TestVectors.
(void)libvpx_test::kVP8TestVectors;
#endif
// Open compressed video file.
if (filename.substr(filename.length() - 3, 3) == "ivf") {
video = new libvpx_test::IVFVideoSource(filename);
} else {
#if CONFIG_WEBM_IO
video = new libvpx_test::WebMVideoSource(filename);
#else
fprintf(stderr, "WebM IO is disabled, skipping test vector %s\n",
filename.c_str());
return;
#endif
}
ASSERT_TRUE(video != NULL);
video->Init();
// Construct md5 file name.
const std::string md5_filename = filename + ".md5";
OpenMD5File(md5_filename);
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
delete video;
}
#if CONFIG_WEBM_IO
TEST_F(ExternalFrameBufferTest, MinFrameBuffers) {
// Minimum number of external frame buffers for VP9 is
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS.
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_OK,
SetFrameBufferFunctions(
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
}
TEST_F(ExternalFrameBufferTest, EightJitterBuffers) {
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
// #VPX_MAXIMUM_WORK_BUFFERS + eight jitter buffers.
const int jitter_buffers = 8;
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
ASSERT_EQ(VPX_CODEC_OK,
SetFrameBufferFunctions(
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
}
TEST_F(ExternalFrameBufferTest, NotEnoughBuffers) {
// Minimum number of external frame buffers for VP9 is
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS. Most files will
// only use 5 frame buffers at one time.
const int num_buffers = 2;
ASSERT_EQ(VPX_CODEC_OK,
SetFrameBufferFunctions(
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame());
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeRemainingFrames());
}
TEST_F(ExternalFrameBufferTest, NoRelease) {
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_OK,
SetFrameBufferFunctions(num_buffers, get_vp9_frame_buffer,
do_not_release_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame());
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeRemainingFrames());
}
TEST_F(ExternalFrameBufferTest, NullRealloc) {
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_OK,
SetFrameBufferFunctions(num_buffers, get_vp9_zero_frame_buffer,
release_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
}
TEST_F(ExternalFrameBufferTest, ReallocOneLessByte) {
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_OK,
SetFrameBufferFunctions(
num_buffers, get_vp9_one_less_byte_frame_buffer,
release_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
}
TEST_F(ExternalFrameBufferTest, NullGetFunction) {
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
SetFrameBufferFunctions(num_buffers, NULL,
release_vp9_frame_buffer));
}
TEST_F(ExternalFrameBufferTest, NullReleaseFunction) {
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
SetFrameBufferFunctions(num_buffers, get_vp9_frame_buffer, NULL));
}
TEST_F(ExternalFrameBufferTest, SetAfterDecode) {
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_OK, DecodeOneFrame());
ASSERT_EQ(VPX_CODEC_ERROR,
SetFrameBufferFunctions(
num_buffers, get_vp9_frame_buffer, release_vp9_frame_buffer));
}
#endif // CONFIG_WEBM_IO
VP9_INSTANTIATE_TEST_CASE(ExternalFrameBufferMD5Test,
::testing::ValuesIn(libvpx_test::kVP9TestVectors,
libvpx_test::kVP9TestVectors +
libvpx_test::kNumVP9TestVectors));
} // namespace

View File

@ -14,13 +14,14 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/transform_test_base.h"
#include "test/util.h"
#include "vp9/common/vp9_entropy.h"
#include "vp10/common/entropy.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
#include "vpx_ports/mem.h"
@ -28,16 +29,16 @@
using libvpx_test::ACMRandom;
namespace {
const int kNumCoeffs = 16;
typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride,
int tx_type);
typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
int tx_type);
using libvpx_test::FhtFunc;
typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct4x4Param;
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht4x4Param;
typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t, int>
Dct4x4Param;
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t, int>
Ht4x4Param;
void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
int /*tx_type*/) {
@ -45,15 +46,15 @@ void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
}
void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
vp9_fht4x4_c(in, out, stride, tx_type);
vp10_fht4x4_c(in, out, stride, tx_type);
}
void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
int /*tx_type*/) {
vp9_fwht4x4_c(in, out, stride);
vp10_fwht4x4_c(in, out, stride);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct4x4_16_add_c(in, out, stride, 10);
}
@ -63,11 +64,11 @@ void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
}
void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
vp9_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 10);
vp10_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 10);
}
void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
vp9_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 12);
vp10_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 12);
}
void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
@ -87,199 +88,11 @@ void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
}
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class Trans4x4TestBase {
public:
virtual ~Trans4x4TestBase() {}
protected:
virtual void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) = 0;
virtual void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) = 0;
void RunAccuracyCheck(int limit) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
uint32_t max_error = 0;
int64_t total_error = 0;
const int count_test_block = 10000;
for (int i = 0; i < count_test_block; ++i) {
DECLARE_ALIGNED(16, int16_t, test_input_block[kNumCoeffs]);
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
// Initialize a test block with input range [-255, 255].
for (int j = 0; j < kNumCoeffs; ++j) {
if (bit_depth_ == VPX_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
test_input_block[j] = src16[j] - dst16[j];
#endif
}
}
ASM_REGISTER_STATE_CHECK(RunFwdTxfm(test_input_block,
test_temp_block, pitch_));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block,
CONVERT_TO_BYTEPTR(dst16), pitch_));
#endif
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
ASSERT_EQ(VPX_BITS_8, bit_depth_);
const int diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
if (max_error < error)
max_error = error;
total_error += error;
}
}
EXPECT_GE(static_cast<uint32_t>(limit), max_error)
<< "Error: 4x4 FHT/IHT has an individual round trip error > "
<< limit;
EXPECT_GE(count_test_block * limit, total_error)
<< "Error: 4x4 FHT/IHT has average round trip error > " << limit
<< " per block";
}
void RunCoeffCheck() {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 5000;
DECLARE_ALIGNED(16, int16_t, input_block[kNumCoeffs]);
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < kNumCoeffs; ++j)
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
fwd_txfm_ref(input_block, output_ref_block, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunFwdTxfm(input_block, output_block, pitch_));
// The minimum quant value is 4.
for (int j = 0; j < kNumCoeffs; ++j)
EXPECT_EQ(output_block[j], output_ref_block[j]);
}
}
void RunMemCheck() {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 5000;
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kNumCoeffs]);
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kNumCoeffs]);
DECLARE_ALIGNED(16, tran_low_t, output_block[kNumCoeffs]);
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < kNumCoeffs; ++j) {
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
}
if (i == 0) {
for (int j = 0; j < kNumCoeffs; ++j)
input_extreme_block[j] = mask_;
} else if (i == 1) {
for (int j = 0; j < kNumCoeffs; ++j)
input_extreme_block[j] = -mask_;
}
fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunFwdTxfm(input_extreme_block,
output_block, pitch_));
// The minimum quant value is 4.
for (int j = 0; j < kNumCoeffs; ++j) {
EXPECT_EQ(output_block[j], output_ref_block[j]);
EXPECT_GE(4 * DCT_MAX_VALUE << (bit_depth_ - 8), abs(output_block[j]))
<< "Error: 4x4 FDCT has coefficient larger than 4*DCT_MAX_VALUE";
}
}
}
void RunInvAccuracyCheck(int limit) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 1000;
DECLARE_ALIGNED(16, int16_t, in[kNumCoeffs]);
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < kNumCoeffs; ++j) {
if (bit_depth_ == VPX_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
in[j] = src16[j] - dst16[j];
#endif
}
}
fwd_txfm_ref(in, coeff, pitch_, tx_type_);
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
#endif
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const int diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
EXPECT_GE(static_cast<uint32_t>(limit), error)
<< "Error: 4x4 IDCT has error " << error
<< " at index " << j;
}
}
}
int pitch_;
int tx_type_;
FhtFunc fwd_txfm_ref;
vpx_bit_depth_t bit_depth_;
int mask_;
};
class Trans4x4DCT
: public Trans4x4TestBase,
: public libvpx_test::TransformTestBase,
public ::testing::TestWithParam<Dct4x4Param> {
public:
virtual ~Trans4x4DCT() {}
@ -292,6 +105,7 @@ class Trans4x4DCT
fwd_txfm_ref = fdct4x4_ref;
bit_depth_ = GET_PARAM(3);
mask_ = (1 << bit_depth_) - 1;
num_coeffs_ = GET_PARAM(4);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
@ -324,7 +138,7 @@ TEST_P(Trans4x4DCT, InvAccuracyCheck) {
}
class Trans4x4HT
: public Trans4x4TestBase,
: public libvpx_test::TransformTestBase,
public ::testing::TestWithParam<Ht4x4Param> {
public:
virtual ~Trans4x4HT() {}
@ -337,6 +151,7 @@ class Trans4x4HT
fwd_txfm_ref = fht4x4_ref;
bit_depth_ = GET_PARAM(3);
mask_ = (1 << bit_depth_) - 1;
num_coeffs_ = GET_PARAM(4);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
@ -370,7 +185,7 @@ TEST_P(Trans4x4HT, InvAccuracyCheck) {
}
class Trans4x4WHT
: public Trans4x4TestBase,
: public libvpx_test::TransformTestBase,
public ::testing::TestWithParam<Dct4x4Param> {
public:
virtual ~Trans4x4WHT() {}
@ -383,6 +198,7 @@ class Trans4x4WHT
fwd_txfm_ref = fwht4x4_ref;
bit_depth_ = GET_PARAM(3);
mask_ = (1 << bit_depth_) - 1;
num_coeffs_ = GET_PARAM(4);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
@ -415,132 +231,155 @@ TEST_P(Trans4x4WHT, InvAccuracyCheck) {
}
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10),
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12),
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10, 16),
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12, 16),
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8, 16)));
#else
INSTANTIATE_TEST_CASE_P(
C, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8, 16)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4HT,
::testing::Values(
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12),
make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12, 16),
make_tuple(&vp10_highbd_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 0, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 1, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 3, VPX_BITS_8, 16)));
#else
INSTANTIATE_TEST_CASE_P(
C, Trans4x4HT,
::testing::Values(
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 0, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 1, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 3, VPX_BITS_8, 16)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4WHT,
::testing::Values(
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12),
make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
make_tuple(&vp10_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10, 16),
make_tuple(&vp10_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12, 16),
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8, 16)));
#else
INSTANTIATE_TEST_CASE_P(
C, Trans4x4WHT,
::testing::Values(
make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8, 16)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_fdct4x4_c,
&vpx_idct4x4_16_add_neon, 0, VPX_BITS_8)));
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
&vpx_idct4x4_16_add_neon, 0, VPX_BITS_8, 16)));
#endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans4x4HT,
::testing::Values(
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 0, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 1, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 2, VPX_BITS_8),
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, VPX_BITS_8)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon,
0, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon,
1, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon,
2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon,
3, VPX_BITS_8, 16)));
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4WHT,
::testing::Values(
make_tuple(&vp9_fwht4x4_sse2, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_sse2, 0, VPX_BITS_8)));
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c,
0, VPX_BITS_8, 16),
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_sse2,
0, VPX_BITS_8, 16)));
#endif
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_fdct4x4_sse2,
&vpx_idct4x4_16_add_sse2, 0, VPX_BITS_8)));
&vpx_idct4x4_16_add_sse2, 0, VPX_BITS_8, 16)));
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4HT,
::testing::Values(
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 0, VPX_BITS_8),
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 1, VPX_BITS_8),
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 2, VPX_BITS_8),
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 3, VPX_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 0,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 1,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 2,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 3,
VPX_BITS_8, 16)));
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, VPX_BITS_10),
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10),
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, VPX_BITS_12),
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12),
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10_sse2, 0,
VPX_BITS_10, 16),
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0,
VPX_BITS_10, 16),
make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12_sse2, 0,
VPX_BITS_12, 16),
make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0,
VPX_BITS_12, 16),
make_tuple(&vpx_fdct4x4_sse2, &vpx_idct4x4_16_add_c, 0,
VPX_BITS_8)));
VPX_BITS_8, 16)));
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4HT,
::testing::Values(
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c,
0, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c,
1, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c,
2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c,
3, VPX_BITS_8, 16)));
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_fdct4x4_msa, &vpx_idct4x4_16_add_msa, 0, VPX_BITS_8)));
make_tuple(&vpx_fdct4x4_msa, &vpx_idct4x4_16_add_msa, 0,
VPX_BITS_8, 16)));
INSTANTIATE_TEST_CASE_P(
MSA, Trans4x4HT,
::testing::Values(
make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 0, VPX_BITS_8),
make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 1, VPX_BITS_8),
make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 2, VPX_BITS_8),
make_tuple(&vp9_fht4x4_msa, &vp9_iht4x4_16_add_msa, 3, VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 0,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 1,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 2,
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 3,
VPX_BITS_8, 16)));
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -14,14 +14,14 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_entropy.h"
#include "vp9/common/vp9_scan.h"
#include "vp10/common/entropy.h"
#include "vp10/common/scan.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
#include "vpx_ports/mem.h"
@ -88,10 +88,10 @@ void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride,
}
void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
vp9_fht8x8_c(in, out, stride, tx_type);
vp10_fht8x8_c(in, out, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct8x8_64_add_c(in, out, stride, 10);
}
@ -101,11 +101,11 @@ void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) {
}
void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10);
vp10_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10);
}
void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
vp10_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
}
#if HAVE_SSE2
@ -134,7 +134,7 @@ void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
}
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class FwdTrans8x8TestBase {
public:
@ -221,7 +221,7 @@ class FwdTrans8x8TestBase {
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]);
DECLARE_ALIGNED(16, uint8_t, dst[64]);
DECLARE_ALIGNED(16, uint8_t, src[64]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[64]);
DECLARE_ALIGNED(16, uint16_t, src16[64]);
#endif
@ -233,7 +233,7 @@ class FwdTrans8x8TestBase {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
@ -258,7 +258,7 @@ class FwdTrans8x8TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -266,7 +266,7 @@ class FwdTrans8x8TestBase {
}
for (int j = 0; j < 64; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -299,7 +299,7 @@ class FwdTrans8x8TestBase {
DECLARE_ALIGNED(16, tran_low_t, ref_temp_block[64]);
DECLARE_ALIGNED(16, uint8_t, dst[64]);
DECLARE_ALIGNED(16, uint8_t, src[64]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[64]);
DECLARE_ALIGNED(16, uint16_t, src16[64]);
#endif
@ -319,7 +319,7 @@ class FwdTrans8x8TestBase {
dst[j] = rnd.Rand8() % 2 ? 255 : 0;
}
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
if (i == 0) {
src16[j] = mask_;
@ -343,7 +343,7 @@ class FwdTrans8x8TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -351,7 +351,7 @@ class FwdTrans8x8TestBase {
}
for (int j = 0; j < 64; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -387,7 +387,7 @@ class FwdTrans8x8TestBase {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
#endif
@ -401,7 +401,7 @@ class FwdTrans8x8TestBase {
src[j] = rnd.Rand8() % 2 ? 255 : 0;
dst[j] = src[j] > 0 ? 0 : 255;
in[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand8() % 2 ? mask_ : 0;
dst16[j] = src16[j] > 0 ? 0 : mask_;
@ -416,7 +416,7 @@ class FwdTrans8x8TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
@ -424,7 +424,7 @@ class FwdTrans8x8TestBase {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -474,11 +474,11 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
#endif
const int16_t *scan = vp9_default_scan_orders[TX_8X8].scan;
const int16_t *scan = vp10_default_scan_orders[TX_8X8].scan;
for (int i = 0; i < count_test_block; ++i) {
for (int j = 0; j < kNumCoeffs; ++j) {
@ -491,7 +491,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
if (bit_depth_ == VPX_BITS_8) {
dst[j] = 0;
ref[j] = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
dst16[j] = 0;
ref16[j] = 0;
@ -501,7 +501,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
if (bit_depth_ == VPX_BITS_8) {
ref_txfm(coeff, ref, pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
@ -510,7 +510,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
#else
@ -656,7 +656,7 @@ TEST_P(InvTrans8x8DCT, CompareReference) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8DCT,
::testing::Values(
@ -668,53 +668,53 @@ INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8DCT,
::testing::Values(
make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8HT,
::testing::Values(
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12),
make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 0, VPX_BITS_8),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12),
make_tuple(&vp10_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 3, VPX_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8HT,
::testing::Values(
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 0, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 3, VPX_BITS_8)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, FwdTrans8x8DCT,
::testing::Values(
make_tuple(&vpx_fdct8x8_neon, &vpx_idct8x8_64_add_neon, 0,
VPX_BITS_8)));
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, FwdTrans8x8HT,
::testing::Values(
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 0, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 1, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 2, VPX_BITS_8),
make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, VPX_BITS_8)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 0, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 3, VPX_BITS_8)));
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8DCT,
::testing::Values(
@ -723,13 +723,17 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8HT,
::testing::Values(
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 0, VPX_BITS_8),
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 1, VPX_BITS_8),
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 2, VPX_BITS_8),
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, VPX_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2,
0, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2,
1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2,
2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2,
3, VPX_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8DCT,
::testing::Values(
@ -746,10 +750,10 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8HT,
::testing::Values(
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 0, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_c, 3, VPX_BITS_8)));
// Optimizations take effect at a threshold of 6201, so we use a value close to
// that to test both branches.
@ -764,10 +768,10 @@ INSTANTIATE_TEST_CASE_P(
&idct8x8_10_add_12_sse2, 6225, VPX_BITS_12),
make_tuple(&idct8x8_12,
&idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
!CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSSE3 && ARCH_X86_64 && \
!CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSSE3, FwdTrans8x8DCT,
::testing::Values(
@ -775,7 +779,7 @@ INSTANTIATE_TEST_CASE_P(
VPX_BITS_8)));
#endif
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, FwdTrans8x8DCT,
::testing::Values(
@ -783,9 +787,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
MSA, FwdTrans8x8HT,
::testing::Values(
make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 0, VPX_BITS_8),
make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 1, VPX_BITS_8),
make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 2, VPX_BITS_8),
make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 3, VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 0, VPX_BITS_8),
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 3, VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -17,7 +17,7 @@ class VP9FrameSizeTestsLarge
: public ::libvpx_test::EncoderTest,
public ::testing::Test {
protected:
VP9FrameSizeTestsLarge() : EncoderTest(&::libvpx_test::kVP9),
VP9FrameSizeTestsLarge() : EncoderTest(&::libvpx_test::kVP10),
expected_res_(VPX_CODEC_OK) {}
virtual ~VP9FrameSizeTestsLarge() {}

View File

@ -0,0 +1,65 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef TEST_FUNCTION_EQUIVALENCE_TEST_H_
#define TEST_FUNCTION_EQUIVALENCE_TEST_H_
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/util.h"
using libvpx_test::ACMRandom;
namespace libvpx_test {
// Base class for tests that compare 2 implementations of the same function
// for equivalence. The template parameter should be pointer to a function
// that is being tested.
//
// The test takes a 3-parameters encapsulating struct 'FuncParam', containing:
// - Pointer to reference function
// - Pointer to tested function
// - Integer bit depth (default to 0).
//
// These values are then accessible in the tests as member of params_:
// params_.ref_func, params_.tst_func, and params_.bit_depth.
//
template <typename T>
struct FuncParam {
FuncParam(T ref = NULL, T tst = NULL, int bit_depth = 0)
: ref_func(ref), tst_func(tst), bit_depth(bit_depth) {}
T ref_func;
T tst_func;
int bit_depth;
};
template <typename T>
class FunctionEquivalenceTest : public ::testing::TestWithParam<FuncParam<T> > {
public:
FunctionEquivalenceTest() : rng_(ACMRandom::DeterministicSeed()) {}
virtual ~FunctionEquivalenceTest() {}
virtual void SetUp() {
params_ = this->GetParam();
}
virtual void TearDown() {
libvpx_test::ClearSystemState();
}
protected:
ACMRandom rng_;
FuncParam<T> params_;
};
} // namespace libvpx_test
#endif // TEST_FUNCTION_EQUIVALENCE_TEST_H_

View File

@ -152,10 +152,10 @@ INSTANTIATE_TEST_CASE_P(SSE2, Hadamard8x8Test,
::testing::Values(&vpx_hadamard_8x8_sse2));
#endif // HAVE_SSE2
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64
#if HAVE_SSSE3 && ARCH_X86_64
INSTANTIATE_TEST_CASE_P(SSSE3, Hadamard8x8Test,
::testing::Values(&vpx_hadamard_8x8_ssse3));
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64
#endif // HAVE_SSSE3 && ARCH_X86_64
#if HAVE_NEON
INSTANTIATE_TEST_CASE_P(NEON, Hadamard8x8Test,

251
test/hbd_metrics_test.cc Normal file
View File

@ -0,0 +1,251 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <new>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/util.h"
#include "./vpx_config.h"
#include "vpx_dsp/psnr.h"
#include "vpx_dsp/ssim.h"
#include "vpx_ports/mem.h"
#include "vpx_ports/msvc.h"
#include "vpx_scale/yv12config.h"
using libvpx_test::ACMRandom;
namespace {
typedef double (*LBDMetricFunc)(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest);
typedef double (*HBDMetricFunc)(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest,
uint32_t in_bd, uint32_t bd);
double compute_hbd_psnr(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest,
uint32_t in_bd, uint32_t bd) {
PSNR_STATS psnr;
vpx_calc_highbd_psnr(source, dest, &psnr, bd, in_bd);
return psnr.psnr[0];
}
double compute_psnr(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest) {
PSNR_STATS psnr;
vpx_calc_psnr(source, dest, &psnr);
return psnr.psnr[0];
}
double compute_hbd_psnrhvs(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest,
uint32_t in_bd, uint32_t bd) {
double tempy, tempu, tempv;
return vpx_psnrhvs(source, dest,
&tempy, &tempu, &tempv, bd, in_bd);
}
double compute_psnrhvs(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest) {
double tempy, tempu, tempv;
return vpx_psnrhvs(source, dest,
&tempy, &tempu, &tempv, 8, 8);
}
double compute_hbd_fastssim(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest,
uint32_t in_bd, uint32_t bd) {
double tempy, tempu, tempv;
return vpx_calc_fastssim(source, dest,
&tempy, &tempu, &tempv, bd, in_bd);
}
double compute_fastssim(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest) {
double tempy, tempu, tempv;
return vpx_calc_fastssim(source, dest,
&tempy, &tempu, &tempv, 8, 8);
}
double compute_hbd_vpxssim(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest,
uint32_t in_bd, uint32_t bd) {
double ssim, weight;
ssim = vpx_highbd_calc_ssim(source, dest, &weight, bd, in_bd);
return 100 * pow(ssim / weight, 8.0);
}
double compute_vpxssim(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest) {
double ssim, weight;
ssim = vpx_calc_ssim(source, dest, &weight);
return 100 * pow(ssim / weight, 8.0);
}
class HBDMetricsTestBase {
public:
virtual ~HBDMetricsTestBase() {}
protected:
void RunAccuracyCheck() {
const int width = 1920;
const int height = 1080;
int i = 0;
const uint8_t kPixFiller = 128;
YV12_BUFFER_CONFIG lbd_src, lbd_dst;
YV12_BUFFER_CONFIG hbd_src, hbd_dst;
ACMRandom rnd(ACMRandom::DeterministicSeed());
double lbd_db, hbd_db;
memset(&lbd_src, 0, sizeof(lbd_src));
memset(&lbd_dst, 0, sizeof(lbd_dst));
memset(&hbd_src, 0, sizeof(hbd_src));
memset(&hbd_dst, 0, sizeof(hbd_dst));
vpx_alloc_frame_buffer(&lbd_src, width, height, 1, 1, 0, 32, 16);
vpx_alloc_frame_buffer(&lbd_dst, width, height, 1, 1, 0, 32, 16);
vpx_alloc_frame_buffer(&hbd_src, width, height, 1, 1, 1, 32, 16);
vpx_alloc_frame_buffer(&hbd_dst, width, height, 1, 1, 1, 32, 16);
memset(lbd_src.buffer_alloc, kPixFiller, lbd_src.buffer_alloc_sz);
while (i < lbd_src.buffer_alloc_sz) {
uint16_t spel, dpel;
spel = lbd_src.buffer_alloc[i];
// Create some distortion for dst buffer.
dpel = rnd.Rand8();
lbd_dst.buffer_alloc[i] = (uint8_t)dpel;
((uint16_t*)(hbd_src.buffer_alloc))[i] = spel << (bit_depth_ - 8);
((uint16_t*)(hbd_dst.buffer_alloc))[i] = dpel << (bit_depth_ - 8);
i++;
}
lbd_db = lbd_metric_(&lbd_src, &lbd_dst);
hbd_db = hbd_metric_(&hbd_src, &hbd_dst, input_bit_depth_, bit_depth_);
EXPECT_LE(fabs(lbd_db - hbd_db), threshold_);
i = 0;
while (i < lbd_src.buffer_alloc_sz) {
uint16_t dpel;
// Create some small distortion for dst buffer.
dpel = 120 + (rnd.Rand8() >> 4);
lbd_dst.buffer_alloc[i] = (uint8_t)dpel;
((uint16_t*)(hbd_dst.buffer_alloc))[i] = dpel << (bit_depth_ - 8);
i++;
}
lbd_db = lbd_metric_(&lbd_src, &lbd_dst);
hbd_db = hbd_metric_(&hbd_src, &hbd_dst, input_bit_depth_, bit_depth_);
EXPECT_LE(fabs(lbd_db - hbd_db), threshold_);
i = 0;
while (i < lbd_src.buffer_alloc_sz) {
uint16_t dpel;
// Create some small distortion for dst buffer.
dpel = 126 + (rnd.Rand8() >> 6);
lbd_dst.buffer_alloc[i] = (uint8_t)dpel;
((uint16_t*)(hbd_dst.buffer_alloc))[i] = dpel << (bit_depth_ - 8);
i++;
}
lbd_db = lbd_metric_(&lbd_src, &lbd_dst);
hbd_db = hbd_metric_(&hbd_src, &hbd_dst, input_bit_depth_, bit_depth_);
EXPECT_LE(fabs(lbd_db - hbd_db), threshold_);
vpx_free_frame_buffer(&lbd_src);
vpx_free_frame_buffer(&lbd_dst);
vpx_free_frame_buffer(&hbd_src);
vpx_free_frame_buffer(&hbd_dst);
}
int input_bit_depth_;
int bit_depth_;
double threshold_;
LBDMetricFunc lbd_metric_;
HBDMetricFunc hbd_metric_;
};
typedef std::tr1::tuple<LBDMetricFunc,
HBDMetricFunc, int, int, double> MetricTestTParam;
class HBDMetricsTest
: public HBDMetricsTestBase,
public ::testing::TestWithParam<MetricTestTParam> {
public:
virtual void SetUp() {
lbd_metric_ = GET_PARAM(0);
hbd_metric_ = GET_PARAM(1);
input_bit_depth_ = GET_PARAM(2);
bit_depth_ = GET_PARAM(3);
threshold_ = GET_PARAM(4);
}
virtual void TearDown() {}
};
TEST_P(HBDMetricsTest, RunAccuracyCheck) {
RunAccuracyCheck();
}
// Allow small variation due to floating point operations.
static const double kSsim_thresh = 0.001;
// Allow some additional errors accumulated in floating point operations.
static const double kFSsim_thresh = 0.03;
// Allow some extra variation due to rounding error accumulated in dct.
static const double kPhvs_thresh = 0.3;
INSTANTIATE_TEST_CASE_P(
VPXSSIM, HBDMetricsTest,
::testing::Values(
MetricTestTParam(&compute_vpxssim, &compute_hbd_vpxssim, 8, 10,
kSsim_thresh),
MetricTestTParam(&compute_vpxssim, &compute_hbd_vpxssim, 10, 10,
kPhvs_thresh),
MetricTestTParam(&compute_vpxssim, &compute_hbd_vpxssim, 8, 12,
kSsim_thresh),
MetricTestTParam(&compute_vpxssim, &compute_hbd_vpxssim, 12, 12,
kPhvs_thresh)));
INSTANTIATE_TEST_CASE_P(
FASTSSIM, HBDMetricsTest,
::testing::Values(
MetricTestTParam(&compute_fastssim, &compute_hbd_fastssim, 8, 10,
kFSsim_thresh),
MetricTestTParam(&compute_fastssim, &compute_hbd_fastssim, 10, 10,
kFSsim_thresh),
MetricTestTParam(&compute_fastssim, &compute_hbd_fastssim, 8, 12,
kFSsim_thresh),
MetricTestTParam(&compute_fastssim, &compute_hbd_fastssim, 12, 12,
kFSsim_thresh)));
INSTANTIATE_TEST_CASE_P(
PSNRHVS, HBDMetricsTest,
::testing::Values(
MetricTestTParam(&compute_psnrhvs, &compute_hbd_psnrhvs, 8, 10,
kPhvs_thresh),
MetricTestTParam(&compute_psnrhvs, &compute_hbd_psnrhvs, 10, 10,
kPhvs_thresh),
MetricTestTParam(&compute_psnrhvs, &compute_hbd_psnrhvs, 8, 12,
kPhvs_thresh),
MetricTestTParam(&compute_psnrhvs, &compute_hbd_psnrhvs, 12, 12,
kPhvs_thresh)));
INSTANTIATE_TEST_CASE_P(
PSNR, HBDMetricsTest,
::testing::Values(
MetricTestTParam(&compute_psnr, &compute_hbd_psnr, 8, 10,
kPhvs_thresh),
MetricTestTParam(&compute_psnr, &compute_hbd_psnr, 10, 10,
kPhvs_thresh),
MetricTestTParam(&compute_psnr, &compute_hbd_psnr, 8, 12,
kPhvs_thresh),
MetricTestTParam(&compute_psnr, &compute_hbd_psnr, 12, 12,
kPhvs_thresh)));
} // namespace

View File

@ -17,20 +17,12 @@
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "vpx/vpx_integer.h"
#include "vpx_ports/msvc.h" // for round()
using libvpx_test::ACMRandom;
namespace {
#ifdef _MSC_VER
static int round(double x) {
if (x < 0)
return static_cast<int>(ceil(x - 0.5));
else
return static_cast<int>(floor(x + 0.5));
}
#endif
void reference_dct_1d(double input[8], double output[8]) {
const double kPi = 3.141592653589793238462643383279502884;
const double kInvSqrt2 = 0.707106781186547524400844362104;
@ -86,7 +78,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) {
reference_dct_2d(input, output_r);
for (int j = 0; j < 64; ++j)
coeff[j] = round(output_r[j]);
coeff[j] = static_cast<tran_low_t>(round(output_r[j]));
vpx_idct8x8_64_add_c(coeff, dst, 8);
for (int j = 0; j < 64; ++j) {
const int diff = dst[j] - src[j];

View File

@ -9,7 +9,6 @@
*/
#include "./vpx_config.h"
#include "./vp8_rtcd.h"
#include "third_party/googletest/src/include/gtest/gtest.h"

212
test/intrapred_test.cc Normal file
View File

@ -0,0 +1,212 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <string>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp10/common/blockd.h"
#include "vp10/common/pred_common.h"
#include "vpx_mem/vpx_mem.h"
namespace {
using libvpx_test::ACMRandom;
const int count_test_block = 100000;
typedef void (*IntraPred)(uint16_t* dst, ptrdiff_t stride,
const uint16_t* above, const uint16_t* left,
int bps);
struct IntraPredFunc {
IntraPredFunc(IntraPred pred = NULL, IntraPred ref = NULL,
int block_size_value = 0, int bit_depth_value = 0)
: pred_fn(pred), ref_fn(ref),
block_size(block_size_value), bit_depth(bit_depth_value) {}
IntraPred pred_fn;
IntraPred ref_fn;
int block_size;
int bit_depth;
};
class VP9IntraPredTest : public ::testing::TestWithParam<IntraPredFunc> {
public:
void RunTest(uint16_t* left_col, uint16_t* above_data,
uint16_t* dst, uint16_t* ref_dst) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int block_size = params_.block_size;
above_row_ = above_data + 16;
left_col_ = left_col;
dst_ = dst;
ref_dst_ = ref_dst;
int error_count = 0;
for (int i = 0; i < count_test_block; ++i) {
// Fill edges with random data, try first with saturated values.
for (int x = -1; x <= block_size * 2; x++) {
if (i == 0) {
above_row_[x] = mask_;
} else {
above_row_[x] = rnd.Rand16() & mask_;
}
}
for (int y = 0; y < block_size; y++) {
if (i == 0) {
left_col_[y] = mask_;
} else {
left_col_[y] = rnd.Rand16() & mask_;
}
}
Predict();
CheckPrediction(i, &error_count);
}
ASSERT_EQ(0, error_count);
}
protected:
virtual void SetUp() {
params_ = GetParam();
stride_ = params_.block_size * 3;
mask_ = (1 << params_.bit_depth) - 1;
}
void Predict() {
const int bit_depth = params_.bit_depth;
params_.ref_fn(ref_dst_, stride_, above_row_, left_col_, bit_depth);
ASM_REGISTER_STATE_CHECK(params_.pred_fn(dst_, stride_,
above_row_, left_col_, bit_depth));
}
void CheckPrediction(int test_case_number, int *error_count) const {
// For each pixel ensure that the calculated value is the same as reference.
const int block_size = params_.block_size;
for (int y = 0; y < block_size; y++) {
for (int x = 0; x < block_size; x++) {
*error_count += ref_dst_[x + y * stride_] != dst_[x + y * stride_];
if (*error_count == 1) {
ASSERT_EQ(ref_dst_[x + y * stride_], dst_[x + y * stride_])
<< " Failed on Test Case Number "<< test_case_number;
}
}
}
}
uint16_t *above_row_;
uint16_t *left_col_;
uint16_t *dst_;
uint16_t *ref_dst_;
ptrdiff_t stride_;
int mask_;
IntraPredFunc params_;
};
TEST_P(VP9IntraPredTest, IntraPredTests) {
// max block size is 32
DECLARE_ALIGNED(16, uint16_t, left_col[2*32]);
DECLARE_ALIGNED(16, uint16_t, above_data[2*32+32]);
DECLARE_ALIGNED(16, uint16_t, dst[3 * 32 * 32]);
DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
RunTest(left_col, above_data, dst, ref_dst);
}
#if HAVE_SSE2
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
::testing::Values(
IntraPredFunc(&vpx_highbd_dc_predictor_32x32_sse2,
&vpx_highbd_dc_predictor_32x32_c, 32, 8),
IntraPredFunc(&vpx_highbd_tm_predictor_16x16_sse2,
&vpx_highbd_tm_predictor_16x16_c, 16, 8),
IntraPredFunc(&vpx_highbd_tm_predictor_32x32_sse2,
&vpx_highbd_tm_predictor_32x32_c, 32, 8),
IntraPredFunc(&vpx_highbd_dc_predictor_4x4_sse2,
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
IntraPredFunc(&vpx_highbd_dc_predictor_8x8_sse2,
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
IntraPredFunc(&vpx_highbd_dc_predictor_16x16_sse2,
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
IntraPredFunc(&vpx_highbd_v_predictor_4x4_sse2,
&vpx_highbd_v_predictor_4x4_c, 4, 8),
IntraPredFunc(&vpx_highbd_v_predictor_8x8_sse2,
&vpx_highbd_v_predictor_8x8_c, 8, 8),
IntraPredFunc(&vpx_highbd_v_predictor_16x16_sse2,
&vpx_highbd_v_predictor_16x16_c, 16, 8),
IntraPredFunc(&vpx_highbd_v_predictor_32x32_sse2,
&vpx_highbd_v_predictor_32x32_c, 32, 8),
IntraPredFunc(&vpx_highbd_tm_predictor_4x4_sse2,
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
IntraPredFunc(&vpx_highbd_tm_predictor_8x8_sse2,
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
::testing::Values(
IntraPredFunc(&vpx_highbd_dc_predictor_32x32_sse2,
&vpx_highbd_dc_predictor_32x32_c, 32, 10),
IntraPredFunc(&vpx_highbd_tm_predictor_16x16_sse2,
&vpx_highbd_tm_predictor_16x16_c, 16, 10),
IntraPredFunc(&vpx_highbd_tm_predictor_32x32_sse2,
&vpx_highbd_tm_predictor_32x32_c, 32, 10),
IntraPredFunc(&vpx_highbd_dc_predictor_4x4_sse2,
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
IntraPredFunc(&vpx_highbd_dc_predictor_8x8_sse2,
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
IntraPredFunc(&vpx_highbd_dc_predictor_16x16_sse2,
&vpx_highbd_dc_predictor_16x16_c, 16, 10),
IntraPredFunc(&vpx_highbd_v_predictor_4x4_sse2,
&vpx_highbd_v_predictor_4x4_c, 4, 10),
IntraPredFunc(&vpx_highbd_v_predictor_8x8_sse2,
&vpx_highbd_v_predictor_8x8_c, 8, 10),
IntraPredFunc(&vpx_highbd_v_predictor_16x16_sse2,
&vpx_highbd_v_predictor_16x16_c, 16, 10),
IntraPredFunc(&vpx_highbd_v_predictor_32x32_sse2,
&vpx_highbd_v_predictor_32x32_c, 32, 10),
IntraPredFunc(&vpx_highbd_tm_predictor_4x4_sse2,
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
IntraPredFunc(&vpx_highbd_tm_predictor_8x8_sse2,
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
::testing::Values(
IntraPredFunc(&vpx_highbd_dc_predictor_32x32_sse2,
&vpx_highbd_dc_predictor_32x32_c, 32, 12),
IntraPredFunc(&vpx_highbd_tm_predictor_16x16_sse2,
&vpx_highbd_tm_predictor_16x16_c, 16, 12),
IntraPredFunc(&vpx_highbd_tm_predictor_32x32_sse2,
&vpx_highbd_tm_predictor_32x32_c, 32, 12),
IntraPredFunc(&vpx_highbd_dc_predictor_4x4_sse2,
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
IntraPredFunc(&vpx_highbd_dc_predictor_8x8_sse2,
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
IntraPredFunc(&vpx_highbd_dc_predictor_16x16_sse2,
&vpx_highbd_dc_predictor_16x16_c, 16, 12),
IntraPredFunc(&vpx_highbd_v_predictor_4x4_sse2,
&vpx_highbd_v_predictor_4x4_c, 4, 12),
IntraPredFunc(&vpx_highbd_v_predictor_8x8_sse2,
&vpx_highbd_v_predictor_8x8_c, 8, 12),
IntraPredFunc(&vpx_highbd_v_predictor_16x16_sse2,
&vpx_highbd_v_predictor_16x16_c, 16, 12),
IntraPredFunc(&vpx_highbd_v_predictor_32x32_sse2,
&vpx_highbd_v_predictor_32x32_c, 32, 12),
IntraPredFunc(&vpx_highbd_tm_predictor_4x4_sse2,
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
IntraPredFunc(&vpx_highbd_tm_predictor_8x8_sse2,
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSE2
} // namespace

View File

@ -1,182 +0,0 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/util.h"
#if CONFIG_WEBM_IO
#include "test/webm_video_source.h"
#endif
#include "vpx_mem/vpx_mem.h"
namespace {
struct DecodeParam {
int threads;
const char *filename;
};
std::ostream &operator<<(std::ostream &os, const DecodeParam &dp) {
return os << "threads: " << dp.threads << " file: " << dp.filename;
}
class InvalidFileTest
: public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<DecodeParam> {
protected:
InvalidFileTest() : DecoderTest(GET_PARAM(0)), res_file_(NULL) {}
virtual ~InvalidFileTest() {
if (res_file_ != NULL)
fclose(res_file_);
}
void OpenResFile(const std::string &res_file_name_) {
res_file_ = libvpx_test::OpenTestDataFile(res_file_name_);
ASSERT_TRUE(res_file_ != NULL) << "Result file open failed. Filename: "
<< res_file_name_;
}
virtual bool HandleDecodeResult(
const vpx_codec_err_t res_dec,
const libvpx_test::CompressedVideoSource &video,
libvpx_test::Decoder *decoder) {
EXPECT_TRUE(res_file_ != NULL);
int expected_res_dec;
// Read integer result.
const int res = fscanf(res_file_, "%d", &expected_res_dec);
EXPECT_NE(res, EOF) << "Read result data failed";
// Check results match.
const DecodeParam input = GET_PARAM(1);
if (input.threads > 1) {
// The serial decode check is too strict for tile-threaded decoding as
// there is no guarantee on the decode order nor which specific error
// will take precedence. Currently a tile-level error is not forwarded so
// the frame will simply be marked corrupt.
EXPECT_TRUE(res_dec == expected_res_dec ||
res_dec == VPX_CODEC_CORRUPT_FRAME)
<< "Results don't match: frame number = " << video.frame_number()
<< ". (" << decoder->DecodeError() << "). Expected: "
<< expected_res_dec << " or " << VPX_CODEC_CORRUPT_FRAME;
} else {
EXPECT_EQ(expected_res_dec, res_dec)
<< "Results don't match: frame number = " << video.frame_number()
<< ". (" << decoder->DecodeError() << ")";
}
return !HasFailure();
}
void RunTest() {
const DecodeParam input = GET_PARAM(1);
libvpx_test::CompressedVideoSource *video = NULL;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = input.threads;
const std::string filename = input.filename;
// Open compressed video file.
if (filename.substr(filename.length() - 3, 3) == "ivf") {
video = new libvpx_test::IVFVideoSource(filename);
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
#if CONFIG_WEBM_IO
video = new libvpx_test::WebMVideoSource(filename);
#else
fprintf(stderr, "WebM IO is disabled, skipping test vector %s\n",
filename.c_str());
return;
#endif
}
video->Init();
// Construct result file name. The file holds a list of expected integer
// results, one for each decoded frame. Any result that doesn't match
// the files list will cause a test failure.
const std::string res_filename = filename + ".res";
OpenResFile(res_filename);
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video, cfg));
delete video;
}
private:
FILE *res_file_;
};
TEST_P(InvalidFileTest, ReturnCode) {
RunTest();
}
const DecodeParam kVP9InvalidFileTests[] = {
{1, "invalid-vp90-02-v2.webm"},
#if CONFIG_VP9_HIGHBITDEPTH
{1, "invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf"},
#endif
{1, "invalid-vp90-03-v3.webm"},
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"},
{1, "invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"},
{1, "invalid-vp90-2-12-droppable_1.ivf.s3676_r01-05_b6-.ivf"},
{1, "invalid-vp90-2-05-resize.ivf.s59293_r01-05_b6-.ivf"},
{1, "invalid-vp90-2-09-subpixel-00.ivf.s20492_r01-05_b6-.v2.ivf"},
{1, "invalid-vp91-2-mixedrefcsp-444to420.ivf"},
{1, "invalid-vp90-2-12-droppable_1.ivf.s73804_r01-05_b6-.ivf"},
{1, "invalid-vp90-2-03-size-224x196.webm.ivf.s44156_r01-05_b6-.ivf"},
{1, "invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf"},
};
VP9_INSTANTIATE_TEST_CASE(InvalidFileTest,
::testing::ValuesIn(kVP9InvalidFileTests));
// This class will include test vectors that are expected to fail
// peek. However they are still expected to have no fatal failures.
class InvalidFileInvalidPeekTest : public InvalidFileTest {
protected:
InvalidFileInvalidPeekTest() : InvalidFileTest() {}
virtual void HandlePeekResult(libvpx_test::Decoder *const /*decoder*/,
libvpx_test::CompressedVideoSource* /*video*/,
const vpx_codec_err_t /*res_peek*/) {}
};
TEST_P(InvalidFileInvalidPeekTest, ReturnCode) {
RunTest();
}
const DecodeParam kVP9InvalidFileInvalidPeekTests[] = {
{1, "invalid-vp90-01-v3.webm"},
};
VP9_INSTANTIATE_TEST_CASE(InvalidFileInvalidPeekTest,
::testing::ValuesIn(kVP9InvalidFileInvalidPeekTests));
const DecodeParam kMultiThreadedVP9InvalidFileTests[] = {
{4, "invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm"},
{4, "invalid-"
"vp90-2-08-tile_1x2_frame_parallel.webm.ivf.s47039_r01-05_b6-.ivf"},
{4, "invalid-vp90-2-08-tile_1x8_frame_parallel.webm.ivf.s288_r01-05_b6-.ivf"},
{2, "invalid-vp90-2-09-aq2.webm.ivf.s3984_r01-05_b6-.v2.ivf"},
{4, "invalid-vp90-2-09-subpixel-00.ivf.s19552_r01-05_b6-.v2.ivf"},
};
INSTANTIATE_TEST_CASE_P(
VP9MultiThreaded, InvalidFileTest,
::testing::Combine(
::testing::Values(
static_cast<const libvpx_test::CodecFactory*>(&libvpx_test::kVP9)),
::testing::ValuesIn(kMultiThreadedVP9InvalidFileTests)));
} // namespace

View File

@ -1,145 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <climits>
#include <vector>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
#include "test/util.h"
namespace {
class KeyframeTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
protected:
KeyframeTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~KeyframeTest() {}
virtual void SetUp() {
InitializeConfig();
SetMode(GET_PARAM(1));
kf_count_ = 0;
kf_count_max_ = INT_MAX;
kf_do_force_kf_ = false;
set_cpu_used_ = 0;
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
if (kf_do_force_kf_)
frame_flags_ = (video->frame() % 3) ? 0 : VPX_EFLAG_FORCE_KF;
if (set_cpu_used_ && video->frame() == 1)
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
kf_pts_list_.push_back(pkt->data.frame.pts);
kf_count_++;
abort_ |= kf_count_ > kf_count_max_;
}
}
bool kf_do_force_kf_;
int kf_count_;
int kf_count_max_;
std::vector<vpx_codec_pts_t> kf_pts_list_;
int set_cpu_used_;
};
TEST_P(KeyframeTest, TestRandomVideoSource) {
// Validate that encoding the RandomVideoSource produces multiple keyframes.
// This validates the results of the TestDisableKeyframes test.
kf_count_max_ = 2; // early exit successful tests.
::libvpx_test::RandomVideoSource video;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
// In realtime mode - auto placed keyframes are exceedingly rare, don't
// bother with this check if(GetParam() > 0)
if (GET_PARAM(1) > 0)
EXPECT_GT(kf_count_, 1);
}
TEST_P(KeyframeTest, TestDisableKeyframes) {
cfg_.kf_mode = VPX_KF_DISABLED;
kf_count_max_ = 1; // early exit failed tests.
::libvpx_test::RandomVideoSource video;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
EXPECT_EQ(1, kf_count_);
}
TEST_P(KeyframeTest, TestForceKeyframe) {
cfg_.kf_mode = VPX_KF_DISABLED;
kf_do_force_kf_ = true;
::libvpx_test::DummyVideoSource video;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
// verify that every third frame is a keyframe.
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
iter != kf_pts_list_.end(); ++iter) {
ASSERT_EQ(0, *iter % 3) << "Unexpected keyframe at frame " << *iter;
}
}
TEST_P(KeyframeTest, TestKeyframeMaxDistance) {
cfg_.kf_max_dist = 25;
::libvpx_test::DummyVideoSource video;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
// verify that keyframe interval matches kf_max_dist
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
iter != kf_pts_list_.end(); ++iter) {
ASSERT_EQ(0, *iter % 25) << "Unexpected keyframe at frame " << *iter;
}
}
TEST_P(KeyframeTest, TestAutoKeyframe) {
cfg_.kf_mode = VPX_KF_AUTO;
kf_do_force_kf_ = false;
// Force a deterministic speed step in Real Time mode, as the faster modes
// may not produce a keyframe like we expect. This is necessary when running
// on very slow environments (like Valgrind). The step -11 was determined
// experimentally as the fastest mode that still throws the keyframe.
if (deadline_ == VPX_DL_REALTIME)
set_cpu_used_ = -11;
// This clip has a cut scene every 30 frames -> Frame 0, 30, 60, 90, 120.
// I check only the first 40 frames to make sure there's a keyframe at frame
// 0 and 30.
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 40);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
// In realtime mode - auto placed keyframes are exceedingly rare, don't
// bother with this check
if (GET_PARAM(1) > 0)
EXPECT_EQ(2u, kf_pts_list_.size()) << " Not the right number of keyframes ";
// Verify that keyframes match the file keyframes in the file.
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
iter != kf_pts_list_.end(); ++iter) {
if (deadline_ == VPX_DL_REALTIME && *iter > 0)
EXPECT_EQ(0, (*iter - 1) % 30) << "Unexpected keyframe at frame "
<< *iter;
else
EXPECT_EQ(0, *iter % 30) << "Unexpected keyframe at frame " << *iter;
}
}
VP8_INSTANTIATE_TEST_CASE(KeyframeTest, ALL_TEST_MODES);
} // namespace

View File

@ -81,14 +81,14 @@ TEST_P(LosslessTest, TestLossLessEncoding) {
// intentionally changed the dimension for better testing coverage
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 10);
timebase.den, timebase.num, 0, 5);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const double psnr_lossless = GetMinPsnr();
EXPECT_GE(psnr_lossless, kMaxPsnr);
}
TEST_P(LosslessTest, TestLossLessEncoding444) {
libvpx_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 10);
libvpx_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 5);
cfg_.g_profile = 1;
cfg_.g_timebase = video.timebase();
@ -117,16 +117,12 @@ TEST_P(LosslessTest, TestLossLessEncodingCtrl) {
init_flags_ = VPX_CODEC_USE_PSNR;
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 10);
timebase.den, timebase.num, 0, 5);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const double psnr_lossless = GetMinPsnr();
EXPECT_GE(psnr_lossless, kMaxPsnr);
}
VP9_INSTANTIATE_TEST_CASE(LosslessTest,
::testing::Values(::libvpx_test::kRealTime,
::libvpx_test::kOnePassGood,
::libvpx_test::kTwoPassGood));
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
::testing::Values(::libvpx_test::kOnePassGood,

View File

@ -20,8 +20,8 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_entropy.h"
#include "vp9/common/vp9_loopfilter.h"
#include "vp10/common/entropy.h"
#include "vp10/common/loopfilter.h"
#include "vpx/vpx_integer.h"
using libvpx_test::ACMRandom;
@ -34,7 +34,7 @@ const int kNumCoeffs = 1024;
const int number_of_iterations = 10000;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*loop_op_t)(uint16_t *s, int p, const uint8_t *blimit,
const uint8_t *limit, const uint8_t *thresh,
int bd);
@ -49,7 +49,7 @@ typedef void (*dual_loop_op_t)(uint8_t *s, int p, const uint8_t *blimit0,
const uint8_t *limit0, const uint8_t *thresh0,
const uint8_t *blimit1, const uint8_t *limit1,
const uint8_t *thresh1);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
typedef std::tr1::tuple<loop_op_t, loop_op_t, int> loop8_param_t;
typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
@ -95,14 +95,14 @@ class Loop8Test9Param : public ::testing::TestWithParam<dualloop8_param_t> {
TEST_P(Loop8Test6Param, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int32_t bd = bit_depth_;
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
for (int i = 0; i < count_test_block; ++i) {
@ -153,7 +153,7 @@ TEST_P(Loop8Test6Param, OperationCheck) {
}
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, bd);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, bd));
@ -161,7 +161,7 @@ TEST_P(Loop8Test6Param, OperationCheck) {
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
@ -180,14 +180,14 @@ TEST_P(Loop8Test6Param, OperationCheck) {
TEST_P(Loop8Test6Param, ValueCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t bd = bit_depth_;
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
@ -225,7 +225,7 @@ TEST_P(Loop8Test6Param, ValueCheck) {
s[j] = rnd.Rand16() & mask_;
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, bd);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, bd));
@ -233,7 +233,7 @@ TEST_P(Loop8Test6Param, ValueCheck) {
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
@ -251,14 +251,14 @@ TEST_P(Loop8Test6Param, ValueCheck) {
TEST_P(Loop8Test9Param, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t bd = bit_depth_;
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
for (int i = 0; i < count_test_block; ++i) {
@ -324,7 +324,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
}
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1, bd);
ASM_REGISTER_STATE_CHECK(
@ -336,7 +336,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
@ -354,13 +354,13 @@ TEST_P(Loop8Test9Param, OperationCheck) {
TEST_P(Loop8Test9Param, ValueCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
for (int i = 0; i < count_test_block; ++i) {
@ -400,7 +400,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
s[j] = rnd.Rand16() & mask_;
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t bd = bit_depth_;
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1, bd);
@ -413,7 +413,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
@ -431,7 +431,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
using std::tr1::make_tuple;
#if HAVE_SSE2
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSE2, Loop8Test6Param,
::testing::Values(
@ -503,10 +503,10 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_16_c, 8),
make_tuple(&vpx_lpf_vertical_16_dual_sse2,
&vpx_lpf_vertical_16_dual_c, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif
#if HAVE_AVX2 && (!CONFIG_VP9_HIGHBITDEPTH)
#if HAVE_AVX2 && (!CONFIG_VPX_HIGHBITDEPTH)
INSTANTIATE_TEST_CASE_P(
AVX2, Loop8Test6Param,
::testing::Values(
@ -517,7 +517,7 @@ INSTANTIATE_TEST_CASE_P(
#endif
#if HAVE_SSE2
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSE2, Loop8Test9Param,
::testing::Values(
@ -557,11 +557,11 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_8_dual_sse2,
&vpx_lpf_vertical_8_dual_c, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif
#if HAVE_NEON
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// No neon high bitdepth functions.
#else
INSTANTIATE_TEST_CASE_P(
@ -600,10 +600,10 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_horizontal_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_4_dual_neon,
&vpx_lpf_vertical_4_dual_c, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_NEON
#if HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
#if HAVE_DSPR2 && !CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
DSPR2, Loop8Test6Param,
::testing::Values(
@ -635,9 +635,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_8_dual_dspr2,
&vpx_lpf_vertical_8_dual_c, 8)));
#endif // HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_DSPR2 && !CONFIG_VPX_HIGHBITDEPTH
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
#if HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH)
INSTANTIATE_TEST_CASE_P(
MSA, Loop8Test6Param,
::testing::Values(
@ -667,6 +667,6 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_8_dual_msa,
&vpx_lpf_vertical_8_dual_c, 8)));
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
#endif // HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH)
} // namespace

225
test/masked_sad_test.cc Normal file
View File

@ -0,0 +1,225 @@
/*
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
using libvpx_test::ACMRandom;
namespace {
const int number_of_iterations = 500;
typedef unsigned int (*MaskedSADFunc)(const uint8_t *a, int a_stride,
const uint8_t *b, int b_stride,
const uint8_t *m, int m_stride);
typedef std::tr1::tuple<MaskedSADFunc, MaskedSADFunc> MaskedSADParam;
class MaskedSADTest : public ::testing::TestWithParam<MaskedSADParam> {
public:
virtual ~MaskedSADTest() {}
virtual void SetUp() {
maskedSAD_op_ = GET_PARAM(0);
ref_maskedSAD_op_ = GET_PARAM(1);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
MaskedSADFunc maskedSAD_op_;
MaskedSADFunc ref_maskedSAD_op_;
};
TEST_P(MaskedSADTest, OperationCheck) {
unsigned int ref_ret, ret;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
int err_count = 0;
int first_failure = -1;
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
for (int i = 0; i < number_of_iterations; ++i) {
for (int j = 0; j < MAX_SB_SIZE*MAX_SB_SIZE; j++) {
src_ptr[j] = rnd.Rand8();
ref_ptr[j] = rnd.Rand8();
msk_ptr[j] = ((rnd.Rand8()&0x7f) > 64) ? rnd.Rand8()&0x3f : 64;
assert(msk_ptr[j] <= 64);
}
ref_ret = ref_maskedSAD_op_(src_ptr, src_stride, ref_ptr, ref_stride,
msk_ptr, msk_stride);
ASM_REGISTER_STATE_CHECK(ret = maskedSAD_op_(src_ptr, src_stride,
ref_ptr, ref_stride,
msk_ptr, msk_stride));
if (ret != ref_ret) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked SAD Test, C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
#if CONFIG_VPX_HIGHBITDEPTH
typedef unsigned int (*HighbdMaskedSADFunc)(const uint8_t *a, int a_stride,
const uint8_t *b, int b_stride,
const uint8_t *m, int m_stride);
typedef std::tr1::tuple<HighbdMaskedSADFunc, HighbdMaskedSADFunc>
HighbdMaskedSADParam;
class HighbdMaskedSADTest : public ::testing::
TestWithParam<HighbdMaskedSADParam> {
public:
virtual ~HighbdMaskedSADTest() {}
virtual void SetUp() {
maskedSAD_op_ = GET_PARAM(0);
ref_maskedSAD_op_ = GET_PARAM(1);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
HighbdMaskedSADFunc maskedSAD_op_;
HighbdMaskedSADFunc ref_maskedSAD_op_;
};
TEST_P(HighbdMaskedSADTest, OperationCheck) {
unsigned int ref_ret, ret;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
uint8_t* src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
uint8_t* ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
int err_count = 0;
int first_failure = -1;
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
for (int i = 0; i < number_of_iterations; ++i) {
for (int j = 0; j < MAX_SB_SIZE*MAX_SB_SIZE; j++) {
src_ptr[j] = rnd.Rand16()&0xfff;
ref_ptr[j] = rnd.Rand16()&0xfff;
msk_ptr[j] = ((rnd.Rand8()&0x7f) > 64) ? rnd.Rand8()&0x3f : 64;
}
ref_ret = ref_maskedSAD_op_(src8_ptr, src_stride, ref8_ptr, ref_stride,
msk_ptr, msk_stride);
ASM_REGISTER_STATE_CHECK(ret = maskedSAD_op_(src8_ptr, src_stride,
ref8_ptr, ref_stride,
msk_ptr, msk_stride));
if (ret != ref_ret) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
EXPECT_EQ(0, err_count)
<< "Error: High BD Masked SAD Test, C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
#if HAVE_SSSE3
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, MaskedSADTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_sad128x128_ssse3,
&vpx_masked_sad128x128_c),
make_tuple(&vpx_masked_sad128x64_ssse3,
&vpx_masked_sad128x64_c),
make_tuple(&vpx_masked_sad64x128_ssse3,
&vpx_masked_sad64x128_c),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_sad64x64_ssse3,
&vpx_masked_sad64x64_c),
make_tuple(&vpx_masked_sad64x32_ssse3,
&vpx_masked_sad64x32_c),
make_tuple(&vpx_masked_sad32x64_ssse3,
&vpx_masked_sad32x64_c),
make_tuple(&vpx_masked_sad32x32_ssse3,
&vpx_masked_sad32x32_c),
make_tuple(&vpx_masked_sad32x16_ssse3,
&vpx_masked_sad32x16_c),
make_tuple(&vpx_masked_sad16x32_ssse3,
&vpx_masked_sad16x32_c),
make_tuple(&vpx_masked_sad16x16_ssse3,
&vpx_masked_sad16x16_c),
make_tuple(&vpx_masked_sad16x8_ssse3,
&vpx_masked_sad16x8_c),
make_tuple(&vpx_masked_sad8x16_ssse3,
&vpx_masked_sad8x16_c),
make_tuple(&vpx_masked_sad8x8_ssse3,
&vpx_masked_sad8x8_c),
make_tuple(&vpx_masked_sad8x4_ssse3,
&vpx_masked_sad8x4_c),
make_tuple(&vpx_masked_sad4x8_ssse3,
&vpx_masked_sad4x8_c),
make_tuple(&vpx_masked_sad4x4_ssse3,
&vpx_masked_sad4x4_c)));
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, HighbdMaskedSADTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_sad128x128_ssse3,
&vpx_highbd_masked_sad128x128_c),
make_tuple(&vpx_highbd_masked_sad128x64_ssse3,
&vpx_highbd_masked_sad128x64_c),
make_tuple(&vpx_highbd_masked_sad64x128_ssse3,
&vpx_highbd_masked_sad64x128_c),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_sad64x64_ssse3,
&vpx_highbd_masked_sad64x64_c),
make_tuple(&vpx_highbd_masked_sad64x32_ssse3,
&vpx_highbd_masked_sad64x32_c),
make_tuple(&vpx_highbd_masked_sad32x64_ssse3,
&vpx_highbd_masked_sad32x64_c),
make_tuple(&vpx_highbd_masked_sad32x32_ssse3,
&vpx_highbd_masked_sad32x32_c),
make_tuple(&vpx_highbd_masked_sad32x16_ssse3,
&vpx_highbd_masked_sad32x16_c),
make_tuple(&vpx_highbd_masked_sad16x32_ssse3,
&vpx_highbd_masked_sad16x32_c),
make_tuple(&vpx_highbd_masked_sad16x16_ssse3,
&vpx_highbd_masked_sad16x16_c),
make_tuple(&vpx_highbd_masked_sad16x8_ssse3,
&vpx_highbd_masked_sad16x8_c),
make_tuple(&vpx_highbd_masked_sad8x16_ssse3,
&vpx_highbd_masked_sad8x16_c),
make_tuple(&vpx_highbd_masked_sad8x8_ssse3,
&vpx_highbd_masked_sad8x8_c),
make_tuple(&vpx_highbd_masked_sad8x4_ssse3,
&vpx_highbd_masked_sad8x4_c),
make_tuple(&vpx_highbd_masked_sad4x8_ssse3,
&vpx_highbd_masked_sad4x8_c),
make_tuple(&vpx_highbd_masked_sad4x4_ssse3,
&vpx_highbd_masked_sad4x4_c)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSSE3
} // namespace

View File

@ -0,0 +1,816 @@
/*
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
#include "vpx_dsp/vpx_filter.h"
#include "vpx_mem/vpx_mem.h"
using libvpx_test::ACMRandom;
namespace {
const int number_of_iterations = 500;
typedef unsigned int (*MaskedVarianceFunc)(const uint8_t *a, int a_stride,
const uint8_t *b, int b_stride,
const uint8_t *m, int m_stride,
unsigned int *sse);
typedef std::tr1::tuple<MaskedVarianceFunc,
MaskedVarianceFunc> MaskedVarianceParam;
class MaskedVarianceTest :
public ::testing::TestWithParam<MaskedVarianceParam> {
public:
virtual ~MaskedVarianceTest() {}
virtual void SetUp() {
opt_func_ = GET_PARAM(0);
ref_func_ = GET_PARAM(1);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
MaskedVarianceFunc opt_func_;
MaskedVarianceFunc ref_func_;
};
TEST_P(MaskedVarianceTest, OperationCheck) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
int err_count = 0;
int first_failure = -1;
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
for (int i = 0; i < number_of_iterations; ++i) {
for (int j = 0; j < MAX_SB_SIZE*MAX_SB_SIZE; j++) {
src_ptr[j] = rnd.Rand8();
ref_ptr[j] = rnd.Rand8();
msk_ptr[j] = rnd(65);
}
ref_ret = ref_func_(src_ptr, src_stride,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src_ptr, src_stride,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Variance Test OperationCheck,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
TEST_P(MaskedVarianceTest, ExtremeValues) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
int err_count = 0;
int first_failure = -1;
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
for (int i = 0; i < 8; ++i) {
memset(src_ptr, (i & 0x1) ? 255 : 0, MAX_SB_SIZE*MAX_SB_SIZE);
memset(ref_ptr, (i & 0x2) ? 255 : 0, MAX_SB_SIZE*MAX_SB_SIZE);
memset(msk_ptr, (i & 0x4) ? 64 : 0, MAX_SB_SIZE*MAX_SB_SIZE);
ref_ret = ref_func_(src_ptr, src_stride,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src_ptr, src_stride,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Variance Test ExtremeValues,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
typedef unsigned int (*MaskedSubPixelVarianceFunc)(
const uint8_t *a, int a_stride,
int xoffset, int yoffset,
const uint8_t *b, int b_stride,
const uint8_t *m, int m_stride,
unsigned int *sse);
typedef std::tr1::tuple<MaskedSubPixelVarianceFunc,
MaskedSubPixelVarianceFunc> MaskedSubPixelVarianceParam;
class MaskedSubPixelVarianceTest :
public ::testing::TestWithParam<MaskedSubPixelVarianceParam> {
public:
virtual ~MaskedSubPixelVarianceTest() {}
virtual void SetUp() {
opt_func_ = GET_PARAM(0);
ref_func_ = GET_PARAM(1);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
MaskedSubPixelVarianceFunc opt_func_;
MaskedSubPixelVarianceFunc ref_func_;
};
TEST_P(MaskedSubPixelVarianceTest, OperationCheck) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
int err_count = 0;
int first_failure = -1;
int src_stride = (MAX_SB_SIZE+1);
int ref_stride = (MAX_SB_SIZE+1);
int msk_stride = (MAX_SB_SIZE+1);
int xoffset;
int yoffset;
for (int i = 0; i < number_of_iterations; ++i) {
int xoffsets[] = {0, 4, rnd(BIL_SUBPEL_SHIFTS)};
int yoffsets[] = {0, 4, rnd(BIL_SUBPEL_SHIFTS)};
for (int j = 0; j < (MAX_SB_SIZE+1)*(MAX_SB_SIZE+1); j++) {
src_ptr[j] = rnd.Rand8();
ref_ptr[j] = rnd.Rand8();
msk_ptr[j] = rnd(65);
}
for (int k = 0; k < 3; k++) {
xoffset = xoffsets[k];
for (int l = 0; l < 3; l++) {
xoffset = xoffsets[k];
yoffset = yoffsets[l];
ref_ret = ref_func_(src_ptr, src_stride,
xoffset, yoffset,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src_ptr, src_stride,
xoffset, yoffset,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Sub Pixel Variance Test OperationCheck,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
TEST_P(MaskedSubPixelVarianceTest, ExtremeValues) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
int first_failure_x = -1;
int first_failure_y = -1;
int err_count = 0;
int first_failure = -1;
int src_stride = (MAX_SB_SIZE+1);
int ref_stride = (MAX_SB_SIZE+1);
int msk_stride = (MAX_SB_SIZE+1);
for (int xoffset = 0 ; xoffset < BIL_SUBPEL_SHIFTS ; xoffset++) {
for (int yoffset = 0 ; yoffset < BIL_SUBPEL_SHIFTS ; yoffset++) {
for (int i = 0; i < 8; ++i) {
memset(src_ptr, (i & 0x1) ? 255 : 0, (MAX_SB_SIZE+1)*(MAX_SB_SIZE+1));
memset(ref_ptr, (i & 0x2) ? 255 : 0, (MAX_SB_SIZE+1)*(MAX_SB_SIZE+1));
memset(msk_ptr, (i & 0x4) ? 64 : 0, (MAX_SB_SIZE+1)*(MAX_SB_SIZE+1));
ref_ret = ref_func_(src_ptr, src_stride,
xoffset, yoffset,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src_ptr, src_stride,
xoffset, yoffset,
ref_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1) {
first_failure = i;
first_failure_x = xoffset;
first_failure_y = yoffset;
}
}
}
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Variance Test ExtremeValues,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure
<< " x_offset = " << first_failure_x
<< " y_offset = " << first_failure_y;
}
#if CONFIG_VPX_HIGHBITDEPTH
typedef std::tr1::tuple<MaskedVarianceFunc,
MaskedVarianceFunc,
vpx_bit_depth_t> HighbdMaskedVarianceParam;
class HighbdMaskedVarianceTest :
public ::testing::TestWithParam<HighbdMaskedVarianceParam> {
public:
virtual ~HighbdMaskedVarianceTest() {}
virtual void SetUp() {
opt_func_ = GET_PARAM(0);
ref_func_ = GET_PARAM(1);
bit_depth_ = GET_PARAM(2);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
MaskedVarianceFunc opt_func_;
MaskedVarianceFunc ref_func_;
vpx_bit_depth_t bit_depth_;
};
TEST_P(HighbdMaskedVarianceTest, OperationCheck) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
uint8_t* src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
uint8_t* ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
int err_count = 0;
int first_failure = -1;
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
for (int i = 0; i < number_of_iterations; ++i) {
for (int j = 0; j < MAX_SB_SIZE*MAX_SB_SIZE; j++) {
src_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
ref_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
msk_ptr[j] = rnd(65);
}
ref_ret = ref_func_(src8_ptr, src_stride,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src8_ptr, src_stride,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Variance Test OperationCheck,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
TEST_P(HighbdMaskedVarianceTest, ExtremeValues) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_SB_SIZE*MAX_SB_SIZE]);
uint8_t* src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
uint8_t* ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
int err_count = 0;
int first_failure = -1;
int src_stride = MAX_SB_SIZE;
int ref_stride = MAX_SB_SIZE;
int msk_stride = MAX_SB_SIZE;
for (int i = 0; i < 8; ++i) {
vpx_memset16(src_ptr, (i & 0x1) ? ((1 << bit_depth_) - 1) : 0,
MAX_SB_SIZE*MAX_SB_SIZE);
vpx_memset16(ref_ptr, (i & 0x2) ? ((1 << bit_depth_) - 1) : 0,
MAX_SB_SIZE*MAX_SB_SIZE);
memset(msk_ptr, (i & 0x4) ? 64 : 0, MAX_SB_SIZE*MAX_SB_SIZE);
ref_ret = ref_func_(src8_ptr, src_stride,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src8_ptr, src_stride,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1)
first_failure = i;
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Variance Test ExtremeValues,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
typedef std::tr1::tuple<MaskedSubPixelVarianceFunc,
MaskedSubPixelVarianceFunc,
vpx_bit_depth_t> HighbdMaskedSubPixelVarianceParam;
class HighbdMaskedSubPixelVarianceTest :
public ::testing::TestWithParam<HighbdMaskedSubPixelVarianceParam> {
public:
virtual ~HighbdMaskedSubPixelVarianceTest() {}
virtual void SetUp() {
opt_func_ = GET_PARAM(0);
ref_func_ = GET_PARAM(1);
bit_depth_ = GET_PARAM(2);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
MaskedSubPixelVarianceFunc opt_func_;
MaskedSubPixelVarianceFunc ref_func_;
vpx_bit_depth_t bit_depth_;
};
TEST_P(HighbdMaskedSubPixelVarianceTest, OperationCheck) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
uint8_t* src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
uint8_t* ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
int err_count = 0;
int first_failure = -1;
int first_failure_x = -1;
int first_failure_y = -1;
int src_stride = (MAX_SB_SIZE+1);
int ref_stride = (MAX_SB_SIZE+1);
int msk_stride = (MAX_SB_SIZE+1);
int xoffset, yoffset;
for (int i = 0; i < number_of_iterations; ++i) {
for (xoffset = 0; xoffset < BIL_SUBPEL_SHIFTS; xoffset++) {
for (yoffset = 0; yoffset < BIL_SUBPEL_SHIFTS; yoffset++) {
for (int j = 0; j < (MAX_SB_SIZE+1)*(MAX_SB_SIZE+1); j++) {
src_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
ref_ptr[j] = rnd.Rand16() & ((1 << bit_depth_) - 1);
msk_ptr[j] = rnd(65);
}
ref_ret = ref_func_(src8_ptr, src_stride,
xoffset, yoffset,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src8_ptr, src_stride,
xoffset, yoffset,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1) {
first_failure = i;
first_failure_x = xoffset;
first_failure_y = yoffset;
}
}
}
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Sub Pixel Variance Test OperationCheck,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure
<< " x_offset = " << first_failure_x
<< " y_offset = " << first_failure_y;
}
TEST_P(HighbdMaskedSubPixelVarianceTest, ExtremeValues) {
unsigned int ref_ret, opt_ret;
unsigned int ref_sse, opt_sse;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1)]);
uint8_t* src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
uint8_t* ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
int first_failure_x = -1;
int first_failure_y = -1;
int err_count = 0;
int first_failure = -1;
int src_stride = (MAX_SB_SIZE+1);
int ref_stride = (MAX_SB_SIZE+1);
int msk_stride = (MAX_SB_SIZE+1);
for (int xoffset = 0 ; xoffset < BIL_SUBPEL_SHIFTS ; xoffset++) {
for (int yoffset = 0 ; yoffset < BIL_SUBPEL_SHIFTS ; yoffset++) {
for (int i = 0; i < 8; ++i) {
vpx_memset16(src_ptr, (i & 0x1) ? ((1 << bit_depth_) - 1) : 0,
(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1));
vpx_memset16(ref_ptr, (i & 0x2) ? ((1 << bit_depth_) - 1) : 0,
(MAX_SB_SIZE+1)*(MAX_SB_SIZE+1));
memset(msk_ptr, (i & 0x4) ? 64 : 0, (MAX_SB_SIZE+1)*(MAX_SB_SIZE+1));
ref_ret = ref_func_(src8_ptr, src_stride,
xoffset, yoffset,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&ref_sse);
ASM_REGISTER_STATE_CHECK(opt_ret = opt_func_(src8_ptr, src_stride,
xoffset, yoffset,
ref8_ptr, ref_stride,
msk_ptr, msk_stride,
&opt_sse));
if (opt_ret != ref_ret || opt_sse != ref_sse) {
err_count++;
if (first_failure == -1) {
first_failure = i;
first_failure_x = xoffset;
first_failure_y = yoffset;
}
}
}
}
}
EXPECT_EQ(0, err_count)
<< "Error: Masked Variance Test ExtremeValues,"
<< "C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure
<< " x_offset = " << first_failure_x
<< " y_offset = " << first_failure_y;
}
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
#if HAVE_SSSE3
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, MaskedVarianceTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_variance128x128_ssse3,
&vpx_masked_variance128x128_c),
make_tuple(&vpx_masked_variance128x64_ssse3,
&vpx_masked_variance128x64_c),
make_tuple(&vpx_masked_variance64x128_ssse3,
&vpx_masked_variance64x128_c),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_variance64x64_ssse3,
&vpx_masked_variance64x64_c),
make_tuple(&vpx_masked_variance64x32_ssse3,
&vpx_masked_variance64x32_c),
make_tuple(&vpx_masked_variance32x64_ssse3,
&vpx_masked_variance32x64_c),
make_tuple(&vpx_masked_variance32x32_ssse3,
&vpx_masked_variance32x32_c),
make_tuple(&vpx_masked_variance32x16_ssse3,
&vpx_masked_variance32x16_c),
make_tuple(&vpx_masked_variance16x32_ssse3,
&vpx_masked_variance16x32_c),
make_tuple(&vpx_masked_variance16x16_ssse3,
&vpx_masked_variance16x16_c),
make_tuple(&vpx_masked_variance16x8_ssse3,
&vpx_masked_variance16x8_c),
make_tuple(&vpx_masked_variance8x16_ssse3,
&vpx_masked_variance8x16_c),
make_tuple(&vpx_masked_variance8x8_ssse3,
&vpx_masked_variance8x8_c),
make_tuple(&vpx_masked_variance8x4_ssse3,
&vpx_masked_variance8x4_c),
make_tuple(&vpx_masked_variance4x8_ssse3,
&vpx_masked_variance4x8_c),
make_tuple(&vpx_masked_variance4x4_ssse3,
&vpx_masked_variance4x4_c)));
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, MaskedSubPixelVarianceTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_sub_pixel_variance128x128_ssse3,
&vpx_masked_sub_pixel_variance128x128_c),
make_tuple(&vpx_masked_sub_pixel_variance128x64_ssse3,
&vpx_masked_sub_pixel_variance128x64_c),
make_tuple(&vpx_masked_sub_pixel_variance64x128_ssse3,
&vpx_masked_sub_pixel_variance64x128_c),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_sub_pixel_variance64x64_ssse3,
&vpx_masked_sub_pixel_variance64x64_c),
make_tuple(&vpx_masked_sub_pixel_variance64x32_ssse3,
&vpx_masked_sub_pixel_variance64x32_c),
make_tuple(&vpx_masked_sub_pixel_variance32x64_ssse3,
&vpx_masked_sub_pixel_variance32x64_c),
make_tuple(&vpx_masked_sub_pixel_variance32x32_ssse3,
&vpx_masked_sub_pixel_variance32x32_c),
make_tuple(&vpx_masked_sub_pixel_variance32x16_ssse3,
&vpx_masked_sub_pixel_variance32x16_c),
make_tuple(&vpx_masked_sub_pixel_variance16x32_ssse3,
&vpx_masked_sub_pixel_variance16x32_c),
make_tuple(&vpx_masked_sub_pixel_variance16x16_ssse3,
&vpx_masked_sub_pixel_variance16x16_c),
make_tuple(&vpx_masked_sub_pixel_variance16x8_ssse3,
&vpx_masked_sub_pixel_variance16x8_c),
make_tuple(&vpx_masked_sub_pixel_variance8x16_ssse3,
&vpx_masked_sub_pixel_variance8x16_c),
make_tuple(&vpx_masked_sub_pixel_variance8x8_ssse3,
&vpx_masked_sub_pixel_variance8x8_c),
make_tuple(&vpx_masked_sub_pixel_variance8x4_ssse3,
&vpx_masked_sub_pixel_variance8x4_c),
make_tuple(&vpx_masked_sub_pixel_variance4x8_ssse3,
&vpx_masked_sub_pixel_variance4x8_c),
make_tuple(&vpx_masked_sub_pixel_variance4x4_ssse3,
&vpx_masked_sub_pixel_variance4x4_c)));
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, HighbdMaskedVarianceTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_variance128x128_ssse3,
&vpx_highbd_masked_variance128x128_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance128x64_ssse3,
&vpx_highbd_masked_variance128x64_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance64x128_ssse3,
&vpx_highbd_masked_variance64x128_c, VPX_BITS_8),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_variance64x64_ssse3,
&vpx_highbd_masked_variance64x64_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance64x32_ssse3,
&vpx_highbd_masked_variance64x32_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance32x64_ssse3,
&vpx_highbd_masked_variance32x64_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance32x32_ssse3,
&vpx_highbd_masked_variance32x32_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance32x16_ssse3,
&vpx_highbd_masked_variance32x16_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance16x32_ssse3,
&vpx_highbd_masked_variance16x32_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance16x16_ssse3,
&vpx_highbd_masked_variance16x16_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance16x8_ssse3,
&vpx_highbd_masked_variance16x8_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance8x16_ssse3,
&vpx_highbd_masked_variance8x16_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance8x8_ssse3,
&vpx_highbd_masked_variance8x8_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance8x4_ssse3,
&vpx_highbd_masked_variance8x4_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance4x8_ssse3,
&vpx_highbd_masked_variance4x8_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_variance4x4_ssse3,
&vpx_highbd_masked_variance4x4_c, VPX_BITS_8),
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_10_masked_variance128x128_ssse3,
&vpx_highbd_10_masked_variance128x128_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance128x64_ssse3,
&vpx_highbd_10_masked_variance128x64_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance64x128_ssse3,
&vpx_highbd_10_masked_variance64x128_c, VPX_BITS_10),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_10_masked_variance64x64_ssse3,
&vpx_highbd_10_masked_variance64x64_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance64x32_ssse3,
&vpx_highbd_10_masked_variance64x32_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance32x64_ssse3,
&vpx_highbd_10_masked_variance32x64_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance32x32_ssse3,
&vpx_highbd_10_masked_variance32x32_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance32x16_ssse3,
&vpx_highbd_10_masked_variance32x16_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance16x32_ssse3,
&vpx_highbd_10_masked_variance16x32_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance16x16_ssse3,
&vpx_highbd_10_masked_variance16x16_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance16x8_ssse3,
&vpx_highbd_10_masked_variance16x8_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance8x16_ssse3,
&vpx_highbd_10_masked_variance8x16_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance8x8_ssse3,
&vpx_highbd_10_masked_variance8x8_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance8x4_ssse3,
&vpx_highbd_10_masked_variance8x4_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance4x8_ssse3,
&vpx_highbd_10_masked_variance4x8_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_variance4x4_ssse3,
&vpx_highbd_10_masked_variance4x4_c, VPX_BITS_10),
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_12_masked_variance128x128_ssse3,
&vpx_highbd_12_masked_variance128x128_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance128x64_ssse3,
&vpx_highbd_12_masked_variance128x64_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance64x128_ssse3,
&vpx_highbd_12_masked_variance64x128_c, VPX_BITS_12),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_12_masked_variance64x64_ssse3,
&vpx_highbd_12_masked_variance64x64_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance64x32_ssse3,
&vpx_highbd_12_masked_variance64x32_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance32x64_ssse3,
&vpx_highbd_12_masked_variance32x64_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance32x32_ssse3,
&vpx_highbd_12_masked_variance32x32_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance32x16_ssse3,
&vpx_highbd_12_masked_variance32x16_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance16x32_ssse3,
&vpx_highbd_12_masked_variance16x32_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance16x16_ssse3,
&vpx_highbd_12_masked_variance16x16_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance16x8_ssse3,
&vpx_highbd_12_masked_variance16x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance8x16_ssse3,
&vpx_highbd_12_masked_variance8x16_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance8x8_ssse3,
&vpx_highbd_12_masked_variance8x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance8x4_ssse3,
&vpx_highbd_12_masked_variance8x4_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance4x8_ssse3,
&vpx_highbd_12_masked_variance4x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_variance4x4_ssse3,
&vpx_highbd_12_masked_variance4x4_c, VPX_BITS_12)));
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, HighbdMaskedSubPixelVarianceTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_sub_pixel_variance128x128_ssse3,
&vpx_highbd_masked_sub_pixel_variance128x128_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance128x64_ssse3,
&vpx_highbd_masked_sub_pixel_variance128x64_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance64x128_ssse3,
&vpx_highbd_masked_sub_pixel_variance64x128_c, VPX_BITS_8),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_sub_pixel_variance64x64_ssse3,
&vpx_highbd_masked_sub_pixel_variance64x64_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance64x32_ssse3,
&vpx_highbd_masked_sub_pixel_variance64x32_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance32x64_ssse3,
&vpx_highbd_masked_sub_pixel_variance32x64_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance32x32_ssse3,
&vpx_highbd_masked_sub_pixel_variance32x32_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance32x16_ssse3,
&vpx_highbd_masked_sub_pixel_variance32x16_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance16x32_ssse3,
&vpx_highbd_masked_sub_pixel_variance16x32_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance16x16_ssse3,
&vpx_highbd_masked_sub_pixel_variance16x16_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance16x8_ssse3,
&vpx_highbd_masked_sub_pixel_variance16x8_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance8x16_ssse3,
&vpx_highbd_masked_sub_pixel_variance8x16_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance8x8_ssse3,
&vpx_highbd_masked_sub_pixel_variance8x8_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance8x4_ssse3,
&vpx_highbd_masked_sub_pixel_variance8x4_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance4x8_ssse3,
&vpx_highbd_masked_sub_pixel_variance4x8_c, VPX_BITS_8),
make_tuple(&vpx_highbd_masked_sub_pixel_variance4x4_ssse3,
&vpx_highbd_masked_sub_pixel_variance4x4_c, VPX_BITS_8),
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance128x128_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance128x128_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance128x64_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance128x64_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance64x128_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance64x128_c, VPX_BITS_10),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance64x64_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance64x64_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance64x32_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance64x32_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance32x64_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance32x64_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance32x32_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance32x32_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance32x16_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance32x16_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance16x32_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance16x32_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance16x16_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance16x16_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance16x8_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance16x8_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance8x16_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance8x16_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance8x8_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance8x8_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance8x4_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance8x4_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance4x8_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance4x8_c, VPX_BITS_10),
make_tuple(&vpx_highbd_10_masked_sub_pixel_variance4x4_ssse3,
&vpx_highbd_10_masked_sub_pixel_variance4x4_c, VPX_BITS_10),
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance128x128_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance128x128_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance128x64_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance128x64_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance64x128_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance64x128_c, VPX_BITS_12),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance64x64_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance64x64_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance64x32_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance64x32_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance32x64_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance32x64_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance32x32_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance32x32_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance32x16_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance32x16_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance16x32_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance16x32_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance16x16_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance16x16_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance16x8_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance16x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance8x16_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance8x16_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance8x8_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance8x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance8x4_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance8x4_c, VPX_BITS_12) ,
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance4x8_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance4x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance4x4_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance4x4_c, VPX_BITS_12)));
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSSE3
} // namespace

192
test/obmc_sad_test.cc Normal file
View File

@ -0,0 +1,192 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/function_equivalence_test.h"
#include "test/register_state_check.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE)
using libvpx_test::FunctionEquivalenceTest;
namespace {
static const int kIterations = 1000;
static const int kMaskMax = 64;
typedef unsigned int (*ObmcSadF)(const uint8_t *pre, int pre_stride,
const int32_t *wsrc, const int32_t *mask);
typedef libvpx_test::FuncParam<ObmcSadF> TestFuncs;
////////////////////////////////////////////////////////////////////////////////
// 8 bit
////////////////////////////////////////////////////////////////////////////////
class ObmcSadTest : public FunctionEquivalenceTest<ObmcSadF> {};
TEST_P(ObmcSadTest, RandomValues) {
DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < kIterations && !HasFatalFailure() ; ++iter) {
const int pre_stride = rng_(MAX_SB_SIZE + 1);
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = rng_.Rand8();
wsrc[i] = rng_.Rand8() * rng_(kMaskMax * kMaskMax + 1);
mask[i] = rng_(kMaskMax * kMaskMax + 1);
}
const unsigned int ref_res = params_.ref_func(pre, pre_stride, wsrc, mask);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(tst_res =
params_.tst_func(pre, pre_stride, wsrc, mask));
ASSERT_EQ(ref_res, tst_res);
}
}
TEST_P(ObmcSadTest, ExtremeValues) {
DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < MAX_SB_SIZE && !HasFatalFailure() ; ++iter) {
const int pre_stride = iter;
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = UINT8_MAX;
wsrc[i] = UINT8_MAX * kMaskMax * kMaskMax;
mask[i] = kMaskMax * kMaskMax;
}
const unsigned int ref_res = params_.ref_func(pre, pre_stride, wsrc, mask);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(tst_res =
params_.tst_func(pre, pre_stride, wsrc, mask));
ASSERT_EQ(ref_res, tst_res);
}
}
#if HAVE_SSE4_1
const ObmcSadTest::ParamType sse4_functions[] = {
#if CONFIG_EXT_PARTITION
TestFuncs(vpx_obmc_sad128x128_c, vpx_obmc_sad128x128_sse4_1),
TestFuncs(vpx_obmc_sad128x64_c, vpx_obmc_sad128x64_sse4_1),
TestFuncs(vpx_obmc_sad64x128_c, vpx_obmc_sad64x128_sse4_1),
#endif // CONFIG_EXT_PARTITION
TestFuncs(vpx_obmc_sad64x64_c, vpx_obmc_sad64x64_sse4_1),
TestFuncs(vpx_obmc_sad64x32_c, vpx_obmc_sad64x32_sse4_1),
TestFuncs(vpx_obmc_sad32x64_c, vpx_obmc_sad32x64_sse4_1),
TestFuncs(vpx_obmc_sad32x32_c, vpx_obmc_sad32x32_sse4_1),
TestFuncs(vpx_obmc_sad32x16_c, vpx_obmc_sad32x16_sse4_1),
TestFuncs(vpx_obmc_sad16x32_c, vpx_obmc_sad16x32_sse4_1),
TestFuncs(vpx_obmc_sad16x16_c, vpx_obmc_sad16x16_sse4_1),
TestFuncs(vpx_obmc_sad16x8_c, vpx_obmc_sad16x8_sse4_1),
TestFuncs(vpx_obmc_sad8x16_c, vpx_obmc_sad8x16_sse4_1),
TestFuncs(vpx_obmc_sad8x8_c, vpx_obmc_sad8x8_sse4_1),
TestFuncs(vpx_obmc_sad8x4_c, vpx_obmc_sad8x4_sse4_1),
TestFuncs(vpx_obmc_sad4x8_c, vpx_obmc_sad4x8_sse4_1),
TestFuncs(vpx_obmc_sad4x4_c, vpx_obmc_sad4x4_sse4_1)
};
INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcSadTest,
::testing::ValuesIn(sse4_functions));
#endif // HAVE_SSE4_1
////////////////////////////////////////////////////////////////////////////////
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
#if CONFIG_VPX_HIGHBITDEPTH
class ObmcSadHBDTest : public FunctionEquivalenceTest<ObmcSadF> {};
TEST_P(ObmcSadHBDTest, RandomValues) {
DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < kIterations && !HasFatalFailure() ; ++iter) {
const int pre_stride = rng_(MAX_SB_SIZE + 1);
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = rng_(1<<12);
wsrc[i] = rng_(1<<12) * rng_(kMaskMax * kMaskMax + 1);
mask[i] = rng_(kMaskMax * kMaskMax + 1);
}
const unsigned int ref_res =
params_.ref_func(CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(tst_res =
params_.tst_func(CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask));
ASSERT_EQ(ref_res, tst_res);
}
}
TEST_P(ObmcSadHBDTest, ExtremeValues) {
DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < MAX_SB_SIZE && !HasFatalFailure() ; ++iter) {
const int pre_stride = iter;
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = (1 << 12) - 1;
wsrc[i] = ((1 << 12) - 1) * kMaskMax * kMaskMax;
mask[i] = kMaskMax * kMaskMax;
}
const unsigned int ref_res =
params_.ref_func(CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(tst_res =
params_.tst_func(CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask));
ASSERT_EQ(ref_res, tst_res);
}
}
#if HAVE_SSE4_1
ObmcSadHBDTest::ParamType sse4_functions_hbd[] = {
#if CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_obmc_sad128x128_c, vpx_highbd_obmc_sad128x128_sse4_1),
TestFuncs(vpx_highbd_obmc_sad128x64_c, vpx_highbd_obmc_sad128x64_sse4_1),
TestFuncs(vpx_highbd_obmc_sad64x128_c, vpx_highbd_obmc_sad64x128_sse4_1),
#endif // CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_obmc_sad64x64_c, vpx_highbd_obmc_sad64x64_sse4_1),
TestFuncs(vpx_highbd_obmc_sad64x32_c, vpx_highbd_obmc_sad64x32_sse4_1),
TestFuncs(vpx_highbd_obmc_sad32x64_c, vpx_highbd_obmc_sad32x64_sse4_1),
TestFuncs(vpx_highbd_obmc_sad32x32_c, vpx_highbd_obmc_sad32x32_sse4_1),
TestFuncs(vpx_highbd_obmc_sad32x16_c, vpx_highbd_obmc_sad32x16_sse4_1),
TestFuncs(vpx_highbd_obmc_sad16x32_c, vpx_highbd_obmc_sad16x32_sse4_1),
TestFuncs(vpx_highbd_obmc_sad16x16_c, vpx_highbd_obmc_sad16x16_sse4_1),
TestFuncs(vpx_highbd_obmc_sad16x8_c, vpx_highbd_obmc_sad16x8_sse4_1),
TestFuncs(vpx_highbd_obmc_sad8x16_c, vpx_highbd_obmc_sad8x16_sse4_1),
TestFuncs(vpx_highbd_obmc_sad8x8_c, vpx_highbd_obmc_sad8x8_sse4_1),
TestFuncs(vpx_highbd_obmc_sad8x4_c, vpx_highbd_obmc_sad8x4_sse4_1),
TestFuncs(vpx_highbd_obmc_sad4x8_c, vpx_highbd_obmc_sad4x8_sse4_1),
TestFuncs(vpx_highbd_obmc_sad4x4_c, vpx_highbd_obmc_sad4x4_sse4_1)
};
INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcSadHBDTest,
::testing::ValuesIn(sse4_functions_hbd));
#endif // HAVE_SSE4_1
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

294
test/obmc_variance_test.cc Normal file
View File

@ -0,0 +1,294 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/function_equivalence_test.h"
#include "test/register_state_check.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE)
using libvpx_test::ACMRandom;
using libvpx_test::FunctionEquivalenceTest;
namespace {
static const int kIterations = 1000;
static const int kMaskMax = 64;
typedef unsigned int (*ObmcVarF)(const uint8_t *pre, int pre_stride,
const int32_t *wsrc, const int32_t *mask,
unsigned int *sse);
typedef libvpx_test::FuncParam<ObmcVarF> TestFuncs;
////////////////////////////////////////////////////////////////////////////////
// 8 bit
////////////////////////////////////////////////////////////////////////////////
class ObmcVarianceTest : public FunctionEquivalenceTest<ObmcVarF> {};
TEST_P(ObmcVarianceTest, RandomValues) {
DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < kIterations && !HasFatalFailure() ; ++iter) {
const int pre_stride = this->rng_(MAX_SB_SIZE + 1);
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = this->rng_.Rand8();
wsrc[i] = this->rng_.Rand8() * this->rng_(kMaskMax * kMaskMax + 1);
mask[i] = this->rng_(kMaskMax * kMaskMax + 1);
}
unsigned int ref_sse, tst_sse;
const unsigned int ref_res = params_.ref_func(pre, pre_stride, wsrc, mask,
&ref_sse);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(
tst_res = params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse));
ASSERT_EQ(ref_res, tst_res);
ASSERT_EQ(ref_sse, tst_sse);
}
}
TEST_P(ObmcVarianceTest, ExtremeValues) {
DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < MAX_SB_SIZE && !HasFatalFailure() ; ++iter) {
const int pre_stride = iter;
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = UINT8_MAX;
wsrc[i] = UINT8_MAX * kMaskMax * kMaskMax;
mask[i] = kMaskMax * kMaskMax;
}
unsigned int ref_sse, tst_sse;
const unsigned int ref_res = params_.ref_func(pre, pre_stride, wsrc, mask,
&ref_sse);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(
tst_res = params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse));
ASSERT_EQ(ref_res, tst_res);
ASSERT_EQ(ref_sse, tst_sse);
}
}
#if HAVE_SSE4_1
const ObmcVarianceTest::ParamType sse4_functions[] = {
#if CONFIG_EXT_PARTITION
TestFuncs(vpx_obmc_variance128x128_c, vpx_obmc_variance128x128_sse4_1),
TestFuncs(vpx_obmc_variance128x64_c, vpx_obmc_variance128x64_sse4_1),
TestFuncs(vpx_obmc_variance64x128_c, vpx_obmc_variance64x128_sse4_1),
#endif // CONFIG_EXT_PARTITION
TestFuncs(vpx_obmc_variance64x64_c, vpx_obmc_variance64x64_sse4_1),
TestFuncs(vpx_obmc_variance64x32_c, vpx_obmc_variance64x32_sse4_1),
TestFuncs(vpx_obmc_variance32x64_c, vpx_obmc_variance32x64_sse4_1),
TestFuncs(vpx_obmc_variance32x32_c, vpx_obmc_variance32x32_sse4_1),
TestFuncs(vpx_obmc_variance32x16_c, vpx_obmc_variance32x16_sse4_1),
TestFuncs(vpx_obmc_variance16x32_c, vpx_obmc_variance16x32_sse4_1),
TestFuncs(vpx_obmc_variance16x16_c, vpx_obmc_variance16x16_sse4_1),
TestFuncs(vpx_obmc_variance16x8_c, vpx_obmc_variance16x8_sse4_1),
TestFuncs(vpx_obmc_variance8x16_c, vpx_obmc_variance8x16_sse4_1),
TestFuncs(vpx_obmc_variance8x8_c, vpx_obmc_variance8x8_sse4_1),
TestFuncs(vpx_obmc_variance8x4_c, vpx_obmc_variance8x4_sse4_1),
TestFuncs(vpx_obmc_variance4x8_c, vpx_obmc_variance4x8_sse4_1),
TestFuncs(vpx_obmc_variance4x4_c, vpx_obmc_variance4x4_sse4_1)
};
INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcVarianceTest,
::testing::ValuesIn(sse4_functions));
#endif // HAVE_SSE4_1
////////////////////////////////////////////////////////////////////////////////
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
#if CONFIG_VPX_HIGHBITDEPTH
class ObmcVarianceHBDTest : public FunctionEquivalenceTest<ObmcVarF> {};
TEST_P(ObmcVarianceHBDTest, RandomValues) {
DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < kIterations && !HasFatalFailure() ; ++iter) {
const int pre_stride = this->rng_(MAX_SB_SIZE + 1);
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = this->rng_(1 << params_.bit_depth);
wsrc[i] = this->rng_(1 << params_.bit_depth) *
this->rng_(kMaskMax * kMaskMax + 1);
mask[i] = this->rng_(kMaskMax * kMaskMax + 1);
}
unsigned int ref_sse, tst_sse;
const unsigned int ref_res = params_.ref_func(CONVERT_TO_BYTEPTR(pre),
pre_stride,
wsrc, mask, &ref_sse);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(
tst_res = params_.tst_func(CONVERT_TO_BYTEPTR(pre),
pre_stride, wsrc, mask, &tst_sse));
ASSERT_EQ(ref_res, tst_res);
ASSERT_EQ(ref_sse, tst_sse);
}
}
TEST_P(ObmcVarianceHBDTest, ExtremeValues) {
DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
for (int iter = 0 ; iter < MAX_SB_SIZE && !HasFatalFailure() ; ++iter) {
const int pre_stride = iter;
for (int i = 0 ; i < MAX_SB_SQUARE ; ++i) {
pre[i] = (1 << params_.bit_depth) - 1;
wsrc[i] = ((1 << params_.bit_depth) - 1) * kMaskMax * kMaskMax;
mask[i] = kMaskMax * kMaskMax;
}
unsigned int ref_sse, tst_sse;
const unsigned int ref_res = params_.ref_func(CONVERT_TO_BYTEPTR(pre),
pre_stride,
wsrc, mask, &ref_sse);
unsigned int tst_res;
ASM_REGISTER_STATE_CHECK(
tst_res = params_.tst_func(CONVERT_TO_BYTEPTR(pre), pre_stride,
wsrc, mask, &tst_sse));
ASSERT_EQ(ref_res, tst_res);
ASSERT_EQ(ref_sse, tst_sse);
}
}
#if HAVE_SSE4_1
ObmcVarianceHBDTest::ParamType sse4_functions_hbd[] = {
#if CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_obmc_variance128x128_c,
vpx_highbd_obmc_variance128x128_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance128x64_c,
vpx_highbd_obmc_variance128x64_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance64x128_c,
vpx_highbd_obmc_variance64x128_sse4_1, 8),
#endif // CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_obmc_variance64x64_c,
vpx_highbd_obmc_variance64x64_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance64x32_c,
vpx_highbd_obmc_variance64x32_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance32x64_c,
vpx_highbd_obmc_variance32x64_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance32x32_c,
vpx_highbd_obmc_variance32x32_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance32x16_c,
vpx_highbd_obmc_variance32x16_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance16x32_c,
vpx_highbd_obmc_variance16x32_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance16x16_c,
vpx_highbd_obmc_variance16x16_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance16x8_c,
vpx_highbd_obmc_variance16x8_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance8x16_c,
vpx_highbd_obmc_variance8x16_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance8x8_c,
vpx_highbd_obmc_variance8x8_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance8x4_c,
vpx_highbd_obmc_variance8x4_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance4x8_c,
vpx_highbd_obmc_variance4x8_sse4_1, 8),
TestFuncs(vpx_highbd_obmc_variance4x4_c,
vpx_highbd_obmc_variance4x4_sse4_1, 8),
#if CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_10_obmc_variance128x128_c,
vpx_highbd_10_obmc_variance128x128_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance128x64_c,
vpx_highbd_10_obmc_variance128x64_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance64x128_c,
vpx_highbd_10_obmc_variance64x128_sse4_1, 10),
#endif // CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_10_obmc_variance64x64_c,
vpx_highbd_10_obmc_variance64x64_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance64x32_c,
vpx_highbd_10_obmc_variance64x32_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance32x64_c,
vpx_highbd_10_obmc_variance32x64_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance32x32_c,
vpx_highbd_10_obmc_variance32x32_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance32x16_c,
vpx_highbd_10_obmc_variance32x16_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance16x32_c,
vpx_highbd_10_obmc_variance16x32_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance16x16_c,
vpx_highbd_10_obmc_variance16x16_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance16x8_c,
vpx_highbd_10_obmc_variance16x8_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance8x16_c,
vpx_highbd_10_obmc_variance8x16_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance8x8_c,
vpx_highbd_10_obmc_variance8x8_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance8x4_c,
vpx_highbd_10_obmc_variance8x4_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance4x8_c,
vpx_highbd_10_obmc_variance4x8_sse4_1, 10),
TestFuncs(vpx_highbd_10_obmc_variance4x4_c,
vpx_highbd_10_obmc_variance4x4_sse4_1, 10),
#if CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_12_obmc_variance128x128_c,
vpx_highbd_12_obmc_variance128x128_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance128x64_c,
vpx_highbd_12_obmc_variance128x64_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance64x128_c,
vpx_highbd_12_obmc_variance64x128_sse4_1, 12),
#endif // CONFIG_EXT_PARTITION
TestFuncs(vpx_highbd_12_obmc_variance64x64_c,
vpx_highbd_12_obmc_variance64x64_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance64x32_c,
vpx_highbd_12_obmc_variance64x32_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance32x64_c,
vpx_highbd_12_obmc_variance32x64_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance32x32_c,
vpx_highbd_12_obmc_variance32x32_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance32x16_c,
vpx_highbd_12_obmc_variance32x16_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance16x32_c,
vpx_highbd_12_obmc_variance16x32_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance16x16_c,
vpx_highbd_12_obmc_variance16x16_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance16x8_c,
vpx_highbd_12_obmc_variance16x8_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance8x16_c,
vpx_highbd_12_obmc_variance8x16_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance8x8_c,
vpx_highbd_12_obmc_variance8x8_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance8x4_c,
vpx_highbd_12_obmc_variance8x4_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance4x8_c,
vpx_highbd_12_obmc_variance4x8_sse4_1, 12),
TestFuncs(vpx_highbd_12_obmc_variance4x4_c,
vpx_highbd_12_obmc_variance4x4_sse4_1, 12)
};
INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcVarianceHBDTest,
::testing::ValuesIn(sse4_functions_hbd));
#endif // HAVE_SSE4_1
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -14,14 +14,14 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_scan.h"
#include "vp10/common/blockd.h"
#include "vp10/common/scan.h"
#include "vpx/vpx_integer.h"
using libvpx_test::ACMRandom;
@ -115,7 +115,7 @@ TEST_P(PartialIDctTest, RunQuantCheck) {
// quantization with maximum allowed step sizes
test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336;
for (int j = 1; j < last_nonzero_; ++j)
test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]]
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]]
= (output_ref_block[j] / 1828) * 1828;
}
@ -177,7 +177,7 @@ TEST_P(PartialIDctTest, ResultsMatch) {
max_energy_leftover = 0;
coef = 0;
}
test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] = coef;
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]] = coef;
}
memcpy(test_coef_block2, test_coef_block1,
@ -231,7 +231,7 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct4x4_1_add_c,
TX_4X4, 1)));
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, PartialIDctTest,
::testing::Values(
@ -259,9 +259,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct4x4_16_add_c,
&vpx_idct4x4_1_add_neon,
TX_4X4, 1)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, PartialIDctTest,
::testing::Values(
@ -295,8 +295,8 @@ INSTANTIATE_TEST_CASE_P(
TX_4X4, 1)));
#endif
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
!CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSSE3 && ARCH_X86_64 && \
!CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSSE3_64, PartialIDctTest,
::testing::Values(
@ -306,7 +306,7 @@ INSTANTIATE_TEST_CASE_P(
TX_8X8, 12)));
#endif
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, PartialIDctTest,
::testing::Values(
@ -338,6 +338,6 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct4x4_16_add_c,
&vpx_idct4x4_1_add_msa,
TX_4X4, 1)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -1,63 +0,0 @@
#!/bin/sh
##
## Copyright (c) 2014 The WebM project authors. All Rights Reserved.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
##
## This file tests the libvpx postproc example code. To add new tests to this
## file, do the following:
## 1. Write a shell function (this is your test).
## 2. Add the function to postproc_tests (on a new line).
##
. $(dirname $0)/tools_common.sh
# Environment check: Make sure input is available:
# $VP8_IVF_FILE and $VP9_IVF_FILE are required.
postproc_verify_environment() {
if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then
echo "Libvpx test data must exist in LIBVPX_TEST_DATA_PATH."
return 1
fi
}
# Runs postproc using $1 as input file. $2 is the codec name, and is used
# solely to name the output file.
postproc() {
local decoder="${LIBVPX_BIN_PATH}/postproc${VPX_TEST_EXE_SUFFIX}"
local input_file="$1"
local codec="$2"
local output_file="${VPX_TEST_OUTPUT_DIR}/postproc_${codec}.raw"
if [ ! -x "${decoder}" ]; then
elog "${decoder} does not exist or is not executable."
return 1
fi
eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
${devnull}
[ -e "${output_file}" ] || return 1
}
postproc_vp8() {
if [ "$(vp8_decode_available)" = "yes" ]; then
postproc "${VP8_IVF_FILE}" vp8 || return 1
fi
}
postproc_vp9() {
if [ "$(vpx_config_option_enabled CONFIG_VP9_POSTPROC)" = "yes" ]; then
if [ "$(vp9_decode_available)" = "yes" ]; then
postproc "${VP9_IVF_FILE}" vp9 || return 1
fi
fi
}
postproc_tests="postproc_vp8
postproc_vp9"
run_tests postproc_verify_environment "${postproc_tests}"

View File

@ -1,118 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vp8_rtcd.h"
#include "vpx/vpx_integer.h"
#include "vpx_mem/vpx_mem.h"
typedef void (*PostProcFunc)(unsigned char *src_ptr,
unsigned char *dst_ptr,
int src_pixels_per_line,
int dst_pixels_per_line,
int cols,
unsigned char *flimit,
int size);
namespace {
class VP8PostProcessingFilterTest
: public ::testing::TestWithParam<PostProcFunc> {
public:
virtual void TearDown() {
libvpx_test::ClearSystemState();
}
};
// Test routine for the VP8 post-processing function
// vp8_post_proc_down_and_across_mb_row_c.
TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
// Size of the underlying data block that will be filtered.
const int block_width = 16;
const int block_height = 16;
// 5-tap filter needs 2 padding rows above and below the block in the input.
const int input_width = block_width;
const int input_height = block_height + 4;
const int input_stride = input_width;
const int input_size = input_width * input_height;
// Filter extends output block by 8 samples at left and right edges.
const int output_width = block_width + 16;
const int output_height = block_height;
const int output_stride = output_width;
const int output_size = output_width * output_height;
uint8_t *const src_image =
reinterpret_cast<uint8_t*>(vpx_calloc(input_size, 1));
uint8_t *const dst_image =
reinterpret_cast<uint8_t*>(vpx_calloc(output_size, 1));
// Pointers to top-left pixel of block in the input and output images.
uint8_t *const src_image_ptr = src_image + (input_stride << 1);
uint8_t *const dst_image_ptr = dst_image + 8;
uint8_t *const flimits =
reinterpret_cast<uint8_t *>(vpx_memalign(16, block_width));
(void)memset(flimits, 255, block_width);
// Initialize pixels in the input:
// block pixels to value 1,
// border pixels to value 10.
(void)memset(src_image, 10, input_size);
uint8_t *pixel_ptr = src_image_ptr;
for (int i = 0; i < block_height; ++i) {
for (int j = 0; j < block_width; ++j) {
pixel_ptr[j] = 1;
}
pixel_ptr += input_stride;
}
// Initialize pixels in the output to 99.
(void)memset(dst_image, 99, output_size);
ASM_REGISTER_STATE_CHECK(
GetParam()(src_image_ptr, dst_image_ptr, input_stride,
output_stride, block_width, flimits, 16));
static const uint8_t expected_data[block_height] = {
4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4
};
pixel_ptr = dst_image_ptr;
for (int i = 0; i < block_height; ++i) {
for (int j = 0; j < block_width; ++j) {
EXPECT_EQ(expected_data[i], pixel_ptr[j])
<< "VP8PostProcessingFilterTest failed with invalid filter output";
}
pixel_ptr += output_stride;
}
vpx_free(src_image);
vpx_free(dst_image);
vpx_free(flimits);
};
INSTANTIATE_TEST_CASE_P(C, VP8PostProcessingFilterTest,
::testing::Values(vp8_post_proc_down_and_across_mb_row_c));
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(SSE2, VP8PostProcessingFilterTest,
::testing::Values(vp8_post_proc_down_and_across_mb_row_sse2));
#endif
#if HAVE_MSA
INSTANTIATE_TEST_CASE_P(MSA, VP8PostProcessingFilterTest,
::testing::Values(vp8_post_proc_down_and_across_mb_row_msa));
#endif
} // namespace

View File

@ -13,7 +13,6 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vp8_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"

View File

@ -87,8 +87,8 @@ class RegisterStateCheck {
} // namespace libvpx_test
#elif defined(CONFIG_SHARED) && defined(HAVE_NEON_ASM) && defined(CONFIG_VP9) \
&& !CONFIG_SHARED && HAVE_NEON_ASM && CONFIG_VP9
#elif defined(CONFIG_SHARED) && defined(HAVE_NEON_ASM) && defined(CONFIG_VP10) \
&& !CONFIG_SHARED && HAVE_NEON_ASM && CONFIG_VP10
extern "C" {
// Save the d8-d15 registers into store.

View File

@ -369,7 +369,7 @@ class ResizeInternalTest : public ResizeTest {
}
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
if (!frame0_psnr_)
if (frame0_psnr_ == 0.)
frame0_psnr_ = pkt->data.psnr.psnr[0];
EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
}
@ -671,7 +671,7 @@ class ResizeCspTest : public ResizeTest {
}
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
if (!frame0_psnr_)
if (frame0_psnr_ == 0.)
frame0_psnr_ = pkt->data.psnr.psnr[0];
EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
}
@ -722,14 +722,13 @@ TEST_P(ResizeCspTest, TestResizeCspWorks) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
VP8_INSTANTIATE_TEST_CASE(ResizeTest, ONE_PASS_TEST_MODES);
VP9_INSTANTIATE_TEST_CASE(ResizeTest,
VP10_INSTANTIATE_TEST_CASE(ResizeTest,
::testing::Values(::libvpx_test::kRealTime));
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
VP10_INSTANTIATE_TEST_CASE(ResizeInternalTest,
::testing::Values(::libvpx_test::kOnePassBest));
VP9_INSTANTIATE_TEST_CASE(ResizeRealtimeTest,
VP10_INSTANTIATE_TEST_CASE(ResizeRealtimeTest,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(5, 9));
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
VP10_INSTANTIATE_TEST_CASE(ResizeCspTest,
::testing::Values(::libvpx_test::kRealTime));
} // namespace

View File

@ -59,13 +59,13 @@ class SADTestBase : public ::testing::Test {
reference_data8_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
second_pred8_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, 64*64));
vpx_memalign(kDataAlignment, 128*128));
source_data16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, kDataBlockSize*sizeof(uint16_t)));
reference_data16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize*sizeof(uint16_t)));
second_pred16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, 64*64*sizeof(uint16_t)));
vpx_memalign(kDataAlignment, 128*128*sizeof(uint16_t)));
}
static void TearDownTestCase() {
@ -88,9 +88,9 @@ class SADTestBase : public ::testing::Test {
}
protected:
// Handle blocks up to 4 blocks 64x64 with stride up to 128
// Handle up to 4 128x128 blocks, with stride up to 256
static const int kDataAlignment = 16;
static const int kDataBlockSize = 64 * 128;
static const int kDataBlockSize = 128 * 256;
static const int kDataBufferSize = 4 * kDataBlockSize;
virtual void SetUp() {
@ -100,14 +100,14 @@ class SADTestBase : public ::testing::Test {
source_data_ = source_data8_;
reference_data_ = reference_data8_;
second_pred_ = second_pred8_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
use_high_bit_depth_ = true;
bit_depth_ = static_cast<vpx_bit_depth_t>(bd_);
source_data_ = CONVERT_TO_BYTEPTR(source_data16_);
reference_data_ = CONVERT_TO_BYTEPTR(reference_data16_);
second_pred_ = CONVERT_TO_BYTEPTR(second_pred16_);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
mask_ = (1 << bit_depth_) - 1;
source_stride_ = (width_ + 31) & ~31;
@ -116,11 +116,11 @@ class SADTestBase : public ::testing::Test {
}
virtual uint8_t *GetReference(int block_idx) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (use_high_bit_depth_)
return CONVERT_TO_BYTEPTR(CONVERT_TO_SHORTPTR(reference_data_) +
block_idx * kDataBlockSize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
return reference_data_ + block_idx * kDataBlockSize;
}
@ -130,21 +130,21 @@ class SADTestBase : public ::testing::Test {
unsigned int sad = 0;
const uint8_t *const reference8 = GetReference(block_idx);
const uint8_t *const source8 = source_data_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint16_t *const reference16 =
CONVERT_TO_SHORTPTR(GetReference(block_idx));
const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
sad += abs(source8[h * source_stride_ + w] -
reference8[h * reference_stride_ + w]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
sad += abs(source16[h * source_stride_ + w] -
reference16[h * reference_stride_ + w]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -159,12 +159,12 @@ class SADTestBase : public ::testing::Test {
const uint8_t *const reference8 = GetReference(block_idx);
const uint8_t *const source8 = source_data_;
const uint8_t *const second_pred8 = second_pred_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint16_t *const reference16 =
CONVERT_TO_SHORTPTR(GetReference(block_idx));
const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
const uint16_t *const second_pred16 = CONVERT_TO_SHORTPTR(second_pred_);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
@ -172,13 +172,13 @@ class SADTestBase : public ::testing::Test {
reference8[h * reference_stride_ + w];
const uint8_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
sad += abs(source8[h * source_stride_ + w] - comp_pred);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
const int tmp = second_pred16[h * width_ + w] +
reference16[h * reference_stride_ + w];
const uint16_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
sad += abs(source16[h * source_stride_ + w] - comp_pred);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -187,17 +187,17 @@ class SADTestBase : public ::testing::Test {
void FillConstant(uint8_t *data, int stride, uint16_t fill_constant) {
uint8_t *data8 = data;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *data16 = CONVERT_TO_SHORTPTR(data);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
data8[h * stride + w] = static_cast<uint8_t>(fill_constant);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
data16[h * stride + w] = fill_constant;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -205,17 +205,17 @@ class SADTestBase : public ::testing::Test {
void FillRandom(uint8_t *data, int stride) {
uint8_t *data8 = data;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *data16 = CONVERT_TO_SHORTPTR(data);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
data8[h * stride + w] = rnd_.Rand8();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
data16[h * stride + w] = rnd_.Rand16() & mask_;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -485,6 +485,11 @@ using std::tr1::make_tuple;
//------------------------------------------------------------------------------
// C functions
const SadMxNParam c_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128_c, -1),
make_tuple(128, 64, &vpx_sad128x64_c, -1),
make_tuple(64, 128, &vpx_sad64x128_c, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64_c, -1),
make_tuple(64, 32, &vpx_sad64x32_c, -1),
make_tuple(32, 64, &vpx_sad32x64_c, -1),
@ -498,7 +503,12 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_c, -1),
make_tuple(4, 8, &vpx_sad4x8_c, -1),
make_tuple(4, 4, &vpx_sad4x4_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_c, 8),
make_tuple(128, 64, &vpx_highbd_sad128x64_c, 8),
make_tuple(64, 128, &vpx_highbd_sad64x128_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_c, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_c, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_c, 8),
@ -512,6 +522,11 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_c, 8),
make_tuple(4, 8, &vpx_highbd_sad4x8_c, 8),
make_tuple(4, 4, &vpx_highbd_sad4x4_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_c, 10),
make_tuple(128, 64, &vpx_highbd_sad128x64_c, 10),
make_tuple(64, 128, &vpx_highbd_sad64x128_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_c, 10),
make_tuple(64, 32, &vpx_highbd_sad64x32_c, 10),
make_tuple(32, 64, &vpx_highbd_sad32x64_c, 10),
@ -525,6 +540,11 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_c, 10),
make_tuple(4, 8, &vpx_highbd_sad4x8_c, 10),
make_tuple(4, 4, &vpx_highbd_sad4x4_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_c, 12),
make_tuple(128, 64, &vpx_highbd_sad128x64_c, 12),
make_tuple(64, 128, &vpx_highbd_sad64x128_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_c, 12),
make_tuple(64, 32, &vpx_highbd_sad64x32_c, 12),
make_tuple(32, 64, &vpx_highbd_sad32x64_c, 12),
@ -538,11 +558,16 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_c, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8_c, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4_c, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(C, SADTest, ::testing::ValuesIn(c_tests));
const SadMxNAvgParam avg_c_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128_avg_c, -1),
make_tuple(128, 64, &vpx_sad128x64_avg_c, -1),
make_tuple(64, 128, &vpx_sad64x128_avg_c, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64_avg_c, -1),
make_tuple(64, 32, &vpx_sad64x32_avg_c, -1),
make_tuple(32, 64, &vpx_sad32x64_avg_c, -1),
@ -556,7 +581,12 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_avg_c, -1),
make_tuple(4, 8, &vpx_sad4x8_avg_c, -1),
make_tuple(4, 4, &vpx_sad4x4_avg_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_avg_c, 8),
make_tuple(128, 64, &vpx_highbd_sad128x64_avg_c, 8),
make_tuple(64, 128, &vpx_highbd_sad64x128_avg_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 8),
@ -570,6 +600,11 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 8),
make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 8),
make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_avg_c, 10),
make_tuple(128, 64, &vpx_highbd_sad128x64_avg_c, 10),
make_tuple(64, 128, &vpx_highbd_sad64x128_avg_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 10),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 10),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 10),
@ -583,6 +618,11 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 10),
make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 10),
make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_avg_c, 12),
make_tuple(128, 64, &vpx_highbd_sad128x64_avg_c, 12),
make_tuple(64, 128, &vpx_highbd_sad64x128_avg_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 12),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 12),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 12),
@ -596,11 +636,16 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(C, SADavgTest, ::testing::ValuesIn(avg_c_tests));
const SadMxNx4Param x4d_c_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128x4d_c, -1),
make_tuple(128, 64, &vpx_sad128x64x4d_c, -1),
make_tuple(64, 128, &vpx_sad64x128x4d_c, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64x4d_c, -1),
make_tuple(64, 32, &vpx_sad64x32x4d_c, -1),
make_tuple(32, 64, &vpx_sad32x64x4d_c, -1),
@ -614,7 +659,12 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_sad8x4x4d_c, -1),
make_tuple(4, 8, &vpx_sad4x8x4d_c, -1),
make_tuple(4, 4, &vpx_sad4x4x4d_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128x4d_c, 8),
make_tuple(128, 64, &vpx_highbd_sad128x64x4d_c, 8),
make_tuple(64, 128, &vpx_highbd_sad64x128x4d_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 8),
@ -628,6 +678,11 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 8),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 8),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128x4d_c, 10),
make_tuple(128, 64, &vpx_highbd_sad128x64x4d_c, 10),
make_tuple(64, 128, &vpx_highbd_sad64x128x4d_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 10),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 10),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 10),
@ -641,6 +696,11 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 10),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 10),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128x4d_c, 12),
make_tuple(128, 64, &vpx_highbd_sad128x64x4d_c, 12),
make_tuple(64, 128, &vpx_highbd_sad64x128x4d_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 12),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 12),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 12),
@ -654,7 +714,7 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(C, SADx4Test, ::testing::ValuesIn(x4d_c_tests));
@ -690,8 +750,12 @@ INSTANTIATE_TEST_CASE_P(NEON, SADx4Test, ::testing::ValuesIn(x4d_neon_tests));
//------------------------------------------------------------------------------
// x86 functions
#if HAVE_SSE2
#if CONFIG_USE_X86INC
const SadMxNParam sse2_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128_sse2, -1),
make_tuple(128, 64, &vpx_sad128x64_sse2, -1),
make_tuple(64, 128, &vpx_sad64x128_sse2, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64_sse2, -1),
make_tuple(64, 32, &vpx_sad64x32_sse2, -1),
make_tuple(32, 64, &vpx_sad32x64_sse2, -1),
@ -705,7 +769,7 @@ const SadMxNParam sse2_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_sse2, -1),
make_tuple(4, 8, &vpx_sad4x8_sse2, -1),
make_tuple(4, 4, &vpx_sad4x4_sse2, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
make_tuple(64, 64, &vpx_highbd_sad64x64_sse2, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_sse2, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_sse2, 8),
@ -739,11 +803,16 @@ const SadMxNParam sse2_tests[] = {
make_tuple(8, 16, &vpx_highbd_sad8x16_sse2, 12),
make_tuple(8, 8, &vpx_highbd_sad8x8_sse2, 12),
make_tuple(8, 4, &vpx_highbd_sad8x4_sse2, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(SSE2, SADTest, ::testing::ValuesIn(sse2_tests));
const SadMxNAvgParam avg_sse2_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128_avg_sse2, -1),
make_tuple(128, 64, &vpx_sad128x64_avg_sse2, -1),
make_tuple(64, 128, &vpx_sad64x128_avg_sse2, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64_avg_sse2, -1),
make_tuple(64, 32, &vpx_sad64x32_avg_sse2, -1),
make_tuple(32, 64, &vpx_sad32x64_avg_sse2, -1),
@ -757,7 +826,7 @@ const SadMxNAvgParam avg_sse2_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_avg_sse2, -1),
make_tuple(4, 8, &vpx_sad4x8_avg_sse2, -1),
make_tuple(4, 4, &vpx_sad4x4_avg_sse2, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_sse2, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_sse2, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_sse2, 8),
@ -791,11 +860,16 @@ const SadMxNAvgParam avg_sse2_tests[] = {
make_tuple(8, 16, &vpx_highbd_sad8x16_avg_sse2, 12),
make_tuple(8, 8, &vpx_highbd_sad8x8_avg_sse2, 12),
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_sse2, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(SSE2, SADavgTest, ::testing::ValuesIn(avg_sse2_tests));
const SadMxNx4Param x4d_sse2_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128x4d_sse2, -1),
make_tuple(128, 64, &vpx_sad128x64x4d_sse2, -1),
make_tuple(64, 128, &vpx_sad64x128x4d_sse2, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64x4d_sse2, -1),
make_tuple(64, 32, &vpx_sad64x32x4d_sse2, -1),
make_tuple(32, 64, &vpx_sad32x64x4d_sse2, -1),
@ -809,7 +883,7 @@ const SadMxNx4Param x4d_sse2_tests[] = {
make_tuple(8, 4, &vpx_sad8x4x4d_sse2, -1),
make_tuple(4, 8, &vpx_sad4x8x4d_sse2, -1),
make_tuple(4, 4, &vpx_sad4x4x4d_sse2, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_sse2, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_sse2, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_sse2, 8),
@ -849,10 +923,9 @@ const SadMxNx4Param x4d_sse2_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_sse2, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_sse2, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_sse2, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(SSE2, SADx4Test, ::testing::ValuesIn(x4d_sse2_tests));
#endif // CONFIG_USE_X86INC
#endif // HAVE_SSE2
#if HAVE_SSE3

View File

@ -1,184 +0,0 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "vp8/encoder/onyx_int.h"
#include "vpx/vpx_integer.h"
#include "vpx_mem/vpx_mem.h"
using libvpx_test::ACMRandom;
namespace {
TEST(VP8RoiMapTest, ParameterCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
int delta_q[MAX_MB_SEGMENTS] = { -2, -25, 0, 31 };
int delta_lf[MAX_MB_SEGMENTS] = { -2, -25, 0, 31 };
unsigned int threshold[MAX_MB_SEGMENTS] = { 0, 100, 200, 300 };
const int internalq_trans[] = {
0, 1, 2, 3, 4, 5, 7, 8,
9, 10, 12, 13, 15, 17, 18, 19,
20, 21, 23, 24, 25, 26, 27, 28,
29, 30, 31, 33, 35, 37, 39, 41,
43, 45, 47, 49, 51, 53, 55, 57,
59, 61, 64, 67, 70, 73, 76, 79,
82, 85, 88, 91, 94, 97, 100, 103,
106, 109, 112, 115, 118, 121, 124, 127,
};
// Initialize elements of cpi with valid defaults.
VP8_COMP cpi;
cpi.mb.e_mbd.mb_segement_abs_delta = SEGMENT_DELTADATA;
cpi.cyclic_refresh_mode_enabled = 0;
cpi.mb.e_mbd.segmentation_enabled = 0;
cpi.mb.e_mbd.update_mb_segmentation_map = 0;
cpi.mb.e_mbd.update_mb_segmentation_data = 0;
cpi.common.mb_rows = 240 >> 4;
cpi.common.mb_cols = 320 >> 4;
const int mbs = (cpi.common.mb_rows * cpi.common.mb_cols);
memset(cpi.segment_feature_data, 0, sizeof(cpi.segment_feature_data));
// Segment map
cpi.segmentation_map = reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
// Allocate memory for the source memory map.
unsigned char *roi_map =
reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
memset(&roi_map[mbs >> 2], 1, (mbs >> 2));
memset(&roi_map[mbs >> 1], 2, (mbs >> 2));
memset(&roi_map[mbs -(mbs >> 2)], 3, (mbs >> 2));
// Do a test call with valid parameters.
int roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
cpi.common.mb_cols, delta_q, delta_lf,
threshold);
EXPECT_EQ(0, roi_retval)
<< "vp8_set_roimap roi failed with default test parameters";
// Check that the values in the cpi structure get set as expected.
if (roi_retval == 0) {
// Check that the segment map got set.
const int mapcompare = memcmp(roi_map, cpi.segmentation_map, mbs);
EXPECT_EQ(0, mapcompare) << "segment map error";
// Check the q deltas (note the need to translate into
// the interanl range of 0-127.
for (int i = 0; i < MAX_MB_SEGMENTS; ++i) {
const int transq = internalq_trans[abs(delta_q[i])];
if (abs(cpi.segment_feature_data[MB_LVL_ALT_Q][i]) != transq) {
EXPECT_EQ(transq, cpi.segment_feature_data[MB_LVL_ALT_Q][i])
<< "segment delta_q error";
break;
}
}
// Check the loop filter deltas
for (int i = 0; i < MAX_MB_SEGMENTS; ++i) {
if (cpi.segment_feature_data[MB_LVL_ALT_LF][i] != delta_lf[i]) {
EXPECT_EQ(delta_lf[i], cpi.segment_feature_data[MB_LVL_ALT_LF][i])
<< "segment delta_lf error";
break;
}
}
// Check the breakout thresholds
for (int i = 0; i < MAX_MB_SEGMENTS; ++i) {
unsigned int breakout =
static_cast<unsigned int>(cpi.segment_encode_breakout[i]);
if (threshold[i] != breakout) {
EXPECT_EQ(threshold[i], breakout)
<< "breakout threshold error";
break;
}
}
// Segmentation, and segmentation update flages should be set.
EXPECT_EQ(1, cpi.mb.e_mbd.segmentation_enabled)
<< "segmentation_enabled error";
EXPECT_EQ(1, cpi.mb.e_mbd.update_mb_segmentation_map)
<< "update_mb_segmentation_map error";
EXPECT_EQ(1, cpi.mb.e_mbd.update_mb_segmentation_data)
<< "update_mb_segmentation_data error";
// Try a range of delta q and lf parameters (some legal, some not)
for (int i = 0; i < 1000; ++i) {
int rand_deltas[4];
int deltas_valid;
rand_deltas[0] = rnd(160) - 80;
rand_deltas[1] = rnd(160) - 80;
rand_deltas[2] = rnd(160) - 80;
rand_deltas[3] = rnd(160) - 80;
deltas_valid = ((abs(rand_deltas[0]) <= 63) &&
(abs(rand_deltas[1]) <= 63) &&
(abs(rand_deltas[2]) <= 63) &&
(abs(rand_deltas[3]) <= 63)) ? 0 : -1;
// Test with random delta q values.
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
cpi.common.mb_cols, rand_deltas,
delta_lf, threshold);
EXPECT_EQ(deltas_valid, roi_retval) << "dq range check error";
// One delta_q error shown at a time
if (deltas_valid != roi_retval)
break;
// Test with random loop filter values.
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
cpi.common.mb_cols, delta_q,
rand_deltas, threshold);
EXPECT_EQ(deltas_valid, roi_retval) << "dlf range check error";
// One delta loop filter error shown at a time
if (deltas_valid != roi_retval)
break;
}
// Test that we report and error if cyclic refresh is enabled.
cpi.cyclic_refresh_mode_enabled = 1;
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
cpi.common.mb_cols, delta_q,
delta_lf, threshold);
EXPECT_EQ(-1, roi_retval) << "cyclic refresh check error";
cpi.cyclic_refresh_mode_enabled = 0;
// Test invalid number of rows or colums.
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows + 1,
cpi.common.mb_cols, delta_q,
delta_lf, threshold);
EXPECT_EQ(-1, roi_retval) << "MB rows bounds check error";
roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
cpi.common.mb_cols - 1, delta_q,
delta_lf, threshold);
EXPECT_EQ(-1, roi_retval) << "MB cols bounds check error";
}
// Free allocated memory
if (cpi.segmentation_map)
vpx_free(cpi.segmentation_map);
if (roi_map)
vpx_free(roi_map);
};
} // namespace

View File

@ -1,233 +0,0 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vp8_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "vpx/vpx_integer.h"
#include "vpx_mem/vpx_mem.h"
namespace {
typedef void (*SixtapPredictFunc)(uint8_t *src_ptr,
int src_pixels_per_line,
int xoffset,
int yoffset,
uint8_t *dst_ptr,
int dst_pitch);
typedef std::tr1::tuple<int, int, SixtapPredictFunc> SixtapPredictParam;
class SixtapPredictTest
: public ::testing::TestWithParam<SixtapPredictParam> {
public:
static void SetUpTestCase() {
src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize));
dst_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize));
dst_c_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kDstSize));
}
static void TearDownTestCase() {
vpx_free(src_);
src_ = NULL;
vpx_free(dst_);
dst_ = NULL;
vpx_free(dst_c_);
dst_c_ = NULL;
}
virtual void TearDown() {
libvpx_test::ClearSystemState();
}
protected:
// Make test arrays big enough for 16x16 functions. Six-tap filters
// need 5 extra pixels outside of the macroblock.
static const int kSrcStride = 21;
static const int kDstStride = 16;
static const int kDataAlignment = 16;
static const int kSrcSize = kSrcStride * kSrcStride + 1;
static const int kDstSize = kDstStride * kDstStride;
virtual void SetUp() {
width_ = GET_PARAM(0);
height_ = GET_PARAM(1);
sixtap_predict_ = GET_PARAM(2);
memset(src_, 0, kSrcSize);
memset(dst_, 0, kDstSize);
memset(dst_c_, 0, kDstSize);
}
int width_;
int height_;
SixtapPredictFunc sixtap_predict_;
// The src stores the macroblock we will filter on, and makes it 1 byte larger
// in order to test unaligned access. The result is stored in dst and dst_c(c
// reference code result).
static uint8_t* src_;
static uint8_t* dst_;
static uint8_t* dst_c_;
};
uint8_t* SixtapPredictTest::src_ = NULL;
uint8_t* SixtapPredictTest::dst_ = NULL;
uint8_t* SixtapPredictTest::dst_c_ = NULL;
TEST_P(SixtapPredictTest, TestWithPresetData) {
// Test input
static const uint8_t test_data[kSrcSize] = {
216, 184, 4, 191, 82, 92, 41, 0, 1, 226, 236, 172, 20, 182, 42, 226, 177,
79, 94, 77, 179, 203, 206, 198, 22, 192, 19, 75, 17, 192, 44, 233, 120,
48, 168, 203, 141, 210, 203, 143, 180, 184, 59, 201, 110, 102, 171, 32,
182, 10, 109, 105, 213, 60, 47, 236, 253, 67, 55, 14, 3, 99, 247, 124,
148, 159, 71, 34, 114, 19, 177, 38, 203, 237, 239, 58, 83, 155, 91, 10,
166, 201, 115, 124, 5, 163, 104, 2, 231, 160, 16, 234, 4, 8, 103, 153,
167, 174, 187, 26, 193, 109, 64, 141, 90, 48, 200, 174, 204, 36, 184,
114, 237, 43, 238, 242, 207, 86, 245, 182, 247, 6, 161, 251, 14, 8, 148,
182, 182, 79, 208, 120, 188, 17, 6, 23, 65, 206, 197, 13, 242, 126, 128,
224, 170, 110, 211, 121, 197, 200, 47, 188, 207, 208, 184, 221, 216, 76,
148, 143, 156, 100, 8, 89, 117, 14, 112, 183, 221, 54, 197, 208, 180, 69,
176, 94, 180, 131, 215, 121, 76, 7, 54, 28, 216, 238, 249, 176, 58, 142,
64, 215, 242, 72, 49, 104, 87, 161, 32, 52, 216, 230, 4, 141, 44, 181,
235, 224, 57, 195, 89, 134, 203, 144, 162, 163, 126, 156, 84, 185, 42,
148, 145, 29, 221, 194, 134, 52, 100, 166, 105, 60, 140, 110, 201, 184,
35, 181, 153, 93, 121, 243, 227, 68, 131, 134, 232, 2, 35, 60, 187, 77,
209, 76, 106, 174, 15, 241, 227, 115, 151, 77, 175, 36, 187, 121, 221,
223, 47, 118, 61, 168, 105, 32, 237, 236, 167, 213, 238, 202, 17, 170,
24, 226, 247, 131, 145, 6, 116, 117, 121, 11, 194, 41, 48, 126, 162, 13,
93, 209, 131, 154, 122, 237, 187, 103, 217, 99, 60, 200, 45, 78, 115, 69,
49, 106, 200, 194, 112, 60, 56, 234, 72, 251, 19, 120, 121, 182, 134, 215,
135, 10, 114, 2, 247, 46, 105, 209, 145, 165, 153, 191, 243, 12, 5, 36,
119, 206, 231, 231, 11, 32, 209, 83, 27, 229, 204, 149, 155, 83, 109, 35,
93, 223, 37, 84, 14, 142, 37, 160, 52, 191, 96, 40, 204, 101, 77, 67, 52,
53, 43, 63, 85, 253, 147, 113, 226, 96, 6, 125, 179, 115, 161, 17, 83,
198, 101, 98, 85, 139, 3, 137, 75, 99, 178, 23, 201, 255, 91, 253, 52,
134, 60, 138, 131, 208, 251, 101, 48, 2, 227, 228, 118, 132, 245, 202,
75, 91, 44, 160, 231, 47, 41, 50, 147, 220, 74, 92, 219, 165, 89, 16
};
// Expected result
static const uint8_t expected_dst[kDstSize] = {
117, 102, 74, 135, 42, 98, 175, 206, 70, 73, 222, 197, 50, 24, 39, 49, 38,
105, 90, 47, 169, 40, 171, 215, 200, 73, 109, 141, 53, 85, 177, 164, 79,
208, 124, 89, 212, 18, 81, 145, 151, 164, 217, 153, 91, 154, 102, 102,
159, 75, 164, 152, 136, 51, 213, 219, 186, 116, 193, 224, 186, 36, 231,
208, 84, 211, 155, 167, 35, 59, 42, 76, 216, 149, 73, 201, 78, 149, 184,
100, 96, 196, 189, 198, 188, 235, 195, 117, 129, 120, 129, 49, 25, 133,
113, 69, 221, 114, 70, 143, 99, 157, 108, 189, 140, 78, 6, 55, 65, 240,
255, 245, 184, 72, 90, 100, 116, 131, 39, 60, 234, 167, 33, 160, 88, 185,
200, 157, 159, 176, 127, 151, 138, 102, 168, 106, 170, 86, 82, 219, 189,
76, 33, 115, 197, 106, 96, 198, 136, 97, 141, 237, 151, 98, 137, 191,
185, 2, 57, 95, 142, 91, 255, 185, 97, 137, 76, 162, 94, 173, 131, 193,
161, 81, 106, 72, 135, 222, 234, 137, 66, 137, 106, 243, 210, 147, 95,
15, 137, 110, 85, 66, 16, 96, 167, 147, 150, 173, 203, 140, 118, 196,
84, 147, 160, 19, 95, 101, 123, 74, 132, 202, 82, 166, 12, 131, 166,
189, 170, 159, 85, 79, 66, 57, 152, 132, 203, 194, 0, 1, 56, 146, 180,
224, 156, 28, 83, 181, 79, 76, 80, 46, 160, 175, 59, 106, 43, 87, 75,
136, 85, 189, 46, 71, 200, 90
};
uint8_t *src = const_cast<uint8_t*>(test_data);
ASM_REGISTER_STATE_CHECK(
sixtap_predict_(&src[kSrcStride * 2 + 2 + 1], kSrcStride,
2, 2, dst_, kDstStride));
for (int i = 0; i < height_; ++i)
for (int j = 0; j < width_; ++j)
ASSERT_EQ(expected_dst[i * kDstStride + j], dst_[i * kDstStride + j])
<< "i==" << (i * width_ + j);
}
using libvpx_test::ACMRandom;
TEST_P(SixtapPredictTest, TestWithRandomData) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
for (int i = 0; i < kSrcSize; ++i)
src_[i] = rnd.Rand8();
// Run tests for all possible offsets.
for (int xoffset = 0; xoffset < 8; ++xoffset) {
for (int yoffset = 0; yoffset < 8; ++yoffset) {
// Call c reference function.
// Move start point to next pixel to test if the function reads
// unaligned data correctly.
vp8_sixtap_predict16x16_c(&src_[kSrcStride * 2 + 2 + 1], kSrcStride,
xoffset, yoffset, dst_c_, kDstStride);
// Run test.
ASM_REGISTER_STATE_CHECK(
sixtap_predict_(&src_[kSrcStride * 2 + 2 + 1], kSrcStride,
xoffset, yoffset, dst_, kDstStride));
for (int i = 0; i < height_; ++i)
for (int j = 0; j < width_; ++j)
ASSERT_EQ(dst_c_[i * kDstStride + j], dst_[i * kDstStride + j])
<< "i==" << (i * width_ + j);
}
}
}
using std::tr1::make_tuple;
INSTANTIATE_TEST_CASE_P(
C, SixtapPredictTest, ::testing::Values(
make_tuple(16, 16, &vp8_sixtap_predict16x16_c),
make_tuple(8, 8, &vp8_sixtap_predict8x8_c),
make_tuple(8, 4, &vp8_sixtap_predict8x4_c),
make_tuple(4, 4, &vp8_sixtap_predict4x4_c)));
#if HAVE_NEON
INSTANTIATE_TEST_CASE_P(
NEON, SixtapPredictTest, ::testing::Values(
make_tuple(16, 16, &vp8_sixtap_predict16x16_neon),
make_tuple(8, 8, &vp8_sixtap_predict8x8_neon),
make_tuple(8, 4, &vp8_sixtap_predict8x4_neon)));
#endif
#if HAVE_MMX
INSTANTIATE_TEST_CASE_P(
MMX, SixtapPredictTest, ::testing::Values(
make_tuple(16, 16, &vp8_sixtap_predict16x16_mmx),
make_tuple(8, 8, &vp8_sixtap_predict8x8_mmx),
make_tuple(8, 4, &vp8_sixtap_predict8x4_mmx),
make_tuple(4, 4, &vp8_sixtap_predict4x4_mmx)));
#endif
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(
SSE2, SixtapPredictTest, ::testing::Values(
make_tuple(16, 16, &vp8_sixtap_predict16x16_sse2),
make_tuple(8, 8, &vp8_sixtap_predict8x8_sse2),
make_tuple(8, 4, &vp8_sixtap_predict8x4_sse2)));
#endif
#if HAVE_SSSE3
INSTANTIATE_TEST_CASE_P(
SSSE3, SixtapPredictTest, ::testing::Values(
make_tuple(16, 16, &vp8_sixtap_predict16x16_ssse3),
make_tuple(8, 8, &vp8_sixtap_predict8x8_ssse3),
make_tuple(8, 4, &vp8_sixtap_predict8x4_ssse3),
make_tuple(4, 4, &vp8_sixtap_predict4x4_ssse3)));
#endif
#if HAVE_MSA
INSTANTIATE_TEST_CASE_P(
MSA, SixtapPredictTest, ::testing::Values(
make_tuple(16, 16, &vp8_sixtap_predict16x16_msa),
make_tuple(8, 8, &vp8_sixtap_predict8x8_msa),
make_tuple(8, 4, &vp8_sixtap_predict8x4_msa),
make_tuple(4, 4, &vp8_sixtap_predict4x4_msa)));
#endif
} // namespace

View File

260
test/subtract_test.cc Normal file
View File

@ -0,0 +1,260 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#if CONFIG_VP10
#include "vp10/common/blockd.h"
#endif
#include "vpx_mem/vpx_mem.h"
#include "vpx_ports/mem.h"
#define USE_SPEED_TEST (0)
typedef void (*SubtractFunc)(int rows, int cols,
int16_t *diff_ptr, ptrdiff_t diff_stride,
const uint8_t *src_ptr, ptrdiff_t src_stride,
const uint8_t *pred_ptr, ptrdiff_t pred_stride);
namespace {
class VP9SubtractBlockTest : public ::testing::TestWithParam<SubtractFunc> {
public:
virtual void TearDown() {
libvpx_test::ClearSystemState();
}
};
using libvpx_test::ACMRandom;
TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
// FIXME(rbultje) split in its own file
for (BLOCK_SIZE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
bsize = static_cast<BLOCK_SIZE>(static_cast<int>(bsize) + 1)) {
const int block_width = 4 * num_4x4_blocks_wide_lookup[bsize];
const int block_height = 4 * num_4x4_blocks_high_lookup[bsize];
int16_t *diff = reinterpret_cast<int16_t *>(
vpx_memalign(16, sizeof(*diff) * block_width * block_height * 2));
uint8_t *pred = reinterpret_cast<uint8_t *>(
vpx_memalign(16, block_width * block_height * 2));
uint8_t *src = reinterpret_cast<uint8_t *>(
vpx_memalign(16, block_width * block_height * 2));
for (int n = 0; n < 100; n++) {
for (int r = 0; r < block_height; ++r) {
for (int c = 0; c < block_width * 2; ++c) {
src[r * block_width * 2 + c] = rnd.Rand8();
pred[r * block_width * 2 + c] = rnd.Rand8();
}
}
GetParam()(block_height, block_width, diff, block_width,
src, block_width, pred, block_width);
for (int r = 0; r < block_height; ++r) {
for (int c = 0; c < block_width; ++c) {
EXPECT_EQ(diff[r * block_width + c],
(src[r * block_width + c] -
pred[r * block_width + c])) << "r = " << r
<< ", c = " << c
<< ", bs = " << bsize;
}
}
GetParam()(block_height, block_width, diff, block_width * 2,
src, block_width * 2, pred, block_width * 2);
for (int r = 0; r < block_height; ++r) {
for (int c = 0; c < block_width; ++c) {
EXPECT_EQ(diff[r * block_width * 2 + c],
(src[r * block_width * 2 + c] -
pred[r * block_width * 2 + c])) << "r = " << r
<< ", c = " << c
<< ", bs = " << bsize;
}
}
}
vpx_free(diff);
vpx_free(pred);
vpx_free(src);
}
}
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
::testing::Values(vpx_subtract_block_c));
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
::testing::Values(vpx_subtract_block_sse2));
#endif
#if HAVE_NEON
INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest,
::testing::Values(vpx_subtract_block_neon));
#endif
#if HAVE_MSA
INSTANTIATE_TEST_CASE_P(MSA, VP9SubtractBlockTest,
::testing::Values(vpx_subtract_block_msa));
#endif
typedef void (*HBDSubtractFunc)(int rows, int cols,
int16_t *diff_ptr, ptrdiff_t diff_stride,
const uint8_t *src_ptr, ptrdiff_t src_stride,
const uint8_t *pred_ptr, ptrdiff_t pred_stride,
int bd);
using ::std::tr1::get;
using ::std::tr1::make_tuple;
using ::std::tr1::tuple;
// <width, height, bit_dpeth, subtract>
typedef tuple<int, int, int, HBDSubtractFunc> Params;
#if CONFIG_VPX_HIGHBITDEPTH
class VP10HBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
public:
virtual void SetUp() {
block_width_ = GET_PARAM(0);
block_height_ = GET_PARAM(1);
bit_depth_ = static_cast<vpx_bit_depth_t>(GET_PARAM(2));
func_ = GET_PARAM(3);
rnd_.Reset(ACMRandom::DeterministicSeed());
const size_t max_width = 128;
const size_t max_block_size = max_width * max_width;
src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
vpx_memalign(16, max_block_size * sizeof(uint16_t))));
pred_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
vpx_memalign(16, max_block_size * sizeof(uint16_t))));
diff_ = reinterpret_cast<int16_t *>(
vpx_memalign(16, max_block_size * sizeof(int16_t)));
}
virtual void TearDown() {
vpx_free(CONVERT_TO_SHORTPTR(src_));
vpx_free(CONVERT_TO_SHORTPTR(pred_));
vpx_free(diff_);
}
protected:
void RunForSpeed();
void CheckResult();
private:
ACMRandom rnd_;
int block_height_;
int block_width_;
vpx_bit_depth_t bit_depth_;
HBDSubtractFunc func_;
uint8_t *src_;
uint8_t *pred_;
int16_t *diff_;
};
void VP10HBDSubtractBlockTest::RunForSpeed() {
const int test_num = 200000;
const int max_width = 128;
const int max_block_size = max_width * max_width;
const int mask = (1 << bit_depth_) - 1;
int i, j;
for (j = 0; j < max_block_size; ++j) {
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask;
CONVERT_TO_SHORTPTR(pred_)[j] = rnd_.Rand16() & mask;
}
for (i = 0; i < test_num; ++i) {
func_(block_height_, block_width_, diff_, block_width_,
src_, block_width_, pred_, block_width_, bit_depth_);
}
}
void VP10HBDSubtractBlockTest::CheckResult() {
const int test_num = 100;
const int max_width = 128;
const int max_block_size = max_width * max_width;
const int mask = (1 << bit_depth_) - 1;
int i, j;
for (i = 0; i < test_num; ++i) {
for (j = 0; j < max_block_size; ++j) {
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask;
CONVERT_TO_SHORTPTR(pred_)[j] = rnd_.Rand16() & mask;
}
func_(block_height_, block_width_, diff_, block_width_,
src_, block_width_, pred_, block_width_, bit_depth_);
for (int r = 0; r < block_height_; ++r) {
for (int c = 0; c < block_width_; ++c) {
EXPECT_EQ(diff_[r * block_width_ + c],
(CONVERT_TO_SHORTPTR(src_)[r * block_width_ + c] -
CONVERT_TO_SHORTPTR(pred_)[r * block_width_ + c]))
<< "r = " << r << ", c = " << c << ", test: " << i;
}
}
}
}
TEST_P(VP10HBDSubtractBlockTest, CheckResult) {
CheckResult();
}
#if USE_SPEED_TEST
TEST_P(VP10HBDSubtractBlockTest, CheckSpeed) {
RunForSpeed();
}
#endif // USE_SPEED_TEST
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(SSE2, VP10HBDSubtractBlockTest, ::testing::Values(
make_tuple(4, 4, 12, vpx_highbd_subtract_block_sse2),
make_tuple(4, 4, 12, vpx_highbd_subtract_block_c),
make_tuple(4, 8, 12, vpx_highbd_subtract_block_sse2),
make_tuple(4, 8, 12, vpx_highbd_subtract_block_c),
make_tuple(8, 4, 12, vpx_highbd_subtract_block_sse2),
make_tuple(8, 4, 12, vpx_highbd_subtract_block_c),
make_tuple(8, 8, 12, vpx_highbd_subtract_block_sse2),
make_tuple(8, 8, 12, vpx_highbd_subtract_block_c),
make_tuple(8, 16, 12, vpx_highbd_subtract_block_sse2),
make_tuple(8, 16, 12, vpx_highbd_subtract_block_c),
make_tuple(16, 8, 12, vpx_highbd_subtract_block_sse2),
make_tuple(16, 8, 12, vpx_highbd_subtract_block_c),
make_tuple(16, 16, 12, vpx_highbd_subtract_block_sse2),
make_tuple(16, 16, 12, vpx_highbd_subtract_block_c),
make_tuple(16, 32, 12, vpx_highbd_subtract_block_sse2),
make_tuple(16, 32, 12, vpx_highbd_subtract_block_c),
make_tuple(32, 16, 12, vpx_highbd_subtract_block_sse2),
make_tuple(32, 16, 12, vpx_highbd_subtract_block_c),
make_tuple(32, 32, 12, vpx_highbd_subtract_block_sse2),
make_tuple(32, 32, 12, vpx_highbd_subtract_block_c),
make_tuple(32, 64, 12, vpx_highbd_subtract_block_sse2),
make_tuple(32, 64, 12, vpx_highbd_subtract_block_c),
make_tuple(64, 32, 12, vpx_highbd_subtract_block_sse2),
make_tuple(64, 32, 12, vpx_highbd_subtract_block_c),
make_tuple(64, 64, 12, vpx_highbd_subtract_block_sse2),
make_tuple(64, 64, 12, vpx_highbd_subtract_block_c),
make_tuple(64, 128, 12, vpx_highbd_subtract_block_sse2),
make_tuple(64, 128, 12, vpx_highbd_subtract_block_c),
make_tuple(128, 64, 12, vpx_highbd_subtract_block_sse2),
make_tuple(128, 64, 12, vpx_highbd_subtract_block_c),
make_tuple(128, 128, 12, vpx_highbd_subtract_block_sse2),
make_tuple(128, 128, 12, vpx_highbd_subtract_block_c)));
#endif // HAVE_SSE2
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

192
test/sum_squares_test.cc Normal file
View File

@ -0,0 +1,192 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cmath>
#include <cstdlib>
#include <string>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx_ports/mem.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "test/function_equivalence_test.h"
using libvpx_test::ACMRandom;
using libvpx_test::FunctionEquivalenceTest;
namespace {
const int kNumIterations = 10000;
static const int16_t kInt13Max = (1 << 12) - 1;
typedef uint64_t (*SSI16Func)(const int16_t *src, int stride, int size);
typedef libvpx_test::FuncParam<SSI16Func> TestFuncs;
class SumSquaresTest :
public ::testing::TestWithParam<TestFuncs> {
public:
virtual ~SumSquaresTest() {}
virtual void SetUp() {
params_ = this->GetParam();
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
TestFuncs params_;
};
TEST_P(SumSquaresTest, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, int16_t, src[256*256]);
int failed = 0;
const int msb = 11; // Up to 12 bit input
const int limit = 1 << (msb+1);
for (int k = 0; k < kNumIterations; k++) {
int size = 4 << rnd(6); // Up to 128x128
int stride = 4 << rnd(7); // Up to 256 stride
while (stride < size) { // Make sure it's valid
stride = 4 << rnd(7);
}
for (int ii = 0 ; ii < size; ii++) {
for (int jj = 0; jj < size; jj++) {
src[ii*stride+jj] = rnd(2) ? rnd(limit) : -rnd(limit);
}
}
const uint64_t res_ref = params_.ref_func(src, stride, size);
uint64_t res_tst;
ASM_REGISTER_STATE_CHECK(res_tst = params_.tst_func(src, stride, size));
if (!failed) {
failed = res_ref != res_tst;
EXPECT_EQ(res_ref, res_tst)
<< "Error: Sum Squares Test"
<< " C output does not match optimized output.";
}
}
}
TEST_P(SumSquaresTest, ExtremeValues) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, int16_t, src[256*256]);
int failed = 0;
const int msb = 11; // Up to 12 bit input
const int limit = 1 << (msb+1);
for (int k = 0; k < kNumIterations; k++) {
int size = 4 << rnd(6); // Up to 128x128
int stride = 4 << rnd(7); // Up to 256 stride
while (stride < size) { // Make sure it's valid
stride = 4 << rnd(7);
}
int val = rnd(2) ? limit-1 : -(limit-1);
for (int ii = 0 ; ii < size; ii++) {
for (int jj = 0; jj < size; jj++) {
src[ii*stride+jj] = val;
}
}
const uint64_t res_ref = params_.ref_func(src, stride, size);
uint64_t res_tst;
ASM_REGISTER_STATE_CHECK(res_tst = params_.tst_func(src, stride, size));
if (!failed) {
failed = res_ref != res_tst;
EXPECT_EQ(res_ref, res_tst)
<< "Error: Sum Squares Test"
<< " C output does not match optimized output.";
}
}
}
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(
SSE2, SumSquaresTest,
::testing::Values(
TestFuncs(&vpx_sum_squares_2d_i16_c, &vpx_sum_squares_2d_i16_sse2)));
#endif // HAVE_SSE2
//////////////////////////////////////////////////////////////////////////////
// 1D version
//////////////////////////////////////////////////////////////////////////////
typedef uint64_t (*F1D)(const int16_t *src, uint32_t N);
typedef libvpx_test::FuncParam<F1D> TestFuncs1D;
class SumSquares1DTest : public FunctionEquivalenceTest<F1D> {
protected:
static const int kIterations = 1000;
static const int kMaxSize = 256;
};
TEST_P(SumSquares1DTest, RandomValues) {
DECLARE_ALIGNED(16, int16_t, src[kMaxSize * kMaxSize]);
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
for (int i = 0 ; i < kMaxSize * kMaxSize ; ++i)
src[i] = rng_(kInt13Max * 2 + 1) - kInt13Max;
const int N = rng_(2) ? rng_(kMaxSize * kMaxSize + 1 - kMaxSize) + kMaxSize
: rng_(kMaxSize) + 1;
const uint64_t ref_res = params_.ref_func(src, N);
uint64_t tst_res;
ASM_REGISTER_STATE_CHECK(tst_res = params_.tst_func(src, N));
ASSERT_EQ(ref_res, tst_res);
}
}
TEST_P(SumSquares1DTest, ExtremeValues) {
DECLARE_ALIGNED(16, int16_t, src[kMaxSize * kMaxSize]);
for (int iter = 0 ; iter < kIterations && !HasFatalFailure(); ++iter) {
if (rng_(2)) {
for (int i = 0 ; i < kMaxSize * kMaxSize ; ++i)
src[i] = kInt13Max;
} else {
for (int i = 0 ; i < kMaxSize * kMaxSize ; ++i)
src[i] = -kInt13Max;
}
const int N = rng_(2) ? rng_(kMaxSize * kMaxSize + 1 - kMaxSize) + kMaxSize
: rng_(kMaxSize) + 1;
const uint64_t ref_res = params_.ref_func(src, N);
uint64_t tst_res;
ASM_REGISTER_STATE_CHECK(tst_res = params_.tst_func(src, N));
ASSERT_EQ(ref_res, tst_res);
}
}
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(
SSE2, SumSquares1DTest,
::testing::Values(
TestFuncs1D(vpx_sum_squares_i16_c, vpx_sum_squares_i16_sse2)));
#endif // HAVE_SSE2
} // namespace

View File

@ -18,8 +18,11 @@ namespace {
const int kTestMode = 0;
const int kSuperframeSyntax = 1;
const int kTileCols = 2;
const int kTileRows = 3;
typedef std::tr1::tuple<libvpx_test::TestMode,int> SuperframeTestParam;
typedef std::tr1::tuple<libvpx_test::TestMode, int,
int, int> SuperframeTestParam;
class SuperframeTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<SuperframeTestParam> {
@ -37,6 +40,8 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
sf_count_ = 0;
sf_count_max_ = INT_MAX;
is_vp10_style_superframe_ = syntax;
n_tile_cols_ = std::tr1::get<kTileCols>(input);
n_tile_rows_ = std::tr1::get<kTileRows>(input);
}
virtual void TearDown() {
@ -47,6 +52,9 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
libvpx_test::Encoder *encoder) {
if (video->frame() == 1) {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
encoder->Control(VP8E_SET_CPUUSED, 2);
encoder->Control(VP9E_SET_TILE_COLUMNS, n_tile_cols_);
encoder->Control(VP9E_SET_TILE_ROWS, n_tile_rows_);
}
}
@ -91,6 +99,10 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
vpx_codec_cx_pkt_t modified_pkt_;
uint8_t *modified_buf_;
vpx_codec_pts_t last_sf_pts_;
private:
int n_tile_cols_;
int n_tile_rows_;
};
TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
@ -100,14 +112,35 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 40);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
#if CONFIG_EXT_REFS
// NOTE: The use of BWDREF_FRAME will enable the coding of more non-show
// frames besides ALTREF_FRAME.
EXPECT_GE(sf_count_, 1);
#else
EXPECT_EQ(sf_count_, 1);
#endif // CONFIG_EXT_REFS
}
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
::testing::Values(::libvpx_test::kTwoPassGood),
::testing::Values(0)));
// The superframe index is currently mandatory with ANS due to the decoder
// starting at the end of the buffer.
#if CONFIG_EXT_TILE
// Single tile does not work with ANS (see comment above).
#if CONFIG_ANS
const int tile_col_values[] = { 1, 2 };
#else
const int tile_col_values[] = { 1, 2, 32 };
#endif
const int tile_row_values[] = { 1, 2, 32 };
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
::testing::Values(::libvpx_test::kTwoPassGood),
::testing::Values(CONFIG_MISC_FIXES)));
::testing::Values(1),
::testing::ValuesIn(tile_col_values),
::testing::ValuesIn(tile_row_values)));
#else
#if !CONFIG_ANS
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
::testing::Values(::libvpx_test::kTwoPassGood),
::testing::Values(1), ::testing::Values(0), ::testing::Values(0)));
#endif // !CONFIG_ANS
#endif // CONFIG_EXT_TILE
} // namespace

View File

@ -63,6 +63,12 @@ class SvcTest : public ::testing::Test {
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
VP9CodecFactory codec_factory;
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
#if CONFIG_VP10 && CONFIG_EXT_TILE
if (decoder_->IsVP10()) {
decoder_->Control(VP10_SET_DECODE_TILE_ROW, -1);
decoder_->Control(VP10_SET_DECODE_TILE_COL, -1);
}
#endif
tile_columns_ = 0;
tile_rows_ = 0;

View File

@ -18,761 +18,16 @@ LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_422.y4m
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_444.y4m
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_440.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += desktop_credits.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += desktop_credits.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += niklas_1280_720_30.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += rush_hour_444.y4m
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += screendata.y4m
# Test vectors
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-001.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-001.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-002.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-002.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-003.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-003.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-004.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-004.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-005.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-005.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-006.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-006.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-007.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-007.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-008.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-008.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-009.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-009.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-010.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-010.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-011.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-011.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-012.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-012.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-013.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-013.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-014.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-014.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-015.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-015.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-016.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-016.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-017.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-017.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-018.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-018.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1400.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1400.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1411.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1411.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1416.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1416.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1417.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-01-intra-1417.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1402.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1402.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1412.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1412.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1418.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1418.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1424.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-02-inter-1424.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-01.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-01.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-02.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-02.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-03.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-03.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-04.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-04.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1401.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1401.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1403.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1403.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1407.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1407.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1408.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1408.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1409.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1409.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1410.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1410.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1413.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1413.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1414.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1414.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1415.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1415.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1425.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1425.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1426.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1426.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1427.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1427.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1432.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1432.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1435.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1435.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1436.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1436.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1437.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1437.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1441.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1441.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1442.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-03-segmentation-1442.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-04-partitions-1404.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-04-partitions-1404.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-04-partitions-1405.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-04-partitions-1405.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-04-partitions-1406.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-04-partitions-1406.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1428.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1428.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1429.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1429.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1430.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1430.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1431.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1431.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1433.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1433.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1434.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1434.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-01.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-01.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-02.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-02.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-03.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-03.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-04.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-04.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-05.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-05.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-06.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-06.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-07.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-07.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-09.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-09.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-11.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-11.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-12.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-12.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-13.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-13.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-14.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-14.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-15.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-15.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-17.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-17.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-19.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-19.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-20.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-20.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-21.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-21.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-22.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-22.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-23.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-23.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-24.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-24.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-25.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-25.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-26.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-26.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-27.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-27.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-28.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-28.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-29.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-29.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-30.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-30.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-31.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-31.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-33.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-33.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-35.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-35.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-36.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-36.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-37.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-37.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-38.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-38.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-39.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-39.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-40.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-40.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-41.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-41.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-42.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-42.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-43.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-43.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-44.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-44.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-45.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-45.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-46.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-46.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-47.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-47.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-48.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-48.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-49.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-49.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-50.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-50.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-51.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-51.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-52.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-52.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-53.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-53.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-54.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-54.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-55.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-55.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-56.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-56.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-57.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-57.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-58.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-58.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-59.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-59.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-60.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-60.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-61.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-61.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-62.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-62.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-63.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-63.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-3.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-3.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-5.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-5.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-6.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-6.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-7.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-01-sharpness-7.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-08x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-10x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-16x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-18x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-32x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-34x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-64x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x08.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x08.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x10.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x10.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x18.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x18.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x32.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x32.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x34.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x34.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-130x132.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-130x132.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x130.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x130.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x132.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x132.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-178x180.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-178x180.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x178.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x178.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x180.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x180.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-198x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-200x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-202x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-208x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-210x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-224x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x198.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x198.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x200.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x200.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x202.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x202.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x208.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x208.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x210.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x210.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x224.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x224.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-352x288.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-352x288.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-06-bilinear.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-06-bilinear.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-07-frame_parallel.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-07-frame_parallel.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-07-frame_parallel-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-07-frame_parallel-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x2_frame_parallel.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x2_frame_parallel.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4_frame_parallel.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4_frame_parallel.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8_frame_parallel.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8_frame_parallel.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-aq2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-aq2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-lf_deltas.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-lf_deltas.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-subpixel-00.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-subpixel-00.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-10-show-existing-frame.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-10-show-existing-frame.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-10-show-existing-frame2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-10-show-existing-frame2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-11-size-351x287.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-11-size-351x287.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-11-size-351x288.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-11-size-351x288.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-11-size-352x287.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-11-size-352x287.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_1.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_1.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_2.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_2.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_3.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-12-droppable_3.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-13-largescaling.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-13-largescaling.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-1-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-8-4-2-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-8-4-2-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-16-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-2-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-4-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-16.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-16.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey_adpq.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey_adpq.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-16-intra-only.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-16-intra-only.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-17-show-existing-frame.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-17-show-existing-frame.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-18-resize.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-18-resize.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-19-skip.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-19-skip.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-19-skip-01.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-19-skip-01.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-19-skip-02.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-19-skip-02.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv422.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv422.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv440.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv440.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv444.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yuv444.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-01.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-01.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-02.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-20-big_superframe-02.webm.md5
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-10bit-yuv420.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-10bit-yuv420.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-12bit-yuv420.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp92-2-20-12bit-yuv420.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv422.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv422.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv422.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv422.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv440.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv440.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv440.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv440.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv444.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-10bit-yuv444.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp93-2-20-12bit-yuv444.webm.md5
endif # CONFIG_VP9_HIGHBITDEPTH
# Invalid files for testing libvpx error checking.
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-01-v3.webm.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-02-v2.webm.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-03-v3.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-03-v3.webm.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-03-size-224x196.webm.ivf.s44156_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-03-size-224x196.webm.ivf.s44156_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-05-resize.ivf.s59293_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-05-resize.ivf.s59293_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-08-tile_1x2_frame_parallel.webm.ivf.s47039_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-08-tile_1x2_frame_parallel.webm.ivf.s47039_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-08-tile_1x8_frame_parallel.webm.ivf.s288_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-08-tile_1x8_frame_parallel.webm.ivf.s288_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-08-tile_1x4_frame_parallel_all_key.webm.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-09-aq2.webm.ivf.s3984_r01-05_b6-.v2.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-09-aq2.webm.ivf.s3984_r01-05_b6-.v2.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-09-subpixel-00.ivf.s19552_r01-05_b6-.v2.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-09-subpixel-00.ivf.s19552_r01-05_b6-.v2.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-09-subpixel-00.ivf.s20492_r01-05_b6-.v2.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-09-subpixel-00.ivf.s20492_r01-05_b6-.v2.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-12-droppable_1.ivf.s3676_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-12-droppable_1.ivf.s3676_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-12-droppable_1.ivf.s73804_r01-05_b6-.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-12-droppable_1.ivf.s73804_r01-05_b6-.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp91-2-mixedrefcsp-444to420.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp91-2-mixedrefcsp-444to420.ivf.res
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-07-frame_parallel-1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-07-frame_parallel-2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += invalid-vp90-2-07-frame_parallel-3.webm
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += desktop_credits.y4m
ifeq ($(CONFIG_DECODE_PERF_TESTS),yes)
# Encode / Decode test
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += niklas_1280_720_30.yuv
# BBB VP9 streams
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-bbb_426x240_tile_1x1_180kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-bbb_640x360_tile_1x2_337kbps.webm
@ -798,15 +53,15 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-tos_1920x800_tile_1x4_fpm_2335k
endif # CONFIG_DECODE_PERF_TESTS
ifeq ($(CONFIG_ENCODE_PERF_TESTS),yes)
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += desktop_640_360_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += kirland_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += macmarcomoving_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += macmarcostationary_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += tacomanarrows_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += tacomasmallcameramovement_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += thaloundeskmtg_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += desktop_640_360_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += kirland_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += macmarcomoving_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += macmarcostationary_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += niklas_1280_720_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += niklas_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += tacomanarrows_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += tacomasmallcameramovement_640_480_30.yuv
LIBVPX_TEST_DATA-$(CONFIG_VP10_ENCODER) += thaloundeskmtg_640_480_30.yuv
endif # CONFIG_ENCODE_PERF_TESTS
# sort and remove duplicates

View File

@ -28,673 +28,6 @@ b9e1e90aece2be6e2c90d89e6ab2372d5f8c792d *park_joy_90p_8_420_a10-1.y4m
bdb7856e6bc93599bdda05c2e773a9f22b6c6d03 *park_joy_90p_8_444.y4m
81e1f3843748438b8f2e71db484eb22daf72e939 *park_joy_90p_8_440.yuv
b1f1c3ec79114b9a0651af24ce634afb44a9a419 *rush_hour_444.y4m
5184c46ddca8b1fadd16742e8500115bc8f749da *vp80-00-comprehensive-001.ivf
65bf1bbbced81b97bd030f376d1b7f61a224793f *vp80-00-comprehensive-002.ivf
906b4c1e99eb734504c504b3f1ad8052137ce672 *vp80-00-comprehensive-003.ivf
ec144b1af53af895db78355785650b96dd3f0ade *vp80-00-comprehensive-004.ivf
afc7091785c62f1c121c4554a2830c30704587d9 *vp80-00-comprehensive-005.ivf
42ea9d55c818145d06a9b633b8e85c6a6164fd3e *vp80-00-comprehensive-006.ivf
e5b3a73ab79fe024c14309d653d6bed92902ee3b *vp80-00-comprehensive-007.ivf
f3c50a58875930adfb84525c0ef59d7e4c08540c *vp80-00-comprehensive-008.ivf
4b2841fdb83db51ae322096ae468bbb9dc2c8362 *vp80-00-comprehensive-009.ivf
efbff736e3a91ab6a98c5bc2dce65d645944c7b1 *vp80-00-comprehensive-010.ivf
6b315102cae008d22a3d2c231be92cb704a222f8 *vp80-00-comprehensive-011.ivf
f3214a4fea14c2d5ec689936c1613f274c859ee8 *vp80-00-comprehensive-012.ivf
e4094e96d308c8a35b74c480a43d853c5294cd34 *vp80-00-comprehensive-013.ivf
5b0adfaf60a69e0aaf3ec021a39d0a68fc0e1b5a *vp80-00-comprehensive-014.ivf
e8467688ddf26b5000664f904faf0d70506aa653 *vp80-00-comprehensive-015.ivf
aab55582337dfd2a39ff54fb2576a91910d49337 *vp80-00-comprehensive-016.ivf
1ba24724f80203c9bae4f1d0f99d534721980016 *vp80-00-comprehensive-017.ivf
143a15512b46f436280ddb4d0e6411eb4af434f2 *vp80-00-comprehensive-018.ivf
c5baeaf5714fdfb3a8bc960a8e33ac438e83b16b *vp80-01-intra-1400.ivf
f383955229afe3408453e316d11553d923ca60d5 *vp80-01-intra-1411.ivf
84e1f4343f174c9f3c83f834bac3196fb325bf2c *vp80-01-intra-1416.ivf
fb6e712a47dd57a28a3727d2ae2c97a8b7c7ca51 *vp80-01-intra-1417.ivf
71ea772d3e9d315b8cbecf41207b8a237c34853b *vp80-02-inter-1402.ivf
d85dbc4271525dcd128c503f936fe69091d1f8d0 *vp80-02-inter-1412.ivf
d4e5d3ad56511867d025f93724d090f92ba6ec3d *vp80-02-inter-1418.ivf
91791cbcc37c60f35dbd8090bacb54e5ec6dd4fa *vp80-02-inter-1424.ivf
17fbfe2fea70f6e2f3fa6ca4efaae6c0b03b5f02 *vp80-03-segmentation-01.ivf
3c3600dbbcde08e20d54c66fe3b7eadd4f09bdbb *vp80-03-segmentation-02.ivf
c156778d5340967d4b369c490848076e92f1f875 *vp80-03-segmentation-03.ivf
d25dcff6c60e87a1af70945b8911b6b4998533b0 *vp80-03-segmentation-04.ivf
362baba2ce454c9db21218f35e81c27a5ed0b730 *vp80-03-segmentation-1401.ivf
d223ae7ee748ce07e74c4679bfd219e84aa9f4b0 *vp80-03-segmentation-1403.ivf
033adf7f3a13836a3f1cffcb87c1972900f2b5c6 *vp80-03-segmentation-1407.ivf
4d51dfbf9f3e2c590ec99d1d6f59dd731d04375f *vp80-03-segmentation-1408.ivf
f37a62b197c2600d75e0ccfbb31b60efdedac251 *vp80-03-segmentation-1409.ivf
eb25bd7bfba5b2f6935018a930f42d123b1e7fcd *vp80-03-segmentation-1410.ivf
b9d5c436663a30c27cfff84b53a002e501258843 *vp80-03-segmentation-1413.ivf
6da92b9d1a180cc3a8afe348ab12258f5a37be1a *vp80-03-segmentation-1414.ivf
a4f5842602886bd669f115f93d8a35c035cb0948 *vp80-03-segmentation-1415.ivf
f295dceb8ef278b77251b3f9df8aee22e161d547 *vp80-03-segmentation-1425.ivf
198dbf9f36f733200e432664cc8c5752d59779de *vp80-03-segmentation-1426.ivf
7704804e32f5de976803929934a7fafe101ac7b0 *vp80-03-segmentation-1427.ivf
831ccd862ea95ca025d2f3bd8b88678752f5416d *vp80-03-segmentation-1432.ivf
b3c11978529289f9109f2766fcaba3ebc40e11ef *vp80-03-segmentation-1435.ivf
a835a731f5520ebfc1002c40121264d0020559ac *vp80-03-segmentation-1436.ivf
1d1732942f773bb2a5775fcb9689b1579ce28eab *vp80-03-segmentation-1437.ivf
db04799adfe089dfdf74dbd43cc05ede7161f99e *vp80-03-segmentation-1441.ivf
7caf39b3f20cfd52b998210878062e52a5edf1e6 *vp80-03-segmentation-1442.ivf
3607f6bb4ee106c38fa1ea370dc4ff8b8cde2261 *vp80-04-partitions-1404.ivf
93cc323b6b6867f1b12dd48773424549c6960a6b *vp80-04-partitions-1405.ivf
047eedb14b865bdac8a3538e63801054e0295e9c *vp80-04-partitions-1406.ivf
0f1233bd2bc33f56ce5e495dbd455d122339f384 *vp80-05-sharpness-1428.ivf
51767fc136488a9535c2a4c38067c542ee2048df *vp80-05-sharpness-1429.ivf
9805aa107672de25d6fb8c35e20d06deca5efe18 *vp80-05-sharpness-1430.ivf
61db6b965f9c27aebe71b85bf2d5877e58e4bbdf *vp80-05-sharpness-1431.ivf
10420d266290d2923555f84af38eeb96edbd3ae8 *vp80-05-sharpness-1433.ivf
3ed24f9a80cddfdf75824ba95cdb4ff9286cb443 *vp80-05-sharpness-1434.ivf
c87599cbecd72d4cd4f7ace3313b7a6bc6eb8163 *vp80-05-sharpness-1438.ivf
aff51d865c2621b60510459244ea83e958e4baed *vp80-05-sharpness-1439.ivf
da386e72b19b5485a6af199c5eb60ef25e510dd1 *vp80-05-sharpness-1440.ivf
6759a095203d96ccd267ce09b1b050b8cc4c2f1f *vp80-05-sharpness-1443.ivf
b95d3cc1d0df991e63e150a801710a72f20d9ba0 *vp80-06-smallsize.ivf
db55ec7fd02c864ba996ff060b25b1e08611330b *vp80-00-comprehensive-001.ivf.md5
29db0ad011cba1e45f856d5623cd38dac3e3bf19 *vp80-00-comprehensive-002.ivf.md5
e84f258f69e173e7d68f8f8c037a0a3766902182 *vp80-00-comprehensive-003.ivf.md5
eb7912eaf69559a16fd82bc3f5fb1524cf4a4466 *vp80-00-comprehensive-004.ivf.md5
4206f71c94894bd5b5b376f6c09b3817dbc65206 *vp80-00-comprehensive-005.ivf.md5
4f89b356f6f2fecb928f330a10f804f00f5325f5 *vp80-00-comprehensive-006.ivf.md5
2813236a32964dd8007e17648bcf035a20fcda6c *vp80-00-comprehensive-007.ivf.md5
10746c72098f872803c900e17c5680e451f5f498 *vp80-00-comprehensive-008.ivf.md5
39a23d0692ce64421a7bb7cdf6ccec5928d37fff *vp80-00-comprehensive-009.ivf.md5
f6e3de8931a0cc659bda8fbc14050346955e72d4 *vp80-00-comprehensive-010.ivf.md5
101683ec195b6e944f7cd1e468fc8921439363e6 *vp80-00-comprehensive-011.ivf.md5
1f592751ce46d8688998fa0fa4fbdcda0fd4058c *vp80-00-comprehensive-012.ivf.md5
6066176f90ca790251e795fca1a5797d59999841 *vp80-00-comprehensive-013.ivf.md5
2656da94ba93691f23edc4d60b3a09e2be46c217 *vp80-00-comprehensive-014.ivf.md5
c6e0d5f5d61460c8ac8edfa4e701f10312c03133 *vp80-00-comprehensive-015.ivf.md5
ee60fee501d8493e34e8d6a1fe315b51ed09b24a *vp80-00-comprehensive-016.ivf.md5
9f1914ceffcad4546c0a29de3ef591d8bea304dc *vp80-00-comprehensive-017.ivf.md5
e0305178fe288a9fd8082b39e2d03181edb19054 *vp80-00-comprehensive-018.ivf.md5
612494da2fa799cc9d76dcdd835ae6c7cb2e5c05 *vp80-01-intra-1400.ivf.md5
48ea06097ac8269c5e8c2131d3d0639f431fcf0e *vp80-01-intra-1411.ivf.md5
6e2ab4e7677ad0ba868083ca6bc387ee922b400c *vp80-01-intra-1416.ivf.md5
eca0a90348959ce3854142f8d8641b13050e8349 *vp80-01-intra-1417.ivf.md5
920feea203145d5c2258a91c4e6991934a79a99e *vp80-02-inter-1402.ivf.md5
f71d97909fe2b3dd65be7e1f56c72237f0cef200 *vp80-02-inter-1412.ivf.md5
e911254569a30bbb2a237ff8b79f69ed9da0672d *vp80-02-inter-1418.ivf.md5
58c789c50c9bb9cc90580bed291164a0939d28ba *vp80-02-inter-1424.ivf.md5
ff3e2f441327b9c20a0b37c524e0f5a48a36de7b *vp80-03-segmentation-01.ivf.md5
0791f417f076a542ae66fbc3426ab4d94cbd6c75 *vp80-03-segmentation-02.ivf.md5
722e50f1a6a91c34302d68681faffc1c26d1cc57 *vp80-03-segmentation-03.ivf.md5
c701f1885bcfb27fb8e70cc65606b289172ef889 *vp80-03-segmentation-04.ivf.md5
f79bc9ec189a2b4807632a3d0c5bf04a178b5300 *vp80-03-segmentation-1401.ivf.md5
b9aa4c74c0219b639811c44760d0b24cd8bb436a *vp80-03-segmentation-1403.ivf.md5
70d5a2207ca1891bcaebd5cf6dd88ce8d57b4334 *vp80-03-segmentation-1407.ivf.md5
265f962ee781531f9a93b9309461316fd32b2a1d *vp80-03-segmentation-1408.ivf.md5
0c4ecbbd6dc042d30e626d951b65f460dd6cd563 *vp80-03-segmentation-1409.ivf.md5
cf779af36a937f06570a0fca9db64ba133451dee *vp80-03-segmentation-1410.ivf.md5
0e6c5036d51ab078842f133934926c598a9cff02 *vp80-03-segmentation-1413.ivf.md5
eb3930aaf229116c80d507516c34759c3f6cdf69 *vp80-03-segmentation-1414.ivf.md5
123d6c0f72ee87911c4ae7538e87b7d163b22d6c *vp80-03-segmentation-1415.ivf.md5
e70551d1a38920e097a5d8782390b79ecaeb7505 *vp80-03-segmentation-1425.ivf.md5
44e8f4117e46dbb302b2cfd81171cc1a1846e431 *vp80-03-segmentation-1426.ivf.md5
52636e54aee5f95bbace37021bd67de5db767e9a *vp80-03-segmentation-1427.ivf.md5
b1ad3eff20215c28e295b15ef3636ed926d59cba *vp80-03-segmentation-1432.ivf.md5
24c22a552fa28a90e5978f67f57181cc2d7546d7 *vp80-03-segmentation-1435.ivf.md5
96c49c390abfced18a7a8c9b9ea10af778e10edb *vp80-03-segmentation-1436.ivf.md5
f95eb6214571434f1f73ab7833b9ccdf47588020 *vp80-03-segmentation-1437.ivf.md5
1c0700ca27c9b0090a7747a4b0b4dc21d1843181 *vp80-03-segmentation-1441.ivf.md5
81d4f23ca32667ee958bae579c8f5e97ba72eb97 *vp80-03-segmentation-1442.ivf.md5
272efcef07a3a30fbca51bfd566063d8258ec0be *vp80-04-partitions-1404.ivf.md5
66ed219ab812ac801b256d35cf495d193d4cf478 *vp80-04-partitions-1405.ivf.md5
36083f37f56f502bd60ec5e07502ee9e6b8699b0 *vp80-04-partitions-1406.ivf.md5
6ca909bf168a64c09415626294665dc1be3d1973 *vp80-05-sharpness-1428.ivf.md5
1667d2ee2334e5fdea8a8a866f4ccf3cf76f033a *vp80-05-sharpness-1429.ivf.md5
71bcbe5357d36a19df5b07fbe3e27bffa8893f0a *vp80-05-sharpness-1430.ivf.md5
89a09b1dffce2d55770a89e58d9925c70ef79bf8 *vp80-05-sharpness-1431.ivf.md5
08444a18b4e6ba3450c0796dd728d48c399a2dc9 *vp80-05-sharpness-1433.ivf.md5
6d6223719a90c13e848aa2a8a6642098cdb5977a *vp80-05-sharpness-1434.ivf.md5
41d70bb5fa45bc88da1604a0af466930b8dd77b5 *vp80-05-sharpness-1438.ivf.md5
086c56378df81b6cee264d7540a7b8f2b405c7a4 *vp80-05-sharpness-1439.ivf.md5
d32dc2c4165eb266ea4c23c14a45459b363def32 *vp80-05-sharpness-1440.ivf.md5
8c69dc3d8e563f56ffab5ad1e400d9e689dd23df *vp80-05-sharpness-1443.ivf.md5
d6f246df012c241b5fa6c1345019a3703d85c419 *vp80-06-smallsize.ivf.md5
ce881e567fe1d0fbcb2d3e9e6281a1a8d74d82e0 *vp90-2-00-quantizer-00.webm
ac5eda33407d0521c7afca43a63fd305c0cd9d13 *vp90-2-00-quantizer-00.webm.md5
2ca0463f2cfb93d25d7dded174db70b7cb87cb48 *vp90-2-00-quantizer-01.webm
10d98884fc6d9a5f47a2057922b8e25dd48d7786 *vp90-2-00-quantizer-01.webm.md5
d80a2920a5e0819d69dcba8fe260c01f820f8982 *vp90-2-00-quantizer-02.webm
c964c8e5e04165fabbf1c6ee8ee5121d35921965 *vp90-2-00-quantizer-02.webm.md5
fdef046777b5b75c962b715d809dbe2ea331afb9 *vp90-2-00-quantizer-03.webm
f270bee0b0c7aa2bf4c5afe098556b4f3f890faf *vp90-2-00-quantizer-03.webm.md5
66d98609e809394a6ac730787e6724e3badc075a *vp90-2-00-quantizer-04.webm
427433bfe121c4aea1095ec3124fdc174d200e3a *vp90-2-00-quantizer-04.webm.md5
e6e42626d8cadf0b5be16313f69212981b96fee5 *vp90-2-00-quantizer-05.webm
c98f6a9a1af4cfd71416792827304266aad4bd46 *vp90-2-00-quantizer-05.webm.md5
413ef09b721f5dcec1a96e937a97e5873c2e6db6 *vp90-2-00-quantizer-06.webm
5080e940a23805c82e578e21b57fc2c511e76376 *vp90-2-00-quantizer-06.webm.md5
4a50a5f4ac717c30dfaae8bb46702e3542e867de *vp90-2-00-quantizer-07.webm
76c429a02b56762e10ee4db88729d8834b3a70f4 *vp90-2-00-quantizer-07.webm.md5
d2f4e464780bf8b7e647efa18ac777a930e62bc0 *vp90-2-00-quantizer-08.webm
ab94aabf9316111b52d7c531962ed4123313b6ba *vp90-2-00-quantizer-08.webm.md5
174bc58433936dd79550398d744f1072ce7f5693 *vp90-2-00-quantizer-09.webm
e1f7690cd83ccc56d045e17cce552544a5f03810 *vp90-2-00-quantizer-09.webm.md5
52bc1dfd3a97b24d922eb8a31d07527891561f2a *vp90-2-00-quantizer-10.webm
9b37bed893b5f6a4e12f2aa40f02dd40f944d0f8 *vp90-2-00-quantizer-10.webm.md5
10031eecafde1e1d8e6323fe2b2a1d7e77a66869 *vp90-2-00-quantizer-11.webm
fe4620a4bb0e4f5cb9bbfedc4039a22b81b0f5c0 *vp90-2-00-quantizer-11.webm.md5
78e9f7bb77e8e348155bbdfa12790789d1d50c34 *vp90-2-00-quantizer-12.webm
0961d060cc8dd469c6dac8d7d75f927c0bb971b8 *vp90-2-00-quantizer-12.webm.md5
133b77a3bbcef652552d74ffc46afbfe3b8a1cba *vp90-2-00-quantizer-13.webm
df29e5e0f95772af482f540d776f6b9dea4bfa29 *vp90-2-00-quantizer-13.webm.md5
27323afdaf8987e025c27129c74c86502315a206 *vp90-2-00-quantizer-14.webm
ce96a2cc312942f0427a463f15a392870dd69764 *vp90-2-00-quantizer-14.webm.md5
ab58d0b41037829f6bc993910999f4af0212aafd *vp90-2-00-quantizer-15.webm
40f700db606501aa7cb49049624cbdde6409b122 *vp90-2-00-quantizer-15.webm.md5
cd948e66448aafb65998815ce37241f95d7c9ee7 *vp90-2-00-quantizer-16.webm
039b742d149c945ed79c7b9a6384352852a1c116 *vp90-2-00-quantizer-16.webm.md5
62f56e663e13c576764e491cf08f19bd46a71999 *vp90-2-00-quantizer-17.webm
90c5a39bf76e6b3e0a1c0d3e9b68a9fd78be963e *vp90-2-00-quantizer-17.webm.md5
f26ecad7263cd66a614e53ba5d7c00df181affeb *vp90-2-00-quantizer-18.webm
cda0a1c0fca2ec2976ae55124a8a67305508bae6 *vp90-2-00-quantizer-18.webm.md5
94bfc4c04fcfe139a63b98c569e8c14ba98c401f *vp90-2-00-quantizer-19.webm
5b8ec169ccf67d8a0a8e46a62eb173f5a1dbaf4f *vp90-2-00-quantizer-19.webm.md5
0ee88e9318985e1e245de78c2c4a665885ab76a7 *vp90-2-00-quantizer-20.webm
4b26f7edb4fcd3a1b4cce9ba3cb8650e3ee6e063 *vp90-2-00-quantizer-20.webm.md5
6a995cb2b1db33da8087321df1e646f95c3e32d1 *vp90-2-00-quantizer-21.webm
e216b4a1eceac03efcc433759be54ab8ea87b24b *vp90-2-00-quantizer-21.webm.md5
aa7722fc427e7180115f3c9cd96bb6b2768e7296 *vp90-2-00-quantizer-22.webm
1aa813bd45ae831bf5e79ace4d73dfd25989a07d *vp90-2-00-quantizer-22.webm.md5
7677e5b929ed6d142041f19b8a9cd5822ee1504a *vp90-2-00-quantizer-23.webm
0de0af34abd843d5b37e58baf3ed96a6104b64c3 *vp90-2-00-quantizer-23.webm.md5
b2995cbe1128b2d4926f1b28d01c501ecb6be8c8 *vp90-2-00-quantizer-24.webm
db6033af2ba2f2bca62468fb4b8808e474f93923 *vp90-2-00-quantizer-24.webm.md5
8135ba35587fd92cd4667be7896323d9b634401c *vp90-2-00-quantizer-25.webm
3499e00c2cc15876f61f07e3d3cfca54ebcd98fd *vp90-2-00-quantizer-25.webm.md5
af0fa2907746db82d345f6d831fcc1b2862a29fb *vp90-2-00-quantizer-26.webm
cd6fe3d14dab48886ebf65be00e6ed9616ebe5a7 *vp90-2-00-quantizer-26.webm.md5
bd0002e91323776beb5ff11e06edcf19fc08e9b9 *vp90-2-00-quantizer-27.webm
fe72154ef196067d6c272521012dd79706496cac *vp90-2-00-quantizer-27.webm.md5
fc15eb606f81455ff03df16bf3432296b002c43c *vp90-2-00-quantizer-28.webm
40b2e24b542206a6bfd746ef199e49ccea07678a *vp90-2-00-quantizer-28.webm.md5
3090bbf913cad0b2eddca7228f5ed51a58378b8d *vp90-2-00-quantizer-29.webm
eb59745e0912d8ed6c928268bcf265237c9ba93f *vp90-2-00-quantizer-29.webm.md5
c615abdca9c25e1cb110d908edbedfb3b7c92b91 *vp90-2-00-quantizer-30.webm
ad0f4fe6733e4e7cdfe8ef8722bb341dcc7538c0 *vp90-2-00-quantizer-30.webm.md5
037d9f242086cfb085518f6416259defa82d5fc2 *vp90-2-00-quantizer-31.webm
4654b40792572f0a790874c6347ef9196d86c1a7 *vp90-2-00-quantizer-31.webm.md5
505899f3f3515044c5c8b3213d9b9d16f614619d *vp90-2-00-quantizer-32.webm
659a2e6dd02df323f62600626859006640b445df *vp90-2-00-quantizer-32.webm.md5
8b32ec9c3b7e5ca8ddc6b8aea1c1cb7ca996bccc *vp90-2-00-quantizer-33.webm
5b175ef1120ddeba4feae1247bf381bbc4e816ce *vp90-2-00-quantizer-33.webm.md5
4d283755d17e287b1d099a80604398f60d7fb6ea *vp90-2-00-quantizer-34.webm
22a739de95acfeb27524e3700b8f678a9ad744d8 *vp90-2-00-quantizer-34.webm.md5
4296f56a892a412d3d4f64824718dd566c4e6459 *vp90-2-00-quantizer-35.webm
c532c9c8dc7b3506fc6a51e5c20c17ef0ac039e7 *vp90-2-00-quantizer-35.webm.md5
6f54e11da461e4410dd9075b015e2d9bc1d07dfb *vp90-2-00-quantizer-36.webm
0b3573f5addea4e3eb11a0b85f068299d5bdad78 *vp90-2-00-quantizer-36.webm.md5
210581682a26c2c4375efc785c36e07539888bc2 *vp90-2-00-quantizer-37.webm
2b4fb6f8ba975237858e61cc8f560bcfc87cb38e *vp90-2-00-quantizer-37.webm.md5
a15ef31283dfc4860f837fe200eb32a445f59629 *vp90-2-00-quantizer-38.webm
fb76771f3a795054b9936f70da7505c3ac585284 *vp90-2-00-quantizer-38.webm.md5
1df8433a441412831daae6726df89fa70d21b14d *vp90-2-00-quantizer-39.webm
39e162c09a20e7e684868097766347014371fee6 *vp90-2-00-quantizer-39.webm.md5
5330e4788ab9129dbb25a7a7d5411104521248b6 *vp90-2-00-quantizer-40.webm
872cc0f2cc9dbf000f89eadb4d8f9940e48e00b1 *vp90-2-00-quantizer-40.webm.md5
d88d03b982889e399a78d7a06eeb1cf30e6c2da2 *vp90-2-00-quantizer-41.webm
5b4f7217e57fa2a221011d0b32f8d0409496b7b6 *vp90-2-00-quantizer-41.webm.md5
9e16406e3e26955a6e17d455ef1ef64bbfa26e53 *vp90-2-00-quantizer-42.webm
0219d090cf37daabe19256ba8e932ba4874b92e4 *vp90-2-00-quantizer-42.webm.md5
a9b15843486fb05f8cd15437ef279782a42b75db *vp90-2-00-quantizer-43.webm
3c9b0b4c607f9579a31726bfcf56729334ddc686 *vp90-2-00-quantizer-43.webm.md5
1dbc931ac446c91eabe7213efff55b596cccf07c *vp90-2-00-quantizer-44.webm
73bc8f675103abaef3d9f73a2742b3bffd726d23 *vp90-2-00-quantizer-44.webm.md5
7c6c1be15beb9d6201204b018966c8c4f9777efc *vp90-2-00-quantizer-45.webm
c907b29da821f790c6748de61f592689312e4e36 *vp90-2-00-quantizer-45.webm.md5
07b434da1a467580f73b32177ee11b3e00f65a0d *vp90-2-00-quantizer-46.webm
7b2b7ce60c50bc970bc0ada46d7a7ce440148da3 *vp90-2-00-quantizer-46.webm.md5
233d0465fb1a6fa36e9f89bd2193ac79bd4d2809 *vp90-2-00-quantizer-47.webm
527e0a9fb932efe915027ffe077f9e8d3a4fb139 *vp90-2-00-quantizer-47.webm.md5
719613df7307e205c3fdb6acfb373849c5ab23c7 *vp90-2-00-quantizer-48.webm
65ab6c9d1b682c183b201c7ff42b90343ce3e304 *vp90-2-00-quantizer-48.webm.md5
3bf04a598325ed0eabae1598ec7f718f715ec672 *vp90-2-00-quantizer-49.webm
ac68c4387ce11fcc998d8ba455ab9b2bb361d240 *vp90-2-00-quantizer-49.webm.md5
d59238fb3a654931c9b65a11e7321b40d1f702e9 *vp90-2-00-quantizer-50.webm
d0576bfede46fd55659f028f2fd28554ceb3e6cc *vp90-2-00-quantizer-50.webm.md5
3f579785101d4209360dd96f8c2ffe9beddf3bee *vp90-2-00-quantizer-51.webm
89fcfe04f4457a7f02ab4a2f94aacbb88aee5789 *vp90-2-00-quantizer-51.webm.md5
28be5836e2fedefe4babf12fc9b79e460ab0a0f4 *vp90-2-00-quantizer-52.webm
f3dd52b70c18345fee740220f35da9c4def2017a *vp90-2-00-quantizer-52.webm.md5
488ad4058c17170665b6acd1021fade9a02771e4 *vp90-2-00-quantizer-53.webm
1cdcb1d4f3a37cf83ad235eb27ec62ed2a01afc7 *vp90-2-00-quantizer-53.webm.md5
682978289cb28cc8c9d39bc797300e45d6039de7 *vp90-2-00-quantizer-54.webm
36c35353f2c03cb099bd710d9994de7d9ed88834 *vp90-2-00-quantizer-54.webm.md5
c398ce49af762a48f10cc4da9fae0769aae5f226 *vp90-2-00-quantizer-55.webm
2cf3570542d984f167ab087f59493c7fb47e0ed2 *vp90-2-00-quantizer-55.webm.md5
3071f18b2fce261aa82d61f81a7ae4ca9a75d0e3 *vp90-2-00-quantizer-56.webm
d3f93f8272b6de31cffb011a26f11abb514efb12 *vp90-2-00-quantizer-56.webm.md5
f4e8e14b1f278801a7eb6f11734780a01b1668e9 *vp90-2-00-quantizer-57.webm
6478fdf1d7faf6db5f19dffc5e1363af358699ee *vp90-2-00-quantizer-57.webm.md5
307dc264f57cc618fff211fa44d7f52767ed9660 *vp90-2-00-quantizer-58.webm
cf231d4a52d492fa692ea4194ec5eb7511fec54e *vp90-2-00-quantizer-58.webm.md5
1fd7cd596170afce2de0b1441b7674bda5723440 *vp90-2-00-quantizer-59.webm
4681f7ef96f63e085c41bb1a964b0df7e67e0b38 *vp90-2-00-quantizer-59.webm.md5
34cdcc81c0ba7085aefbb22d7b4aa9bca3dd7c62 *vp90-2-00-quantizer-60.webm
58691ef53b6b623810e2c57ded374c77535df935 *vp90-2-00-quantizer-60.webm.md5
e6e812406aab81021bb16e772c1db03f75906cb6 *vp90-2-00-quantizer-61.webm
76436eace62f08ff92b61a0845e66667a027db1b *vp90-2-00-quantizer-61.webm.md5
84d811bceed70c950a6a08e572a6e274866e72b1 *vp90-2-00-quantizer-62.webm
2d937cc011eeddd95222b960982da5cd18db580f *vp90-2-00-quantizer-62.webm.md5
0912b295ba0ea09359315315ffd67d22d046f883 *vp90-2-00-quantizer-63.webm
5a829031055d70565f57dbcd47a6ac33619952b3 *vp90-2-00-quantizer-63.webm.md5
0cf9e5ebe0112bdb47b5887ee5d58eb9d4727c00 *vp90-2-01-sharpness-1.webm
5a0476be4448bae8f8ca17ea236c98793a755948 *vp90-2-01-sharpness-1.webm.md5
51e02d7911810cdf5be8b68ac40aedab479a3179 *vp90-2-01-sharpness-2.webm
a0ca5bc87a5ed7c7051f59078daa0d03be1b45b6 *vp90-2-01-sharpness-2.webm.md5
0603f8ad239c07a531d948187f4dafcaf51eda8d *vp90-2-01-sharpness-3.webm
3af8000a69c72fe77881e3176f026c2affb78cc7 *vp90-2-01-sharpness-3.webm.md5
4ca4839f48146252fb261ed88838d80211804841 *vp90-2-01-sharpness-4.webm
08832a1494f84fa9edd40e080bcf2c0e80100c76 *vp90-2-01-sharpness-4.webm.md5
95099dc8f9cbaf9b9a7dd65311923e441ff70731 *vp90-2-01-sharpness-5.webm
93ceee30c140f0b406726c0d896b9db6031c4c7f *vp90-2-01-sharpness-5.webm.md5
ceb4116fb7b078d266d153233b6d62a255a34e4c *vp90-2-01-sharpness-6.webm
da83efe59e537ce538e8b03a6eac63cf25849c9a *vp90-2-01-sharpness-6.webm.md5
b5f7cd19aece3880f9d616a778e5cc24c6b9b505 *vp90-2-01-sharpness-7.webm
2957408d20deac8633941a2169f801bae6f086e1 *vp90-2-01-sharpness-7.webm.md5
ffc096c2ce1050450ad462b5fabd2a5220846319 *vp90-2-02-size-08x08.webm
e36d2ed6fa2746347710b750586aafa6a01ff3ae *vp90-2-02-size-08x08.webm.md5
895b986f9fd55cd879472b31c6a06b82094418c8 *vp90-2-02-size-08x10.webm
079157a19137ccaebba606f2871f45a397347150 *vp90-2-02-size-08x10.webm.md5
1c5992203e62a2b83040ccbecd748b604e19f4c0 *vp90-2-02-size-08x16.webm
9aa45ffdf2078f883bbed01450031b691819c144 *vp90-2-02-size-08x16.webm.md5
d0a8953da1f85f484487408fee5da9e2a8391901 *vp90-2-02-size-08x18.webm
59a5cc17d354c6a23e5e959d666b1456a5d49c56 *vp90-2-02-size-08x18.webm.md5
1b13461a9fc65cb041bacfe4ea6f02d363397d61 *vp90-2-02-size-08x32.webm
2bdddd6878f05d37d84cde056a3f5e7f926ba3d6 *vp90-2-02-size-08x32.webm.md5
2861f0a0daadb62295b0504a1fbe5b50c79a8f59 *vp90-2-02-size-08x34.webm
6b5812cfb8a82d378ea2913bf009e93668020147 *vp90-2-02-size-08x34.webm.md5
02f948216d4246579dc53c47fe55d8fb264ba251 *vp90-2-02-size-08x64.webm
84b55fdee6d9aa820c7a8c62822446184b191767 *vp90-2-02-size-08x64.webm.md5
4b011242cbf42516efd2b197baebb61dd34562c9 *vp90-2-02-size-08x66.webm
6b1fa0a885947b3cc0fe58f75f838e662bd9bb8b *vp90-2-02-size-08x66.webm.md5
4057796be9dd12df48ab607f502ae6aa70eeeab6 *vp90-2-02-size-10x08.webm
71c752c51aec9f48de286b93f4c20e9c11cad7d0 *vp90-2-02-size-10x08.webm.md5
6583c853fa43fc53d51743eac5f3a43a359d45d0 *vp90-2-02-size-10x10.webm
1da524d24af1944b671d4d3f2b398d6e336584c3 *vp90-2-02-size-10x10.webm.md5
ba442fc03ccd3a705c64c83b36f5ada67d198874 *vp90-2-02-size-10x16.webm
7cfd960f232c34c641a4a2a9411b6fd0efb2fc50 *vp90-2-02-size-10x16.webm.md5
cc92ed40eef14f52e4d080cb2c57939dd8326374 *vp90-2-02-size-10x18.webm
db5626275cc55ce970b91c995e74f6838d943aca *vp90-2-02-size-10x18.webm.md5
3a93d501d22325e9fd4c9d8b82e2a432de33c351 *vp90-2-02-size-10x32.webm
5cae51b0c71cfc131651f345f87583eb2903afaf *vp90-2-02-size-10x32.webm.md5
50d2f2b15a9a5178153db44a9e03aaf32b227f67 *vp90-2-02-size-10x34.webm
bb0efe058122641e7f73e94497dda2b9e6c21efd *vp90-2-02-size-10x34.webm.md5
01624ec173e533e0b33fd9bdb91eb7360c7c9175 *vp90-2-02-size-10x64.webm
b9c0e3b054463546356acf5157f9be92fd34732f *vp90-2-02-size-10x64.webm.md5
2942879baf1c09e96b14d0fc84806abfe129c706 *vp90-2-02-size-10x66.webm
bab5f539c2f91952e187456b4beafbb4c01e25ee *vp90-2-02-size-10x66.webm.md5
88d2b63ca5e9ee163d8f20e8886f3df3ff301a66 *vp90-2-02-size-16x08.webm
7f48a0fcf8c25963f3057d7f6669c5f2415834b8 *vp90-2-02-size-16x08.webm.md5
59261eb34c15ea9b5ddd2d416215c1a8b9e6dc1f *vp90-2-02-size-16x10.webm
73a7c209a46dd051c9f7339b6e02ccd5b3b9fc81 *vp90-2-02-size-16x10.webm.md5
066834fef9cf5b9a72932cf4dea5f253e14a976d *vp90-2-02-size-16x16.webm
faec542f52f37601cb9c480d887ae9355be99372 *vp90-2-02-size-16x16.webm.md5
195307b4eb3192271ee4a935b0e48deef0c54cc2 *vp90-2-02-size-16x18.webm
5a92e19e624c0376321d4d0e22c0c91995bc23e1 *vp90-2-02-size-16x18.webm.md5
14f3f884216d7ae16ec521f024a2f2d31bbf9c1a *vp90-2-02-size-16x32.webm
ea622d1c817dd174556f7ee7ccfe4942b34d4845 *vp90-2-02-size-16x32.webm.md5
2e0501100578a5da9dd47e4beea160f945bdd1ba *vp90-2-02-size-16x34.webm
1b8645ef64239334921c5f56b24ce815e6070b05 *vp90-2-02-size-16x34.webm.md5
89a6797fbebebe93215f367229a9152277f5dcfe *vp90-2-02-size-16x64.webm
a03d8c1179ca626a8856fb416d635dbf377979cd *vp90-2-02-size-16x64.webm.md5
0f3a182e0750fcbae0b9eae80c7a53aabafdd18d *vp90-2-02-size-16x66.webm
8cb6736dc2d897c1283919a32068af377d66c59c *vp90-2-02-size-16x66.webm.md5
68fe70dc7914cc1d8d6dcd97388b79196ba3e7f1 *vp90-2-02-size-18x08.webm
874c7fb505be9db3160c57cb405c4dbd5b990dc2 *vp90-2-02-size-18x08.webm.md5
0546352dd78496d4dd86c3727ac2ff36c9e72032 *vp90-2-02-size-18x10.webm
1d80eb36557ea5f25a386495a36f93da0f25316b *vp90-2-02-size-18x10.webm.md5
60fe99e5f5cc99706efa3e0b894e45cbcf0d6330 *vp90-2-02-size-18x16.webm
1ab6cdd89a53662995d103546e6611c84f9292ab *vp90-2-02-size-18x16.webm.md5
f9a8f5fb749d69fd555db6ca093b7f77800c7b4f *vp90-2-02-size-18x18.webm
ace8a66328f7802b15f9989c2720c029c6abd279 *vp90-2-02-size-18x18.webm.md5
a197123a527ec25913a9bf52dc8c347749e00045 *vp90-2-02-size-18x32.webm
34fbd7036752232d1663e70d7f7cdc93f7129202 *vp90-2-02-size-18x32.webm.md5
f219655a639a774a2c9c0a9f45c28dc0b5e75e24 *vp90-2-02-size-18x34.webm
2c4d622a9ea548791c1a07903d3702e9774388bb *vp90-2-02-size-18x34.webm.md5
5308578da48c677d477a5404e19391d1303033c9 *vp90-2-02-size-18x64.webm
e7fd4462527bac38559518ba80e41847db880f15 *vp90-2-02-size-18x64.webm.md5
e109a7e013bd179f97e378542e1e81689ed06802 *vp90-2-02-size-18x66.webm
45c04e422fb383c1f3be04beefaa4490e83bdb1a *vp90-2-02-size-18x66.webm.md5
38844cae5d99caf445f7de33c3ae78494ce36c01 *vp90-2-02-size-32x08.webm
ad018be39e493ca2405225034b1a5b7a42af6f3a *vp90-2-02-size-32x08.webm.md5
7b57eaad55906f9de9903c8657a3fcb2aaf792ea *vp90-2-02-size-32x10.webm
2294425d4e55d275af5e25a0beac9738a1b4ee73 *vp90-2-02-size-32x10.webm.md5
f47ca2ced0d47f761bb0a5fdcd911d3f450fdcc1 *vp90-2-02-size-32x16.webm
ae10981d93913f0ab1f28c1146255e01769aa8c0 *vp90-2-02-size-32x16.webm.md5
08b23ad838b6cf1fbfe3ad7e7775d95573e815fc *vp90-2-02-size-32x18.webm
1ba76f4c4a4ac7aabfa3ce195c1b473535eb7cc8 *vp90-2-02-size-32x18.webm.md5
d5b88ae6c8c25c53dee74d9f1e6ca64244349a57 *vp90-2-02-size-32x32.webm
e39c067a8ee2da52a51641eb1cb7f8eba935eb6b *vp90-2-02-size-32x32.webm.md5
529429920dc36bd899059fa75a767f02c8c60874 *vp90-2-02-size-32x34.webm
56888e7834f52b106e8911e3a7fc0f473b609995 *vp90-2-02-size-32x34.webm.md5
38e848e160391c2b1a55040aadde613b9f4bf15e *vp90-2-02-size-32x64.webm
8950485fb3f68b0e8be234db860e4ec5f5490fd0 *vp90-2-02-size-32x64.webm.md5
5e8670f0b8ec9cefa8795b8959ffbe1a8e1aea94 *vp90-2-02-size-32x66.webm
225df9d7d72ec711b0b60f4aeb65311c97db054a *vp90-2-02-size-32x66.webm.md5
695f929e2ce6fb11a1f180322d46c5cb1c97fa61 *vp90-2-02-size-34x08.webm
5bb4262030018dd01883965c6aa6070185924ef6 *vp90-2-02-size-34x08.webm.md5
5adf74ec906d2ad3f7526e06bd29f5ad7d966a90 *vp90-2-02-size-34x10.webm
71c100b437d3e8701632ae8d65c3555339b1c68f *vp90-2-02-size-34x10.webm.md5
d0918923c987fba2d00193d83797b21289fe54aa *vp90-2-02-size-34x16.webm
5d5a52f3535b4d2698dd3d87f4a13fdc9b57163d *vp90-2-02-size-34x16.webm.md5
553ab0042cf87f5e668ec31b2e4b2a4b6ec196fd *vp90-2-02-size-34x18.webm
a164c7f3c424987df2340496e6a8cf76e973f0f1 *vp90-2-02-size-34x18.webm.md5
baf3e233634f150de81c18ba5d8848068e1c3c54 *vp90-2-02-size-34x32.webm
22a79d3bd1c9b85dfe8c70bb2e19f08a92a8be03 *vp90-2-02-size-34x32.webm.md5
6d50a533774a7167350e4a7ef43c94a5622179a2 *vp90-2-02-size-34x34.webm
0c099638e79c273546523e06704553e42eb00b00 *vp90-2-02-size-34x34.webm.md5
698cdd0a5e895cc202c488675e682a8c537ede4f *vp90-2-02-size-34x64.webm
9317b63987cddab8389510a27b86f9f3d46e3fa5 *vp90-2-02-size-34x64.webm.md5
4b5335ca06f082b6b69f584eb8e7886bdcafefd3 *vp90-2-02-size-34x66.webm
e18d68b35428f46a84a947c646804a51ef1d7cec *vp90-2-02-size-34x66.webm.md5
a54ae7b494906ec928a876e8290e5574f2f9f6a2 *vp90-2-02-size-64x08.webm
87f9f7087b6489d45e9e4b38ede2c5aef4a4928f *vp90-2-02-size-64x08.webm.md5
24522c70804a3c23d937df2d829ae63965b23f38 *vp90-2-02-size-64x10.webm
447ce03938ab53bffcb4a841ee0bfaa90462dcb9 *vp90-2-02-size-64x10.webm.md5
2a5035d035d214ae614af8051930690ef623989b *vp90-2-02-size-64x16.webm
84e355761dd2e0361b904c84c52a0dd0384d89cf *vp90-2-02-size-64x16.webm.md5
3a293ef4e270a19438e59b817fbe5f43eed4d36b *vp90-2-02-size-64x18.webm
666824e5ba746779eb46079e0631853dcc86d48b *vp90-2-02-size-64x18.webm.md5
ed32fae837095c9e8fc95d223ec68101812932c2 *vp90-2-02-size-64x32.webm
97086eadedce1d0d9c072b585ba7b49aec69b1e7 *vp90-2-02-size-64x32.webm.md5
696c7a7250bdfff594f4dfd88af34239092ecd00 *vp90-2-02-size-64x34.webm
253a1d38d452e7826b086846c6f872f829c276bb *vp90-2-02-size-64x34.webm.md5
fc508e0e3c2e6872c60919a60b812c5232e9c2b0 *vp90-2-02-size-64x64.webm
2cd6ebeca0f82e9f505616825c07950371b905ab *vp90-2-02-size-64x64.webm.md5
0f8a4fc1d6521187660425c283f08dff8c66e476 *vp90-2-02-size-64x66.webm
5806be11a1d346be235f88d3683e69f73746166c *vp90-2-02-size-64x66.webm.md5
273b0c36e3658685cde250408a478116d7ae92f1 *vp90-2-02-size-66x08.webm
23c3cd0dca20a2f71f036e77ea92025ff4e7a298 *vp90-2-02-size-66x08.webm.md5
4844c59c3306d1e671bb0568f00e344bf797e66e *vp90-2-02-size-66x10.webm
e041eaf6841d775f8fde8bbb4949d2733fdaab7f *vp90-2-02-size-66x10.webm.md5
bdf3f1582b234fcd2805ffec59f9d716a2345302 *vp90-2-02-size-66x16.webm
2ec85ee18119e6798968571ea6e1b93ca386e3af *vp90-2-02-size-66x16.webm.md5
0acce9af12b13b025d5274013da7ef6f568f075f *vp90-2-02-size-66x18.webm
77c4d53e2a5c96b70af9d575fe6811e0f5ee627b *vp90-2-02-size-66x18.webm.md5
682b36a25774bbdedcd603f504d18eb63f0167d4 *vp90-2-02-size-66x32.webm
53728fae2a428f16d376a29f341a64ddca97996a *vp90-2-02-size-66x32.webm.md5
e71b70e901e29eaa6672a6aa4f37f6f5faa02bd6 *vp90-2-02-size-66x34.webm
f69a6a555e3f614b0a35f9bfc313d8ebb35bc725 *vp90-2-02-size-66x34.webm.md5
4151b8c29452d5c2266397a7b9bf688899a2937b *vp90-2-02-size-66x64.webm
69486e7fd9e380b6c97a03d3e167affc79f73840 *vp90-2-02-size-66x64.webm.md5
68784a1ecac776fe2a3f230345af32f06f123536 *vp90-2-02-size-66x66.webm
7f008c7f48d55e652fbd6bac405b51e0015c94f2 *vp90-2-02-size-66x66.webm.md5
7e1bc449231ac1c5c2a11c9a6333b3e828763798 *vp90-2-03-size-196x196.webm
6788a561466dace32d500194bf042e19cccc35e1 *vp90-2-03-size-196x196.webm.md5
a170c9a88ec1dd854c7a471ff55fb2a97ac31870 *vp90-2-03-size-196x198.webm
6bf9d6a8e2bdc5bf4f8a78071a3fed5ca02ad6f2 *vp90-2-03-size-196x198.webm.md5
68f861d21c4c8b03d572c3d3fcd9f4fbf1f4503f *vp90-2-03-size-196x200.webm
bbfc260b2bfd872cc6054272bb6b7f959a9e1c6e *vp90-2-03-size-196x200.webm.md5
fc34889feeca2b7e5b27b4f1ce22d2e2b8e3e4b1 *vp90-2-03-size-196x202.webm
158ee72af578f39aad0c3b8f4cbed2fc78b57e0f *vp90-2-03-size-196x202.webm.md5
dd28fb7247af534bdf5e6795a3ac429610489a0b *vp90-2-03-size-196x208.webm
7546be847efce2d1c0a23f807bfb03f91b764e1e *vp90-2-03-size-196x208.webm.md5
41d5cf5ed65b722a1b6dc035e67f978ea8ffecf8 *vp90-2-03-size-196x210.webm
9444fdf632d6a1b6143f4cb10fed8f63c1d67ec1 *vp90-2-03-size-196x210.webm.md5
5007bc618143437c009d6dde5fc2e86f72d37dc2 *vp90-2-03-size-196x224.webm
858361d8f79b44df5545feabbc9754ec9ede632f *vp90-2-03-size-196x224.webm.md5
0bcbe357fbc776c3fa68e7117179574ed7564a44 *vp90-2-03-size-196x226.webm
72006a5f42031a43d70a2cd9fc1958962a86628f *vp90-2-03-size-196x226.webm.md5
000239f048cceaac055558e97ef07078ebf65502 *vp90-2-03-size-198x196.webm
2d6841901b72000c5340f30be602853438c1b787 *vp90-2-03-size-198x196.webm.md5
ae75b766306a6404c3b3b35a6b6d53633c14fbdb *vp90-2-03-size-198x198.webm
3f2544b4f3b4b643a98f2c3b15ea5826fc702fa1 *vp90-2-03-size-198x198.webm.md5
95ffd573fa84ccef1cd59e1583e6054f56a5c83d *vp90-2-03-size-198x200.webm
5d537e3c9b9c54418c79677543454c4cda3de1af *vp90-2-03-size-198x200.webm.md5
ecc845bf574375f469bc91bf5c75c79dc00073d6 *vp90-2-03-size-198x202.webm
1b59f5e111265615a7a459eeda8cc9045178d228 *vp90-2-03-size-198x202.webm.md5
432fb27144fe421b9f51cf44d2750a26133ed585 *vp90-2-03-size-198x208.webm
a58a67f4fb357c73ca078aeecbc0f782975630b1 *vp90-2-03-size-198x208.webm.md5
ff5058e7e6a47435046612afc8536f2040989e6f *vp90-2-03-size-198x210.webm
18d3be7935e52217e2e9400b6f2c681a9e45dc89 *vp90-2-03-size-198x210.webm.md5
a0d55263c1ed2c03817454dd4ec4090d36dbc864 *vp90-2-03-size-198x224.webm
efa366a299817e2da51c00623b165aab9fbb8d91 *vp90-2-03-size-198x224.webm.md5
ccd142fa2920fc85bb753f049160c1c353ad1574 *vp90-2-03-size-198x226.webm
534524a0b2dbff852e0b92ef09939db072f83243 *vp90-2-03-size-198x226.webm.md5
0d483b94ed40abc8ab6e49f960432ee54ad9c7f1 *vp90-2-03-size-200x196.webm
41795f548181717906e7a504ba551f06c32102ae *vp90-2-03-size-200x196.webm.md5
f6c2dc54e0989d50f01333fe40c91661fcbf849a *vp90-2-03-size-200x198.webm
43df5d8c46a40089441392e6d096c588c1079a68 *vp90-2-03-size-200x198.webm.md5
2f6e9df82e44fc145f0d9212dcccbed3de605e23 *vp90-2-03-size-200x200.webm
757b2ef96b82093255725bab9690bbafe27f3caf *vp90-2-03-size-200x200.webm.md5
40c5ea60415642a4a2e75c0d127b06309baadfab *vp90-2-03-size-200x202.webm
3022c4a1c625b5dc04fdb1052d17d45b4171cfba *vp90-2-03-size-200x202.webm.md5
6942ed5b27476bb8506d10e600d6ff60887780ca *vp90-2-03-size-200x208.webm
c4ab8c66f3cf2dc8e8dd7abae9ac21f4d32cd6be *vp90-2-03-size-200x208.webm.md5
71dbc99b83c49d1da45589b91eabb98e2f4a7b1e *vp90-2-03-size-200x210.webm
3f0b40da7eef7974b9bc326562f251feb67d9c7c *vp90-2-03-size-200x210.webm.md5
6b6b8489081cfefb377cc5f18eb754ec2383f655 *vp90-2-03-size-200x224.webm
a259df2ac0e294492e3f9d4315baa34cab044f04 *vp90-2-03-size-200x224.webm.md5
c9adc1c9bb07559349a0b054df4af56f7a6edbb9 *vp90-2-03-size-200x226.webm
714cec61e3575581e4f1a0e3921f4dfdbbd316c5 *vp90-2-03-size-200x226.webm.md5
f9bdc936bdf53f8be9ce78fecd41a21d31ff3943 *vp90-2-03-size-202x196.webm
5b8e2e50fcea2c43b12fc067b8a9cc117af77bda *vp90-2-03-size-202x196.webm.md5
c7b66ea3da87613deb47ff24a111247d3c384fec *vp90-2-03-size-202x198.webm
517e91204b25586da943556f4adc5951c9be8bee *vp90-2-03-size-202x198.webm.md5
935ef56b01cfdb4265a7e24696645209ccb20970 *vp90-2-03-size-202x200.webm
55b8ec4a2513183144a8e27564596c06c7576fce *vp90-2-03-size-202x200.webm.md5
849acf75e4f1d8d90046704e1103a18c64f30e35 *vp90-2-03-size-202x202.webm
c79afc6660df2824e7df314e5bfd71f0d8acf76b *vp90-2-03-size-202x202.webm.md5
17b3a4d55576b770626ccb856b9f1a6c8f6ae476 *vp90-2-03-size-202x208.webm
0b887ff30409c58f2ccdc3bfacd6be7c69f8997a *vp90-2-03-size-202x208.webm.md5
032d0ade4230fb2eef6d19915a7a1c9aa4a52617 *vp90-2-03-size-202x210.webm
f78f8e79533c0c88dd2bfdcec9b1c07848568ece *vp90-2-03-size-202x210.webm.md5
915a38c31fe425d5b93c837121cfa8082f5ea5bc *vp90-2-03-size-202x224.webm
bf52a104074d0c5942aa7a5b31e11db47e43d48e *vp90-2-03-size-202x224.webm.md5
be5cfde35666fa435e47d544d9258215beb1cf29 *vp90-2-03-size-202x226.webm
2fa2f87502fda756b319389c8975204e130a2e3f *vp90-2-03-size-202x226.webm.md5
15d908e97862b5b4bf295610df011fb9aa09909b *vp90-2-03-size-208x196.webm
50c60792305d6a99be376dd596a6ff979325e6cc *vp90-2-03-size-208x196.webm.md5
a367c7bc9fde56d6f4848cc573c7d4c1ce75e348 *vp90-2-03-size-208x198.webm
be85fb2c8d435a75484231356f07d06ebddd13cd *vp90-2-03-size-208x198.webm.md5
05fd46deb7288e7253742091f56e54a9a441a187 *vp90-2-03-size-208x200.webm
74f8ec3b3a2fe81767ed1ab36a47bc0062d6223c *vp90-2-03-size-208x200.webm.md5
d8985c4b386513a7385a4b3639bf91e469f1378b *vp90-2-03-size-208x202.webm
0614a1e8d92048852adcf605a51333f5fabc7f03 *vp90-2-03-size-208x202.webm.md5
28b002242238479165ba4fb87ee6b442c64b32e4 *vp90-2-03-size-208x208.webm
37de5aca59bb900228400b0e115d3229edb9dcc0 *vp90-2-03-size-208x208.webm.md5
c545be0050c2fad7c68427dbf86c62a739e94ab3 *vp90-2-03-size-208x210.webm
d646eccb3cd578f94b54777e32b88898bef6e17a *vp90-2-03-size-208x210.webm.md5
63a0cfe295b661026dd7b1bebb67acace1db766f *vp90-2-03-size-208x224.webm
85c0361d93bf85a335248fef2767ff43eeef23db *vp90-2-03-size-208x224.webm.md5
f911cc718d66e4fe8a865226088939c9eb1b7825 *vp90-2-03-size-208x226.webm
a6d583a57876e7b7ec48625b2b2cdbcf70cab837 *vp90-2-03-size-208x226.webm.md5
5bbb0f36da9a4683cf04e724124d8696332911bf *vp90-2-03-size-210x196.webm
a3580fc7816d7fbcfb54fdba501cabbd06ba2f1d *vp90-2-03-size-210x196.webm.md5
8db64d6f9ce36dd382013b42ae4e292deba697bc *vp90-2-03-size-210x198.webm
eda20f8268c7f4147bead4059e9c4897e09140a9 *vp90-2-03-size-210x198.webm.md5
ce391505eeaf1d12406563101cd6b2dbbbb44bfc *vp90-2-03-size-210x200.webm
79d73b7f623082d2a00aa33e95c79d11c7d9c3a8 *vp90-2-03-size-210x200.webm.md5
852db6fdc206e72391fc69b807f1954934679949 *vp90-2-03-size-210x202.webm
f69414c5677ed2f2b8b37ae76429e509a92276a5 *vp90-2-03-size-210x202.webm.md5
c424cc3edd2308da7d33f27acb36b54db5bf2595 *vp90-2-03-size-210x208.webm
27b18562faa1b3184256f4eae8114b539b3e9d3e *vp90-2-03-size-210x208.webm.md5
dd029eba719d50a2851592fa8b9b2efe88904930 *vp90-2-03-size-210x210.webm
c853a1670465eaa04ca31b3511995f1b6ed4f58f *vp90-2-03-size-210x210.webm.md5
d962e8ae676c54d0c3ea04ec7c04b37ae6a786e3 *vp90-2-03-size-210x224.webm
93b793e79d987065b39ad8e2e71244368435fc25 *vp90-2-03-size-210x224.webm.md5
3d0825fe83bcc125be1f78145ff43ca6d7588784 *vp90-2-03-size-210x226.webm
5230f31a57ca3b5311698a12035d2644533b3ec4 *vp90-2-03-size-210x226.webm.md5
6622f8bd9279e1ce45509a58a31a990052d45e14 *vp90-2-03-size-224x196.webm
65411da07f60113f2be05c807879072b161d561e *vp90-2-03-size-224x196.webm.md5
6744ff2ee2c41eb08c62ff30880833b6d77b585b *vp90-2-03-size-224x198.webm
46ea3641d41acd4bff347b224646c060d5620385 *vp90-2-03-size-224x198.webm.md5
8eb91f3416a1404705f370caecd74b2b458351b1 *vp90-2-03-size-224x200.webm
196aefb854c8b95b9330263d6690b7ee15693ecf *vp90-2-03-size-224x200.webm.md5
256a5a23ef4e6d5ef2871af5afb8cd13d28cec00 *vp90-2-03-size-224x202.webm
840ad8455dcf2be378c14b007e66fa642fc8196d *vp90-2-03-size-224x202.webm.md5
db4606480ab48b96c9a6ff5e639f1f1aea2a12e4 *vp90-2-03-size-224x208.webm
40b9801d5620467499ac70fa6b7c40aaa5e1c331 *vp90-2-03-size-224x208.webm.md5
e37159e687fe1cb24cffddfae059301adbaf4212 *vp90-2-03-size-224x210.webm
1e4acd4b6334ae260c3eed08652d0ba8122073f2 *vp90-2-03-size-224x210.webm.md5
0de1eb4bb6285ae621e4f2b613d2aa4a8c95a130 *vp90-2-03-size-224x224.webm
37db449ad86fb286c2c02d94aa8fe0379c05044a *vp90-2-03-size-224x224.webm.md5
32ebbf903a7d7881bcfe59639f1d472371f3bf27 *vp90-2-03-size-224x226.webm
5cc3ac5dc9f6912491aa2ddac863f8187f34c569 *vp90-2-03-size-224x226.webm.md5
9480ff5c2c32b1870ac760c87514912616e6cf01 *vp90-2-03-size-226x196.webm
fe83655c0f1888f0af7b047785f01ba7ca9f1324 *vp90-2-03-size-226x196.webm.md5
09cad4221996315cdddad4e502dbfabf53ca1d6a *vp90-2-03-size-226x198.webm
e3ddfdc650acb95adb45abd9b634e1f09ea8ac96 *vp90-2-03-size-226x198.webm.md5
c34f49d55fe39e3f0b607e3cc95e30244225cecb *vp90-2-03-size-226x200.webm
abb83edc868a3523ccd4e5523fac2efbe7c3df1f *vp90-2-03-size-226x200.webm.md5
d17bc08eedfc60c4c23d576a6c964a21bf854d1f *vp90-2-03-size-226x202.webm
1d22d2d0f375251c2d5a1acb4714bc35d963865b *vp90-2-03-size-226x202.webm.md5
9bd537c4f92a25596ccd29fedfe181feac948b92 *vp90-2-03-size-226x208.webm
6feb0e7325386275719f3511ada9e248a2ae7df4 *vp90-2-03-size-226x208.webm.md5
4487067f6cedd495b93696b44b37fe0a3e7eda14 *vp90-2-03-size-226x210.webm
49a8fa87945f47208168d541c068e78d878075d5 *vp90-2-03-size-226x210.webm.md5
559fea2f8da42b33c1aa1dbc34d1d6781009847a *vp90-2-03-size-226x224.webm
83c6d8f2969b759e10e5c6542baca1265c874c29 *vp90-2-03-size-226x224.webm.md5
fe0af2ee47b1e5f6a66db369e2d7e9d870b38dce *vp90-2-03-size-226x226.webm
94ad19b8b699cea105e2ff18f0df2afd7242bcf7 *vp90-2-03-size-226x226.webm.md5
52bc1dfd3a97b24d922eb8a31d07527891561f2a *vp90-2-03-size-352x288.webm
3084d6d0a1eec22e85a394422fbc8faae58930a5 *vp90-2-03-size-352x288.webm.md5
b6524e4084d15b5d0caaa3d3d1368db30cbee69c *vp90-2-03-deltaq.webm
65f45ec9a55537aac76104818278e0978f94a678 *vp90-2-03-deltaq.webm.md5
4dbb87494c7f565ffc266c98d17d0d8c7a5c5aba *vp90-2-05-resize.ivf
7f6d8879336239a43dbb6c9f13178cb11cf7ed09 *vp90-2-05-resize.ivf.md5
bf61ddc1f716eba58d4c9837d4e91031d9ce4ffe *vp90-2-06-bilinear.webm
f6235f937552e11d8eb331ec55da6b3aa596b9ac *vp90-2-06-bilinear.webm.md5
0c83a1e414fde3bccd6dc451bbaee68e59974c76 *vp90-2-07-frame_parallel.webm
e5c2c9fb383e5bf3b563480adaeba5b7e3475ecd *vp90-2-07-frame_parallel.webm.md5
086c7edcffd699ae7d99d710fd7e53b18910ca5b *vp90-2-08-tile_1x2_frame_parallel.webm
e981ecaabb29a80e0cbc1f4002384965ce8e95bb *vp90-2-08-tile_1x2_frame_parallel.webm.md5
ed79be026a6f28646c5825da1c12d1fbc70f96a4 *vp90-2-08-tile_1x2.webm
45b404e025841c9750895fc1a9f6bd384fe6a315 *vp90-2-08-tile_1x2.webm.md5
cf8ea970c776797aae71dac8317ea926d9431cab *vp90-2-08-tile_1x4_frame_parallel.webm
a481fbea465010b57af5a19ebf6d4a5cfe5b9278 *vp90-2-08-tile_1x4_frame_parallel.webm.md5
0203ec456277a01aec401e7fb6c72c9a7e5e3f9d *vp90-2-08-tile_1x4.webm
c9b237dfcc01c1b414fbcaa481d014a906ef7998 *vp90-2-08-tile_1x4.webm.md5
20c75157e91ab41f82f70ffa73d5d01df8469287 *vp90-2-08-tile-4x4.webm
ae7451810247fd13975cc257aa0301ff17102255 *vp90-2-08-tile-4x4.webm.md5
2ec6e15422ac7a61af072dc5f27fcaf1942ce116 *vp90-2-08-tile-4x1.webm
0094f5ee5e46345017c30e0aa4835b550212d853 *vp90-2-08-tile-4x1.webm.md5
edea45dac4a3c2e5372339f8851d24c9bef803d6 *vp90-2-09-subpixel-00.ivf
5428efc4bf92191faedf4a727fcd1d94966a7abc *vp90-2-09-subpixel-00.ivf.md5
8cdd435d89029987ee196896e21520e5f879f04d *vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm
091b373aa2ecb59aa5c647affd5bcafcc7547364 *vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm
87ee28032b0963a44b73a850fcc816a6dc83efbb *vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm
c6ce25c4bfd4bdfc2932b70428e3dfe11210ec4f *vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm
2064bdb22aa71c2691e0469fb62e8087a43f08f8 *vp90-2-bbb_426x240_tile_1x1_180kbps.webm
8080eda22694910162f0996e8a962612f381a57f *vp90-2-bbb_640x360_tile_1x2_337kbps.webm
a484b335c27ea189c0f0d77babea4a510ce12d50 *vp90-2-bbb_854x480_tile_1x2_651kbps.webm
3eacf1f006250be4cc5c92a7ef146e385ee62653 *vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm
217f089a16447490823127b36ce0d945522accfd *vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm
eedb3c641e60dacbe082491a16df529a5c9187df *vp90-2-sintel_426x182_tile_1x1_171kbps.webm
cb7e4955af183dff33bcba0c837f0922ab066400 *vp90-2-sintel_640x272_tile_1x2_318kbps.webm
48613f9380e2580002f8a09d6e412ea4e89a52b9 *vp90-2-sintel_854x364_tile_1x2_621kbps.webm
990a91f24dd284562d21d714ae773dff5452cad8 *vp90-2-tos_1280x534_tile_1x4_1306kbps.webm
aa402217577a659cfc670157735b4b8e9aa670fe *vp90-2-tos_1280x534_tile_1x4_fpm_952kbps.webm
b6dd558c90bca466b4bcbd03b3371648186465a7 *vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm
1a9c2914ba932a38f0a143efc1ad0e318e78888b *vp90-2-tos_426x178_tile_1x1_181kbps.webm
a3d2b09f24debad4747a1b3066f572be4273bced *vp90-2-tos_640x266_tile_1x2_336kbps.webm
c64b03b5c090e6888cb39685c31f00a6b79fa45c *vp90-2-tos_854x356_tile_1x2_656kbps.webm
94b533dbcf94292001e27cc51fec87f9e8c90c0b *vp90-2-tos_854x356_tile_1x2_fpm_546kbps.webm
0e7cd4135b231c9cea8d76c19f9e84b6fd77acec *vp90-2-08-tile_1x8_frame_parallel.webm
c9b6850af28579b031791066457f4cb40df6e1c7 *vp90-2-08-tile_1x8_frame_parallel.webm.md5
e448b6e83490bca0f8d58b4f4b1126a17baf4b0c *vp90-2-08-tile_1x8.webm
5e524165f0397e6141d914f4f0a66267d7658376 *vp90-2-08-tile_1x8.webm.md5
a34e14923d6d17b1144254d8187d7f85b700a63c *vp90-2-02-size-lf-1920x1080.webm
e3b28ddcfaeb37fb4d132b93f92642a9ad17c22d *vp90-2-02-size-lf-1920x1080.webm.md5
d48c5db1b0f8e60521a7c749696b8067886033a3 *vp90-2-09-aq2.webm
84c1599298aac78f2fc05ae2274575d10569dfa0 *vp90-2-09-aq2.webm.md5
55fc55ed73d578ed60fad05692579873f8bad758 *vp90-2-09-lf_deltas.webm
54638c38009198c38c8f3b25c182b709b6c1fd2e *vp90-2-09-lf_deltas.webm.md5
510d95f3beb3b51c572611fdaeeece12277dac30 *vp90-2-10-show-existing-frame.webm
14d631096f4bfa2d71f7f739aec1448fb3c33bad *vp90-2-10-show-existing-frame.webm.md5
d2feea7728e8d2c615981d0f47427a4a5a45d881 *vp90-2-10-show-existing-frame2.webm
5f7c7811baa3e4f03be1dd78c33971b727846821 *vp90-2-10-show-existing-frame2.webm.md5
b4318e75f73a6a08992c7326de2fb589c2a794c7 *vp90-2-11-size-351x287.webm
b3c48382cf7d0454e83a02497c229d27720f9e20 *vp90-2-11-size-351x287.webm.md5
8e0096475ea2535bac71d3e2fc09e0c451c444df *vp90-2-11-size-351x288.webm
19e003804ec1dfc5464813b32339a15d5ba7b42f *vp90-2-11-size-351x288.webm.md5
40cd1d6a188d7a88b21ebac1e573d3f270ab261e *vp90-2-11-size-352x287.webm
68f515abe3858fc1eded46c8e6b2f727d43b5331 *vp90-2-11-size-352x287.webm.md5
9a510769ff23db410880ec3029d433e87d17f7fc *vp90-2-12-droppable_1.ivf
952eaac6eefa6f62179ed1db3e922fd42fecc624 *vp90-2-12-droppable_1.ivf.md5
9a510769ff23db410880ec3029d433e87d17f7fc *vp90-2-12-droppable_2.ivf
92a756469fa438220524e7fa6ac1d38c89514d17 *vp90-2-12-droppable_2.ivf.md5
c21e97e4ba486520118d78b01a5cb6e6dc33e190 *vp90-2-12-droppable_3.ivf
601abc9e4176c70f82ac0381365e9b151fdd24cd *vp90-2-12-droppable_3.ivf.md5
61c640dad23cd4f7ad811b867e7b7e3521f4e3ba *vp90-2-13-largescaling.webm
bca1b02eebdb088fa3f389fe0e7571e75a71f523 *vp90-2-13-largescaling.webm.md5
c740708fa390806eebaf669909c1285ab464f886 *vp90-2-14-resize-fp-tiles-1-2.webm
c7b85ffd8e11500f73f52e7dc5a47f57c393d47f *vp90-2-14-resize-fp-tiles-1-2.webm.md5
ec8faa352a08f7033c60f29f80d505e2d7daa103 *vp90-2-14-resize-fp-tiles-1-4.webm
6852c783fb421bda5ded3d4c5a3ffc46de03fbc1 *vp90-2-14-resize-fp-tiles-1-4.webm.md5
8af61853ac0d07c4cb5bf7c2016661ba350b3497 *vp90-2-14-resize-fp-tiles-1-8.webm
571353bac89fea60b5706073409aa3c0d42aefe9 *vp90-2-14-resize-fp-tiles-1-8.webm.md5
b1c187ed69931496b82ec194017a79831bafceef *vp90-2-14-resize-fp-tiles-1-16.webm
1c199a41afe42ce303944d70089eaaa2263b4a09 *vp90-2-14-resize-fp-tiles-1-16.webm.md5
8eaae5a6f2dff934610b0c7a917d7f583ba74aa5 *vp90-2-14-resize-fp-tiles-2-1.webm
db18fcf915f7ffaea6c39feab8bda6c1688af011 *vp90-2-14-resize-fp-tiles-2-1.webm.md5
bc3046d138941e2a20e9ceec0ff6d25c25d12af3 *vp90-2-14-resize-fp-tiles-4-1.webm
393211b808030d09a79927b17a4374b2f68a60ae *vp90-2-14-resize-fp-tiles-4-1.webm.md5
6e8f8e31721a0f7f68a2964e36e0e698c2e276b1 *vp90-2-14-resize-fp-tiles-8-1.webm
491fd3cd78fb0577bfe905bb64bbf64bd7d29140 *vp90-2-14-resize-fp-tiles-8-1.webm.md5
cc5958da2a7edf739cd2cfeb18bd05e77903087e *vp90-2-14-resize-fp-tiles-16-1.webm
0b58daf55aaf9063bf5b4fb33393d18b417dc428 *vp90-2-14-resize-fp-tiles-16-1.webm.md5
821eeecc9d8c6a316134dd42d1ff057787d8047b *vp90-2-14-resize-fp-tiles-2-4.webm
374c549f2839a3d0b732c4e3650700144037e76c *vp90-2-14-resize-fp-tiles-2-4.webm.md5
dff8c8e49aacea9f4c7f22cb882da984e2a1b405 *vp90-2-14-resize-fp-tiles-2-8.webm
e5b8820a7c823b21297d6e889e57ec401882c210 *vp90-2-14-resize-fp-tiles-2-8.webm.md5
77629e4b23e32896aadf6e994c78bd4ffa1c7797 *vp90-2-14-resize-fp-tiles-2-16.webm
1937f5df032664ac345d4613ad4417b4967b1230 *vp90-2-14-resize-fp-tiles-2-16.webm.md5
380ba5702bb1ec7947697314ab0300b5c56a1665 *vp90-2-14-resize-fp-tiles-4-2.webm
fde7b30d2aa64c1e851a4852f655d79fc542cf66 *vp90-2-14-resize-fp-tiles-4-2.webm.md5
dc784b258ffa2abc2ae693d11792acf0bb9cb74f *vp90-2-14-resize-fp-tiles-8-2.webm
edf26f0130aeee8342d49c2c8f0793ad008782d9 *vp90-2-14-resize-fp-tiles-8-2.webm.md5
8e575789fd63ebf69e8eff1b9a4351a249a73bee *vp90-2-14-resize-fp-tiles-16-2.webm
b6415318c1c589a1f64b9d569ce3cabbec2e0d52 *vp90-2-14-resize-fp-tiles-16-2.webm.md5
e3adc944a11c4c5517e63664c84ebb0847b64d81 *vp90-2-14-resize-fp-tiles-4-8.webm
03cba0532bc90a05b1990db830bf5701e24e7982 *vp90-2-14-resize-fp-tiles-4-8.webm.md5
3b27a991eb6d78dce38efab35b7db682e8cbbee3 *vp90-2-14-resize-fp-tiles-4-16.webm
5d16b7f82bf59f802724ddfd97abb487150b1c9d *vp90-2-14-resize-fp-tiles-4-16.webm.md5
d5fed8c28c1d4c7e232ebbd25cf758757313ed96 *vp90-2-14-resize-fp-tiles-8-4.webm
5a8ff8a52cbbde7bfab569beb6d971c5f8b904f7 *vp90-2-14-resize-fp-tiles-8-4.webm.md5
17a5faa023d77ee9dad423a4e0d3145796bbc500 *vp90-2-14-resize-fp-tiles-16-4.webm
2ef8daa3c3e750fd745130d0a76a39fe86f0448f *vp90-2-14-resize-fp-tiles-16-4.webm.md5
9361e031f5cc990d8740863e310abb5167ae351e *vp90-2-14-resize-fp-tiles-8-16.webm
57f13a2197486584f4e1a4f82ad969f3abc5a1a2 *vp90-2-14-resize-fp-tiles-8-16.webm.md5
5803fc6fcbfb47b7661f3fcc6499158a32b56675 *vp90-2-14-resize-fp-tiles-16-8.webm
be0fe64a1a4933696ff92d93f9bdecdbd886dc13 *vp90-2-14-resize-fp-tiles-16-8.webm.md5
0ac0f6d20a0afed77f742a3b9acb59fd7b9cb093 *vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm
1765315acccfe6cd12230e731369fcb15325ebfa *vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm.md5
4a2b7a683576fe8e330c7d1c4f098ff4e70a43a8 *vp90-2-14-resize-fp-tiles-16-8-4-2-1.webm
1ef480392112b3509cb190afbb96f9a38dd9fbac *vp90-2-14-resize-fp-tiles-16-8-4-2-1.webm.md5
e615575ded499ea1d992f3b38e3baa434509cdcd *vp90-2-15-segkey.webm
e3ab35d4316c5e81325c50f5236ceca4bc0d35df *vp90-2-15-segkey.webm.md5
9b7ca2cac09d34c4a5d296c1900f93b1e2f69d0d *vp90-2-15-segkey_adpq.webm
8f46ba5f785d0c2170591a153e0d0d146a7c8090 *vp90-2-15-segkey_adpq.webm.md5
698a6910a97486b833073ef0c0b18d75dce57ee8 *vp90-2-16-intra-only.webm
5661b0168752969f055eec37b05fa9fa947dc7eb *vp90-2-16-intra-only.webm.md5
c01bb7938f9a9f25e0c37afdec2f2fb73b6cc7fa *vp90-2-17-show-existing-frame.webm
cc75f351818b9a619818f5cc77b9bc013d0c1e11 *vp90-2-17-show-existing-frame.webm.md5
013708bd043f0821a3e56fb8404d82e7a0c7af6c *vp91-2-04-yuv422.webm
1e58a7d23adad830a672f1733c9d2ae17890d59c *vp91-2-04-yuv422.webm.md5
25d78f28948789d159a9453ebc13048b818251b1 *vp91-2-04-yuv440.webm
81b3870b27a7f695ef6a43e87ab04bbdb5aee2f5 *vp91-2-04-yuv440.webm.md5
0321d507ce62dedc8a51b4e9011f7a19aed9c3dc *vp91-2-04-yuv444.webm
367e423dd41fdb49aa028574a2cfec5c2f325c5c *vp91-2-04-yuv444.webm.md5
f77673b566f686853adefe0c578ad251b7241281 *vp92-2-20-10bit-yuv420.webm
abdedfaddacbbe1a15ac7a54e86360f03629fb7a *vp92-2-20-10bit-yuv420.webm.md5
0c2c355a1b17b28537c5a3b19997c8783b69f1af *vp92-2-20-12bit-yuv420.webm
afb2c2798703e039189b0a15c8ac5685aa51d33f *vp92-2-20-12bit-yuv420.webm.md5
0d661bc6e83da33238981481efd1b1802d323d88 *vp93-2-20-10bit-yuv422.webm
10318907063db22eb02fad332556edbbecd443cc *vp93-2-20-10bit-yuv422.webm.md5
ebc6be2f7511a0bdeac0b18c67f84ba7168839c7 *vp93-2-20-12bit-yuv422.webm
235232267c6a1dc8a11e45d600f1c99d2f8b42d4 *vp93-2-20-12bit-yuv422.webm.md5
f76b11b26d4beaceac7a7e7729dd5054d095164f *vp93-2-20-10bit-yuv440.webm
757b33b5ac969c5999999488a731a3d1e6d9fb88 *vp93-2-20-10bit-yuv440.webm.md5
df8807dbd29bec795c2db9c3c18e511fbb988101 *vp93-2-20-12bit-yuv440.webm
ea4100930c3f59a1c23fbb33ab0ea01151cae159 *vp93-2-20-12bit-yuv440.webm.md5
189c1b5f404ff41a50a7fc96341085ad541314a9 *vp93-2-20-10bit-yuv444.webm
2dd0177c2f9d970b6e698892634c653630f91f40 *vp93-2-20-10bit-yuv444.webm.md5
bd44cf6e1c27343e3639df9ac21346aedd5d6973 *vp93-2-20-12bit-yuv444.webm
f36e5bdf5ec3213f32c0ddc82f95d82c5133bf27 *vp93-2-20-12bit-yuv444.webm.md5
eb438c6540eb429f74404eedfa3228d409c57874 *desktop_640_360_30.yuv
89e70ebd22c27d275fe14dc2f1a41841a6d8b9ab *kirland_640_480_30.yuv
33c533192759e5bb4f07abfbac389dc259db4686 *macmarcomoving_640_480_30.yuv
@ -704,8 +37,6 @@ eb438c6540eb429f74404eedfa3228d409c57874 *desktop_640_360_30.yuv
edd86a1f5e62fd9da9a9d46078247759c2638009 *tacomasmallcameramovement_640_480_30.yuv
9a70e8b7d14fba9234d0e51dce876635413ce444 *thaloundeskmtg_640_480_30.yuv
e7d315dbf4f3928779e0dc624311196d44491d32 *niklas_1280_720_30.yuv
c77e4a26616add298a05dd5d12397be22c0e40c5 *vp90-2-18-resize.ivf
c12918cf0a716417fba2de35c3fc5ab90e52dfce *vp90-2-18-resize.ivf.md5
717da707afcaa1f692ff1946f291054eb75a4f06 *screendata.y4m
b7c1296630cdf1a7ef493d15ff4f9eb2999202f6 *invalid-vp90-2-08-tile_1x2_frame_parallel.webm.ivf.s47039_r01-05_b6-.ivf
0a3884edb3fd8f9d9b500223e650f7de257b67d8 *invalid-vp90-2-08-tile_1x2_frame_parallel.webm.ivf.s47039_r01-05_b6-.ivf.res
@ -715,12 +46,6 @@ fac89b5735be8a86b0dc05159f996a5c3208ae32 *invalid-vp90-2-09-aq2.webm.ivf.s3984_r
0a3884edb3fd8f9d9b500223e650f7de257b67d8 *invalid-vp90-2-09-aq2.webm.ivf.s3984_r01-05_b6-.v2.ivf.res
4506dfdcdf8ee4250924b075a0dcf1f070f72e5a *invalid-vp90-2-09-subpixel-00.ivf.s19552_r01-05_b6-.v2.ivf
bcdedaf168ac225575468fda77502d2dc9fd5baa *invalid-vp90-2-09-subpixel-00.ivf.s19552_r01-05_b6-.v2.ivf.res
65e93f9653bcf65b022f7d225268d1a90a76e7bb *vp90-2-19-skip.webm
368dccdde5288c13c25695d2eacdc7402cadf613 *vp90-2-19-skip.webm.md5
ffe460282df2b0e7d4603c2158653ad96f574b02 *vp90-2-19-skip-01.webm
bd21bc9eda4a4a36b221d71ede3a139fc3c7bd85 *vp90-2-19-skip-01.webm.md5
178f5bd239e38cc1cc2657a7a5e1a9f52ad2d3fe *vp90-2-19-skip-02.webm
9020d5e260bd7df08e2b3d4b86f8623cee3daea2 *vp90-2-19-skip-02.webm.md5
b03c408cf23158638da18dbc3323b99a1635c68a *invalid-vp90-2-12-droppable_1.ivf.s3676_r01-05_b6-.ivf
0a3884edb3fd8f9d9b500223e650f7de257b67d8 *invalid-vp90-2-12-droppable_1.ivf.s3676_r01-05_b6-.ivf.res
5e67e24e7f53fd189e565513cef8519b1bd6c712 *invalid-vp90-2-05-resize.ivf.s59293_r01-05_b6-.ivf
@ -731,12 +56,6 @@ b03c408cf23158638da18dbc3323b99a1635c68a *invalid-vp90-2-12-droppable_1.ivf.s367
a61774cf03fc584bd9f0904fc145253bb8ea6c4c *invalid-vp91-2-mixedrefcsp-444to420.ivf.res
812d05a64a0d83c1b504d0519927ddc5a2cdb273 *invalid-vp90-2-12-droppable_1.ivf.s73804_r01-05_b6-.ivf
1e472baaf5f6113459f0399a38a5a5e68d17799d *invalid-vp90-2-12-droppable_1.ivf.s73804_r01-05_b6-.ivf.res
f97088c7359fc8d3d5aa5eafe57bc7308b3ee124 *vp90-2-20-big_superframe-01.webm
47d7d409785afa33b123376de0c907336e6c7bd7 *vp90-2-20-big_superframe-01.webm.md5
65ade6d2786209582c50d34cfe22b3cdb033abaf *vp90-2-20-big_superframe-02.webm
7c0ed8d04c4d06c5411dd2e5de2411d37f092db5 *vp90-2-20-big_superframe-02.webm.md5
667ec8718c982aef6be07eb94f083c2efb9d2d16 *vp90-2-07-frame_parallel-1.webm
bfc82bf848e9c05020d61e3ffc1e62f25df81d19 *vp90-2-07-frame_parallel-1.webm.md5
efd5a51d175cfdacd169ed23477729dc558030dc *invalid-vp90-2-07-frame_parallel-1.webm
9f912712ec418be69adb910e2ca886a63c4cec08 *invalid-vp90-2-07-frame_parallel-2.webm
445f5a53ca9555341852997ccdd480a51540bd14 *invalid-vp90-2-07-frame_parallel-3.webm
@ -746,91 +65,3 @@ e60d859b0ef2b331b21740cf6cb83fabe469b079 *invalid-vp90-2-03-size-202x210.webm.iv
0ae808dca4d3c1152a9576e14830b6faa39f1b4a *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf.res
9cfc855459e7549fd015c79e8eca512b2f2cb7e3 *niklas_1280_720_30.y4m
5b5763b388b1b52a81bb82b39f7ec25c4bd3d0e1 *desktop_credits.y4m
85771f6ab44e4a0226e206c0cde8351dd5918953 *vp90-2-02-size-130x132.webm
512dad5eabbed37b4bbbc64ce153f1a5484427b8 *vp90-2-02-size-130x132.webm.md5
01f7127d40360289db63b27f61cb9afcda350e95 *vp90-2-02-size-132x130.webm
4a94275328ae076cf60f966c097a8721010fbf5a *vp90-2-02-size-132x130.webm.md5
f41c0400b5716b4b70552c40dd03d44be131e1cc *vp90-2-02-size-132x132.webm
1a69e989f697e424bfe3e3e8a77bb0c0992c8e47 *vp90-2-02-size-132x132.webm.md5
94a5cbfacacba100e0c5f7861c72a1b417feca0f *vp90-2-02-size-178x180.webm
dedfecf1d784bcf70629592fa5e6f01d5441ccc9 *vp90-2-02-size-178x180.webm.md5
4828b62478c04014bba3095a83106911a71cf387 *vp90-2-02-size-180x178.webm
423da2b861050c969d78ed8e8f8f14045d1d8199 *vp90-2-02-size-180x178.webm.md5
338f7c9282f43e29940f5391118aadd17e4f9234 *vp90-2-02-size-180x180.webm
6c2ef013392310778dca5dd5351160eca66b0a60 *vp90-2-02-size-180x180.webm.md5
679fa7d6807e936ff937d7b282e7dbd8ac76447e *vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm
fc7267ab8fc2bf5d6c234e34ee6c078a967b4888 *vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm.md5
9d33a137c819792209c5ce4e4e1ee5da73d574fe *vp90-2-14-resize-10frames-fp-tiles-1-2.webm
0c78a154956a8605d050bdd75e0dcc4d39c040a6 *vp90-2-14-resize-10frames-fp-tiles-1-2.webm.md5
d6a8d8c57f66a91d23e8e7df480f9ae841e56c37 *vp90-2-14-resize-10frames-fp-tiles-1-4.webm
e9b4e8c7b33b5fda745d340c3f47e6623ae40cf2 *vp90-2-14-resize-10frames-fp-tiles-1-4.webm.md5
aa6fe043a0c4a42b49c87ebbe812d4afd9945bec *vp90-2-14-resize-10frames-fp-tiles-1-8.webm
028520578994c2d013d4c0129033d4f2ff31bbe0 *vp90-2-14-resize-10frames-fp-tiles-1-8.webm.md5
d1d5463c9ea7b5cc5f609ddedccddf656f348d1a *vp90-2-14-resize-10frames-fp-tiles-2-1.webm
92d5872f5bdffbed721703b7e959b4f885e3d77a *vp90-2-14-resize-10frames-fp-tiles-2-1.webm.md5
677cb29de1215d97346015af5807a9b1faad54cf *vp90-2-14-resize-10frames-fp-tiles-2-4.webm
a5db19f977094ec3fd60b4f7671b3e6740225e12 *vp90-2-14-resize-10frames-fp-tiles-2-4.webm.md5
cdd3c52ba21067efdbb2de917fe2a965bf27332e *vp90-2-14-resize-10frames-fp-tiles-2-8.webm
db17ec5d894ea8b8d0b7f32206d0dd3d46dcfa6d *vp90-2-14-resize-10frames-fp-tiles-2-8.webm.md5
0f6093c472125d05b764d7d1965c1d56771c0ea2 *vp90-2-14-resize-10frames-fp-tiles-4-1.webm
bc7c79e1bee07926dd970462ce6f64fc30eec3e1 *vp90-2-14-resize-10frames-fp-tiles-4-1.webm.md5
c5142e2bff4091338196c8ea8bc9266e64f548bc *vp90-2-14-resize-10frames-fp-tiles-4-2.webm
22aa3dd430b69fd3d92f6561bac86deeed90486d *vp90-2-14-resize-10frames-fp-tiles-4-2.webm.md5
ede8b1466d2f26e1b1bd9602addb9cd1017e1d8c *vp90-2-14-resize-10frames-fp-tiles-4-8.webm
508d5ebb9c0eac2a4100281a3ee052ec2fc19217 *vp90-2-14-resize-10frames-fp-tiles-4-8.webm.md5
2b292e3392854cd1d76ae597a6f53656cf741cfa *vp90-2-14-resize-10frames-fp-tiles-8-1.webm
1c24e54fa19e94e1722f24676404444e941c3d31 *vp90-2-14-resize-10frames-fp-tiles-8-1.webm.md5
61beda21064e09634564caa6697ab90bd53c9af7 *vp90-2-14-resize-10frames-fp-tiles-8-2.webm
9c0657b4d9e1d0e4c9d28a90e5a8630a65519124 *vp90-2-14-resize-10frames-fp-tiles-8-2.webm.md5
1758c50a11a7c92522749b4a251664705f1f0d4b *vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm
4f454a06750614314ae15a44087b79016fe2db97 *vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm.md5
3920c95ba94f1f048a731d9d9b416043b44aa4bd *vp90-2-14-resize-10frames-fp-tiles-8-4.webm
4eb347a0456d2c49a1e1d8de5aa1c51acc39887e *vp90-2-14-resize-10frames-fp-tiles-8-4.webm.md5
4b95a74c032a473b6683d7ad5754db1b0ec378e9 *vp90-2-21-resize_inter_1280x720_5_1-2.webm
a7826dd386bedfe69d02736969bfb47fb6a40a5e *vp90-2-21-resize_inter_1280x720_5_1-2.webm.md5
5cfff79e82c4d69964ccb8e75b4f0c53b9295167 *vp90-2-21-resize_inter_1280x720_5_3-4.webm
a18f57db4a25e1f543a99f2ceb182e00db0ee22f *vp90-2-21-resize_inter_1280x720_5_3-4.webm.md5
d26db0811bf30eb4131d928669713e2485f8e833 *vp90-2-21-resize_inter_1280x720_7_1-2.webm
fd6f9f332cd5bea4c0f0d57be4297bea493cc5a1 *vp90-2-21-resize_inter_1280x720_7_1-2.webm.md5
5c7d73d4d268e2ba9593b31cb091fd339505c7fd *vp90-2-21-resize_inter_1280x720_7_3-4.webm
7bbb949cabc1e70dadcc74582739f63b833034e0 *vp90-2-21-resize_inter_1280x720_7_3-4.webm.md5
f2d2a41a60eb894aff0c5854afca15931f1445a8 *vp90-2-21-resize_inter_1920x1080_5_1-2.webm
66d7789992613ac9d678ff905ff1059daa1b89e4 *vp90-2-21-resize_inter_1920x1080_5_1-2.webm.md5
764edb75fe7dd64e73a1b4f3b4b2b1bf237a4dea *vp90-2-21-resize_inter_1920x1080_5_3-4.webm
f78bea1075983fd990e7f25d4f31438f9b5efa34 *vp90-2-21-resize_inter_1920x1080_5_3-4.webm.md5
96496f2ade764a5de9f0c27917c7df1f120fb2ef *vp90-2-21-resize_inter_1920x1080_7_1-2.webm
2632b635135ed5ecd67fd22dec7990d29c4f4cb5 *vp90-2-21-resize_inter_1920x1080_7_1-2.webm.md5
74889ea42001bf41428cb742ca74e65129c886dc *vp90-2-21-resize_inter_1920x1080_7_3-4.webm
d2cf3b25956415bb579d368e7098097e482dd73a *vp90-2-21-resize_inter_1920x1080_7_3-4.webm.md5
4658986a8ce36ebfcc80a1903e446eaab3985336 *vp90-2-21-resize_inter_320x180_5_1-2.webm
8a3d8cf325109ffa913cc9426c32eea8c202a09a *vp90-2-21-resize_inter_320x180_5_1-2.webm.md5
16303aa45176520ee42c2c425247aadc1506b881 *vp90-2-21-resize_inter_320x180_5_3-4.webm
41cab1ddf7715b680a4dbce42faa9bcd72af4e5c *vp90-2-21-resize_inter_320x180_5_3-4.webm.md5
56648adcee66dd0e5cb6ac947f5ee1b9cc8ba129 *vp90-2-21-resize_inter_320x180_7_1-2.webm
70047377787003cc03dda7b2394e6d7eaa666d9e *vp90-2-21-resize_inter_320x180_7_1-2.webm.md5
d2ff99165488499cc55f75929f1ce5ca9c9e359b *vp90-2-21-resize_inter_320x180_7_3-4.webm
e69019e378114a4643db283b66d1a7e304761a56 *vp90-2-21-resize_inter_320x180_7_3-4.webm.md5
4834d129bed0f4289d3a88f2ae3a1736f77621b0 *vp90-2-21-resize_inter_320x240_5_1-2.webm
a75653c53d22b623c1927fc0088da21dafef21f4 *vp90-2-21-resize_inter_320x240_5_1-2.webm.md5
19818e1b7fd1c1e63d8873c31b0babe29dd33ba6 *vp90-2-21-resize_inter_320x240_5_3-4.webm
8d89814ff469a186312111651b16601dfbce4336 *vp90-2-21-resize_inter_320x240_5_3-4.webm.md5
ac8057bae52498f324ce92a074d5f8207cc4a4a7 *vp90-2-21-resize_inter_320x240_7_1-2.webm
2643440898c83c08cc47bc744245af696b877c24 *vp90-2-21-resize_inter_320x240_7_1-2.webm.md5
cf4a4cd38ac8b18c42d8c25a3daafdb39132256b *vp90-2-21-resize_inter_320x240_7_3-4.webm
70ba8ec9120b26e9b0ffa2c79b432f16cbcb50ec *vp90-2-21-resize_inter_320x240_7_3-4.webm.md5
669f10409fe1c4a054010162ca47773ea1fdbead *vp90-2-21-resize_inter_640x360_5_1-2.webm
6355a04249004a35fb386dd1024214234f044383 *vp90-2-21-resize_inter_640x360_5_1-2.webm.md5
c23763b950b8247c1775d1f8158d93716197676c *vp90-2-21-resize_inter_640x360_5_3-4.webm
59e6fc381e3ec3b7bdaac586334e0bc944d18fb6 *vp90-2-21-resize_inter_640x360_5_3-4.webm.md5
71b45cbfdd068baa1f679a69e5e6f421d256a85f *vp90-2-21-resize_inter_640x360_7_1-2.webm
1416fc761b690c54a955c4cf017fa078520e8c18 *vp90-2-21-resize_inter_640x360_7_1-2.webm.md5
6c409903279448a697e4db63bab1061784bcd8d2 *vp90-2-21-resize_inter_640x360_7_3-4.webm
60de1299793433a630b71130cf76c9f5965758e2 *vp90-2-21-resize_inter_640x360_7_3-4.webm.md5
852b597b8af096d90c80bf0ed6ed3b336b851f19 *vp90-2-21-resize_inter_640x480_5_1-2.webm
f6856f19236ee46ed462bd0a2e7e72b9c3b9cea6 *vp90-2-21-resize_inter_640x480_5_1-2.webm.md5
792a16c6f60043bd8dceb515f0b95b8891647858 *vp90-2-21-resize_inter_640x480_5_3-4.webm
68ffe59877e9a7863805e1c0a3ce18ce037d7c9d *vp90-2-21-resize_inter_640x480_5_3-4.webm.md5
61e044c4759972a35ea3db8c1478a988910a4ef4 *vp90-2-21-resize_inter_640x480_7_1-2.webm
7739bfca167b1b43fea72f807f01e097b7cb98d8 *vp90-2-21-resize_inter_640x480_7_1-2.webm.md5
7291af354b4418917eee00e3a7e366086a0b7a10 *vp90-2-21-resize_inter_640x480_7_3-4.webm
4a18b09ccb36564193f0215f599d745d95bb558c *vp90-2-21-resize_inter_640x480_7_3-4.webm.md5

View File

@ -5,10 +5,10 @@ LIBVPX_TEST_SRCS-yes += md5_helper.h
LIBVPX_TEST_SRCS-yes += register_state_check.h
LIBVPX_TEST_SRCS-yes += test.mk
LIBVPX_TEST_SRCS-yes += test_libvpx.cc
LIBVPX_TEST_SRCS-yes += test_vectors.cc
LIBVPX_TEST_SRCS-yes += test_vectors.h
LIBVPX_TEST_SRCS-yes += util.h
LIBVPX_TEST_SRCS-yes += video_source.h
LIBVPX_TEST_SRCS-yes += transform_test_base.h
LIBVPX_TEST_SRCS-yes += function_equivalence_test.h
##
## BLACK BOX TESTS
@ -24,29 +24,19 @@ LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += datarate_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += encode_api_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += error_resilience_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += i420_video_source.h
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += realtime_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += resize_test.cc
#LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += realtime_test.cc
#LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += resize_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += y4m_video_source.h
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += yuv_video_source.h
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += config_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += cq_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += keyframe_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += byte_alignment_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += invalid_file_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += user_priv_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_frame_parallel_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_refresh_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += borders_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += cpu_speed_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += frame_size_tests.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_lossless_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_end_to_end_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_ethread_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += level_test.cc
#LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += level_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += active_map_refresh_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += active_map_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += borders_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += cpu_speed_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += frame_size_tests.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += lossless_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += ethread_test.cc
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
@ -70,24 +60,29 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../tools_common.h
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../webmdec.cc
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../webmdec.h
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += webm_video_source.h
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_skip_loopfilter_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += decode_api_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += test_vector_test.cc
# Currently we only support decoder perf tests for vp9. Also they read from WebM
# files, so WebM IO is required.
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP9_DECODER)$(CONFIG_WEBM_IO), \
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP10_DECODER)$(CONFIG_WEBM_IO), \
yesyesyes)
LIBVPX_TEST_SRCS-yes += decode_perf_test.cc
endif
# encode perf tests are vp9 only
ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_VP9_ENCODER), yesyes)
ifeq ($(CONFIG_ENCODE_PERF_TESTS)$(CONFIG_VP10_ENCODER), yesyes)
LIBVPX_TEST_SRCS-yes += encode_perf_test.cc
endif
## Multi-codec / unconditional black box tests.
ifeq ($(findstring yes,$(CONFIG_VP10_ENCODER)),yes)
LIBVPX_TEST_SRCS-yes += active_map_refresh_test.cc
LIBVPX_TEST_SRCS-yes += active_map_test.cc
LIBVPX_TEST_SRCS-yes += end_to_end_test.cc
endif
##
## WHITE BOX TESTS
##
@ -96,91 +91,92 @@ endif
##
ifeq ($(CONFIG_SHARED),)
## VP8
ifeq ($(CONFIG_VP8),yes)
## VP10
ifeq ($(CONFIG_VP10),yes)
# These tests require both the encoder and decoder to be built.
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes)
LIBVPX_TEST_SRCS-yes += vp8_boolcoder_test.cc
LIBVPX_TEST_SRCS-yes += vp8_fragments_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += add_noise_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
LIBVPX_TEST_SRCS-yes += idct_test.cc
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
LIBVPX_TEST_SRCS-yes += vpx_scale_test.cc
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_TEMPORAL_DENOISING),yesyes)
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += vp8_denoiser_sse2_test.cc
endif
endif # VP8
## VP9
ifeq ($(CONFIG_VP9),yes)
# These tests require both the encoder and decoder to be built.
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes)
ifeq ($(CONFIG_VP10_ENCODER)$(CONFIG_VP10_DECODER),yesyes)
# IDCT test currently depends on FDCT function
LIBVPX_TEST_SRCS-yes += idct8x8_test.cc
LIBVPX_TEST_SRCS-yes += partial_idct_test.cc
LIBVPX_TEST_SRCS-yes += superframe_test.cc
LIBVPX_TEST_SRCS-yes += tile_independence_test.cc
LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc
LIBVPX_TEST_SRCS-yes += vp9_encoder_parms_get_to_decoder.cc
LIBVPX_TEST_SRCS-yes += boolcoder_test.cc
#LIBVPX_TEST_SRCS-yes += encoder_parms_get_to_decoder.cc
endif
LIBVPX_TEST_SRCS-yes += convolve_test.cc
#LIBVPX_TEST_SRCS-yes += convolve_test.cc
LIBVPX_TEST_SRCS-yes += lpf_8_test.cc
LIBVPX_TEST_SRCS-yes += vp9_intrapred_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_decrypt_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_thread_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct32x32_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += hadamard_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += minmax_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_error_block_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
LIBVPX_TEST_SRCS-yes += intrapred_test.cc
#LIBVPX_TEST_SRCS-$(CONFIG_VP10_DECODER) += vp9_thread_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += dct16x16_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += dct32x32_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += fdct4x4_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += fdct8x8_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += hadamard_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += minmax_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += variance_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += error_block_test.cc
#LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp9_quantize_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += subtract_test.cc
ifeq ($(CONFIG_VP9_ENCODER),yes)
ifeq ($(CONFIG_VP10_ENCODER),yes)
LIBVPX_TEST_SRCS-$(CONFIG_SPATIAL_SVC) += svc_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += blockiness_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += consistency_test.cc
endif
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += vp9_denoiser_sse2_test.cc
ifeq ($(CONFIG_VP10_ENCODER)$(CONFIG_VP10_TEMPORAL_DENOISING),yesyes)
LIBVPX_TEST_SRCS-$(HAVE_SSE2) += denoiser_sse2_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += arf_freq_test.cc
endif # VP9
## VP10
ifeq ($(CONFIG_VP10),yes)
LIBVPX_TEST_SRCS-yes += vp10_inv_txfm_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_inv_txfm_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_dct_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_fht4x4_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_fht8x8_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_fht16x16_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_ANS) += vp10_ans_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_EXT_TILE) += vp10_ext_tile_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += sum_squares_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += subtract_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += blend_a64_mask_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += blend_a64_mask_1d_test.cc
ifeq ($(CONFIG_EXT_INTER),yes)
LIBVPX_TEST_SRCS-$(HAVE_SSSE3) += masked_variance_test.cc
LIBVPX_TEST_SRCS-$(HAVE_SSSE3) += masked_sad_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_wedge_utils_test.cc
endif
ifeq ($(CONFIG_OBMC),yes)
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += obmc_sad_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += obmc_variance_test.cc
endif
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
LIBVPX_TEST_SRCS-$(HAVE_SSE4_1) += vp10_quantize_test.cc
LIBVPX_TEST_SRCS-$(HAVE_SSE4_1) += vp10_highbd_iht_test.cc
endif # CONFIG_VPX_HIGHBITDEPTH
endif # VP10
## Multi-codec / unconditional whitebox tests.
ifeq ($(findstring yes,$(CONFIG_VP9_ENCODER)$(CONFIG_VP10_ENCODER)),yes)
ifeq ($(CONFIG_VP10_ENCODER),yes)
LIBVPX_TEST_SRCS-yes += avg_test.cc
endif
ifeq ($(CONFIG_INTERNAL_STATS),yes)
LIBVPX_TEST_SRCS-$(CONFIG_VPX_HIGHBITDEPTH) += hbd_metrics_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_txfm_test.h
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_txfm_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_fwd_txfm1d_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_inv_txfm1d_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_fwd_txfm2d_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_inv_txfm2d_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_convolve_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_convolve_optimz_test.cc
TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc
TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c

View File

@ -187,21 +187,21 @@ INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c,
vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
#if HAVE_SSE2
INTRA_PRED_TEST(SSE2, TestIntraPred4, vpx_dc_predictor_4x4_sse2,
vpx_dc_left_predictor_4x4_sse2, vpx_dc_top_predictor_4x4_sse2,
vpx_dc_128_predictor_4x4_sse2, vpx_v_predictor_4x4_sse2,
vpx_h_predictor_4x4_sse2, vpx_d45_predictor_4x4_sse2, NULL,
NULL, NULL, vpx_d207_predictor_4x4_sse2, NULL,
vpx_tm_predictor_4x4_sse2)
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
#endif // HAVE_SSE2
#if HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_SSSE3
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
vpx_d153_predictor_4x4_ssse3, NULL,
vpx_d63_predictor_4x4_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#endif // HAVE_SSSE3
#if HAVE_DSPR2
INTRA_PRED_TEST(DSPR2, TestIntraPred4, vpx_dc_predictor_4x4_dspr2, NULL, NULL,
@ -237,20 +237,20 @@ INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c,
vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
#if HAVE_SSE2
INTRA_PRED_TEST(SSE2, TestIntraPred8, vpx_dc_predictor_8x8_sse2,
vpx_dc_left_predictor_8x8_sse2, vpx_dc_top_predictor_8x8_sse2,
vpx_dc_128_predictor_8x8_sse2, vpx_v_predictor_8x8_sse2,
vpx_h_predictor_8x8_sse2, vpx_d45_predictor_8x8_sse2, NULL,
NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_sse2)
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
#endif // HAVE_SSE2
#if HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_SSSE3
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
vpx_d153_predictor_8x8_ssse3, vpx_d207_predictor_8x8_ssse3,
vpx_d63_predictor_8x8_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#endif // HAVE_SSSE3
#if HAVE_DSPR2
INTRA_PRED_TEST(DSPR2, TestIntraPred8, vpx_dc_predictor_8x8_dspr2, NULL, NULL,
@ -286,22 +286,22 @@ INTRA_PRED_TEST(C, TestIntraPred16, vpx_dc_predictor_16x16_c,
vpx_d153_predictor_16x16_c, vpx_d207_predictor_16x16_c,
vpx_d63_predictor_16x16_c, vpx_tm_predictor_16x16_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
#if HAVE_SSE2
INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2,
vpx_dc_left_predictor_16x16_sse2,
vpx_dc_top_predictor_16x16_sse2,
vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
vpx_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
vpx_tm_predictor_16x16_sse2)
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
#endif // HAVE_SSE2
#if HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_SSSE3
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
NULL, vpx_d45_predictor_16x16_ssse3,
NULL, NULL, vpx_d153_predictor_16x16_ssse3,
vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#endif // HAVE_SSSE3
#if HAVE_DSPR2
INTRA_PRED_TEST(DSPR2, TestIntraPred16, vpx_dc_predictor_16x16_dspr2, NULL,
@ -337,21 +337,21 @@ INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c,
vpx_d153_predictor_32x32_c, vpx_d207_predictor_32x32_c,
vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
#if HAVE_SSE2 && CONFIG_USE_X86INC
#if HAVE_SSE2
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
vpx_dc_left_predictor_32x32_sse2,
vpx_dc_top_predictor_32x32_sse2,
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
vpx_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL,
NULL, vpx_tm_predictor_32x32_sse2)
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
#endif // HAVE_SSE2
#if HAVE_SSSE3 && CONFIG_USE_X86INC
#if HAVE_SSSE3
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
NULL, vpx_d45_predictor_32x32_ssse3, NULL, NULL,
vpx_d153_predictor_32x32_ssse3, vpx_d207_predictor_32x32_ssse3,
vpx_d63_predictor_32x32_ssse3, NULL)
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
#endif // HAVE_SSSE3
#if HAVE_NEON
INTRA_PRED_TEST(NEON, TestIntraPred32, vpx_dc_predictor_32x32_neon,

View File

@ -16,12 +16,9 @@
#include "vpx_ports/x86.h"
#endif
extern "C" {
#if CONFIG_VP8
extern void vp8_rtcd();
#endif // CONFIG_VP8
#if CONFIG_VP9
extern void vp9_rtcd();
#endif // CONFIG_VP9
#if CONFIG_VP10
extern void vp10_rtcd();
#endif // CONFIG_VP10
extern void vpx_dsp_rtcd();
extern void vpx_scale_rtcd();
}
@ -63,12 +60,9 @@ int main(int argc, char **argv) {
// Shared library builds don't support whitebox tests
// that exercise internal symbols.
#if CONFIG_VP8
vp8_rtcd();
#endif // CONFIG_VP8
#if CONFIG_VP9
vp9_rtcd();
#endif // CONFIG_VP9
#if CONFIG_VP10
vp10_rtcd();
#endif // CONFIG_VP10
vpx_dsp_rtcd();
vpx_scale_rtcd();
#endif // !CONFIG_SHARED

View File

@ -1,192 +0,0 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cstdio>
#include <cstdlib>
#include <set>
#include <string>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "../tools_common.h"
#include "./vpx_config.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/md5_helper.h"
#include "test/test_vectors.h"
#include "test/util.h"
#if CONFIG_WEBM_IO
#include "test/webm_video_source.h"
#endif
#include "vpx_mem/vpx_mem.h"
namespace {
enum DecodeMode {
kSerialMode,
kFrameParallelMode
};
const int kDecodeMode = 0;
const int kThreads = 1;
const int kFileName = 2;
typedef std::tr1::tuple<int, int, const char*> DecodeParam;
class TestVectorTest : public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<DecodeParam> {
protected:
TestVectorTest()
: DecoderTest(GET_PARAM(0)),
md5_file_(NULL) {
#if CONFIG_VP9_DECODER
resize_clips_.insert(
::libvpx_test::kVP9TestVectorsResize,
::libvpx_test::kVP9TestVectorsResize +
::libvpx_test::kNumVP9TestVectorsResize);
#endif
}
virtual ~TestVectorTest() {
if (md5_file_)
fclose(md5_file_);
}
void OpenMD5File(const std::string& md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: "
<< md5_file_name_;
}
virtual void DecompressedFrameHook(const vpx_image_t& img,
const unsigned int frame_number) {
ASSERT_TRUE(md5_file_ != NULL);
char expected_md5[33];
char junk[128];
// Read correct md5 checksums.
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
ASSERT_NE(res, EOF) << "Read md5 data failed";
expected_md5[32] = '\0';
::libvpx_test::MD5 md5_res;
md5_res.Add(&img);
const char *actual_md5 = md5_res.Get();
// Check md5 match.
ASSERT_STREQ(expected_md5, actual_md5)
<< "Md5 checksums don't match: frame number = " << frame_number;
}
#if CONFIG_VP9_DECODER
std::set<std::string> resize_clips_;
#endif
private:
FILE *md5_file_;
};
// This test runs through the whole set of test vectors, and decodes them.
// The md5 checksums are computed for each frame in the video file. If md5
// checksums match the correct md5 data, then the test is passed. Otherwise,
// the test failed.
TEST_P(TestVectorTest, MD5Match) {
const DecodeParam input = GET_PARAM(1);
const std::string filename = std::tr1::get<kFileName>(input);
const int threads = std::tr1::get<kThreads>(input);
const int mode = std::tr1::get<kDecodeMode>(input);
libvpx_test::CompressedVideoSource *video = NULL;
vpx_codec_flags_t flags = 0;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
char str[256];
if (mode == kFrameParallelMode) {
flags |= VPX_CODEC_USE_FRAME_THREADING;
#if CONFIG_VP9_DECODER
// TODO(hkuang): Fix frame parallel decode bug. See issue 1086.
if (resize_clips_.find(filename) != resize_clips_.end()) {
printf("Skipping the test file: %s, due to frame parallel decode bug.\n",
filename.c_str());
return;
}
#endif
}
cfg.threads = threads;
snprintf(str, sizeof(str) / sizeof(str[0]) - 1,
"file: %s mode: %s threads: %d",
filename.c_str(), mode == 0 ? "Serial" : "Parallel", threads);
SCOPED_TRACE(str);
// Open compressed video file.
if (filename.substr(filename.length() - 3, 3) == "ivf") {
video = new libvpx_test::IVFVideoSource(filename);
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
#if CONFIG_WEBM_IO
video = new libvpx_test::WebMVideoSource(filename);
#else
fprintf(stderr, "WebM IO is disabled, skipping test vector %s\n",
filename.c_str());
return;
#endif
}
video->Init();
// Construct md5 file name.
const std::string md5_filename = filename + ".md5";
OpenMD5File(md5_filename);
// Set decode config and flags.
set_cfg(cfg);
set_flags(flags);
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video, cfg));
delete video;
}
// Test VP8 decode in serial mode with single thread.
// NOTE: VP8 only support serial mode.
#if CONFIG_VP8_DECODER
VP8_INSTANTIATE_TEST_CASE(
TestVectorTest,
::testing::Combine(
::testing::Values(0), // Serial Mode.
::testing::Values(1), // Single thread.
::testing::ValuesIn(libvpx_test::kVP8TestVectors,
libvpx_test::kVP8TestVectors +
libvpx_test::kNumVP8TestVectors)));
#endif // CONFIG_VP8_DECODER
// Test VP9 decode in serial mode with single thread.
#if CONFIG_VP9_DECODER
VP9_INSTANTIATE_TEST_CASE(
TestVectorTest,
::testing::Combine(
::testing::Values(0), // Serial Mode.
::testing::Values(1), // Single thread.
::testing::ValuesIn(libvpx_test::kVP9TestVectors,
libvpx_test::kVP9TestVectors +
libvpx_test::kNumVP9TestVectors)));
// Test VP9 decode in frame parallel mode with different number of threads.
INSTANTIATE_TEST_CASE_P(
VP9MultiThreadedFrameParallel, TestVectorTest,
::testing::Combine(
::testing::Values(
static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP9)),
::testing::Combine(
::testing::Values(1), // Frame Parallel mode.
::testing::Range(2, 9), // With 2 ~ 8 threads.
::testing::ValuesIn(libvpx_test::kVP9TestVectors,
libvpx_test::kVP9TestVectors +
libvpx_test::kNumVP9TestVectors))));
#endif
} // namespace

View File

@ -1,251 +0,0 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/test_vectors.h"
namespace libvpx_test {
#define NELEMENTS(x) static_cast<int>(sizeof(x) / sizeof(x[0]))
#if CONFIG_VP8_DECODER
const char *const kVP8TestVectors[] = {
"vp80-00-comprehensive-001.ivf",
"vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf",
"vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf",
"vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf",
"vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf",
"vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf",
"vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf",
"vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf",
"vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf",
"vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf",
"vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf",
"vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf",
"vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf",
"vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf",
"vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf",
"vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf",
"vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf",
"vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf",
"vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf",
"vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf",
"vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf",
"vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf",
"vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf",
"vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf",
"vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf",
"vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf",
"vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf",
"vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf",
"vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf",
"vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf",
"vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf",
"vp80-06-smallsize.ivf"
};
const int kNumVP8TestVectors = NELEMENTS(kVP8TestVectors);
#endif // CONFIG_VP8_DECODER
#if CONFIG_VP9_DECODER
#define RESIZE_TEST_VECTORS "vp90-2-21-resize_inter_320x180_5_1-2.webm", \
"vp90-2-21-resize_inter_320x180_5_3-4.webm", \
"vp90-2-21-resize_inter_320x180_7_1-2.webm", \
"vp90-2-21-resize_inter_320x180_7_3-4.webm", \
"vp90-2-21-resize_inter_320x240_5_1-2.webm", \
"vp90-2-21-resize_inter_320x240_5_3-4.webm", \
"vp90-2-21-resize_inter_320x240_7_1-2.webm", \
"vp90-2-21-resize_inter_320x240_7_3-4.webm", \
"vp90-2-21-resize_inter_640x360_5_1-2.webm", \
"vp90-2-21-resize_inter_640x360_5_3-4.webm", \
"vp90-2-21-resize_inter_640x360_7_1-2.webm", \
"vp90-2-21-resize_inter_640x360_7_3-4.webm", \
"vp90-2-21-resize_inter_640x480_5_1-2.webm", \
"vp90-2-21-resize_inter_640x480_5_3-4.webm", \
"vp90-2-21-resize_inter_640x480_7_1-2.webm", \
"vp90-2-21-resize_inter_640x480_7_3-4.webm", \
"vp90-2-21-resize_inter_1280x720_5_1-2.webm", \
"vp90-2-21-resize_inter_1280x720_5_3-4.webm", \
"vp90-2-21-resize_inter_1280x720_7_1-2.webm", \
"vp90-2-21-resize_inter_1280x720_7_3-4.webm", \
"vp90-2-21-resize_inter_1920x1080_5_1-2.webm", \
"vp90-2-21-resize_inter_1920x1080_5_3-4.webm", \
"vp90-2-21-resize_inter_1920x1080_7_1-2.webm", \
"vp90-2-21-resize_inter_1920x1080_7_3-4.webm",
const char *const kVP9TestVectors[] = {
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
"vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm",
"vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm",
"vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm",
"vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm",
"vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm",
"vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm",
"vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm",
"vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm",
"vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm",
"vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm",
"vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm",
"vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm",
"vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm",
"vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm",
"vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm",
"vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm",
"vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm",
"vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm",
"vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm",
"vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm",
"vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm",
"vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm",
"vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm",
"vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm",
"vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm",
"vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm",
"vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm",
"vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm",
"vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm",
"vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm",
"vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm",
"vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm",
"vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm",
"vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm",
"vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm",
"vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm",
"vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm",
"vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm",
"vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm",
"vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm",
"vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm",
"vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm",
"vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm",
"vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm",
"vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm",
"vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm",
"vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm",
"vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm",
"vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm",
"vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm",
"vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm",
"vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm",
"vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm",
"vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm",
"vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm",
"vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm",
"vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm",
"vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm",
"vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm",
"vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm",
"vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm",
"vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm",
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
"vp90-2-02-size-66x66.webm", "vp90-2-02-size-130x132.webm",
"vp90-2-02-size-132x130.webm", "vp90-2-02-size-132x132.webm",
"vp90-2-02-size-178x180.webm", "vp90-2-02-size-180x178.webm",
"vp90-2-02-size-180x180.webm", "vp90-2-03-size-196x196.webm",
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
"vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm",
"vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm",
"vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm",
"vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm",
"vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm",
"vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm",
"vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm",
"vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm",
"vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm",
"vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm",
"vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm",
"vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm",
"vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm",
"vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm",
"vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm",
"vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm",
"vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm",
"vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm",
"vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm",
"vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm",
"vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm",
"vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm",
"vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm",
"vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm",
"vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm",
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
"vp90-2-03-size-226x226.webm", "vp90-2-03-size-352x288.webm",
"vp90-2-03-deltaq.webm",
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
"vp90-2-07-frame_parallel.webm", "vp90-2-08-tile_1x2_frame_parallel.webm",
"vp90-2-08-tile_1x2.webm", "vp90-2-08-tile_1x4_frame_parallel.webm",
"vp90-2-08-tile_1x4.webm", "vp90-2-08-tile_1x8_frame_parallel.webm",
"vp90-2-08-tile_1x8.webm", "vp90-2-08-tile-4x4.webm",
"vp90-2-08-tile-4x1.webm", "vp90-2-09-subpixel-00.ivf",
"vp90-2-02-size-lf-1920x1080.webm", "vp90-2-09-aq2.webm",
"vp90-2-09-lf_deltas.webm", "vp90-2-10-show-existing-frame.webm",
"vp90-2-10-show-existing-frame2.webm",
"vp90-2-11-size-351x287.webm", "vp90-2-11-size-351x288.webm",
"vp90-2-11-size-352x287.webm", "vp90-2-12-droppable_1.ivf",
"vp90-2-12-droppable_2.ivf", "vp90-2-12-droppable_3.ivf",
#if !CONFIG_SIZE_LIMIT || \
(DECODE_WIDTH_LIMIT >= 20400 && DECODE_HEIGHT_LIMIT >= 120)
"vp90-2-13-largescaling.webm",
#endif
"vp90-2-14-resize-fp-tiles-1-16.webm",
"vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm",
"vp90-2-14-resize-fp-tiles-1-2.webm", "vp90-2-14-resize-fp-tiles-1-4.webm",
"vp90-2-14-resize-fp-tiles-16-1.webm", "vp90-2-14-resize-fp-tiles-16-2.webm",
"vp90-2-14-resize-fp-tiles-16-4.webm",
"vp90-2-14-resize-fp-tiles-16-8-4-2-1.webm",
"vp90-2-14-resize-fp-tiles-16-8.webm", "vp90-2-14-resize-fp-tiles-1-8.webm",
"vp90-2-14-resize-fp-tiles-2-16.webm", "vp90-2-14-resize-fp-tiles-2-1.webm",
"vp90-2-14-resize-fp-tiles-2-4.webm", "vp90-2-14-resize-fp-tiles-2-8.webm",
"vp90-2-14-resize-fp-tiles-4-16.webm", "vp90-2-14-resize-fp-tiles-4-1.webm",
"vp90-2-14-resize-fp-tiles-4-2.webm", "vp90-2-14-resize-fp-tiles-4-8.webm",
"vp90-2-14-resize-fp-tiles-8-16.webm", "vp90-2-14-resize-fp-tiles-8-1.webm",
"vp90-2-14-resize-fp-tiles-8-2.webm", "vp90-2-14-resize-fp-tiles-8-4.webm",
"vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm",
"vp90-2-14-resize-10frames-fp-tiles-1-2.webm",
"vp90-2-14-resize-10frames-fp-tiles-1-4.webm",
"vp90-2-14-resize-10frames-fp-tiles-1-8.webm",
"vp90-2-14-resize-10frames-fp-tiles-2-1.webm",
"vp90-2-14-resize-10frames-fp-tiles-2-4.webm",
"vp90-2-14-resize-10frames-fp-tiles-2-8.webm",
"vp90-2-14-resize-10frames-fp-tiles-4-1.webm",
"vp90-2-14-resize-10frames-fp-tiles-4-2.webm",
"vp90-2-14-resize-10frames-fp-tiles-4-8.webm",
"vp90-2-14-resize-10frames-fp-tiles-8-1.webm",
"vp90-2-14-resize-10frames-fp-tiles-8-2.webm",
"vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm",
"vp90-2-14-resize-10frames-fp-tiles-8-4.webm",
"vp90-2-15-segkey.webm", "vp90-2-15-segkey_adpq.webm",
"vp90-2-16-intra-only.webm", "vp90-2-17-show-existing-frame.webm",
"vp90-2-18-resize.ivf", "vp90-2-19-skip.webm",
"vp90-2-19-skip-01.webm", "vp90-2-19-skip-02.webm",
"vp91-2-04-yuv444.webm",
"vp91-2-04-yuv422.webm", "vp91-2-04-yuv440.webm",
#if CONFIG_VP9_HIGHBITDEPTH
"vp92-2-20-10bit-yuv420.webm", "vp92-2-20-12bit-yuv420.webm",
"vp93-2-20-10bit-yuv422.webm", "vp93-2-20-12bit-yuv422.webm",
"vp93-2-20-10bit-yuv440.webm", "vp93-2-20-12bit-yuv440.webm",
"vp93-2-20-10bit-yuv444.webm", "vp93-2-20-12bit-yuv444.webm",
#endif // CONFIG_VP9_HIGHBITDEPTH
"vp90-2-20-big_superframe-01.webm", "vp90-2-20-big_superframe-02.webm",
RESIZE_TEST_VECTORS
};
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
const char *const kVP9TestVectorsResize[] = {
RESIZE_TEST_VECTORS
};
const int kNumVP9TestVectorsResize = NELEMENTS(kVP9TestVectorsResize);
#undef RESIZE_TEST_VECTORS
#endif // CONFIG_VP9_DECODER
} // namespace libvpx_test

View File

@ -1,32 +0,0 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef TEST_TEST_VECTORS_H_
#define TEST_TEST_VECTORS_H_
#include "./vpx_config.h"
namespace libvpx_test {
#if CONFIG_VP8_DECODER
extern const int kNumVP8TestVectors;
extern const char *const kVP8TestVectors[];
#endif
#if CONFIG_VP9_DECODER
extern const int kNumVP9TestVectors;
extern const char *const kVP9TestVectors[];
extern const int kNumVP9TestVectorsResize;
extern const char *const kVP9TestVectorsResize[];
#endif // CONFIG_VP9_DECODER
} // namespace libvpx_test
#endif // TEST_TEST_VECTORS_H_

View File

@ -21,13 +21,15 @@
namespace {
class TileIndependenceTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<int> {
public ::libvpx_test::CodecTestWith2Params<int,
int> {
protected:
TileIndependenceTest()
: EncoderTest(GET_PARAM(0)),
md5_fw_order_(),
md5_inv_order_(),
n_tiles_(GET_PARAM(1)) {
n_tile_cols_(GET_PARAM(1)),
n_tile_rows_(GET_PARAM(2)) {
init_flags_ = VPX_CODEC_USE_PSNR;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.w = 704;
@ -36,6 +38,15 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
fw_dec_ = codec_->CreateDecoder(cfg, 0);
inv_dec_ = codec_->CreateDecoder(cfg, 0);
inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1);
#if CONFIG_VP10 && CONFIG_EXT_TILE
if (fw_dec_->IsVP10() && inv_dec_->IsVP10()) {
fw_dec_->Control(VP10_SET_DECODE_TILE_ROW, -1);
fw_dec_->Control(VP10_SET_DECODE_TILE_COL, -1);
inv_dec_->Control(VP10_SET_DECODE_TILE_ROW, -1);
inv_dec_->Control(VP10_SET_DECODE_TILE_COL, -1);
}
#endif
}
virtual ~TileIndependenceTest() {
@ -51,10 +62,17 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
libvpx_test::Encoder *encoder) {
if (video->frame() == 1) {
encoder->Control(VP9E_SET_TILE_COLUMNS, n_tiles_);
encoder->Control(VP9E_SET_TILE_COLUMNS, n_tile_cols_);
encoder->Control(VP9E_SET_TILE_ROWS, n_tile_rows_);
SetCpuUsed(encoder);
}
}
virtual void SetCpuUsed(libvpx_test::Encoder *encoder) {
static const int kCpuUsed = 3;
encoder->Control(VP8E_SET_CPUUSED, kCpuUsed);
}
void UpdateMD5(::libvpx_test::Decoder *dec, const vpx_codec_cx_pkt_t *pkt,
::libvpx_test::MD5 *md5) {
const vpx_codec_err_t res = dec->DecodeFrame(
@ -72,37 +90,60 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
UpdateMD5(inv_dec_, pkt, &md5_inv_order_);
}
void DoTest() {
const vpx_rational timebase = { 33333333, 1000000000 };
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = 500;
cfg_.g_lag_in_frames = 12;
cfg_.rc_end_usage = VPX_VBR;
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 704, 576,
timebase.den, timebase.num, 0, 5);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const char *md5_fw_str = md5_fw_order_.Get();
const char *md5_inv_str = md5_inv_order_.Get();
ASSERT_STREQ(md5_fw_str, md5_inv_str);
}
::libvpx_test::MD5 md5_fw_order_, md5_inv_order_;
::libvpx_test::Decoder *fw_dec_, *inv_dec_;
private:
int n_tiles_;
int n_tile_cols_;
int n_tile_rows_;
};
// run an encode with 2 or 4 tiles, and do the decode both in normal and
// inverted tile ordering. Ensure that the MD5 of the output in both cases
// is identical. If so, tiles are considered independent and the test passes.
TEST_P(TileIndependenceTest, MD5Match) {
const vpx_rational timebase = { 33333333, 1000000000 };
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = 500;
cfg_.g_lag_in_frames = 25;
cfg_.rc_end_usage = VPX_VBR;
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 704, 144,
timebase.den, timebase.num, 0, 30);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const char *md5_fw_str = md5_fw_order_.Get();
const char *md5_inv_str = md5_inv_order_.Get();
// could use ASSERT_EQ(!memcmp(.., .., 16) here, but this gives nicer
// output if it fails. Not sure if it's helpful since it's really just
// a MD5...
ASSERT_STREQ(md5_fw_str, md5_inv_str);
DoTest();
}
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
class TileIndependenceTestLarge : public TileIndependenceTest {
virtual void SetCpuUsed(libvpx_test::Encoder *encoder) {
static const int kCpuUsed = 0;
encoder->Control(VP8E_SET_CPUUSED, kCpuUsed);
}
};
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
TEST_P(TileIndependenceTestLarge, MD5Match) {
DoTest();
}
#if CONFIG_EXT_TILE
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Values(1, 2, 32),
::testing::Values(1, 2, 32));
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTestLarge,
::testing::Values(1, 2, 32),
::testing::Values(1, 2, 32));
#else
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Values(0, 1),
::testing::Values(0, 1));
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTestLarge,
::testing::Values(0, 1),
::testing::Values(0, 1));
#endif // CONFIG_EXT_TILE
} // namespace

View File

@ -173,27 +173,15 @@ vpx_tool_available() {
}
# Echoes yes to stdout when vpx_config_option_enabled() reports yes for
# CONFIG_VP8_DECODER.
vp8_decode_available() {
[ "$(vpx_config_option_enabled CONFIG_VP8_DECODER)" = "yes" ] && echo yes
# CONFIG_VP10_DECODER.
vp10_decode_available() {
[ "$(vpx_config_option_enabled CONFIG_VP10_DECODER)" = "yes" ] && echo yes
}
# Echoes yes to stdout when vpx_config_option_enabled() reports yes for
# CONFIG_VP8_ENCODER.
vp8_encode_available() {
[ "$(vpx_config_option_enabled CONFIG_VP8_ENCODER)" = "yes" ] && echo yes
}
# Echoes yes to stdout when vpx_config_option_enabled() reports yes for
# CONFIG_VP9_DECODER.
vp9_decode_available() {
[ "$(vpx_config_option_enabled CONFIG_VP9_DECODER)" = "yes" ] && echo yes
}
# Echoes yes to stdout when vpx_config_option_enabled() reports yes for
# CONFIG_VP9_ENCODER.
vp9_encode_available() {
[ "$(vpx_config_option_enabled CONFIG_VP9_ENCODER)" = "yes" ] && echo yes
# CONFIG_VP10_ENCODER.
vp10_encode_available() {
[ "$(vpx_config_option_enabled CONFIG_VP10_ENCODER)" = "yes" ] && echo yes
}
# Echoes yes to stdout when vpx_config_option_enabled() reports yes for

291
test/transform_test_base.h Normal file
View File

@ -0,0 +1,291 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef TEST_TRANSFORM_TEST_BASE_H_
#define TEST_TRANSFORM_TEST_BASE_H_
#include "./vpx_config.h"
#include "vpx_mem/vpx_mem.h"
#include "vpx/vpx_codec.h"
namespace libvpx_test {
// Note:
// Same constant are defined in vp9/common/vp9_entropy.h and
// vp10/common/entropy.h. Goal is to make this base class
// to use for future codec transform testing. But including
// either of them would lead to compiling error when we do
// unit test for another codec. Suggest to move the definition
// to a vpx header file.
const int kDctMaxValue = 16384;
typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride,
int tx_type);
class TransformTestBase {
public:
virtual ~TransformTestBase() {}
protected:
virtual void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) = 0;
virtual void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) = 0;
void RunAccuracyCheck(int limit) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
uint32_t max_error = 0;
int64_t total_error = 0;
const int count_test_block = 10000;
int16_t *test_input_block = reinterpret_cast<int16_t *>
(vpx_memalign(16, sizeof(int16_t) * num_coeffs_));
tran_low_t *test_temp_block = reinterpret_cast<tran_low_t *>
(vpx_memalign(16, sizeof(tran_low_t) * num_coeffs_));
uint8_t *dst = reinterpret_cast<uint8_t *>
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
uint8_t *src = reinterpret_cast<uint8_t *>
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *dst16 = reinterpret_cast<uint16_t *>
(vpx_memalign(16, sizeof(uint16_t) * num_coeffs_));
uint16_t *src16 = reinterpret_cast<uint16_t *>
(vpx_memalign(16, sizeof(uint16_t) * num_coeffs_));
#endif
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-255, 255].
for (int j = 0; j < num_coeffs_; ++j) {
if (bit_depth_ == VPX_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
test_input_block[j] = src16[j] - dst16[j];
#endif
}
}
ASM_REGISTER_STATE_CHECK(RunFwdTxfm(test_input_block,
test_temp_block, pitch_));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block,
CONVERT_TO_BYTEPTR(dst16), pitch_));
#endif
}
for (int j = 0; j < num_coeffs_; ++j) {
#if CONFIG_VPX_HIGHBITDEPTH
const uint32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
ASSERT_EQ(VPX_BITS_8, bit_depth_);
const uint32_t diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
if (max_error < error)
max_error = error;
total_error += error;
}
}
EXPECT_GE(static_cast<uint32_t>(limit), max_error)
<< "Error: 4x4 FHT/IHT has an individual round trip error > "
<< limit;
EXPECT_GE(count_test_block * limit, total_error)
<< "Error: 4x4 FHT/IHT has average round trip error > " << limit
<< " per block";
vpx_free(test_input_block);
vpx_free(test_temp_block);
vpx_free(dst);
vpx_free(src);
#if CONFIG_VPX_HIGHBITDEPTH
vpx_free(dst16);
vpx_free(src16);
#endif
}
void RunCoeffCheck() {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 5000;
int16_t *input_block = reinterpret_cast<int16_t *>
(vpx_memalign(16, sizeof(int16_t) * num_coeffs_));
tran_low_t *output_ref_block = reinterpret_cast<tran_low_t *>
(vpx_memalign(16, sizeof(tran_low_t) * num_coeffs_));
tran_low_t *output_block = reinterpret_cast<tran_low_t *>
(vpx_memalign(16, sizeof(tran_low_t) * num_coeffs_));
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < num_coeffs_; ++j)
input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
fwd_txfm_ref(input_block, output_ref_block, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunFwdTxfm(input_block, output_block, pitch_));
// The minimum quant value is 4.
for (int j = 0; j < num_coeffs_; ++j) {
EXPECT_EQ(output_block[j], output_ref_block[j])
<< "Error: not bit-exact result at index: " << j
<< " at test block: " << i;
}
}
vpx_free(input_block);
vpx_free(output_ref_block);
vpx_free(output_block);
}
void RunMemCheck() {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 5000;
int16_t *input_extreme_block = reinterpret_cast<int16_t *>
(vpx_memalign(16, sizeof(int16_t) * num_coeffs_));
tran_low_t *output_ref_block = reinterpret_cast<tran_low_t *>
(vpx_memalign(16, sizeof(tran_low_t) * num_coeffs_));
tran_low_t *output_block = reinterpret_cast<tran_low_t *>
(vpx_memalign(16, sizeof(tran_low_t) * num_coeffs_));
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < num_coeffs_; ++j) {
input_extreme_block[j] = rnd.Rand8() % 2 ? mask_ : -mask_;
}
if (i == 0) {
for (int j = 0; j < num_coeffs_; ++j)
input_extreme_block[j] = mask_;
} else if (i == 1) {
for (int j = 0; j < num_coeffs_; ++j)
input_extreme_block[j] = -mask_;
}
fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunFwdTxfm(input_extreme_block,
output_block, pitch_));
int row_length = FindRowLength();
// The minimum quant value is 4.
for (int j = 0; j < num_coeffs_; ++j) {
EXPECT_EQ(output_block[j], output_ref_block[j]);
EXPECT_GE(row_length * kDctMaxValue << (bit_depth_ - 8),
abs(output_block[j]))
<< "Error: NxN FDCT has coefficient larger than N*DCT_MAX_VALUE";
}
}
vpx_free(input_extreme_block);
vpx_free(output_ref_block);
vpx_free(output_block);
}
void RunInvAccuracyCheck(int limit) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = 1000;
int16_t *in = reinterpret_cast<int16_t *>
(vpx_memalign(16, sizeof(int16_t) * num_coeffs_));
tran_low_t *coeff = reinterpret_cast<tran_low_t *>
(vpx_memalign(16, sizeof(tran_low_t) * num_coeffs_));
uint8_t *dst = reinterpret_cast<uint8_t *>
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
uint8_t *src = reinterpret_cast<uint8_t *>
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *dst16 = reinterpret_cast<uint16_t *>
(vpx_memalign(16, sizeof(uint16_t) * num_coeffs_));
uint16_t *src16 = reinterpret_cast<uint16_t *>
(vpx_memalign(16, sizeof(uint16_t) * num_coeffs_));
#endif
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < num_coeffs_; ++j) {
if (bit_depth_ == VPX_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
in[j] = src16[j] - dst16[j];
#endif
}
}
fwd_txfm_ref(in, coeff, pitch_, tx_type_);
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
#endif
}
for (int j = 0; j < num_coeffs_; ++j) {
#if CONFIG_VPX_HIGHBITDEPTH
const uint32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
EXPECT_GE(static_cast<uint32_t>(limit), error)
<< "Error: 4x4 IDCT has error " << error
<< " at index " << j;
}
}
vpx_free(in);
vpx_free(coeff);
vpx_free(dst);
vpx_free(src);
#if CONFIG_VPX_HIGHBITDEPTH
vpx_free(src16);
vpx_free(dst16);
#endif
}
int pitch_;
int tx_type_;
FhtFunc fwd_txfm_ref;
vpx_bit_depth_t bit_depth_;
int mask_;
int num_coeffs_;
private:
// Assume transform size is 4x4, 8x8, 16x16,...
int FindRowLength() const {
int row = 4;
if (16 == num_coeffs_) {
row = 4;
} else if (64 == num_coeffs_) {
row = 8;
} else if (256 == num_coeffs_) {
row = 16;
} else if (1024 == num_coeffs_) {
row = 32;
}
return row;
}
};
} // namespace libvpx_test
#endif // TEST_TRANSFORM_TEST_BASE_H_

File diff suppressed because it is too large Load Diff

339
test/vp10_ans_test.cc Normal file
View File

@ -0,0 +1,339 @@
/*
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#define VP10_FORCE_VPXBOOL_TREEWRITER
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <ctime>
#include <utility>
#include <vector>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "vp10/common/ans.h"
#include "vp10/encoder/treewriter.h"
#include "vpx_dsp/bitreader.h"
#include "vpx_dsp/bitwriter.h"
namespace {
typedef std::vector<std::pair<uint8_t, bool> > PvVec;
PvVec abs_encode_build_vals(int iters) {
PvVec ret;
libvpx_test::ACMRandom gen(0x30317076);
double entropy = 0;
for (int i = 0; i < iters; ++i) {
uint8_t p;
do {
p = gen.Rand8();
} while (p == 0); // zero is not a valid coding probability
bool b = gen.Rand8() < p;
ret.push_back(std::make_pair(static_cast<uint8_t>(p), b));
double d = p / 256.;
entropy += -d * log2(d) - (1 - d) * log2(1 - d);
}
printf("entropy %f\n", entropy);
return ret;
}
bool check_rabs(const PvVec &pv_vec, uint8_t *buf) {
AnsCoder a;
ans_write_init(&a, buf);
std::clock_t start = std::clock();
for (PvVec::const_reverse_iterator it = pv_vec.rbegin(); it != pv_vec.rend();
++it) {
rabs_write(&a, it->second, 256 - it->first);
}
std::clock_t enc_time = std::clock() - start;
int offset = ans_write_end(&a);
bool okay = true;
AnsDecoder d;
if (ans_read_init(&d, buf, offset)) return false;
start = std::clock();
for (PvVec::const_iterator it = pv_vec.begin(); it != pv_vec.end(); ++it) {
okay &= rabs_read(&d, 256 - it->first) == it->second;
}
std::clock_t dec_time = std::clock() - start;
if (!okay) return false;
printf("rABS size %d enc_time %f dec_time %f\n", offset,
static_cast<float>(enc_time) / CLOCKS_PER_SEC,
static_cast<float>(dec_time) / CLOCKS_PER_SEC);
return ans_read_end(&d);
}
bool check_rabs_asc(const PvVec &pv_vec, uint8_t *buf) {
AnsCoder a;
ans_write_init(&a, buf);
std::clock_t start = std::clock();
for (PvVec::const_reverse_iterator it = pv_vec.rbegin(); it != pv_vec.rend();
++it) {
rabs_asc_write(&a, it->second, 256 - it->first);
}
std::clock_t enc_time = std::clock() - start;
int offset = ans_write_end(&a);
bool okay = true;
AnsDecoder d;
if (ans_read_init(&d, buf, offset)) return false;
start = std::clock();
for (PvVec::const_iterator it = pv_vec.begin(); it != pv_vec.end(); ++it) {
okay &= rabs_asc_read(&d, 256 - it->first) == it->second;
}
std::clock_t dec_time = std::clock() - start;
if (!okay) return false;
printf("rABS (asc) size %d enc_time %f dec_time %f\n", offset,
static_cast<float>(enc_time) / CLOCKS_PER_SEC,
static_cast<float>(dec_time) / CLOCKS_PER_SEC);
return ans_read_end(&d);
}
bool check_uabs(const PvVec &pv_vec, uint8_t *buf) {
AnsCoder a;
ans_write_init(&a, buf);
std::clock_t start = std::clock();
for (PvVec::const_reverse_iterator it = pv_vec.rbegin(); it != pv_vec.rend();
++it) {
uabs_write(&a, it->second, 256 - it->first);
}
std::clock_t enc_time = std::clock() - start;
int offset = ans_write_end(&a);
bool okay = true;
AnsDecoder d;
if (ans_read_init(&d, buf, offset)) return false;
start = std::clock();
for (PvVec::const_iterator it = pv_vec.begin(); it != pv_vec.end(); ++it) {
okay &= uabs_read(&d, 256 - it->first) == it->second;
}
std::clock_t dec_time = std::clock() - start;
if (!okay) return false;
printf("uABS size %d enc_time %f dec_time %f\n", offset,
static_cast<float>(enc_time) / CLOCKS_PER_SEC,
static_cast<float>(dec_time) / CLOCKS_PER_SEC);
return ans_read_end(&d);
}
bool check_vpxbool(const PvVec &pv_vec, uint8_t *buf) {
vpx_writer w;
vpx_reader r;
vpx_start_encode(&w, buf);
std::clock_t start = std::clock();
for (PvVec::const_iterator it = pv_vec.begin(); it != pv_vec.end(); ++it) {
vpx_write(&w, it->second, 256 - it->first);
}
std::clock_t enc_time = std::clock() - start;
vpx_stop_encode(&w);
bool okay = true;
vpx_reader_init(&r, buf, w.pos, NULL, NULL);
start = std::clock();
for (PvVec::const_iterator it = pv_vec.begin(); it != pv_vec.end(); ++it) {
okay &= vpx_read(&r, 256 - it->first) == it->second;
}
std::clock_t dec_time = std::clock() - start;
printf("VPX size %d enc_time %f dec_time %f\n", w.pos,
static_cast<float>(enc_time) / CLOCKS_PER_SEC,
static_cast<float>(dec_time) / CLOCKS_PER_SEC);
return okay;
}
// TODO(aconverse): replace this with a more representative distribution from
// the codec.
const rans_sym rans_sym_tab[] = {
{16 * 4, 0 * 4}, {100 * 4, 16 * 4}, {70 * 4, 116 *4}, {70 * 4, 186 *4},
};
const int kDistinctSyms = sizeof(rans_sym_tab) / sizeof(rans_sym_tab[0]);
std::vector<int> ans_encode_build_vals(const rans_sym *tab, int iters) {
std::vector<int> p_to_sym;
int i = 0;
while (p_to_sym.size() < rans_precision) {
p_to_sym.insert(p_to_sym.end(), tab[i].prob, i);
++i;
}
assert(p_to_sym.size() == rans_precision);
std::vector<int> ret;
libvpx_test::ACMRandom gen(18543637);
for (int i = 0; i < iters; ++i) {
int sym = p_to_sym[gen.Rand8() * 4];
ret.push_back(sym);
}
return ret;
}
void rans_build_dec_tab(const struct rans_sym sym_tab[],
rans_dec_lut dec_tab) {
dec_tab[0] = 0;
for (int i = 1; dec_tab[i - 1] < rans_precision; ++i) {
dec_tab[i] = dec_tab[i - 1] + sym_tab[i - 1].prob;
}
}
bool check_rans(const std::vector<int> &sym_vec, const rans_sym *const tab,
uint8_t *buf) {
AnsCoder a;
ans_write_init(&a, buf);
rans_dec_lut dec_tab;
rans_build_dec_tab(tab, dec_tab);
std::clock_t start = std::clock();
for (std::vector<int>::const_reverse_iterator it = sym_vec.rbegin();
it != sym_vec.rend(); ++it) {
rans_write(&a, &tab[*it]);
}
std::clock_t enc_time = std::clock() - start;
int offset = ans_write_end(&a);
bool okay = true;
AnsDecoder d;
if (ans_read_init(&d, buf, offset)) return false;
start = std::clock();
for (std::vector<int>::const_iterator it = sym_vec.begin();
it != sym_vec.end(); ++it) {
okay &= rans_read(&d, dec_tab) == *it;
}
std::clock_t dec_time = std::clock() - start;
if (!okay) return false;
printf("rANS size %d enc_time %f dec_time %f\n", offset,
static_cast<float>(enc_time) / CLOCKS_PER_SEC,
static_cast<float>(dec_time) / CLOCKS_PER_SEC);
return ans_read_end(&d);
}
void build_tree(vpx_tree_index *tree, int num_syms) {
vpx_tree_index i;
int sym = 0;
for (i = 0; i < num_syms - 1; ++i) {
tree[2 * i] = sym--;
tree[2 * i + 1] = 2 * (i + 1);
}
tree[2 * i - 1] = sym;
}
/* The treep array contains the probabilities of nodes of a tree structured
* like:
* *
* / \
* -sym0 *
* / \
* -sym1 *
* / \
* -sym2 -sym3
*/
void tab2tree(const rans_sym *tab, int tab_size, vpx_prob *treep) {
const unsigned basep = rans_precision;
unsigned pleft = basep;
for (int i = 0; i < tab_size - 1; ++i) {
unsigned prob = (tab[i].prob * basep + basep * 2) / (pleft * 4);
assert(prob > 0 && prob < 256);
treep[i] = prob;
pleft -= tab[i].prob;
}
}
struct sym_bools {
unsigned bits;
int len;
};
static void make_tree_bits_tab(sym_bools *tab, int num_syms) {
unsigned bits = 0;
int len = 0;
int i;
for (i = 0; i < num_syms - 1; ++i) {
bits *= 2;
++len;
tab[i].bits = bits;
tab[i].len = len;
++bits;
}
tab[i].bits = bits;
tab[i].len = len;
}
void build_tpb(vpx_prob probs[/*num_syms*/],
vpx_tree_index tree[/*2*num_syms*/],
sym_bools bit_len[/*num_syms*/],
const rans_sym sym_tab[/*num_syms*/], int num_syms) {
tab2tree(sym_tab, num_syms, probs);
build_tree(tree, num_syms);
make_tree_bits_tab(bit_len, num_syms);
}
bool check_vpxtree(const std::vector<int> &sym_vec, const rans_sym *sym_tab,
uint8_t *buf) {
vpx_writer w;
vpx_reader r;
vpx_start_encode(&w, buf);
vpx_prob probs[kDistinctSyms];
vpx_tree_index tree[2 * kDistinctSyms];
sym_bools bit_len[kDistinctSyms];
build_tpb(probs, tree, bit_len, sym_tab, kDistinctSyms);
std::clock_t start = std::clock();
for (std::vector<int>::const_iterator it = sym_vec.begin();
it != sym_vec.end(); ++it) {
vp10_write_tree(&w, tree, probs, bit_len[*it].bits, bit_len[*it].len, 0);
}
std::clock_t enc_time = std::clock() - start;
vpx_stop_encode(&w);
vpx_reader_init(&r, buf, w.pos, NULL, NULL);
start = std::clock();
for (std::vector<int>::const_iterator it = sym_vec.begin();
it != sym_vec.end(); ++it) {
if (vpx_read_tree(&r, tree, probs) != *it) return false;
}
std::clock_t dec_time = std::clock() - start;
printf("VPXtree size %u enc_time %f dec_time %f\n", w.pos,
static_cast<float>(enc_time) / CLOCKS_PER_SEC,
static_cast<float>(dec_time) / CLOCKS_PER_SEC);
return true;
}
class Vp10AbsTest : public ::testing::Test {
protected:
static void SetUpTestCase() { pv_vec_ = abs_encode_build_vals(kNumBools); }
virtual void SetUp() { buf_ = new uint8_t[kNumBools / 8]; }
virtual void TearDown() { delete[] buf_; }
static const int kNumBools = 100000000;
static PvVec pv_vec_;
uint8_t *buf_;
};
PvVec Vp10AbsTest::pv_vec_;
class Vp10AnsTest : public ::testing::Test {
protected:
static void SetUpTestCase() {
sym_vec_ = ans_encode_build_vals(rans_sym_tab, kNumSyms);
}
virtual void SetUp() { buf_ = new uint8_t[kNumSyms / 2]; }
virtual void TearDown() { delete[] buf_; }
static const int kNumSyms = 25000000;
static std::vector<int> sym_vec_;
uint8_t *buf_;
};
std::vector<int> Vp10AnsTest::sym_vec_;
TEST_F(Vp10AbsTest, Vpxbool) { EXPECT_TRUE(check_vpxbool(pv_vec_, buf_)); }
TEST_F(Vp10AbsTest, Rabs) { EXPECT_TRUE(check_rabs(pv_vec_, buf_)); }
TEST_F(Vp10AbsTest, RabsAsc) { EXPECT_TRUE(check_rabs_asc(pv_vec_, buf_)); }
TEST_F(Vp10AbsTest, Uabs) { EXPECT_TRUE(check_uabs(pv_vec_, buf_)); }
TEST_F(Vp10AnsTest, Rans) {
EXPECT_TRUE(check_rans(sym_vec_, rans_sym_tab, buf_));
}
TEST_F(Vp10AnsTest, Vpxtree) {
EXPECT_TRUE(check_vpxtree(sym_vec_, rans_sym_tab, buf_));
}
} // namespace

View File

@ -0,0 +1,407 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp10_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
namespace {
using std::tr1::tuple;
using libvpx_test::ACMRandom;
typedef void (*conv_filter_t)(const uint8_t*, int, uint8_t*, int,
int, int, const InterpFilterParams,
const int, int, int);
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*hbd_conv_filter_t)(const uint16_t*, int, uint16_t*, int,
int, int, const InterpFilterParams,
const int, int, int, int);
#endif
// Test parameter list:
// <convolve_horiz_func, convolve_vert_func,
// <width, height>, filter_params, subpel_x_q4, avg>
typedef tuple<int, int> BlockDimension;
typedef tuple<conv_filter_t, conv_filter_t, BlockDimension, INTERP_FILTER,
int, int> ConvParams;
#if CONFIG_VPX_HIGHBITDEPTH
// Test parameter list:
// <convolve_horiz_func, convolve_vert_func,
// <width, height>, filter_params, subpel_x_q4, avg, bit_dpeth>
typedef tuple<hbd_conv_filter_t, hbd_conv_filter_t, BlockDimension,
INTERP_FILTER, int, int, int> HbdConvParams;
#endif
// Note:
// src_ and src_ref_ have special boundary requirement
// dst_ and dst_ref_ don't
const size_t maxWidth = 256;
const size_t maxHeight = 256;
const size_t maxBlockSize = maxWidth * maxHeight;
const int horizOffset = 32;
const int vertiOffset = 32;
const size_t testMaxBlk = 128;
const int stride = 128;
const int x_step_q4 = 16;
class VP10ConvolveOptimzTest : public ::testing::TestWithParam<ConvParams> {
public:
virtual ~VP10ConvolveOptimzTest() {}
virtual void SetUp() {
conv_horiz_ = GET_PARAM(0);
conv_vert_ = GET_PARAM(1);
BlockDimension block = GET_PARAM(2);
width_ = std::tr1::get<0>(block);
height_ = std::tr1::get<1>(block);
filter_ = GET_PARAM(3);
subpel_ = GET_PARAM(4);
avg_ = GET_PARAM(5);
alloc_ = new uint8_t[maxBlockSize * 4];
src_ = alloc_ + (vertiOffset * maxWidth);
src_ += horizOffset;
src_ref_ = src_ + maxBlockSize;
dst_ = alloc_ + 2 * maxBlockSize;
dst_ref_ = alloc_ + 3 * maxBlockSize;
}
virtual void TearDown() {
delete[] alloc_;
libvpx_test::ClearSystemState();
}
protected:
void RunHorizFilterBitExactCheck();
void RunVertFilterBitExactCheck();
private:
void PrepFilterBuffer(int w, int h);
void DiffFilterBuffer();
conv_filter_t conv_horiz_;
conv_filter_t conv_vert_;
uint8_t *alloc_;
uint8_t *src_;
uint8_t *dst_;
uint8_t *src_ref_;
uint8_t *dst_ref_;
int width_;
int height_;
int filter_;
int subpel_;
int avg_;
};
void VP10ConvolveOptimzTest::PrepFilterBuffer(int w, int h) {
int r, c;
ACMRandom rnd(ACMRandom::DeterministicSeed());
memset(alloc_, 0, 4 * maxBlockSize * sizeof(alloc_[0]));
uint8_t *src_ptr = src_;
uint8_t *dst_ptr = dst_;
uint8_t *src_ref_ptr = src_ref_;
uint8_t *dst_ref_ptr = dst_ref_;
for (r = 0; r < height_; ++r) {
for (c = 0; c < width_; ++c) {
src_ptr[c] = rnd.Rand8();
src_ref_ptr[c] = src_ptr[c];
dst_ptr[c] = rnd.Rand8();
dst_ref_ptr[c] = dst_ptr[c];
}
src_ptr += stride;
src_ref_ptr += stride;
dst_ptr += stride;
dst_ref_ptr += stride;
}
}
void VP10ConvolveOptimzTest::DiffFilterBuffer() {
int r, c;
const uint8_t *dst_ptr = dst_;
const uint8_t *dst_ref_ptr = dst_ref_;
for (r = 0; r < height_; ++r) {
for (c = 0; c < width_; ++c) {
EXPECT_EQ((uint8_t)dst_ref_ptr[c], (uint8_t)dst_ptr[c])
<< "Error at row: " << r << " col: " << c << " "
<< "w = " << width_ << " " << "h = " << height_ << " "
<< "filter group index = " << filter_ << " "
<< "filter index = " << subpel_;
}
dst_ptr += stride;
dst_ref_ptr += stride;
}
}
void VP10ConvolveOptimzTest::RunHorizFilterBitExactCheck() {
PrepFilterBuffer(testMaxBlk, testMaxBlk);
InterpFilterParams filter_params = vp10_get_interp_filter_params(filter_);
vp10_convolve_horiz_c(src_ref_, stride, dst_ref_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_);
conv_horiz_(src_, stride, dst_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_);
DiffFilterBuffer();
// Note:
// Here we need calculate a height which is different from the specified one
// and test again.
int intermediate_height =
(((height_ - 1) * 16 + subpel_) >> SUBPEL_BITS) + filter_params.taps;
PrepFilterBuffer(testMaxBlk, testMaxBlk);
vp10_convolve_horiz_c(src_ref_, stride, dst_ref_, stride, width_,
intermediate_height, filter_params, subpel_, x_step_q4,
avg_);
conv_horiz_(src_, stride, dst_, stride, width_,
intermediate_height, filter_params, subpel_, x_step_q4,
avg_);
DiffFilterBuffer();
}
void VP10ConvolveOptimzTest::RunVertFilterBitExactCheck() {
PrepFilterBuffer(testMaxBlk, testMaxBlk);
InterpFilterParams filter_params = vp10_get_interp_filter_params(filter_);
vp10_convolve_vert_c(src_ref_, stride, dst_ref_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_);
conv_vert_(src_, stride, dst_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_);
DiffFilterBuffer();
}
TEST_P(VP10ConvolveOptimzTest, HorizBitExactCheck) {
RunHorizFilterBitExactCheck();
}
TEST_P(VP10ConvolveOptimzTest, VerticalBitExactCheck) {
RunVertFilterBitExactCheck();
}
using std::tr1::make_tuple;
#if (HAVE_SSSE3 || HAVE_SSE4_1) && CONFIG_EXT_INTERP
const BlockDimension kBlockDim[] = {
make_tuple(2, 2),
make_tuple(2, 4),
make_tuple(4, 4),
make_tuple(4, 8),
make_tuple(8, 4),
make_tuple(8, 8),
make_tuple(8, 16),
make_tuple(16, 8),
make_tuple(16, 16),
make_tuple(16, 32),
make_tuple(32, 16),
make_tuple(32, 32),
make_tuple(32, 64),
make_tuple(64, 32),
make_tuple(64, 64),
make_tuple(64, 128),
make_tuple(128, 64),
make_tuple(128, 128),
};
// 10/12-tap filters
const INTERP_FILTER kFilter[] = {6, 4, 2};
const int kSubpelQ4[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
const int kAvg[] = {0, 1};
#endif
#if HAVE_SSSE3 && CONFIG_EXT_INTERP
INSTANTIATE_TEST_CASE_P(
SSSE3, VP10ConvolveOptimzTest,
::testing::Combine(
::testing::Values(vp10_convolve_horiz_ssse3),
::testing::Values(vp10_convolve_vert_ssse3),
::testing::ValuesIn(kBlockDim),
::testing::ValuesIn(kFilter),
::testing::ValuesIn(kSubpelQ4),
::testing::ValuesIn(kAvg)));
#endif // HAVE_SSSE3 && CONFIG_EXT_INTERP
#if CONFIG_VPX_HIGHBITDEPTH
typedef ::testing::TestWithParam<HbdConvParams> TestWithHbdConvParams;
class VP10HbdConvolveOptimzTest : public TestWithHbdConvParams {
public:
virtual ~VP10HbdConvolveOptimzTest() {}
virtual void SetUp() {
conv_horiz_ = GET_PARAM(0);
conv_vert_ = GET_PARAM(1);
BlockDimension block = GET_PARAM(2);
width_ = std::tr1::get<0>(block);
height_ = std::tr1::get<1>(block);
filter_ = GET_PARAM(3);
subpel_ = GET_PARAM(4);
avg_ = GET_PARAM(5);
bit_depth_ = GET_PARAM(6);
alloc_ = new uint16_t[maxBlockSize * 4];
src_ = alloc_ + (vertiOffset * maxWidth);
src_ += horizOffset;
src_ref_ = src_ + maxBlockSize;
dst_ = alloc_ + 2 * maxBlockSize;
dst_ref_ = alloc_ + 3 * maxBlockSize;
}
virtual void TearDown() {
delete[] alloc_;
libvpx_test::ClearSystemState();
}
protected:
void RunHorizFilterBitExactCheck();
void RunVertFilterBitExactCheck();
private:
void PrepFilterBuffer(int w, int h);
void DiffFilterBuffer();
hbd_conv_filter_t conv_horiz_;
hbd_conv_filter_t conv_vert_;
uint16_t *alloc_;
uint16_t *src_;
uint16_t *dst_;
uint16_t *src_ref_;
uint16_t *dst_ref_;
int width_;
int height_;
int filter_;
int subpel_;
int avg_;
int bit_depth_;
};
void VP10HbdConvolveOptimzTest::PrepFilterBuffer(int w, int h) {
int r, c;
ACMRandom rnd(ACMRandom::DeterministicSeed());
memset(alloc_, 0, 4 * maxBlockSize * sizeof(alloc_[0]));
uint16_t *src_ptr = src_;
uint16_t *dst_ptr = dst_;
uint16_t *dst_ref_ptr = dst_ref_;
uint16_t hbd_mask = (1 << bit_depth_) - 1;
for (r = 0; r < height_; ++r) {
for (c = 0; c < width_; ++c) {
src_ptr[c] = rnd.Rand16() & hbd_mask;
dst_ptr[c] = rnd.Rand16() & hbd_mask;
dst_ref_ptr[c] = dst_ptr[c];
}
src_ptr += stride;
dst_ptr += stride;
dst_ref_ptr += stride;
}
}
void VP10HbdConvolveOptimzTest::DiffFilterBuffer() {
int r, c;
const uint16_t *dst_ptr = dst_;
const uint16_t *dst_ref_ptr = dst_ref_;
for (r = 0; r < height_; ++r) {
for (c = 0; c < width_; ++c) {
EXPECT_EQ((uint16_t)dst_ref_ptr[c], (uint16_t)dst_ptr[c])
<< "Error at row: " << r << " col: " << c << " "
<< "w = " << width_ << " " << "h = " << height_ << " "
<< "filter group index = " << filter_ << " "
<< "filter index = " << subpel_ << " "
<< "bit depth = " << bit_depth_;
}
dst_ptr += stride;
dst_ref_ptr += stride;
}
}
void VP10HbdConvolveOptimzTest::RunHorizFilterBitExactCheck() {
PrepFilterBuffer(testMaxBlk, testMaxBlk);
InterpFilterParams filter_params = vp10_get_interp_filter_params(filter_);
vp10_highbd_convolve_horiz_c(src_, stride, dst_ref_, stride, width_,
height_, filter_params, subpel_, x_step_q4,
avg_, bit_depth_);
conv_horiz_(src_, stride, dst_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_, bit_depth_);
DiffFilterBuffer();
// Note:
// Here we need calculate a height which is different from the specified one
// and test again.
int intermediate_height =
(((height_ - 1) * 16 + subpel_) >> SUBPEL_BITS) + filter_params.taps;
PrepFilterBuffer(testMaxBlk, testMaxBlk);
vp10_highbd_convolve_horiz_c(src_, stride, dst_ref_, stride, width_,
intermediate_height, filter_params, subpel_,
x_step_q4, avg_, bit_depth_);
conv_horiz_(src_, stride, dst_, stride, width_, intermediate_height,
filter_params, subpel_, x_step_q4, avg_, bit_depth_);
DiffFilterBuffer();
}
void VP10HbdConvolveOptimzTest::RunVertFilterBitExactCheck() {
PrepFilterBuffer(testMaxBlk, testMaxBlk);
InterpFilterParams filter_params = vp10_get_interp_filter_params(filter_);
vp10_highbd_convolve_vert_c(src_, stride, dst_ref_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_,
bit_depth_);
conv_vert_(src_, stride, dst_, stride, width_, height_,
filter_params, subpel_, x_step_q4, avg_, bit_depth_);
DiffFilterBuffer();
}
TEST_P(VP10HbdConvolveOptimzTest, HorizBitExactCheck) {
RunHorizFilterBitExactCheck();
}
TEST_P(VP10HbdConvolveOptimzTest, VertBitExactCheck) {
RunVertFilterBitExactCheck();
}
#if HAVE_SSE4_1 && CONFIG_EXT_INTERP
const int kBitdepth[] = {10, 12};
INSTANTIATE_TEST_CASE_P(
SSE4_1, VP10HbdConvolveOptimzTest,
::testing::Combine(
::testing::Values(vp10_highbd_convolve_horiz_sse4_1),
::testing::Values(vp10_highbd_convolve_vert_sse4_1),
::testing::ValuesIn(kBlockDim),
::testing::ValuesIn(kFilter),
::testing::ValuesIn(kSubpelQ4),
::testing::ValuesIn(kAvg),
::testing::ValuesIn(kBitdepth)));
#endif // HAVE_SSE4_1 && CONFIG_EXT_INTERP
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

461
test/vp10_convolve_test.cc Normal file
View File

@ -0,0 +1,461 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "vp10/common/filter.h"
#include "vp10/common/vp10_convolve.h"
#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
using libvpx_test::ACMRandom;
namespace {
void setup_convolve() {
#if HAVE_SSSE3 && CONFIG_RUNTIME_CPU_DETECT
vp10_convolve_horiz = vp10_convolve_horiz_c;
vp10_convolve_vert = vp10_convolve_vert_c;
#endif
}
TEST(VP10ConvolveTest, vp10_convolve8) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
#if CONFIG_DUAL_FILTER
INTERP_FILTER interp_filter[4] = {
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR,
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR
};
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter[0]);
#else
INTERP_FILTER interp_filter = EIGHTTAP_REGULAR;
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter);
#endif
ptrdiff_t filter_size = filter_params.taps;
int filter_center = filter_size / 2 - 1;
uint8_t src[12 * 12];
int src_stride = filter_size;
uint8_t dst[1] = {0};
uint8_t dst1[1] = {0};
int dst_stride = 1;
int x_step_q4 = 16;
int y_step_q4 = 16;
int subpel_x_q4 = 3;
int subpel_y_q4 = 2;
int avg = 0;
int w = 1;
int h = 1;
setup_convolve();
for (int i = 0; i < filter_size * filter_size; i++) {
src[i] = rnd.Rand16() % (1 << 8);
}
vp10_convolve(src + src_stride * filter_center + filter_center, src_stride,
dst, dst_stride, w, h, interp_filter, subpel_x_q4, x_step_q4,
subpel_y_q4, y_step_q4, avg);
const int16_t* x_filter =
vp10_get_interp_filter_subpel_kernel(filter_params, subpel_x_q4);
const int16_t* y_filter =
vp10_get_interp_filter_subpel_kernel(filter_params, subpel_y_q4);
vpx_convolve8_c(src + src_stride * filter_center + filter_center, src_stride,
dst1, dst_stride, x_filter, 16, y_filter, 16, w, h);
EXPECT_EQ(dst[0], dst1[0]);
}
TEST(VP10ConvolveTest, vp10_convolve) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
#if CONFIG_DUAL_FILTER
INTERP_FILTER interp_filter[4] = {
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR,
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR
};
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter[0]);
#else
INTERP_FILTER interp_filter = EIGHTTAP_REGULAR;
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter);
#endif
ptrdiff_t filter_size = filter_params.taps;
int filter_center = filter_size / 2 - 1;
uint8_t src[12 * 12];
int src_stride = filter_size;
uint8_t dst[1] = {0};
int dst_stride = 1;
int x_step_q4 = 16;
int y_step_q4 = 16;
int avg = 0;
int w = 1;
int h = 1;
int subpel_x_q4;
int subpel_y_q4;
setup_convolve();
for (int i = 0; i < filter_size * filter_size; i++) {
src[i] = rnd.Rand16() % (1 << 8);
}
for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) {
for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) {
vp10_convolve(src + src_stride * filter_center + filter_center,
src_stride, dst, dst_stride, w, h, interp_filter,
subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg);
const int16_t* x_filter =
vp10_get_interp_filter_subpel_kernel(filter_params, subpel_x_q4);
const int16_t* y_filter =
vp10_get_interp_filter_subpel_kernel(filter_params, subpel_y_q4);
int temp[12];
int dst_ref = 0;
for (int r = 0; r < filter_size; r++) {
temp[r] = 0;
for (int c = 0; c < filter_size; c++) {
temp[r] += x_filter[c] * src[r * filter_size + c];
}
temp[r] = clip_pixel(ROUND_POWER_OF_TWO(temp[r], FILTER_BITS));
dst_ref += temp[r] * y_filter[r];
}
dst_ref = clip_pixel(ROUND_POWER_OF_TWO(dst_ref, FILTER_BITS));
EXPECT_EQ(dst[0], dst_ref);
}
}
}
TEST(VP10ConvolveTest, vp10_convolve_avg) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
#if CONFIG_DUAL_FILTER
INTERP_FILTER interp_filter[4] = {
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR,
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR
};
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter[0]);
#else
INTERP_FILTER interp_filter = EIGHTTAP_REGULAR;
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter);
#endif
ptrdiff_t filter_size = filter_params.taps;
int filter_center = filter_size / 2 - 1;
uint8_t src0[12 * 12];
uint8_t src1[12 * 12];
int src_stride = filter_size;
uint8_t dst0[1] = {0};
uint8_t dst1[1] = {0};
uint8_t dst[1] = {0};
int dst_stride = 1;
int x_step_q4 = 16;
int y_step_q4 = 16;
int avg = 0;
int w = 1;
int h = 1;
int subpel_x_q4;
int subpel_y_q4;
setup_convolve();
for (int i = 0; i < filter_size * filter_size; i++) {
src0[i] = rnd.Rand16() % (1 << 8);
src1[i] = rnd.Rand16() % (1 << 8);
}
int offset = filter_size * filter_center + filter_center;
for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) {
for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) {
avg = 0;
vp10_convolve(src0 + offset, src_stride, dst0, dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg);
avg = 0;
vp10_convolve(src1 + offset, src_stride, dst1, dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg);
avg = 0;
vp10_convolve(src0 + offset, src_stride, dst, dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg);
avg = 1;
vp10_convolve(src1 + offset, src_stride, dst, dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg);
EXPECT_EQ(dst[0], ROUND_POWER_OF_TWO(dst0[0] + dst1[0], 1));
}
}
}
#if CONFIG_VPX_HIGHBITDEPTH
TEST(VP10ConvolveTest, vp10_highbd_convolve) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
#if CONFIG_DUAL_FILTER
INTERP_FILTER interp_filter[4] = {
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR,
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR
};
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter[0]);
#else
INTERP_FILTER interp_filter = EIGHTTAP_REGULAR;
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter);
#endif
ptrdiff_t filter_size = filter_params.taps;
int filter_center = filter_size / 2 - 1;
uint16_t src[12 * 12];
int src_stride = filter_size;
uint16_t dst[1] = {0};
int dst_stride = 1;
int x_step_q4 = 16;
int y_step_q4 = 16;
int avg = 0;
int bd = 10;
int w = 1;
int h = 1;
int subpel_x_q4;
int subpel_y_q4;
for (int i = 0; i < filter_size * filter_size; i++) {
src[i] = rnd.Rand16() % (1 << bd);
}
for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) {
for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) {
vp10_highbd_convolve(
CONVERT_TO_BYTEPTR(src + src_stride * filter_center + filter_center),
src_stride, CONVERT_TO_BYTEPTR(dst), dst_stride, w, h, interp_filter,
subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd);
const int16_t* x_filter =
vp10_get_interp_filter_subpel_kernel(filter_params, subpel_x_q4);
const int16_t* y_filter =
vp10_get_interp_filter_subpel_kernel(filter_params, subpel_y_q4);
int temp[12];
int dst_ref = 0;
for (int r = 0; r < filter_size; r++) {
temp[r] = 0;
for (int c = 0; c < filter_size; c++) {
temp[r] += x_filter[c] * src[r * filter_size + c];
}
temp[r] =
clip_pixel_highbd(ROUND_POWER_OF_TWO(temp[r], FILTER_BITS), bd);
dst_ref += temp[r] * y_filter[r];
}
dst_ref = clip_pixel_highbd(ROUND_POWER_OF_TWO(dst_ref, FILTER_BITS), bd);
EXPECT_EQ(dst[0], dst_ref);
}
}
}
TEST(VP10ConvolveTest, vp10_highbd_convolve_avg) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
#if CONFIG_DUAL_FILTER
INTERP_FILTER interp_filter[4] = {
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR,
EIGHTTAP_REGULAR, EIGHTTAP_REGULAR
};
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter[0]);
#else
INTERP_FILTER interp_filter = EIGHTTAP_REGULAR;
InterpFilterParams filter_params =
vp10_get_interp_filter_params(interp_filter);
#endif
ptrdiff_t filter_size = filter_params.taps;
int filter_center = filter_size / 2 - 1;
uint16_t src0[12 * 12];
uint16_t src1[12 * 12];
int src_stride = filter_size;
uint16_t dst0[1] = {0};
uint16_t dst1[1] = {0};
uint16_t dst[1] = {0};
int dst_stride = 1;
int x_step_q4 = 16;
int y_step_q4 = 16;
int avg = 0;
int bd = 10;
int w = 1;
int h = 1;
int subpel_x_q4;
int subpel_y_q4;
for (int i = 0; i < filter_size * filter_size; i++) {
src0[i] = rnd.Rand16() % (1 << bd);
src1[i] = rnd.Rand16() % (1 << bd);
}
for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) {
for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) {
int offset = filter_size * filter_center + filter_center;
avg = 0;
vp10_highbd_convolve(CONVERT_TO_BYTEPTR(src0 + offset), src_stride,
CONVERT_TO_BYTEPTR(dst0), dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg, bd);
avg = 0;
vp10_highbd_convolve(CONVERT_TO_BYTEPTR(src1 + offset), src_stride,
CONVERT_TO_BYTEPTR(dst1), dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg, bd);
avg = 0;
vp10_highbd_convolve(CONVERT_TO_BYTEPTR(src0 + offset), src_stride,
CONVERT_TO_BYTEPTR(dst), dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg, bd);
avg = 1;
vp10_highbd_convolve(CONVERT_TO_BYTEPTR(src1 + offset), src_stride,
CONVERT_TO_BYTEPTR(dst), dst_stride, w, h,
interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4,
y_step_q4, avg, bd);
EXPECT_EQ(dst[0], ROUND_POWER_OF_TWO(dst0[0] + dst1[0], 1));
}
}
}
#endif // CONFIG_VPX_HIGHBITDEPTH
#define CONVOLVE_SPEED_TEST 0
#if CONVOLVE_SPEED_TEST
#define highbd_convolve_speed(func, block_size, frame_size) \
TEST(VP10ConvolveTest, func##_speed_##block_size##_##frame_size) { \
ACMRandom rnd(ACMRandom::DeterministicSeed()); \
INTERP_FILTER interp_filter = EIGHTTAP; \
InterpFilterParams filter_params = \
vp10_get_interp_filter_params(interp_filter); \
ptrdiff_t filter_size = filter_params.tap; \
int filter_center = filter_size / 2 - 1; \
DECLARE_ALIGNED(16, uint16_t, \
src[(frame_size + 7) * (frame_size + 7)]) = {0}; \
int src_stride = frame_size + 7; \
DECLARE_ALIGNED(16, uint16_t, dst[frame_size * frame_size]) = {0}; \
int dst_stride = frame_size; \
int x_step_q4 = 16; \
int y_step_q4 = 16; \
int subpel_x_q4 = 8; \
int subpel_y_q4 = 6; \
int bd = 10; \
\
int w = block_size; \
int h = block_size; \
\
const int16_t* filter_x = \
vp10_get_interp_filter_kernel(filter_params, subpel_x_q4); \
const int16_t* filter_y = \
vp10_get_interp_filter_kernel(filter_params, subpel_y_q4); \
\
for (int i = 0; i < src_stride * src_stride; i++) { \
src[i] = rnd.Rand16() % (1 << bd); \
} \
\
int offset = filter_center * src_stride + filter_center; \
int row_offset = 0; \
int col_offset = 0; \
for (int i = 0; i < 100000; i++) { \
int src_total_offset = offset + col_offset * src_stride + row_offset; \
int dst_total_offset = col_offset * dst_stride + row_offset; \
func(CONVERT_TO_BYTEPTR(src + src_total_offset), src_stride, \
CONVERT_TO_BYTEPTR(dst + dst_total_offset), dst_stride, filter_x, \
x_step_q4, filter_y, y_step_q4, w, h, bd); \
if (offset + w + w < frame_size) { \
row_offset += w; \
} else { \
row_offset = 0; \
col_offset += h; \
} \
if (col_offset + h >= frame_size) { \
col_offset = 0; \
} \
} \
}
#define lowbd_convolve_speed(func, block_size, frame_size) \
TEST(VP10ConvolveTest, func##_speed_l_##block_size##_##frame_size) { \
ACMRandom rnd(ACMRandom::DeterministicSeed()); \
INTERP_FILTER interp_filter = EIGHTTAP; \
InterpFilterParams filter_params = \
vp10_get_interp_filter_params(interp_filter); \
ptrdiff_t filter_size = filter_params.tap; \
int filter_center = filter_size / 2 - 1; \
DECLARE_ALIGNED(16, uint8_t, src[(frame_size + 7) * (frame_size + 7)]); \
int src_stride = frame_size + 7; \
DECLARE_ALIGNED(16, uint8_t, dst[frame_size * frame_size]); \
int dst_stride = frame_size; \
int x_step_q4 = 16; \
int y_step_q4 = 16; \
int subpel_x_q4 = 8; \
int subpel_y_q4 = 6; \
int bd = 8; \
\
int w = block_size; \
int h = block_size; \
\
const int16_t* filter_x = \
vp10_get_interp_filter_kernel(filter_params, subpel_x_q4); \
const int16_t* filter_y = \
vp10_get_interp_filter_kernel(filter_params, subpel_y_q4); \
\
for (int i = 0; i < src_stride * src_stride; i++) { \
src[i] = rnd.Rand16() % (1 << bd); \
} \
\
int offset = filter_center * src_stride + filter_center; \
int row_offset = 0; \
int col_offset = 0; \
for (int i = 0; i < 100000; i++) { \
func(src + offset, src_stride, dst, dst_stride, filter_x, x_step_q4, \
filter_y, y_step_q4, w, h); \
if (offset + w + w < frame_size) { \
row_offset += w; \
} else { \
row_offset = 0; \
col_offset += h; \
} \
if (col_offset + h >= frame_size) { \
col_offset = 0; \
} \
} \
}
// This experiment shows that when frame size is 64x64
// vpx_highbd_convolve8_sse2 and vpx_convolve8_sse2's speed are similar.
// However when frame size becomes 1024x1024
// vpx_highbd_convolve8_sse2 is around 50% slower than vpx_convolve8_sse2
// we think the bottleneck is from memory IO
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 8, 64);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 16, 64);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 32, 64);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 64, 64);
lowbd_convolve_speed(vpx_convolve8_sse2, 8, 64);
lowbd_convolve_speed(vpx_convolve8_sse2, 16, 64);
lowbd_convolve_speed(vpx_convolve8_sse2, 32, 64);
lowbd_convolve_speed(vpx_convolve8_sse2, 64, 64);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 8, 1024);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 16, 1024);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 32, 1024);
highbd_convolve_speed(vpx_highbd_convolve8_sse2, 64, 1024);
lowbd_convolve_speed(vpx_convolve8_sse2, 8, 1024);
lowbd_convolve_speed(vpx_convolve8_sse2, 16, 1024);
lowbd_convolve_speed(vpx_convolve8_sse2, 32, 1024);
lowbd_convolve_speed(vpx_convolve8_sse2, 64, 1024);
#endif // CONVOLVE_SPEED_TEST
} // namespace

Some files were not shown because too many files have changed in this diff Show More