summaryrefslogtreecommitdiff
path: root/test/variance_test.cc
AgeCommit message (Collapse)Author
2016-01-13Revert "Merge "Change highbd variance rounding to prevent negative variance.""Alex Converse
This reverts commit ea48370a500537906d62544ca4ed75301d79e772, reversing changes made to 15939cb2d76c773950cda40988ede89e111872ea. The commit was insufficiently tested and causes failures. Change-Id: I623d6fc2cd3ae6fd42d0abab1f8eada465ae57a7
2015-11-24Change highbd variance rounding to prevent negative variance.Alex Converse
Always round sum error and sum square error toward zero in variance calculations. This prevents variance from becoming negative. Avoiding rounding variance at all might be better but would be far more invasive. Change-Id: Icf24e0e75ff94952fc026ba6a4d26adf8d373f1c
2015-11-06variance_test: create fn pointers w/'&' refJames Zern
this helps some toolchains (vs9) resolve the type of the parameter Change-Id: I8c83b86da53b1783cd18c0f765b67ba33da91d72
2015-07-29Cosmetics - Fix header file order in unit testsJingning Han
Change-Id: I9582a8d74990125b71e8fe620f7f3f2585a30798
2015-07-08mips msa vp9 avg subpel variance optimization rebasedParag Salasakar
Change-Id: Ia21987010dbb688e2a8fa204ca9129d2f34c9581
2015-07-07Move sub pixel variance to vpx_dspJohann
Change-Id: I66bf6720c396c89aa2d1fd26d5d52bf5d5e3dff1
2015-07-06mips msa vp9 subpel variance optimizationParag Salasakar
Change-Id: If88401bf8c5d8ee58200278734d7a5058d1585d0
2015-07-02Revert "mips msa vp9 subpel variance optimization"James Zern
This reverts commit a42df86c035d1bc007dbc816b4b758605135d6d9. this change causes MSA/VP9SubpelVarianceTest.Ref and MSA/VP9SubpelVarianceTest.ExtremeRef failures under mips32r5el-msa-linux-gnu and mips64r6el-msa-linux-gnu Change-Id: I40b71a0b774eaeb31f66f795733f95cf360909f7
2015-07-02Revert "mips msa vp9 avg subpel variance optimization"James Zern
This reverts commit 61774ad1c44c73ccde48a2e3456e86196965b5dc. this change causes MSA/VP9SubpelAvgVarianceTest.Ref failures under mips32r5el-msa-linux-gnu and mips64r6el-msa-linux-gnu Change-Id: I7fb520c12b2a3b212d5e84b7619a380a48e49bb0
2015-07-01mips msa vp9 avg subpel variance optimizationParag Salasakar
average improvement ~3x-5x Change-Id: Iefbcafc05daab77b38a4e63b551e427867a501a4
2015-07-01mips msa vp9 subpel variance optimizationParag Salasakar
average improvement ~3x-5x Change-Id: I4cbba2711467b0e205904769ebbb4a1fcbb1a311
2015-06-30mips msa vpx_dsp variance optimizationParag Salasakar
average improvement ~2x-4x Change-Id: Ia3eef3f390148c2eb5cdc580a94cb26369737f82
2015-06-11variance_test: fix build w/--disable-vp8-encoderJames Zern
s/CONFIG_VP8\b/CONFIG_VP8_ENCODER/ Change-Id: I616aace9cf8f18d7e83f00f7aef3b8a26fc4c17b
2015-06-05disable vp8_sub_pixel_variance8x8_neonJames Zern
fails unit tests: [ FAILED ] NEON/VP8SubpelVarianceTest.ExtremeRef/0, where GetParam() = (3, 3, 0x14e36d, 0) [ FAILED ] NEON/VP8SubpelVarianceTest.Ref/0, where GetParam() = (3, 3, 0x14e36d, 0) the tests were recently enabled in: eb88b17 Make vp9 subpixel match vp8 the functions likely haven't changed since being converted from assembly Change-Id: I6141717b111b8f735f436c160d74270af53ef722
2015-06-03Make vp9 subpixel match vp8Johann
The only difference between the two was that the vp9 function allowed for every step in the bilinear filter (16 steps) while vp8 only allowed for half of those. Since all the call sites in vp9 (<< 1) the input, it only ever used the same steps as vp8. This will allow moving the subpel variance to vpx_dsp with the rest of the variance functions. Change-Id: I6fa2509350a2dc610c46b3e15bde98a15a084b75
2015-06-02Unify reference variance functionsJohann
Use uint32_t for all output and make all functions static Change-Id: I2c9c6f6310732dc53444607d1c1a268ac1ab83ba
2015-06-01Cast variance reference outputJohann
The larger internal variables are required for the intermediates but RoundHighBitDepth brings them down to uint32_t/unsigned int. Fixes type warnings in visual studio. Change-Id: I48d35284d6cbde330ccdc1f46b6215a645d5eb00
2015-05-28Merge "Use correct parameters for NEON variance tests"Johann
2015-05-28Use correct parameters for NEON variance testsJohann
Change-Id: Ib2949d0a3e9273e7952bbf91956357c1138093f1
2015-05-27Remove conversion warnings from hbd shiftsJohann
ROUND_POWER_OF_TWO has some poor side effects when used with [u]int64_t such as doing the shifting in 32bits. Change-Id: Ic85a19765cd316fb43657cb21c86f35ceb772773
2015-05-27Correct case in Get4x4SSEFuncJohann
Change-Id: Ie8a7508798fa8e65c579a77cedb8305cee4ddc81
2015-05-26Move variance functions to vpx_dspJohann
subpel functions will be moved in another patch. Change-Id: Idb2e049bad0b9b32ac42cc7731cd6903de2826ce
2015-05-13Relocate memory operations for common codeJohann
With the sad functions, and hopefully the variance functions soon, moving to the vpx_dsp location, place the defines used in the reference C code in a common location. Change-Id: I4c8ce7778eb38a0a3ee674d2f1c488eda01cfeca
2015-01-14Add 64x64 sub_pel_variance Neon functionFrank Galligan
On Nexus 7 speed -5, -6, -7, and -8 saw about a 15% increase in perf for 480p. Speeds -5, -6, -7, and -8 saw about a 10% increase in perf for 720p. Tested on Nexus 7, built with ndk r10d, gcc 4.9. Change-Id: I2fa5315845e3021c9a6e2ea47e52e68b398d8334
2015-01-13Add 64x variance Neon functionsFrank Galligan
Add optimized Neon functions of: vp9_variance32x64 vp9_variance64x32 vp9_variance64x64 On Nexus 7 speed -5 and -6 saw about a 4% increase in perf. Speeds -7 and -8 saw about a 6% increase in perf. Tested on Nexus 7, built with ndk r10d, gcc 4.9. Change-Id: I5a81f13c9897eb927fa39662530f5524a0f768fa
2014-11-14Added sse2 acceleration for highbitdepth variancePeter de Rivaz
Change-Id: I446bdf3a405e4e9d2aa633d6281d66ea0cdfd79f (cherry picked from commit d7422b2b1eb9f0011a8c379c2be680d6892b16bc) (cherry picked from commit 6d741e4d76a7d9ece69ca117d1d9e2f9ee48ef8c)
2014-09-15VP8 encoder for ARMv8 by using NEON intrinsics 1Scott LaVarnway
Add vp8_mse16x16_neon.c - vp8_mse16x16_neon - vp8_get4x4sse_cs_neon Change-Id: I108952f60a9ae50613f0ce3903c2c81df19d99d0 Signed-off-by: James Yu <james.yu@linaro.org>
2014-09-06Replacing vp9_get_mb_ss_sse2 asm implementation with intrinsics.Dmitry Kovalev
Change-Id: Ib4f5dd733eb2939b108070a01e83da5d9990bac0
2014-09-04Actually resetting random generator for all variance test cases.Dmitry Kovalev
Calling Reset(int) method instead of overloaded operator()(int). Adding underscore at the end of class member name. Change-Id: I01934e7bc056d4b594e5d05d693328febd34ac3c
2014-08-29Removing variance MMX code.Dmitry Kovalev
Removed functions: * vp9_mse16x16_mmx * vp9_get_mb_ss_mmx * vp9_get4x4var_mmx * vp9_get8x8var_mmx * vp9_variance4x4_mmx * vp9_variance8x8_mmx * vp9_variance16x16_mmx * vp9_variance16x8_mmx * vp9_variance8x16_mmx They all have SSE2 equivalent. Change-Id: I3796f2477c4f59b35b4828f46a300c16e62a2615
2014-08-07Fix bug 807levytamar82
in the sub_pixel_*variance* function the dst is aligned to 16 bytes and not to 32 bytes - now load unaligned data Change-Id: I2e0b9745543697efc56fefa32857ea10117af135
2014-08-01Neon version of vp9_sub_pixel_variance8x8(),Scott LaVarnway
vp9_variance8x8(), and vp9_get8x8var(). On a Nexus 7, vpxenc (in realtime mode, speed -12) reported a performance improvement of ~1.2%. Change-Id: I8a66ac2a0f550b407caa27816833bdc563395102
2014-07-31Neon version of vp9_sub_pixel_variance32x32(),Scott LaVarnway
vp9_variance32x32(), and vp9_get32x32var(). Change-Id: I8137e2540e50984744da59ae3a41e94f8af4a548
2014-07-30Neon version of vp9_sub_pixel_variance16x16(),Scott LaVarnway
vp9_variance16x16(), and vp9_get16x16var(). On a Nexus 7, vpxenc (in realtime mode, speed -12) reported a performance improvement of ~16.7%. Change-Id: Ib163aa99f56e680194aabe00dacdd7f0899a4ecb
2014-07-24Allocate aligned source in variance testYunqing Wang
The source buffer is an aligned buffer in VP9. Added the alignment to make it consistent with libvpx. Change-Id: I3ebb9d2e8555ed532951da479dd5cbbb8812e02d
2014-07-10tests: add API_REGISTER_STATE_CHECKJames Zern
used to wrap API functions to ensure full environment consistency as opposed to the renamed ASM_REGISTER_STATE_CHECK which is used with assembly functions. currently checks the FPU tag word in x86/x86_64 gcc builds to ensure emms has been called. Change-Id: Ie241772dbf903d33d516a1add4c8c6783f2e1490
2014-06-10vp9_sub_pixel_*variance*: disable avx2 variantsJames Zern
tests failing under Win32/Win64 + variance_test: add missing avx2 functions (partially disabled) Change-Id: I6abc0657ea076379ab9ca65c12678b9ea199849d
2014-05-08Revert "Removing redundant variables from variance_test.cc."James Zern
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e. The constants are necessary to avoid breakage in vs9 builds: warning C4180: qualifier applied to function type has no meaning; ignored error C2436: 'f2_' : member function or nested class in constructor initializer list while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))' ..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-07Removing redundant variables from variance_test.cc.Dmitry Kovalev
Change-Id: Icd44bce1c9d292f6e6f4d5157b694f6170b7b289
2014-02-26variance_test: add NEON functionsJames Zern
note not all functions have NEON implementations: - variance4x4_neon Change-Id: I03c1ba21f3b02aa2482d7ca8feedc3ef74b5947f
2014-01-23test/: remove unnecessary extern "C"sJames Zern
Change-Id: I826655a708010149de231ca31a2e3ba4f1842c0c
2013-09-17fix vp8-only buildJames Zern
Change-Id: Id9ce44f3364dd57b30ea491d956a2a0d6186be05
2013-09-06cleanup cpplint warningsYaowu Xu
Suggested by James Zern to clear out cpplint warnings for all unit test code. Change-Id: I731a3fa4d2a257eb9ef733426ba84286fbd7ea34
2013-08-06variance x86inc guardsJim Bankoski
also fixed bug in sad calcs Change-Id: I6571fcbe37556c16ae32be66dc0fd879852aac1d
2013-06-26variance_test: add missing ClearSystemState...James Zern
...to recently added SubpelVarianceTest Change-Id: I8775e39fd5dbfba81ad42b79b47bf6dd6ca8cc0e
2013-06-21Allocate memory using appropriate expected alignment in unit tests.Ronald S. Bultje
Fixes crashes of test_libvpx on 32-bit Linux. Change-Id: If94e7628a86b788ca26c004861dee2f162e47ed6
2013-06-21variance_test: use REGISTER_STATE_CHECKJames Zern
Change-Id: Id54ad9a781634f075e990d5bade5be8490959975
2013-06-20SSE2/SSSE3 optimizations and unit test for sub_pixel_avg_variance().Ronald S. Bultje
Encoding of bus @ 1500kbps (first 50 frames) goes from 3min57 to 3min35, i.e. approximately a 10.5% speedup. Note that the SIMD versions which use a bilinear filter (x_offset & 7 || y_offset & 7) aren't perfectly interleaved, and can probably be improved further in the future. I've marked this with a few TODOs/FIXMEs in the code. Change-Id: I5c9e900c0f0d32e431a50fecae213b510b2549f9
2013-06-20Implement sse2 and ssse3 versions for all sub_pixel_variance sizes.Ronald S. Bultje
Overall speedup around 5% (bus @ 1500kbps first 50 frames 4min10 -> 3min58). Specific changes to timings for each function compared to original assembly-optimized versions (or just new version timings if no previous assembly-optimized version was available): sse2 4x4: 99 -> 82 cycles sse2 4x8: 128 cycles sse2 8x4: 121 cycles sse2 8x8: 149 -> 129 cycles sse2 8x16: 235 -> 245 cycles (?) sse2 16x8: 269 -> 203 cycles sse2 16x16: 441 -> 349 cycles sse2 16x32: 641 cycles sse2 32x16: 643 cycles sse2 32x32: 1733 -> 1154 cycles sse2 32x64: 2247 cycles sse2 64x32: 2323 cycles sse2 64x64: 6984 -> 4442 cycles ssse3 4x4: 100 cycles (?) ssse3 4x8: 103 cycles ssse3 8x4: 71 cycles ssse3 8x8: 147 cycles ssse3 8x16: 158 cycles ssse3 16x8: 188 -> 162 cycles ssse3 16x16: 316 -> 273 cycles ssse3 16x32: 535 cycles ssse3 32x16: 564 cycles ssse3 32x32: 973 cycles ssse3 32x64: 1930 cycles ssse3 64x32: 1922 cycles ssse3 64x64: 3760 cycles Change-Id: I81ff6fe51daf35a40d19785167004664d7e0c59d
2013-06-18tests: clear system state after non-API callsJames Zern
add ClearSystemState() to reset MMX registers avoiding corrupting subsequent tests. Change-Id: I668deb09aa7aa467709776e5819f936910698bc0