Граф коммитов

65 Коммитов

Автор SHA1 Сообщение Дата
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 0c8e13d2f8 Merge "Add some unaligned test vectors" 2013-06-21 16:31:18 -07:00
Ronald S. Bultje 25c588b1e4 Add subtract_block SSE2 version and unit test.
3% faster overall (3min35.0 to 3min28.5).

Change-Id: I5ff8a5c2c91586b6632ca5009ad1ea51ce94af5e
2013-06-21 09:35:37 -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
James Zern 5b756748fd tests: clear system state after non-API calls
add ClearSystemState() to reset MMX registers avoiding corrupting
subsequent tests.

Change-Id: I668deb09aa7aa467709776e5819f936910698bc0
2013-06-18 11:32:27 -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
Jim Bankoski 5a88271b09 don't tokenize & encode tokens for blocks in UMV
This avoids encoding tokens for blocks that are entirely
in the UMV border. This changes the bitstream.

Change-Id: I32b4df46ac8a990d0c37cee92fd34f8ddd4fb6c9
2013-06-06 06:10:25 -07:00
John Koleszar 771fc832f3 Merge branch 'master' into experimental
Pick up VP8 encryption, quantization changes, and some fixes to vpxenc

Conflicts:
	test/decode_test_driver.cc
	test/decode_test_driver.h
	test/encode_test_driver.cc
	vp8/vp8cx.mk
	vpxdec.c
	vpxenc.c

Change-Id: I9fbcc64808ead47e22f1f22501965cc7f0c4791c
2013-03-27 10:46:19 -07:00
Dmitry Kovalev 26cec5c13f Basic encryption feature for libvpx.
New decoder control paramter VP8_SET_DECRYPT_KEY to set the decryption key.

Change-Id: I6fc1f44d41f74f3b3f702778af1a6f8f5cc9439f
2013-03-15 18:21:55 -07:00
Yaowu Xu 005552639b removed reference to "LLM" and "x8"
The commit changed the name of files and function to remove obselete
reference to LLM and x8.

Change-Id: I973b20fc1a55149ed68b5408b3874768e6f88516
2013-03-13 08:35:46 -07:00
John Koleszar 522d4bf852 Add 'superframe' index
A 'superframe' is a group of frames that share the same PTS, but have a
defined decoding order. This commit adds the ability to append an index
to such a group of frames, allowing for random access to the constituent
frames. This could be useful for frame-level parallelism or partial
decoding in a multilayer scenario.

Decoding the stream serially without such an index should work as a
fallback, and VP9/TestSuperframeIndexIsOptional verifies that.

Change-Id: Idff83b7560e1a7077d8fb067bfbc45b567e78b1c
2013-03-05 12:45:40 -08:00
John Koleszar 6b653cba02 Add VP9 1 block SAD functions to unit test
Change-Id: I06b5ba5c457944cfa4cd9f53c3bd8cda132439c2
2013-03-01 18:04:19 -08:00
John Koleszar 69c67c9531 Merge master branch into experimental
Picks up some build system changes, compiler warning fixes, etc.

Change-Id: I2712f99e653502818a101a72696ad54018152d4e
2013-03-01 11:06:05 -08:00
Yaowu Xu 3dbc78b134 Enable 32x32 dct tests
Also
1. Removed the test code for fDCT from the iDCT test.
2. changed the criteria of round trip error to be below 1/block, this
is quite strict comparing to smaller transforms when size differences
are accounted for.

Change-Id: Idb46a6380b04c93fc8e2845c75f5a850366b0090
2013-02-26 09:23:01 -08:00
Yaowu Xu 499fe05dc0 optimize forward 16x16 DCT for accuracy
This commit added pre/post scaling for first half of fDCT16x16 to
reduce error, by simulation of 100,000 blocks for random inputs,
the average sse reduced from 2.1/block to 0.0498/block.

also enabled tests for 16x16 fDCT and iDCT

Change-Id: Id2a95f0464c6dd4118797d456237ae90274c0f02
2013-02-25 07:47:27 -08:00
Yaowu Xu 22012ee994 optimize 8x8 fdct rounding for accuracy
The commit added a final rounding choice for 8x8 forward dct to get
rid of a sign bias at DC position and improve the accuracry in term
of round trip error for 8x8 fDCT/iDCT.

This commit also enabled forward 8x8 dct test.

