Commit Graph

28 Commits

Author SHA1 Message Date
hkuang
a3ef7d5a50 Add VP9 frame-parallel unit test.
Make sure VP9 frame-parallel decode passes all the standard
test vectors. Only test running with 2,3,4 threads now.

Also refactor the video decode test driver to support passing
in decode flags which is used to enable frame-parallel decode.

Change-Id: I6a712464232c2e13681634951c7e176312522e1e
2014-08-14 13:06:26 -07:00
Vignesh Venkatasubramanian
68ff368d19 Enable tests using WebM files only if webm_io is enabled
There are a few tests which read/write directly to/from WebM files. They should
be disabled when --disable-webm-io is passed.

Change-Id: Ibac4732e27c66da33082151ba6e6993eaa9a1efd
2014-04-23 19:10:43 -07:00
Alex Converse
c2cc5598f5 Automatically count test vectors and make the tables const.
Change-Id: I742b0f26b7d735e75c3653a3e52bd4f4fc198d3d
2014-03-27 15:33:22 -07:00
James Zern
77e64d8c13 tests: fix a few msvc warnings
Change-Id: I7ee89d6fc2afc20563d1784598ce83e29c0e6651
2014-01-29 15:48:45 -08:00
James Zern
f061968213 test/: remove some unnecessary extern "C"s
Change-Id: I57a94d2f9e26a872a20d805a506855a20e61c356
2014-01-18 13:14:14 -08:00
Frank Galligan
38536f6b1c Cleanup copyright headers.
Change-Id: I7ff2b18e085f3fffaa7f25d40e4e50427b808f43
2013-12-12 08:36:34 -08:00
Frank Galligan
52b2d50db4 Move test vector list into a separate header.
Change-Id: I36f9033492f12fda7f9ce0e7a97a009aab9aab57
2013-12-11 23:15:39 -08:00
James Zern
937c3b990b add tile test vectors
3840x2160

vp90-2-08-tile_1x8_frame_parallel.webm
vp90-2-08-tile_1x8.webm

vpxenc crowd_run_2160p50.y4m \
  --codec=vp9 -p 2 \
  --frame-parallel=${fpm} \
  --tile-columns=${tc} \
  --limit=10 \
  --auto-alt-ref=1 \
  --lag-in-frames=5 \
  --target-bitrate=2500

Change-Id: I6dc19b4fca483d03ef9a897a843bf9037d095c8e
2013-12-05 21:04:46 -08:00
Jingning Han
ebb583d291 Add a test vector for loopfilter
The test vector exercises the loopfilter behavior at frame boundary.

blue_sky_1080p25.y4m --good --cpu-used=2 --threads=0 --profile=0
--lag-in-frames=25 --limit=300 --min-q=0 --max-q=63 --cq-level=20
--end-usage=0 --auto-alt-ref=1 -p 2 --kf-max-dist=9999 --kf-min-dist=0
--drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0
--maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5
--arnr-type=3 --sharpness=0 --undershoot-pct=100 --target-bitrate=6000

Change-Id: Ibd0807395d2fe87f24f81f990369678df3de7c23
2013-12-04 13:05:21 -08:00
Yaowu Xu
a0f77f6acb Fix VP8 border replication for very small image
Also added a test vector for this issue.

Change-Id: I8a8654f9d33b27afd53c295f1ea44d198550d067
2013-12-03 17:06:17 -08:00
Yunqing Wang
f234136414 Add a noise test vector
Added the test vector provided by Attila, which caught the bug in
Issue 661 "Decoder produces mismatched outputs with ssse3 enabled
and disabled"

vp90-hantro-stream-001.ivf
size: 320x180; 20 frames

Change-Id: Ic0d2b57ac7596ecb938dd55abc8c706fc2dd6d8f
2013-11-26 11:30:13 -08:00
Jingning Han
458951d8e3 Add test vector for row/col tile decoding
1920x1080

vp90-2-08-tile-4x4.webm
vp90-2-08-tile-4x4.webm.md5

vpxenc blue_sky_1080p25 --frame-parallel=0 \
--tile-columns=2 --tile-rows=2 \
--lossless=0 --error-resilient=0 \
--min-q=0 --max-q=30 --kf-min-dist=0 --kf-max-dist=9999 \
--cpu-used=0 --codec=vp9 -p 2 --good --fps=25/1 --limit=5

