Commit Graph

56 Commits

Author SHA1 Message Date
sijchen
2fe99d688b add basic me test 2014-03-14 16:40:02 +08:00
Martin Storsjö
c3ddd926ba Include time.h in the MemoryAlloc test
This is required to get the time() function. This fixes building
on older MSVC versions.
2014-03-10 11:38:48 +02:00
ruil2
a922155c9a Merge pull request #466 from sijchen/add_memalign_test
Add memalign unit test
2014-03-10 17:25:41 +08:00
sijchen
dfd3d89a20 specific slice mode in encoder test 2014-03-10 16:57:19 +08:00
sijchen
53a570556d add memalign unit test 2014-03-10 16:28:05 +08:00
Martin Storsjö
a93dd7ca42 Use the slice mode enum in BaseEncoderTest 2014-03-07 14:53:29 +02:00
Ethan Hugg
a86c1b048b Merge pull request #391 from mstorsjo/threaded-test
Add a test with sliced encoding
2014-03-03 07:54:14 -08:00
Martin Storsjö
f13b5c3465 Add a test with sliced encoding
This serves as a simple test of the thread library.
2014-03-03 11:08:35 +02:00
Martin Storsjö
b6dd41ebc3 Use gtest functions for comparing hash strings
This prints the mismatched strings if the test failed,
simplifying managing and updating the test suite.
2014-03-03 10:53:31 +02:00
Martin Storsjö
9ccabd1fe3 Fix cropping when using SEncParamBase
The iFrameWidth/iFrameHeight fields are already aligned by the
SetActualPicResolution() function. Previously when iFrameWidth was
aligned directly in ParamBaseTranscode, this aligned value was used
to set iActualWidth/iActualHeight - losing the original, cropped
size.

This makes sure the output bitstream from the test of encoding
res/Static_152_100.yuv actually is cropped as it should.
2014-03-03 10:34:37 +02:00
Martin Storsjö
a5f5b37a25 Renumber vtable entries in the C ABI test 2014-02-26 22:13:59 +02:00
Martin Storsjö
c7ff8876bb Add a new public method for initializing SEncParamExt to default values
This simplifies forward source compatibility when new fields are
added to SEncParamExt - when new fields are added to SEncParamExt,
this method makes sure those fields are initialized to the
default value - otherwise all API users would have to manually check
SEncParamExt every time it is updated to make sure there's no new fields
that should be set to a nonzero value by default (e.g. like
bEnableFrameSkip).
2014-02-26 22:12:11 +02:00
Licai Guo
e762951539 add more unit test on decoder 2014-02-25 22:51:56 -08:00
Martin Storsjö
e88348b76d Allow building tests on MSVC versions where stdint.h is missing
Of the supported MSVC versions, only 2008 actually is missing
stdint.h, it is included in MSVC since 2010.
2014-02-24 15:38:37 +02:00
Martin Storsjö
0f3dfb33b0 Use the local sha1 function names directly without compatibility defines 2014-02-24 15:38:19 +02:00
Martin Storsjö
4f5fd952b6 Use the bundled sha1 implementation instead of relying on openssl
This simplifies running tests on platforms where OpenSSL isn't
commonly available.
2014-02-24 15:38:19 +02:00
Martin Storsjö
e8a2cf6d1f Make the SHA1Result function write the output into a byte array 2014-02-24 15:38:19 +02:00
Martin Storsjö
7a4a066469 Make the SHA1 header compatible with C++ 2014-02-24 15:38:19 +02:00
Martin Storsjö
fdd79e734a Add an SHA1 implementation by Paul Jones 2014-02-24 15:38:15 +02:00
ruil2
3ba6a5f4da Simplify encoder interface--remove EncoderFrame2 from interface
function
2014-02-20 10:33:07 +08:00
Martin Storsjö
49f4dad1b7 Split the encoder Initialize method into two
This avoids the struct type casting and having to pass a parameter
that says which kind of struct it actually is.
2014-02-18 22:51:54 +02:00
Martin Storsjö
a899f05f2d Don't have SEncParamExt inherit SEncParamBase
Instead just duplicate the common fields. These fields had to
be duplicated for the C interface compatibility anyway - but
this way there is no risk to accidentally introduce an ABI
break since there is no need for the layout of SEncParamBase to
actually match the start of SEncParamExt.
2014-02-18 22:51:54 +02:00
Martin Storsjö
6d6a63a703 Mark the Initialize pointer parameter as const
This makes it clear to the callers that the struct will
not be modified by this call.
2014-02-18 22:51:53 +02:00
Martin Storsjö
5cb8518306 Remove the Initialize2 function from the external API
This function no longer needs to be public since one can pass
SEncParamExt to the normal Initialize function.
2014-02-18 22:51:53 +02:00
Martin Storsjö
1075338b9b Use the actual struct type instead of a void pointer to the decoder Initialize method 2014-02-18 13:00:59 +02:00
Martin Storsjö
658d1e3651 Remove the unused iInitType parameter to the decoder Initialize method 2014-02-18 13:00:45 +02:00
ruil2
35fa429fb0 encoder interface update step1 2014-02-18 09:51:47 +08:00
Martin Storsjö
76383c7150 Add a test that verifies that the bool typedef in C is ABI compatible with C++ 2014-02-13 11:03:36 +02:00
Martin Storsjö
ce22f84a2b Regenerate target makefiles after the latest mktargets.py changes 2014-02-12 22:11:05 +02:00
jwwang
4fa810da8b 1. support .c in makefile generator. 2. add test to check C interfaces. 2014-02-12 14:52:35 +08:00
Martin Storsjö
d0185ab253 Remove redundant /./ parts from pathnames in makefiles
This is mostly a cosmetic improvement for the quiet make output.
2014-02-08 18:46:52 +02:00
Martin Storsjö
3a1bc92778 Include <algorithm> for std::min
This fixes building the test code on MSVC 2013.

