Commit Graph

97 Commits

Author SHA1 Message Date
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
55657aac49 Fix wrong pitch argument in dct32x32 unit test.
Change-Id: Id9474a1686daebfa3d004e21823bf1888ec9e534
2013-01-10 08:36:42 -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
Yaowu Xu
c681887652 fixed build issue with round()
not defined in msvc

Change-Id: I8fe8462a0c2f636d8b43c0243832ca67578f3665
2012-12-13 15:15:56 -08:00
John Koleszar
6f014dc5ad libvpx_test: ensure rtcd init functions are called
In addition to allowing tests to use the RTCD-enabled functions (perhaps transitively)
without having run a full encode/decode test yet, this fixes a linking issue with
Apple's G++ whereby the Common symbols (the function pointers themselves) wouldn't
be resolved. Fixing this linking issue is the primary impetus for this patch, as none
of the tests exercise the RTCD functionality except through the main API.

Change-Id: I12aed91ca37a707e5309aa6cb9c38a649c06bc6a
2012-12-07 17:21:53 -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
John Koleszar
434336b072 libvpx_test: ensure rtcd init functions are called
In addition to allowing tests to use the RTCD-enabled functions (perhaps transitively)
without having run a full encode/decode test yet, this fixes a linking issue with
Apple's G++ whereby the Common symbols (the function pointers themselves) wouldn't
be resolved. Fixing this linking issue is the primary impetus for this patch, as none
of the tests exercise the RTCD functionality except through the main API.

Change-Id: I12aed91ca37a707e5309aa6cb9c38a649c06bc6a
2012-12-06 14:02:36 -08:00
Yaowu Xu
c202100fe4 Enable unit tests to build with MSVC
Change-Id: Ie80597221bee494679ae2ba50cca22dea2609cba
2012-12-04 12:29:26 -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
fcccbcbb39 Add vp9_ prefix to all vp9 files
Support for gyp which doesn't support multiple objects in the same
static library having the same basename.

Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc
2012-11-27 14:12:30 -08:00
Yaowu Xu
89d62e3b04 remove the dependency on idct.h
Change-Id: Idcf827d8ae6429ee5b673c3398f838dbeacb4e74
2012-11-26 09:12:04 -08:00
Jim Bankoski
510557e2eb removed the idct rtcd idct calls
More cleanup to do after this,  but this is a good chunk of removing rtcd.