vp90-2-08-tile-4x1.webm
vp90-2-08-tile-4x1.webm.md5

vpxenc blue_sky_1080p25 --frame-parallel=0 \
--tile-columns=0 --tile-rows=2 \
--lossless=0 --error-resilient=0 \
--min-q=0 --max-q=30 --kf-min-dist=0 --kf-max-dist=9999 \
--cpu-used=0 --codec=vp9 -p 2 --good --fps=25/1 --limit=5

Change-Id: I77d0ccf9b721ae5cfa72781fe0d3c534ea43b756
2013-11-12 11:26:26 -08:00
James Zern
ea9b2c0312 add tile test vectors
1920x1080

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

vpxenc blue_sky_1080p25.y4m \
  --codec=vp9 -p 2 \
  --frame-parallel=${fpm} \
  --tile-columns=${tc} \
  --limit=10 \
  --auto-alt-ref=1 \
  --lag-in-frames=5 \
  --target-bitrate=2500

Change-Id: Id9c94b722cc553a6865d443a94e8482c78b038bb
2013-10-28 17:53:20 +01:00
James Zern
798cf80c1e add a test vector with frame parallel mode enabled
vp90-2-07-frame_parallel.webm:
vpxenc stefan_sif.y4m \
  --codec=vp9 -p 2 \
  --frame-parallel=1 \
  --limit=10 \
  --auto-alt-ref=1 \
  --lag-in-frames=5

Change-Id: I7381a69aaaec238b309169a51b34cb6bf29a9c50
2013-10-14 18:50:55 +02:00
Dmitry Kovalev
68a3e4a888 BITSTREAM - RESTORING BILINEAR INTERPOLATION FILTER SUPPORT
Adding appropriate test vector vp90-2-06-bilinear.webm.

Change-Id: Ia3bbf57318e0cc61a1b724fe751e3f9c7e11b337
2013-10-02 18:04:12 -07:00
Adrian Grange
88c8ff2508 Modified resize unit test to output test vector
Modified the resize unit test so that it optionally
writes the encoded bitstream to file. The macro
WRITE_COMPRESSED_STREAM should be set to 1 to enable
output of the test bitstream; it is set to 0 by default.

Change-Id: I7d436b1942f935da97db6d84574a98d379f57fb1
2013-09-17 15:38:30 -07:00
Dmitry Kovalev
890eee3b47 Fixing problem with invalid delta_q reading.
This is a bitstream change but no currently produces videos should
be affected. https://code.google.com/p/webm/issues/detail?id=610

Change-Id: Ic85a6477df6c201cdf7f70f6bd84607b71f4593c
2013-09-04 11:25:43 -07:00
Jim Bankoski
a5cb05c45d Add a test vector that tests color space 444
This adds a test vector for 444 color space.

Change-Id: I1e2ac3883211989a062cfafc0e58151b14d294b8
2013-08-26 15:24:35 -07:00
Dmitry Kovalev
31a68bcdff Fixing vp9_get_pred_context_comp_ref_p function.
Adding missed parenthesis around boolean expressions. Bitstream is changed.
Regenerating test vectors.

Change-Id: I4cc00b761e9473f92f180a9fc3a0c607f0aaae56
2013-07-12 17:46:02 -07:00
Yaowu Xu
df5731273f Merge "Fix loopfilter bug" 2013-07-09 01:34:25 -07:00
John Koleszar
527fc5caf6 Fix loopfilter bug
In the rare case were 4x4 interior filtering was called for but no
8x8 or larger filtering takes place, the previous code was skipping
the filtering. This patch fixes the issue by including the interior
mask in the overall mask for the filter application loops.

