Commit Graph

543 Commits

Author SHA1 Message Date
Martin Storsjö
09fcc93575 Initialize iLastCorrectFrameNum in GetOptionLTR_ALLLTR
This avoids valgrind warnings about uninitialized variables
in case the random uiIDRPicId actually turns out to be correct.
2015-03-16 11:08:49 +02:00
ruil2
ae9c5e2516 update vui parameters 2015-03-13 19:11:10 +08:00
ruil2
c109f4dc8d add VUI for base layer 2015-03-13 14:31:08 +08:00
huashi
82cd357bae fixed bug for UT--setoptionParamExt 2015-03-06 13:47:08 +08:00
Sijia Chen
2c44dbae5c [UT] add more condition to improve the coverage of DecoderCrashTest
https://rbcommons.com/s/OpenH264/r/1132/
2015-03-05 13:22:48 +08:00
huili2
06b8e1abb7 allow slice-level data come in for parse only 2015-03-04 00:57:43 -08:00
Martin Storsjö
c301db696e Remove a stray srand
The individual tests shouldn't reseed the random number generator
(other than for local debugging).

Hardcoding a specific random seed here leads to this test (and
all subsequent tests) not testing things randomly as intended, but
always testing the same parameters.
2015-02-27 12:06:44 +02:00
Martin Storsjö
7208ed14b1 Store a const char* instead of a std::string in gtest parameter arrays
This avoids valgrind warnings about using unintialized data.
2015-02-19 14:52:11 +02:00
Sijia Chen
f9080ac090 complete logic of simulcastavc with sps_pps_listing 2015-02-11 17:31:17 +08:00
dong zhang
7d6d86b63a add a UT for large picture 2015-02-11 16:31:00 +08:00
Sijia Chen
943981abc4 fix a nal generation for simulcast avc and add nal-type check for simulcast avc UT 2015-02-09 13:50:31 +08:00
ruil2
8fc2af760f Merge pull request #1804 from sijchen/fix_over3
[Encoder] fix potential overflow under large bit rate
2015-02-06 14:22:01 +08:00
ruil2
296ab4d490 Merge pull request #1802 from sijchen/savc50
[Encoder] fix for in-middle changing simulcast avc setting
2015-02-06 14:21:47 +08:00
Sijia Chen
431bcee310 1, update the max-nal-size setting in UT and param check since we are using a larger input check
2, fix potential overflow (will change bs but little impact on bs)
2015-02-06 13:24:20 +08:00
ruil2
7d055cae94 Merge pull request #1786 from sijchen/fix_over
improve error logging in UT
2015-02-06 12:17:56 +08:00
Sijia Chen
bc1b28b5dd fix for in-middle changing simulcast avc setting 2015-02-05 16:34:28 +08:00
Martin Storsjö
6c1aa29431 Avoid declaring a new variable shadowing an existing one in the same function
All the following loops below assume that int iIdx already is declared.
2015-02-04 11:25:09 +02:00
dong zhang
d3b2be5ec2 add UT for set MaxNalUnitLen
ignore the cases: 2 MBs in one picture, and the multithreads case, enable them when code is ready
2015-02-04 14:39:11 +08:00
Martin Storsjö
e4a278620b Remove dependencies on the decoder internals in unit test for the common library 2015-02-02 12:44:04 +02:00
sijchen
5fdd01ec0c Merge pull request #1787 from mstorsjo/remove-stray-semicolon
Remove accidental double semicolons
2015-02-02 18:15:02 +08:00
sijchen
e7a7a35611 Merge pull request #1779 from mstorsjo/share-memalign
Move the memory allocation/deallocation routines to the common library
2015-02-02 18:14:55 +08:00
Martin Storsjö
a3063531c4 Remove accidental double semicolons 2015-02-02 09:20:35 +02:00
Martin Storsjö
4394d22b70 Set m_iPicResSize in PrepareOneSrcFrame
If the calling test hasn't set m_iPicResSize, it is set to the
maximum frame size, which takes much longer to initialize than the
current actual frame size.

This reduces the runtime of EncoderInterfaceTest.SkipFrameCheck
in valgrind from 229 seconds to 8 seconds, and the total runtime
of all the test cases in EncoderInterfaceTest from 405 seconds
to 89 seconds.
2015-01-30 16:02:40 +02:00
Martin Storsjö
2356eb1ff6 Move the memory allocation/deallocation routines to the common library
They are still used slightly differently in the encoder and decoder;
the decoder uses plain functions while the encoder uses one object
keeping track of the number of allocated bytes, and keeping track
of the requested alignment.
2015-01-30 11:30:59 +02:00
Martin Storsjö
869870e670 Rename the decoder WelsMalloc to WelsMallocz
This function actually zero-initializes the allocated memory, thus
make this clear in the function name.