Change-Id: Ib67f99b0a24d513e230c7812bc04569d472fdc50
2013-02-22 16:55:30 -08:00
James Zern 1711cf2dbb add vp8 variance test
Change-Id: I4e94ee2c4e2360d6a11a454c323f2899c1bb6f72
2013-02-22 16:25:14 -08:00
Yaowu Xu 4e2697f5cd changes related fdct/idct tests
1. changed 4x4 test name to Vp9Fdct4x4Test to be consistent
2. remove forward 8x8 dct test code from idct8x8_test.cc
3. temporarily disable other forward dct tests to allow fdct work in
progress

Change-Id: I566aeed9c7c34da5a206190aa7d0e847a4008b36
2013-02-22 10:39:31 -08:00
John Koleszar 3de8ee6ba1 Merge changes Ife0d8147,I7d469716,Ic9a5615f into experimental
* changes:
  Restore SSSE3 subpixel filters in new convolve framework
  Convert subpixel filters to use convolve framework
  Add 8-tap generic convolver
2013-02-08 13:19:47 -08: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 5ca6a3667f Add 8-tap generic convolver
This commit introduces a new convolution function which will be used to
replace the existing subpixel interpolation functions. It is much the
same as the existing functions, but allows for changing the filter
kernel on a per-pixel basis, and doesn't bake in knowledge of the
filter to be applied or the size of the resulting block into the
function name.

Replacing the existing subpel filters will come in a later commit.

Change-Id: Ic9a5615f2f456cb77f96741856fc650d6d78bb91
2013-02-05 14:19:28 -08:00
Yaowu Xu ebd5808970 enable 16x16 iDCT unit test
test for forward transform will be enabled later after re-do forward
transform

Change-Id: Ie7c7cf88baf7ecbebbe52fe027e1c3b33d3b9d49
2013-02-04 09:03:32 -08:00
Deb Mukherjee 01cafaab1d Adds an error-resilient mode with test
Adds an error-resilient mode where frames can be continued
to be decoded even when there are errors (due to network losses)
on a prior frame. Specifically, backward updates are turned off
and probabilities of various symbols are reset to defaults at
the beginning of each frame. Further, the last frame's mvs are
not used for the mv reference list, and the sorting of the
initial list based on search on previous frames is turned off
as well.

Also adds a test where an arbitrary set of frames are skipped
from decoding to simulate errors. The test verifies (1) that if
the error frames are droppable - i.e. frame buffer updates have
been turned off - there are no mismatch errors for the remaining
frames after the error frames; and (2) if the error-frames are non
droppable, there are not only no decoding errors but the mismatch
PSNR between the decoder's version of the post-error frames and the
encoder's version is at least 20 dB.

Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
2013-01-23 21:56:15 -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
Ronald S. Bultje aa2effa954 Merge tx32x32 experiment.
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833
2013-01-10 08:23:59 -08:00
John Koleszar 879cb7d962 Merge vp9-preview changes into experimental branch
Incorportate vp9-preview changes by merging master branch into experimental.

Conflicts:
	test/test.mk
	vp9/common/vp9_filter.c
	vp9/common/vp9_idctllm.c
	vp9/common/vp9_invtrans.h
	vp9/common/vp9_mbpitch.c
	vp9/common/vp9_rtcd_defs.sh
	vp9/common/vp9_systemdependent.h
	vp9/common/vp9_type_aliases.h
	vp9/common/x86/vp9_asm_stubs.c
	vp9/common/x86/vp9_subpixel_mmx.asm
	vp9/decoder/vp9_decodframe.c
	vp9/decoder/vp9_dequantize.c
	vp9/decoder/vp9_dequantize.h
	vp9/decoder/vp9_onyxd_int.h
	vp9/encoder/vp9_bitstream.c
	vp9/encoder/vp9_encodeframe.c
	vp9/encoder/vp9_rdopt.c

Change-Id: I17f51c3666d1b59cf1a699f87607cbc5d30a87c5
2013-01-08 10:19:59 -08:00
John Koleszar 16810c10c1 Merge branch 'vp9-preview' of review:webm/libvpx
Merge the vp9-preview branch into master.

Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-27 09:37:19 -08:00
John Koleszar 5ebe94f9f1 Build fixes to merge vp9-preview into master
Various fixups to resolve issues when building vp9-preview under the more stringent
checks placed on the experimental branch.

Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-12-26 11:21:09 -08:00
Ronald S. Bultje c456b35fdf 32x32 transform for superblocks.
This adds Debargha's DCT/DWT hybrid and a regular 32x32 DCT, and adds
code all over the place to wrap that in the bitstream/encoder/decoder/RD.