Change-Id: I4a0b65056c64f97478827c2ff41e0914fc7779d0
2013-07-08 16:49:57 -07:00
James Zern
66c7dffd5c tests/*source: test file pointer before reading
if the caller did not abort after an ASSERT failure in Begin()
FillFrame() would segfault.

Change-Id: I2d3f5a0918611bbd081be6f686dea19c56695073
2013-06-25 17:57:52 -07:00
John Koleszar
858475a03a Fix loopfilter of leftmost 4x4 edges in SB
For cases where there's no transform set in bit 0 (the left edge of
the SB) but bit 0 of mask_4x4_int is set (the edge 4 pixels from the
left edge needs filtering), it was incorrectly being skipped before.
This situation only happens on the leftmost edge of the image, as
the edge at column 0 is intentionally skipped since there aren't
pixels to the left to read.

Change-Id: Ib2fbbcb40166e90af31b1a0e13b85b68c226cbd3
2013-06-24 08:26:00 -07:00
John Koleszar
639db571df Add some unaligned test vectors
Tests resolutions of 8, 10, 16, 18, 32, 34, 64, 66 to exercise the
border conditions, as well as non-SB aligned sizes.

Change-Id: Ie7c2b7860ac3727e23202042f2e86792652912f8
2013-06-19 11:46:09 -07:00
John Koleszar
119c9812a5 Add vp9 test vectors unit test
These files can stand in until we get proper syntax vectors. They
should provide some additional assurance against inadvertant
bitstream changes.

Change-Id: I12f6c9a5f054e30df40a7ff1f33145abf7e1d59d
2013-06-13 12:54:01 -07:00
Ronald S. Bultje
1407bdc243 [WIP] Add column-based tiling.
This patch adds column-based tiling. The idea is to make each tile
independently decodable (after reading the common frame header) and
also independendly encodable (minus within-frame cost adjustments in
the RD loop) to speed-up hardware & software en/decoders if they used
multi-threading. Column-based tiling has the added advantage (over
other tiling methods) that it minimizes realtime use-case latency,
since all threads can start encoding data as soon as the first SB-row
worth of data is available to the encoder.

There is some test code that does random tile ordering in the decoder,
to confirm that each tile is indeed independently decodable from other
tiles in the same frame. At tile edges, all contexts assume default
values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode),
and motion vector search and ordering do not cross tiles in the same
frame.
t log

Tile independence is not maintained between frames ATM, i.e. tile 0 of
frame 1 is free to use motion vectors that point into any tile of frame
0. We support 1 (i.e. no tiling), 2 or 4 column-tiles.

The loopfilter crosses tile boundaries. I discussed this briefly with Aki
and he says that's OK. An in-loop loopfilter would need to do some sync
between tile threads, but that shouldn't be a big issue.

Resuls: with tiling disabled, we go up slightly because of improved edge
use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf,
~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5%
on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is
concentrated in the low-bitrate end of clips, and most of it is because
of the loss of edges at tile boundaries and the resulting loss of intra
predictors.

TODO:
- more tiles (perhaps allow row-based tiling also, and max. 8 tiles)?
- maybe optionally (for EC purposes), motion vectors themselves
  should not cross tile edges, or we should emulate such borders as
  if they were off-frame, to limit error propagation to within one
  tile only. This doesn't have to be the default behaviour but could
  be an optional bitstream flag.

Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f
2013-02-05 15:43:03 -08:00
John Koleszar
706cafe336 Support multiple codecs in test infrastructure
This commit starts to convert the tests to a system where the codec
to be used is provided by a factory object. Currently no tests are
instantiated for VP9 since they all fail for various reasons, but it
was verified that they're called and the correct codec is
instantiated.

Change-Id: Ia7506df2ca3a7651218ba3ca560634f08c9fbdeb
2013-01-23 14:41:33 -08:00
Yunqing Wang
15dffcfefa Add unit test for decoder test_vector_test
Got 61 test vectors from vp8-test-vectors.git
(http://git.chromium.org/gitweb/?p=webm/vp8-test-vectors.git)

Added decoder test vectors downloading in unit tests. Uploaded
the test vectors and their md5 files to WebM website.
  $ gsutil cp *.* gs://downloads.webmproject.org/test_data/libvpx

Added their sha1sum to the test/test-data.sha1 file.

In unit tests, download the test vectors to LIBVPX_TEST_DATA_PATH.

Test_vector_test goes through the test vectors, decodes them, and
compute the md5 checksums. The checksums are compared with the
expected md5 checksums to tell if the decoder decodes correctly.

Change-Id: Ia1e84f9347ddf1d4a02e056c0fee7d28dccfae15
2012-10-22 13:46:11 -07:00