(Actually building all of the tests on windows still is tricky
due to the OpenSSL dependency for SHA1, but there's a patchset
in review to take care of that.)
2014-02-06 10:55:12 +02:00
Martin Storsjö
43814000e4 Open output files in binary mode in the testsuite
This fixes running tests on windows.
2014-02-06 10:54:39 +02:00
jwwang
f2aaffbb72 fix clang error 2014-02-06 11:37:42 +08:00
jwwang
94bd097fcf minor naming/style/bug fixes 2014-02-05 18:04:32 +08:00
jwwang
0c2227e4b1 Remove temp files using the iterator pattern 2014-02-05 18:00:48 +08:00
jwwang
596be02cc4 Fix incomplete decocder output for not flushing the temp file 2014-02-05 18:00:48 +08:00
jwwang
8247eef9bb refactor and add decode_encode_test to pipeline decoder outoput to encoder test 2014-02-05 18:00:48 +08:00
Martin Storsjö
8ecdcc7172 Add a make option for silencing the commands run
Add "V=No" to the make command to silence the make output.

This makes it easier to spot warnings or other unexpected messages
in the build output.
2014-01-30 13:56:19 +02:00
Martin Storsjö
7df69c1482 Remove an unnecessary field from generated makefiles 2014-01-24 15:02:40 +02:00
Martin Storsjö
3cacaf85f1 Include the executable suffix within make
This makes sure that e.g. "make clean" actually removes
the built exe files, and avoids relinking the exe files each
time make is run when cross compiling from linux to windows.

(Make on windows seems to have an exception that knows to skip
rebuilding the 'h264enc' target if 'h264enc' doesn't exist but
'h264enc.exe' does, but this exception doesn't work on normal
unix make.)
2014-01-23 16:15:22 +02:00
Martin Storsjö
dd0db820fc Rename public interface methods to avoid two overloaded methods with the same name
This is required to make the order in the C++ virtual table
consistent in MSVC - previously the overloaded methods were
ordered differently in the vtable compared to the interface
declaration.
2014-01-21 20:54:32 +02:00
Varun B Patil
d1d444b622 Removed unused headers in test/ 2014-01-20 22:11:47 +05:30
Martin Storsjö
a8d549e343 Omit assembler source rules if no asm sources are found 2014-01-17 18:52:46 +02:00
Martin Storsjö
b842ff30e5 Make the compiler/ar/linker file output parameters overrideable
This is in preparation for allowing building using MSVC via
makefiles.
2014-01-17 12:06:11 +02:00
Varun B Patil
1f598b892b Encoder output test : added stream with non-multiple of 16 width/height
Also added decoder output test for the same.
2014-01-12 19:54:55 +05:30
EKR
78502ebcdf Fix Travis and update test targets.mk (64-bit only for now) 2014-01-08 20:17:46 -08:00
jwwang
94b79c42b1 minor fixes to the tests 2014-01-08 19:12:21 -08:00
jwwang
6f58a0c1f7 Add encoder test 2014-01-08 19:12:02 -08:00
jwwang
cb0053f860 Add decoder test 2014-01-08 19:11:23 -08:00