Some implementation notes (these probably need careful review):
- token range is extended by 1 bit, since the value range out of this
  transform is [-16384,16383].
- the coefficients coming out of the FDCT are manually scaled back by
  1 bit, or else they won't fit in int16_t (they are 17 bits). Because
  of this, the RD error scoring does not right-shift the MSE score by
  two (unlike for 4x4/8x8/16x16).
- to compensate for this loss in precision, the quantizer is halved
  also. This is currently a little hacky.
- FDCT and IDCT is double-only right now. Needs a fixed-point impl.
- There are no default probabilities for the 32x32 transform yet; I'm
  simply using the 16x16 luma ones. A future commit will add newly
  generated probabilities for all transforms.
- No ADST version. I don't think we'll add one for this level; if an
  ADST is desired, transform-size selection can scale back to 16x16
  or lower, and use an ADST at that level.

Additional notes specific to Debargha's DWT/DCT hybrid:
- coefficient scale is different for the top/left 16x16 (DCT-over-DWT)
  block than for the rest (DWT pixel differences) of the block. Therefore,
  RD error scoring isn't easily scalable between coefficient and pixel
  domain. Thus, unfortunately, we need to compute the RD distortion in
  the pixel domain until we figure out how to scale these appropriately.

Change-Id: I00386f20f35d7fabb19aba94c8162f8aee64ef2b
2012-12-07 14:45:05 -08:00
James Zern eebb648380 tests: add xmm register check for win64 targets
Change-Id: I69d00bfd1b10c03581838b15cd9a6dd66f4fa416
2012-11-27 17:17:22 -08:00
John Koleszar 1760c39bce Revert "make: flatten object file directories"
This reverts commit b72373de79.

Change-Id: Ic1601160e11df1a018ef12da25967cfb5eebd5ba
2012-11-27 16:36:39 -08:00
John Koleszar b72373de79 make: flatten object file directories
Rather than building an object file directory heirarchy matching the
source tree's layout, rename the object files so that the object
file name contains the path in the source file tree. The intent here
is to allow two files in different parts of the source tree to have
the same name and still not collide when put into an ar archive.

Change-Id: Id627737dc95ffc65b738501215f34a995148c5a2
2012-11-15 10:44:58 -08:00
John Koleszar 8959c8b11d Merge with upstream experimental changes (2)
Include upstream changes (variance fixes) into the merged code base.

Change-Id: I4182654c1411c1b15cd23235d3822702613abce1
2012-11-07 14:32:26 -08:00
John Koleszar 2c08c28191 Merge with upstream experimental changes
Include upstream changes (unit test fixes, in particular) into the
merged code base.

Change-Id: I096f8a9d09e2532fbec0c95d7a995ab22fa54b29
2012-11-07 11:46:23 -08:00
John Koleszar 7b8dfcb5a2 Rough merge of master into experimental
Creates a merge between the master and experimental branches. Fixes a
number of conflicts in the build system to allow *either* VP8 or VP9
to be built. Specifically either:

  $ configure --disable-vp9 $ configure --disable-vp8
  --disable-unit-tests

VP9 still exports its symbols and files as VP8, so that will be
resolved in the next commit.

Unit tests are broken in VP9, but this isn't a new issue. They are
fixed upstream on origin/experimental as of this writing, but rebasing
this merge proved difficult, so will tackle that in a second merge
commit.

Change-Id: I2b7d852c18efd58d1ebc621b8041fe0260442c21
2012-11-07 11:30:16 -08:00
James Zern 984734436d Fix variance (signed integer) overflow
In the variance calculations the difference is summed and later squared.
When the sum exceeds sqrt(2^31) the value is treated as a negative when
it is shifted which gives incorrect results.

To fix this we force the multiplication to be unsigned.

The alternative fix is to shift sum down by 4 before multiplying.
However that will reduce precision.

For 16x16 blocks the maximum sum is 65280 and sqrt(2^31) is 46340 (and
change).

This change is based on:
1698234 Missed some variance casts
fea3556 Fix variance overflow

Change-Id: I2c61856cca9db54b9b81de83b4505ea81a050a0f
2012-11-06 23:06:44 -08:00
Jim Bankoski 533470c998 add unit test for datarate control
Adds some basic datarate control tests..