Change-Id: I551db75e341a0a85c3ad650df1e9a60dc305681a
2012-11-24 19:33:58 -08:00
John Koleszar
a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -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
Marco Paniconi
cd7f6841aa Update to datarate_test.
Exlcude key frame from buffer underrun check, and increase
lowest bitrate in BasicBufferModel.
Both changes are needed because of a known issue (#495).

Change-Id: If5e994f813d7d5ae870c1a72be404c8f7dbbdf27
2012-11-14 15:10:42 -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
James Zern
2e3e685799 fix test builds
s/([vV][pP])8/$19/
additionally dct.h was removed; declare the _c functions that are used
in the tests. the TODO for conversion to parameterized tests still
remains.

Change-Id: I73db9425a57075bbb78a92693ba6b320578981cd
2012-11-06 12:12:58 -08:00
Ronald S. Bultje
4b2c2b9aa4 Rename vp8/ codec directory to vp9/.
Change-Id: Ic084c475844b24092a433ab88138cf58af3abbe4
2012-11-01 16:31:22 -07: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
Jim Bankoski
65d73881f7 Minor tweaks to video source frameworks
Fix the video source to close if file is open already and add a limit.

Change-Id: I36ada4c609d027b6eaa9b447fe9ad4115532edc1
2012-10-26 19:49:44 -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
Yunqing Wang
8b698e8cb1 Merge "post-proc: deblock filter optimization" 2012-10-09 09:26:36 -07:00
Yunqing Wang
4c53bacce4 post-proc: deblock filter optimization
1. Algorithm modification:
Instead of having same filter threshold for a whole frame, now we
allow the thresholds to be adjusted for each macroblock. In current
implementation, to avoid excessive blur on background as reported
in issue480(http://code.google.com/p/webm/issues/detail?id=480), we
reduce the thresholds for skipped macroblocks.

2. SSE2 optimization:
As started in issue479(http://code.google.com/p/webm/issues/detail?id=479),
the filter calculation was adjusted for better performance. The c
code was also modified accordingly. This made the deblock filter
2x faster, and the decoder was 1.2x faster overall.

Next, the demacroblock filter will be modified similarly.

Change-Id: I05e54c3f580ccd427487d085096b3174f2ab7e86
2012-10-08 12:06:44 -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
eb8e9f80c4 Merge "Added handler for PSNR packets to EncoderTest class" 2012-10-04 10:38:35 -07:00
Adrian Grange
85b27a1271 Merge "Add initialization and per frame flag members" 2012-10-04 10:37:38 -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
Adrian Grange
e6109dbd41 Added handler for PSNR packets to EncoderTest class
Added a virtual function to handle PSNR packets.

Change-Id: Id2a6372c691a14f19bbeed217a93a9df03e81e75
2012-10-03 14:23:47 -07:00
Adrian Grange
4206c6dd01 Add initialization and per frame flag members
Modified EncoderTest class to have separate member variables
for initialization time and per-frame.

Change-Id: I08a1901f8f3ec16e45f96297e08e7f6df0f4aa0b
2012-10-03 14:13:15 -07:00
Adrian Grange
f199bab7ab Merge "Added Reset method to TwopassStatsStore" 2012-10-03 13:45:46 -07:00
Adrian Grange
30f58b526d Added Reset method to TwopassStatsStore
The stats buffer needs to be reset between runs of the
encoder. I added a Reset() function to TwopassStatsStore
and called it at the beginning of each encode.

This enables us to run multiple encodes which was
previously not possible since there was no way to reset
the stats between runs.

Change-Id: Iebb18dab83ba9331f009f764cc858609738a27f9
2012-10-03 11:50:54 -07:00
John Koleszar
ea90cee2a9 Merge "Added unit test for subtract functions" 2012-10-03 08:17:16 -07:00
Jim Bankoski
6f35b1958e Disable keyframe in real time that's placed one frame after a cut.
The codec as it stood placed a keyframe one frame after a
real cut scene - and ignored datarate and other considerations.

TODO: Its possible that we should detect a keyframe and recode
the frame ( in certain circumstances) to improve quality.

Change-Id: Ia1fd6d90103f4da4d21ca5ab62897d22e0b888a8
2012-10-01 14:17:43 -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
10f8b36146 msvs/tests: fix data alignment for asm tests
Replace DECLARE_ALIGNED_ with vpx_memalign()

DECLARE_ALIGNED (__declspec(align())) does not work as intended when
used on class data members:

Data in classes or structures is aligned within the class or structure
at the minimum of its natural alignment and the current packing setting
(from #pragma pack or the /Zp compiler option)

Change-Id: I304aaa6c3716fbfae24675ecf192f4b40787e83e
2012-08-31 10:23:32 -07:00
Yaowu Xu
95ee7f1131 change to properly account for coef scaling in unit tests
The transform functions in experimental branch absorbed a scaling
factor of 4 to allow quantization steps closer to unit quantizer.
This commit added scaling code in between forward and inverse
transform to properly account for the scaling factor.

Change-Id: I9a573ddc1ffa74973b34800a5da1a56dbabe0949
2012-08-24 10:11:15 -07:00
James Zern
8bec177dc4 Merge "sad_test: fix msvc build" 2012-08-21 13:33:46 -07:00
James Zern
12ddb75a9a sad_test: fix msvc build
pass a variable to make_tuple() rather than a function, fixes type
errors

Change-Id: Ic0cbd25d0ca35ad08c672040b4141b3b81695752
2012-08-21 08:32:00 -07:00
James Zern
e57394aa1d sixtap_predict_test: fix msvc build
pass a variable to make_tuple() rather than a function, fixes type
errors

Change-Id: I5e04b61b5ab58cc0090ef21119486ca04853af61
2012-08-21 08:30:26 -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