This makes the function name match the same behaviour in the encoder.
2015-01-30 10:37:48 +02:00
Sijia Chen
3c085aec79 improve error logging in UT 2015-01-30 15:43:20 +08:00
Martin Storsjö
76b0f8c17a Avoid writing outside of the target rect in MCHalfPelFilterAnchor
This simplifies comparison between the output of MCHalfPelFilterAnchor
and the actual MC function implementations.
2015-01-29 08:51:02 +02:00
dongzha
4f4adcec49 Merge pull request #1772 from mstorsjo/mc-unify
Move the MC implementation to the common library
2015-01-29 09:28:57 +08:00
dongzha
59b3b428a2 Merge pull request #1768 from mstorsjo/msvc-ignore
Add a .gitignore file for test/build/win32
2015-01-29 09:28:02 +08:00
Martin Storsjö
605f2fb858 Remove the now unnecessary mc_test_common.h 2015-01-28 23:59:41 +02:00
Martin Storsjö
f03edd79c2 Merge all MC unit tests into one file
Since both encoder and decoder use the same MC implementation now,
one set of tests is enough.
2015-01-28 23:59:37 +02:00
Martin Storsjö
9a0663620a Move the MC routines to the common library
Use the decoder versions of the functions (which are capable
of handling widths 4/8/16 for luma, not only 16 as in the
encoder). By using the more generic versions, there may be a small
performance loss since the functions need to check the width
in every call. Actual measurements show that the actual change is
very small (and the shared routines turn out to actually be faster
than the existing ones in ARM NEON setups).
2015-01-28 15:32:46 +02:00
Martin Storsjö
909a508749 Use the right stride in a memset in the EncMcHalfpel test 2015-01-28 15:19:19 +02:00
Martin Storsjö
151dfe04d5 Extend the tested area in the encoder MC test 2015-01-28 15:11:17 +02:00
Martin Storsjö
9a9fc4c489 Change pfSampleAveraging to be a single function with internal width handling
This makes it match the behaviour of pMcLumaFunc and pMcChromaFunc.
2015-01-28 13:59:58 +02:00
Martin Storsjö
1127aa7761 Simplify the MC unit tests now that the naming is made consistent 2015-01-28 13:59:58 +02:00
Martin Storsjö
8b6bf0499f Rename the encoder MC chroma/luma functions to match the naming in the decoder 2015-01-28 13:59:58 +02:00
Martin Storsjö
bb21b62cbd Simplify the MC unit tests now that the luma functions have a similar signature 2015-01-28 13:59:58 +02:00
Martin Storsjö
1cf68cad13 Move the qpel function table into the luma function itself
This unifies the luma MC interface to match the decoder side.
2015-01-28 13:59:58 +02:00
Martin Storsjö
1be2cd14c0 Add a .gitignore file for test/build/win32
This file is copied from codec/build/win32.
2015-01-28 09:42:10 +02:00
Martin Storsjö
853d2922db Use float literals instead of double literals when setting float values
This fixes warnings with MSVC 2008.
2015-01-28 09:19:09 +02:00
Sijia Chen
5752888c81 1, fix a potential overflow
2,    remove some unnecessary multiplier and add input check of spatial BR
2015-01-28 10:51:27 +08:00
Martin Storsjö
e5c2f333be Remove the forceC parameter from DEF_MCCOPYTEST
Even if there actually is no SIMD optimized version of the
width==2 cases, luma function for SIMD still needs to handle
it by calling McCopyWidthEq2_c for these cases.

This simplifies the UT code a little, and makes sure that
those codepaths are tested properly.
2015-01-27 12:11:38 +02:00
Martin Storsjö
10e2f90b7e Bundle MC tests for all motion vectors in one single test
This speeds up the compile time from 21.3 to 2.6 seconds
for the MC test files.

This makes it slightly harder to see exactly which test
failed on a quick glance, but it makes the overall structure of
the unit test output more manageable and readable, by reducing
the number of tests from 1300 to 430.
2015-01-27 09:41:00 +02:00
Martin Storsjö
ca97f78ae8 Add unit tests for special cased MC functions in the encoder 2015-01-27 09:41:00 +02:00
Martin Storsjö
8084a2c797 Add unit tests for encoder MC 2015-01-27 09:41:00 +02:00
Martin Storsjö
4df4c1d757 Prepare the shared MC test code for adding an encoder MC test 2015-01-27 09:41:00 +02:00
Martin Storsjö
49af2b592d Split DecUT_MotionCompensation to a shareable header
This allows adding a version of the same test for the encoder.
2015-01-27 09:40:59 +02:00
Martin Storsjö
cf3e7b5dec Make local functions and tables in DecUT_MotionCompensation static 2015-01-27 09:40:59 +02:00
Martin Storsjö
8ecb8b4200 Remove unused includes in DecUT_MotionCompensation 2015-01-27 09:40:59 +02:00