Change-Id: I6eff18aa58ef7cfd14886c6b1e048247cd1ad247
2012-10-29 19:54:06 -07: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
Deb Mukherjee a7333b0a5b Merge of the TX_16X16 experiment
Change-Id: I22aa803ffff330622cdb77277e7b196a9766f882
2012-10-10 17:05:54 -07:00
Adrian Grange 55cff377dd Merge "Unit Test for Error Resilience Mode" 2012-10-04 17:33:55 -07:00
Ronald S. Bultje 1a89bc04e8 Add a unit test for CQ mode.
Change-Id: I66c391987eabc5ea0159bf4a2a4fd8e8e163872f
2012-10-04 16:38:21 -07:00
Adrian Grange cc017ca8df Unit Test for Error Resilience Mode
This unit test compares the difference in quality with
error resilience enabled and disabled. The test runs
for all of the one-pass encoding modes.

The test ensures that the effect of turning on error
resilience makes less than a 10% difference in PSNR.

Further cases should be added to do a more comprehensive
test.

Change-Id: I1fc747fc78c9459bc6c74494f4b38308dbed0c32
2012-10-03 14:58:26 -07:00
Scott LaVarnway 96f706655e Added unit test for subtract functions
Patch Set 1: gain familiarity with unit tests... added simple
4x4 subtract test
Patch Set 2: fixed mistakes, parameterized as suggested
Patch Set 3: randomized the source/predictor data


Change-Id: I33432bdf7c9f2a9b8c2533a37106382c2a8209ee
Signed-off-by: Scott LaVarnway <slavarnway@google.com>
2012-09-26 13:45:53 -07:00
Yaowu Xu c953aeacd4 added encode/decode matching validation to tests
This commit adds the ability of validating matched encoder and
decoder to unit tests.

Change-Id: Ie00d69a42477b6a69b324a6bd134939684f7300b
2012-08-31 13:43:51 -07:00
James Zern 429743c56b fix timestamp calculation rollover w/altref
using large values for the timebase, e.g., {33333, 1000000} could
rollover the timestamp calculation in vp8e_encode as it was not using
64-bit math.

originally reported on ffmpeg's trac:
  https://ffmpeg.org/trac/ffmpeg/ticket/1014

BUG=468

Change-Id: Iedb4e11de086a3dda75097bfaf08f2488e2088d8
2012-08-08 14:30:49 -07:00
Daniel Kang fed8a1837f 16x16 DCT blocks.
Set on all 16x16 intra/inter modes

Features:
- Butterfly fDCT/iDCT
- Loop filter does not filter internal edges with 16x16
- Optimize coefficient function
- Update coefficient probability function
- RD
- Entropy stats
- 16x16 is a config option

Have not tested with experiments.

hd:     2.60%
std-hd: 2.43%
yt:     1.32%
derf:   0.60%

Change-Id: I96fb090517c30c5da84bad4fae602c3ec0c58b1c
2012-08-02 17:33:10 -07:00
Johann fbea897d85 Add tests for SAD functions
Change-Id: I018335a08cbb1eca55896c21e36918ed45a4b2a8
2012-07-25 17:11:16 -07:00
Paul Wilkins 903efe8a2f Added unit test of vp8_set_roimap()
Change-Id: I99937cbdd6bfe52b7c8ae42f05526dfc06a602f4
2012-07-24 10:48:44 +01:00
Johann c0e80959ce Move ACMRandom to acm_random.h
Change-Id: I1d99c56d1e1f521507978737fc661ca90af72507
2012-07-20 14:29:35 -07:00
Yunqing Wang e61573c5f4 Add unit test for vp8_sixtap_predict functions
This unit test tests vp8_sixtap_predict function against preset
data and random generated data. The test against preset data
checks the correctness of the functions, and the test against
random data checks if the optimized six-tap predictor functions
generate matching result as the c functions. It tests the
following functions:
vp8_sixtap_predict16x16_c
vp8_sixtap_predict16x16_mmx
vp8_sixtap_predict16x16_sse2
vp8_sixtap_predict16x16_ssse3

vp8_sixtap_predict8x8_c
vp8_sixtap_predict8x8_mmx
vp8_sixtap_predict8x8_sse2
vp8_sixtap_predict8x8_ssse3

vp8_sixtap_predict8x4_c
vp8_sixtap_predict8x4_mmx
vp8_sixtap_predict8x4_sse2
vp8_sixtap_predict8x4_ssse3

vp8_sixtap_predict4x4_c
vp8_sixtap_predict4x4_mmx
vp8_sixtap_predict4x4_ssse3

Change-Id: I6de097898ebca34a4c8020aed1e8dde5cd3e493b
2012-07-10 09:56:35 -07:00